|
From: <be...@us...> - 2012-04-16 01:17:34
|
Revision: 9342
http://xoops.svn.sourceforge.net/xoops/?rev=9342&view=rev
Author: beckmi
Date: 2012-04-16 01:17:28 +0000 (Mon, 16 Apr 2012)
Log Message:
-----------
fixing problem in formtextdateselect (wishcraft)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopsform/formtextdateselect.php
Modified: XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-04-16 01:07:08 UTC (rev 9341)
+++ XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-04-16 01:17:28 UTC (rev 9342)
@@ -8,6 +8,7 @@
- ID: 3466534 tooltip "$ not defined" fix (culex)
- ID: 3513787 wrong cookie_domain (arion92fr)
- ID: 3518291 Fix of variables assigned by reference in formelementtray
+ - problem in formtextdateselect (wishcraft)
Updated:
- phpThumb to 1.7.11 (mamba)
Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopsform/formtextdateselect.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopsform/formtextdateselect.php 2012-04-16 01:07:08 UTC (rev 9341)
+++ XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopsform/formtextdateselect.php 2012-04-16 01:17:28 UTC (rev 9342)
@@ -49,91 +49,93 @@
}
$jstime = formatTimestamp($ele_value, _CAL_FORMAT);
- $GLOBALS['xoTheme']->addScript('include/calendar.js');
- $GLOBALS['xoTheme']->addStylesheet('include/calendar-blue.css');
- if (!$included) {
- $included = true;
- $GLOBALS['xoTheme']->addScript('','', '
- var calendar = null;
-
- function selected(cal, date) {
- cal.sel.value = date;
- }
-
- function closeHandler(cal) {
- cal.hide();
- Calendar.removeEvent(document, "mousedown", checkCalendar);
- }
-
- function checkCalendar(ev) {
- var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
- for (; el != null; el = el.parentNode)
- if (el == calendar.element || el.tagName == "A") break;
- if (el == null) {
- calendar.callCloseHandler(); Calendar.stopEvent(ev);
- }
- }
- function showCalendar(id) {
- var el = xoopsGetElementById(id);
- if (calendar != null) {
- calendar.hide();
- } else {
- var cal = new Calendar(true, "' . $jstime . '", selected, closeHandler);
- calendar = cal;
- cal.setRange(1900, 2100);
- calendar.create();
- }
- calendar.sel = el;
- calendar.parseDate(el.value);
- calendar.showAtElement(el);
- Calendar.addEvent(document, "mousedown", checkCalendar);
- return false;
- }
-
- Calendar._DN = new Array
- ("' . _CAL_SUNDAY . '",
- "' . _CAL_MONDAY . '",
- "' . _CAL_TUESDAY . '",
- "' . _CAL_WEDNESDAY . '",
- "' . _CAL_THURSDAY . '",
- "' . _CAL_FRIDAY . '",
- "' . _CAL_SATURDAY . '",
- "' . _CAL_SUNDAY . '");
- Calendar._MN = new Array
- ("' . _CAL_JANUARY . '",
- "' . _CAL_FEBRUARY . '",
- "' . _CAL_MARCH . '",
- "' . _CAL_APRIL . '",
- "' . _CAL_MAY . '",
- "' . _CAL_JUNE . '",
- "' . _CAL_JULY . '",
- "' . _CAL_AUGUST . '",
- "' . _CAL_SEPTEMBER . '",
- "' . _CAL_OCTOBER . '",
- "' . _CAL_NOVEMBER . '",
- "' . _CAL_DECEMBER . '");
-
- Calendar._TT = {};
- Calendar._TT["TOGGLE"] = "' . _CAL_TGL1STD . '";
- Calendar._TT["PREV_YEAR"] = "' . _CAL_PREVYR . '";
- Calendar._TT["PREV_MONTH"] = "' . _CAL_PREVMNTH . '";
- Calendar._TT["GO_TODAY"] = "' . _CAL_GOTODAY . '";
- Calendar._TT["NEXT_MONTH"] = "' . _CAL_NXTMNTH . '";
- Calendar._TT["NEXT_YEAR"] = "' . _CAL_NEXTYR . '";
- Calendar._TT["SEL_DATE"] = "' . _CAL_SELDATE . '";
- Calendar._TT["DRAG_TO_MOVE"] = "' . _CAL_DRAGMOVE . '";
- Calendar._TT["PART_TODAY"] = "(' . _CAL_TODAY . ')";
- Calendar._TT["MON_FIRST"] = "' . _CAL_DISPM1ST . '";
- Calendar._TT["SUN_FIRST"] = "' . _CAL_DISPS1ST . '";
- Calendar._TT["CLOSE"] = "' . _CLOSE . '";
- Calendar._TT["TODAY"] = "' . _CAL_TODAY . '";
-
- // date formats
- Calendar._TT["DEF_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
- Calendar._TT["TT_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
-
- Calendar._TT["WK"] = "";
- ');
+ if (is_object($GLOBALS['xoTheme'])) {
+ $GLOBALS['xoTheme']->addScript('include/calendar.js');
+ $GLOBALS['xoTheme']->addStylesheet('include/calendar-blue.css');
+ if (!$included) {
+ $included = true;
+ $GLOBALS['xoTheme']->addScript('','', '
+ var calendar = null;
+
+ function selected(cal, date) {
+ cal.sel.value = date;
+ }
+
+ function closeHandler(cal) {
+ cal.hide();
+ Calendar.removeEvent(document, "mousedown", checkCalendar);
+ }
+
+ function checkCalendar(ev) {
+ var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+ for (; el != null; el = el.parentNode)
+ if (el == calendar.element || el.tagName == "A") break;
+ if (el == null) {
+ calendar.callCloseHandler(); Calendar.stopEvent(ev);
+ }
+ }
+ function showCalendar(id) {
+ var el = xoopsGetElementById(id);
+ if (calendar != null) {
+ calendar.hide();
+ } else {
+ var cal = new Calendar(true, "' . $jstime . '", selected, closeHandler);
+ calendar = cal;
+ cal.setRange(1900, 2100);
+ calendar.create();
+ }
+ calendar.sel = el;
+ calendar.parseDate(el.value);
+ calendar.showAtElement(el);
+ Calendar.addEvent(document, "mousedown", checkCalendar);
+ return false;
+ }
+
+ Calendar._DN = new Array
+ ("' . _CAL_SUNDAY . '",
+ "' . _CAL_MONDAY . '",
+ "' . _CAL_TUESDAY . '",
+ "' . _CAL_WEDNESDAY . '",
+ "' . _CAL_THURSDAY . '",
+ "' . _CAL_FRIDAY . '",
+ "' . _CAL_SATURDAY . '",
+ "' . _CAL_SUNDAY . '");
+ Calendar._MN = new Array
+ ("' . _CAL_JANUARY . '",
+ "' . _CAL_FEBRUARY . '",
+ "' . _CAL_MARCH . '",
+ "' . _CAL_APRIL . '",
+ "' . _CAL_MAY . '",
+ "' . _CAL_JUNE . '",
+ "' . _CAL_JULY . '",
+ "' . _CAL_AUGUST . '",
+ "' . _CAL_SEPTEMBER . '",
+ "' . _CAL_OCTOBER . '",
+ "' . _CAL_NOVEMBER . '",
+ "' . _CAL_DECEMBER . '");
+
+ Calendar._TT = {};
+ Calendar._TT["TOGGLE"] = "' . _CAL_TGL1STD . '";
+ Calendar._TT["PREV_YEAR"] = "' . _CAL_PREVYR . '";
+ Calendar._TT["PREV_MONTH"] = "' . _CAL_PREVMNTH . '";
+ Calendar._TT["GO_TODAY"] = "' . _CAL_GOTODAY . '";
+ Calendar._TT["NEXT_MONTH"] = "' . _CAL_NXTMNTH . '";
+ Calendar._TT["NEXT_YEAR"] = "' . _CAL_NEXTYR . '";
+ Calendar._TT["SEL_DATE"] = "' . _CAL_SELDATE . '";
+ Calendar._TT["DRAG_TO_MOVE"] = "' . _CAL_DRAGMOVE . '";
+ Calendar._TT["PART_TODAY"] = "(' . _CAL_TODAY . ')";
+ Calendar._TT["MON_FIRST"] = "' . _CAL_DISPM1ST . '";
+ Calendar._TT["SUN_FIRST"] = "' . _CAL_DISPS1ST . '";
+ Calendar._TT["CLOSE"] = "' . _CLOSE . '";
+ Calendar._TT["TODAY"] = "' . _CAL_TODAY . '";
+
+ // date formats
+ Calendar._TT["DEF_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
+ Calendar._TT["TT_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
+
+ Calendar._TT["WK"] = "";
+ ');
+ }
}
return "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $display_value . "'" . $this->getExtra() . " /><input type='reset' value=' ... ' onclick='return showCalendar(\"" . $ele_name . "\");'>";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|