diff --git a/e107_handlers/calendar/calendar_class.php b/e107_handlers/calendar/calendar_class.php
index 1b82b4235..3d694e8af 100755
--- a/e107_handlers/calendar/calendar_class.php
+++ b/e107_handlers/calendar/calendar_class.php
@@ -1,16 +1,14 @@
calendar_file = e_HANDLER_ABS.'calendar/calendar_stripped.js';
- $this->calendar_setup_file = e_HANDLER_ABS.'calendar/calendar-setup_stripped.js';
+ $this->calendar_file = e_PACK_ABS.'calendar/calendar_stripped.js';
+ $this->calendar_setup_file = e_PACK_ABS.'calendar/calendar-setup_stripped.js';
}
else
{
- $this->calendar_file = e_HANDLER_ABS.'calendar/calendar.js';
- $this->calendar_setup_file = e_HANDLER_ABS.'calendar/calendar-setup.js';
+ $this->calendar_file = e_PACK_ABS.'calendar/calendar.js';
+ $this->calendar_setup_file = e_PACK_ABS.'calendar/calendar-setup.js';
}
- if(file_exists(e_HANDLER.'calendar/language/'.e_LANGUAGE.'.js'))
+ if(file_exists(e_WEB_PACK.'calendar/languages/'.e_LANGUAGE.'.js'))
{
- $this->calendar_lang_file = e_HANDLER_ABS.'calendar/language/'.e_LANGUAGE.'.js';
+ $this->calendar_lang_file = e_PACK_ABS.'calendar/languages/'.e_LANGUAGE.'.js';
}
else
{
- $this->calendar_lang_file = e_HANDLER_ABS.'calendar/language/English.js';
+ $this->calendar_lang_file = e_PACK_ABS.'calendar/languages/English.js';
}
if(defined('CALENDAR_IMG'))
@@ -62,7 +60,7 @@ class DHTML_Calendar
}
else
{
- $this->calendar_img = "";
+ $this->calendar_img = "
";
}
if(file_exists(THEME."calendar.css"))
@@ -71,7 +69,7 @@ class DHTML_Calendar
}
else
{
- $this->calendar_theme_file = e_HANDLER_ABS."calendar/calendar.css";
+ $this->calendar_theme_file = e_PACK_ABS."calendar/calendar.css";
}
$this->calendar_options = array('ifFormat' => '%Y/%m/%d', 'daFormat' => '%Y/%m/%d');
@@ -107,14 +105,14 @@ class DHTML_Calendar
$id = $this->_gen_id();
$attrstr = $this->_make_html_attr(array_merge($field_attributes, array('id' => $this->_field_id($id), 'type' => 'text')));
$ret .= ' ';
-
- //TODO perhaps make an admin-pref option for this. Default should be without the trigger-image.
+
+ //TODO perhaps make an admin-pref option for this. Default should be without the trigger-image.
// $ret .= "".$this->calendar_img."";
// $options = array_merge($cal_options, array('inputField' => $this->_field_id($id), 'button' => $this->_trigger_id($id)));
-
+
$options = array_merge($cal_options, array('inputField' => $this->_field_id($id), 'button' => null));
-
- e107::getJs()->footerInline($this->_make_calendar($options, false));
+
+ e107::getJs()->footerInline($this->_make_calendar($options, false));
//JS manager to send JS to header if possible, if not - footer
e107::getJs()
->tryHeaderFile($this->calendar_file)
diff --git a/e107_handlers/calendar/sample.php b/e107_handlers/calendar/sample.php
deleted file mode 100755
index 862467c5d..000000000
--- a/e107_handlers/calendar/sample.php
+++ /dev/null
@@ -1,47 +0,0 @@
-load_files();
-}
-require_once(HEADERF);
-
-echo "
-
-"; -echo $cal->make_input_field( - // calendar options go here; see the documentation and/or calendar-setup.js - array('showsTime' => true, - 'showOthers' => true, - 'ifFormat' => '%Y/%m/%d %I:%M %P', - 'weekNumbers' => false, - 'timeFormat' => '12'), - // field attributes go here - array('style' => 'color: #840; background-color: #ff8; border: 1px solid #000; text-align: center', - 'name' => 'date1', - 'value' => strftime('%Y/%m/%d %I:%M %P', strtotime('now')))); - - -echo " |
"; -unset($cal_options); -unset($cal_attrib); -$cal_options['showsTime'] = false; -$cal_options['showOthers'] = false; -$cal_options['weekNumbers'] = true; -$cal_attrib['class'] = "tbox"; -$cal_attrib['name'] = "date2"; -$cal_attrib['value'] = "[select date]"; -echo $cal->make_input_field($cal_options, $cal_attrib); -echo " - | -