[limb-svn] r5957 - in 3.x/trunk/limb/calendar/src: . template/tags

svn at limb-project.com svn at limb-project.com
Thu Jun 7 15:30:04 MSD 2007


Author: pachanga
Date: 2007-06-07 15:30:04 +0400 (Thu, 07 Jun 2007)
New Revision: 5957
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5957

Added:
   3.x/trunk/limb/calendar/src/template/tags/datetime.tag.php
Removed:
   3.x/trunk/limb/calendar/src/template/tags/calendar.tag.php
Modified:
   3.x/trunk/limb/calendar/src/lmbCalendarWidget.class.php
Log:
-- <limb:CALENDAR> tag support removed, long live the <datetime> tag!
-- <datetime> "stripped" attribute support added(by default true), it allows to control which version of jscalendar to use

Modified: 3.x/trunk/limb/calendar/src/lmbCalendarWidget.class.php
===================================================================
--- 3.x/trunk/limb/calendar/src/lmbCalendarWidget.class.php	2007-06-07 11:27:59 UTC (rev 5956)
+++ 3.x/trunk/limb/calendar/src/lmbCalendarWidget.class.php	2007-06-07 11:30:04 UTC (rev 5957)
@@ -2,9 +2,9 @@
 /*
  * Limb PHP Framework
  *
- * @link http://limb-project.com 
+ * @link http://limb-project.com
  * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
  */
 
 /**
@@ -26,9 +26,9 @@
   protected $calendar_options;
 
   function __construct($lang              = 'en',
+                       $stripped          = true,
                        $theme             = 'calendar-win2k-1',
-                       $calendar_lib_path = '/shared/calendar/js/',
-                       $stripped          = true)
+                       $calendar_lib_path = '/shared/calendar/js/')
   {
     if($stripped)
     {

Deleted: 3.x/trunk/limb/calendar/src/template/tags/calendar.tag.php
===================================================================
--- 3.x/trunk/limb/calendar/src/template/tags/calendar.tag.php	2007-06-07 11:27:59 UTC (rev 5956)
+++ 3.x/trunk/limb/calendar/src/template/tags/calendar.tag.php	2007-06-07 11:30:04 UTC (rev 5957)
@@ -1,57 +0,0 @@
-<?php
-/*
- * Limb PHP Framework
- *
- * @link http://limb-project.com
- * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html
- */
-require_once('limb/wact/src/tags/form/input.tag.php');
-require_once('limb/calendar/src/lmbCalendarWidget.class.php');
-
-/**
- * @tag datetime,limb:CALENDAR
- * @forbid_end_tag
- * @package calendar
- * @version $Id$
- */
-class lmbCalendarTag extends WactInputTag
-{
-  function getRenderedTag()
-  {
-    return 'input';
-  }
-
-  function prepare()
-  {
-    $this->setAttribute('type', 'text');
-    parent :: prepare();
-  }
-
-  function generateAfterCloseTag($code)
-  {
-    parent :: generateAfterCloseTag($code);
-
-    if(!$lang = $this->getAttribute('lang'))
-      $lang = 'en';
-
-    $widget = new lmbCalendarWidget($lang);
-
-    if($format = $this->getAttribute('format'))
-    {
-      $widget->setOption('ifFormat', $format);
-      $widget->setOption('daFormat', $format);
-    }
-    else
-    {
-      $widget->setOption('ifFormat', '%Y-%m-%d');
-      $widget->setOption('daFormat', '%Y-%m-%d');
-    }
-
-    $code->writeHTML($widget->loadFiles() .
-                     $widget->makeButton($this->getAttribute('id')));
-  }
-
-}
-
-?>
\ No newline at end of file

Copied: 3.x/trunk/limb/calendar/src/template/tags/datetime.tag.php (from rev 5951, 3.x/trunk/limb/calendar/src/template/tags/calendar.tag.php)
===================================================================
--- 3.x/trunk/limb/calendar/src/template/tags/datetime.tag.php	                        (rev 0)
+++ 3.x/trunk/limb/calendar/src/template/tags/datetime.tag.php	2007-06-07 11:30:04 UTC (rev 5957)
@@ -0,0 +1,62 @@
+<?php
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+require_once('limb/wact/src/tags/form/input.tag.php');
+require_once('limb/calendar/src/lmbCalendarWidget.class.php');
+
+/**
+ * @tag datetime
+ * @forbid_end_tag
+ * @package calendar
+ * @version $Id$
+ */
+class lmbDatetimeTag extends WactInputTag
+{
+  function getRenderedTag()
+  {
+    return 'input';
+  }
+
+  function prepare()
+  {
+    $this->setAttribute('type', 'text');
+    parent :: prepare();
+  }
+
+  function generateAfterCloseTag($code)
+  {
+    parent :: generateAfterCloseTag($code);
+
+    if(!$lang = $this->getAttribute('lang'))
+      $lang = 'en';
+
+    if(!$this->hasAttribute('stripped'))
+      $stripped = true;
+    else
+      $stripped = $this->getBoolAttribute('stripped');
+
+    $widget = new lmbCalendarWidget($lang, $stripped);
+
+    if($format = $this->getAttribute('format'))
+    {
+      $widget->setOption('ifFormat', $format);
+      $widget->setOption('daFormat', $format);
+    }
+    else
+    {
+      $widget->setOption('ifFormat', '%Y-%m-%d');
+      $widget->setOption('daFormat', '%Y-%m-%d');
+    }
+
+    $code->writeHTML($widget->loadFiles() .
+                     $widget->makeButton($this->getAttribute('id')));
+  }
+
+}
+
+?>
\ No newline at end of file



More information about the limb-svn mailing list