From: <txm...@us...> - 2012-06-30 20:45:42
|
Revision: 9753 http://xoops.svn.sourceforge.net/xoops/?rev=9753&view=rev Author: txmodxoops Date: 2012-06-30 20:45:36 +0000 (Sat, 30 Jun 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsCore/tags/2.6 timgno/htdocs/class/xoopsform/formdatepicker.php Modified: XoopsCore/tags/2.6 timgno/htdocs/class/xoopsform/formdatepicker.php =================================================================== --- XoopsCore/tags/2.6 timgno/htdocs/class/xoopsform/formdatepicker.php 2012-06-30 20:09:17 UTC (rev 9752) +++ XoopsCore/tags/2.6 timgno/htdocs/class/xoopsform/formdatepicker.php 2012-06-30 20:45:36 UTC (rev 9753) @@ -15,11 +15,12 @@ * @subpackage form * @since 2.5.0 * @author TXMod Xoops (AKA timgno) http://www.txmodxoops.org/ - * @version $Id: formdatepicker.php 9679 2012-06-19 01:18:38Z timgno $ + * @version $Id: formdatepicker.php 9747 2012-06-19 01:18:38Z timgno $ */ defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); +xoops_loadLanguage('calendar'); /** * A text field with jquery ui calendar popup */ @@ -28,6 +29,7 @@ { var $showIcon = false; var $type = ''; + var $firstDay = 0; function XoopsFormDatePicker($caption, $name, $size = 15, $value = 0, $showIcon = true, $type = 'normal') { @@ -51,62 +53,24 @@ $display_value = ''; } - //$jqtime = formatTimestamp($ele_value, _CAL_FORMAT); + //$jqtime = formatTimestamp($ele_value, _CAL_JQUERY_FORMAT); if (is_object($GLOBALS['xoTheme'])) { $GLOBALS['xoTheme']->addStylesheet( XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); if (!$included) { $included = true; - $GLOBALS['xoTheme']->addScript( '', '', ' - $(function() { - $.datepicker.setDefaults( $.datepicker.regional[ "en" ] ); - $( ".datepicker" ).datepicker( - $.datepicker.regional[ "'._LANGCODE.'" ] = { - clearText: 'Clear', - clearStatus: '', - closeText: \''._CLOSE.'\', - closeStatus: 'Close without modify', - prevText: \''._CAL_PREVYR.'\', - prevStatus: \''._CAL_PREVMNTH.'\', - nextText: \''._CAL_NEXTYR.'\', - nextStatus: \''._CAL_NXTMNTH.'\', - currentText: \''._CAL_TODAY.'\', - currentStatus: 'Voir le mois courant', - monthNames: [\''._CAL_JANUARY.'\', \''._CAL_FEBRUARY.'\', \''._CAL_MARCH.'\', - \''._CAL_APRIL.'\', \''._CAL_MAY.'\', \''._CAL_JUNE.'\', - \''._CAL_JULY.'\', \''._CAL_AUGUST.'\', \''._CAL_SEPTEMBER.'\', - \''._CAL_OCTOBER.'\', \''._CAL_NOVEMBER.'\', \''._CAL_DECEMBER.'\'], - monthNamesShort: [\''._CAL_SHORT_JANUARY.'\', \''._CAL_SHORT_FEBRUARY.'\', \''._CAL_SHORT_MARCH.'\', - \''._CAL_SHORT_APRIL.'\', \''._CAL_SHORT_MAY.'\', \''._CAL_SHORT_JUNE.'\', - \''._CAL_SHORT_JULY.'\', \''._CAL_SHORT_AUGUST.'\', \''._CAL_SHORT_SEPTEMBER.'\', - \''._CAL_SHORT_OCTOBER.'\', \''._CAL_SHORT_NOVEMBER.'\', \''._CAL_SHORT_DECEMBER.'\'], - monthStatus: 'View another mounth', - yearStatus: 'View another year', - weekHeader: 'Sm', - weekStatus: '', - dayNames: [\''._CAL_SUNDAY.'\', \''._CAL_MONDAY.'\', \''._CAL_TUESDAY.'\', - \''._CAL_WEDNESDAY.'\', \''._CAL_THURSDAY.'\', \''._CAL_FRIDAY.'\', - \''._CAL_SATURDAY.'\'], - dayNamesShort: [\''._CAL_SHORT_SUNDAY.'\', \''._CAL_SHORT_MONDAY.'\', \''._CAL_SHORT_TUESDAY.'\', - \''._CAL_SHORT_WEDNESDAY.'\', \''._CAL_SHORT_THURSDAY.'\', \''._CAL_SHORT_FRIDAY.'\', - \''._CAL_SHORT_SATURDAY.'\'], - dayNamesMin: [\''._CAL_MIN_JANUARY.'\', \''._CAL_MIN_FEBRUARY.'\', \''._CAL_MIN_MARCH.'\', - \''._CAL_MIN_APRIL.'\', \''._CAL_MIN_MAY.'\', \''._CAL_MIN_JUNE.'\', - \''._CAL_MIN_SATURDAY.'\'], - dayStatus: \'.'_CAL_DISPM1ST.'\', - dateStatus: 'Choose format DD, MM d', - dateFormat: \''._CAL_JQUERY_FORMAT.'\', - firstDay: 0, - initStatus: \.'._CAL_SELDATE.'\', - isRTL: false }'; if ($this->showIcon){', - { showOn: "button", - buttonImage: ' . XOOPS_URL . '"images/calendar.gif", + $GLOBALS['xoTheme']->addScript( '', array('type' => 'text/javascript'), " + $(function() { + $.datepicker.setDefaults( $.datepicker.regional[ '"._LANGCODE."' ] ); + $( '.datepicker' ).datepicker({ + dateFormat: '"._CAL_JQUERY_FORMAT."', + showOn: 'button', + buttonImage: '" . XOOPS_URL . "/images/calendar.gif', buttonImageOnly: true - }'}'); + }); }); - '); - } + "); } return "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' class='datepicker' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $display_value . "'" . $this->getExtra() . " /> <input type='reset' name='" . $ele_name . "' value='" . _RESET . "'>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |