View | Details | Raw Unified | Return to bug 8181
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-28 / +13 lines)
Lines 2114-2126 div.pager { Link Here
2114
	padding : .3em .5em .3em .5em;
2114
	padding : .3em .5em .3em .5em;
2115
	margin : .4em 0;
2115
	margin : .4em 0;
2116
}
2116
}
2117
div.pager img {+/* jQuery UI Autocomplete */
2117
div.pager img {
2118
+ul.ui-autocomplete li { list-style-type: none; font-size : inherit; }
2119
+ul.ui-autocomplete { -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.3); -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.3); box-shadow: 2px 2px 2px rgba(0,0,0,.3); }
2120
+input.ui-autocomplete-input.active { background: transparent url("../../img/loading-small.gif") right center no-repeat; }
2121
2122
	vertical-align : middle;
2118
	vertical-align : middle;
2123
}
2119
}
2120
2124
div.pager img.last {
2121
div.pager img.last {
2125
	padding-right: 5px;
2122
	padding-right: 5px;
2126
}
2123
}
Lines 2160-2190 div#acqui_order_supplierlist > div.supplier > div.baskets { Link Here
2160
}
2157
}
2161
2158
2162
/* jQuery UI Autocomplete */
2159
/* jQuery UI Autocomplete */
2163
ul.ui-autocomplete li {
2164
    list-style-type: none;
2165
    font-size : inherit;
2166
}
2167
2160
2168
ul.ui-autocomplete {
2169
    -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.3);
2170
    -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.3);
2171
    box-shadow: 2px 2px 2px rgba(0,0,0,.3);
2172
}
2173
2161
2174
.ui-autocomplete.ui-widget-content {
2175
    background-image : none;
2176
}
2177
2178
.ui-autocomplete.ui-widget-content .ui-state-hover {
2179
    border: 1px solid #B9D8D9;
2180
    background: #E6F0F2 none;
2181
    font-weight: normal;
2182
    color: #212121;
2183
}
2184
2162
2185
.ui-autocomplete-loading {
2186
    background: #FFF url("../../img/loading-small.gif") right center no-repeat;
2187
}
2188
2163
2189
/* jQuery UI standard tabs */
2164
/* jQuery UI standard tabs */
2190
.ui-tabs-nav .ui-tabs-selected a,
2165
.ui-tabs-nav .ui-tabs-selected a,
Lines 2365-2371 ul.ui-tabs-nav li { Link Here
2365
     border-radius: 0 0 4px 4px;
2340
     border-radius: 0 0 4px 4px;
2366
}
2341
}
2367
2342
2368
2369
.authref {
2343
.authref {
2370
    text-indent: 2em;
2344
    text-indent: 2em;
2371
}
2345
}
Lines 2373-2375 ul.ui-tabs-nav li { Link Here
2373
.authref .label {
2347
.authref .label {
2374
    font-style: italic;
2348
    font-style: italic;
2375
}
2349
}
2350
2351
/* jQuery UI Datepicker */
2352
.ui-datepicker-trigger {
2353
    vertical-align: middle;
2354
    margin : 0 3px;
2355
}
2356
.ui-datepicker {
2357
    -moz-box-shadow: 1px 1px 3px 0 #666;
2358
    -webkit-box-shadow: 1px 1px 3px 0 #666;
2359
    box-shadow: 1px 1px 3px 0 #666;
2360
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-103 / +54 lines)
Lines 1-106 Link Here
1
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css"/>
2
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
3
<script type="text/javascript">
4
// full day names
5
Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday"));
6
// short day names
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
8
// First day of the week. "0" means display Sunday first, "1" means display
9
// Monday first, etc.
10
Calendar._FD = [% CalendarFirstDayOfWeek %];
11
// full month names
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
13
// short month names
14
Calendar._SMN = new Array(_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec"));
15
// tooltips
16
Calendar._TT = {};
17
Calendar._TT["INFO"] = _("About the calendar");
18
19
Calendar._TT["ABOUT"] =
20
_("Dhtml Date/Time Selector")+"\n" +
21
"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
22
_("For latest version visit: http://dynarch.com/mishoo/calendar.epl")+"\n" +
23
_("Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details.") +
24
"\n\n" +
25
_("Date selection:")+"\n" +
26
_("- Use the \xab, \xbb buttons to select year")+"\n" +
27
_("- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month")+"\n" +
28
_("- Hold mouse button on any of the above buttons for faster selection.");
29
Calendar._TT["ABOUT_TIME"] = "\n\n" +
30
_("Time selection:")+"\n" +
31
_("- Click on any of the time parts to increase it")+"\n" +
32
_("- or Shift-click to decrease it")+"\n" +
33
_("- or click and drag for faster selection.");
34
35
Calendar._TT["PREV_YEAR"] = _("Prev. year (hold for menu)");
36
Calendar._TT["PREV_MONTH"] = _("Prev. month (hold for menu)");
37
Calendar._TT["GO_TODAY"] = _("Go to Today");
38
Calendar._TT["NEXT_MONTH"] = _("Next month (hold for menu)");
39
Calendar._TT["NEXT_YEAR"] = _("Next year (hold for menu)");
40
Calendar._TT["SEL_DATE"] = _("Select date");
41
Calendar._TT["DRAG_TO_MOVE"] = _("Drag to move");
42
Calendar._TT["PART_TODAY"] = _(" (today)");
43
44
// the following is to inform that "%s" is to be the first day of week
45
// %s will be replaced with the day name.
46
Calendar._TT["DAY_FIRST"] = _("Display %s first");
47
48
// This may be locale-dependent.  It specifies the week-end days, as an array
49
// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
50
// means Monday, etc.
51
Calendar._TT["WEEKEND"] = "0,6";
52
53
Calendar._TT["CLOSE"] = _("Close");
54
Calendar._TT["TODAY"] = _("Today");
55
Calendar._TT["TIME_PART"] = _("(Shift-)Click or drag to change value");
56
57
// date formats
58
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
59
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
60
61
Calendar._TT["WK"] = _("wk");
62
Calendar._TT["TIME"] = _("Time:");
63
</script>
64
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
65
<script type="text/javascript">
1
<script type="text/javascript">
66
//<![CDATA[
2
//<![CDATA[
67
var debug    = "[% debug %]";
3
/* Instead of including multiple localization files as you would normally see with
68
var dformat  = "[% dateformat %]";
4
   jQueryUI we expose the localization strings in the default configuration */
69
var sentmsg = 0;
5
jQuery(function($){
70
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
6
    $.datepicker.regional[''] = {
71
7
        closeText: _('Done'),
72
function Date_from_syspref(dstring) {
8
        prevText: _('Prev'),
73
	var dateX = dstring.split(/[-/]/);
9
        nextText: _('Next'),
74
	if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));}
10
        currentText: _('Today'),
75
	if (dformat === "iso") {
11
        monthNames: [_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),
76
		return new Date(dateX[0], (dateX[1] - 1), dateX[2]);  // YYYY-MM-DD to (YYYY,m(0-11),d)
12
        _('July'),_('August'),_('September'),_('October'),_('November'),_('December')],
77
	} else if (dformat === "us") {
13
        monthNamesShort: [_('Jan'), _('Feb'), _('Mar'), _('Apr'), _('May'), _('Jun'),
78
		return new Date(dateX[2], (dateX[0] - 1), dateX[1]);  // MM/DD/YYYY to (YYYY,m(0-11),d)
14
        _('Jul'), _('Aug'), _('Sep'), _('Oct'), _('Nov'), _('Dec')],
79
	} else if (dformat === "metric") {
15
        dayNames: [_('Sunday'), _('Monday'), _('Tuesday'), _('Wednesday'), _('Thursday'), _('Friday'), _('Saturday')],
80
		return new Date(dateX[2], (dateX[1] - 1), dateX[0]);  // DD/MM/YYYY to (YYYY,m(0-11),d)
16
        dayNamesShort: [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat')],
81
	} else {
17
        dayNamesMin: [_('Su'),_('Mo'),_('Tu'),_('We'),_('Th'),_('Fr'),_('Sa')],
82
		if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);}
18
        weekHeader: _('Wk'),
83
		return 0;
19
        dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
84
	}
20
        firstDay: [% CalendarFirstDayOfWeek %],
85
}
21
        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
86
22
        showMonthAfterYear: false,
87
function get_Calendar_limit (date,did) {
23
        yearSuffix: ''};
88
	// this function could be moved to a static calendar-extras.js file
24
    $.datepicker.setDefaults($.datepicker.regional['']);
89
	var dvalue = document.getElementById(did).value;
25
});
90
	if (dvalue == "") { return false; }
26
91
	var limitDate = Date_from_syspref(dvalue);
27
$(document).ready(function(){
92
	if (debug && debug > 5) {
28
93
		var month = date.getMonth() + 1;
29
$.datepicker.setDefaults({
94
		var dateString = date.getFullYear() + '-' + month + '-' + date.getDate();
30
        showOn: "both",
95
		alert("Comparing incoming (" + dateString + ") vs "
31
        changeMonth: true,
96
			+ "'" + did + "' limit\n"
32
        changeYear: true,
97
			+ "\n thisdate: " + date
33
        buttonImage: '[% interface %]/[% theme %]/img/famfamfam/silk/calendar.png',
98
			+ "\nlimitdate: " + limitDate
34
        buttonImageOnly: true,
99
			+ "\nlimit > thisdate : " + (limitDate > date) 
35
        showButtonPanel: true,
100
			+ "\nlimit < thisdate : " + (limitDate < date) 
36
        showOtherMonths: true,
101
		);
37
        selectOtherMonths: true
102
	}
38
    });
103
	return limitDate;
39
104
}
40
    $( ".datepicker" ).datepicker();
41
    // http://jqueryui.com/demos/datepicker/#date-range
42
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
43
        changeMonth: true,
44
        numberOfMonths: 1,
45
        onSelect: function( selectedDate ) {
46
            var option = this.id == "from" ? "minDate" : "maxDate",
47
                instance = $( this ).data( "datepicker" );
48
                date = $.datepicker.parseDate(
49
                    instance.settings.dateFormat ||
50
                    $.datepicker._defaults.dateFormat,
51
                    selectedDate, instance.settings );
52
            dates.not( this ).datepicker( "option", option, date );
53
        }
54
    });
55
});
105
//]]>
56
//]]>
106
</script>
57
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc (-15 / +2 lines)
Lines 4-24 Link Here
4
		<td>[% totaldue %]</td>
4
		<td>[% totaldue %]</td>
5
		<td>[% totalprice %]</td>
5
		<td>[% totalprice %]</td>
6
		<td colspan="2">
6
		<td colspan="2">
7
			<p>Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="[% newduedate %]" />
7
            <p>Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="[% newduedate %]" />
8
			<img src="[% themelang %]/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
8
</p>
9
			<script type="text/javascript"> //<![CDATA[
10
			//#TODO - ADD syspref (AllowPostDatedCheckouts).
11
			 Calendar.setup(
12
			      {
13
			         inputField : "newduedate",
14
			         ifFormat : "[% DHTMLcalendar_dateformat %]",
15
			         button : "newduedate_button",
16
			         disableFunc : validate1,
17
			         dateStatusFunc : validate1
18
			       }
19
			    );
20
			//]]>
21
			</script></p>
22
			<p><label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label></p>
9
			<p><label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label></p>
23
		</td>
10
		</td>
24
	</tr>
11
	</tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc (-1 / +1 lines)
Lines 27-32 Link Here
27
            <li><a href="#suggestions_search">Search suggestions</a></li>
27
            <li><a href="#suggestions_search">Search suggestions</a></li>
28
            [% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %]
28
            [% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %]
29
            [% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %]
29
            [% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %]
30
            </ul>
30
			</ul>
31
</div>
31
</div>
32
<!-- End Suggestions Resident Search Box -->
32
<!-- End Suggestions Resident Search Box -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js (-1 / +2 lines)
Lines 9-16 function _(s) { return s } // dummy function for gettext Link Here
9
    if($("#header_search #checkin_search").length > 0){ $(document).bind('keydown','Alt+r',function (){ $("#header_search").tabs("select","#checkin_search"); $("#ret_barcode").focus(); }); } else { $(document).bind('keydown','Alt+r',function (){ location.href="/cgi-bin/koha/circ/returns.pl"; }); }
9
    if($("#header_search #checkin_search").length > 0){ $(document).bind('keydown','Alt+r',function (){ $("#header_search").tabs("select","#checkin_search"); $("#ret_barcode").focus(); }); } else { $(document).bind('keydown','Alt+r',function (){ location.href="/cgi-bin/koha/circ/returns.pl"; }); }
10
    if($("#header_search #circ_search").length > 0){ $(document).bind('keydown','Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { $(document).bind('keydown','Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); }
10
    if($("#header_search #circ_search").length > 0){ $(document).bind('keydown','Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { $(document).bind('keydown','Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); }
11
    if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); }
11
    if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); }
12
 	$(".focus").focus();
12
    $(".focus").focus();
13
 });
13
 });
14
14
 
15
 
15
             YAHOO.util.Event.onContentReady("header", function () {
16
             YAHOO.util.Event.onContentReady("header", function () {
16
				var oMoremenu = new YAHOO.widget.Menu("moremenu", { zindex: 2 });
17
				var oMoremenu = new YAHOO.widget.Menu("moremenu", { zindex: 2 });
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-en.js (-127 lines)
Lines 1-127 Link Here
1
// ** I18N
2
3
// Calendar EN language
4
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
5
// Encoding: any
6
// Distributed under the same terms as the calendar itself.
7
8
// For translators: please use UTF-8 if possible.  We strongly believe that
9
// Unicode is the answer to a real internationalized world.  Also please
10
// include your contact information in the header, as can be seen above.
11
12
// full day names
13
Calendar._DN = new Array
14
("Sunday",
15
 "Monday",
16
 "Tuesday",
17
 "Wednesday",
18
 "Thursday",
19
 "Friday",
20
 "Saturday",
21
 "Sunday");
22
23
// Please note that the following array of short day names (and the same goes
24
// for short month names, _SMN) isn't absolutely necessary.  We give it here
25
// for exemplification on how one can customize the short day names, but if
26
// they are simply the first N letters of the full name you can simply say:
27
//
28
//   Calendar._SDN_len = N; // short day name length
29
//   Calendar._SMN_len = N; // short month name length
30
//
31
// If N = 3 then this is not needed either since we assume a value of 3 if not
32
// present, to be compatible with translation files that were written before
33
// this feature.
34
35
// short day names
36
Calendar._SDN = new Array
37
("Sun",
38
 "Mon",
39
 "Tue",
40
 "Wed",
41
 "Thu",
42
 "Fri",
43
 "Sat",
44
 "Sun");
45
46
// First day of the week. "0" means display Sunday first, "1" means display
47
// Monday first, etc.
48
Calendar._FD = 0;
49
50
// full month names
51
Calendar._MN = new Array
52
("January",
53
 "February",
54
 "March",
55
 "April",
56
 "May",
57
 "June",
58
 "July",
59
 "August",
60
 "September",
61
 "October",
62
 "November",
63
 "December");
64
65
// short month names
66
Calendar._SMN = new Array
67
("Jan",
68
 "Feb",
69
 "Mar",
70
 "Apr",
71
 "May",
72
 "Jun",
73
 "Jul",
74
 "Aug",
75
 "Sep",
76
 "Oct",
77
 "Nov",
78
 "Dec");
79
80
// tooltips
81
Calendar._TT = {};
82
Calendar._TT["INFO"] = "About the calendar";
83
84
Calendar._TT["ABOUT"] =
85
"DHTML Date/Time Selector\n" +
86
"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
87
"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
88
"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
89
"\n\n" +
90
"Date selection:\n" +
91
"- Use the \xab, \xbb buttons to select year\n" +
92
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
93
"- Hold mouse button on any of the above buttons for faster selection.";
94
Calendar._TT["ABOUT_TIME"] = "\n\n" +
95
"Time selection:\n" +
96
"- Click on any of the time parts to increase it\n" +
97
"- or Shift-click to decrease it\n" +
98
"- or click and drag for faster selection.";
99
100
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
101
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
102
Calendar._TT["GO_TODAY"] = "Go Today";
103
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
104
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
105
Calendar._TT["SEL_DATE"] = "Select date";
106
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
107
Calendar._TT["PART_TODAY"] = " (today)";
108
109
// the following is to inform that "%s" is to be the first day of week
110
// %s will be replaced with the day name.
111
Calendar._TT["DAY_FIRST"] = "Display %s first";
112
113
// This may be locale-dependent.  It specifies the week-end days, as an array
114
// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
115
// means Monday, etc.
116
Calendar._TT["WEEKEND"] = "0,6";
117
118
Calendar._TT["CLOSE"] = "Close";
119
Calendar._TT["TODAY"] = "Today";
120
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
121
122
// date formats
123
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
124
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
125
126
Calendar._TT["WK"] = "wk";
127
Calendar._TT["TIME"] = "Time:";
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js (-182 lines)
Lines 1-182 Link Here
1
/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
2
 * ---------------------------------------------------------------------------
3
 *
4
 * The DHTML Calendar
5
 *
6
 * Details and latest version at:
7
 * http://dynarch.com/mishoo/calendar.epl
8
 *
9
 * This script is distributed under the GNU Lesser General Public License.
10
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
11
 *
12
 * This file defines helper functions for setting up the calendar.  They are
13
 * intended to help non-programmers get a working calendar on their site
14
 * quickly.  This script should not be seen as part of the calendar.  It just
15
 * shows you what one can do with the calendar, while in the same time
16
 * providing a quick and simple method for setting it up.  If you need
17
 * exhaustive customization of the calendar creation process feel free to
18
 * modify this code to suit your needs (this is recommended and much better
19
 * than modifying calendar.js itself).
20
 */
21
22
/**
23
 *  This function "patches" an input field (or other element) to use a calendar
24
 *  widget for date selection.
25
 *
26
 *  The "params" is a single object that can have the following properties:
27
 *
28
 *    prop. name   | description
29
 *  -------------------------------------------------------------------------------------------------
30
 *   inputField    | the ID of an input field to store the date
31
 *   displayArea   | the ID of a DIV or other element to show the date
32
 *   button        | ID of a button or other element that will trigger the calendar
33
 *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
34
 *   ifFormat      | date format that will be stored in the input field
35
 *   daFormat      | the date format that will be used to display the date in displayArea
36
 *   singleClick   | (true/false) whether the calendar is in single click mode or not (default: true)
37
 *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
38
 *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
39
 *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
40
 *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
41
 *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
42
 *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
43
 *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
44
 *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
45
 *   onClose       | function that gets called when the calendar is closed.  [default]
46
 *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
47
 *   date          | the date that the calendar will be initially displayed to
48
 *   showsTime     | default: false; if true the calendar will include a time selector
49
 *   timeFormat    | the time format; can be "12" or "24", default is "12"
50
 *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
51
 *   step          | configures the step of the years in drop-down boxes; default: 2
52
 *   position      | configures the calendar absolute position; default: null
53
 *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
54
 *   showOthers    | if "true" (but default: "false") it will show days from other months too
55
 *
56
 *  None of them is required, they all have default values.  However, if you
57
 *  pass none of "inputField", "displayArea" or "button" you'll get a warning
58
 *  saying "nothing to setup".
59
 */
60
Calendar.setup = function (params) {
61
	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
62
63
	param_default("inputField",     null);
64
	param_default("displayArea",    null);
65
	param_default("button",         null);
66
	param_default("eventName",      "click");
67
	param_default("ifFormat",       "%Y/%m/%d");
68
	param_default("daFormat",       "%Y/%m/%d");
69
	param_default("singleClick",    true);
70
	param_default("disableFunc",    'dateStatusHandler');
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
72
	if (Calendar._FD)
73
			param_default("firstDay",       Calendar._FD);
74
		else
75
			param_default("firstDay",       0); // defaults to "Sunday" first
76
	param_default("align",          "Br");
77
	param_default("range",          [1900, 2999]);
78
	param_default("weekNumbers",    true);
79
	param_default("flat",           null);
80
	param_default("flatCallback",   null);
81
	param_default("onSelect",       null);
82
	param_default("onClose",        null);
83
	param_default("onUpdate",       null);
84
	param_default("date",           null);
85
	param_default("showsTime",      false);
86
	param_default("timeFormat",     "24");
87
	param_default("electric",       true);
88
	param_default("step",           2);
89
	param_default("position",       null);
90
	param_default("cache",          false);
91
	param_default("showOthers",     false);
92
93
	var tmp = ["inputField", "displayArea", "button"];
94
	for (var i in tmp) {
95
		if (typeof params[tmp[i]] == "string") {
96
			params[tmp[i]] = document.getElementById(params[tmp[i]]);
97
		}
98
	}
99
	if (!(params.flat || params.inputField || params.displayArea || params.button)) {
100
		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
101
		return false;
102
	}
103
104
	function onSelect(cal) {
105
		var p = cal.params;
106
		var update = (cal.dateClicked || p.electric);
107
		if (update && p.flat) {
108
			if (typeof p.flatCallback == "function")
109
				p.flatCallback(cal);
110
			else
111
				alert("No flatCallback given -- doing nothing.");
112
			return false;
113
		}
114
		if (update && p.inputField) {
115
			p.inputField.value = cal.date.print(p.ifFormat);
116
			if (typeof p.inputField.onchange == "function")
117
				p.inputField.onchange();
118
		}
119
		if (update && p.displayArea)
120
			p.displayArea.innerHTML = cal.date.print(p.daFormat);
121
		if (update && p.singleClick && cal.dateClicked)
122
			cal.callCloseHandler();
123
		if (update && typeof p.onUpdate == "function")
124
			p.onUpdate(cal);
125
	};
126
127
	if (params.flat != null) {
128
		if (typeof params.flat == "string")
129
			params.flat = document.getElementById(params.flat);
130
		if (!params.flat) {
131
			alert("Calendar.setup:\n  Flat specified but can't find parent.");
132
			return false;
133
		}
134
		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
135
		cal.showsTime = params.showsTime;
136
		cal.time24 = (params.timeFormat == "24");
137
		cal.params = params;
138
		cal.weekNumbers = params.weekNumbers;
139
		cal.setRange(params.range[0], params.range[1]);
140
		cal.setDateStatusHandler(params.dateStatusFunc);
141
		cal.create(params.flat);
142
		cal.show();
143
		return false;
144
	}
145
146
	var triggerEl = params.button || params.displayArea || params.inputField;
147
	triggerEl["on" + params.eventName] = function() {
148
		var dateEl = params.inputField || params.displayArea;
149
		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
150
		var mustCreate = false;
151
		var cal = window.calendar;
152
		if (!(cal && params.cache)) {
153
			window.calendar = cal = new Calendar(params.firstDay,
154
							     params.date,
155
							     params.onSelect || onSelect,
156
							     params.onClose || function(cal) { cal.hide(); });
157
			cal.showsTime = params.showsTime;
158
			cal.time24 = (params.timeFormat == "24");
159
			cal.weekNumbers = params.weekNumbers;
160
			mustCreate = true;
161
		} else {
162
			if (params.date)
163
				cal.setDate(params.date);
164
			cal.hide();
165
		}
166
		cal.showsOtherMonths = params.showOthers;
167
		cal.yearStep = params.step;
168
		cal.setRange(params.range[0], params.range[1]);
169
		cal.params = params;
170
		cal.setDateStatusHandler(params.dateStatusFunc);
171
		cal.setDateFormat(dateFmt);
172
		if (mustCreate)
173
			cal.create();
174
		cal.parseDate(dateEl.value || dateEl.innerHTML);
175
		cal.refresh();
176
		if (!params.position)
177
			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
178
		else
179
			cal.showAt(params.position[0], params.position[1]);
180
		return false;
181
	};
182
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-system.css (-254 lines)
Lines 1-254 Link Here
1
/* The main calendar widget.  DIV containing a table. */
2
3
.calendar {
4
  position: relative;
5
  display: none;
6
  border: 1px solid;
7
  border-color: #fff #000 #000 #fff;
8
  font-size: 11px;
9
  cursor: default;
10
  background: Window;
11
  color: WindowText;
12
  font-family: tahoma,verdana,sans-serif;
13
  width:250px;
14
}
15
16
.calendar table {
17
  border: 1px solid;
18
  border-color: #fff #000 #000 #fff;
19
  font-size: 11px;
20
  cursor: default;
21
  background: Window;
22
  color: WindowText;
23
  font-family: tahoma,verdana,sans-serif;
24
  border-collapse:separate;
25
}
26
27
/* Header part -- contains navigation buttons and day names. */
28
29
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
30
  text-align: center;
31
  padding: 1px;
32
  border: 1px solid;
33
  display: table-cell;
34
  -moz-border-radius: 0px;
35
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
36
  background: ButtonFace;
37
}
38
39
.calendar .nav {
40
  background: ButtonFace url('menuarrow.gif') no-repeat 100% 100%;
41
}
42
43
.calendar thead .title { /* This holds the current "month, year" */
44
  font-weight: bold;
45
  padding: 1px;
46
  border: 1px solid #000;
47
  background: ActiveCaption;
48
  color: CaptionText;
49
  text-align: center;
50
}
51
52
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
53
}
54
55
.calendar thead .daynames { /* Row <TR> containing the day names */
56
}
57
58
.calendar thead .name { /* Cells <TD> containing the day names */
59
  border-bottom: 1px solid ButtonShadow;
60
  padding: 2px;
61
  text-align: center;
62
  background: ButtonFace;
63
  color: ButtonText;
64
}
65
66
.calendar thead .weekend { /* How a weekend day name shows in header */
67
//  color: #f00;
68
}
69
70
.calendar thead .hilite { /* How do the buttons in header appear when hover */
71
  border: 2px solid;
72
  padding: 0px;
73
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
74
}
75
76
.calendar thead .active { /* Active (pressed) buttons in header */
77
  border-width: 1px;
78
  padding: 2px 0px 0px 2px;
79
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
80
}
81
82
/* The body part -- contains all the days in month. */
83
84
.calendar tbody .day { /* Cells <TD> containing month days dates */
85
  width: 2em;
86
  text-align: right;
87
  padding: 2px 4px 2px 2px;
88
}
89
.calendar tbody .day.othermonth {
90
  font-size: 80%;
91
  color: #aaa;
92
}
93
.calendar tbody .day.othermonth.oweekend {
94
  color: #faa;
95
}
96
97
.calendar table .wn {
98
  padding: 2px 3px 2px 2px;
99
  border-right: 1px solid ButtonShadow;
100
  background: ButtonFace;
101
  color: ButtonText;
102
}
103
104
.calendar tbody .rowhilite td {
105
//  background: Highlight;
106
//  color: HighlightText;
107
}
108
109
.calendar tbody td.hilite { /* Hovered cells <TD> */
110
  padding: 1px 3px 1px 1px;
111
  border-top: 1px solid #fff;
112
  border-right: 1px solid #000;
113
  border-bottom: 1px solid #000;
114
  border-left: 1px solid #fff;
115
}
116
117
.calendar tbody td.active { /* Active (pressed) cells <TD> */
118
//  padding: 2px 2px 0px 2px;
119
//  border: 1px solid;
120
//  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
121
}
122
123
.calendar tbody td.selected { /* Cell showing selected date */
124
  font-weight: bold;
125
  border: 1px solid;
126
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
127
  padding: 2px 2px 0px 2px;
128
  // background: ButtonFace;
129
  color: ButtonText;
130
}
131
132
.calendar tbody td.weekend { /* Cells showing weekend days */
133
//  color: #f00;
134
}
135
136
.calendar tbody td.today { /* Cell showing today date */
137
  font-weight: bold;
138
  color: #00f;
139
}
140
141
.calendar tbody td.disabled { color: GrayText; }
142
143
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
144
  visibility: hidden;
145
}
146
147
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
148
  display: none;
149
}
150
151
/* The footer part -- status bar and "Close" button */
152
153
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
154
}
155
156
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
157
  background: ButtonFace;
158
  padding: 1px;
159
  border: 1px solid;
160
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
161
  color: ButtonText;
162
  text-align: center;
163
}
164
165
.calendar tfoot .hilite { /* Hover style for buttons in footer */
166
  border-top: 1px solid #fff;
167
  border-right: 1px solid #000;
168
  border-bottom: 1px solid #000;
169
  border-left: 1px solid #fff;
170
  padding: 1px;
171
  background: #e4e0d8;
172
}
173
174
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
175
  padding: 2px 0px 0px 2px;
176
  border-top: 1px solid #000;
177
  border-right: 1px solid #fff;
178
  border-bottom: 1px solid #fff;
179
  border-left: 1px solid #000;
180
}
181
182
/* Combo boxes (menus that display months/years for direct selection) */
183
184
.calendar .combo {
185
  position: absolute;
186
  display: none;
187
  width: 4em;
188
  top: 0px;
189
  left: 0px;
190
  cursor: default;
191
  border: 1px solid;
192
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
193
  background: Menu;
194
  color: MenuText;
195
  font-size: 90%;
196
  padding: 1px;
197
}
198
199
.calendar .combo .label,
200
.calendar .combo .label-IEfix {
201
  text-align: center;
202
  padding: 1px;
203
}
204
205
.calendar .combo .label-IEfix {
206
  width: 4em;
207
}
208
209
.calendar .combo .active {
210
  padding: 0px;
211
  border: 1px solid #000;
212
}
213
214
.calendar .combo .hilite {
215
  background: Highlight;
216
  color: HighlightText;
217
}
218
219
.calendar td.time {
220
  border-top: 1px solid ButtonShadow;
221
  padding: 1px 0px;
222
  text-align: center;
223
  background-color: ButtonFace;
224
}
225
226
.calendar td.time .hour,
227
.calendar td.time .minute,
228
.calendar td.time .ampm {
229
  padding: 0px 3px 0px 4px;
230
  border: 1px solid #889;
231
  font-weight: bold;
232
  background-color: Menu;
233
}
234
235
.calendar td.time .ampm {
236
  text-align: center;
237
}
238
239
.calendar td.time .colon {
240
  padding: 0px 2px 0px 3px;
241
  font-weight: bold;
242
}
243
244
.calendar td.time span.hilite {
245
  border-color: #000;
246
  background-color: Highlight;
247
  color: HighlightText;
248
}
249
250
.calendar td.time span.active {
251
  border-color: #f00;
252
  background-color: #000;
253
  color: #0f0;
254
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar.js (-1714 lines)
Lines 1-1714 Link Here
1
/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
2
 * ------------------------------------------------------------------
3
 *
4
 * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
5
 *
6
 * Details and latest version at:
7
 * http://dynarch.com/mishoo/calendar.epl
8
 *
9
 * This script is distributed under the GNU Lesser General Public License.
10
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
11
 */
12
13
14
/** The Calendar object constructor. */
15
Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
16
	// member variables
17
	this.activeDiv = null;
18
	this.currentDateEl = null;
19
	this.getDateStatus = null;
20
	this.timeout = null;
21
	this.onSelected = onSelected || null;
22
	this.onClose = onClose || null;
23
	this.dragging = false;
24
	this.hidden = false;
25
	this.minYear = 1970;
26
	this.maxYear = 2050;
27
	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
28
	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
29
	this.isPopup = true;
30
	this.weekNumbers = true;
31
	this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
32
	this.showsOtherMonths = false;
33
	this.dateStr = dateStr;
34
	this.ar_days = null;
35
	this.showsTime = false;
36
	this.time24 = true;
37
	this.yearStep = 2;
38
	// HTML elements
39
	this.table = null;
40
	this.element = null;
41
	this.tbody = null;
42
	this.firstdayname = null;
43
	// Combo boxes
44
	this.monthsCombo = null;
45
	this.yearsCombo = null;
46
	this.hilitedMonth = null;
47
	this.activeMonth = null;
48
	this.hilitedYear = null;
49
	this.activeYear = null;
50
	// Information
51
	this.dateClicked = false;
52
53
	// one-time initializations
54
	if (typeof Calendar._SDN == "undefined") {
55
		// table of short day names
56
		if (typeof Calendar._SDN_len == "undefined")
57
			Calendar._SDN_len = 3;
58
		var ar = new Array();
59
		for (var i = 8; i > 0;) {
60
			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
61
		}
62
		Calendar._SDN = ar;
63
		// table of short month names
64
		if (typeof Calendar._SMN_len == "undefined")
65
			Calendar._SMN_len = 3;
66
		ar = new Array();
67
		for (var i = 12; i > 0;) {
68
			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
69
		}
70
		Calendar._SMN = ar;
71
	}
72
};
73
74
// ** constants
75
76
/// "static", needed for event handlers.
77
Calendar._C = null;
78
79
/// detect a special case of "web browser"
80
Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
81
		   !/opera/i.test(navigator.userAgent) );
82
83
Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
84
85
/// detect Opera browser
86
Calendar.is_opera = /opera/i.test(navigator.userAgent);
87
88
/// detect KHTML-based browsers
89
Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
90
91
// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
92
//        library, at some point.
93
94
Calendar.getAbsolutePos = function(el) {
95
	var SL = 0, ST = 0;
96
	var is_div = /^div$/i.test(el.tagName);
97
	if (is_div && el.scrollLeft)
98
		SL = el.scrollLeft;
99
	if (is_div && el.scrollTop)
100
		ST = el.scrollTop;
101
	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
102
	if (el.offsetParent) {
103
		var tmp = this.getAbsolutePos(el.offsetParent);
104
		r.x += tmp.x;
105
		r.y += tmp.y;
106
	}
107
	return r;
108
};
109
110
Calendar.isRelated = function (el, evt) {
111
	var related = evt.relatedTarget;
112
	if (!related) {
113
		var type = evt.type;
114
		if (type == "mouseover") {
115
			related = evt.fromElement;
116
		} else if (type == "mouseout") {
117
			related = evt.toElement;
118
		}
119
	}
120
	while (related) {
121
		if (related == el) {
122
			return true;
123
		}
124
		related = related.parentNode;
125
	}
126
	return false;
127
};
128
129
Calendar.removeClass = function(el, className) {
130
	if (!(el && el.className)) {
131
		return;
132
	}
133
	var cls = el.className.split(" ");
134
	var ar = new Array();
135
	for (var i = cls.length; i > 0;) {
136
		if (cls[--i] != className) {
137
			ar[ar.length] = cls[i];
138
		}
139
	}
140
	el.className = ar.join(" ");
141
};
142
143
Calendar.addClass = function(el, className) {
144
	Calendar.removeClass(el, className);
145
	el.className += " " + className;
146
};
147
148
Calendar.getElement = function(ev) {
149
	if (Calendar.is_ie) {
150
		return window.event.srcElement;
151
	} else {
152
		return ev.currentTarget;
153
	}
154
};
155
156
Calendar.getTargetElement = function(ev) {
157
	if (Calendar.is_ie) {
158
		return window.event.srcElement;
159
	} else {
160
		return ev.target;
161
	}
162
};
163
164
Calendar.stopEvent = function(ev) {
165
	ev || (ev = window.event);
166
	if (Calendar.is_ie) {
167
		ev.cancelBubble = true;
168
		ev.returnValue = false;
169
	} else {
170
		ev.preventDefault();
171
		ev.stopPropagation();
172
	}
173
	return false;
174
};
175
176
Calendar.addEvent = function(el, evname, func) {
177
	if (el.attachEvent) { // IE
178
		el.attachEvent("on" + evname, func);
179
	} else if (el.addEventListener) { // Gecko / W3C
180
		el.addEventListener(evname, func, true);
181
	} else {
182
		el["on" + evname] = func;
183
	}
184
};
185
186
Calendar.removeEvent = function(el, evname, func) {
187
	if (el.detachEvent) { // IE
188
		el.detachEvent("on" + evname, func);
189
	} else if (el.removeEventListener) { // Gecko / W3C
190
		el.removeEventListener(evname, func, true);
191
	} else {
192
		el["on" + evname] = null;
193
	}
194
};
195
196
Calendar.createElement = function(type, parent) {
197
	var el = null;
198
	if (document.createElementNS) {
199
		// use the XHTML namespace; IE won't normally get here unless
200
		// _they_ "fix" the DOM2 implementation.
201
		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
202
	} else {
203
		el = document.createElement(type);
204
	}
205
	if (typeof parent != "undefined") {
206
		parent.appendChild(el);
207
	}
208
	return el;
209
};
210
211
// END: UTILITY FUNCTIONS
212
213
// BEGIN: CALENDAR STATIC FUNCTIONS
214
215
/** Internal -- adds a set of events to make some element behave like a button. */
216
Calendar._add_evs = function(el) {
217
	with (Calendar) {
218
		addEvent(el, "mouseover", dayMouseOver);
219
		addEvent(el, "mousedown", dayMouseDown);
220
		addEvent(el, "mouseout", dayMouseOut);
221
		if (is_ie) {
222
			addEvent(el, "dblclick", dayMouseDblClick);
223
			el.setAttribute("unselectable", true);
224
		}
225
	}
226
};
227
228
Calendar.findMonth = function(el) {
229
	if (typeof el.month != "undefined") {
230
		return el;
231
	} else if (typeof el.parentNode.month != "undefined") {
232
		return el.parentNode;
233
	}
234
	return null;
235
};
236
237
Calendar.findYear = function(el) {
238
	if (typeof el.year != "undefined") {
239
		return el;
240
	} else if (typeof el.parentNode.year != "undefined") {
241
		return el.parentNode;
242
	}
243
	return null;
244
};
245
246
Calendar.showMonthsCombo = function () {
247
	var cal = Calendar._C;
248
	if (!cal) {
249
		return false;
250
	}
251
	var cal = cal;
252
	var cd = cal.activeDiv;
253
	var mc = cal.monthsCombo;
254
	if (cal.hilitedMonth) {
255
		Calendar.removeClass(cal.hilitedMonth, "hilite");
256
	}
257
	if (cal.activeMonth) {
258
		Calendar.removeClass(cal.activeMonth, "active");
259
	}
260
	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
261
	Calendar.addClass(mon, "active");
262
	cal.activeMonth = mon;
263
	var s = mc.style;
264
	s.display = "block";
265
	if (cd.navtype < 0)
266
		s.left = cd.offsetLeft + "px";
267
	else {
268
		var mcw = mc.offsetWidth;
269
		if (typeof mcw == "undefined")
270
			// Konqueror brain-dead techniques
271
			mcw = 50;
272
		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
273
	}
274
	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
275
};
276
277
Calendar.showYearsCombo = function (fwd) {
278
	var cal = Calendar._C;
279
	if (!cal) {
280
		return false;
281
	}
282
	var cal = cal;
283
	var cd = cal.activeDiv;
284
	var yc = cal.yearsCombo;
285
	if (cal.hilitedYear) {
286
		Calendar.removeClass(cal.hilitedYear, "hilite");
287
	}
288
	if (cal.activeYear) {
289
		Calendar.removeClass(cal.activeYear, "active");
290
	}
291
	cal.activeYear = null;
292
	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
293
	var yr = yc.firstChild;
294
	var show = false;
295
	for (var i = 12; i > 0; --i) {
296
		if (Y >= cal.minYear && Y <= cal.maxYear) {
297
			yr.firstChild.data = Y;
298
			yr.year = Y;
299
			yr.style.display = "block";
300
			show = true;
301
		} else {
302
			yr.style.display = "none";
303
		}
304
		yr = yr.nextSibling;
305
		Y += fwd ? cal.yearStep : -cal.yearStep;
306
	}
307
	if (show) {
308
		var s = yc.style;
309
		s.display = "block";
310
		if (cd.navtype < 0)
311
			s.left = cd.offsetLeft + "px";
312
		else {
313
			var ycw = yc.offsetWidth;
314
			if (typeof ycw == "undefined")
315
				// Konqueror brain-dead techniques
316
				ycw = 50;
317
			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
318
		}
319
		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
320
	}
321
};
322
323
// event handlers
324
325
Calendar.tableMouseUp = function(ev) {
326
	var cal = Calendar._C;
327
	if (!cal) {
328
		return false;
329
	}
330
	if (cal.timeout) {
331
		clearTimeout(cal.timeout);
332
	}
333
	var el = cal.activeDiv;
334
	if (!el) {
335
		return false;
336
	}
337
	var target = Calendar.getTargetElement(ev);
338
	ev || (ev = window.event);
339
	Calendar.removeClass(el, "active");
340
	if (target == el || target.parentNode == el) {
341
		Calendar.cellClick(el, ev);
342
	}
343
	var mon = Calendar.findMonth(target);
344
	var date = null;
345
	if (mon) {
346
		date = new Date(cal.date);
347
		if (mon.month != date.getMonth()) {
348
			date.setMonth(mon.month);
349
			cal.setDate(date);
350
			cal.dateClicked = false;
351
			cal.callHandler();
352
		}
353
	} else {
354
		var year = Calendar.findYear(target);
355
		if (year) {
356
			date = new Date(cal.date);
357
			if (year.year != date.getFullYear()) {
358
				date.setFullYear(year.year);
359
				cal.setDate(date);
360
				cal.dateClicked = false;
361
				cal.callHandler();
362
			}
363
		}
364
	}
365
	with (Calendar) {
366
		removeEvent(document, "mouseup", tableMouseUp);
367
		removeEvent(document, "mouseover", tableMouseOver);
368
		removeEvent(document, "mousemove", tableMouseOver);
369
		cal._hideCombos();
370
		_C = null;
371
		return stopEvent(ev);
372
	}
373
};
374
375
Calendar.tableMouseOver = function (ev) {
376
	var cal = Calendar._C;
377
	if (!cal) {
378
		return;
379
	}
380
	var el = cal.activeDiv;
381
	var target = Calendar.getTargetElement(ev);
382
	if (target == el || target.parentNode == el) {
383
		Calendar.addClass(el, "hilite active");
384
		Calendar.addClass(el.parentNode, "rowhilite");
385
	} else {
386
		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
387
			Calendar.removeClass(el, "active");
388
		Calendar.removeClass(el, "hilite");
389
		Calendar.removeClass(el.parentNode, "rowhilite");
390
	}
391
	ev || (ev = window.event);
392
	if (el.navtype == 50 && target != el) {
393
		var pos = Calendar.getAbsolutePos(el);
394
		var w = el.offsetWidth;
395
		var x = ev.clientX;
396
		var dx;
397
		var decrease = true;
398
		if (x > pos.x + w) {
399
			dx = x - pos.x - w;
400
			decrease = false;
401
		} else
402
			dx = pos.x - x;
403
404
		if (dx < 0) dx = 0;
405
		var range = el._range;
406
		var current = el._current;
407
		var count = Math.floor(dx / 10) % range.length;
408
		for (var i = range.length; --i >= 0;)
409
			if (range[i] == current)
410
				break;
411
		while (count-- > 0)
412
			if (decrease) {
413
				if (--i < 0)
414
					i = range.length - 1;
415
			} else if ( ++i >= range.length )
416
				i = 0;
417
		var newval = range[i];
418
		el.firstChild.data = newval;
419
420
		cal.onUpdateTime();
421
	}
422
	var mon = Calendar.findMonth(target);
423
	if (mon) {
424
		if (mon.month != cal.date.getMonth()) {
425
			if (cal.hilitedMonth) {
426
				Calendar.removeClass(cal.hilitedMonth, "hilite");
427
			}
428
			Calendar.addClass(mon, "hilite");
429
			cal.hilitedMonth = mon;
430
		} else if (cal.hilitedMonth) {
431
			Calendar.removeClass(cal.hilitedMonth, "hilite");
432
		}
433
	} else {
434
		if (cal.hilitedMonth) {
435
			Calendar.removeClass(cal.hilitedMonth, "hilite");
436
		}
437
		var year = Calendar.findYear(target);
438
		if (year) {
439
			if (year.year != cal.date.getFullYear()) {
440
				if (cal.hilitedYear) {
441
					Calendar.removeClass(cal.hilitedYear, "hilite");
442
				}
443
				Calendar.addClass(year, "hilite");
444
				cal.hilitedYear = year;
445
			} else if (cal.hilitedYear) {
446
				Calendar.removeClass(cal.hilitedYear, "hilite");
447
			}
448
		} else if (cal.hilitedYear) {
449
			Calendar.removeClass(cal.hilitedYear, "hilite");
450
		}
451
	}
452
	return Calendar.stopEvent(ev);
453
};
454
455
Calendar.tableMouseDown = function (ev) {
456
	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
457
		return Calendar.stopEvent(ev);
458
	}
459
};
460
461
Calendar.calDragIt = function (ev) {
462
	var cal = Calendar._C;
463
	if (!(cal && cal.dragging)) {
464
		return false;
465
	}
466
	var posX;
467
	var posY;
468
	if (Calendar.is_ie) {
469
		posY = window.event.clientY + document.body.scrollTop;
470
		posX = window.event.clientX + document.body.scrollLeft;
471
	} else {
472
		posX = ev.pageX;
473
		posY = ev.pageY;
474
	}
475
	cal.hideShowCovered();
476
	var st = cal.element.style;
477
	st.left = (posX - cal.xOffs) + "px";
478
	st.top = (posY - cal.yOffs) + "px";
479
	return Calendar.stopEvent(ev);
480
};
481
482
Calendar.calDragEnd = function (ev) {
483
	var cal = Calendar._C;
484
	if (!cal) {
485
		return false;
486
	}
487
	cal.dragging = false;
488
	with (Calendar) {
489
		removeEvent(document, "mousemove", calDragIt);
490
		removeEvent(document, "mouseup", calDragEnd);
491
		tableMouseUp(ev);
492
	}
493
	cal.hideShowCovered();
494
};
495
496
Calendar.dayMouseDown = function(ev) {
497
	var el = Calendar.getElement(ev);
498
	if (el.disabled) {
499
		return false;
500
	}
501
	var cal = el.calendar;
502
	cal.activeDiv = el;
503
	Calendar._C = cal;
504
	if (el.navtype != 300) with (Calendar) {
505
		if (el.navtype == 50) {
506
			el._current = el.firstChild.data;
507
			addEvent(document, "mousemove", tableMouseOver);
508
		} else
509
			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
510
		addClass(el, "hilite active");
511
		addEvent(document, "mouseup", tableMouseUp);
512
	} else if (cal.isPopup) {
513
		cal._dragStart(ev);
514
	}
515
	if (el.navtype == -1 || el.navtype == 1) {
516
		if (cal.timeout) clearTimeout(cal.timeout);
517
		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
518
	} else if (el.navtype == -2 || el.navtype == 2) {
519
		if (cal.timeout) clearTimeout(cal.timeout);
520
		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
521
	} else {
522
		cal.timeout = null;
523
	}
524
	return Calendar.stopEvent(ev);
525
};
526
527
Calendar.dayMouseDblClick = function(ev) {
528
	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
529
	if (Calendar.is_ie) {
530
		document.selection.empty();
531
	}
532
};
533
534
Calendar.dayMouseOver = function(ev) {
535
	var el = Calendar.getElement(ev);
536
	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
537
		return false;
538
	}
539
	if (el.ttip) {
540
		if (el.ttip.substr(0, 1) == "_") {
541
			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
542
		}
543
		el.calendar.tooltips.firstChild.data = el.ttip;
544
	}
545
	if (el.navtype != 300) {
546
		Calendar.addClass(el, "hilite");
547
		if (el.caldate) {
548
			Calendar.addClass(el.parentNode, "rowhilite");
549
		}
550
	}
551
	return Calendar.stopEvent(ev);
552
};
553
554
Calendar.dayMouseOut = function(ev) {
555
	with (Calendar) {
556
		var el = getElement(ev);
557
		if (isRelated(el, ev) || _C || el.disabled) {
558
			return false;
559
		}
560
		removeClass(el, "hilite");
561
		if (el.caldate) {
562
			removeClass(el.parentNode, "rowhilite");
563
		}
564
		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
565
		return stopEvent(ev);
566
	}
567
};
568
569
/**
570
 *  A generic "click" handler :) handles all types of buttons defined in this
571
 *  calendar.
572
 */
573
Calendar.cellClick = function(el, ev) {
574
	var cal = el.calendar;
575
	var closing = false;
576
	var newdate = false;
577
	var date = null;
578
	if (typeof el.navtype == "undefined") {
579
		Calendar.removeClass(cal.currentDateEl, "selected");
580
		Calendar.addClass(el, "selected");
581
		closing = (cal.currentDateEl == el);
582
		if (!closing) {
583
			cal.currentDateEl = el;
584
		}
585
		cal.date = new Date(el.caldate);
586
		date = cal.date;
587
		newdate = true;
588
		// a date was clicked
589
		if (!(cal.dateClicked = !el.otherMonth))
590
			cal._init(cal.firstDayOfWeek, date);
591
	} else {
592
		if (el.navtype == 200) {
593
			Calendar.removeClass(el, "hilite");
594
			cal.callCloseHandler();
595
			return;
596
		}
597
		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
598
		// unless "today" was clicked, we assume no date was clicked so
599
		// the selected handler will know not to close the calenar when
600
		// in single-click mode.
601
		// cal.dateClicked = (el.navtype == 0);
602
		cal.dateClicked = false;
603
		var year = date.getFullYear();
604
		var mon = date.getMonth();
605
		function setMonth(m) {
606
			var day = date.getDate();
607
			var max = date.getMonthDays(m);
608
			if (day > max) {
609
				date.setDate(max);
610
			}
611
			date.setMonth(m);
612
		};
613
		switch (el.navtype) {
614
		    case 400:
615
			Calendar.removeClass(el, "hilite");
616
			var text = Calendar._TT["ABOUT"];
617
			if (typeof text != "undefined") {
618
				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
619
			} else {
620
				// FIXME: this should be removed as soon as lang files get updated!
621
				text = "Help and about box text is not translated into this language.\n" +
622
					"If you know this language and you feel generous please update\n" +
623
					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
624
					"and send it back to <mishoo@infoiasi.ro> to get it into the distribution  ;-)\n\n" +
625
					"Thank you!\n" +
626
					"http://dynarch.com/mishoo/calendar.epl\n";
627
			}
628
			alert(text);
629
			return;
630
		    case -2:
631
			if (year > cal.minYear) {
632
				date.setFullYear(year - 1);
633
			}
634
			break;
635
		    case -1:
636
			if (mon > 0) {
637
				setMonth(mon - 1);
638
			} else if (year-- > cal.minYear) {
639
				date.setFullYear(year);
640
				setMonth(11);
641
			}
642
			break;
643
		    case 1:
644
			if (mon < 11) {
645
				setMonth(mon + 1);
646
			} else if (year < cal.maxYear) {
647
				date.setFullYear(year + 1);
648
				setMonth(0);
649
			}
650
			break;
651
		    case 2:
652
			if (year < cal.maxYear) {
653
				date.setFullYear(year + 1);
654
			}
655
			break;
656
		    case 100:
657
			cal.setFirstDayOfWeek(el.fdow);
658
			return;
659
		    case 50:
660
			var range = el._range;
661
			var current = el.firstChild.data;
662
			for (var i = range.length; --i >= 0;)
663
				if (range[i] == current)
664
					break;
665
			if (ev && ev.shiftKey) {
666
				if (--i < 0)
667
					i = range.length - 1;
668
			} else if ( ++i >= range.length )
669
				i = 0;
670
			var newval = range[i];
671
			el.firstChild.data = newval;
672
			cal.onUpdateTime();
673
			return;
674
		    case 0:
675
			// TODAY will bring us here
676
			if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
677
				// remember, "date" was previously set to new
678
				// Date() if TODAY was clicked; thus, it
679
				// contains today date.
680
				return false;
681
			}
682
			break;
683
		}
684
		if (!date.equalsTo(cal.date)) {
685
			cal.setDate(date);
686
			newdate = true;
687
		}
688
	}
689
	if (newdate) {
690
		cal.callHandler();
691
	}
692
	if (closing) {
693
		Calendar.removeClass(el, "hilite");
694
		cal.callCloseHandler();
695
	}
696
};
697
698
// END: CALENDAR STATIC FUNCTIONS
699
700
// BEGIN: CALENDAR OBJECT FUNCTIONS
701
702
/**
703
 *  This function creates the calendar inside the given parent.  If _par is
704
 *  null than it creates a popup calendar inside the BODY element.  If _par is
705
 *  an element, be it BODY, then it creates a non-popup calendar (still
706
 *  hidden).  Some properties need to be set before calling this function.
707
 */
708
Calendar.prototype.create = function (_par) {
709
	var parent = null;
710
	if (! _par) {
711
		// default parent is the document body, in which case we create
712
		// a popup calendar.
713
		parent = document.getElementsByTagName("body")[0];
714
		this.isPopup = true;
715
	} else {
716
		parent = _par;
717
		this.isPopup = false;
718
	}
719
	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
720
721
	var table = Calendar.createElement("table");
722
	this.table = table;
723
	table.cellSpacing = 0;
724
	table.cellPadding = 0;
725
	table.calendar = this;
726
	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
727
728
	var div = Calendar.createElement("div");
729
	this.element = div;
730
	div.className = "calendar";
731
	if (this.isPopup) {
732
		div.style.position = "absolute";
733
		div.style.display = "none";
734
	}
735
	div.appendChild(table);
736
737
	var thead = Calendar.createElement("thead", table);
738
	var cell = null;
739
	var row = null;
740
741
	var cal = this;
742
	var hh = function (text, cs, navtype) {
743
		cell = Calendar.createElement("td", row);
744
		cell.colSpan = cs;
745
		cell.className = "button";
746
		if (navtype != 0 && Math.abs(navtype) <= 2)
747
			cell.className += " nav";
748
		Calendar._add_evs(cell);
749
		cell.calendar = cal;
750
		cell.navtype = navtype;
751
		if (text.substr(0, 1) != "&") {
752
			cell.appendChild(document.createTextNode(text));
753
		}
754
		else {
755
			// FIXME: dirty hack for entities
756
			cell.innerHTML = text;
757
		}
758
		return cell;
759
	};
760
761
	row = Calendar.createElement("tr", thead);
762
	var title_length = 6;
763
	(this.isPopup) && --title_length;
764
	(this.weekNumbers) && ++title_length;
765
766
	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
767
	this.title = hh("", title_length, 300);
768
	this.title.className = "title";
769
	if (this.isPopup) {
770
		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
771
		this.title.style.cursor = "move";
772
		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
773
	}
774
775
	row = Calendar.createElement("tr", thead);
776
	row.className = "headrow";
777
778
	this._nav_py = hh("&#x00ab;", 1, -2);
779
	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
780
781
	this._nav_pm = hh("&#x2039;", 1, -1);
782
	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
783
784
	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
785
	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
786
787
	this._nav_nm = hh("&#x203a;", 1, 1);
788
	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
789
790
	this._nav_ny = hh("&#x00bb;", 1, 2);
791
	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
792
793
	// day names
794
	row = Calendar.createElement("tr", thead);
795
	row.className = "daynames";
796
	if (this.weekNumbers) {
797
		cell = Calendar.createElement("td", row);
798
		cell.className = "name wn";
799
		cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
800
	}
801
	for (var i = 7; i > 0; --i) {
802
		cell = Calendar.createElement("td", row);
803
		cell.appendChild(document.createTextNode(""));
804
		if (!i) {
805
			cell.navtype = 100;
806
			cell.calendar = this;
807
			Calendar._add_evs(cell);
808
		}
809
	}
810
	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
811
	this._displayWeekdays();
812
813
	var tbody = Calendar.createElement("tbody", table);
814
	this.tbody = tbody;
815
816
	for (i = 6; i > 0; --i) {
817
		row = Calendar.createElement("tr", tbody);
818
		if (this.weekNumbers) {
819
			cell = Calendar.createElement("td", row);
820
			cell.appendChild(document.createTextNode(""));
821
		}
822
		for (var j = 7; j > 0; --j) {
823
			cell = Calendar.createElement("td", row);
824
			cell.appendChild(document.createTextNode(""));
825
			cell.calendar = this;
826
			Calendar._add_evs(cell);
827
		}
828
	}
829
830
	if (this.showsTime) {
831
		row = Calendar.createElement("tr", tbody);
832
		row.className = "time";
833
834
		cell = Calendar.createElement("td", row);
835
		cell.className = "time";
836
		cell.colSpan = 2;
837
		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";
838
839
		cell = Calendar.createElement("td", row);
840
		cell.className = "time";
841
		cell.colSpan = this.weekNumbers ? 4 : 3;
842
843
		(function(){
844
			function makeTimePart(className, init, range_start, range_end) {
845
				var part = Calendar.createElement("span", cell);
846
				part.className = className;
847
				part.appendChild(document.createTextNode(init));
848
				part.calendar = cal;
849
				part.ttip = Calendar._TT["TIME_PART"];
850
				part.navtype = 50;
851
				part._range = [];
852
				if (typeof range_start != "number")
853
					part._range = range_start;
854
				else {
855
					for (var i = range_start; i <= range_end; ++i) {
856
						var txt;
857
						if (i < 10 && range_end >= 10) txt = '0' + i;
858
						else txt = '' + i;
859
						part._range[part._range.length] = txt;
860
					}
861
				}
862
				Calendar._add_evs(part);
863
				return part;
864
			};
865
			var hrs = cal.date.getHours();
866
			var mins = cal.date.getMinutes();
867
			var t12 = !cal.time24;
868
			var pm = (hrs > 12);
869
			if (t12 && pm) hrs -= 12;
870
			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
871
			var span = Calendar.createElement("span", cell);
872
			span.appendChild(document.createTextNode(":"));
873
			span.className = "colon";
874
			var M = makeTimePart("minute", mins, 0, 59);
875
			var AP = null;
876
			cell = Calendar.createElement("td", row);
877
			cell.className = "time";
878
			cell.colSpan = 2;
879
			if (t12)
880
				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
881
			else
882
				cell.innerHTML = "&nbsp;";
883
884
			cal.onSetTime = function() {
885
				var hrs = this.date.getHours();
886
				var mins = this.date.getMinutes();
887
				var pm = (hrs > 12);
888
				if (pm && t12) hrs -= 12;
889
				H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
890
				M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
891
				if (t12)
892
					AP.firstChild.data = pm ? "pm" : "am";
893
			};
894
895
			cal.onUpdateTime = function() {
896
				var date = this.date;
897
				var h = parseInt(H.firstChild.data, 10);
898
				if (t12) {
899
					if (/pm/i.test(AP.firstChild.data) && h < 12)
900
						h += 12;
901
					else if (/am/i.test(AP.firstChild.data) && h == 12)
902
						h = 0;
903
				}
904
				var d = date.getDate();
905
				var m = date.getMonth();
906
				var y = date.getFullYear();
907
				date.setHours(h);
908
				date.setMinutes(parseInt(M.firstChild.data, 10));
909
				date.setFullYear(y);
910
				date.setMonth(m);
911
				date.setDate(d);
912
				this.dateClicked = false;
913
				this.callHandler();
914
			};
915
		})();
916
	} else {
917
		this.onSetTime = this.onUpdateTime = function() {};
918
	}
919
920
	var tfoot = Calendar.createElement("tfoot", table);
921
922
	row = Calendar.createElement("tr", tfoot);
923
	row.className = "footrow";
924
925
	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
926
	cell.className = "ttip";
927
	if (this.isPopup) {
928
		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
929
		cell.style.cursor = "move";
930
	}
931
	this.tooltips = cell;
932
933
	div = Calendar.createElement("div", this.element);
934
	this.monthsCombo = div;
935
	div.className = "combo";
936
	for (i = 0; i < Calendar._MN.length; ++i) {
937
		var mn = Calendar.createElement("div");
938
		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
939
		mn.month = i;
940
		mn.appendChild(document.createTextNode(Calendar._SMN[i]));
941
		div.appendChild(mn);
942
	}
943
944
	div = Calendar.createElement("div", this.element);
945
	this.yearsCombo = div;
946
	div.className = "combo";
947
	for (i = 12; i > 0; --i) {
948
		var yr = Calendar.createElement("div");
949
		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
950
		yr.appendChild(document.createTextNode(""));
951
		div.appendChild(yr);
952
	}
953
954
	this._init(this.firstDayOfWeek, this.date);
955
	parent.appendChild(this.element);
956
};
957
958
/** keyboard navigation, only for popup calendars */
959
Calendar._keyEvent = function(ev) {
960
	if (!window.calendar) {
961
		return false;
962
	}
963
	(Calendar.is_ie) && (ev = window.event);
964
	var cal = window.calendar;
965
	var act = (Calendar.is_ie || ev.type == "keypress");
966
	if (ev.ctrlKey) {
967
		switch (ev.keyCode) {
968
		    case 37: // KEY left
969
			act && Calendar.cellClick(cal._nav_pm);
970
			break;
971
		    case 38: // KEY up
972
			act && Calendar.cellClick(cal._nav_py);
973
			break;
974
		    case 39: // KEY right
975
			act && Calendar.cellClick(cal._nav_nm);
976
			break;
977
		    case 40: // KEY down
978
			act && Calendar.cellClick(cal._nav_ny);
979
			break;
980
		    default:
981
			return false;
982
		}
983
	} else switch (ev.keyCode) {
984
	    case 32: // KEY space (now)
985
		Calendar.cellClick(cal._nav_now);
986
		break;
987
	    case 27: // KEY esc
988
		act && cal.callCloseHandler();
989
		break;
990
	    case 37: // KEY left
991
	    case 38: // KEY up
992
	    case 39: // KEY right
993
	    case 40: // KEY down
994
		if (act) {
995
			var date = cal.date.getDate() - 1;
996
			var el = cal.currentDateEl;
997
			var ne = null;
998
			var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
999
			switch (ev.keyCode) {
1000
			    case 37: // KEY left
1001
				(--date >= 0) && (ne = cal.ar_days[date]);
1002
				break;
1003
			    case 38: // KEY up
1004
				date -= 7;
1005
				(date >= 0) && (ne = cal.ar_days[date]);
1006
				break;
1007
			    case 39: // KEY right
1008
				(++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
1009
				break;
1010
			    case 40: // KEY down
1011
				date += 7;
1012
				(date < cal.ar_days.length) && (ne = cal.ar_days[date]);
1013
				break;
1014
			}
1015
			if (!ne) {
1016
				if (prev) {
1017
					Calendar.cellClick(cal._nav_pm);
1018
				} else {
1019
					Calendar.cellClick(cal._nav_nm);
1020
				}
1021
				date = (prev) ? cal.date.getMonthDays() : 1;
1022
				el = cal.currentDateEl;
1023
				ne = cal.ar_days[date - 1];
1024
			}
1025
			Calendar.removeClass(el, "selected");
1026
			Calendar.addClass(ne, "selected");
1027
			cal.date = new Date(ne.caldate);
1028
			cal.callHandler();
1029
			cal.currentDateEl = ne;
1030
		}
1031
		break;
1032
	    case 13: // KEY enter
1033
		if (act) {
1034
			cal.callHandler();
1035
			cal.hide();
1036
		}
1037
		break;
1038
	    default:
1039
		return false;
1040
	}
1041
	return Calendar.stopEvent(ev);
1042
};
1043
1044
/**
1045
 *  (RE)Initializes the calendar to the given date and firstDayOfWeek
1046
 */
1047
Calendar.prototype._init = function (firstDayOfWeek, date) {
1048
	var today = new Date();
1049
	this.table.style.visibility = "hidden";
1050
	var year = date.getFullYear();
1051
	if (year < this.minYear) {
1052
		year = this.minYear;
1053
		date.setFullYear(year);
1054
	} else if (year > this.maxYear) {
1055
		year = this.maxYear;
1056
		date.setFullYear(year);
1057
	}
1058
	this.firstDayOfWeek = firstDayOfWeek;
1059
	this.date = new Date(date);
1060
	var month = date.getMonth();
1061
	var mday = date.getDate();
1062
	var no_days = date.getMonthDays();
1063
1064
	// calendar voodoo for computing the first day that would actually be
1065
	// displayed in the calendar, even if it's from the previous month.
1066
	// WARNING: this is magic. ;-)
1067
	date.setDate(1);
1068
	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
1069
	if (day1 < 0)
1070
		day1 += 7;
1071
	date.setDate(-day1);
1072
	date.setDate(date.getDate() + 1);
1073
1074
	var row = this.tbody.firstChild;
1075
	var MN = Calendar._SMN[month];
1076
	var ar_days = new Array();
1077
	var weekend = Calendar._TT["WEEKEND"];
1078
	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
1079
		var cell = row.firstChild;
1080
		if (this.weekNumbers) {
1081
			cell.className = "day wn";
1082
			cell.firstChild.data = date.getWeekNumber();
1083
			cell = cell.nextSibling;
1084
		}
1085
		row.className = "daysrow";
1086
		var hasdays = false;
1087
		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
1088
			var iday = date.getDate();
1089
			var wday = date.getDay();
1090
			cell.className = "day";
1091
			var current_month = (date.getMonth() == month);
1092
			if (!current_month) {
1093
				if (this.showsOtherMonths) {
1094
					cell.className += " othermonth";
1095
					cell.otherMonth = true;
1096
				} else {
1097
					cell.className = "emptycell";
1098
					cell.innerHTML = "&nbsp;";
1099
					cell.disabled = true;
1100
					continue;
1101
				}
1102
			} else {
1103
				cell.otherMonth = false;
1104
				hasdays = true;
1105
			}
1106
			cell.disabled = false;
1107
			cell.firstChild.data = iday;
1108
			if (typeof this.getDateStatus == "function") {
1109
				var status = this.getDateStatus(date, year, month, iday);
1110
				if (status === true) {
1111
					cell.className += " disabled";
1112
					cell.disabled = true;
1113
				} else {
1114
					if (/disabled/i.test(status))
1115
						cell.disabled = true;
1116
					cell.className += " " + status;
1117
				}
1118
			}
1119
			if (!cell.disabled) {
1120
				ar_days[ar_days.length] = cell;
1121
				cell.caldate = new Date(date);
1122
				cell.ttip = "_";
1123
				if (current_month && iday == mday) {
1124
					cell.className += " selected";
1125
					this.currentDateEl = cell;
1126
				}
1127
				if (date.getFullYear() == today.getFullYear() &&
1128
				    date.getMonth() == today.getMonth() &&
1129
				    iday == today.getDate()) {
1130
					cell.className += " today";
1131
					cell.ttip += Calendar._TT["PART_TODAY"];
1132
				}
1133
				if (weekend.indexOf(wday.toString()) != -1) {
1134
					cell.className += cell.otherMonth ? " oweekend" : " weekend";
1135
				}
1136
			}
1137
		}
1138
		if (!(hasdays || this.showsOtherMonths))
1139
			row.className = "emptyrow";
1140
	}
1141
	this.ar_days = ar_days;
1142
	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
1143
	this.onSetTime();
1144
	this.table.style.visibility = "visible";
1145
	// PROFILE
1146
	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
1147
};
1148
1149
/**
1150
 *  Calls _init function above for going to a certain date (but only if the
1151
 *  date is different than the currently selected one).
1152
 */
1153
Calendar.prototype.setDate = function (date) {
1154
	if (!date.equalsTo(this.date)) {
1155
		this._init(this.firstDayOfWeek, date);
1156
	}
1157
};
1158
1159
/**
1160
 *  Refreshes the calendar.  Useful if the "disabledHandler" function is
1161
 *  dynamic, meaning that the list of disabled date can change at runtime.
1162
 *  Just * call this function if you think that the list of disabled dates
1163
 *  should * change.
1164
 */
1165
Calendar.prototype.refresh = function () {
1166
	this._init(this.firstDayOfWeek, this.date);
1167
};
1168
1169
/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
1170
Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
1171
	this._init(firstDayOfWeek, this.date);
1172
	this._displayWeekdays();
1173
};
1174
1175
/**
1176
 *  Allows customization of what dates are enabled.  The "unaryFunction"
1177
 *  parameter must be a function object that receives the date (as a JS Date
1178
 *  object) and returns a boolean value.  If the returned value is true then
1179
 *  the passed date will be marked as disabled.
1180
 */
1181
Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
1182
	this.getDateStatus = unaryFunction;
1183
};
1184
1185
/** Customization of allowed year range for the calendar. */
1186
Calendar.prototype.setRange = function (a, z) {
1187
	this.minYear = a;
1188
	this.maxYear = z;
1189
};
1190
1191
/** Calls the first user handler (selectedHandler). */
1192
Calendar.prototype.callHandler = function () {
1193
	if (this.onSelected) {
1194
		this.onSelected(this, this.date.print(this.dateFormat));
1195
	}
1196
};
1197
1198
/** Calls the second user handler (closeHandler). */
1199
Calendar.prototype.callCloseHandler = function () {
1200
	if (this.onClose) {
1201
		this.onClose(this);
1202
	}
1203
	// this.hideShowCovered();
1204
};
1205
1206
/** Removes the calendar object from the DOM tree and destroys it. */
1207
Calendar.prototype.destroy = function () {
1208
	var el = this.element.parentNode;
1209
	el.removeChild(this.element);
1210
	Calendar._C = null;
1211
	window.calendar = null;
1212
};
1213
1214
/**
1215
 *  Moves the calendar element to a different section in the DOM tree (changes
1216
 *  its parent).
1217
 */
1218
Calendar.prototype.reparent = function (new_parent) {
1219
	var el = this.element;
1220
	el.parentNode.removeChild(el);
1221
	new_parent.appendChild(el);
1222
};
1223
1224
// This gets called when the user presses a mouse button anywhere in the
1225
// document, if the calendar is shown.  If the click was outside the open
1226
// calendar this function closes it.
1227
Calendar._checkCalendar = function(ev) {
1228
	if (!window.calendar) {
1229
		return false;
1230
	}
1231
	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
1232
	for (; el != null && el != calendar.element; el = el.parentNode);
1233
	if (el == null) {
1234
		// calls closeHandler which should hide the calendar.
1235
		window.calendar.callCloseHandler();
1236
		return Calendar.stopEvent(ev);
1237
	}
1238
};
1239
1240
/** Shows the calendar. */
1241
Calendar.prototype.show = function () {
1242
	var rows = this.table.getElementsByTagName("tr");
1243
	for (var i = rows.length; i > 0;) {
1244
		var row = rows[--i];
1245
		Calendar.removeClass(row, "rowhilite");
1246
		var cells = row.getElementsByTagName("td");
1247
		for (var j = cells.length; j > 0;) {
1248
			var cell = cells[--j];
1249
			Calendar.removeClass(cell, "hilite");
1250
			Calendar.removeClass(cell, "active");
1251
		}
1252
	}
1253
	this.element.style.display = "block";
1254
	this.hidden = false;
1255
	if (this.isPopup) {
1256
		window.calendar = this;
1257
		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
1258
		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
1259
		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
1260
	}
1261
	// this.hideShowCovered();
1262
};
1263
1264
/**
1265
 *  Hides the calendar.  Also removes any "hilite" from the class of any TD
1266
 *  element.
1267
 */
1268
Calendar.prototype.hide = function () {
1269
	if (this.isPopup) {
1270
		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
1271
		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
1272
		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
1273
	}
1274
	this.element.style.display = "none";
1275
	this.hidden = true;
1276
	// this.hideShowCovered();
1277
};
1278
1279
/**
1280
 *  Shows the calendar at a given absolute position (beware that, depending on
1281
 *  the calendar element style -- position property -- this might be relative
1282
 *  to the parent's containing rectangle).
1283
 */
1284
Calendar.prototype.showAt = function (x, y) {
1285
	var s = this.element.style;
1286
	s.left = x + "px";
1287
	s.top = y + "px";
1288
	this.show();
1289
};
1290
1291
/** Shows the calendar near a given element. */
1292
Calendar.prototype.showAtElement = function (el, opts) {
1293
	var self = this;
1294
	var p = Calendar.getAbsolutePos(el);
1295
	if (!opts || typeof opts != "string") {
1296
		this.showAt(p.x, p.y + el.offsetHeight);
1297
		return true;
1298
	}
1299
	function fixPosition(box) {
1300
		if (box.x < 0)
1301
			box.x = 0;
1302
		if (box.y < 0)
1303
			box.y = 0;
1304
		var cp = document.createElement("div");
1305
		var s = cp.style;
1306
		s.position = "absolute";
1307
		s.right = s.bottom = s.width = s.height = "0px";
1308
		document.body.appendChild(cp);
1309
		var br = Calendar.getAbsolutePos(cp);
1310
		document.body.removeChild(cp);
1311
		if (Calendar.is_ie) {
1312
			br.y += document.body.scrollTop;
1313
			br.x += document.body.scrollLeft;
1314
		} else {
1315
			br.y += window.scrollY;
1316
			br.x += window.scrollX;
1317
		}
1318
		var tmp = box.x + box.width - br.x;
1319
		if (tmp > 0) box.x -= tmp;
1320
		tmp = box.y + box.height - br.y;
1321
		if (tmp > 0) box.y -= tmp;
1322
	};
1323
	this.element.style.display = "block";
1324
	Calendar.continuation_for_the_fucking_khtml_browser = function() {
1325
		var w = self.element.offsetWidth;
1326
		var h = self.element.offsetHeight;
1327
		self.element.style.display = "none";
1328
		var valign = opts.substr(0, 1);
1329
		var halign = "l";
1330
		if (opts.length > 1) {
1331
			halign = opts.substr(1, 1);
1332
		}
1333
		// vertical alignment
1334
		switch (valign) {
1335
		    case "T": p.y -= h; break;
1336
		    case "B": p.y += el.offsetHeight; break;
1337
		    case "C": p.y += (el.offsetHeight - h) / 2; break;
1338
		    case "t": p.y += el.offsetHeight - h; break;
1339
		    case "b": break; // already there
1340
		}
1341
		// horizontal alignment
1342
		switch (halign) {
1343
		    case "L": p.x -= w; break;
1344
		    case "R": p.x += el.offsetWidth; break;
1345
		    case "C": p.x += (el.offsetWidth - w) / 2; break;
1346
		    case "r": p.x += el.offsetWidth - w; break;
1347
		    case "l": break; // already there
1348
		}
1349
		p.width = w;
1350
		p.height = h + 40;
1351
		self.monthsCombo.style.display = "none";
1352
		fixPosition(p);
1353
		self.showAt(p.x, p.y);
1354
	};
1355
	if (Calendar.is_khtml)
1356
		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
1357
	else
1358
		Calendar.continuation_for_the_fucking_khtml_browser();
1359
};
1360
1361
/** Customizes the date format. */
1362
Calendar.prototype.setDateFormat = function (str) {
1363
	this.dateFormat = str;
1364
};
1365
1366
/** Customizes the tooltip date format. */
1367
Calendar.prototype.setTtDateFormat = function (str) {
1368
	this.ttDateFormat = str;
1369
};
1370
1371
/**
1372
 *  Tries to identify the date represented in a string.  If successful it also
1373
 *  calls this.setDate which moves the calendar to the given date.
1374
 */
1375
Calendar.prototype.parseDate = function (str, fmt) {
1376
	var y = 0;
1377
	var m = -1;
1378
	var d = 0;
1379
	var a = str.split(/\W+/);
1380
	if (!fmt) {
1381
		fmt = this.dateFormat;
1382
	}
1383
	var b = fmt.match(/%./g);
1384
	var i = 0, j = 0;
1385
	var hr = 0;
1386
	var min = 0;
1387
	for (i = 0; i < a.length; ++i) {
1388
		if (!a[i])
1389
			continue;
1390
		switch (b[i]) {
1391
		    case "%d":
1392
		    case "%e":
1393
			d = parseInt(a[i], 10);
1394
			break;
1395
1396
		    case "%m":
1397
			m = parseInt(a[i], 10) - 1;
1398
			break;
1399
1400
		    case "%Y":
1401
		    case "%y":
1402
			y = parseInt(a[i], 10);
1403
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
1404
			break;
1405
1406
		    case "%b":
1407
		    case "%B":
1408
			for (j = 0; j < 12; ++j) {
1409
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
1410
			}
1411
			break;
1412
1413
		    case "%H":
1414
		    case "%I":
1415
		    case "%k":
1416
		    case "%l":
1417
			hr = parseInt(a[i], 10);
1418
			break;
1419
1420
		    case "%P":
1421
		    case "%p":
1422
			if (/pm/i.test(a[i]) && hr < 12)
1423
				hr += 12;
1424
			break;
1425
1426
		    case "%M":
1427
			min = parseInt(a[i], 10);
1428
			break;
1429
		}
1430
	}
1431
	if (y != 0 && m != -1 && d != 0) {
1432
		this.setDate(new Date(y, m, d, hr, min, 0));
1433
		return;
1434
	}
1435
	y = 0; m = -1; d = 0;
1436
	for (i = 0; i < a.length; ++i) {
1437
		if (a[i].search(/[a-zA-Z]+/) != -1) {
1438
			var t = -1;
1439
			for (j = 0; j < 12; ++j) {
1440
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
1441
			}
1442
			if (t != -1) {
1443
				if (m != -1) {
1444
					d = m+1;
1445
				}
1446
				m = t;
1447
			}
1448
		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
1449
			m = a[i]-1;
1450
		} else if (parseInt(a[i], 10) > 31 && y == 0) {
1451
			y = parseInt(a[i], 10);
1452
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
1453
		} else if (d == 0) {
1454
			d = a[i];
1455
		}
1456
	}
1457
	if (y == 0) {
1458
		var today = new Date();
1459
		y = today.getFullYear();
1460
	}
1461
	if (m != -1 && d != 0) {
1462
		this.setDate(new Date(y, m, d, hr, min, 0));
1463
	}
1464
};
1465
1466
/* Calendar.prototype.hideShowCovered = function () {
1467
	var self = this;
1468
	Calendar.continuation_for_the_fucking_khtml_browser = function() {
1469
		function getVisib(obj){
1470
			var value = obj.style.visibility;
1471
			if (!value) {
1472
				if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
1473
					if (!Calendar.is_khtml)
1474
						value = document.defaultView.
1475
							getComputedStyle(obj, "").getPropertyValue("visibility");
1476
					else
1477
						value = '';
1478
				} else if (obj.currentStyle) { // IE
1479
					value = obj.currentStyle.visibility;
1480
				} else
1481
					value = '';
1482
			}
1483
			return value;
1484
		};
1485
1486
		var tags = new Array("applet", "iframe", "select");
1487
		var el = self.element;
1488
1489
		var p = Calendar.getAbsolutePos(el);
1490
		var EX1 = p.x;
1491
		var EX2 = el.offsetWidth + EX1;
1492
		var EY1 = p.y;
1493
		var EY2 = el.offsetHeight + EY1;
1494
1495
		for (var k = tags.length; k > 0; ) {
1496
			var ar = document.getElementsByTagName(tags[--k]);
1497
			var cc = null;
1498
1499
			for (var i = ar.length; i > 0;) {
1500
				cc = ar[--i];
1501
1502
				p = Calendar.getAbsolutePos(cc);
1503
				var CX1 = p.x;
1504
				var CX2 = cc.offsetWidth + CX1;
1505
				var CY1 = p.y;
1506
				var CY2 = cc.offsetHeight + CY1;
1507
1508
				if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
1509
					if (!cc.__msh_save_visibility) {
1510
						cc.__msh_save_visibility = getVisib(cc);
1511
					}
1512
					cc.style.visibility = cc.__msh_save_visibility;
1513
				} else {
1514
					if (!cc.__msh_save_visibility) {
1515
						cc.__msh_save_visibility = getVisib(cc);
1516
					}
1517
					cc.style.visibility = "hidden";
1518
				}
1519
			}
1520
		}
1521
	};
1522
	if (Calendar.is_khtml)
1523
		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
1524
	else
1525
		Calendar.continuation_for_the_fucking_khtml_browser();
1526
}; */
1527
1528
/** Internal function; it displays the bar with the names of the weekday. */
1529
Calendar.prototype._displayWeekdays = function () {
1530
	var fdow = this.firstDayOfWeek;
1531
	var cell = this.firstdayname;
1532
	var weekend = Calendar._TT["WEEKEND"];
1533
	for (var i = 0; i < 7; ++i) {
1534
		cell.className = "day name";
1535
		var realday = (i + fdow) % 7;
1536
		if (i) {
1537
			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
1538
			cell.navtype = 100;
1539
			cell.calendar = this;
1540
			cell.fdow = realday;
1541
			Calendar._add_evs(cell);
1542
		}
1543
		if (weekend.indexOf(realday.toString()) != -1) {
1544
			Calendar.addClass(cell, "weekend");
1545
		}
1546
		cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
1547
		cell = cell.nextSibling;
1548
	}
1549
};
1550
1551
/** Internal function.  Hides all combo boxes that might be displayed. */
1552
Calendar.prototype._hideCombos = function () {
1553
	this.monthsCombo.style.display = "none";
1554
	this.yearsCombo.style.display = "none";
1555
};
1556
1557
/** Internal function.  Starts dragging the element. */
1558
Calendar.prototype._dragStart = function (ev) {
1559
	if (this.dragging) {
1560
		return;
1561
	}
1562
	this.dragging = true;
1563
	var posX;
1564
	var posY;
1565
	if (Calendar.is_ie) {
1566
		posY = window.event.clientY + document.body.scrollTop;
1567
		posX = window.event.clientX + document.body.scrollLeft;
1568
	} else {
1569
		posY = ev.clientY + window.scrollY;
1570
		posX = ev.clientX + window.scrollX;
1571
	}
1572
	var st = this.element.style;
1573
	this.xOffs = posX - parseInt(st.left);
1574
	this.yOffs = posY - parseInt(st.top);
1575
	with (Calendar) {
1576
		addEvent(document, "mousemove", calDragIt);
1577
		addEvent(document, "mouseup", calDragEnd);
1578
	}
1579
};
1580
1581
// BEGIN: DATE OBJECT PATCHES
1582
1583
/** Adds the number of days array to the Date object. */
1584
Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
1585
1586
/** Constants used for time computations */
1587
Date.SECOND = 1000 /* milliseconds */;
1588
Date.MINUTE = 60 * Date.SECOND;
1589
Date.HOUR   = 60 * Date.MINUTE;
1590
Date.DAY    = 24 * Date.HOUR;
1591
Date.WEEK   =  7 * Date.DAY;
1592
1593
/** Returns the number of days in the current month */
1594
Date.prototype.getMonthDays = function(month) {
1595
	var year = this.getFullYear();
1596
	if (typeof month == "undefined") {
1597
		month = this.getMonth();
1598
	}
1599
	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
1600
		return 29;
1601
	} else {
1602
		return Date._MD[month];
1603
	}
1604
};
1605
1606
/** Returns the number of day in the year. */
1607
Date.prototype.getDayOfYear = function() {
1608
	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1609
	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
1610
	var time = now - then;
1611
	return Math.floor(time / Date.DAY);
1612
};
1613
1614
/** Returns the number of the week in year, as defined in ISO 8601. */
1615
Date.prototype.getWeekNumber = function() {
1616
	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1617
	var DoW = d.getDay();
1618
	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
1619
	var ms = d.valueOf(); // GMT
1620
	d.setMonth(0);
1621
	d.setDate(4); // Thu in Week 1
1622
	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
1623
};
1624
1625
/** Checks dates equality (ignores time) */
1626
Date.prototype.equalsTo = function(date) {
1627
	return ((this.getFullYear() == date.getFullYear()) &&
1628
		(this.getMonth() == date.getMonth()) &&
1629
		(this.getDate() == date.getDate()) &&
1630
		(this.getHours() == date.getHours()) &&
1631
		(this.getMinutes() == date.getMinutes()));
1632
};
1633
1634
/** Prints the date in a string according to the given format. */
1635
Date.prototype.print = function (str) {
1636
	var m = this.getMonth();
1637
	var d = this.getDate();
1638
	var y = this.getFullYear();
1639
	var wn = this.getWeekNumber();
1640
	var w = this.getDay();
1641
	var s = {};
1642
	var hr = this.getHours();
1643
	var pm = (hr >= 12);
1644
	var ir = (pm) ? (hr - 12) : hr;
1645
	var dy = this.getDayOfYear();
1646
	if (ir == 0)
1647
		ir = 12;
1648
	var min = this.getMinutes();
1649
	var sec = this.getSeconds();
1650
	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
1651
	s["%A"] = Calendar._DN[w]; // full weekday name
1652
	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
1653
	s["%B"] = Calendar._MN[m]; // full month name
1654
	// FIXME: %c : preferred date and time representation for the current locale
1655
	s["%C"] = 1 + Math.floor(y / 100); // the century number
1656
	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
1657
	s["%e"] = d; // the day of the month (range 1 to 31)
1658
	// FIXME: %D : american date style: %m/%d/%y
1659
	// FIXME: %E, %F, %G, %g, %h (man strftime)
1660
	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
1661
	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
1662
	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
1663
	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
1664
	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
1665
	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
1666
	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
1667
	s["%n"] = "\n";		// a newline character
1668
	s["%p"] = pm ? "PM" : "AM";
1669
	s["%P"] = pm ? "pm" : "am";
1670
	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
1671
	// FIXME: %R : the time in 24-hour notation %H:%M
1672
	s["%s"] = Math.floor(this.getTime() / 1000);
1673
	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
1674
	s["%t"] = "\t";		// a tab character
1675
	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
1676
	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
1677
	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
1678
	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
1679
	// FIXME: %x : preferred date representation for the current locale without the time
1680
	// FIXME: %X : preferred time representation for the current locale without the date
1681
	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
1682
	s["%Y"] = y;		// year with the century
1683
	s["%%"] = "%";		// a literal '%' character
1684
1685
	var re = /%./g;
1686
	if (!Calendar.is_ie5)
1687
		return str.replace(re, function (par) { return s[par] || par; });
1688
1689
	var a = str.match(re);
1690
	for (var i = 0; i < a.length; i++) {
1691
		var tmp = s[a[i]];
1692
		if (tmp) {
1693
			re = new RegExp(a[i], 'g');
1694
			str = str.replace(re, tmp);
1695
		}
1696
	}
1697
1698
	return str;
1699
};
1700
1701
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
1702
Date.prototype.setFullYear = function(y) {
1703
	var d = new Date(this);
1704
	d.__msh_oldSetFullYear(y);
1705
	if (d.getMonth() != this.getMonth())
1706
		this.setDate(28);
1707
	this.__msh_oldSetFullYear(y);
1708
};
1709
1710
// END: DATE OBJECT PATCHES
1711
1712
1713
// global object that remembers the calendar
1714
window.calendar = null;
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/jquery-ui.css (-27 / +105 lines)
Lines 56-81 Link Here
56
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
56
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
57
.ui-widget .ui-widget { font-size: 1em; }
57
.ui-widget .ui-widget { font-size: 1em; }
58
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
58
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
59
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
59
.ui-widget-content { border: 1px solid #B9D8D9; background: #ffffff; color: #222222; }
60
.ui-widget-content a { color: #222222; }
60
.ui-widget-content a { color: #222222; }
61
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
61
.ui-widget-header { border: 1px solid #B9D8D9; background: #E6F0F2 none; color: #222222; font-weight: bold; }
62
.ui-widget-header a { color: #222222; }
62
.ui-widget-header a { color: #222222; }
63
63
64
/* Interaction states
64
/* Interaction states
65
----------------------------------*/
65
----------------------------------*/
66
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
66
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B9D8D9; background: #F4F8F9 none; font-weight: normal; color: #555555; }
67
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
67
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
68
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
68
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121; }
69
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
69
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
70
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
70
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff none; font-weight: normal; color: #212121; }
71
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
71
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
72
.ui-widget :active { outline: none; }
72
.ui-widget :active { outline: none; }
73
73
74
/* Interaction Cues
74
/* Interaction Cues
75
----------------------------------*/
75
----------------------------------*/
76
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
76
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #FED22F; background: #FFF4C6; color: #363636; }
77
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
77
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
78
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
78
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec; color: #cd0a0a; }
79
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
79
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
80
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
80
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
81
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
81
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
Lines 293-299 Link Here
293
 *
293
 *
294
 * http://docs.jquery.com/UI/Autocomplete#theming
294
 * http://docs.jquery.com/UI/Autocomplete#theming
295
 */
295
 */
296
.ui-autocomplete { position: absolute; cursor: default; }
296
.ui-autocomplete { position: absolute; cursor: default; -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.3); -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.3); box-shadow: 2px 2px 2px rgba(0,0,0,.3); }
297
298
.ui-autocomplete.ui-widget-content .ui-state-hover { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121;
299
}
300
301
.ui-autocomplete-loading {
302
    background: #FFF url("../../img/loading-small.gif") right center no-repeat;
303
}
297
304
298
/* workarounds */
305
/* workarounds */
299
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
306
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
Lines 308-341 Link Here
308
 * http://docs.jquery.com/UI/Menu#theming
315
 * http://docs.jquery.com/UI/Menu#theming
309
 */
316
 */
310
.ui-menu {
317
.ui-menu {
311
    list-style:none;
318
	list-style:none;
312
    padding: 2px;
319
	padding: 2px;
313
    margin: 0;
320
	margin: 0;
314
    display:block;
321
	display:block;
315
    float: left;
322
	float: left;
323
}
324
.ui-menu li {
325
	list-style:none;
316
}
326
}
317
.ui-menu .ui-menu {
327
.ui-menu .ui-menu {
318
    margin-top: -3px;
328
	margin-top: -3px;
319
}
329
}
320
.ui-menu .ui-menu-item {
330
.ui-menu .ui-menu-item {
321
    margin:0;
331
	margin:0;
322
    padding: 0;
332
	padding: 0;
323
    zoom: 1;
333
	zoom: 1;
324
    float: left;
334
	float: left;
325
    clear: left;
335
	clear: left;
326
    width: 100%;
336
	width: 100%;
327
}
337
}
328
.ui-menu .ui-menu-item a {
338
.ui-menu .ui-menu-item a {
329
    text-decoration:none;
339
	text-decoration:none;
330
    display:block;
340
	display:block;
331
    padding:.2em .4em;
341
	padding:.2em .4em;
332
    line-height:1.5;
342
	line-height:1.5;
333
    zoom:1;
343
	zoom:1;
334
}
344
}
335
.ui-menu .ui-menu-item a.ui-state-hover,
345
.ui-menu .ui-menu-item a.ui-state-hover,
336
.ui-menu .ui-menu-item a.ui-state-active {
346
.ui-menu .ui-menu-item a.ui-state-active {
337
    font-weight: normal;
347
	font-weight: normal;
338
    margin: -1px;
348
	margin: -1px;
339
}
349
}
340
/*!
350
/*!
341
 * jQuery UI Tabs 1.8.20
351
 * jQuery UI Tabs 1.8.20
Lines 355-357 Link Here
355
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
365
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
356
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
366
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
357
.ui-tabs .ui-tabs-hide { display: none !important; }
367
.ui-tabs .ui-tabs-hide { display: none !important; }
368
/*!
369
 * jQuery UI Datepicker 1.8.20
370
 *
371
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
372
 * Dual licensed under the MIT or GPL Version 2 licenses.
373
 * http://jquery.org/license
374
 *
375
 * http://docs.jquery.com/UI/Datepicker#theming
376
 */
377
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
378
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
379
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
380
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
381
.ui-datepicker .ui-datepicker-prev { left:2px; }
382
.ui-datepicker .ui-datepicker-next { right:2px; }
383
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
384
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
385
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
386
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
387
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
388
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
389
.ui-datepicker select.ui-datepicker-month,
390
.ui-datepicker select.ui-datepicker-year { width: 49%;}
391
.ui-datepicker table {width: 100%; font-size: .9em; border : 0; border-collapse: collapse; margin:0 0 .4em; }
392
.ui-datepicker th { background : transparent none; padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
393
.ui-datepicker td { border: 0; padding: 1px; }
394
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
395
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
396
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
397
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
398
399
/* with multiple calendars */
400
.ui-datepicker.ui-datepicker-multi { width:auto; }
401
.ui-datepicker-multi .ui-datepicker-group { float:left; }
402
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
403
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
404
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
405
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
406
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
407
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
408
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
409
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
410
411
/* RTL support */
412
.ui-datepicker-rtl { direction: rtl; }
413
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
414
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
415
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
416
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
417
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
418
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
419
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
420
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
421
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
422
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
423
424
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
425
.ui-datepicker-cover {
426
    display: none; /*sorry for IE5*/
427
    display/**/: block; /*sorry for IE5*/
428
    position: absolute; /*must have*/
429
    z-index: -1; /*must have*/
430
    filter: mask(); /*must have*/
431
    top: -4px; /*must have*/
432
    left: -4px; /*must have*/
433
    width: 200px; /*must have*/
434
    height: 200px; /*must have*/
435
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/jquery-ui.js (-7 / +11 lines)
Lines 1-25 Link Here
1
/*! jQuery UI - v1.8.20 - 2012-04-30
1
/*! jQuery UI - v1.8.21 - 2012-06-05
2
* https://github.com/jquery/jquery-ui
2
* https://github.com/jquery/jquery-ui
3
* Includes: jquery.ui.core.js
3
* Includes: jquery.ui.core.js
4
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
4
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
5
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.20",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
5
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.21",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
6
* https://github.com/jquery/jquery-ui
6
* https://github.com/jquery/jquery-ui
7
* Includes: jquery.ui.widget.js
7
* Includes: jquery.ui.widget.js
8
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
8
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
9
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
9
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
10
* https://github.com/jquery/jquery-ui
10
* https://github.com/jquery/jquery-ui
11
* Includes: jquery.ui.mouse.js
11
* Includes: jquery.ui.mouse.js
12
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
12
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
13
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
13
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
14
* https://github.com/jquery/jquery-ui
14
* https://github.com/jquery/jquery-ui
15
* Includes: jquery.ui.position.js
15
* Includes: jquery.ui.position.js
16
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
16
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
17
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
17
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
18
* https://github.com/jquery/jquery-ui
18
* https://github.com/jquery/jquery-ui
19
* Includes: jquery.ui.autocomplete.js
19
* Includes: jquery.ui.autocomplete.js
20
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
20
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
21
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
21
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
22
* https://github.com/jquery/jquery-ui
22
* https://github.com/jquery/jquery-ui
23
* Includes: jquery.ui.tabs.js
23
* Includes: jquery.ui.tabs.js
24
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
24
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
25
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.20"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;
25
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.21"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
26
* https://github.com/jquery/jquery-ui
27
* Includes: jquery.ui.datepicker.js
28
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
29
(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.21"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.21",window["DP_jQuery_"+dpuuid]=$})(jQuery);;
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/ui.tabs.css (-81 lines)
Lines 1-81 Link Here
1
/* Caution! Ensure accessibility in print and other media types... */
2
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
3
    .ui-tabs-hide {
4
        display: none;
5
    }
6
}
7
8
/* Hide useless elements in print layouts... */
9
@media print {
10
    .ui-tabs-nav {
11
        display: none;
12
    }
13
}
14
15
/* Skin */
16
.ui-tabs-nav, .ui-tabs-panel {
17
}
18
.ui-tabs-nav {
19
    list-style: none;
20
}
21
.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
22
    display: block;
23
    clear: both;
24
    content: " ";
25
}
26
.ui-tabs-nav li {
27
    float: left;
28
	 list-style-type : none;
29
}
30
.ui-tabs-nav a, .ui-tabs-nav a span {
31
    float: left; /* fixes dir=ltr problem and other quirks IE */
32
 }
33
.ui-tabs-nav a {
34
    margin: 0; /* position: relative makes opacity fail for disabled tab in IE */
35
    white-space: nowrap; /* @ IE 6 */
36
    outline: 0; /* @ Firefox, prevent dotted border after click */    
37
}
38
.ui-tabs-nav a:link, .ui-tabs-nav a:visited {
39
}
40
.ui-tabs-nav .ui-tabs-selected a {
41
 }
42
.ui-tabs-nav a span {
43
    padding-top: 1px;
44
    padding-right: 0;
45
    height: 20px;
46
    line-height: 20px;
47
}
48
.ui-tabs-nav .ui-tabs-selected a span {
49
    padding-top: 0;
50
    height: 20px;
51
    line-height: 20px;
52
}
53
.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited,
54
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
55
    cursor: text;
56
}
57
.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active,
58
.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */
59
    cursor: pointer;
60
}
61
.ui-tabs-disabled {
62
    opacity: .4;
63
    filter: alpha(opacity=40);
64
}
65
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited {
66
    color: #000;
67
}
68
.ui-tabs-panel {
69
    border: 1px solid #E8E8E8;
70
	padding : 1em;
71
    border-radius : 3px;
72
    #background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
73
}
74
75
/* Additional IE specific bug fixes... */
76
* html .ui-tabs-nav { /* auto clear @ IE 6 & IE 7 Quirks Mode */
77
    display: inline-block;
78
}
79
*:first-child+html .ui-tabs-nav  { /* auto clear @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
80
    display: inline-block;
81
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/ui.tabs.js (-517 lines)
Lines 1-517 Link Here
1
/*
2
 * Tabs 3 - New Wave Tabs
3
 *
4
 * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
5
 * Dual licensed under the MIT (MIT-LICENSE.txt)
6
 * and GPL (GPL-LICENSE.txt) licenses.
7
 *
8
 * http://docs.jquery.com/UI/Tabs
9
 */
10
11
(function($) {
12
13
    // if the UI scope is not availalable, add it
14
    $.ui = $.ui || {};
15
16
    // tabs API methods
17
    $.fn.tabs = function() {
18
        var method = typeof arguments[0] == 'string' && arguments[0];
19
        var args = method && Array.prototype.slice.call(arguments, 1) || arguments;
20
21
        return this.each(function() {
22
            if (method) {
23
                var tabs = $.data(this, 'ui-tabs');
24
                tabs[method].apply(tabs, args);
25
            } else
26
                new $.ui.tabs(this, args[0] || {});
27
        });
28
    };
29
30
    // tabs class
31
    $.ui.tabs = function(el, options) {
32
        var self = this;
33
34
        this.element = el;
35
36
        this.options = $.extend({
37
38
            // basic setup
39
            selected: 0,
40
            unselect: options.selected === null,
41
            event: 'click',
42
            disabled: [],
43
            cookie: null, // pass options object as expected by cookie plugin: { expires: 7, path: '/', domain: 'jquery.com', secure: true }
44
            // TODO bookmarkable: $.ajaxHistory ? true : false,
45
46
            // Ajax
47
            spinner: 'Loading&#8230;',
48
            cache: false,
49
            idPrefix: 'ui-tabs-',
50
            ajaxOptions: {},
51
52
            // animations
53
            fx: null, /* e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } */
54
55
            // templates
56
            tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
57
            panelTemplate: '<div></div>',
58
59
            // CSS classes
60
            navClass: 'ui-tabs-nav',
61
            selectedClass: 'ui-tabs-selected',
62
            unselectClass: 'ui-tabs-unselect',
63
            disabledClass: 'ui-tabs-disabled',
64
            panelClass: 'ui-tabs-panel',
65
            hideClass: 'ui-tabs-hide',
66
            loadingClass: 'ui-tabs-loading'
67
68
        }, options);
69
70
        this.options.event += '.ui-tabs'; // namespace event
71
        this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
72
73
        $(el).bind('setData.ui-tabs', function(event, key, value) {
74
            self.options[key] = value;
75
            this.tabify();
76
        }).bind('getData.ui-tabs', function(event, key) {
77
            return self.options[key];
78
        });
79
80
        // save instance for later
81
        $.data(el, 'ui-tabs', this);
82
83
        // create tabs
84
        this.tabify(true);
85
    };
86
87
    // instance methods
88
    $.extend($.ui.tabs.prototype, {
89
        tabId: function(a) {
90
            return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
91
                || this.options.idPrefix + $.data(a);
92
        },
93
        ui: function(tab, panel) {
94
            return {
95
                instance: this,
96
                options: this.options,
97
                tab: tab,
98
                panel: panel
99
            };
100
        },
101
        tabify: function(init) {
102
103
            this.$lis = $('li:has(a[href])', this.element);
104
            this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
105
            this.$panels = $([]);
106
107
            var self = this, o = this.options;
108
109
            this.$tabs.each(function(i, a) {
110
                // inline tab
111
                if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
112
                    self.$panels = self.$panels.add(a.hash);
113
                // remote tab
114
                else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
115
                    $.data(a, 'href.ui-tabs', a.href); // required for restore on destroy
116
                    $.data(a, 'load.ui-tabs', a.href); // mutable
117
                    var id = self.tabId(a);
118
                    a.href = '#' + id;
119
                    var $panel = $('#' + id);
120
                    if (!$panel.length) {
121
                        $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
122
                            .insertAfter( self.$panels[i - 1] || self.element );
123
                        $panel.data('destroy.ui-tabs', true);
124
                    }
125
                    self.$panels = self.$panels.add( $panel );
126
                }
127
                // invalid tab href
128
                else
129
                    o.disabled.push(i + 1);
130
            });
131
132
            if (init) {
133
134
                // attach necessary classes for styling if not present
135
                $(this.element).hasClass(o.navClass) || $(this.element).addClass(o.navClass);
136
                this.$panels.each(function() {
137
                    var $this = $(this);
138
                    $this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
139
                });
140
141
                // disabled tabs
142
                for (var i = 0, index; index = o.disabled[i]; i++)
143
                    this.disable(index);
144
145
                // Try to retrieve selected tab:
146
                // 1. from fragment identifier in url if present
147
                // 2. from cookie
148
                // 3. from selected class attribute on <li>
149
                // 4. otherwise use given "selected" option
150
                // 5. check if tab is disabled
151
                this.$tabs.each(function(i, a) {
152
                    if (location.hash) {
153
                        if (a.hash == location.hash) {
154
                            o.selected = i;
155
                            // prevent page scroll to fragment
156
                            //if (($.browser.msie || $.browser.opera) && !o.remote) {
157
                            if ($.browser.msie || $.browser.opera) {
158
                                var $toShow = $(location.hash), toShowId = $toShow.attr('id');
159
                                $toShow.attr('id', '');
160
                                setTimeout(function() {
161
                                    $toShow.attr('id', toShowId); // restore id
162
                                }, 500);
163
                            }
164
                            scrollTo(0, 0);
165
                            return false; // break
166
                        }
167
                    } else if (o.cookie) {
168
                        var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
169
                        if (index && self.$tabs[index]) {
170
                            o.selected = index;
171
                            return false; // break
172
                        }
173
                    } else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
174
                        o.selected = i;
175
                        return false; // break
176
                    }
177
                });
178
                var n = this.$lis.length;
179
                while (this.$lis.eq(o.selected).hasClass(o.disabledClass) && n) {
180
                    o.selected = ++o.selected < this.$lis.length ? o.selected : 0;
181
                    n--;
182
                }
183
                if (!n) // all tabs disabled, set option unselect to true
184
                    o.unselect = true;
185
186
                // highlight selected tab
187
                this.$panels.addClass(o.hideClass);
188
                this.$lis.removeClass(o.selectedClass);
189
                if (!o.unselect) {
190
                    this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
191
                    this.$lis.eq(o.selected).addClass(o.selectedClass);
192
                }
193
194
                // load if remote tab
195
                var href = !o.unselect && $.data(this.$tabs[o.selected], 'load.ui-tabs');
196
                if (href)
197
                    this.load(o.selected, href);
198
199
                // disable click if event is configured to something else
200
                if (!(/^click/).test(o.event))
201
                    this.$tabs.bind('click', function(e) { e.preventDefault(); });
202
203
            }
204
205
            var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
206
            if (o.fx && o.fx.constructor == Array)
207
                hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
208
            else
209
                hideFx = showFx = o.fx || baseFx;
210
211
            // reset some styles to maintain print style sheets etc.
212
            var resetCSS = { display: '', overflow: '', height: '' };
213
            if (!$.browser.msie) // not in IE to prevent ClearType font issue
214
                resetCSS.opacity = '';
215
216
            // Hide a tab, animation prevents browser scrolling to fragment,
217
            // $show is optional.
218
            function hideTab(clicked, $hide, $show) {
219
                $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
220
                    $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
221
                    if ($.browser.msie && hideFx.opacity)
222
                        $hide[0].style.filter = '';
223
                    if ($show)
224
                        showTab(clicked, $show, $hide);
225
                });
226
            }
227
228
            // Show a tab, animation prevents browser scrolling to fragment,
229
            // $hide is optional.
230
            function showTab(clicked, $show, $hide) {
231
                if (showFx === baseFx)
232
                    $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
233
                $show.animate(showFx, showFx.duration || baseDuration, function() {
234
                    $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
235
                    if ($.browser.msie && showFx.opacity)
236
                        $show[0].style.filter = '';
237
238
                    // callback
239
                    $(self.element).triggerHandler("show.ui-tabs", [self.ui(clicked, $show[0])]);
240
241
                });
242
            }
243
244
            // switch a tab
245
            function switchTab(clicked, $li, $hide, $show) {
246
                /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
247
                    $.ajaxHistory.update(clicked.hash);
248
                }*/
249
                $li.addClass(o.selectedClass)
250
                    .siblings().removeClass(o.selectedClass);
251
                hideTab(clicked, $hide, $show);
252
            }
253
254
            // attach tab event handler, unbind to avoid duplicates from former tabifying...
255
            this.$tabs.unbind(o.event).bind(o.event, function() {
256
257
                //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
258
                var $li = $(this).parents('li:eq(0)'),
259
                    $hide = self.$panels.filter(':visible'),
260
                    $show = $(this.hash);
261
262
                // If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
263
                // Check if click handler returns false last so that it is not executed for a disabled tab!
264
                if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
265
                    || $(self.element).triggerHandler("select.ui-tabs", [self.ui(this, $show[0])]) === false) {
266
                    this.blur();
267
                    return false;
268
                }
269
270
                self.options.selected = self.$tabs.index(this);
271
272
                // if tab may be closed
273
                if (o.unselect) {
274
                    if ($li.hasClass(o.selectedClass)) {
275
                        self.options.selected = null;
276
                        $li.removeClass(o.selectedClass);
277
                        self.$panels.stop();
278
                        hideTab(this, $hide);
279
                        this.blur();
280
                        return false;
281
                    } else if (!$hide.length) {
282
                        self.$panels.stop();
283
                        var a = this;
284
                        self.load(self.$tabs.index(this), function() {
285
                            $li.addClass(o.selectedClass).addClass(o.unselectClass);
286
                            showTab(a, $show);
287
                        });
288
                        this.blur();
289
                        return false;
290
                    }
291
                }
292
293
                if (o.cookie)
294
                    $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
295
296
                // stop possibly running animations
297
                self.$panels.stop();
298
299
                // show new tab
300
                if ($show.length) {
301
302
                    // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
303
                    /*if ($.browser.msie && o.bookmarkable) {
304
                        var showId = this.hash.replace('#', '');
305
                        $show.attr('id', '');
306
                        setTimeout(function() {
307
                            $show.attr('id', showId); // restore id
308
                        }, 0);
309
                    }*/
310
311
                    var a = this;
312
                    self.load(self.$tabs.index(this), function() {
313
                        switchTab(a, $li, $hide, $show);
314
                    });
315
316
                    // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
317
                    /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
318
                    var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
319
                    setTimeout(function() {
320
                        scrollTo(scrollX, scrollY);
321
                    }, 0);*/
322
323
                } else
324
                    throw 'jQuery UI Tabs: Mismatching fragment identifier.';
325
326
                // Prevent IE from keeping other link focussed when using the back button
327
                // and remove dotted border from clicked link. This is controlled in modern
328
                // browsers via CSS, also blur removes focus from address bar in Firefox
329
                // which can become a usability and annoying problem with tabsRotate.
330
                if ($.browser.msie)
331
                    this.blur();
332
333
                //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
334
                return false;
335
336
            });
337
338
        },
339
        add: function(url, label, index) {
340
            if (url && label) {
341
                index = index || this.$tabs.length; // append by default
342
343
                var o = this.options;
344
                var $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{label\}/, label));
345
                $li.data('destroy.ui-tabs', true);
346
347
                var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
348
349
                // try to find an existing element before creating a new one
350
                var $panel = $('#' + id);
351
                if (!$panel.length) {
352
                    $panel = $(o.panelTemplate).attr('id', id)
353
                        .addClass(o.panelClass).addClass(o.hideClass);
354
                    $panel.data('destroy.ui-tabs', true);
355
                }
356
                if (index >= this.$lis.length) {
357
                    $li.appendTo(this.element);
358
                    $panel.appendTo(this.element.parentNode);
359
                } else {
360
                    $li.insertBefore(this.$lis[index]);
361
                    $panel.insertBefore(this.$panels[index]);
362
                }
363
364
                this.tabify();
365
366
                if (this.$tabs.length == 1) {
367
                     $li.addClass(o.selectedClass);
368
                     $panel.removeClass(o.hideClass);
369
                     var href = $.data(this.$tabs[0], 'load.ui-tabs');
370
                     if (href)
371
                         this.load(index, href);
372
                }
373
374
                // callback
375
                $(this.element).triggerHandler("add.ui-tabs",
376
                    [this.ui(this.$tabs[index], this.$panels[index])]
377
                );
378
379
            } else
380
                throw 'jQuery UI Tabs: Not enough arguments to add tab.';
381
        },
382
        remove: function(index) {
383
            if (index && index.constructor == Number) {
384
                var o = this.options, $li = this.$lis.eq(index).remove(),
385
                    $panel = this.$panels.eq(index).remove();
386
387
                // If selected tab was removed focus tab to the right or
388
                // tab to the left if last tab was removed.
389
                if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
390
                    this.click(index + (index < this.$tabs.length ? 1 : -1));
391
                this.tabify();
392
393
                // callback
394
                $(this.element).triggerHandler("remove.ui-tabs",
395
                    [this.ui($li.find('a')[0], $panel[0])]
396
                );
397
398
            }
399
        },
400
        enable: function(index) {
401
            var self = this, o = this.options, $li = this.$lis.eq(index);
402
            $li.removeClass(o.disabledClass);
403
            if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
404
                $li.css('display', 'inline-block');
405
                setTimeout(function() {
406
                    $li.css('display', 'block');
407
                }, 0);
408
            }
409
410
            o.disabled = $.map(this.$lis.filter('.' + o.disabledClass),
411
                function(n, i) { return self.$lis.index(n); } );
412
413
            // callback
414
            $(this.element).triggerHandler("enable.ui-tabs",
415
                [this.ui(this.$tabs[index], this.$panels[index])]
416
            );
417
418
        },
419
        disable: function(index) {
420
            var self = this, o = this.options;
421
            this.$lis.eq(index).addClass(o.disabledClass);
422
423
            o.disabled = $.map(this.$lis.filter('.' + o.disabledClass),
424
                function(n, i) { return self.$lis.index(n); } );
425
426
            // callback
427
            $(this.element).triggerHandler("disable.ui-tabs",
428
                [this.ui(this.$tabs[index], this.$panels[index])]
429
            );
430
431
        },
432
        select: function(index) {
433
            if (typeof index == 'string')
434
                index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
435
            this.$tabs.eq(index).trigger(this.options.event);
436
        },
437
        load: function(index, callback) { // callback is for internal usage only
438
            var self = this, o = this.options,
439
                $a = this.$tabs.eq(index), a = $a[0];
440
441
            var url = $a.data('load.ui-tabs');
442
443
            // no remote - just finish with callback
444
            if (!url) {
445
                typeof callback == 'function' && callback();
446
                return;
447
            }
448
449
            // load remote from here on
450
            if (o.spinner) {
451
                var $span = $('span', a), label = $span.html();
452
                $span.html('<em>' + o.spinner + '</em>');
453
            }
454
            var finish = function() {
455
                self.$tabs.filter('.' + o.loadingClass).each(function() {
456
                    $(this).removeClass(o.loadingClass);
457
                    if (o.spinner)
458
                        $('span', this).html(label);
459
                });
460
                self.xhr = null;
461
            };
462
            var ajaxOptions = $.extend({}, o.ajaxOptions, {
463
                url: url,
464
                success: function(r, s) {
465
                    $(a.hash).html(r);
466
                    finish();
467
                    // This callback is required because the switch has to take
468
                    // place after loading has completed.
469
                    typeof callback == 'function' && callback();
470
471
                    if (o.cache)
472
                        $.removeData(a, 'load.ui-tabs'); // if loaded once do not load them again
473
474
                    // callback
475
                    $(self.element).triggerHandler("load.ui-tabs",
476
                        [self.ui(self.$tabs[index], self.$panels[index])]
477
                    );
478
479
                    o.ajaxOptions.success && o.ajaxOptions.success(r, s);
480
                }
481
            });
482
            if (this.xhr) {
483
                // terminate pending requests from other tabs and restore tab label
484
                this.xhr.abort();
485
                finish();
486
            }
487
            $a.addClass(o.loadingClass);
488
            setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
489
                self.xhr = $.ajax(ajaxOptions);
490
            }, 0);
491
492
        },
493
        url: function(index, url) {
494
            this.$tabs.eq(index).data('load.ui-tabs', url);
495
        },
496
        destroy: function() {
497
            var o = this.options;
498
            $(this.element).unbind('.ui-tabs')
499
                .removeClass(o.navClass).removeData('ui-tabs');
500
            this.$tabs.each(function() {
501
                var href = $.data(this, 'href.ui-tabs');
502
                if (href)
503
                    this.href = href;
504
                $(this).unbind('.ui-tabs')
505
                    .removeData('href.ui-tabs').removeData('load.ui-tabs');
506
            });
507
            this.$lis.add(this.$panels).each(function() {
508
                if ($.data(this, 'destroy.ui-tabs'))
509
                    $(this).remove();
510
                else
511
                    $(this).removeClass([o.selectedClass, o.unselectClass,
512
                        o.disabledClass, o.panelClass, o.hideClass].join(' '));
513
            });
514
        }
515
    });
516
517
})(jQuery);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-25 / +4 lines)
Lines 3-8 Link Here
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( suggestions_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( suggestions_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'calendar.inc' %]
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
[% INCLUDE 'datatables-strings.inc' %]
8
[% INCLUDE 'datatables-strings.inc' %]
8
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
Lines 15-21 Link Here
15
 });
16
 });
16
 //]]>
17
 //]]>
17
</script>
18
</script>
18
[% INCLUDE 'calendar.inc' %]
19
</head>
19
</head>
20
<body id="acq_histsearch" class="acq">
20
<body id="acq_histsearch" class="acq">
21
[% INCLUDE 'header.inc' %]
21
[% INCLUDE 'header.inc' %]
Lines 35-41 Link Here
35
		<ol>
35
		<ol>
36
		<li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
36
		<li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
37
		<li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
37
		<li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
38
		<li><label for="isbn">ISBN: </label> <input type="isbn" name="isbn" id="isbn" value="[% isbn %]" /></li>
38
        <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" /></li>
39
                [% IF (UNIMARC) %]
39
                [% IF (UNIMARC) %]
40
        <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
40
        <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
41
                [% END %]
41
                [% END %]
Lines 43-74 Link Here
43
		<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
43
		<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
44
        <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
44
        <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
45
		<li><label for="from">From: </label> 
45
		<li><label for="from">From: </label> 
46
			<input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" />
46
        <input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" class="datepickerfrom" />
47
			<img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarFrom" style="cursor: pointer;" alt="Show Calendar" />
48
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
47
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
49
		</li>
48
		</li>
50
		<li><label for="to">To: </label> 
49
		<li><label for="to">To: </label> 
51
			<input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" />
50
        <input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" class="datepickerto" />
52
			<img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="Show Calendar" />
53
			<script type="text/javascript">
54
				// return true if the date is blocked.
55
				function disable_from(date) {var limit = get_Calendar_limit(date,'to'  ); return (limit && limit < date);}  // true or false
56
				function disable_to  (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}  // true or false
57
				Calendar.setup({
58
					inputField : "from",
59
					ifFormat : "[% DHTMLcalendar_dateformat %]",
60
					button : "openCalendarFrom",
61
					disableFunc : disable_from,
62
					dateStatusFunc : disable_from
63
				});
64
				Calendar.setup({
65
					inputField : "to",
66
					ifFormat : "[% DHTMLcalendar_dateformat %]",
67
					button : "openCalendarTo",
68
					disableFunc : disable_to,
69
					dateStatusFunc : disable_to
70
   	             });
71
			</script>
72
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
51
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
73
		</li>
52
		</li>
74
		</ol>
53
		</ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt (-25 / +5 lines)
Lines 8-13 Link Here
8
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
8
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10
[% INCLUDE 'calendar.inc' %]
10
[% INCLUDE 'calendar.inc' %]
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
11
<script type="text/javascript">
12
<script type="text/javascript">
12
//<![CDATA[
13
//<![CDATA[
13
$(document).ready(function() {
14
$(document).ready(function() {
Lines 169-201 $(document).ready(function() { Link Here
169
[% END %]
170
[% END %]
170
<ol>
171
<ol>
171
    <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
172
    <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
172
    <li><label for="delay">Estimated Delivery date from: </label>
173
    <li><label for="from">Estimated delivery date from: </label>
173
        <input type="text" size="10" id="estimateddeliverydatefrom" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" />
174
        <input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" class="datepickerfrom" />
174
        <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarFrom" style="cursor: pointer;" alt="Show Calendar" />
175
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
175
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
176
    </li>
176
    </li>
177
    <li><label for="delay">To: </label>
177
    <li><label for="to">To: </label>
178
        <input type="text" size="10" id="estimateddeliverydateto" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" />
178
        <input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" class="datepickerto" />
179
        <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="Show Calendar" />
180
        <script type="text/javascript">
181
            // return true if the date is blocked.
182
            function disable_from(date) {var limit = get_Calendar_limit(date,'estimateddeliverydatefrom'); return (limit && limit < date);}
183
            function disable_to(date) {var limit = get_Calendar_limit(date,'estimateddeliverydateto'); return (limit && limit < date);}
184
            Calendar.setup({
185
                inputField : "estimateddeliverydatefrom",
186
                ifFormat : "[% DHTMLcalendar_dateformat %]",
187
                button : "openCalendarFrom",
188
                disableFunc : disable_from,
189
                dateStatusFunc : disable_from
190
            });
191
            Calendar.setup({
192
                inputField : "estimateddeliverydateto",
193
                ifFormat : "[% DHTMLcalendar_dateformat %]",
194
                button : "openCalendarTo",
195
                disableFunc : disable_to,
196
                dateStatusFunc : disable_to
197
             });
198
        </script>
199
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
179
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
200
    </li>
180
    </li>
201
181
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt (-10 / +1 lines)
Lines 119-134 Link Here
119
            <input type="text" size="20" id="freight" name="freight" />
119
            <input type="text" size="20" id="freight" name="freight" />
120
        </li> -->
120
        </li> -->
121
         <li><label for="datereceived">Shipment date: </label>
121
         <li><label for="datereceived">Shipment date: </label>
122
            <input type="text" id="datereceived" name="datereceived"  maxlength="10" size="10"  value="[% datereceived_today %]" />
122
            <input type="text" id="datereceived" name="datereceived"  maxlength="10" size="10"  value="[% datereceived_today %]" class="datepicker" />
123
            <img src="[% themelang %]/lib/calendar/cal.gif" id="datereceived_button" alt="Show Calendar" />
124
      <script language="JavaScript" type="text/javascript">
125
        Calendar.setup(
126
          {
127
            inputField : "datereceived",
128
            ifFormat : "[% DHTMLcalendar_dateformat %]",
129
            button : "datereceived_button"          }
130
        );
131
      </script>
132
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>	</li>
123
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>	</li>
133
		</ol>
124
		</ol>
134
    </fieldset>
125
    </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-49 / +8 lines)
Lines 1-7 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'calendar.inc' %]
3
[% INCLUDE 'calendar.inc' %]
4
5
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
4
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7
<script type="text/javascript">
6
<script type="text/javascript">
Lines 164-197 Link Here
164
    <ol>
163
    <ol>
165
164
166
    <li>
165
    <li>
167
    <label class="required" for="budget_period_startdate">Start date</label>
166
    <label class="required" for="from">Start date</label>
168
    <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate"   value="[% budget_period_startdate %]"  />
167
    <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate %]" class="datepickerfrom" />
169
    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
170
    <script type="text/javascript">
171
        Calendar.setup({
172
        inputField     :    "budget_period_startdate",
173
        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
174
        button         :    "openCalendarFrom",
175
        align          :    "Tl",
176
        singleClick    :    false
177
        });
178
    </script>
179
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
168
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
180
    </li>
169
    </li>
181
    <li>
170
    <li>
182
171
183
    <label class="required" for="budget_period_enddate">End date</label>
172
    <label class="required" for="to">End date</label>
184
    <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
173
    <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate %]" class="datepickerto" />
185
    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
186
187
    <script type="text/javascript">
188
        Calendar.setup({
189
        inputField     :    "budget_period_enddate",
190
        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
191
        button         :    "openCalendarTo",
192
        align          :    "Tl"
193
        });
194
    </script>
195
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
174
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
196
    </li>
175
    </li>
197
176
Lines 223-256 Link Here
223
    <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
202
    <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
224
    <ol>
203
    <ol>
225
    <li>
204
    <li>
226
    <label class="required" for="budget_period_startdate">Start date</label>
205
    <label class="required" for="from">Start date</label>
227
    <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate"   value="[% budget_period_startdate %]"  />
206
    <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate %]" class="datepickerfrom" />
228
    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
229
    <script type="text/javascript">
230
        Calendar.setup({
231
        inputField     :    "budget_period_startdate",
232
        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
233
        button         :    "openCalendarFrom",
234
        align          :    "Tl",
235
        singleClick    :    false
236
        });
237
    </script>
238
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
207
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
239
    </li>
208
    </li>
240
    <li>
209
    <li>
241
210
242
    <label class="required" for="budget_period_enddate">End date</label>
211
    <label class="required" for="to">End date</label>
243
    <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
212
    <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate %]" class="datepickerto" />
244
    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
245
246
    <script type="text/javascript">
247
        Calendar.setup({
248
        inputField     :    "budget_period_enddate",
249
        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
250
        button         :    "openCalendarTo",
251
        align          :    "Tl"
252
        });
253
    </script>
254
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
213
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
255
    </li>
214
    </li>
256
215
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt (-24 / +4 lines)
Lines 110-141 function Check(ff) { Link Here
110
                                <li><label for="contractdescription">Description</label> &nbsp;
110
                                <li><label for="contractdescription">Description</label> &nbsp;
111
                                        <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
111
                                        <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
112
                                </li>
112
                                </li>
113
                                <li><label for="contractstartdate" class="required">Start date *</label> &nbsp;
113
                                <li><label for="from" class="required">Start date *</label> &nbsp;
114
                                        <input type="text" name="contractstartdate" id="contractstartdate" value="[% contractstartdate %]" maxlength="10"  size="10"/>
114
                                        <input type="text" name="contractstartdate" id="from" value="[% contractstartdate %]" maxlength="10" size="10" class="datepickerfrom" />
115
                                        <img src="[% themelang %]/lib/calendar/cal.gif" id="contractstartdate_button" alt="Show Calendar" />
116
                                        <script language="JavaScript" type="text/javascript">
117
                                            Calendar.setup(
118
                                            {
119
                                            inputField : "contractstartdate",
120
                                            ifFormat : "[% DHTMLcalendar_dateformat %]",
121
                                            button : "contractstartdate_button"
122
                                            }
123
                                            );
124
                                        </script>
125
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
115
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
126
                                </li>
116
                                </li>
127
                                <li><label for="contractenddate" class="required">End date *</label> &nbsp;
117
                                <li><label for="to" class="required">End date *</label> &nbsp;
128
                                        <input type="text" name="contractenddate" id="contractenddate" value="[% contractenddate %]" maxlength="10"  size="10" />
118
                                        <input type="text" name="contractenddate" id="to" value="[% contractenddate %]" maxlength="10"  size="10" class="datepickerto" />
129
                                        <img src="[% themelang %]/lib/calendar/cal.gif" id="contractenddate_button" alt="Show Calendar" />
130
                                        <script language="JavaScript" type="text/javascript">
131
                                            Calendar.setup(
132
                                            {
133
                                            inputField : "contractenddate",
134
                                            ifFormat : "[% DHTMLcalendar_dateformat %]",
135
                                            button : "contractenddate_button"
136
                                            }
137
                                            );
138
                                        </script>
139
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
119
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
140
                                </li>
120
                                </li>
141
                            </ol>
121
                            </ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt (-1 lines)
Lines 1-7 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description %] by [% authcat %]</title>
2
<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description %] by [% authcat %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
4
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
6
<script type="text/javascript">
5
<script type="text/javascript">
7
//<![CDATA[
6
//<![CDATA[
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt (-11 / +3 lines)
Lines 4-9 Link Here
4
[% IF ( delete_confirm ) %][% IF ( totalgtzero ) %]Cannot delete: category [% categorycode |html %] in use[% ELSE %]Confirm deletion of category '[% categorycode |html %]'[% END %][% END %]
4
[% IF ( delete_confirm ) %][% IF ( totalgtzero ) %]Cannot delete: category [% categorycode |html %] in use[% ELSE %]Confirm deletion of category '[% categorycode |html %]'[% END %][% END %]
5
[% IF ( delete_confirmed ) %]Category deleted[% END %]</title>
5
[% IF ( delete_confirmed ) %]Category deleted[% END %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
9
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
9
<script type="text/javascript" id="js">$(document).ready(function() {
10
<script type="text/javascript" id="js">$(document).ready(function() {
Lines 12-19 Link Here
12
		widgets: ['zebra'],
13
		widgets: ['zebra'],
13
		headers: { 11: { sorter: false}}
14
		headers: { 11: { sorter: false}}
14
	}).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
15
	}).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
16
    $( "#enrolmentperioddate" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
15
}); </script>
17
}); </script>
16
[% INCLUDE 'calendar.inc' %]
17
<script type="text/javascript">
18
<script type="text/javascript">
18
//<![CDATA[
19
//<![CDATA[
19
	//
20
	//
Lines 133-148 Link Here
133
	<li><label for="enrolmentperiod" style="width:6em;">In months: </label>
134
	<li><label for="enrolmentperiod" style="width:6em;">In months: </label>
134
		<input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF ( enrolmentperiod ) %][% enrolmentperiod %][% END %]" /> months</li>
135
		<input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF ( enrolmentperiod ) %][% enrolmentperiod %][% END %]" /> months</li>
135
	<li><label for="enrolmentperioddate" style="width:6em;">Until date: </label>
136
	<li><label for="enrolmentperioddate" style="width:6em;">Until date: </label>
136
		<input type="text" name="enrolmentperioddate" id="enrolmentperioddate" value="[% enrolmentperioddate %]" /> <img src="[% themelang %]/lib/calendar/cal.gif" id="enrolmentperioddate_button" alt="Show Calendar" />
137
        <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" value="[% enrolmentperioddate %]" />
137
		<script type="text/javascript">
138
            //<![CDATA[
139
               Calendar.setup({
140
                    inputField : "enrolmentperioddate",
141
                    ifFormat : "[% DHTMLcalendar_dateformat %]",
142
                	button : "enrolmentperioddate_button"
143
            	});
144
           	//]]>
145
        </script>
146
		<div id="enrolmentmessage" class="hint" style="margin-left:0;">Cannot have "months" and "until date" at the same time</div>
138
		<div id="enrolmentmessage" class="hint" style="margin-left:0;">Cannot have "months" and "until date" at the same time</div>
147
	</li>
139
	</li>
148
	</ol>
140
	</ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-24 / +3 lines)
Lines 1-7 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Circulation and fine rules</title>
2
<title>Koha &rsaquo; Administration &rsaquo; Circulation and fine rules</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
5
<script type="text/javascript">
6
//<![CDATA[
6
//<![CDATA[
7
$(document).ready(function() {
7
$(document).ready(function() {
Lines 12-23 $(document).ready(function() { Link Here
12
});
12
});
13
//]]>
13
//]]>
14
</script>
14
</script>
15
<!-- Enable Calendar system -->
16
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
17
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
18
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
19
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
20
<!-- End Calendar system additions -->
21
</head>
15
</head>
22
<body id="admin_smart-rules" class="admin">
16
<body id="admin_smart-rules" class="admin">
23
[% INCLUDE 'header.inc' %]
17
[% INCLUDE 'header.inc' %]
Lines 161-183 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
161
                           <option value="0">Exactly on</option>
155
                           <option value="0">Exactly on</option>
162
                           <option value="1">After</option>
156
                           <option value="1">After</option>
163
                        </select>
157
                        </select>
164
                        <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" />
158
                        <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" class="datepicker" />
165
                        [% INCLUDE 'date-format.inc' %]
159
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
166
                        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;"/>
167
                        <script language="JavaScript" type="text/javascript">
168
                             function refocus(calendar) {
169
                                 document.getElementById('hardduedate').focus();
170
                                 calendar.hide();
171
                             };
172
                             Calendar.setup(
173
                             {
174
                             inputField : "hardduedate",
175
                             ifFormat : "%m/%d/%Y",
176
                             button : "CalendarDueDate",
177
                             onClose: refocus
178
                             }
179
                             );
180
                 </script>
181
                    </td>
160
                    </td>
182
                    <td><input name="fine" size="4" /></td>
161
                    <td><input name="fine" size="4" /></td>
183
                    <td><input name="chargeperiod" size="2" /></td>
162
                    <td><input name="chargeperiod" size="2" /></td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-64 / +7 lines)
Lines 2-7 Link Here
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Circulation [% IF ( borrowernumber ) %] &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' %] [% END %]</title>
3
<title>Koha &rsaquo; Circulation [% IF ( borrowernumber ) %] &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' %] [% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
5
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %]
6
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %]
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
7
<script type="text/javascript">
8
<script type="text/javascript">
Lines 140-145 var allcheckboxes = $(".checkboxed"); Link Here
140
     $("input.radio").click(function(){
141
     $("input.radio").click(function(){
141
        radioCheckBox($(this));
142
        radioCheckBox($(this));
142
     });
143
     });
144
    $("#newduedate").datepicker({ minDate: 1 }); // require that renewal date is after today
145
    $("#duedatespec").datepicker({
146
        onSelect: function(dateText, inst) { $("#barcode").focus(); }
147
    });
148
143
 });
149
 });
144
150
145
function validate1(date) {
151
function validate1(date) {
Lines 150-162 function validate1(date) { Link Here
150
        return false;
156
        return false;
151
     }
157
     }
152
};
158
};
153
function refocus(calendar) {
154
   document.getElementById('barcode').focus();
155
   calendar.hide();
156
};
157
//]]>
159
//]]>
158
</script>
160
</script>
159
[% INCLUDE 'calendar.inc' %]
160
</head>
161
</head>
161
<body id="circ_circulation" class="circ">
162
<body id="circ_circulation" class="circ">
162
163
Lines 488-522 No patron matched <span class="ex">[% message %]</span> Link Here
488
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
489
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
489
		[% IF ( duedatespec ) %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />[% ELSE %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
490
		[% IF ( duedatespec ) %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />[% ELSE %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
490
[% END %]
491
[% END %]
491
        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
492
             <script language="JavaScript" type="text/javascript">
493
			 //<![CDATA[
494
                   function validate1(date) {
495
                         var today = new Date();
496
                         if ( date < today ) {
497
                             return true;
498
                          } else {
499
                             return false;
500
                          }
501
                     };
502
                     function refocus(calendar) {
503
                        $('#barcode').focus();
504
                        calendar.hide();
505
                     };
506
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
507
                     Calendar.setup(
508
                          {
509
                             inputField : "duedatespec",
510
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
511
                             button : "CalendarDueDate",
512
//                           disableFunc : validate1,
513
//                           dateStatusFunc : validate1,
514
                             onClose : refocus
515
                           }
516
                        );
517
				//]]>
518
                 </script>
519
520
          <label for="stickyduedate"> Remember for session:</label>
492
          <label for="stickyduedate"> Remember for session:</label>
521
[% IF ( stickyduedate ) %]
493
[% IF ( stickyduedate ) %]
522
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
494
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
Lines 1003-1039 No patron matched <span class="ex">[% message %]</span> Link Here
1003
975
1004
            [% IF AutoResumeSuspendedHolds %]
976
            [% IF AutoResumeSuspendedHolds %]
1005
            <label for="suspend_until">until</label>
977
            <label for="suspend_until">until</label>
1006
            <input type="text" size="10" id="suspend_until" name="suspend_until"/>
978
            <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
1007
            <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar"  border="0" id="CalendarSuspendUntil" style="cursor: pointer;" />
1008
            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
979
            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
1009
1010
             <script language="JavaScript" type="text/javascript">
1011
			 //<![CDATA[
1012
                   function validate1(date) {
1013
                         var today = new Date();
1014
                         if ( date < today ) {
1015
                             return true;
1016
                          } else {
1017
                             return false;
1018
                          }
1019
                     };
1020
                     function refocus(calendar) {
1021
                        $('#barcode').focus();
1022
                        calendar.hide();
1023
                     };
1024
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
1025
                     Calendar.setup(
1026
                          {
1027
                             inputField : "suspend_until",
1028
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
1029
                             button : "CalendarSuspendUntil",
1030
//                           disableFunc : validate1,
1031
//                           dateStatusFunc : validate1,
1032
                             onClose : refocus
1033
                           }
1034
                        );
1035
				//]]>
1036
             </script>
1037
             [% END %]
980
             [% END %]
1038
        </form>
981
        </form>
1039
    </fieldset>
982
    </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-28 / +8 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
2
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
<script type="text/javascript">
5
<script type="text/javascript">
5
 //<![CDATA[
6
 //<![CDATA[
6
     function clone_parent(node) {
7
     function clone_parent(node) {
Lines 55-67 Link Here
55
                .css("font-size","90%").css("width","13em");
56
                .css("font-size","90%").css("width","13em");
56
            };
57
            };
57
        });
58
        });
58
	}
59
    }
59
//]]>
60
//]]>
60
</script>
61
</script>
61
<style type="text/css">
62
<style type="text/css">
62
    .sql {display:none;}
63
    .sql {display:none;}
63
</style>
64
</style>
64
[% INCLUDE 'calendar.inc' %]
65
</head>
65
</head>
66
<body id="circ_overdue" class="circ">
66
<body id="circ_overdue" class="circ">
67
[% INCLUDE 'header.inc' %]
67
[% INCLUDE 'header.inc' %]
Lines 131-162 overdue as of [% todaysdate %][% IF ( isfiltered ) %] <span style="font-size:70% Link Here
131
<h4>Filter on:</h4>
131
<h4>Filter on:</h4>
132
	<fieldset><legend>Date due:</legend>
132
	<fieldset><legend>Date due:</legend>
133
	<ol>
133
	<ol>
134
    <li><label for="dateduefrom">From:</label>
134
    <li><label for="from">From:</label>
135
	<input type="text" id="dateduefrom" name="dateduefrom" size="10" value="[% dateduefrom %]" />
135
    <input type="text" id="from" name="dateduefrom" size="10" value="[% dateduefrom %]" class="datepickerfrom" />
136
    <img src="[% themelang %]/lib/calendar/cal.gif" id="dateduefrom_button" alt="Show calendar" />
137
	<script language="JavaScript" type="text/javascript">
138
	    Calendar.setup(
139
	    {
140
		inputField : "dateduefrom",
141
		ifFormat : "[% DHTMLcalendar_dateformat %]",
142
		button : "dateduefrom_button"
143
	    }
144
	    );
145
	</script>
146
	</li>
136
	</li>
147
	<li>
137
	<li>
148
	<label for="datedueto">To:</label>
138
    <label for="to">To:</label>
149
	<input type="text" id="datedueto" name="datedueto" size="10" value="[% datedueto %]" />
139
    <input type="text" id="to" name="datedueto" size="10" value="[% datedueto %]" class="datepickerto" />
150
    <img src="[% themelang %]/lib/calendar/cal.gif" id="datedueto_button" alt="Show calendar" />
151
	<script language="JavaScript" type="text/javascript">
152
	    Calendar.setup(
153
	    {
154
		inputField : "datedueto",
155
		ifFormat : "[% DHTMLcalendar_dateformat %]",
156
		button : "datedueto_button"
157
	    }
158
	    );
159
	</script>
160
    </li>
140
    </li>
161
    </ol></fieldset>
141
    </ol></fieldset>
162
    <ol>
142
    <ol>
Lines 224-230 overdue as of [% todaysdate %][% IF ( isfiltered ) %] <span style="font-size:70% Link Here
224
      </select>
204
      </select>
225
    </li>
205
    </li>
226
206
227
    <li><label for="order">Sort By:</label> <select name="order" id="order">
207
    <li><label for="order">Sort by:</label> <select name="order" id="order">
228
[% FOREACH ORDER_LOO IN ORDER_LOOP %]
208
[% FOREACH ORDER_LOO IN ORDER_LOOP %]
229
    [% IF ( ORDER_LOO.selected ) %]
209
    [% IF ( ORDER_LOO.selected ) %]
230
    <option value="[% ORDER_LOO.ordervalue %]" selected="selected">
210
    <option value="[% ORDER_LOO.ordervalue %]" selected="selected">
Lines 259-265 overdue as of [% todaysdate %][% IF ( isfiltered ) %] <span style="font-size:70% Link Here
259
</li>
239
</li>
260
</ol>
240
</ol>
261
   <fieldset class="action">
241
   <fieldset class="action">
262
      <input type="submit" value="Apply Filter" class="submit" />
242
      <input type="submit" value="Apply filter" class="submit" />
263
      <input type="hidden" name="op" value="apply filter" />
243
      <input type="hidden" name="op" value="apply filter" />
264
   </fieldset>
244
   </fieldset>
265
   </fieldset>
245
   </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-64 / +6 lines)
Lines 1-12 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
2
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<!-- Additions to enable Calendar system -->
4
[% INCLUDE 'calendar.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
6
<!-- End of additions --><!-- Additions to enable Calendar system -->
7
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
9
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
10
<!-- Plugin datatables -->
5
<!-- Plugin datatables -->
11
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
12
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
Lines 150-215 $(document).ready(function() { Link Here
150
<label for="from">
145
<label for="from">
151
    Start date:
146
    Start date:
152
</label>
147
</label>
153
<input type="text" size="10" id="from" name="from" value="[% from %]" />
148
<input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
154
<img src="[% themelang %]/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
149
</li>
155
<script language="JavaScript" type="text/javascript">
156
function validate1(date) {
157
    var day = date.getDate();
158
    var month = date.getMonth() + 1;
159
    var year = date.getFullYear();
160
    var weekDay = date.getDay();
161
    var dayMonth = month + '-' + day;
162
    var dateString = year + '-' + month + '-' + day;
163
    var dateTo = document.getElementById('to').value.split("-");
164
    var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
165
    if (date > limitDate) {
166
            return true;
167
    } else {
168
            return false;
169
    }
170
}
171
Calendar.setup(
172
        {
173
        inputField : "from",
174
        ifFormat : "[% DHTMLcalendar_dateformat %]",
175
        button : "openCalendarFrom",
176
        disableFunc : validate1,
177
        dateStatusFunc : validate1
178
        }
179
);
180
</script></li>
181
<li><label for="to">
150
<li><label for="to">
182
    End date:
151
    End date:
183
</label>
152
</label>
184
<input size="10" id="to" name="to" value="[% to %]" type="text" />
153
<input type="text" size="10" id="to" name="to" value="[% to %]" class="datepickerto" />
185
<img src="[% themelang %]/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
154
</li>
186
<script type="text/javascript">
187
        function validate2(date) {
188
            var day = date.getDate();
189
            var month = date.getMonth() + 1;
190
            var year = date.getFullYear();
191
            var weekDay = date.getDay();
192
            var dayMonth = month + '-' + day;
193
            var dateString = year + '-' + month + '-' + day;
194
            var dateFrom = document.getElementById('from').value.split("-");
195
            var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
196
            if (limitDate > date) {
197
                    return true;
198
            } else {
199
                    return false;
200
            }
201
        }
202
203
        Calendar.setup(
204
                {
205
                    inputField : "to",
206
                    ifFormat : "[% DHTMLcalendar_dateformat %]",
207
                    button : "openCalendarTo",
208
                    disableFunc : validate2,
209
                    dateStatusFunc : validate2
210
                }
211
        );
212
</script></li>
213
</ol>
155
</ol>
214
<p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
156
<p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
215
<fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
157
<fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
Lines 219-222 Calendar.setup( Link Here
219
</div>
161
</div>
220
</div>
162
</div>
221
</div>
163
</div>
222
[% INCLUDE 'intranet-bottom.inc' %]
164
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-66 / +7 lines)
Lines 1-13 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
2
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<!-- Additions to enable Calendar system -->
4
[% INCLUDE 'calendar.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
6
<!-- End of additions --><!-- Additions to enable Calendar system -->
7
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
9
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
10
<!-- End of additions -->
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12
<script type="text/javascript">
6
<script type="text/javascript">
13
//<![CDATA[
7
//<![CDATA[
Lines 30-36 $.tablesorter.addParser({ Link Here
30
		$("#holdst:has(tbody tr)").tablesorter({    // only add sort if the table has a body and rows
24
		$("#holdst:has(tbody tr)").tablesorter({    // only add sort if the table has a body and rows
31
			sortList: [[0,1]],
25
			sortList: [[0,1]],
32
			headers: { 1: { sorter: 'articles' }}
26
			headers: { 1: { sorter: 'articles' }}
33
		}); 
27
        });
34
	 });
28
	 });
35
//]]>
29
//]]>
36
</script>
30
</script>
Lines 117-182 $.tablesorter.addParser({ Link Here
117
<li><label for="from">
111
<li><label for="from">
118
    Start date:
112
    Start date:
119
</label>
113
</label>
120
<input type="text" size="10" id="from" name="from" value="[% from %]" />
114
<input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
121
<img src="[% themelang %]/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
115
</li>
122
<script language="JavaScript" type="text/javascript">
116
<li><label for="to">
123
function validate1(date) {
124
    var day = date.getDate();
125
    var month = date.getMonth() + 1;
126
    var year = date.getFullYear();
127
    var weekDay = date.getDay();
128
    var dayMonth = month + '-' + day;
129
    var dateString = year + '-' + month + '-' + day;
130
    var dateTo = document.getElementById('to').value.split("-");
131
    var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
132
    if (date > limitDate) {
133
            return true;
134
    } else {
135
            return false;
136
    }
137
}
138
Calendar.setup(
139
        {
140
        inputField : "from",
141
        ifFormat : "[% DHTMLcalendar_dateformat %]",
142
        button : "openCalendarFrom",
143
        disableFunc : validate1,
144
        dateStatusFunc : validate1
145
        }
146
);
147
</script></li>
148
<li><label for="to" >
149
    End date:
117
    End date:
150
</label>
118
</label>
151
<input size="10" id="to" name="to" value="[% to %]" type="text" />
119
<input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
152
<img src="[% themelang %]/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
120
</li></ol>
153
<script type="text/javascript">
154
        function validate2(date) {
155
            var day = date.getDate();
156
            var month = date.getMonth() + 1;
157
            var year = date.getFullYear();
158
            var weekDay = date.getDay();
159
            var dayMonth = month + '-' + day;
160
            var dateString = year + '-' + month + '-' + day;
161
            var dateFrom = document.getElementById('from').value.split("-");
162
            var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
163
            if (limitDate > date) {
164
                    return true;
165
            } else {
166
                    return false;
167
            }
168
        }
169
170
        Calendar.setup(
171
                {
172
                    inputField : "to",
173
                    ifFormat : "[% DHTMLcalendar_dateformat %]",
174
                    button : "openCalendarTo",
175
                    disableFunc : validate2,
176
                    dateStatusFunc : validate2
177
                }
178
        );
179
</script></li></ol>
180
(inclusive)
121
(inclusive)
181
122
182
<fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
123
<fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt (-24 / +4 lines)
Lines 90-122 to add to Batch [% batch_id %] Link Here
90
<fieldset class="rows">
90
<fieldset class="rows">
91
<ol>
91
<ol>
92
	<li>
92
	<li>
93
		<label for="datefrom">Added on or after date</label>
93
    <label for="from">Added on or after date</label>
94
	     <input type="text" size="10" id="datefrom" name="datefrom" value="" />
94
        <input type="text" size="10" id="from" name="datefrom" class="datepickerfrom" value="" />
95
  <img src="[% themelang %]/lib/calendar/cal.gif" border="0" id="openCalendarFrom" alt="Show Calendar" />
96
<script type="text/javascript">
97
    Calendar.setup({
98
        inputField     :    "datefrom",
99
      ifFormat : "[% DHTMLcalendar_dateformat %]",
100
        button         :    "openCalendarFrom",
101
        align          :    "Tl",
102
        singleClick    :    false
103
    });
104
</script>
105
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
95
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
106
</li>
96
</li>
107
<li>
97
<li>
108
		<label for="dateto">Added on or before date</label>
98
    <label for="to">Added on or before date</label>
109
  <input type="text" size="10" id="dateto" name="dateto" value="" />
99
        <input type="text" size="10" id="to" name="dateto" class="datepickerto" value="" />
110
  <img src="[% themelang %]/lib/calendar/cal.gif" border="0" id="openCalendarTo" alt="Show Calendar" />
111
112
<script type="text/javascript">
113
    Calendar.setup({
114
        inputField     :    "dateto",
115
      ifFormat : "[% DHTMLcalendar_dateformat %]",
116
        button         :    "openCalendarTo",
117
        align          :    "Tl"
118
    });
119
</script>
120
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
100
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
121
</li></ol>
101
</li></ol>
122
</fieldset>
102
</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-53 / +14 lines)
Lines 32-38 Link Here
32
                update_category_code( category_code );
32
                update_category_code( category_code );
33
            }
33
            }
34
        [% END %]
34
        [% END %]
35
35
        $("#dateofbirth").datepicker({ maxDate: "-1D" });
36
    });
36
    });
37
37
38
    function clear_entry(node) {
38
    function clear_entry(node) {
Lines 295-310 Link Here
295
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
295
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
296
[% END %]
296
[% END %]
297
297
298
                <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofbirth_button" alt="Show Calendar" />
299
        <script language="JavaScript" type="text/javascript">
300
            Calendar.setup(
301
            {
302
                inputField : "dateofbirth",
303
                ifFormat : "[% DHTMLcalendar_dateformat %]",
304
                button : "dateofbirth_button"
305
            }
306
            );
307
        </script>
308
        [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
298
        [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
309
        [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
299
        [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
310
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
300
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
Lines 1096-1121 Link Here
1096
        [% UNLESS nodateenrolled %]
1086
        [% UNLESS nodateenrolled %]
1097
		<li>
1087
		<li>
1098
			[% IF ( mandatorydateenrolled ) %]
1088
			[% IF ( mandatorydateenrolled ) %]
1099
			<label for="dateenrolled" class="required">
1089
            <label for="from" class="required">
1100
			[% ELSE %]
1090
			[% ELSE %]
1101
			<label for="dateenrolled">
1091
            <label for="from">
1102
			[% END %]
1092
			[% END %]
1103
			Registration date: </label>
1093
			Registration date: </label>
1104
			[% IF ( metric ) %]
1094
			[% IF ( metric ) %]
1105
				<input type="text" id="dateenrolled" name="dateenrolled"  maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" />
1095
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
1106
			[% ELSE %]
1096
			[% ELSE %]
1107
				<input type="text" id="dateenrolled" name="dateenrolled"  maxlength="10" size="10" value="[% dateenrolled %]" />
1097
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
1108
			[% END %]
1098
			[% END %]
1109
            <img src="[% themelang %]/lib/calendar/cal.gif" id="dateenrolled_button" alt="Show Calendar" />
1110
      <script language="JavaScript" type="text/javascript">
1111
        Calendar.setup(
1112
          {
1113
            inputField : "dateenrolled",
1114
            ifFormat : "[% DHTMLcalendar_dateformat %]",
1115
            button : "dateenrolled_button"
1116
          }
1117
        );
1118
      </script>
1119
		[% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
1099
		[% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
1120
		[% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
1100
		[% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
1121
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1101
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
Lines 1124-1157 Link Here
1124
        [% UNLESS nodateexpiry %]
1104
        [% UNLESS nodateexpiry %]
1125
		<li>
1105
		<li>
1126
			[% IF ( mandatorydateexpiry ) %]
1106
			[% IF ( mandatorydateexpiry ) %]
1127
			<label for="dateexpiry" class="required">
1107
            <label for="to" class="required">
1128
			[% ELSE %]
1108
			[% ELSE %]
1129
			<label for="dateexpiry">
1109
            <label for="to">
1130
			[% END %]
1110
			[% END %]
1131
			Expiry date (leave blank for auto calc) </label>
1111
			Expiry date (leave blank for auto calc) </label>
1132
			[% IF ( metric ) %]
1112
			[% IF ( metric ) %]
1133
				[% UNLESS ( opadd ) %]
1113
				[% UNLESS ( opadd ) %]
1134
					<input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" />
1114
                    <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" class="datepickerto" />
1135
				[% ELSE %]
1115
				[% ELSE %]
1136
					<input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" />
1116
                    <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
1137
				[% END %]
1117
				[% END %]
1138
			[% ELSE %]
1118
			[% ELSE %]
1139
				[% UNLESS ( opadd ) %]
1119
				[% UNLESS ( opadd ) %]
1140
				<input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" value="[% dateexpiry %]" />
1120
                <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" value="[% dateexpiry %]" class="datepickerto" />
1141
				[% ELSE %]
1121
				[% ELSE %]
1142
				<input type="text" id="dateexpiry" name="dateexpiry" maxlength="10"  size="10" />
1122
                <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" class="datepickerto" />
1143
				[% END %]
1123
				[% END %]
1144
			[% END %]
1124
			[% END %]
1145
            <img src="[% themelang %]/lib/calendar/cal.gif" id="dateexpiry_button" alt="Show Calendar" />
1146
      <script language="JavaScript" type="text/javascript">
1147
        Calendar.setup(
1148
          {
1149
            inputField : "dateexpiry",
1150
            ifFormat : "[% DHTMLcalendar_dateformat %]",
1151
            button : "dateexpiry_button"
1152
          }
1153
        );
1154
      </script>
1155
		[% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
1125
		[% IF ( mandatorydateexpiry ) %]<span class="required">Required</span>[% END %]
1156
		[% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
1126
		[% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
1157
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1127
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
Lines 1347-1366 Link Here
1347
1317
1348
                <span id="debarreduntil"><label for="datedebarred" class="inline">Until:</label>
1318
                <span id="debarreduntil"><label for="datedebarred" class="inline">Until:</label>
1349
                                [% IF opduplicate %]
1319
                                [% IF opduplicate %]
1350
                                    <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" />
1320
                                    <input type="text" name="datedebarred" id="datedebarred" class="debarred datepicker" value="[% datedebarred %]" onclick="this.value=''" />
1351
                                [% ELSE %]
1321
                                [% ELSE %]
1352
                                    <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" />
1322
                                    <input type="text" name="datedebarred" id="datedebarred" class="debarred datepicker" value="[% datedebarred %]" />
1353
                                [% END %]
1323
                                [% END %]
1354
                                <img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" />
1324
                <span class="hint">(optional)</span> </span>
1355
                                 <script language="JavaScript" type="text/javascript">
1356
                                    Calendar.setup(
1357
                                    {
1358
                                        inputField : "datedebarred",
1359
                                        ifFormat : "[% DHTMLcalendar_dateformat %]",
1360
                                       button : "debarred_button"
1361
                                    }
1362
                                    );
1363
                                </script> <span class="hint">(optional)</span> </span>
1364
                </li>
1325
                </li>
1365
                <li>
1326
                <li>
1366
		        <label for="debarredcomment" class="radio">Comment:</label>
1327
		        <label for="debarredcomment" class="radio">Comment:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-29 / +2 lines)
Lines 83-88 $(document).ready(function() { Link Here
83
           });
83
           });
84
		}
84
		}
85
	});
85
	});
86
    $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
87
    $("#newduedate").datepicker({ minDate: 1 }); // require that renewal date is after today
86
 });
88
 });
87
function uncheck_sibling(me){
89
function uncheck_sibling(me){
88
nodename=me.getAttribute("name");
90
nodename=me.getAttribute("name");
Lines 656-691 function validate1(date) { Link Here
656
            [% IF AutoResumeSuspendedHolds %]
658
            [% IF AutoResumeSuspendedHolds %]
657
            <label for="suspend_until">until</label>
659
            <label for="suspend_until">until</label>
658
            <input type="text" size="10" id="suspend_until" name="suspend_until"/>
660
            <input type="text" size="10" id="suspend_until" name="suspend_until"/>
659
            <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarSuspendUntil" style="cursor: pointer;" />
660
            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
661
            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
661
662
             <script language="JavaScript" type="text/javascript">
663
			 //<![CDATA[
664
                   function validate1(date) {
665
                         var today = new Date();
666
                         if ( date < today ) {
667
                             return true;
668
                          } else {
669
                             return false;
670
                          }
671
                     };
672
                     function refocus(calendar) {
673
                        $('#barcode').focus();
674
                        calendar.hide();
675
                     };
676
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
677
                     Calendar.setup(
678
                          {
679
                             inputField : "suspend_until",
680
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
681
                             button : "CalendarSuspendUntil",
682
//                           disableFunc : validate1,
683
//                           dateStatusFunc : validate1,
684
                             onClose : refocus
685
                           }
686
                        );
687
				//]]>
688
             </script>
689
            [% END %]
662
            [% END %]
690
        </form>
663
        </form>
691
    </fieldset>
664
    </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt (-120 / +33 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions statistics[% END %]</title>
2
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions statistics[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
        // http://jqueryui.com/demos/datepicker/#date-range
9
        var dates = $( "#from, #to" ).datepicker({
10
            changeMonth: true,
11
            numberOfMonths: 1,
12
            onSelect: function( selectedDate ) {
13
                var option = this.id == "from" ? "minDate" : "maxDate",
14
                    instance = $( this ).data( "datepicker" );
15
                    date = $.datepicker.parseDate(
16
                        instance.settings.dateFormat ||
17
                        $.datepicker._defaults.dateFormat,
18
                        selectedDate, instance.settings );
19
                dates.not( this ).datepicker( "option", option, date );
20
            }
21
        });
22
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
23
            changeMonth: true,
24
            numberOfMonths: 1,
25
            onSelect: function( selectedDate ) {
26
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
27
                    instance = $( this ).data( "datepicker" );
28
                    date = $.datepicker.parseDate(
29
                        instance.settings.dateFormat ||
30
                        $.datepicker._defaults.dateFormat,
31
                        selectedDate, instance.settings );
32
                datesRO.not( this ).datepicker( "option", option, date );
33
            }
34
        });
35
        });
36
//]]>
37
</script>
5
</head>
38
</head>
6
<body id="rep_acquisitions_stats" class="rep">
39
<body id="rep_acquisitions_stats" class="rep">
7
[% INCLUDE 'header.inc' %]
40
[% INCLUDE 'header.inc' %]
Lines 79-146 Link Here
79
				<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
112
				<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
80
				<td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
113
				<td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
81
				<td> From <input type="text" size="10" id="from" name="Filter" value="" />
114
				<td> From <input type="text" size="10" id="from" name="Filter" value="" />
82
                            <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
83
									<script type="text/javascript">
84
									//<![CDATA[
85
									function validate1(date) {
86
										var day = date.getDate();
87
										var month = date.getMonth() + 1;
88
										var year = date.getFullYear();
89
										var weekDay = date.getDay();
90
										var dayMonth = month + '-' + day;
91
										var dateString = year + '-' + month + '-' + day;
92
										var dateTo = document.getElementById('to').value.split("-");
93
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
94
										if (date > limitDate) {
95
											return true;
96
										} else {
97
											return false;
98
										}
99
									}
100
101
									Calendar.setup(
102
										{
103
											inputField : "from",
104
											ifFormat : "[% DHTMLcalendar_dateformat %]",
105
											button : "openCalendarFrom",
106
											disableFunc : validate1,
107
											dateStatusFunc : validate1
108
										}
109
									);
110
									//]]>
111
								</script>
112
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
115
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
113
					To <input size="10" id="to" name="Filter" type="text" value="" />
116
					To <input size="10" id="to" name="Filter" type="text" value="" />
114
						<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
115
							<script type="text/javascript">
116
							//<![CDATA[
117
								function validate2(date) {
118
									var day = date.getDate();
119
									var month = date.getMonth() + 1;
120
									var year = date.getFullYear();
121
									var weekDay = date.getDay();
122
									var dayMonth = month + '-' + day;
123
									var dateString = year + '-' + month + '-' + day;
124
									var dateFrom = document.getElementById('from').value.split("-");
125
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
126
									if (limitDate > date) {
127
										return true;
128
									} else {
129
										return false;
130
									}
131
								}
132
133
								Calendar.setup(
134
									{
135
										inputField : "to",
136
										ifFormat : "[% DHTMLcalendar_dateformat %]",
137
										button : "openCalendarTo",
138
										disableFunc : validate2,
139
										dateStatusFunc : validate2
140
									}
141
								);
142
							//]]>
143
							</script>
144
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
117
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
145
				</td>
118
				</td>
146
			</tr>
119
			</tr>
Lines 161-228 Link Here
161
				<td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
134
				<td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
162
				<td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
135
				<td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
163
				<td> From <input type="text" size="10" id="fromRO" name="Filter" value="" />
136
				<td> From <input type="text" size="10" id="fromRO" name="Filter" value="" />
164
							<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" />
165
									<script type="text/javascript">
166
									//<![CDATA[
167
									function validate1(date) {
168
										var day = date.getDate();
169
										var month = date.getMonth() + 1;
170
										var year = date.getFullYear();
171
										var weekDay = date.getDay();
172
										var dayMonth = month + '-' + day;
173
										var dateString = year + '-' + month + '-' + day;
174
										var dateTo = document.getElementById('toRO').value.split("-");
175
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
176
										if (date > limitDate) {
177
											return true;
178
										} else {
179
											return false;
180
										}
181
									}
182
183
									Calendar.setup(
184
										{
185
											inputField : "fromRO",
186
											ifFormat : "[% DHTMLcalendar_dateformat %]",
187
											button : "openCalendarFromRO",
188
											disableFunc : validate1,
189
											dateStatusFunc : validate1
190
										}
191
									);
192
									//]]>
193
									</script>
194
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
137
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
195
					To <input type="text" size="10" id="toRO" name="Filter" value="" />
138
					To <input type="text" size="10" id="toRO" name="Filter" value="" />
196
						<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" />
197
								<script type="text/javascript">
198
								//<![CDATA[
199
								function validate2(date) {
200
									var day = date.getDate();
201
									var month = date.getMonth() + 1;
202
									var year = date.getFullYear();
203
									var weekDay = date.getDay();
204
									var dayMonth = month + '-' + day;
205
									var dateString = year + '-' + month + '-' + day;
206
									var dateFrom = document.getElementById('fromRO').value.split("-");
207
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
208
									if (limitDate > date) {
209
										return true;
210
									} else {
211
										return false;
212
									}
213
								}
214
215
								Calendar.setup(
216
									{
217
										inputField : "toRO",
218
										ifFormat : "[% DHTMLcalendar_dateformat %]",
219
										button : "openCalendarToRO",
220
										disableFunc : validate2,
221
										dateStatusFunc : validate2
222
									}
223
								);
224
								//]]>
225
								</script>
226
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
139
				<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
227
				</td>
140
				</td>
228
			</tr>
141
			</tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt (-112 / +35 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Reports &rsaquo; Patrons with the most checkouts</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Patrons with the most checkouts</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
        // http://jqueryui.com/demos/datepicker/#date-range
9
        var dates = $( "#from, #to" ).datepicker({
10
            changeMonth: true,
11
            numberOfMonths: 1,
12
            onSelect: function( selectedDate ) {
13
                var option = this.id == "from" ? "minDate" : "maxDate",
14
                    instance = $( this ).data( "datepicker" );
15
                    date = $.datepicker.parseDate(
16
                        instance.settings.dateFormat ||
17
                        $.datepicker._defaults.dateFormat,
18
                        selectedDate, instance.settings );
19
                dates.not( this ).datepicker( "option", option, date );
20
            }
21
        });
22
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
23
            changeMonth: true,
24
            numberOfMonths: 1,
25
            onSelect: function( selectedDate ) {
26
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
27
                    instance = $( this ).data( "datepicker" );
28
                    date = $.datepicker.parseDate(
29
                        instance.settings.dateFormat ||
30
                        $.datepicker._defaults.dateFormat,
31
                        selectedDate, instance.settings );
32
                datesRO.not( this ).datepicker( "option", option, date );
33
            }
34
        });
35
        });
36
//]]>
37
</script>
5
</head>
38
</head>
6
<body id="rep_bor_issues_top" class="rep">
39
<body id="rep_bor_issues_top" class="rep">
7
[% INCLUDE 'header.inc' %]
40
[% INCLUDE 'header.inc' %]
Lines 68-188 function Dopop(link) { Link Here
68
	<form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
101
	<form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
69
	<fieldset class="rows">
102
	<fieldset class="rows">
70
	<ol><li><label for="from">Checkout date from:</label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
103
	<ol><li><label for="from">Checkout date from:</label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
71
							<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
72
								<script language="JavaScript" type="text/javascript">
73
									function validate1(date) {
74
										var day = date.getDate();
75
										var month = date.getMonth() + 1;
76
										var year = date.getFullYear();
77
										var weekDay = date.getDay();
78
										var dayMonth = month + '-' + day;
79
										var dateString = year + '-' + month + '-' + day;
80
										var dateTo = document.getElementById('to').value.split("-");
81
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
82
										if (date > limitDate) {
83
											return true;
84
										} else {
85
											return false;
86
										}
87
									}
88
					
89
									Calendar.setup(
90
										{
91
											inputField : "from",
92
											ifFormat : "[% DHTMLcalendar_dateformat %]",
93
											button : "openCalendarFrom",
94
											disableFunc : validate1,
95
											dateStatusFunc : validate1
96
										}
97
									);
98
								</script>
99
					<label class="inline" for="to">To: </label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
104
					<label class="inline" for="to">To: </label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
100
						<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
105
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
101
							<script type="text/javascript">
102
								function validate2(date) {
103
									var day = date.getDate();
104
									var month = date.getMonth() + 1;
105
									var year = date.getFullYear();
106
									var weekDay = date.getDay();
107
									var dayMonth = month + '-' + day;
108
									var dateString = year + '-' + month + '-' + day;
109
									var dateFrom = document.getElementById('from').value.split("-");
110
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
111
									if (limitDate > date) {
112
										return true;
113
									} else {
114
										return false;
115
									}
116
								}
117
		
118
								Calendar.setup(
119
									{
120
										inputField : "to",
121
										ifFormat : "[% DHTMLcalendar_dateformat %]",
122
										button : "openCalendarTo",
123
										disableFunc : validate2,
124
										dateStatusFunc : validate2
125
									}
126
								);
127
							</script><span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
128
				<li> <label for="fromRO">Check-in date from:</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
106
				<li> <label for="fromRO">Check-in date from:</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
129
							<img src="[% themelang %]/lib/calendar/cal.gif" border="0" id="openCalendarFromRO" style="cursor: pointer;" alt="Show Calendar" />
130
								<script language="JavaScript" type="text/javascript">
131
									function validate1(date) {
132
										var day = date.getDate();
133
										var month = date.getMonth() + 1;
134
										var year = date.getFullYear();
135
										var weekDay = date.getDay();
136
										var dayMonth = month + '-' + day;
137
										var dateString = year + '-' + month + '-' + day;
138
										var dateTo = document.getElementById('toRO').value.split("-");
139
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
140
										if (date > limitDate) {
141
											return true;
142
										} else {
143
											return false;
144
										}
145
									}
146
					
147
									Calendar.setup(
148
										{
149
											inputField : "fromRO",
150
											ifFormat : "[% DHTMLcalendar_dateformat %]",
151
											button : "openCalendarFromRO",
152
											disableFunc : validate1,
153
											dateStatusFunc : validate1
154
										}
155
									);
156
								</script>
157
					<label class="inline" for="toRO">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
107
					<label class="inline" for="toRO">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
158
						<img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" alt="Show Calendar" border="0" />
108
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
159
							<script type="text/javascript">
160
								function validate2(date) {
161
									var day = date.getDate();
162
									var month = date.getMonth() + 1;
163
									var year = date.getFullYear();
164
									var weekDay = date.getDay();
165
									var dayMonth = month + '-' + day;
166
									var dateString = year + '-' + month + '-' + day;
167
									var dateFrom = document.getElementById('fromRO').value.split("-");
168
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
169
									if (limitDate > date) {
170
										return true;
171
									} else {
172
										return false;
173
									}
174
								}
175
		
176
								Calendar.setup(
177
									{
178
										inputField : "toRO",
179
										ifFormat : "[% DHTMLcalendar_dateformat %]",
180
										button : "openCalendarToRO",
181
										disableFunc : validate2,
182
										dateStatusFunc : validate2
183
									}
184
								);
185
							</script><span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
186
			<li> 
109
			<li> 
187
				<label for="branch">Library: </label>
110
				<label for="branch">Library: </label>
188
<select name="Filter" id="branch"><option value="" > Any library</option>
111
<select name="Filter" id="branch"><option value="" > Any library</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt (-11 / +9 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Reports &rsaquo; Patrons with no checkouts</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Patrons with no checkouts</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
$(document).ready(function(){
8
    $("#to").datepicker({ maxDate: "-1D" });
9
});
10
//]]>
11
</script>
5
</head>
12
</head>
6
<body id="rep_borrowers_out" class="rep">
13
<body id="rep_borrowers_out" class="rep">
7
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
Lines 58-74 Link Here
58
     [% END %] 
65
     [% END %] 
59
    </select>
66
    </select>
60
</li>
67
</li>
61
	<li><label for="to">Not checked out since: </label> <input size="10" id="to" name="Filter" value="" type="text" />
68
    <li><label for="to">Not checked out since: </label> <input size="10" id="to" name="Filter" value="" type="text" />
62
                        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
69
</li>
63
                            <script type="text/javascript">
64
                                Calendar.setup(
65
                                    {
66
                                        inputField : "to",
67
                                        ifFormat : "[% DHTMLcalendar_dateformat %]",
68
                                        button : "openCalendarTo"
69
                                    }
70
                                );
71
                            </script></li>
72
		</ol>
70
		</ol>
73
	</fieldset>
71
	</fieldset>
74
	
72
	
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt (-57 / +3 lines)
Lines 150-212 Link Here
150
		    <tr>
150
		    <tr>
151
            <td>Date of birth</td>
151
            <td>Date of birth</td>
152
            <td colspan="2"></td>
152
            <td colspan="2"></td>
153
                <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
153
                <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" class="datepickerfrom" />
154
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
154
                    <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" class="datepickerto" />
155
                   <script type="text/javascript">
155
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
156
				   //<![CDATA[
157
				    function validate1(date) {
158
                        var day = date.getDate();
159
                        var month = date.getMonth() + 1;
160
                        var year = date.getFullYear();
161
                        var weekDay = date.getDay();
162
                        var dayMonth = month + '-' + day;
163
                        var dateString = year + '-' + month + '-' + day;
164
                        var dateTo = document.getElementById('to').value.split("-");
165
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
166
                        if (date > limitDate) {
167
                                return true;
168
                        } else {
169
                                return false;
170
                        }
171
                    }
172
                    Calendar.setup({
173
                            inputField : "from",
174
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
175
                            button : "openCalendarFrom",
176
                            disableFunc : validate1,
177
                            dateStatusFunc : validate1
178
                    });
179
					//]]>
180
                    </script>
181
                    <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
182
                        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
183
                          <script type="text/javascript">
184
						  //<![CDATA[ 
185
						   function validate2(date) {
186
                                var day = date.getDate();
187
                                var month = date.getMonth() + 1;
188
                                var year = date.getFullYear();
189
                                var weekDay = date.getDay();
190
                                var dayMonth = month + '-' + day;
191
                                var dateString = year + '-' + month + '-' + day;
192
                                var dateFrom = document.getElementById('from').value.split("-");
193
                                var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
194
                                if (limitDate > date) {
195
                                        return true;
196
                                } else {
197
                                        return false;
198
                                }
199
                            }
200
201
                            Calendar.setup({
202
                                    inputField : "to",
203
                                    ifFormat : "[% DHTMLcalendar_dateformat %]",
204
                                    button : "openCalendarTo",
205
                                    disableFunc : validate2,
206
                                    dateStatusFunc : validate2
207
                            });
208
							//]]>
209
                        </script><span class="hint">[% INCLUDE 'date-format.inc' %]</span>
210
                    </td>
156
                    </td>
211
                </tr>
157
                </tr>
212
            <tr>
158
            <tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt (-121 / +40 lines)
Lines 2-14 Link Here
2
<title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
[% IF ( do_it ) %]
5
<script type="text/javascript">
6
<script language="JavaScript" type="text/javascript">
6
//<![CDATA[
7
function Dopop(link) {
7
[% IF ( do_it ) %]function Dopop(link) {
8
	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
8
	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
9
}
9
}[% ELSE %]
10
    $(document).ready(function() {
11
        // http://jqueryui.com/demos/datepicker/#date-range
12
        var dates = $( "#from, #to" ).datepicker({
13
            changeMonth: true,
14
            numberOfMonths: 1,
15
            onSelect: function( selectedDate ) {
16
                var option = this.id == "from" ? "minDate" : "maxDate",
17
                    instance = $( this ).data( "datepicker" );
18
                    date = $.datepicker.parseDate(
19
                        instance.settings.dateFormat ||
20
                        $.datepicker._defaults.dateFormat,
21
                        selectedDate, instance.settings );
22
                dates.not( this ).datepicker( "option", option, date );
23
            }
24
        });
25
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
26
            changeMonth: true,
27
            numberOfMonths: 1,
28
            onSelect: function( selectedDate ) {
29
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
30
                    instance = $( this ).data( "datepicker" );
31
                    date = $.datepicker.parseDate(
32
                        instance.settings.dateFormat ||
33
                        $.datepicker._defaults.dateFormat,
34
                        selectedDate, instance.settings );
35
                datesRO.not( this ).datepicker( "option", option, date );
36
            }
37
        });
38
    });[% END %]
39
//]]>
10
</script>
40
</script>
11
[% END %]
12
</head>
41
</head>
13
<body id="rep_cat_issues_top" class="rep">
42
<body id="rep_cat_issues_top" class="rep">
14
[% INCLUDE 'header.inc' %]
43
[% INCLUDE 'header.inc' %]
Lines 76-197 function Dopop(link) { Link Here
76
	<form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
105
	<form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
77
	<fieldset class="rows">
106
	<fieldset class="rows">
78
	<ol>
107
	<ol>
79
		<li><label for="from">Checkout date from: </label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
108
        <li><label for="from">Checkout date from: </label> <input type="text" size="10" id="from" name="Filter" />
80
							<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
109
        <label for="to" class="inline">To:</label> <input size="10" id="to" name="Filter" value="" type="text" />
81
								<script language="JavaScript" type="text/javascript">
110
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
82
									function validate1(date) {
111
        <li><label for="fromRO">Check-in date from</label> <input type="text" size="10" id="fromRO" name="Filter" />
83
										var day = date.getDate();
112
        <label for="toRO" class="inline">To: </label> <input type="text" size="10" id="toRO" name="Filter" value="" />
84
										var month = date.getMonth() + 1;
113
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
85
										var year = date.getFullYear();
86
										var weekDay = date.getDay();
87
										var dayMonth = month + '-' + day;
88
										var dateString = year + '-' + month + '-' + day;
89
										var dateTo = document.getElementById('to').value.split("-");
90
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
91
										if (date > limitDate) {
92
											return true;
93
										} else {
94
											return false;
95
										}
96
									}
97
					
98
									Calendar.setup(
99
										{
100
											inputField : "from",
101
											ifFormat : "[% DHTMLcalendar_dateformat %]",
102
											button : "openCalendarFrom",
103
											disableFunc : validate1,
104
											dateStatusFunc : validate1
105
										}
106
									);
107
								</script>
108
					<label for="to" class="inline">To:</label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
109
						<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
110
							<script type="text/javascript">
111
								function validate2(date) {
112
									var day = date.getDate();
113
									var month = date.getMonth() + 1;
114
									var year = date.getFullYear();
115
									var weekDay = date.getDay();
116
									var dayMonth = month + '-' + day;
117
									var dateString = year + '-' + month + '-' + day;
118
									var dateFrom = document.getElementById('from').value.split("-");
119
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
120
									if (limitDate > date) {
121
										return true;
122
									} else {
123
										return false;
124
									}
125
								}
126
		
127
								Calendar.setup(
128
									{
129
										inputField : "to",
130
										ifFormat : "[% DHTMLcalendar_dateformat %]",
131
										button : "openCalendarTo",
132
										disableFunc : validate2,
133
										dateStatusFunc : validate2
134
									}
135
								);
136
							</script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
137
		<li><label for="fromRO">Check-in date from</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
138
							<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" />
139
								<script language="JavaScript" type="text/javascript">
140
									function validate1(date) {
141
										var day = date.getDate();
142
										var month = date.getMonth() + 1;
143
										var year = date.getFullYear();
144
										var weekDay = date.getDay();
145
										var dayMonth = month + '-' + day;
146
										var dateString = year + '-' + month + '-' + day;
147
										var dateTo = document.getElementById('toRO').value.split("-");
148
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
149
										if (date > limitDate) {
150
											return true;
151
										} else {
152
											return false;
153
										}
154
									}
155
					
156
									Calendar.setup(
157
										{
158
											inputField : "fromRO",
159
											ifFormat : "[% DHTMLcalendar_dateformat %]",
160
											button : "openCalendarFromRO",
161
											disableFunc : validate1,
162
											dateStatusFunc : validate1
163
										}
164
									);
165
								</script>
166
					<label for="toRO" class="inline">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
167
						<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarToRO" style="cursor: pointer;"  border="0" />
168
							<script type="text/javascript">
169
								function validate2(date) {
170
									var day = date.getDate();
171
									var month = date.getMonth() + 1;
172
									var year = date.getFullYear();
173
									var weekDay = date.getDay();
174
									var dayMonth = month + '-' + day;
175
									var dateString = year + '-' + month + '-' + day;
176
									var dateFrom = document.getElementById('fromRO').value.split("-");
177
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
178
									if (limitDate > date) {
179
										return true;
180
									} else {
181
										return false;
182
									}
183
								}
184
		
185
								Calendar.setup(
186
									{
187
										inputField : "toRO",
188
										ifFormat : "[% DHTMLcalendar_dateformat %]",
189
										button : "openCalendarToRO",
190
										disableFunc : validate2,
191
										dateStatusFunc : validate2
192
									}
193
								);
194
							</script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
195
				<li><label for="branch">Library: </label>
114
				<li><label for="branch">Library: </label>
196
<select name="Filter" id="branch"><option value="" > Any library</option>
115
<select name="Filter" id="branch"><option value="" > Any library</option>
197
    [% FOREACH branchloo IN branchloop %]
116
    [% FOREACH branchloo IN branchloop %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-2 / +36 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</title>
2
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
        // http://jqueryui.com/demos/datepicker/#date-range
9
        var dates = $( "#from, #to" ).datepicker({
10
            changeMonth: true,
11
            numberOfMonths: 1,
12
            onSelect: function( selectedDate ) {
13
                var option = this.id == "from" ? "minDate" : "maxDate",
14
                    instance = $( this ).data( "datepicker" );
15
                    date = $.datepicker.parseDate(
16
                        instance.settings.dateFormat ||
17
                        $.datepicker._defaults.dateFormat,
18
                        selectedDate, instance.settings );
19
                dates.not( this ).datepicker( "option", option, date );
20
            }
21
        });
22
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
23
            changeMonth: true,
24
            numberOfMonths: 1,
25
            onSelect: function( selectedDate ) {
26
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
27
                    instance = $( this ).data( "datepicker" );
28
                    date = $.datepicker.parseDate(
29
                        instance.settings.dateFormat ||
30
                        $.datepicker._defaults.dateFormat,
31
                        selectedDate, instance.settings );
32
                datesRO.not( this ).datepicker( "option", option, date );
33
            }
34
        });
35
        });
36
//]]>
37
</script>
4
</head>
38
</head>
5
<body id="rep_catalogue_stats" class="rep">
39
<body id="rep_catalogue_stats" class="rep">
6
[% INCLUDE 'header.inc' %]
40
[% INCLUDE 'header.inc' %]
Lines 105-111 Link Here
105
                    <td>Koha full call number</td>
139
                    <td>Koha full call number</td>
106
					<td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
140
					<td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
107
					<td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
141
					<td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
108
					<td><label for="callnoFrom">From</label> <input type="text" name="Filter" id="callnoFrom" /> <label for="callnoTo">To</label> <input type="text" name="Filter" id="callnoTo" /></td>
142
                    <td><label for="from">From</label> <input type="text" name="Filter" id="from" /> <label for="to">To</label> <input type="text" name="Filter" id="to" /></td>
109
				</tr>
143
				</tr>
110
			 <tr>
144
			 <tr>
111
					<td>&nbsp;</td>
145
					<td>&nbsp;</td>
Lines 148-154 Link Here
148
                <td>Publication year</td>
182
                <td>Publication year</td>
149
				<td><input type="radio" name="Line" value="publicationyear" /></td>
183
				<td><input type="radio" name="Line" value="publicationyear" /></td>
150
				<td><input type="radio" name="Column" value="publicationyear" /></td>
184
				<td><input type="radio" name="Column" value="publicationyear" /></td>
151
				<td><label for="pubyearFrom">From</label> <input type="text" name="Filter" id="pubyearFrom" /> <label for="pubyearTo">To</label> <input type="text" name="Filter" id="pubyearTo" /></td>
185
                <td><label for="fromRO">From</label> <input type="text" name="Filter" id="fromRO" /> <label for="toRO">To</label> <input type="text" name="Filter" id="toRO" /></td>
152
			</tr>
186
			</tr>
153
			<tr>
187
			<tr>
154
                <td>Home library</td>
188
                <td>Home library</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt (-24 / +6 lines)
Lines 31-37 Link Here
31
		[% IF ( definitions ) %]
31
		[% IF ( definitions ) %]
32
        <h2>Current terms</h2>
32
        <h2>Current terms</h2>
33
		<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
33
		<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
34
        <input type="hidden" name="phase" value="View dictionary" />
34
        <input type="hidden" name="phase" value="View Dictionary" />
35
		[% IF ( areas ) %]
35
		[% IF ( areas ) %]
36
			Filter by area <select name="areas">
36
			Filter by area <select name="areas">
37
			<option value="">All</option>
37
			<option value="">All</option>
Lines 100-106 Link Here
100
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
100
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
101
<fieldset class="rows">
101
<fieldset class="rows">
102
<legend>Step 2 of 5: Choose the area</legend>
102
<legend>Step 2 of 5: Choose the area</legend>
103
<ol><li><input type="hidden" name="phase" value="New term step 3" />
103
<ol><li><input type="hidden" name="phase" value="New Term step 3" />
104
<input type="hidden" name="definition_name" value="[% definition_name %]" />
104
<input type="hidden" name="definition_name" value="[% definition_name %]" />
105
<input type="hidden" name="definition_description" value="[% definition_description %]" />
105
<input type="hidden" name="definition_description" value="[% definition_description %]" />
106
<label for="areas">Select table </label><select name="areas" id="areas">
106
<label for="areas">Select table </label><select name="areas" id="areas">
Lines 149-155 Link Here
149
149
150
<td style="border: 0;"><select id="selectedColumns" name="columns" size="25" style="width:200px;height:300px;"></select>     </td>   </tr></table>     
150
<td style="border: 0;"><select id="selectedColumns" name="columns" size="25" style="width:200px;height:300px;"></select>     </td>   </tr></table>     
151
151
152
<input type="hidden" name="phase" value="New term step 4" />
152
<input type="hidden" name="phase" value="New Term step 4" />
153
</fieldset>
153
</fieldset>
154
<fieldset class="action"><input type="submit" name="submit" value="Next" /></fieldset>
154
<fieldset class="action"><input type="submit" name="submit" value="Next" /></fieldset>
155
</form>
155
</form>
Lines 184-215 Link Here
184
	<table>
184
	<table>
185
	<tr>
185
	<tr>
186
	<td>Start of date range</td>
186
	<td>Start of date range</td>
187
	<td><input type="text" size="10" id="[% column.name %]_start_value" name="[% column.name %]_start_value" value="" />      
187
    <td><input type="text" size="10" id="from" name="[% column.name %]_start_value" value="" class="datepickerfrom" />
188
	<img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;"  />
189
	<script type="text/javascript">
190
	Calendar.setup({
191
	inputField     : "[% column.name %]_start_value",
192
	ifFormat       : "[% DHTMLcalendar_dateformat %]",
193
	button         : "buttonfrom1",
194
	align          : "Tl"
195
	});
196
	</script>
197
	<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
188
	<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
198
	</td>
189
	</td>
199
	</tr>
190
	</tr>
200
	<tr>
191
	<tr>
201
	<td>End of date range</td>
192
	<td>End of date range</td>
202
	<td>
193
	<td>
203
	<input type="text" size="10" id="[% column.name %]_end_value" name="[% column.name %]_end_value" value="" />      
194
    <input type="text" size="10" id="to" name="[% column.name %]_end_value" value="" class="datepickerto" />
204
	<img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfrom2" style="cursor: pointer;"  />
205
	<script type="text/javascript">
206
	Calendar.setup({
207
	inputField     : "[% column.name %]_end_value",
208
	ifFormat       : "[% DHTMLcalendar_dateformat %]",
209
	button         : "buttonfrom2",
210
	align          : "Tl"
211
	});
212
	</script>
213
	<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
195
	<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
214
	</td>
196
	</td>
215
	</tr>
197
	</tr>
Lines 223-229 Link Here
223
205
224
[% END %]
206
[% END %]
225
</ol>
207
</ol>
226
<input type="hidden" name="phase" value="New term step 5" />
208
<input type="hidden" name="phase" value="New Term step 5" />
227
</fieldset>
209
</fieldset>
228
<fieldset class="action">
210
<fieldset class="action">
229
<input type="submit" name="submit" value="Next" />
211
<input type="submit" name="submit" value="Next" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-50 / +6 lines)
Lines 347-362 canned reports and writing custom SQL reports.</p> Link Here
347
        </td>
347
        </td>
348
        [% IF ( criteri.date ) %]
348
        [% IF ( criteri.date ) %]
349
        <td>
349
        <td>
350
            <input type="text" size="10" id="[% criteri.name %]_value" name="[% criteri.name %]_value" value="" />
350
            <input type="text" size="10" id="[% criteri.name %]_value" name="[% criteri.name %]_value" value="" class="datepicker" />
351
            <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfrom[% criteri.name %]" style="cursor: pointer;" alt="Show calendar" title="Show calendar" />
352
            <script type="text/javascript">   
353
            Calendar.setup({  
354
            inputField     : "[% criteri.name %]_value",
355
            ifFormat       : "[% DHTMLcalendar_dateformat %]",
356
            button         : "buttonfrom[% criteri.name %]",
357
            align          : "Tl" 
358
            });     
359
            </script>          
360
		<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
351
		<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
361
        </td>
352
        </td>
362
        </tr>
353
        </tr>
Lines 370-396 canned reports and writing custom SQL reports.</p> Link Here
370
        [% ELSE %]
361
        [% ELSE %]
371
            [% IF ( criteri.daterange ) %]
362
            [% IF ( criteri.daterange ) %]
372
            <td>from 
363
            <td>from 
373
            <input type="text" size="10" id="from_[% criteri.name %]_value" name="from_[% criteri.name %]_value" value="" />
364
            <input type="text" size="10" id="from_[% criteri.name %]_value" name="from_[% criteri.name %]_value" value="" class="datepickerfrom" />
374
            <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfromfrom_[% criteri.name %]" style="cursor: pointer;" alt="Show calendar" title="Show calendar" />
375
            <script type="text/javascript">   
376
                Calendar.setup({  
377
                inputField     : "from_[% criteri.name %]_value",
378
                ifFormat       : "[% DHTMLcalendar_dateformat %]",
379
                button         : "buttonfromfrom_[% criteri.name %]",
380
                align          : "Tl" 
381
                });     
382
            </script>         
383
            to
365
            to
384
            <input type="text" size="10" id="to_[% criteri.name %]_value" name="to_[% criteri.name %]_value" value="" />
366
            <input type="text" size="10" id="to_[% criteri.name %]_value" name="to_[% criteri.name %]_value" value="" class="datepickerto" />
385
            <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfromto_[% criteri.name %]" style="cursor: pointer;" alt="Show calendar" title="Show calendar" />
386
            <script type="text/javascript">   
387
                Calendar.setup({  
388
                inputField     : "to_[% criteri.name %]_value",
389
                ifFormat       : "[% DHTMLcalendar_dateformat %]",
390
                button         : "buttonfromto_[% criteri.name %]",
391
                align          : "Tl" 
392
                });     
393
            </script>        
394
			<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
367
			<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
395
            </td>
368
            </td>
396
        </tr>
369
        </tr>
Lines 531-545 canned reports and writing custom SQL reports.</p> Link Here
531
        [% FOREACH sql_param IN sql_params %]
504
        [% FOREACH sql_param IN sql_params %]
532
            [% IF sql_param.input == 'date' %]
505
            [% IF sql_param.input == 'date' %]
533
                <p>
506
                <p>
534
                [% sql_param.entry %]: <input id="date_[% sql_param_entry %]" type="text" value="" size="10" name="sql_params">
507
                [% sql_param.entry %]: <input id="date_[% sql_param_entry %]" type="text" value="" size="10" name="sql_params" class="datepicker" />
535
                <img id="date_picker_[% sql_param_entry %]" alt="Show calendar" src="/intranet-tmpl/prog/en/lib/calendar/cal.gif">
536
                <script type="text/javascript">
537
                      Calendar.setup( {
538
                         inputField : "date_[% sql_param_entry %]",
539
                         ifFormat : "%Y-%m-%d",
540
                         button : "date_picker_[% sql_param_entry %]"
541
                      } );
542
                </script>
543
                </p>
508
                </p>
544
            [% ELSE %]
509
            [% ELSE %]
545
                <p>[% sql_param.entry %]: [% sql_param.input %]</p>
510
                <p>[% sql_param.entry %]: [% sql_param.input %]</p>
Lines 751-768 Sub report:<select name="subreport"> Link Here
751
  <fieldset class="brief">
716
  <fieldset class="brief">
752
  <h3>Filter</h3>
717
  <h3>Filter</h3>
753
  <ol>
718
  <ol>
754
    <li><label for="filter_date">Date:
719
    <li><label for="filter_date">Date:</label> <input type="text" id="filter_date" name="filter_date" size="10" value="[% filter_date %]" class="datepicker" />
755
  <img src="[% themelang %]/lib/calendar/cal.gif" id="datedueto_button" alt="Show calendar" /></label> <input type="text" id="filter_date" name="filter_date" size="10" value="[% filter_date %]" />
756
    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
720
    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
757
    <script type="text/javascript">
721
758
        Calendar.setup(
759
        {
760
          inputField : "filter_date",
761
          ifFormat : "[% DHTMLcalendar_dateformat %]",
762
          button : "filter_date_button"
763
        }
764
        );
765
    </script>
766
    </li>
722
    </li>
767
    <li><label for="filter_author">Author:</label> <input type="text" id="filter_author" name="filter_author" value="[% filter_author %]" /></li>
723
    <li><label for="filter_author">Author:</label> <input type="text" id="filter_author" name="filter_author" value="[% filter_author %]" /></li>
768
    <li><label for="filter_keyword">Keyword:</label> <input type="text" id="filter_keyword" name="filter_keyword" value="[% filter_keyword %]" /></li>
724
    <li><label for="filter_keyword">Keyword:</label> <input type="text" id="filter_keyword" name="filter_keyword" value="[% filter_keyword %]" /></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt (-112 / +35 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Reports &rsaquo; Average checkout period</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Average checkout period</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
        // http://jqueryui.com/demos/datepicker/#date-range
9
        var dates = $( "#from, #to" ).datepicker({
10
            changeMonth: true,
11
            numberOfMonths: 1,
12
            onSelect: function( selectedDate ) {
13
                var option = this.id == "from" ? "minDate" : "maxDate",
14
                    instance = $( this ).data( "datepicker" );
15
                    date = $.datepicker.parseDate(
16
                        instance.settings.dateFormat ||
17
                        $.datepicker._defaults.dateFormat,
18
                        selectedDate, instance.settings );
19
                dates.not( this ).datepicker( "option", option, date );
20
            }
21
        });
22
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
23
            changeMonth: true,
24
            numberOfMonths: 1,
25
            onSelect: function( selectedDate ) {
26
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
27
                    instance = $( this ).data( "datepicker" );
28
                    date = $.datepicker.parseDate(
29
                        instance.settings.dateFormat ||
30
                        $.datepicker._defaults.dateFormat,
31
                        selectedDate, instance.settings );
32
                datesRO.not( this ).datepicker( "option", option, date );
33
            }
34
        });
35
        });
36
//]]>
37
</script>
5
</head>
38
</head>
6
<body id="rep_issues_avg_stats" class="rep">
39
<body id="rep_issues_avg_stats" class="rep">
7
[% INCLUDE 'header.inc' %]
40
[% INCLUDE 'header.inc' %]
Lines 78-140 Link Here
78
				<td><input type="radio" name="Line" value="timestamp" /></td>
111
				<td><input type="radio" name="Line" value="timestamp" /></td>
79
				<td><input type="radio" name="Column" value="timestamp" /></td>
112
				<td><input type="radio" name="Column" value="timestamp" /></td>
80
				<td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
113
				<td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
81
							<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
82
								<script language="JavaScript" type="text/javascript">
83
									function validate1(date) {
84
										var day = date.getDate();
85
										var month = date.getMonth() + 1;
86
										var year = date.getFullYear();
87
										var weekDay = date.getDay();
88
										var dayMonth = month + '-' + day;
89
										var dateString = year + '-' + month + '-' + day;
90
										var dateTo = document.getElementById('to').value.split("-");
91
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
92
										if (date > limitDate) {
93
											return true;
94
										} else {
95
											return false;
96
										}
97
									}
98
					
99
									Calendar.setup(
100
										{
101
											inputField : "from",
102
											ifFormat : "[% DHTMLcalendar_dateformat %]",
103
											button : "openCalendarFrom",
104
											disableFunc : validate1,
105
											dateStatusFunc : validate1
106
										}
107
									);
108
								</script>
109
					<label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
114
					<label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
110
                        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
115
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
111
							<script type="text/javascript">
112
								function validate2(date) {
113
									var day = date.getDate();
114
									var month = date.getMonth() + 1;
115
									var year = date.getFullYear();
116
									var weekDay = date.getDay();
117
									var dayMonth = month + '-' + day;
118
									var dateString = year + '-' + month + '-' + day;
119
									var dateFrom = document.getElementById('from').value.split("-");
120
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
121
									if (limitDate > date) {
122
										return true;
123
									} else {
124
										return false;
125
									}
126
								}
127
		
128
								Calendar.setup(
129
									{
130
										inputField : "to",
131
										ifFormat : "[% DHTMLcalendar_dateformat %]",
132
										button : "openCalendarTo",
133
										disableFunc : validate2,
134
										dateStatusFunc : validate2
135
									}
136
								);
137
							</script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
138
				</td>
116
				</td>
139
			</tr>
117
			</tr>
140
			<tr class="hilighted"> 
118
			<tr class="hilighted"> 
Lines 154-216 Link Here
154
				<td><input type="radio" name="Line" value="returndate" /></td>
132
				<td><input type="radio" name="Line" value="returndate" /></td>
155
				<td><input type="radio" name="Column" value="returndate" /></td>
133
				<td><input type="radio" name="Column" value="returndate" /></td>
156
				<td > <label for="fromRO">From</label> <input type="text" size="10" id="fromRO" name="Filter" />
134
				<td > <label for="fromRO">From</label> <input type="text" size="10" id="fromRO" name="Filter" />
157
                            <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" />
158
								<script language="JavaScript" type="text/javascript">
159
									function validate1(date) {
160
										var day = date.getDate();
161
										var month = date.getMonth() + 1;
162
										var year = date.getFullYear();
163
										var weekDay = date.getDay();
164
										var dayMonth = month + '-' + day;
165
										var dateString = year + '-' + month + '-' + day;
166
										var dateTo = document.getElementById('toRO').value.split("-");
167
										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
168
										if (date > limitDate) {
169
											return true;
170
										} else {
171
											return false;
172
										}
173
									}
174
					
175
									Calendar.setup(
176
										{
177
											inputField : "fromRO",
178
											ifFormat : "[% DHTMLcalendar_dateformat %]",
179
											button : "openCalendarFromRO",
180
											disableFunc : validate1,
181
											dateStatusFunc : validate1
182
										}
183
									);
184
								</script>
185
					<label for="toRO">To</label> <input type="text" size="10" id="toRO" name="Filter" value="" />
135
					<label for="toRO">To</label> <input type="text" size="10" id="toRO" name="Filter" value="" />
186
                        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" />
136
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
187
							<script type="text/javascript">
188
								function validate2(date) {
189
									var day = date.getDate();
190
									var month = date.getMonth() + 1;
191
									var year = date.getFullYear();
192
									var weekDay = date.getDay();
193
									var dayMonth = month + '-' + day;
194
									var dateString = year + '-' + month + '-' + day;
195
									var dateFrom = document.getElementById('fromRO').value.split("-");
196
									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
197
									if (limitDate > date) {
198
										return true;
199
									} else {
200
										return false;
201
									}
202
								}
203
		
204
								Calendar.setup(
205
									{
206
										inputField : "toRO",
207
										ifFormat : "[% DHTMLcalendar_dateformat %]",
208
										button : "openCalendarToRO",
209
										disableFunc : validate2,
210
										dateStatusFunc : validate2
211
									}
212
								);
213
							</script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
214
				</td>
137
				</td>
215
			</tr>
138
			</tr>
216
			<tr> 
139
			<tr> 
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_by_borrower_category.tt (-1 lines)
Lines 1-7 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports &rsaquo; Checkouts by patron category</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Checkouts by patron category</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
</head>
4
</head>
6
<body id="rep_issues_by_borrower_category" class="rep">
5
<body id="rep_issues_by_borrower_category" class="rep">
7
[% INCLUDE 'header.inc' %]
6
[% INCLUDE 'header.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt (-56 / +3 lines)
Lines 83-144 Link Here
83
                <td>Period</td>
83
                <td>Period</td>
84
                <td><input type="radio" name="Line" value="datetime" /></td>
84
                <td><input type="radio" name="Line" value="datetime" /></td>
85
                <td><input type="radio" name="Column" value="datetime" /></td>
85
                <td><input type="radio" name="Column" value="datetime" /></td>
86
                <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
86
                <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" class="datepickerfrom" />
87
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
87
                    <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" class="datepickerto" />
88
                   <script type="text/javascript">
88
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
89
				   //<![CDATA[ 
90
				   function validate1(date) {
91
                        var day = date.getDate();
92
                        var month = date.getMonth() + 1;
93
                        var year = date.getFullYear();
94
                        var weekDay = date.getDay();
95
                        var dayMonth = month + '-' + day;
96
                        var dateString = year + '-' + month + '-' + day;
97
                        var dateTo = document.getElementById('to').value.split("-");
98
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
99
                        if (date > limitDate) {
100
                             return true;
101
                        } else {
102
                             return false;
103
                        }
104
                    }
105
                    Calendar.setup({
106
                            inputField : "from",
107
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
108
                            button : "openCalendarFrom",
109
                            disableFunc : validate1,
110
                            dateStatusFunc : validate1
111
                    });
112
					//]]>
113
					</script>
114
                    <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
115
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
116
                    <script type="text/javascript">
117
					//<![CDATA[  
118
					function validate2(date) {
119
                         var day = date.getDate();
120
                         var month = date.getMonth() + 1;
121
                         var year = date.getFullYear();
122
                         var weekDay = date.getDay();
123
                         var dayMonth = month + '-' + day;
124
                         var dateString = year + '-' + month + '-' + day;
125
                         var dateFrom = document.getElementById('from').value.split("-");
126
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
127
                         if (limitDate > date) {
128
                              return true;
129
                         } else {
130
                              return false;
131
                         }
132
                     }
133
                     Calendar.setup({
134
                             inputField : "to",
135
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
136
                             button : "openCalendarTo",
137
                             disableFunc : validate2,
138
                             dateStatusFunc : validate2
139
                     });
140
					//]]>
141
					</script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
142
                    </td>
89
                    </td>
143
                </tr>
90
                </tr>
144
                <tr class="highlight"> 
91
                <tr class="highlight"> 
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt (-270 / +72 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Reports &rsaquo; Holds statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Holds statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
            // http://jqueryui.com/demos/datepicker/#date-range
9
            var dates = $( "#filter_reservedate_begin, #filter_reservedate_end" ).datepicker({
10
                changeMonth: true,
11
                numberOfMonths: 1,
12
                onSelect: function( selectedDate ) {
13
                    var option = this.id == "filter_reservedate_begin" ? "minDate" : "maxDate",
14
                        instance = $( this ).data( "datepicker" );
15
                        date = $.datepicker.parseDate(
16
                            instance.settings.dateFormat ||
17
                            $.datepicker._defaults.dateFormat,
18
                            selectedDate, instance.settings );
19
                    dates.not( this ).datepicker( "option", option, date );
20
                }
21
            });
22
            var datesND = $( "#filter_notificationdate_begin, #filter_notificationdate_end" ).datepicker({
23
                changeMonth: true,
24
                numberOfMonths: 1,
25
                onSelect: function( selectedDate ) {
26
                    var option = this.id == "filter_notificationdate_begin" ? "minDate" : "maxDate",
27
                        instance = $( this ).data( "datepicker" );
28
                        date = $.datepicker.parseDate(
29
                            instance.settings.dateFormat ||
30
                            $.datepicker._defaults.dateFormat,
31
                            selectedDate, instance.settings );
32
                    datesND.not( this ).datepicker( "option", option, date );
33
                }
34
            });
35
            var datesRD = $( "#filter_reminderdate_begin, #filter_reminderdate_end" ).datepicker({
36
                changeMonth: true,
37
                numberOfMonths: 1,
38
                onSelect: function( selectedDate ) {
39
                    var option = this.id == "filter_reminderdate_begin" ? "minDate" : "maxDate",
40
                        instance = $( this ).data( "datepicker" );
41
                        date = $.datepicker.parseDate(
42
                            instance.settings.dateFormat ||
43
                            $.datepicker._defaults.dateFormat,
44
                            selectedDate, instance.settings );
45
                    datesRD.not( this ).datepicker( "option", option, date );
46
                }
47
            });
48
            var datesWD = $( "#filter_waitingdate_begin, #filter_waitingdate_end" ).datepicker({
49
                changeMonth: true,
50
                numberOfMonths: 1,
51
                onSelect: function( selectedDate ) {
52
                    var option = this.id == "filter_waitingdate_begin" ? "minDate" : "maxDate",
53
                        instance = $( this ).data( "datepicker" );
54
                        date = $.datepicker.parseDate(
55
                            instance.settings.dateFormat ||
56
                            $.datepicker._defaults.dateFormat,
57
                            selectedDate, instance.settings );
58
                    datesWD.not( this ).datepicker( "option", option, date );
59
                }
60
            });
61
            var datesCD = $( "#filter_cancellationdate_begin, #filter_cancellationdate_end" ).datepicker({
62
                changeMonth: true,
63
                numberOfMonths: 1,
64
                onSelect: function( selectedDate ) {
65
                    var option = this.id == "filter_cancellationdate_begin" ? "minDate" : "maxDate",
66
                        instance = $( this ).data( "datepicker" );
67
                        date = $.datepicker.parseDate(
68
                            instance.settings.dateFormat ||
69
                            $.datepicker._defaults.dateFormat,
70
                            selectedDate, instance.settings );
71
                    datesCD.not( this ).datepicker( "option", option, date );
72
                }
73
            });
74
        });
75
//]]>
76
</script>
5
<style type="text/css">
77
<style type="text/css">
6
	.sql {display:none;}
78
	.sql {display:none;}
7
</style>
79
</style>
Lines 101-161 Link Here
101
                <td><input type="radio" name="Line" value="reservedate" /></td>
173
                <td><input type="radio" name="Line" value="reservedate" /></td>
102
                <td><input type="radio" name="Column" value="reservedate" /></td>
174
                <td><input type="radio" name="Column" value="reservedate" /></td>
103
                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
175
                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
104
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openreservedateFrom" style="cursor: pointer;" />
105
                   <script type="text/javascript">
106
				   //<![CDATA[ 
107
				   function validate1(date) {
108
                        var day = date.getDate();
109
                        var month = date.getMonth() + 1;
110
                        var year = date.getFullYear();
111
                        var weekDay = date.getDay();
112
                        var dayMonth = month + '-' + day;
113
                        var dateString = year + '-' + month + '-' + day;
114
                        var dateTo = document.getElementById('filter_reservedate_end').value.split("-");
115
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
116
                        if (date > limitDate) {
117
                             return true;
118
                        } else {
119
                             return false;
120
                        }
121
                    }
122
                    Calendar.setup({
123
                            inputField : "filter_reservedate_begin",
124
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
125
                            button : "openreservedateFrom",
126
                            disableFunc : validate1,
127
                            dateStatusFunc : validate1
128
                    });
129
					//]]>
130
					</script>
131
                    <label for="filter_reservedate_end">To</label> <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" />
176
                    <label for="filter_reservedate_end">To</label> <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" />
132
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openreservedateTo" style="cursor: pointer;" border="0" />
133
                    <script type="text/javascript">
134
					//<![CDATA[  
135
					function validate2(date) {
136
                         var day = date.getDate();
137
                         var month = date.getMonth() + 1;
138
                         var year = date.getFullYear();
139
                         var weekDay = date.getDay();
140
                         var dayMonth = month + '-' + day;
141
                         var dateString = year + '-' + month + '-' + day;
142
                         var dateFrom = document.getElementById('filter_reservedate_begin').value.split("-");
143
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
144
                         if (limitDate > date) {
145
                              return true;
146
                         } else {
147
                              return false;
148
                         }
149
                     }
150
                     Calendar.setup({
151
                             inputField : "filter_reservedate_end",
152
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
153
                             button : "openreservedateTo",
154
                             disableFunc : validate2,
155
                             dateStatusFunc : validate2
156
                     });
157
					//]]>
158
					</script>
159
                    </td>
177
                    </td>
160
                </tr>
178
                </tr>
161
            <tr>
179
            <tr>
Lines 163-223 Link Here
163
                <td><input type="radio" name="Line" value="notificationdate" /></td>
181
                <td><input type="radio" name="Line" value="notificationdate" /></td>
164
                <td><input type="radio" name="Column" value="notificationdate" /></td>
182
                <td><input type="radio" name="Column" value="notificationdate" /></td>
165
                <td><label for="filter_notificationdate_begin">From</label> <input type="text"  size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
183
                <td><label for="filter_notificationdate_begin">From</label> <input type="text"  size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
166
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="opennotificationdateFrom" style="cursor: pointer;" />
167
                   <script type="text/javascript">
168
				   //<![CDATA[ 
169
				   function validate1(date) {
170
                        var day = date.getDate();
171
                        var month = date.getMonth() + 1;
172
                        var year = date.getFullYear();
173
                        var weekDay = date.getDay();
174
                        var dayMonth = month + '-' + day;
175
                        var dateString = year + '-' + month + '-' + day;
176
                        var dateTo = document.getElementById('filter_notificationdate_end').value.split("-");
177
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
178
                        if (date > limitDate) {
179
                             return true;
180
                        } else {
181
                             return false;
182
                        }
183
                    }
184
                    Calendar.setup({
185
                            inputField : "filter_notificationdate_begin",
186
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
187
                            button : "opennotificationdateFrom",
188
                            disableFunc : validate1,
189
                            dateStatusFunc : validate1
190
                    });
191
					//]]>
192
					</script>
193
                    <label for="filter_notificationdate_end">To</label> <input  size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" />
184
                    <label for="filter_notificationdate_end">To</label> <input  size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" />
194
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="opennotificationdateTo" style="cursor: pointer;" border="0" />
195
                    <script type="text/javascript">
196
					//<![CDATA[  
197
					function validate2(date) {
198
                         var day = date.getDate();
199
                         var month = date.getMonth() + 1;
200
                         var year = date.getFullYear();
201
                         var weekDay = date.getDay();
202
                         var dayMonth = month + '-' + day;
203
                         var dateString = year + '-' + month + '-' + day;
204
                         var dateFrom = document.getElementById('filter_notificationdate_begin').value.split("-");
205
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
206
                         if (limitDate > date) {
207
                              return true;
208
                         } else {
209
                              return false;
210
                         }
211
                     }
212
                     Calendar.setup({
213
                             inputField : "filter_notificationdate_end",
214
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
215
                             button : "opennotificationdateTo",
216
                             disableFunc : validate2,
217
                             dateStatusFunc : validate2
218
                     });
219
					//]]>
220
					</script>
221
                    </td>
185
                    </td>
222
             </tr>
186
             </tr>
223
            <tr>
187
            <tr>
Lines 225-285 Link Here
225
                <td><input type="radio" name="Line" value="reminderdate" /></td>
189
                <td><input type="radio" name="Line" value="reminderdate" /></td>
226
                <td><input type="radio" name="Column" value="reminderdate" /></td>
190
                <td><input type="radio" name="Column" value="reminderdate" /></td>
227
                <td><label for="filter_reminderdate_begin">From</label> <input type="text"  size="10" id="filter_reminderdate_begin" name="Filter" />
191
                <td><label for="filter_reminderdate_begin">From</label> <input type="text"  size="10" id="filter_reminderdate_begin" name="Filter" />
228
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openreminderdateFrom" style="cursor: pointer;" />
229
                   <script type="text/javascript">
230
				   //<![CDATA[ 
231
				   function validate1(date) {
232
                        var day = date.getDate();
233
                        var month = date.getMonth() + 1;
234
                        var year = date.getFullYear();
235
                        var weekDay = date.getDay();
236
                        var dayMonth = month + '-' + day;
237
                        var dateString = year + '-' + month + '-' + day;
238
                        var dateTo = document.getElementById('filter_reminderdate_end').value.split("-");
239
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
240
                        if (date > limitDate) {
241
                             return true;
242
                        } else {
243
                             return false;
244
                        }
245
                    }
246
                    Calendar.setup({
247
                            inputField : "filter_reminderdate_begin",
248
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
249
                            button : "openreminderdateFrom",
250
                            disableFunc : validate1,
251
                            dateStatusFunc : validate1
252
                    });
253
					//]]>
254
					</script>
255
                    <label for="filter_reminderdate_end">To</label> <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" />
192
                    <label for="filter_reminderdate_end">To</label> <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" />
256
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openreminderdateTo" style="cursor: pointer;" border="0" />
257
                    <script type="text/javascript">
258
					//<![CDATA[  
259
					function validate2(date) {
260
                         var day = date.getDate();
261
                         var month = date.getMonth() + 1;
262
                         var year = date.getFullYear();
263
                         var weekDay = date.getDay();
264
                         var dayMonth = month + '-' + day;
265
                         var dateString = year + '-' + month + '-' + day;
266
                         var dateFrom = document.getElementById('filter_reminderdate_begin').value.split("-");
267
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
268
                         if (limitDate > date) {
269
                              return true;
270
                         } else {
271
                              return false;
272
                         }
273
                     }
274
                     Calendar.setup({
275
                             inputField : "filter_reminderdate_end",
276
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
277
                             button : "openreminderdateTo",
278
                             disableFunc : validate2,
279
                             dateStatusFunc : validate2
280
                     });
281
					//]]>
282
					</script>
283
                    </td>
193
                    </td>
284
             </tr>
194
             </tr>
285
            <tr>
195
            <tr>
Lines 287-347 Link Here
287
                <td><input type="radio" name="Line" value="waitingdate" /></td>
197
                <td><input type="radio" name="Line" value="waitingdate" /></td>
288
                <td><input type="radio" name="Column" value="waitingdate" /></td>
198
                <td><input type="radio" name="Column" value="waitingdate" /></td>
289
                <td><label for="filter_waitingdate_begin">From</label> <input type="text"  size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
199
                <td><label for="filter_waitingdate_begin">From</label> <input type="text"  size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
290
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openwaitingdateFrom" style="cursor: pointer;" />
291
                   <script type="text/javascript">
292
				   //<![CDATA[ 
293
				   function validate1(date) {
294
                        var day = date.getDate();
295
                        var month = date.getMonth() + 1;
296
                        var year = date.getFullYear();
297
                        var weekDay = date.getDay();
298
                        var dayMonth = month + '-' + day;
299
                        var dateString = year + '-' + month + '-' + day;
300
                        var dateTo = document.getElementById('filter_waitingdate_end').value.split("-");
301
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
302
                        if (date > limitDate) {
303
                             return true;
304
                        } else {
305
                             return false;
306
                        }
307
                    }
308
                    Calendar.setup({
309
                            inputField : "filter_waitingdate_begin",
310
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
311
                            button : "openwaitingdateFrom",
312
                            disableFunc : validate1,
313
                            dateStatusFunc : validate1
314
                    });
315
					//]]>
316
					</script>
317
                    <label for="filter_waitingdate_end">To</label> <input  size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" />
200
                    <label for="filter_waitingdate_end">To</label> <input  size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" />
318
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openwaitingdateTo" style="cursor: pointer;" border="0" />
319
                    <script type="text/javascript">
320
					//<![CDATA[  
321
					function validate2(date) {
322
                         var day = date.getDate();
323
                         var month = date.getMonth() + 1;
324
                         var year = date.getFullYear();
325
                         var weekDay = date.getDay();
326
                         var dayMonth = month + '-' + day;
327
                         var dateString = year + '-' + month + '-' + day;
328
                         var dateFrom = document.getElementById('filter_waitingdate_begin').value.split("-");
329
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
330
                         if (limitDate > date) {
331
                              return true;
332
                         } else {
333
                              return false;
334
                         }
335
                     }
336
                     Calendar.setup({
337
                             inputField : "filter_waitingdate_end",
338
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
339
                             button : "openwaitingdateTo",
340
                             disableFunc : validate2,
341
                             dateStatusFunc : validate2
342
                     });
343
					//]]>
344
					</script>
345
                    </td>
201
                    </td>
346
             </tr>
202
             </tr>
347
			 <tr>
203
			 <tr>
Lines 349-409 Link Here
349
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
205
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
350
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
206
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
351
                <td><label for="filter_cancellationdate_begin">From</label> <input type="text"  size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
207
                <td><label for="filter_cancellationdate_begin">From</label> <input type="text"  size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
352
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="opencancellationdateFrom" style="cursor: pointer;" />
353
                   <script type="text/javascript">
354
				   //<![CDATA[ 
355
				   function validate1(date) {
356
                        var day = date.getDate();
357
                        var month = date.getMonth() + 1;
358
                        var year = date.getFullYear();
359
                        var weekDay = date.getDay();
360
                        var dayMonth = month + '-' + day;
361
                        var dateString = year + '-' + month + '-' + day;
362
                        var dateTo = document.getElementById('filter_cancellationdate_end').value.split("-");
363
                        var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
364
                        if (date > limitDate) {
365
                             return true;
366
                        } else {
367
                             return false;
368
                        }
369
                    }
370
                    Calendar.setup({
371
                            inputField : "filter_cancellationdate_begin",
372
                            ifFormat : "[% DHTMLcalendar_dateformat %]",
373
                            button : "opencancellationdateFrom",
374
                            disableFunc : validate1,
375
                            dateStatusFunc : validate1
376
                    });
377
					//]]>
378
					</script>
379
                    <label for="filter_cancellationdate_end">To</label> <input  size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" />
208
                    <label for="filter_cancellationdate_end">To</label> <input  size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" />
380
                    <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="opencancellationdateTo" style="cursor: pointer;" border="0" />
381
                    <script type="text/javascript">
382
					//<![CDATA[  
383
					function validate2(date) {
384
                         var day = date.getDate();
385
                         var month = date.getMonth() + 1;
386
                         var year = date.getFullYear();
387
                         var weekDay = date.getDay();
388
                         var dayMonth = month + '-' + day;
389
                         var dateString = year + '-' + month + '-' + day;
390
                         var dateFrom = document.getElementById('filter_cancellationdate_begin').value.split("-");
391
                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
392
                         if (limitDate > date) {
393
                              return true;
394
                         } else {
395
                              return false;
396
                         }
397
                     }
398
                     Calendar.setup({
399
                             inputField : "filter_cancellationdate_end",
400
                             ifFormat : "[% DHTMLcalendar_dateformat %]",
401
                             button : "opencancellationdateTo",
402
                             disableFunc : validate2,
403
                             dateStatusFunc : validate2
404
                     });
405
					//]]>
406
					</script>
407
                    </td>
209
                    </td>
408
             </tr>
210
             </tr>
409
        <tr>
211
        <tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/stats_screen.tt (-22 / +3 lines)
Lines 1-8 Link Here
1
[% INCLUDE 'doc-head-open.inc' %] 
1
[% INCLUDE 'doc-head-open.inc' %] 
2
<title>Koha &rsaquo; Reports &rsaquo; Till reconciliation</title>
2
<title>Koha &rsaquo; Reports &rsaquo; Till reconciliation</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %] 
4
[% INCLUDE 'calendar.inc' %]
5
6
</head>
5
</head>
7
<body id="rep_stats_screen" class="rep">
6
<body id="rep_stats_screen" class="rep">
8
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'header.inc' %]
Lines 21-47 Link Here
21
<fieldset><legend>Search between two dates</legend>
20
<fieldset><legend>Search between two dates</legend>
22
<form action="stats.screen.pl" method="post">
21
<form action="stats.screen.pl" method="post">
23
  <label for="from">Start Date: </label>
22
  <label for="from">Start Date: </label>
24
  <input type="text" name="time" size="10" value="[% IF ( date ) %][% date %][% ELSE %]today[% END %]" id="from" /> 
23
  <input type="text" name="time" size="10" value="[% IF ( date ) %][% date %][% ELSE %]today[% END %]" id="from" class="datepickerfrom" />
25
  <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonfrom1" alt="Show calendar" style="cursor: pointer;" />
26
     <script type="text/javascript">
27
     Calendar.setup({
28
     inputField     :    "from",
29
     ifFormat       :    "[% DHTMLcalendar_dateformat %]",
30
     button         :    "buttonfrom1",
31
     align          :    "Tl"
32
     });
33
     </script>
34
  <label for="to">End Date: </label>
24
  <label for="to">End Date: </label>
35
  <input type="text" name="time2" size="10" value="[% IF ( date2 ) %][% date2 %][% ELSE %]tomorrow[% END %]" id="to" />
25
  <input type="text" name="time2" size="10" value="[% IF ( date2 ) %][% date2 %][% ELSE %]tomorrow[% END %]" class="datepickerto" id="to" />
36
  <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonto1" alt="Show calendar" style="cursor: pointer;" />
37
     <script type="text/javascript">
38
     Calendar.setup({
39
     inputField     :    "to",
40
     ifFormat       :    "[% DHTMLcalendar_dateformat %]",
41
     button         :    "buttonto1",
42
     align          :    "Tl"
43
     });
44
     </script>
45
  <input type="submit" value="To screen" name="submit" class="submit" />
26
  <input type="submit" value="To screen" name="submit" class="submit" />
46
<!--  <input type="submit" value="To Excel" name="submit" class="button"> --></fieldset>
27
<!--  <input type="submit" value="To Excel" name="submit" class="button"> --></fieldset>
47
</form>
28
</form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-80 / +5 lines)
Lines 288-352 function checkMultiHold() { Link Here
288
288
289
	[% IF ( reserve_in_future ) %]
289
	[% IF ( reserve_in_future ) %]
290
	<li>
290
	<li>
291
	    <label for="reserve_date">Hold starts on date:</label>
291
        <label for="from">Hold starts on date:</label>
292
	    <input name="reserve_date" id="reserve_date" size="10" readonly="readonly">
292
        <input name="reserve_date" id="from" size="10" readonly="readonly" class="datepickerfrom">
293
        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="CalendarReserveDate" style="cursor: pointer;" />
294
	    <script language="JavaScript" type="text/javascript">
295
		//<![CDATA[
296
		function validate1(date) {
297
			var today = new Date();
298
			if ( (date > today) ||
299
                    ( date.getDate() == today.getDate() &&
300
                      date.getMonth() == today.getMonth() &&
301
                      date.getFullYear() == today.getFullYear() ) ) {
302
				return false;
303
			} else {
304
				return true;
305
			}
306
		};
307
		Calendar.setup(
308
			{
309
				inputField : "reserve_date",
310
				ifFormat : "[% DHTMLcalendar_dateformat %]",
311
				button : "CalendarReserveDate",
312
				disableFunc : validate1,
313
				dateStatusFunc : validate1
314
			}
315
		);
316
		//]]>
317
	    </script>
318
        <a href='#' onclick="document.getElementById('reserve_date').value='';">Clear Date</a>
293
        <a href='#' onclick="document.getElementById('reserve_date').value='';">Clear Date</a>
319
	</li>
294
	</li>
320
	[% END %]
295
	[% END %]
321
296
322
	<li>
297
	<li>
323
	    <label for="expiration_date">Hold expires on date:</label>
298
        <label for="to">Hold expires on date:</label>
324
	    <input name="expiration_date" id="expiration_date" size="10" readonly="readonly" />
299
        <input name="expiration_date" id="to" size="10" readonly="readonly" class="datepickerto" />
325
        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="CalendarExpirationDate" style="cursor: pointer;" />
326
	    <script language="JavaScript" type="text/javascript">
327
		//<![CDATA[
328
		function validate1(date) {
329
			var today = new Date();
330
			if ( (date > today) ||
331
                    ( date.getDate() == today.getDate() &&
332
                      date.getMonth() == today.getMonth() &&
333
                      date.getFullYear() == today.getFullYear() ) ) {
334
				return false;
335
			} else {
336
				return true;
337
			}
338
		};
339
		Calendar.setup(
340
			{
341
				inputField : "expiration_date",
342
				ifFormat : "[% DHTMLcalendar_dateformat %]",
343
				button : "CalendarExpirationDate",
344
				disableFunc : validate1,
345
				dateStatusFunc : validate1
346
			}
347
		);
348
		//]]>
349
	    </script>
350
        <a href='#' onclick="document.getElementById('expiration_date').value='';">Clear date</a>
300
        <a href='#' onclick="document.getElementById('expiration_date').value='';">Clear date</a>
351
	</li>
301
	</li>
352
302
Lines 737-768 function checkMultiHold() { Link Here
737
687
738
            [% IF AutoResumeSuspendedHolds %]
688
            [% IF AutoResumeSuspendedHolds %]
739
	    <label for="suspend_until_[% reserveloo.borrowernumber %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
689
	    <label for="suspend_until_[% reserveloo.borrowernumber %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
740
        <input name="suspend_until" id="suspend_until_[% reserveloo.borrowernumber %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" />
690
        <input name="suspend_until" id="suspend_until_[% reserveloo.borrowernumber %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker" />
741
        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="SuspendUntilDate_[% reserveloo.borrowernumber %]" style="cursor: pointer;" />
742
	    <script language="JavaScript" type="text/javascript">
743
		//<![CDATA[
744
		function validate1(date) {
745
			var today = new Date();
746
			if ( (date > today) ||
747
                    ( date.getDate() == today.getDate() &&
748
                      date.getMonth() == today.getMonth() &&
749
                      date.getFullYear() == today.getFullYear() ) ) {
750
				return false;
751
			} else {
752
				return true;
753
			}
754
		};
755
		Calendar.setup(
756
			{
757
				inputField : "suspend_until_[% reserveloo.borrowernumber %]",
758
				ifFormat : "[% DHTMLcalendar_dateformat %]",
759
				button : "SuspendUntilDate_[% reserveloo.borrowernumber %]",
760
				disableFunc : validate1,
761
				dateStatusFunc : validate1
762
			}
763
		);
764
		//]]>
765
	    </script>
766
	    <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.borrowernumber %]').value='';">Clear Date</a>
691
	    <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.borrowernumber %]').value='';">Clear Date</a>
767
            [% END %]
692
            [% END %]
768
	[% ELSE %]
693
	[% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt (-11 / +2 lines)
Lines 53-69 Link Here
53
        <input id="issn" type="text" name="issn" size="15" value="[% issn %]" /></li>
53
        <input id="issn" type="text" name="issn" size="15" value="[% issn %]" /></li>
54
54
55
        <li><label for="date" class="required" title="Required field">Expiring before:</label>
55
        <li><label for="date" class="required" title="Required field">Expiring before:</label>
56
        <input id="date" type="text" name="date" size="10" value="[% date %]" class="focus" />
56
        <input id="date" type="text" name="date" size="10" value="[% date %]" class="focus datepicker" />
57
                <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendar" style="cursor: pointer;" />
57
        <span class="required">Required</span>
58
            <script type="text/javascript">
59
                Calendar.setup(
60
                 {
61
					button : "openCalendar",
62
                     inputField : "date",
63
                     ifFormat : "[% DHTMLcalendar_dateformat %]"
64
                 }
65
                );
66
            </script> <span class="required">Required</span>
67
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
58
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
68
			</ol>
59
			</ol>
69
        
60
        
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt (-26 / +6 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
    <title>Koha &rsaquo; Serials &rsaquo; Claims</title>
2
    <title>Koha &rsaquo; Serials &rsaquo; Claims</title>
3
    [% INCLUDE 'doc-head-close.inc' %]
3
    [% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.uitablefilter.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.uitablefilter.js"></script>
6
<script type="text/JavaScript" language="JavaScript">
7
<script type="text/JavaScript" language="JavaScript">
Lines 144-150 Link Here
144
145
145
//]]>
146
//]]>
146
</script>
147
</script>
147
[% INCLUDE 'calendar.inc' %]
148
</head>
148
</head>
149
<body id="ser_claims" class="ser">
149
<body id="ser_claims" class="ser">
150
    [% INCLUDE 'header.inc' %]
150
    [% INCLUDE 'header.inc' %]
Lines 227-257 Link Here
227
	</li>
227
	</li>
228
	
228
	
229
	<li>
229
	<li>
230
	    <label for="begindate">From</label>
230
        <label for="from">From</label>
231
        <img src="[% themelang %]/lib/calendar/cal.gif" id="begindatebutton" style="cursor: pointer;" alt="Show calendar" title="Show Calendar" />
231
        <input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" />
232
	    <input type="text" name="begindate" id="begindate" value="[% begindate %]" size="10" maxlength="10" />
232
        <label for="to" style="float:none;">To</label>
233
	    <script type="text/javascript">
233
        <input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" />
234
		 //<![CDATA[ 
234
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
235
		Calendar.setup({
236
		    inputField	: "begindate", 
237
		    button		: "begindatebutton",
238
		    ifFormat	: "[% DHTMLcalendar_dateformat %]"
239
		});
240
		//]]>
241
	    </script>
242
243
	    <label for="enddate" style="float:none;">To</label>
244
        <img src="[% themelang %]/lib/calendar/cal.gif" id="enddatebutton" style="cursor: pointer;" alt="Show calendar" title="Show Calendar" />
245
	    <input type="text" name="enddate" id="enddate" value="[% enddate %]" size="10" maxlength="10" />
246
	    <script type="text/javascript">
247
		 //<![CDATA[ 
248
		 Calendar.setup({
249
		    inputField      : "enddate", 
250
		    button          : "enddatebutton",
251
		    ifFormat        : "[% DHTMLcalendar_dateformat %]"
252
		});
253
		//]]>
254
	    </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
255
	    <input type="button" value="OK" onclick="filterByDate();" />
235
	    <input type="button" value="OK" onclick="filterByDate();" />
256
        </li>
236
        </li>
257
	
237
	
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-79 / +22 lines)
Lines 2-8 Link Here
2
<title>Koha &rsaquo; Serials &rsaquo; [% IF ( modify ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
2
<title>Koha &rsaquo; Serials &rsaquo; [% IF ( modify ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
6
<style type="text/css">
5
<style type="text/css">
7
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
6
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
8
.yui-u li p label.widelabel {
7
.yui-u li p label.widelabel {
Lines 916-922 function Check(f) { Link Here
916
915
917
$(document).ready(function() {
916
$(document).ready(function() {
918
    init_pattern();
917
    init_pattern();
919
	
918
    // http://jqueryui.com/demos/datepicker/#date-range
919
    var dates = $( "#histstartdate, #histenddate" ).datepicker({
920
        changeMonth: true,
921
        numberOfMonths: 1,
922
        onSelect: function( selectedDate ) {
923
            var option = this.id == "histstartdate" ? "minDate" : "maxDate",
924
                instance = $( this ).data( "datepicker" );
925
                date = $.datepicker.parseDate(
926
                    instance.settings.dateFormat ||
927
                    $.datepicker._defaults.dateFormat,
928
                    selectedDate, instance.settings );
929
            dates.not( this ).datepicker( "option", option, date );
930
        }
931
    });
932
920
	[% IF ( history ) %] $("#subscription_form_history").show();[% END %]
933
	[% IF ( history ) %] $("#subscription_form_history").show();[% END %]
921
	$("#cancel_manual_history").click(function(){
934
	$("#cancel_manual_history").click(function(){
922
		$("#subscription_form_history").hide();
935
		$("#subscription_form_history").hide();
Lines 1124-1174 $(document).ready(function() { Link Here
1124
    <ol>
1137
    <ol>
1125
        <li>
1138
        <li>
1126
           <label for="acqui_date"> First issue publication date:</label>
1139
           <label for="acqui_date"> First issue publication date:</label>
1127
                [% UNLESS ( modify ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %]
1128
                [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" disabled="disabled" />
1140
                [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" disabled="disabled" />
1129
                [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" />[% END %]
1141
                [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" class="datepicker" />[% END %]
1130
        </li>
1142
        </li>
1131
           [% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
1143
           [% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
1132
                <img src="[% themelang %]/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
1144
                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" class="datepicker" />
1133
                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" />
1134
                </li>[% END %]
1145
                </li>[% END %]
1135
                
1146
                
1136
        <li><!-- both scripts for calendar must follow the input field --> 
1147
        <li>
1137
                <script type="text/javascript">
1138
                    Calendar.setup({
1139
                        inputField      :   "[% IF ( modify ) %]next_[% END %]acqui_date",
1140
                        ifFormat       :   "[% DHTMLcalendar_dateformat %]",
1141
                        button         :   "[% IF ( modify ) %]next_[% END %]acqui_button",
1142
                        align          :   "Tl",
1143
                        onUpdate        :    function(cal) { 
1144
                                                             irregular_issues.weeks = getWeeksArray(cal.date);
1145
                                                            irregular_issues.firstissue = cal.date;
1146
                                                            if(document.irregularity_summary) {
1147
                                                                irregular_issues.update();
1148
                                                            }
1149
                                                            if(document.getElementById("seasonal_irregularity")) {
1150
                                                                moreoptions_seasons(text[15]);
1151
                                                            }
1152
                                                        } 
1153
                        });
1154
                    Calendar.setup({
1155
                        inputField      :   "[% IF ( modify ) %]next_[% END %]acqui_date",
1156
                        ifFormat       :   "[% DHTMLcalendar_dateformat %]",
1157
                        button         :   "[% IF ( modify ) %]next_[% END %]acqui_date",
1158
                        align          :   "Tl",
1159
                        onUpdate        :    function(cal) { irregular_issues.weeks = getWeeksArray(cal.date);
1160
                                                            irregular_issues.firstissue = cal.date;
1161
                                                            if(document.irregularity_summary) {
1162
                                                                irregular_issues.update();
1163
                                                            }
1164
                                                            if(document.getElementById("seasonal_irregularity")) {
1165
                                                                moreoptions_seasons(text[15]);
1166
                                                            }
1167
                                                        } 
1168
                        });
1169
                </script>
1170
            <label for="periodicity" class="required">Frequency:</label>
1148
            <label for="periodicity" class="required">Frequency:</label>
1171
            
1172
                <select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();">
1149
                <select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();">
1173
                <option value="" selected="selected">-- please choose --</option>
1150
                <option value="" selected="selected">-- please choose --</option>
1174
                [% IF ( periodicity16 ) %]
1151
                [% IF ( periodicity16 ) %]
Lines 1314-1338 $(document).ready(function() { Link Here
1314
                <li id="irregularity"></li>
1291
                <li id="irregularity"></li>
1315
   	           <li id="displayexample"></li>
1292
   	           <li id="displayexample"></li>
1316
        <li>
1293
        <li>
1317
           <label for="beginning_date" class="required"> Subscription start date:</label>
1294
           <label for="from" class="required"> Subscription start date:</label>
1318
            
1295
                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="from" class="datepickerfrom" />
1319
                <img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show calendar" title="Show calendar" />
1320
                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" />
1321
                <!-- both scripts for calendar must follow the input field --> 
1322
                <script type="text/javascript">
1323
                    Calendar.setup({
1324
                        inputField   : "beginning_date",
1325
                        ifFormat     : "[% DHTMLcalendar_dateformat %]",
1326
                        button       : "button1",
1327
                        align        : "Tl"
1328
                    });
1329
                    Calendar.setup({
1330
                        inputField   : "beginning_date",
1331
                        ifFormat     : "[% DHTMLcalendar_dateformat %]",
1332
                        button       : "beginning_date",
1333
                        align        : "Tl"
1334
                    });
1335
                </script>
1336
            <span class="required">Required</span>
1296
            <span class="required">Required</span>
1337
        </li>
1297
        </li>
1338
        <li>
1298
        <li>
Lines 1347-1371 $(document).ready(function() { Link Here
1347
            <span class="required">Required</span>
1307
            <span class="required">Required</span>
1348
        </li>
1308
        </li>
1349
        <li>
1309
        <li>
1350
           <label for="ending_date"> Subscription end date:</label>
1310
           <label for="to"> Subscription end date:</label>
1351
            
1311
                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="to" class="datepickerto" />
1352
                <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonend1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
1353
                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" />
1354
                <!-- both scripts for calendar must follow the input field --> 
1355
                <script type="text/javascript">
1356
                    Calendar.setup({
1357
                        inputField   : "ending_date",
1358
                        ifFormat     : "[% DHTMLcalendar_dateformat %]",
1359
                        button       : "buttonend1",
1360
                        align        : "Tl"
1361
                    });
1362
                    Calendar.setup({
1363
                        inputField   : "ending_date",
1364
                        ifFormat     : "[% DHTMLcalendar_dateformat %]",
1365
                        button       : "ending_date",
1366
                        align        : "Tl"
1367
                    });
1368
                </script>
1369
        </li>
1312
        </li>
1370
    <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" />
1313
    <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" />
1371
    </li>
1314
    </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-60 / +46 lines)
Lines 87-92 $(document).ready(function() { Link Here
87
	$("h4.collapse a").click(function(){
87
	$("h4.collapse a").click(function(){
88
		$(this).parent().parent().find("ol").toggle();
88
		$(this).parent().parent().find("ol").toggle();
89
    });
89
    });
90
    // http://jqueryui.com/demos/datepicker/#date-range
91
    var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
92
        changeMonth: true,
93
        numberOfMonths: 1,
94
        onSelect: function( selectedDate ) {
95
            var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
96
                instance = $( this ).data( "datepicker" );
97
                date = $.datepicker.parseDate(
98
                    instance.settings.dateFormat ||
99
                    $.datepicker._defaults.dateFormat,
100
                    selectedDate, instance.settings );
101
            dates.not( this ).datepicker( "option", option, date );
102
        }
103
    });
104
    var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
105
        changeMonth: true,
106
        numberOfMonths: 1,
107
        onSelect: function( selectedDate ) {
108
            var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
109
                instance = $( this ).data( "datepicker" );
110
                date = $.datepicker.parseDate(
111
                    instance.settings.dateFormat ||
112
                    $.datepicker._defaults.dateFormat,
113
                    selectedDate, instance.settings );
114
            datesMD.not( this ).datepicker( "option", option, date );
115
        }
116
    });
117
    var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
118
        changeMonth: true,
119
        numberOfMonths: 1,
120
        onSelect: function( selectedDate ) {
121
            var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
122
                instance = $( this ).data( "datepicker" );
123
                date = $.datepicker.parseDate(
124
                    instance.settings.dateFormat ||
125
                    $.datepicker._defaults.dateFormat,
126
                    selectedDate, instance.settings );
127
            datesAD.not( this ).datepicker( "option", option, date );
128
        }
129
    });
90
});
130
});
91
// ]]>
131
// ]]>
92
</script>
132
</script>
Lines 474-501 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
474
                    <li><label for="suggesteddate_from"> Suggested on:</label>[% suggesteddate %]
514
                    <li><label for="suggesteddate_from"> Suggested on:</label>[% suggesteddate %]
475
                        <table class="invis">
515
                        <table class="invis">
476
                        <tr>
516
                        <tr>
477
                        <td>from :</td><td><input type="text" id="suggesteddate_from" name="suggesteddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="suggesteddate_from_button" alt="Show calendar" />
517
                        <td><label for="suggesteddate_from">from:</label></td><td><input type="text" id="suggesteddate_from" name="suggesteddate_from" style="width:80px;" /></td>
478
                        <script language="JavaScript" type="text/javascript">
479
                            Calendar.setup(
480
                            {
481
                                inputField : "suggesteddate_from",
482
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
483
                                //ifFormat : "%Y-%m-%d", 
484
                                button : "suggesteddate_from_button"
485
                            });
486
                        </script></td>
487
                        </tr>
518
                        </tr>
488
                        <tr>
519
                        <tr>
489
                        <td>to :</td><td><input type="text" id="suggesteddate_to" name="suggesteddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="suggesteddate_to_button" alt="Show calendar" />
520
                        <td><label for="suggesteddate_to">to:</label></td><td><input type="text" id="suggesteddate_to" name="suggesteddate_to" style="width:80px;" /></td>
490
                        <script language="JavaScript" type="text/javascript">
491
                            Calendar.setup(
492
                            {
493
                                inputField : "suggesteddate_to",
494
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
495
                                //ifFormat : "%Y-%m-%d", 
496
                                button : "suggesteddate_to_button"
497
                            });
498
                        </script></td>
499
                        </tr>
521
                        </tr>
500
                        </table>
522
                        </table>
501
                    </li>
523
                    </li>
Lines 505-532 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
505
                    <li><label for="manageddate_from"> Management date:</label>[% manageddate %]
527
                    <li><label for="manageddate_from"> Management date:</label>[% manageddate %]
506
                        <table class="invis">
528
                        <table class="invis">
507
                        <tr>
529
                        <tr>
508
                        <td>from :</td><td><input type="text" id="manageddate_from" name="manageddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="manageddate_from_button" alt="Show calendar" />
530
                        <td><label for="manageddate_from">from:</label></td><td><input type="text" id="manageddate_from" name="manageddate_from" style="width:80px;" /></td>
509
                        <script language="JavaScript" type="text/javascript">
510
                            Calendar.setup(
511
                            {
512
                                inputField : "manageddate_from",
513
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
514
                                //ifFormat : "%Y-%m-%d", 
515
                                button : "manageddate_from_button"
516
                            });
517
                        </script></td>
518
                        </tr>
531
                        </tr>
519
                        <tr>
532
                        <tr>
520
                        <td>to :</td><td><input type="text" id="manageddate_to" name="manageddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="manageddate_to_button" alt="Show calendar" />
533
                        <td><label for="manageddate_to">to:</label></td><td><input type="text" id="manageddate_to" name="manageddate_to" style="width:80px;" /></td>
521
                        <script language="JavaScript" type="text/javascript">
522
                            Calendar.setup(
523
                            {
524
                                inputField : "manageddate_to",
525
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
526
                                //ifFormat : "%Y-%m-%d", 
527
                                button : "manageddate_to_button"
528
                            });
529
                        </script></td>
530
                        </tr>
534
                        </tr>
531
                        </table>
535
                        </table>
532
                    </li>
536
                    </li>
Lines 536-563 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
536
                    <li><label for="accepteddate_from"> Accepted on:</label>[% accepteddate %]
540
                    <li><label for="accepteddate_from"> Accepted on:</label>[% accepteddate %]
537
                        <table class="invis">
541
                        <table class="invis">
538
                        <tr>
542
                        <tr>
539
                        <td>from :</td><td><input type="text" id="accepteddate_from" name="accepteddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="accepteddate_from_button" alt="Show calendar" />
543
                        <td><label for="accepteddate_from">from:</label></td><td><input type="text" id="accepteddate_from" name="accepteddate_from" style="width:80px;" /></td>
540
                        <script language="JavaScript" type="text/javascript">
541
                            Calendar.setup(
542
                            {
543
                                inputField : "accepteddate_from",
544
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
545
                                //ifFormat : "%Y-%m-%d", 
546
                                button : "accepteddate_from_button"
547
                            });
548
                        </script></td>
549
                        </tr>
544
                        </tr>
550
                        <tr>
545
                        <tr>
551
                        <td>to :</td><td><input type="text" id="accepteddate_to" name="accepteddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="accepteddate_to_button" alt="Show calendar" />
546
                        <td><label for="accepteddate_to">to:</label></td><td><input type="text" id="accepteddate_to" name="accepteddate_to" style="width:80px;" /></td>
552
                        <script language="JavaScript" type="text/javascript">
553
                            Calendar.setup(
554
                            {
555
                                inputField : "accepteddate_to",
556
                                ifFormat : "[% DHTMLcalendar_dateformat %]",
557
                                //ifFormat : "%Y-%m-%d", 
558
                                button : "accepteddate_to_button"
559
                            });
560
                        </script></td>
561
                        </tr>
547
                        </tr>
562
                        </table>
548
                        </table>
563
                    </li>
549
                    </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-44 / +3 lines)
Lines 321-379 td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
321
	    </li>
321
	    </li>
322
	    <li>
322
	    <li>
323
			<label for="from">Date: from </label>
323
			<label for="from">Date: from </label>
324
			<input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from %]" />
324
            <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from %]" class="datepickerfrom" />
325
            <img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show calendar" style="cursor: pointer;" id="openCalendarFrom" />
326
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
325
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
327
326
328
			<label for="to">...to </label>
327
			<label for="to">...to </label>
329
			<input type="text" size="10" id="to"   name="to"   value="[% filter_date_approved_to %]" />
328
            <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to %]" class="datepickerto" />
330
            <img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show calendar" style="cursor: pointer;" id="openCalendarTo" />
331
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
329
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
332
	    </li>
330
	    </li>
333
  </ol>
331
  </ol>
334
 <fieldset class="action"><input type="submit" value="Apply filter(s)" /></fieldset>
332
 <fieldset class="action"><input type="submit" value="Apply filter(s)" /></fieldset>
335
</fieldset>
333
</fieldset>
336
</form>
334
</form>
337
<script type="text/javascript">
335
</div>
338
//<![CDATA[
339
// function submit_check (from_id,to_id) {
340
//	var dateFrom = Date_from_syspref(document.getElementById(from_id).value);
341
//	var dateTo   = Date_from_syspref(document.getElementById(  to_id).value);
342
//	var today = new Date();
343
// 	if (dateFrom < dateTo) {
344
//		alert("The starting date cannot be after the ending date.");
345
//		document.getElementById(to_id).select();
346
//		return false;
347
//	}
348
// 	if (dateFrom > today) {
349
//		alert("The starting date cannot be in the future.");
350
//		document.getElementById(from_id).select();
351
//		return false;
352
//	}
353
// }
354
355
// return true if the date is blocked.
356
function disable_from(date) {var limit = get_Calendar_limit(date,'to'  ); return (limit && limit < date);}
357
function disable_to  (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}
358
359
Calendar.setup({
360
	inputField : "from",
361
	  ifFormat : "[% DHTMLcalendar_dateformat %]",
362
		button : "openCalendarFrom",
363
	   disableFunc : disable_from,
364
	dateStatusFunc : disable_from
365
});
366
Calendar.setup({
367
	inputField : "to",
368
	  ifFormat : "[% DHTMLcalendar_dateformat %]",
369
		button : "openCalendarTo",
370
	   disableFunc : disable_to,
371
	dateStatusFunc : disable_to
372
});
373
//]]>
374
</script>
375
376
 </div>
377
</div>
336
</div>
378
[% INCLUDE 'intranet-bottom.inc' %]
337
[% INCLUDE 'intranet-bottom.inc' %]
379
338
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt (-21 / +6 lines)
Lines 59-87 Link Here
59
    <legend>What do you want to do ?</legend>
59
    <legend>What do you want to do ?</legend>
60
        <p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
60
        <p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
61
        <label for="checkborrower">Delete borrower who has not borrowed since:</label>
61
        <label for="checkborrower">Delete borrower who has not borrowed since:</label>
62
        <input size="10" id="date1" name="filterdate1" value="[% filterdate1 %]" type="text" />
62
        <input size="10" id="date1" name="filterdate1" value="[% filterdate1 %]" type="text" class="datepicker" />
63
            <script type="text/javascript">
63
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
64
                Calendar.setup(
64
65
                 {
66
                     inputField : "date1",
67
                     ifFormat : "[% DHTMLcalendar_dateformat %]"
68
                 }
69
                );
70
            </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
71
        
72
        <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
65
        <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
73
        <label for="checkissue">Anonymize check-out history older than</label>
66
        <label for="checkissue">Anonymize check-out history older than</label>
74
        <input size="10" id="date2" name="filterdate2" value="[% filterdate2 %]" type="text" />
67
        <input size="10" id="date2" name="filterdate2" value="[% filterdate2 %]" type="text" class="datepicker" />
75
            <script type="text/javascript">
68
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
76
                Calendar.setup(
69
77
                 {
78
                     inputField : "date2",
79
                     ifFormat : "[% DHTMLcalendar_dateformat %]"
80
                 }
81
                );
82
            </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
83
84
            
85
            <!-- hidden here -->
70
            <!-- hidden here -->
86
            <input type="hidden" name="step2" value="1" />
71
            <input type="hidden" name="step2" value="1" />
87
			</fieldset>
72
			</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt (-29 / +7 lines)
Lines 1-10 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; MARC export</title>
2
<title>Koha &rsaquo; Tools &rsaquo; MARC export</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
7
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
8
</head>
5
</head>
9
<body id="tools_export" class="tools">
6
<body id="tools_export" class="tools">
10
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'header.inc' %]
Lines 70-102 Link Here
70
        </li>
67
        </li>
71
	<li>Accession date (inclusive):
68
	<li>Accession date (inclusive):
72
		<ul><li>
69
		<ul><li>
73
		<label for="start_accession">Start date:</label>
70
        <label for="from">Start date:</label>
74
		<input type="text" size="10" id="start_accession" name="start_accession" value="[% from %]" />
71
        <input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
75
		<img src="[% themelang %]/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
72
</li>
76
			<script language="JavaScript" type="text/javascript">
73
<li><label for="to">
77
Calendar.setup(
78
        {
79
        inputField : "start_accession",
80
        ifFormat : "[% DHTMLcalendar_dateformat %]",
81
        button : "openCalendarFrom"
82
        }
83
);
84
</script></li>
85
<li><label for="end_accession">
86
    End date:
74
    End date:
87
</label>
75
</label>
88
<input size="10" id="end_accession" name="end_accession" value="[% end_accession %]" type="text" />
76
<input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
89
<img src="[% themelang %]/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
77
</li>
90
<script type="text/javascript">
91
92
        Calendar.setup(
93
                {
94
                    inputField : "end_accession",
95
                    ifFormat : "[% DHTMLcalendar_dateformat %]",
96
                    button : "openCalendarTo"
97
                }
98
        );
99
</script></li>
100
</ul></li></ol>
78
</ul></li></ol>
101
    </fieldset>
79
    </fieldset>
102
    <fieldset class="rows">
80
    <fieldset class="rows">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-93 / +98 lines)
Lines 8-18 Link Here
8
8
9
	var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
9
	var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
10
10
11
	function holidayOperation(formObject, opType) {
11
    /* Creates all the structures to deal with all diferents kinds of holidays */
12
		var op = document.getElementsByName('operation');
12
    var week_days = new Array();
13
		op[0].value = opType;
13
    var holidays = new Array();
14
		formObject.submit();
14
    var holidates = new Array();
15
	}
15
    var exception_holidays = new Array();
16
    var day_month_holidays = new Array();
17
    var hola= "[% code %]";
18
    [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
19
    week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION %]"};
20
    [% END %]
21
    [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
22
    holidates.push("[% HOLIDAYS_LOO.KEY %]");
23
    holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE %]", description:"[% HOLIDAYS_LOO.DESCRIPTION %]"};
24
25
    [% END %]
26
    [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
27
    exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]"};
28
    [% END %]
29
    [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
30
    day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]"};
31
    [% END %]
32
33
    function holidayOperation(formObject, opType) {
34
        var op = document.getElementsByName('operation');
35
        op[0].value = opType;
36
        formObject.submit();
37
    }
16
38
17
	// This function shows the "Show Holiday" panel //
39
	// This function shows the "Show Holiday" panel //
18
	function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) {
40
	function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) {
Lines 83-88 Link Here
83
	function Help() {
105
	function Help() {
84
		newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
106
		newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
85
	}
107
	}
108
109
    /* This function gives css clases to each kind of day */
110
    function dateStatusHandler(date) {
111
        date = new Date(date);
112
        var day = date.getDate();
113
        var month = date.getMonth() + 1;
114
        var year = date.getFullYear();
115
        var weekDay = date.getDay();
116
        var dayMonth = month + '/' + day;
117
        var dateString = year + '/' + month + '/' + day;
118
        if (exception_holidays[dateString] != null) {
119
            return [true, "exception", "Exception: "+exception_holidays[dateString].title];
120
        } else if ( week_days[weekDay] != null ){
121
            return [true, "repeatableweekly", "Weekly holdiay: "+week_days[weekDay].title];
122
        } else if ( day_month_holidays[dayMonth] != null ) {
123
            return [true, "repeatableyearly", "Yearly holdiay: "+day_month_holidays[dayMonth].title];
124
        } else if (holidays[dateString] != null) {
125
            return [true, "holiday", "Single holiday: "+holidays[dateString].title];
126
        } else {
127
            return [true, "normalday", "Normal day"];
128
        }
129
    }
130
131
    /* This function is in charge of showing the correct panel considering the kind of holiday */
132
    function dateChanged(calendar) {
133
        calendar = new Date(calendar);
134
        var day = calendar.getDate();
135
        var month = calendar.getMonth() + 1;
136
        var year = calendar.getFullYear();
137
        var weekDay = calendar.getDay();
138
        var dayName = weekdays[weekDay];
139
        var dayMonth = month + '/' + day;
140
        var dateString = year + '/' + month + '/' + day;
141
            if (holidays[dateString] != null) {
142
                showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, 	holidays[dateString].description, 'ymd');
143
            } else if (exception_holidays[dateString] != null) {
144
                showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception');
145
            } else if (week_days[weekDay] != null) {
146
                showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, 	week_days[weekDay].description, 'weekday');
147
            } else if (day_month_holidays[dayMonth] != null) {
148
                showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth');
149
            } else {
150
                newHoliday(dayName, day, month, year, weekDay);
151
            }
152
    };
153
86
	$(document).ready(function() {
154
	$(document).ready(function() {
87
155
88
[% IF ( dateformat_metric ) %]		$.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
156
[% IF ( dateformat_metric ) %]		$.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
Lines 128-143 Link Here
128
		$("a.helptext").click(function(){
196
		$("a.helptext").click(function(){
129
			$(this).parent().find(".hint").toggle(); return false;
197
			$(this).parent().find(".hint").toggle(); return false;
130
		});
198
		});
199
        $("#dateofrange").datepicker();
131
		$("#dateofrange").each(function () { this.value = "" });
200
		$("#dateofrange").each(function () { this.value = "" });
201
        $("#jcalendar-container").datepicker({
202
          beforeShowDay: function(thedate) {
203
            var day = thedate.getDate();
204
            var month = thedate.getMonth() + 1;
205
            var year = thedate.getFullYear();
206
            var dateString = year + '/' + month + '/' + day;
207
            return dateStatusHandler(dateString);
208
            },
209
        onSelect: function(dateText, inst) {
210
            dateChanged($(this).datepicker("getDate"));
211
        },
212
        defaultDate: new Date("[% keydate %]")
213
    });
132
	});
214
	});
133
//]]>
215
//]]>
134
</script>
216
</script>
135
<style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; }
217
<style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; }
218
.ui-datepicker { font-size : 150%; }
219
.ui-datepicker th, .ui-datepicker .ui-datepicker-title select { font-size : 80%; }
220
.ui-datepicker td a { padding : .5em; }
221
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { font-size : 80%; }
222
.key { padding : 3px; white-space:nowrap; line-height:230%; }
136
.normalday { background-color :  #EDEDED; color :  Black; border : 1px solid #BCBCBC; }
223
.normalday { background-color :  #EDEDED; color :  Black; border : 1px solid #BCBCBC; }
137
.exception { background-color :  #b3d4ff; color :  Black; border : 1px solid #BCBCBC; }
224
.exception { background-color :  #b3d4ff; color :  Black; border : 1px solid #BCBCBC; }
138
.holiday {  background-color :  #ffaeae; color :  Black;  border : 1px solid #BCBCBC; }
225
.holiday {  background-color :  #ffaeae; color :  Black;  border : 1px solid #BCBCBC; }
139
.repeatableweekly {  background-color :  #FFFF99; color :  Black;  border : 1px solid #BCBCBC; }
226
.repeatableweekly {  background-color :  #FFFF99; color :  Black;  border : 1px solid #BCBCBC; }
140
.repeatableyearly {  background-color :  #FFCC66; color :  Black;  border : 1px solid #BCBCBC; }
227
.repeatableyearly {  background-color :  #FFCC66; color :  Black;  border : 1px solid #BCBCBC; }
228
td.exception a.ui-state-default, .exception { background:  #b3d4ff none; color :  Black; border : 1px solid #BCBCBC; }
229
td.holiday a.ui-state-default, .holiday {  background:  #ffaeae none; color :  Black;  border : 1px solid #BCBCBC; }
230
td.repeatableweekly a.ui-state-default, .repeatableweekly {  background:  #D8EFB3 none; color :  Black;  border : 1px solid #BCBCBC; }
231
td.repeatableyearly a.ui-state-default, .repeatableyearly {  background:  #FFFF99 none; color :  Black;  border : 1px solid #BCBCBC; }
141
.information { z-index : 1; background-color :  #DCD2F1; width : 300px; display : none; border : 1px solid #000000; color :  #000000; font-size :  8pt; font-weight :  bold; background-color :  #FFD700; cursor :  pointer; padding : 2px; }
232
.information { z-index : 1; background-color :  #DCD2F1; width : 300px; display : none; border : 1px solid #000000; color :  #000000; font-size :  8pt; font-weight :  bold; background-color :  #FFD700; cursor :  pointer; padding : 2px; }
142
.panel { z-index : 1; display : none; border : 3px solid #CCC; padding : 3px; margin-top: .3em;  background-color: #FEFEFE; } fieldset.brief { border : 0; margin-top: 0; }
233
.panel { z-index : 1; display : none; border : 3px solid #CCC; padding : 3px; margin-top: .3em;  background-color: #FEFEFE; } fieldset.brief { border : 0; margin-top: 0; }
143
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b fieldset.brief li.radio  { padding:0.2em 0; } .help { margin:.3em 0;border:1px solid #EEE;padding:.3em .7em; font-size : 90%; } #holidayweeklyrepeatable, #holidaysyearlyrepeatable, #holidaysunique, #holidayexceptions { font-size : 90%; margin-bottom : 1em;} .calendar td, .calendar th, .calendar .button, .calendar tbody .day { padding : .7em; font-size: 110%; } .calendar { width: auto; border : 0; }
234
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b fieldset.brief li.radio  { padding:0.2em 0; } .help { margin:.3em 0;border:1px solid #EEE;padding:.3em .7em; font-size : 90%; } #holidayweeklyrepeatable, #holidaysyearlyrepeatable, #holidaysunique, #holidayexceptions { font-size : 90%; margin-bottom : 1em;} .calendar td, .calendar th, .calendar .button, .calendar tbody .day { padding : .7em; font-size: 110%; } .calendar { width: auto; border : 0; }
Lines 248-264 Link Here
248
			</li>
339
			</li>
249
			<li class="dateinsert">
340
			<li class="dateinsert">
250
                <b>To date : </b>
341
                <b>To date : </b>
251
				<input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" />
342
                <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" class="datepicker" />
252
                <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofrange_button" alt="Show calendar" />
253
				<script language="JavaScript" type="text/javascript">
254
				Calendar.setup(
255
					{
256
					inputField : "dateofrange",
257
					ifFormat : "[% DHTMLcalendar_dateformat %]",
258
					button : "dateofrange_button"
259
					}
260
				);
261
				</script>
262
			</li>
343
			</li>
263
			<li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
344
			<li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
264
			<li><label for="newDescription">Description:</label>
345
			<li><label for="newDescription">Description:</label>
Lines 311-393 Link Here
311
<!-- ******                              MAIN SCREEN CODE                            ****** -->
392
<!-- ******                              MAIN SCREEN CODE                            ****** -->
312
<!-- ************************************************************************************** -->
393
<!-- ************************************************************************************** -->
313
<h3>Calendar information</h3>
394
<h3>Calendar information</h3>
314
<div id="calendar-container">
395
<div id="jcalendar-container"></div>
315
<script type="text/javascript">
316
	/* Creates all the structures to deal with all diferents kinds of holidays */
317
	var week_days = new Array();
318
	var holidays = new Array();
319
	var exception_holidays = new Array();
320
	var day_month_holidays = new Array();
321
	var hola= "[% code %]";
322
	[% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
323
	week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE | replace('"','\"') %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
324
	[% END %]
325
	[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
326
	holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
327
	[% END %]
328
	[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
329
	exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
330
	[% END %]
331
	[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
332
	day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
333
	[% END %]
334
335
	/* This function gives css clases to each kind of day */
336
	function dateStatusHandler(date) {
337
		var day = date.getDate();
338
		var month = date.getMonth() + 1;
339
		var year = date.getFullYear();
340
		var weekDay = date.getDay();
341
		var dayMonth = month + '/' + day;
342
		var dateString = year + '/' + month + '/' + day;
343
		if (exception_holidays[dateString] != null) {
344
			return 'exception';
345
		} else if ( week_days[weekDay] != null ){
346
			return 'repeatableweekly';
347
		} else if ( day_month_holidays[dayMonth] != null ) {
348
			return 'repeatableyearly';
349
		} else if (holidays[dateString] != null) {
350
			return 'holiday';
351
		} else {
352
			return 'normalday';
353
		}
354
	}
355
356
	/* This function is in charge of showing the correct panel considering the kind of holiday */
357
	function dateChanged(calendar) {
358
		var day = calendar.date.getDate();
359
		var month = calendar.date.getMonth() + 1;
360
		var year = calendar.date.getFullYear();
361
		var weekDay = calendar.date.getDay();
362
		var dayName = calendar.date.print('%A');
363
		var dayMonth = month + '/' + day;
364
		var dateString = year + '/' + month + '/' + day;
365
		if (calendar.dateClicked) {
366
			if (holidays[dateString] != null) {
367
				showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, 	holidays[dateString].description, 'ymd');
368
			} else if (exception_holidays[dateString] != null) {
369
				showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception');
370
			} else if (week_days[weekDay] != null) {
371
				showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, 	week_days[weekDay].description, 'weekday');
372
			} else if (day_month_holidays[dayMonth] != null) {
373
				showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth');
374
			} else {
375
				newHoliday(dayName, day, month, year, weekDay);
376
			}
377
		}
378
	};
379
	Calendar.setup(
380
		{
381
			flat : "calendar-container",
382
			flatCallback : dateChanged,
383
			date: "[% keydate %]",
384
			dateStatusFunc : dateStatusHandler
385
		}
386
	);
387
</script>
388
389
390
</div>
391
396
392
<div style="margin-top: 2em;">
397
<div style="margin-top: 2em;">
393
<form action="copy-holidays.pl" method="post">
398
<form action="copy-holidays.pl" method="post">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-22 / +2 lines)
Lines 58-74 $(document).ready(function(){ Link Here
58
            <legend>Use a barcode file</legend>
58
            <legend>Use a barcode file</legend>
59
	 <ol>
59
	 <ol>
60
            <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
60
            <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
61
            <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today %]" />
61
            <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today %]" class="datepicker" />
62
             <img src="[% themelang %]/lib/calendar/cal.gif" id="setdate_button" alt="Show calendar" />
63
            <script type="text/javascript">
64
            Calendar.setup(
65
            {
66
            inputField : "setdate",
67
            ifFormat : "[% DHTMLcalendar_dateformat %]",
68
            button : "setdate_button"
69
            }
70
            );
71
            </script>
72
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
62
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
73
            </li>
63
            </li>
74
          </ol>
64
          </ol>
Lines 141-157 $(document).ready(function(){ Link Here
141
        [% END %]
131
        [% END %]
142
132
143
        <li><label for="datelastseen">Inventory date:</label>
133
        <li><label for="datelastseen">Inventory date:</label>
144
            <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen %]" />
134
            <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen %]" class="datepicker"/>
145
            <img src="[% themelang %]/lib/calendar/cal.gif" id="datelastseen_button" alt="Show Calendar" />
146
            <script type="text/javascript">
147
            Calendar.setup(
148
            {
149
            inputField : "datelastseen",
150
            ifFormat : "[% DHTMLcalendar_dateformat %]",
151
            button : "datelastseen_button"
152
            }
153
            );
154
            </script>
155
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
135
			<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
156
        </li>
136
        </li>
157
        <li><label for="ignoreissued">Skip copies on loan: </label>
137
        <li><label for="ignoreissued">Skip copies on loan: </label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt (-24 / +4 lines)
Lines 87-119 Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]</div> Link Here
87
                <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" />
87
                <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" />
88
            </li>
88
            </li>
89
            <li>
89
            <li>
90
                <label for="timestamp">Publication date</label>
90
                <label for="from">Publication date</label>
91
                <input id="timestamp" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" />
91
                <input id="from" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" class="datepickerfrom" />
92
                <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="timestampButton" style="cursor: pointer;" />
93
                <script type="text/javascript">
94
                    Calendar.setup(
95
                    {
96
                        button : "timestampButton",
97
                        inputField : "timestamp",
98
                        ifFormat : "[% DHTMLcalendar_dateformat %]"
99
                    }
100
                    );
101
                </script>
102
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
92
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
103
            </li>
93
            </li>
104
            <li>
94
            <li>
105
                <label for="expirationdate">Expiration date</label>
95
                <label for="to">Expiration date</label>
106
                <input id="expirationdate" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" />
96
                <input id="to" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" class="datepickerto" />
107
                <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendar" style="cursor: pointer;" />
108
                <script type="text/javascript">
109
                    Calendar.setup(
110
                    {
111
                        button : "openCalendar",
112
                        inputField : "expirationdate",
113
                        ifFormat : "[% DHTMLcalendar_dateformat %]"
114
                    }
115
                    );
116
                </script>
117
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
97
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
118
            </li>
98
            </li>
119
            <li>
99
            <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-13 / +2 lines)
Lines 258-277 Link Here
258
                                                [% END %]
258
                                                [% END %]
259
                                            [% END %]
259
                                            [% END %]
260
                                            [% IF ( field.type == 'date' ) %]
260
                                            [% IF ( field.type == 'date' ) %]
261
                                                <img src="[% themelang %]/lib/calendar/cal.gif" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" id="[% field.name %]button"/>
261
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" />
262
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly />
263
                                                <a href="#" onclick="clearDate('[% field.name %]');return false;">X</a>
262
                                                <a href="#" onclick="clearDate('[% field.name %]');return false;">X</a>
264
                                                <script type="text/javascript">
263
                                                [% END %]
265
                                                 //<![CDATA[
266
                                                Calendar.setup({
267
                                                    inputField      : "[% field.name %]",
268
                                                    button          : "[% field.name %]button",
269
                                                    ifFormat        : "[% DHTMLcalendar_dateformat %]",
270
                                                    onClose: function() { $("#[% field.name %]").change(); this.hide();}
271
                                                });
272
                                                //]]>
273
                                                </script>
274
                                            [% END %]
275
                                        </li>
264
                                        </li>
276
                                        [% END %]
265
                                        [% END %]
277
                                        [% IF ( patron_attributes_codes ) %]
266
                                        [% IF ( patron_attributes_codes ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt (-11 / +7 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Tools &rsaquo; Task scheduler</title>
2
<title>Koha &rsaquo; Tools &rsaquo; Task scheduler</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/JavaScript">
6
//<![CDATA[
7
    $(document).ready(function(){
8
        $("#startdate").datepicker({ minDate: "+0D" });
9
    });
10
//]]>
11
</script>
5
</head>
12
</head>
6
<body id="tools_scheduler" class="tools">
13
<body id="tools_scheduler" class="tools">
7
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
Lines 31-47 Link Here
31
<li><label for="starttime">Time:</label>
38
<li><label for="starttime">Time:</label>
32
<input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" /></li>
39
<input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" /></li>
33
<li><label for="startdate">Date: </label> <input type="text" size="10" id="startdate" name="startdate" value="" />
40
<li><label for="startdate">Date: </label> <input type="text" size="10" id="startdate" name="startdate" value="" />
34
<img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show calendar" id="openCalendarStartdate" style="cursor: pointer;" />
35
36
<script type="text/javascript">
37
//<![CDATA[
38
				Calendar.setup({
39
					inputField : "startdate",
40
					ifFormat : "[% DHTMLcalendar_dateformat %]",
41
					button : "openCalendarStartdate"
42
				});
43
//]]>
44
</script>
45
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
41
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
46
</li>
42
</li>
47
<li><label for="report">Report:</label>
43
<li><label for="report">Report:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-29 / +4 lines)
Lines 75-110 Link Here
75
								<input type="text" id="info" name="info" value="[% info %]" />
75
								<input type="text" id="info" name="info" value="[% info %]" />
76
							</li>
76
							</li>
77
							<li>
77
							<li>
78
								<label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" />
78
                                <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" class="datepickerfrom" />
79
                                <img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show calendar" id="openCalendarFrom" style="cursor: pointer;" />
80
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
79
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
81
							</li>
80
							</li>
82
							<li>
81
							<li>
83
								<label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto %]" />
82
                                <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto %]" class="datepickerto" />
84
                                <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" alt="Show calendar" style="cursor: pointer;" border="0" />
85
									<script type="text/javascript">
86
									//<![CDATA[
87
88
									// return true if the date is blocked.
89
									function disable_from(date) {var limit = get_Calendar_limit(date,'to'  ); return (limit && limit < date);}
90
									function disable_to  (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}
91
92
									Calendar.setup({
93
										inputField : "from",
94
										ifFormat : "[% DHTMLcalendar_dateformat %]",
95
										button : "openCalendarFrom",
96
										disableFunc : disable_from,
97
										dateStatusFunc : disable_from
98
									});
99
									Calendar.setup({
100
										inputField : "to",
101
										ifFormat : "[% DHTMLcalendar_dateformat %]",
102
										button : "openCalendarTo",
103
										disableFunc : disable_to,
104
										dateStatusFunc : disable_to
105
									});
106
									//]]>
107
									</script>
108
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
83
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
109
							</li>
84
							</li>
110
						</ol>
85
						</ol>
Lines 173-179 Link Here
173
                                            [% ELSE %]
148
                                            [% ELSE %]
174
                                                [% IF ( module == 'CATALOGUING' ) %]
149
                                                [% IF ( module == 'CATALOGUING' ) %]
175
                                                    [% IF ( info == 'item' ) %]
150
                                                    [% IF ( info == 'item' ) %]
176
                                                        <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
151
                                                        <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&amp;biblionumber=[% loopro.biblionumber %]&amp;bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
177
                                                    [% ELSE %]
152
                                                    [% ELSE %]
178
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
153
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
179
                                                    [% END %]
154
                                                    [% END %]
Lines 193-199 Link Here
193
                                    </td>
168
                                    </td>
194
                                    <td>
169
                                    <td>
195
                                        [% IF ( loopro.CIRCULATION ) %]
170
                                        [% IF ( loopro.CIRCULATION ) %]
196
                                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.info %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]" title="Display detail for this biblio">Item [% loopro.barcode |html %]</a>
171
                                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.info %]&amp;biblionumber=[% loopro.biblionumber %]&amp;bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]" title="Display detail for this biblio">Item [% loopro.barcode |html %]</a>
197
                                        [% ELSE %]
172
                                        [% ELSE %]
198
                                            [% loopro.info |html %]
173
                                            [% loopro.info |html %]
199
                                        [% END %]
174
                                        [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (+11 lines)
Lines 2598-2603 ul.ui-tabs-nav li { Link Here
2598
}
2598
}
2599
2599
2600
2600
2601
/* jQuery UI Datepicker */
2602
.ui-datepicker-trigger {
2603
    vertical-align: middle;
2604
    margin : 0 3px;
2605
}
2606
.ui-datepicker {
2607
    -moz-box-shadow: 1px 1px 3px 0 #666;
2608
    -webkit-box-shadow: 1px 1px 3px 0 #666;
2609
    box-shadow: 1px 1px 3px 0 #666;
2610
}
2611
2601
/* ## BABELTHEQUE ## */
2612
/* ## BABELTHEQUE ## */
2602
/* Uncomment if babeltheque configuration no contains these lines */
2613
/* Uncomment if babeltheque configuration no contains these lines */
2603
/*
2614
/*
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc (-106 lines)
Lines 1-106 Link Here
1
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css"/>
2
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
3
<script type="text/javascript">
4
// full day names
5
Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday"));
6
// short day names
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
8
// First day of the week. "0" means display Sunday first, "1" means display
9
// Monday first, etc.
10
Calendar._FD = 1;
11
// full month names
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
13
// short month names
14
Calendar._SMN = new Array(_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec"));
15
// tooltips
16
Calendar._TT = {};
17
Calendar._TT["INFO"] = _("About the calendar");
18
19
Calendar._TT["ABOUT"] =
20
_("Dhtml Date/Time Selector")+"\n" +
21
"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
22
_("For latest version visit: http://dynarch.com/mishoo/calendar.epl")+"\n" +
23
_("Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details.") +
24
"\n\n" +
25
_("Date selection:")+"\n" +
26
_("- Use the \xab, \xbb buttons to select year")+"\n" +
27
_("- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month")+"\n" +
28
_("- Hold mouse button on any of the above buttons for faster selection.");
29
Calendar._TT["ABOUT_TIME"] = "\n\n" +
30
_("Time selection:")+"\n" +
31
_("- Click on any of the time parts to increase it")+"\n" +
32
_("- or Shift-click to decrease it")+"\n" +
33
_("- or click and drag for faster selection.");
34
35
Calendar._TT["PREV_YEAR"] = _("Prev. year (hold for menu)");
36
Calendar._TT["PREV_MONTH"] = _("Prev. month (hold for menu)");
37
Calendar._TT["GO_TODAY"] = _("Go to Today");
38
Calendar._TT["NEXT_MONTH"] = _("Next month (hold for menu)");
39
Calendar._TT["NEXT_YEAR"] = _("Next year (hold for menu)");
40
Calendar._TT["SEL_DATE"] = _("Select date");
41
Calendar._TT["DRAG_TO_MOVE"] = _("Drag to move");
42
Calendar._TT["PART_TODAY"] = _(" (today)");
43
44
// the following is to inform that "%s" is to be the first day of week
45
// %s will be replaced with the day name.
46
Calendar._TT["DAY_FIRST"] = _("Display %s first");
47
48
// This may be locale-dependent.  It specifies the week-end days, as an array
49
// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
50
// means Monday, etc.
51
Calendar._TT["WEEKEND"] = "0,6";
52
53
Calendar._TT["CLOSE"] = _("Close");
54
Calendar._TT["TODAY"] = _("Today");
55
Calendar._TT["TIME_PART"] = _("(Shift-)Click or drag to change value");
56
57
// date formats
58
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
59
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
60
61
Calendar._TT["WK"] = _("wk");
62
Calendar._TT["TIME"] = _("Time:");
63
</script>
64
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
65
<script type="text/javascript">
66
//<![CDATA[
67
var debug    = "[% debug %]";
68
var dformat  = "[% dateformat %]";
69
var sentmsg = 0;
70
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
71
72
function Date_from_syspref(dstring) {
73
	var dateX = dstring.split(/[-/]/);
74
	if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));}
75
	if (dformat === "iso") {
76
		return new Date(dateX[0], (dateX[1] - 1), dateX[2]);  // YYYY-MM-DD to (YYYY,m(0-11),d)
77
	} else if (dformat === "us") {
78
		return new Date(dateX[2], (dateX[0] - 1), dateX[1]);  // MM/DD/YYYY to (YYYY,m(0-11),d)
79
	} else if (dformat === "metric") {
80
		return new Date(dateX[2], (dateX[1] - 1), dateX[0]);  // DD/MM/YYYY to (YYYY,m(0-11),d)
81
	} else {
82
		if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);}
83
		return 0;
84
	}
85
}
86
87
function get_Calendar_limit (date,did) {
88
	// this function could be moved to a static calendar-extras.js file
89
	var dvalue = document.getElementById(did).value;
90
	if (dvalue == "") { return false; }
91
	var limitDate = Date_from_syspref(dvalue);
92
	if (debug && debug > 5) {
93
		var month = date.getMonth() + 1;
94
		var dateString = date.getFullYear() + '-' + month + '-' + date.getDate();
95
		alert("Comparing incoming (" + dateString + ") vs "
96
			+ "'" + did + "' limit\n"
97
			+ "\n thisdate: " + date
98
			+ "\nlimitdate: " + limitDate
99
			+ "\nlimit > thisdate : " + (limitDate > date) 
100
			+ "\nlimit < thisdate : " + (limitDate < date) 
101
		);
102
	}
103
	return limitDate;
104
}
105
//]]>
106
</script>
(-)a/koha-tmpl/opac-tmpl/prog/en/js/script.js (+24 lines)
Lines 7-17 function Dopop(link) { Link Here
7
	newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes,resizeable=yes');
7
	newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes,resizeable=yes');
8
}
8
}
9
9
10
$.datepicker.setDefaults({
11
        showOn: "both",
12
        changeMonth: true,
13
        changeYear: true,
14
        buttonImage: '/opac-tmpl/prog/famfamfam/silk/calendar.png',
15
        buttonImageOnly: true,
16
        showButtonPanel: true
17
    });
18
10
$(document).ready(function(){
19
$(document).ready(function(){
11
	$(".close").click(function(){
20
	$(".close").click(function(){
12
		window.close();
21
		window.close();
13
	});
22
	});
14
	$(".focus").focus();
23
	$(".focus").focus();
24
    $( ".datepicker" ).datepicker();
25
    // http://jqueryui.com/demos/datepicker/#date-range
26
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
27
        changeMonth: true,
28
        numberOfMonths: 1,
29
        onSelect: function( selectedDate ) {
30
            var option = this.id == "from" ? "minDate" : "maxDate",
31
                instance = $( this ).data( "datepicker" );
32
                date = $.datepicker.parseDate(
33
                    instance.settings.dateFormat ||
34
                    $.datepicker._defaults.dateFormat,
35
                    selectedDate, instance.settings );
36
            dates.not( this ).datepicker( "option", option, date );
37
        }
38
    });
15
	// clear the basket when user logs out
39
	// clear the basket when user logs out
16
	$("#logout").click(function(){
40
	$("#logout").click(function(){
17
		var nameCookie = "bib_list";
41
		var nameCookie = "bib_list";
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/calendar/calendar-en.js (-127 lines)
Lines 1-127 Link Here
1
// ** I18N
2
3
// Calendar EN language
4
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
5
// Encoding: any
6
// Distributed under the same terms as the calendar itself.
7
8
// For translators: please use UTF-8 if possible.  We strongly believe that
9
// Unicode is the answer to a real internationalized world.  Also please
10
// include your contact information in the header, as can be seen above.
11
12
// full day names
13
Calendar._DN = new Array
14
("Sunday",
15
 "Monday",
16
 "Tuesday",
17
 "Wednesday",
18
 "Thursday",
19
 "Friday",
20
 "Saturday",
21
 "Sunday");
22
23
// Please note that the following array of short day names (and the same goes
24
// for short month names, _SMN) isn't absolutely necessary.  We give it here
25
// for exemplification on how one can customize the short day names, but if
26
// they are simply the first N letters of the full name you can simply say:
27
//
28
//   Calendar._SDN_len = N; // short day name length
29
//   Calendar._SMN_len = N; // short month name length
30
//
31
// If N = 3 then this is not needed either since we assume a value of 3 if not
32
// present, to be compatible with translation files that were written before
33
// this feature.
34
35
// short day names
36
Calendar._SDN = new Array
37
("Sun",
38
 "Mon",
39
 "Tue",
40
 "Wed",
41
 "Thu",
42
 "Fri",
43
 "Sat",
44
 "Sun");
45
46
// First day of the week. "0" means display Sunday first, "1" means display
47
// Monday first, etc.
48
Calendar._FD = 0;
49
50
// full month names
51
Calendar._MN = new Array
52
("January",
53
 "February",
54
 "March",
55
 "April",
56
 "May",
57
 "June",
58
 "July",
59
 "August",
60
 "September",
61
 "October",
62
 "November",
63
 "December");
64
65
// short month names
66
Calendar._SMN = new Array
67
("Jan",
68
 "Feb",
69
 "Mar",
70
 "Apr",
71
 "May",
72
 "Jun",
73
 "Jul",
74
 "Aug",
75
 "Sep",
76
 "Oct",
77
 "Nov",
78
 "Dec");
79
80
// tooltips
81
Calendar._TT = {};
82
Calendar._TT["INFO"] = "About the calendar";
83
84
Calendar._TT["ABOUT"] =
85
"DHTML Date/Time Selector\n" +
86
"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
87
"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
88
"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
89
"\n\n" +
90
"Date selection:\n" +
91
"- Use the \xab, \xbb buttons to select year\n" +
92
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
93
"- Hold mouse button on any of the above buttons for faster selection.";
94
Calendar._TT["ABOUT_TIME"] = "\n\n" +
95
"Time selection:\n" +
96
"- Click on any of the time parts to increase it\n" +
97
"- or Shift-click to decrease it\n" +
98
"- or click and drag for faster selection.";
99
100
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
101
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
102
Calendar._TT["GO_TODAY"] = "Go Today";
103
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
104
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
105
Calendar._TT["SEL_DATE"] = "Select date";
106
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
107
Calendar._TT["PART_TODAY"] = " (today)";
108
109
// the following is to inform that "%s" is to be the first day of week
110
// %s will be replaced with the day name.
111
Calendar._TT["DAY_FIRST"] = "Display %s first";
112
113
// This may be locale-dependent.  It specifies the week-end days, as an array
114
// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
115
// means Monday, etc.
116
Calendar._TT["WEEKEND"] = "0,6";
117
118
Calendar._TT["CLOSE"] = "Close";
119
Calendar._TT["TODAY"] = "Today";
120
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
121
122
// date formats
123
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
124
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
125
126
Calendar._TT["WK"] = "wk";
127
Calendar._TT["TIME"] = "Time:";
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/calendar/calendar-setup.js (-179 lines)
Lines 1-179 Link Here
1
/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
2
 * ---------------------------------------------------------------------------
3
 *
4
 * The DHTML Calendar
5
 *
6
 * Details and latest version at:
7
 * http://dynarch.com/mishoo/calendar.epl
8
 *
9
 * This script is distributed under the GNU Lesser General Public License.
10
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
11
 *
12
 * This file defines helper functions for setting up the calendar.  They are
13
 * intended to help non-programmers get a working calendar on their site
14
 * quickly.  This script should not be seen as part of the calendar.  It just
15
 * shows you what one can do with the calendar, while in the same time
16
 * providing a quick and simple method for setting it up.  If you need
17
 * exhaustive customization of the calendar creation process feel free to
18
 * modify this code to suit your needs (this is recommended and much better
19
 * than modifying calendar.js itself).
20
 */
21
22
/**
23
 *  This function "patches" an input field (or other element) to use a calendar
24
 *  widget for date selection.
25
 *
26
 *  The "params" is a single object that can have the following properties:
27
 *
28
 *    prop. name   | description
29
 *  -------------------------------------------------------------------------------------------------
30
 *   inputField    | the ID of an input field to store the date
31
 *   displayArea   | the ID of a DIV or other element to show the date
32
 *   button        | ID of a button or other element that will trigger the calendar
33
 *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
34
 *   ifFormat      | date format that will be stored in the input field
35
 *   daFormat      | the date format that will be used to display the date in displayArea
36
 *   singleClick   | (true/false) whether the calendar is in single click mode or not (default: true)
37
 *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
38
 *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
39
 *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
40
 *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
41
 *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
42
 *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
43
 *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
44
 *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
45
 *   onClose       | function that gets called when the calendar is closed.  [default]
46
 *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
47
 *   date          | the date that the calendar will be initially displayed to
48
 *   showsTime     | default: false; if true the calendar will include a time selector
49
 *   timeFormat    | the time format; can be "12" or "24", default is "12"
50
 *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
51
 *   step          | configures the step of the years in drop-down boxes; default: 2
52
 *   position      | configures the calendar absolute position; default: null
53
 *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
54
 *   showOthers    | if "true" (but default: "false") it will show days from other months too
55
 *
56
 *  None of them is required, they all have default values.  However, if you
57
 *  pass none of "inputField", "displayArea" or "button" you'll get a warning
58
 *  saying "nothing to setup".
59
 */
60
Calendar.setup = function (params) {
61
	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
62
63
	param_default("inputField",     null);
64
	param_default("displayArea",    null);
65
	param_default("button",         null);
66
	param_default("eventName",      "click");
67
	param_default("ifFormat",       "%Y/%m/%d");
68
	param_default("daFormat",       "%Y/%m/%d");
69
	param_default("singleClick",    true);
70
	param_default("disableFunc",    'dateStatusHandler');
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
72
	param_default("firstDay",       0); // defaults to "Sunday" first
73
	param_default("align",          "Br");
74
	param_default("range",          [1900, 2999]);
75
	param_default("weekNumbers",    true);
76
	param_default("flat",           null);
77
	param_default("flatCallback",   null);
78
	param_default("onSelect",       null);
79
	param_default("onClose",        null);
80
	param_default("onUpdate",       null);
81
	param_default("date",           null);
82
	param_default("showsTime",      false);
83
	param_default("timeFormat",     "24");
84
	param_default("electric",       true);
85
	param_default("step",           2);
86
	param_default("position",       null);
87
	param_default("cache",          false);
88
	param_default("showOthers",     false);
89
90
	var tmp = ["inputField", "displayArea", "button"];
91
	for (var i in tmp) {
92
		if (typeof params[tmp[i]] == "string") {
93
			params[tmp[i]] = document.getElementById(params[tmp[i]]);
94
		}
95
	}
96
	if (!(params.flat || params.inputField || params.displayArea || params.button)) {
97
		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
98
		return false;
99
	}
100
101
	function onSelect(cal) {
102
		var p = cal.params;
103
		var update = (cal.dateClicked || p.electric);
104
		if (update && p.flat) {
105
			if (typeof p.flatCallback == "function")
106
				p.flatCallback(cal);
107
			else
108
				alert("No flatCallback given -- doing nothing.");
109
			return false;
110
		}
111
		if (update && p.inputField) {
112
			p.inputField.value = cal.date.print(p.ifFormat);
113
			if (typeof p.inputField.onchange == "function")
114
				p.inputField.onchange();
115
		}
116
		if (update && p.displayArea)
117
			p.displayArea.innerHTML = cal.date.print(p.daFormat);
118
		if (update && p.singleClick && cal.dateClicked)
119
			cal.callCloseHandler();
120
		if (update && typeof p.onUpdate == "function")
121
			p.onUpdate(cal);
122
	};
123
124
	if (params.flat != null) {
125
		if (typeof params.flat == "string")
126
			params.flat = document.getElementById(params.flat);
127
		if (!params.flat) {
128
			alert("Calendar.setup:\n  Flat specified but can't find parent.");
129
			return false;
130
		}
131
		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
132
		cal.showsTime = params.showsTime;
133
		cal.time24 = (params.timeFormat == "24");
134
		cal.params = params;
135
		cal.weekNumbers = params.weekNumbers;
136
		cal.setRange(params.range[0], params.range[1]);
137
		cal.setDateStatusHandler(params.dateStatusFunc);
138
		cal.create(params.flat);
139
		cal.show();
140
		return false;
141
	}
142
143
	var triggerEl = params.button || params.displayArea || params.inputField;
144
	triggerEl["on" + params.eventName] = function() {
145
		var dateEl = params.inputField || params.displayArea;
146
		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
147
		var mustCreate = false;
148
		var cal = window.calendar;
149
		if (!(cal && params.cache)) {
150
			window.calendar = cal = new Calendar(params.firstDay,
151
							     params.date,
152
							     params.onSelect || onSelect,
153
							     params.onClose || function(cal) { cal.hide(); });
154
			cal.showsTime = params.showsTime;
155
			cal.time24 = (params.timeFormat == "24");
156
			cal.weekNumbers = params.weekNumbers;
157
			mustCreate = true;
158
		} else {
159
			if (params.date)
160
				cal.setDate(params.date);
161
			cal.hide();
162
		}
163
		cal.showsOtherMonths = params.showOthers;
164
		cal.yearStep = params.step;
165
		cal.setRange(params.range[0], params.range[1]);
166
		cal.params = params;
167
		cal.setDateStatusHandler(params.dateStatusFunc);
168
		cal.setDateFormat(dateFmt);
169
		if (mustCreate)
170
			cal.create();
171
		cal.parseDate(dateEl.value || dateEl.innerHTML);
172
		cal.refresh();
173
		if (!params.position)
174
			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
175
		else
176
			cal.showAt(params.position[0], params.position[1]);
177
		return false;
178
	};
179
};
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/calendar/calendar-system.css (-254 lines)
Lines 1-254 Link Here
1
/* The main calendar widget.  DIV containing a table. */
2
3
.calendar {
4
  position: relative;
5
  display: none;
6
  border: 1px solid;
7
  border-color: #fff #000 #000 #fff;
8
  font-size: 11px;
9
  cursor: default;
10
  background: Window;
11
  color: WindowText;
12
  font-family: tahoma,verdana,sans-serif;
13
  width:250px;
14
}
15
16
.calendar table {
17
  border: 1px solid;
18
  border-color: #fff #000 #000 #fff;
19
  font-size: 11px;
20
  cursor: default;
21
  background: Window;
22
  color: WindowText;
23
  font-family: tahoma,verdana,sans-serif;
24
  border-collapse:separate;
25
}
26
27
/* Header part -- contains navigation buttons and day names. */
28
29
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
30
  text-align: center;
31
  padding: 1px;
32
  border: 1px solid;
33
  display: table-cell;
34
  -moz-border-radius: 0px;
35
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
36
  background: ButtonFace;
37
}
38
39
.calendar .nav {
40
  background: ButtonFace url('menuarrow.gif') no-repeat 100% 100%;
41
}
42
43
.calendar thead .title { /* This holds the current "month, year" */
44
  font-weight: bold;
45
  padding: 1px;
46
  border: 1px solid #000;
47
  background: ActiveCaption;
48
  color: CaptionText;
49
  text-align: center;
50
}
51
52
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
53
}
54
55
.calendar thead .daynames { /* Row <TR> containing the day names */
56
}
57
58
.calendar thead .name { /* Cells <TD> containing the day names */
59
  border-bottom: 1px solid ButtonShadow;
60
  padding: 2px;
61
  text-align: center;
62
  background: ButtonFace;
63
  color: ButtonText;
64
}
65
66
.calendar thead .weekend { /* How a weekend day name shows in header */
67
//  color: #f00;
68
}
69
70
.calendar thead .hilite { /* How do the buttons in header appear when hover */
71
  border: 2px solid;
72
  padding: 0px;
73
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
74
}
75
76
.calendar thead .active { /* Active (pressed) buttons in header */
77
  border-width: 1px;
78
  padding: 2px 0px 0px 2px;
79
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
80
}
81
82
/* The body part -- contains all the days in month. */
83
84
.calendar tbody .day { /* Cells <TD> containing month days dates */
85
  width: 2em;
86
  text-align: right;
87
  padding: 2px 4px 2px 2px;
88
}
89
.calendar tbody .day.othermonth {
90
  font-size: 80%;
91
  color: #aaa;
92
}
93
.calendar tbody .day.othermonth.oweekend {
94
  color: #faa;
95
}
96
97
.calendar table .wn {
98
  padding: 2px 3px 2px 2px;
99
  border-right: 1px solid ButtonShadow;
100
  background: ButtonFace;
101
  color: ButtonText;
102
}
103
104
.calendar tbody .rowhilite td {
105
//  background: Highlight;
106
//  color: HighlightText;
107
}
108
109
.calendar tbody td.hilite { /* Hovered cells <TD> */
110
  padding: 1px 3px 1px 1px;
111
  border-top: 1px solid #fff;
112
  border-right: 1px solid #000;
113
  border-bottom: 1px solid #000;
114
  border-left: 1px solid #fff;
115
}
116
117
.calendar tbody td.active { /* Active (pressed) cells <TD> */
118
//  padding: 2px 2px 0px 2px;
119
//  border: 1px solid;
120
//  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
121
}
122
123
.calendar tbody td.selected { /* Cell showing selected date */
124
  font-weight: bold;
125
  border: 1px solid;
126
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
127
  padding: 2px 2px 0px 2px;
128
  // background: ButtonFace;
129
  color: ButtonText;
130
}
131
132
.calendar tbody td.weekend { /* Cells showing weekend days */
133
//  color: #f00;
134
}
135
136
.calendar tbody td.today { /* Cell showing today date */
137
  font-weight: bold;
138
  color: #00f;
139
}
140
141
.calendar tbody td.disabled { color: GrayText; }
142
143
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
144
  visibility: hidden;
145
}
146
147
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
148
  display: none;
149
}
150
151
/* The footer part -- status bar and "Close" button */
152
153
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
154
}
155
156
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
157
  background: ButtonFace;
158
  padding: 1px;
159
  border: 1px solid;
160
  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
161
  color: ButtonText;
162
  text-align: center;
163
}
164
165
.calendar tfoot .hilite { /* Hover style for buttons in footer */
166
  border-top: 1px solid #fff;
167
  border-right: 1px solid #000;
168
  border-bottom: 1px solid #000;
169
  border-left: 1px solid #fff;
170
  padding: 1px;
171
  background: #e4e0d8;
172
}
173
174
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
175
  padding: 2px 0px 0px 2px;
176
  border-top: 1px solid #000;
177
  border-right: 1px solid #fff;
178
  border-bottom: 1px solid #fff;
179
  border-left: 1px solid #000;
180
}
181
182
/* Combo boxes (menus that display months/years for direct selection) */
183
184
.calendar .combo {
185
  position: absolute;
186
  display: none;
187
  width: 4em;
188
  top: 0px;
189
  left: 0px;
190
  cursor: default;
191
  border: 1px solid;
192
  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
193
  background: Menu;
194
  color: MenuText;
195
  font-size: 90%;
196
  padding: 1px;
197
}
198
199
.calendar .combo .label,
200
.calendar .combo .label-IEfix {
201
  text-align: center;
202
  padding: 1px;
203
}
204
205
.calendar .combo .label-IEfix {
206
  width: 4em;
207
}
208
209
.calendar .combo .active {
210
  padding: 0px;
211
  border: 1px solid #000;
212
}
213
214
.calendar .combo .hilite {
215
  background: Highlight;
216
  color: HighlightText;
217
}
218
219
.calendar td.time {
220
  border-top: 1px solid ButtonShadow;
221
  padding: 1px 0px;
222
  text-align: center;
223
  background-color: ButtonFace;
224
}
225
226
.calendar td.time .hour,
227
.calendar td.time .minute,
228
.calendar td.time .ampm {
229
  padding: 0px 3px 0px 4px;
230
  border: 1px solid #889;
231
  font-weight: bold;
232
  background-color: Menu;
233
}
234
235
.calendar td.time .ampm {
236
  text-align: center;
237
}
238
239
.calendar td.time .colon {
240
  padding: 0px 2px 0px 3px;
241
  font-weight: bold;
242
}
243
244
.calendar td.time span.hilite {
245
  border-color: #000;
246
  background-color: Highlight;
247
  color: HighlightText;
248
}
249
250
.calendar td.time span.active {
251
  border-color: #f00;
252
  background-color: #000;
253
  color: #0f0;
254
}
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/calendar/calendar.js (-1714 lines)
Lines 1-1714 Link Here
1
/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
2
 * ------------------------------------------------------------------
3
 *
4
 * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
5
 *
6
 * Details and latest version at:
7
 * http://dynarch.com/mishoo/calendar.epl
8
 *
9
 * This script is distributed under the GNU Lesser General Public License.
10
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
11
 */
12
13
14
/** The Calendar object constructor. */
15
Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
16
	// member variables
17
	this.activeDiv = null;
18
	this.currentDateEl = null;
19
	this.getDateStatus = null;
20
	this.timeout = null;
21
	this.onSelected = onSelected || null;
22
	this.onClose = onClose || null;
23
	this.dragging = false;
24
	this.hidden = false;
25
	this.minYear = 1970;
26
	this.maxYear = 2050;
27
	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
28
	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
29
	this.isPopup = true;
30
	this.weekNumbers = true;
31
	this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
32
	this.showsOtherMonths = false;
33
	this.dateStr = dateStr;
34
	this.ar_days = null;
35
	this.showsTime = false;
36
	this.time24 = true;
37
	this.yearStep = 2;
38
	// HTML elements
39
	this.table = null;
40
	this.element = null;
41
	this.tbody = null;
42
	this.firstdayname = null;
43
	// Combo boxes
44
	this.monthsCombo = null;
45
	this.yearsCombo = null;
46
	this.hilitedMonth = null;
47
	this.activeMonth = null;
48
	this.hilitedYear = null;
49
	this.activeYear = null;
50
	// Information
51
	this.dateClicked = false;
52
53
	// one-time initializations
54
	if (typeof Calendar._SDN == "undefined") {
55
		// table of short day names
56
		if (typeof Calendar._SDN_len == "undefined")
57
			Calendar._SDN_len = 3;
58
		var ar = new Array();
59
		for (var i = 8; i > 0;) {
60
			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
61
		}
62
		Calendar._SDN = ar;
63
		// table of short month names
64
		if (typeof Calendar._SMN_len == "undefined")
65
			Calendar._SMN_len = 3;
66
		ar = new Array();
67
		for (var i = 12; i > 0;) {
68
			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
69
		}
70
		Calendar._SMN = ar;
71
	}
72
};
73
74
// ** constants
75
76
/// "static", needed for event handlers.
77
Calendar._C = null;
78
79
/// detect a special case of "web browser"
80
Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
81
		   !/opera/i.test(navigator.userAgent) );
82
83
Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
84
85
/// detect Opera browser
86
Calendar.is_opera = /opera/i.test(navigator.userAgent);
87
88
/// detect KHTML-based browsers
89
Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
90
91
// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
92
//        library, at some point.
93
94
Calendar.getAbsolutePos = function(el) {
95
	var SL = 0, ST = 0;
96
	var is_div = /^div$/i.test(el.tagName);
97
	if (is_div && el.scrollLeft)
98
		SL = el.scrollLeft;
99
	if (is_div && el.scrollTop)
100
		ST = el.scrollTop;
101
	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
102
	if (el.offsetParent) {
103
		var tmp = this.getAbsolutePos(el.offsetParent);
104
		r.x += tmp.x;
105
		r.y += tmp.y;
106
	}
107
	return r;
108
};
109
110
Calendar.isRelated = function (el, evt) {
111
	var related = evt.relatedTarget;
112
	if (!related) {
113
		var type = evt.type;
114
		if (type == "mouseover") {
115
			related = evt.fromElement;
116
		} else if (type == "mouseout") {
117
			related = evt.toElement;
118
		}
119
	}
120
	while (related) {
121
		if (related == el) {
122
			return true;
123
		}
124
		related = related.parentNode;
125
	}
126
	return false;
127
};
128
129
Calendar.removeClass = function(el, className) {
130
	if (!(el && el.className)) {
131
		return;
132
	}
133
	var cls = el.className.split(" ");
134
	var ar = new Array();
135
	for (var i = cls.length; i > 0;) {
136
		if (cls[--i] != className) {
137
			ar[ar.length] = cls[i];
138
		}
139
	}
140
	el.className = ar.join(" ");
141
};
142
143
Calendar.addClass = function(el, className) {
144
	Calendar.removeClass(el, className);
145
	el.className += " " + className;
146
};
147
148
Calendar.getElement = function(ev) {
149
	if (Calendar.is_ie) {
150
		return window.event.srcElement;
151
	} else {
152
		return ev.currentTarget;
153
	}
154
};
155
156
Calendar.getTargetElement = function(ev) {
157
	if (Calendar.is_ie) {
158
		return window.event.srcElement;
159
	} else {
160
		return ev.target;
161
	}
162
};
163
164
Calendar.stopEvent = function(ev) {
165
	ev || (ev = window.event);
166
	if (Calendar.is_ie) {
167
		ev.cancelBubble = true;
168
		ev.returnValue = false;
169
	} else {
170
		ev.preventDefault();
171
		ev.stopPropagation();
172
	}
173
	return false;
174
};
175
176
Calendar.addEvent = function(el, evname, func) {
177
	if (el.attachEvent) { // IE
178
		el.attachEvent("on" + evname, func);
179
	} else if (el.addEventListener) { // Gecko / W3C
180
		el.addEventListener(evname, func, true);
181
	} else {
182
		el["on" + evname] = func;
183
	}
184
};
185
186
Calendar.removeEvent = function(el, evname, func) {
187
	if (el.detachEvent) { // IE
188
		el.detachEvent("on" + evname, func);
189
	} else if (el.removeEventListener) { // Gecko / W3C
190
		el.removeEventListener(evname, func, true);
191
	} else {
192
		el["on" + evname] = null;
193
	}
194
};
195
196
Calendar.createElement = function(type, parent) {
197
	var el = null;
198
	if (document.createElementNS) {
199
		// use the XHTML namespace; IE won't normally get here unless
200
		// _they_ "fix" the DOM2 implementation.
201
		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
202
	} else {
203
		el = document.createElement(type);
204
	}
205
	if (typeof parent != "undefined") {
206
		parent.appendChild(el);
207
	}
208
	return el;
209
};
210
211
// END: UTILITY FUNCTIONS
212
213
// BEGIN: CALENDAR STATIC FUNCTIONS
214
215
/** Internal -- adds a set of events to make some element behave like a button. */
216
Calendar._add_evs = function(el) {
217
	with (Calendar) {
218
		addEvent(el, "mouseover", dayMouseOver);
219
		addEvent(el, "mousedown", dayMouseDown);
220
		addEvent(el, "mouseout", dayMouseOut);
221
		if (is_ie) {
222
			addEvent(el, "dblclick", dayMouseDblClick);
223
			el.setAttribute("unselectable", true);
224
		}
225
	}
226
};
227
228
Calendar.findMonth = function(el) {
229
	if (typeof el.month != "undefined") {
230
		return el;
231
	} else if (typeof el.parentNode.month != "undefined") {
232
		return el.parentNode;
233
	}
234
	return null;
235
};
236
237
Calendar.findYear = function(el) {
238
	if (typeof el.year != "undefined") {
239
		return el;
240
	} else if (typeof el.parentNode.year != "undefined") {
241
		return el.parentNode;
242
	}
243
	return null;
244
};
245
246
Calendar.showMonthsCombo = function () {
247
	var cal = Calendar._C;
248
	if (!cal) {
249
		return false;
250
	}
251
	var cal = cal;
252
	var cd = cal.activeDiv;
253
	var mc = cal.monthsCombo;
254
	if (cal.hilitedMonth) {
255
		Calendar.removeClass(cal.hilitedMonth, "hilite");
256
	}
257
	if (cal.activeMonth) {
258
		Calendar.removeClass(cal.activeMonth, "active");
259
	}
260
	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
261
	Calendar.addClass(mon, "active");
262
	cal.activeMonth = mon;
263
	var s = mc.style;
264
	s.display = "block";
265
	if (cd.navtype < 0)
266
		s.left = cd.offsetLeft + "px";
267
	else {
268
		var mcw = mc.offsetWidth;
269
		if (typeof mcw == "undefined")
270
			// Konqueror brain-dead techniques
271
			mcw = 50;
272
		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
273
	}
274
	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
275
};
276
277
Calendar.showYearsCombo = function (fwd) {
278
	var cal = Calendar._C;
279
	if (!cal) {
280
		return false;
281
	}
282
	var cal = cal;
283
	var cd = cal.activeDiv;
284
	var yc = cal.yearsCombo;
285
	if (cal.hilitedYear) {
286
		Calendar.removeClass(cal.hilitedYear, "hilite");
287
	}
288
	if (cal.activeYear) {
289
		Calendar.removeClass(cal.activeYear, "active");
290
	}
291
	cal.activeYear = null;
292
	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
293
	var yr = yc.firstChild;
294
	var show = false;
295
	for (var i = 12; i > 0; --i) {
296
		if (Y >= cal.minYear && Y <= cal.maxYear) {
297
			yr.firstChild.data = Y;
298
			yr.year = Y;
299
			yr.style.display = "block";
300
			show = true;
301
		} else {
302
			yr.style.display = "none";
303
		}
304
		yr = yr.nextSibling;
305
		Y += fwd ? cal.yearStep : -cal.yearStep;
306
	}
307
	if (show) {
308
		var s = yc.style;
309
		s.display = "block";
310
		if (cd.navtype < 0)
311
			s.left = cd.offsetLeft + "px";
312
		else {
313
			var ycw = yc.offsetWidth;
314
			if (typeof ycw == "undefined")
315
				// Konqueror brain-dead techniques
316
				ycw = 50;
317
			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
318
		}
319
		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
320
	}
321
};
322
323
// event handlers
324
325
Calendar.tableMouseUp = function(ev) {
326
	var cal = Calendar._C;
327
	if (!cal) {
328
		return false;
329
	}
330
	if (cal.timeout) {
331
		clearTimeout(cal.timeout);
332
	}
333
	var el = cal.activeDiv;
334
	if (!el) {
335
		return false;
336
	}
337
	var target = Calendar.getTargetElement(ev);
338
	ev || (ev = window.event);
339
	Calendar.removeClass(el, "active");
340
	if (target == el || target.parentNode == el) {
341
		Calendar.cellClick(el, ev);
342
	}
343
	var mon = Calendar.findMonth(target);
344
	var date = null;
345
	if (mon) {
346
		date = new Date(cal.date);
347
		if (mon.month != date.getMonth()) {
348
			date.setMonth(mon.month);
349
			cal.setDate(date);
350
			cal.dateClicked = false;
351
			cal.callHandler();
352
		}
353
	} else {
354
		var year = Calendar.findYear(target);
355
		if (year) {
356
			date = new Date(cal.date);
357
			if (year.year != date.getFullYear()) {
358
				date.setFullYear(year.year);
359
				cal.setDate(date);
360
				cal.dateClicked = false;
361
				cal.callHandler();
362
			}
363
		}
364
	}
365
	with (Calendar) {
366
		removeEvent(document, "mouseup", tableMouseUp);
367
		removeEvent(document, "mouseover", tableMouseOver);
368
		removeEvent(document, "mousemove", tableMouseOver);
369
		cal._hideCombos();
370
		_C = null;
371
		return stopEvent(ev);
372
	}
373
};
374
375
Calendar.tableMouseOver = function (ev) {
376
	var cal = Calendar._C;
377
	if (!cal) {
378
		return;
379
	}
380
	var el = cal.activeDiv;
381
	var target = Calendar.getTargetElement(ev);
382
	if (target == el || target.parentNode == el) {
383
		Calendar.addClass(el, "hilite active");
384
		Calendar.addClass(el.parentNode, "rowhilite");
385
	} else {
386
		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
387
			Calendar.removeClass(el, "active");
388
		Calendar.removeClass(el, "hilite");
389
		Calendar.removeClass(el.parentNode, "rowhilite");
390
	}
391
	ev || (ev = window.event);
392
	if (el.navtype == 50 && target != el) {
393
		var pos = Calendar.getAbsolutePos(el);
394
		var w = el.offsetWidth;
395
		var x = ev.clientX;
396
		var dx;
397
		var decrease = true;
398
		if (x > pos.x + w) {
399
			dx = x - pos.x - w;
400
			decrease = false;
401
		} else
402
			dx = pos.x - x;
403
404
		if (dx < 0) dx = 0;
405
		var range = el._range;
406
		var current = el._current;
407
		var count = Math.floor(dx / 10) % range.length;
408
		for (var i = range.length; --i >= 0;)
409
			if (range[i] == current)
410
				break;
411
		while (count-- > 0)
412
			if (decrease) {
413
				if (--i < 0)
414
					i = range.length - 1;
415
			} else if ( ++i >= range.length )
416
				i = 0;
417
		var newval = range[i];
418
		el.firstChild.data = newval;
419
420
		cal.onUpdateTime();
421
	}
422
	var mon = Calendar.findMonth(target);
423
	if (mon) {
424
		if (mon.month != cal.date.getMonth()) {
425
			if (cal.hilitedMonth) {
426
				Calendar.removeClass(cal.hilitedMonth, "hilite");
427
			}
428
			Calendar.addClass(mon, "hilite");
429
			cal.hilitedMonth = mon;
430
		} else if (cal.hilitedMonth) {
431
			Calendar.removeClass(cal.hilitedMonth, "hilite");
432
		}
433
	} else {
434
		if (cal.hilitedMonth) {
435
			Calendar.removeClass(cal.hilitedMonth, "hilite");
436
		}
437
		var year = Calendar.findYear(target);
438
		if (year) {
439
			if (year.year != cal.date.getFullYear()) {
440
				if (cal.hilitedYear) {
441
					Calendar.removeClass(cal.hilitedYear, "hilite");
442
				}
443
				Calendar.addClass(year, "hilite");
444
				cal.hilitedYear = year;
445
			} else if (cal.hilitedYear) {
446
				Calendar.removeClass(cal.hilitedYear, "hilite");
447
			}
448
		} else if (cal.hilitedYear) {
449
			Calendar.removeClass(cal.hilitedYear, "hilite");
450
		}
451
	}
452
	return Calendar.stopEvent(ev);
453
};
454
455
Calendar.tableMouseDown = function (ev) {
456
	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
457
		return Calendar.stopEvent(ev);
458
	}
459
};
460
461
Calendar.calDragIt = function (ev) {
462
	var cal = Calendar._C;
463
	if (!(cal && cal.dragging)) {
464
		return false;
465
	}
466
	var posX;
467
	var posY;
468
	if (Calendar.is_ie) {
469
		posY = window.event.clientY + document.body.scrollTop;
470
		posX = window.event.clientX + document.body.scrollLeft;
471
	} else {
472
		posX = ev.pageX;
473
		posY = ev.pageY;
474
	}
475
	// cal.hideShowCovered();
476
	var st = cal.element.style;
477
	st.left = (posX - cal.xOffs) + "px";
478
	st.top = (posY - cal.yOffs) + "px";
479
	return Calendar.stopEvent(ev);
480
};
481
482
Calendar.calDragEnd = function (ev) {
483
	var cal = Calendar._C;
484
	if (!cal) {
485
		return false;
486
	}
487
	cal.dragging = false;
488
	with (Calendar) {
489
		removeEvent(document, "mousemove", calDragIt);
490
		removeEvent(document, "mouseup", calDragEnd);
491
		tableMouseUp(ev);
492
	}
493
	// cal.hideShowCovered();
494
};
495
496
Calendar.dayMouseDown = function(ev) {
497
	var el = Calendar.getElement(ev);
498
	if (el.disabled) {
499
		return false;
500
	}
501
	var cal = el.calendar;
502
	cal.activeDiv = el;
503
	Calendar._C = cal;
504
	if (el.navtype != 300) with (Calendar) {
505
		if (el.navtype == 50) {
506
			el._current = el.firstChild.data;
507
			addEvent(document, "mousemove", tableMouseOver);
508
		} else
509
			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
510
		addClass(el, "hilite active");
511
		addEvent(document, "mouseup", tableMouseUp);
512
	} else if (cal.isPopup) {
513
		cal._dragStart(ev);
514
	}
515
	if (el.navtype == -1 || el.navtype == 1) {
516
		if (cal.timeout) clearTimeout(cal.timeout);
517
		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
518
	} else if (el.navtype == -2 || el.navtype == 2) {
519
		if (cal.timeout) clearTimeout(cal.timeout);
520
		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
521
	} else {
522
		cal.timeout = null;
523
	}
524
	return Calendar.stopEvent(ev);
525
};
526
527
Calendar.dayMouseDblClick = function(ev) {
528
	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
529
	if (Calendar.is_ie) {
530
		document.selection.empty();
531
	}
532
};
533
534
Calendar.dayMouseOver = function(ev) {
535
	var el = Calendar.getElement(ev);
536
	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
537
		return false;
538
	}
539
	if (el.ttip) {
540
		if (el.ttip.substr(0, 1) == "_") {
541
			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
542
		}
543
		el.calendar.tooltips.firstChild.data = el.ttip;
544
	}
545
	if (el.navtype != 300) {
546
		Calendar.addClass(el, "hilite");
547
		if (el.caldate) {
548
			Calendar.addClass(el.parentNode, "rowhilite");
549
		}
550
	}
551
	return Calendar.stopEvent(ev);
552
};
553
554
Calendar.dayMouseOut = function(ev) {
555
	with (Calendar) {
556
		var el = getElement(ev);
557
		if (isRelated(el, ev) || _C || el.disabled) {
558
			return false;
559
		}
560
		removeClass(el, "hilite");
561
		if (el.caldate) {
562
			removeClass(el.parentNode, "rowhilite");
563
		}
564
		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
565
		return stopEvent(ev);
566
	}
567
};
568
569
/**
570
 *  A generic "click" handler :) handles all types of buttons defined in this
571
 *  calendar.
572
 */
573
Calendar.cellClick = function(el, ev) {
574
	var cal = el.calendar;
575
	var closing = false;
576
	var newdate = false;
577
	var date = null;
578
	if (typeof el.navtype == "undefined") {
579
		Calendar.removeClass(cal.currentDateEl, "selected");
580
		Calendar.addClass(el, "selected");
581
		closing = (cal.currentDateEl == el);
582
		if (!closing) {
583
			cal.currentDateEl = el;
584
		}
585
		cal.date = new Date(el.caldate);
586
		date = cal.date;
587
		newdate = true;
588
		// a date was clicked
589
		if (!(cal.dateClicked = !el.otherMonth))
590
			cal._init(cal.firstDayOfWeek, date);
591
	} else {
592
		if (el.navtype == 200) {
593
			Calendar.removeClass(el, "hilite");
594
			cal.callCloseHandler();
595
			return;
596
		}
597
		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
598
		// unless "today" was clicked, we assume no date was clicked so
599
		// the selected handler will know not to close the calenar when
600
		// in single-click mode.
601
		// cal.dateClicked = (el.navtype == 0);
602
		cal.dateClicked = false;
603
		var year = date.getFullYear();
604
		var mon = date.getMonth();
605
		function setMonth(m) {
606
			var day = date.getDate();
607
			var max = date.getMonthDays(m);
608
			if (day > max) {
609
				date.setDate(max);
610
			}
611
			date.setMonth(m);
612
		};
613
		switch (el.navtype) {
614
		    case 400:
615
			Calendar.removeClass(el, "hilite");
616
			var text = Calendar._TT["ABOUT"];
617
			if (typeof text != "undefined") {
618
				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
619
			} else {
620
				// FIXME: this should be removed as soon as lang files get updated!
621
				text = "Help and about box text is not translated into this language.\n" +
622
					"If you know this language and you feel generous please update\n" +
623
					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
624
					"and send it back to <mishoo@infoiasi.ro> to get it into the distribution  ;-)\n\n" +
625
					"Thank you!\n" +
626
					"http://dynarch.com/mishoo/calendar.epl\n";
627
			}
628
			alert(text);
629
			return;
630
		    case -2:
631
			if (year > cal.minYear) {
632
				date.setFullYear(year - 1);
633
			}
634
			break;
635
		    case -1:
636
			if (mon > 0) {
637
				setMonth(mon - 1);
638
			} else if (year-- > cal.minYear) {
639
				date.setFullYear(year);
640
				setMonth(11);
641
			}
642
			break;
643
		    case 1:
644
			if (mon < 11) {
645
				setMonth(mon + 1);
646
			} else if (year < cal.maxYear) {
647
				date.setFullYear(year + 1);
648
				setMonth(0);
649
			}
650
			break;
651
		    case 2:
652
			if (year < cal.maxYear) {
653
				date.setFullYear(year + 1);
654
			}
655
			break;
656
		    case 100:
657
			cal.setFirstDayOfWeek(el.fdow);
658
			return;
659
		    case 50:
660
			var range = el._range;
661
			var current = el.firstChild.data;
662
			for (var i = range.length; --i >= 0;)
663
				if (range[i] == current)
664
					break;
665
			if (ev && ev.shiftKey) {
666
				if (--i < 0)
667
					i = range.length - 1;
668
			} else if ( ++i >= range.length )
669
				i = 0;
670
			var newval = range[i];
671
			el.firstChild.data = newval;
672
			cal.onUpdateTime();
673
			return;
674
		    case 0:
675
			// TODAY will bring us here
676
			if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
677
				// remember, "date" was previously set to new
678
				// Date() if TODAY was clicked; thus, it
679
				// contains today date.
680
				return false;
681
			}
682
			break;
683
		}
684
		if (!date.equalsTo(cal.date)) {
685
			cal.setDate(date);
686
			newdate = true;
687
		}
688
	}
689
	if (newdate) {
690
		cal.callHandler();
691
	}
692
	if (closing) {
693
		Calendar.removeClass(el, "hilite");
694
		cal.callCloseHandler();
695
	}
696
};
697
698
// END: CALENDAR STATIC FUNCTIONS
699
700
// BEGIN: CALENDAR OBJECT FUNCTIONS
701
702
/**
703
 *  This function creates the calendar inside the given parent.  If _par is
704
 *  null than it creates a popup calendar inside the BODY element.  If _par is
705
 *  an element, be it BODY, then it creates a non-popup calendar (still
706
 *  hidden).  Some properties need to be set before calling this function.
707
 */
708
Calendar.prototype.create = function (_par) {
709
	var parent = null;
710
	if (! _par) {
711
		// default parent is the document body, in which case we create
712
		// a popup calendar.
713
		parent = document.getElementsByTagName("body")[0];
714
		this.isPopup = true;
715
	} else {
716
		parent = _par;
717
		this.isPopup = false;
718
	}
719
	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
720
721
	var table = Calendar.createElement("table");
722
	this.table = table;
723
	table.cellSpacing = 0;
724
	table.cellPadding = 0;
725
	table.calendar = this;
726
	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
727
728
	var div = Calendar.createElement("div");
729
	this.element = div;
730
	div.className = "calendar";
731
	if (this.isPopup) {
732
		div.style.position = "absolute";
733
		div.style.display = "none";
734
	}
735
	div.appendChild(table);
736
737
	var thead = Calendar.createElement("thead", table);
738
	var cell = null;
739
	var row = null;
740
741
	var cal = this;
742
	var hh = function (text, cs, navtype) {
743
		cell = Calendar.createElement("td", row);
744
		cell.colSpan = cs;
745
		cell.className = "button";
746
		if (navtype != 0 && Math.abs(navtype) <= 2)
747
			cell.className += " nav";
748
		Calendar._add_evs(cell);
749
		cell.calendar = cal;
750
		cell.navtype = navtype;
751
		if (text.substr(0, 1) != "&") {
752
			cell.appendChild(document.createTextNode(text));
753
		}
754
		else {
755
			// FIXME: dirty hack for entities
756
			cell.innerHTML = text;
757
		}
758
		return cell;
759
	};
760
761
	row = Calendar.createElement("tr", thead);
762
	var title_length = 6;
763
	(this.isPopup) && --title_length;
764
	(this.weekNumbers) && ++title_length;
765
766
	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
767
	this.title = hh("", title_length, 300);
768
	this.title.className = "title";
769
	if (this.isPopup) {
770
		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
771
		this.title.style.cursor = "move";
772
		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
773
	}
774
775
	row = Calendar.createElement("tr", thead);
776
	row.className = "headrow";
777
778
	this._nav_py = hh("&#x00ab;", 1, -2);
779
	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
780
781
	this._nav_pm = hh("&#x2039;", 1, -1);
782
	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
783
784
	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
785
	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
786
787
	this._nav_nm = hh("&#x203a;", 1, 1);
788
	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
789
790
	this._nav_ny = hh("&#x00bb;", 1, 2);
791
	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
792
793
	// day names
794
	row = Calendar.createElement("tr", thead);
795
	row.className = "daynames";
796
	if (this.weekNumbers) {
797
		cell = Calendar.createElement("td", row);
798
		cell.className = "name wn";
799
		cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
800
	}
801
	for (var i = 7; i > 0; --i) {
802
		cell = Calendar.createElement("td", row);
803
		cell.appendChild(document.createTextNode(""));
804
		if (!i) {
805
			cell.navtype = 100;
806
			cell.calendar = this;
807
			Calendar._add_evs(cell);
808
		}
809
	}
810
	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
811
	this._displayWeekdays();
812
813
	var tbody = Calendar.createElement("tbody", table);
814
	this.tbody = tbody;
815
816
	for (i = 6; i > 0; --i) {
817
		row = Calendar.createElement("tr", tbody);
818
		if (this.weekNumbers) {
819
			cell = Calendar.createElement("td", row);
820
			cell.appendChild(document.createTextNode(""));
821
		}
822
		for (var j = 7; j > 0; --j) {
823
			cell = Calendar.createElement("td", row);
824
			cell.appendChild(document.createTextNode(""));
825
			cell.calendar = this;
826
			Calendar._add_evs(cell);
827
		}
828
	}
829
830
	if (this.showsTime) {
831
		row = Calendar.createElement("tr", tbody);
832
		row.className = "time";
833
834
		cell = Calendar.createElement("td", row);
835
		cell.className = "time";
836
		cell.colSpan = 2;
837
		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";
838
839
		cell = Calendar.createElement("td", row);
840
		cell.className = "time";
841
		cell.colSpan = this.weekNumbers ? 4 : 3;
842
843
		(function(){
844
			function makeTimePart(className, init, range_start, range_end) {
845
				var part = Calendar.createElement("span", cell);
846
				part.className = className;
847
				part.appendChild(document.createTextNode(init));
848
				part.calendar = cal;
849
				part.ttip = Calendar._TT["TIME_PART"];
850
				part.navtype = 50;
851
				part._range = [];
852
				if (typeof range_start != "number")
853
					part._range = range_start;
854
				else {
855
					for (var i = range_start; i <= range_end; ++i) {
856
						var txt;
857
						if (i < 10 && range_end >= 10) txt = '0' + i;
858
						else txt = '' + i;
859
						part._range[part._range.length] = txt;
860
					}
861
				}
862
				Calendar._add_evs(part);
863
				return part;
864
			};
865
			var hrs = cal.date.getHours();
866
			var mins = cal.date.getMinutes();
867
			var t12 = !cal.time24;
868
			var pm = (hrs > 12);
869
			if (t12 && pm) hrs -= 12;
870
			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
871
			var span = Calendar.createElement("span", cell);
872
			span.appendChild(document.createTextNode(":"));
873
			span.className = "colon";
874
			var M = makeTimePart("minute", mins, 0, 59);
875
			var AP = null;
876
			cell = Calendar.createElement("td", row);
877
			cell.className = "time";
878
			cell.colSpan = 2;
879
			if (t12)
880
				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
881
			else
882
				cell.innerHTML = "&nbsp;";
883
884
			cal.onSetTime = function() {
885
				var hrs = this.date.getHours();
886
				var mins = this.date.getMinutes();
887
				var pm = (hrs > 12);
888
				if (pm && t12) hrs -= 12;
889
				H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
890
				M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
891
				if (t12)
892
					AP.firstChild.data = pm ? "pm" : "am";
893
			};
894
895
			cal.onUpdateTime = function() {
896
				var date = this.date;
897
				var h = parseInt(H.firstChild.data, 10);
898
				if (t12) {
899
					if (/pm/i.test(AP.firstChild.data) && h < 12)
900
						h += 12;
901
					else if (/am/i.test(AP.firstChild.data) && h == 12)
902
						h = 0;
903
				}
904
				var d = date.getDate();
905
				var m = date.getMonth();
906
				var y = date.getFullYear();
907
				date.setHours(h);
908
				date.setMinutes(parseInt(M.firstChild.data, 10));
909
				date.setFullYear(y);
910
				date.setMonth(m);
911
				date.setDate(d);
912
				this.dateClicked = false;
913
				this.callHandler();
914
			};
915
		})();
916
	} else {
917
		this.onSetTime = this.onUpdateTime = function() {};
918
	}
919
920
	var tfoot = Calendar.createElement("tfoot", table);
921
922
	row = Calendar.createElement("tr", tfoot);
923
	row.className = "footrow";
924
925
	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
926
	cell.className = "ttip";
927
	if (this.isPopup) {
928
		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
929
		cell.style.cursor = "move";
930
	}
931
	this.tooltips = cell;
932
933
	div = Calendar.createElement("div", this.element);
934
	this.monthsCombo = div;
935
	div.className = "combo";
936
	for (i = 0; i < Calendar._MN.length; ++i) {
937
		var mn = Calendar.createElement("div");
938
		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
939
		mn.month = i;
940
		mn.appendChild(document.createTextNode(Calendar._SMN[i]));
941
		div.appendChild(mn);
942
	}
943
944
	div = Calendar.createElement("div", this.element);
945
	this.yearsCombo = div;
946
	div.className = "combo";
947
	for (i = 12; i > 0; --i) {
948
		var yr = Calendar.createElement("div");
949
		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
950
		yr.appendChild(document.createTextNode(""));
951
		div.appendChild(yr);
952
	}
953
954
	this._init(this.firstDayOfWeek, this.date);
955
	parent.appendChild(this.element);
956
};
957
958
/** keyboard navigation, only for popup calendars */
959
Calendar._keyEvent = function(ev) {
960
	if (!window.calendar) {
961
		return false;
962
	}
963
	(Calendar.is_ie) && (ev = window.event);
964
	var cal = window.calendar;
965
	var act = (Calendar.is_ie || ev.type == "keypress");
966
	if (ev.ctrlKey) {
967
		switch (ev.keyCode) {
968
		    case 37: // KEY left
969
			act && Calendar.cellClick(cal._nav_pm);
970
			break;
971
		    case 38: // KEY up
972
			act && Calendar.cellClick(cal._nav_py);
973
			break;
974
		    case 39: // KEY right
975
			act && Calendar.cellClick(cal._nav_nm);
976
			break;
977
		    case 40: // KEY down
978
			act && Calendar.cellClick(cal._nav_ny);
979
			break;
980
		    default:
981
			return false;
982
		}
983
	} else switch (ev.keyCode) {
984
	    case 32: // KEY space (now)
985
		Calendar.cellClick(cal._nav_now);
986
		break;
987
	    case 27: // KEY esc
988
		act && cal.callCloseHandler();
989
		break;
990
	    case 37: // KEY left
991
	    case 38: // KEY up
992
	    case 39: // KEY right
993
	    case 40: // KEY down
994
		if (act) {
995
			var date = cal.date.getDate() - 1;
996
			var el = cal.currentDateEl;
997
			var ne = null;
998
			var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
999
			switch (ev.keyCode) {
1000
			    case 37: // KEY left
1001
				(--date >= 0) && (ne = cal.ar_days[date]);
1002
				break;
1003
			    case 38: // KEY up
1004
				date -= 7;
1005
				(date >= 0) && (ne = cal.ar_days[date]);
1006
				break;
1007
			    case 39: // KEY right
1008
				(++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
1009
				break;
1010
			    case 40: // KEY down
1011
				date += 7;
1012
				(date < cal.ar_days.length) && (ne = cal.ar_days[date]);
1013
				break;
1014
			}
1015
			if (!ne) {
1016
				if (prev) {
1017
					Calendar.cellClick(cal._nav_pm);
1018
				} else {
1019
					Calendar.cellClick(cal._nav_nm);
1020
				}
1021
				date = (prev) ? cal.date.getMonthDays() : 1;
1022
				el = cal.currentDateEl;
1023
				ne = cal.ar_days[date - 1];
1024
			}
1025
			Calendar.removeClass(el, "selected");
1026
			Calendar.addClass(ne, "selected");
1027
			cal.date = new Date(ne.caldate);
1028
			cal.callHandler();
1029
			cal.currentDateEl = ne;
1030
		}
1031
		break;
1032
	    case 13: // KEY enter
1033
		if (act) {
1034
			cal.callHandler();
1035
			cal.hide();
1036
		}
1037
		break;
1038
	    default:
1039
		return false;
1040
	}
1041
	return Calendar.stopEvent(ev);
1042
};
1043
1044
/**
1045
 *  (RE)Initializes the calendar to the given date and firstDayOfWeek
1046
 */
1047
Calendar.prototype._init = function (firstDayOfWeek, date) {
1048
	var today = new Date();
1049
	this.table.style.visibility = "hidden";
1050
	var year = date.getFullYear();
1051
	if (year < this.minYear) {
1052
		year = this.minYear;
1053
		date.setFullYear(year);
1054
	} else if (year > this.maxYear) {
1055
		year = this.maxYear;
1056
		date.setFullYear(year);
1057
	}
1058
	this.firstDayOfWeek = firstDayOfWeek;
1059
	this.date = new Date(date);
1060
	var month = date.getMonth();
1061
	var mday = date.getDate();
1062
	var no_days = date.getMonthDays();
1063
1064
	// calendar voodoo for computing the first day that would actually be
1065
	// displayed in the calendar, even if it's from the previous month.
1066
	// WARNING: this is magic. ;-)
1067
	date.setDate(1);
1068
	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
1069
	if (day1 < 0)
1070
		day1 += 7;
1071
	date.setDate(-day1);
1072
	date.setDate(date.getDate() + 1);
1073
1074
	var row = this.tbody.firstChild;
1075
	var MN = Calendar._SMN[month];
1076
	var ar_days = new Array();
1077
	var weekend = Calendar._TT["WEEKEND"];
1078
	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
1079
		var cell = row.firstChild;
1080
		if (this.weekNumbers) {
1081
			cell.className = "day wn";
1082
			cell.firstChild.data = date.getWeekNumber();
1083
			cell = cell.nextSibling;
1084
		}
1085
		row.className = "daysrow";
1086
		var hasdays = false;
1087
		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
1088
			var iday = date.getDate();
1089
			var wday = date.getDay();
1090
			cell.className = "day";
1091
			var current_month = (date.getMonth() == month);
1092
			if (!current_month) {
1093
				if (this.showsOtherMonths) {
1094
					cell.className += " othermonth";
1095
					cell.otherMonth = true;
1096
				} else {
1097
					cell.className = "emptycell";
1098
					cell.innerHTML = "&nbsp;";
1099
					cell.disabled = true;
1100
					continue;
1101
				}
1102
			} else {
1103
				cell.otherMonth = false;
1104
				hasdays = true;
1105
			}
1106
			cell.disabled = false;
1107
			cell.firstChild.data = iday;
1108
			if (typeof this.getDateStatus == "function") {
1109
				var status = this.getDateStatus(date, year, month, iday);
1110
				if (status === true) {
1111
					cell.className += " disabled";
1112
					cell.disabled = true;
1113
				} else {
1114
					if (/disabled/i.test(status))
1115
						cell.disabled = true;
1116
					cell.className += " " + status;
1117
				}
1118
			}
1119
			if (!cell.disabled) {
1120
				ar_days[ar_days.length] = cell;
1121
				cell.caldate = new Date(date);
1122
				cell.ttip = "_";
1123
				if (current_month && iday == mday) {
1124
					cell.className += " selected";
1125
					this.currentDateEl = cell;
1126
				}
1127
				if (date.getFullYear() == today.getFullYear() &&
1128
				    date.getMonth() == today.getMonth() &&
1129
				    iday == today.getDate()) {
1130
					cell.className += " today";
1131
					cell.ttip += Calendar._TT["PART_TODAY"];
1132
				}
1133
				if (weekend.indexOf(wday.toString()) != -1) {
1134
					cell.className += cell.otherMonth ? " oweekend" : " weekend";
1135
				}
1136
			}
1137
		}
1138
		if (!(hasdays || this.showsOtherMonths))
1139
			row.className = "emptyrow";
1140
	}
1141
	this.ar_days = ar_days;
1142
	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
1143
	this.onSetTime();
1144
	this.table.style.visibility = "visible";
1145
	// PROFILE
1146
	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
1147
};
1148
1149
/**
1150
 *  Calls _init function above for going to a certain date (but only if the
1151
 *  date is different than the currently selected one).
1152
 */
1153
Calendar.prototype.setDate = function (date) {
1154
	if (!date.equalsTo(this.date)) {
1155
		this._init(this.firstDayOfWeek, date);
1156
	}
1157
};
1158
1159
/**
1160
 *  Refreshes the calendar.  Useful if the "disabledHandler" function is
1161
 *  dynamic, meaning that the list of disabled date can change at runtime.
1162
 *  Just * call this function if you think that the list of disabled dates
1163
 *  should * change.
1164
 */
1165
Calendar.prototype.refresh = function () {
1166
	this._init(this.firstDayOfWeek, this.date);
1167
};
1168
1169
/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
1170
Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
1171
	this._init(firstDayOfWeek, this.date);
1172
	this._displayWeekdays();
1173
};
1174
1175
/**
1176
 *  Allows customization of what dates are enabled.  The "unaryFunction"
1177
 *  parameter must be a function object that receives the date (as a JS Date
1178
 *  object) and returns a boolean value.  If the returned value is true then
1179
 *  the passed date will be marked as disabled.
1180
 */
1181
Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
1182
	this.getDateStatus = unaryFunction;
1183
};
1184
1185
/** Customization of allowed year range for the calendar. */
1186
Calendar.prototype.setRange = function (a, z) {
1187
	this.minYear = a;
1188
	this.maxYear = z;
1189
};
1190
1191
/** Calls the first user handler (selectedHandler). */
1192
Calendar.prototype.callHandler = function () {
1193
	if (this.onSelected) {
1194
		this.onSelected(this, this.date.print(this.dateFormat));
1195
	}
1196
};
1197
1198
/** Calls the second user handler (closeHandler). */
1199
Calendar.prototype.callCloseHandler = function () {
1200
	if (this.onClose) {
1201
		this.onClose(this);
1202
	}
1203
	// this.hideShowCovered();
1204
};
1205
1206
/** Removes the calendar object from the DOM tree and destroys it. */
1207
Calendar.prototype.destroy = function () {
1208
	var el = this.element.parentNode;
1209
	el.removeChild(this.element);
1210
	Calendar._C = null;
1211
	window.calendar = null;
1212
};
1213
1214
/**
1215
 *  Moves the calendar element to a different section in the DOM tree (changes
1216
 *  its parent).
1217
 */
1218
Calendar.prototype.reparent = function (new_parent) {
1219
	var el = this.element;
1220
	el.parentNode.removeChild(el);
1221
	new_parent.appendChild(el);
1222
};
1223
1224
// This gets called when the user presses a mouse button anywhere in the
1225
// document, if the calendar is shown.  If the click was outside the open
1226
// calendar this function closes it.
1227
Calendar._checkCalendar = function(ev) {
1228
	if (!window.calendar) {
1229
		return false;
1230
	}
1231
	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
1232
	for (; el != null && el != calendar.element; el = el.parentNode);
1233
	if (el == null) {
1234
		// calls closeHandler which should hide the calendar.
1235
		window.calendar.callCloseHandler();
1236
		return Calendar.stopEvent(ev);
1237
	}
1238
};
1239
1240
/** Shows the calendar. */
1241
Calendar.prototype.show = function () {
1242
	var rows = this.table.getElementsByTagName("tr");
1243
	for (var i = rows.length; i > 0;) {
1244
		var row = rows[--i];
1245
		Calendar.removeClass(row, "rowhilite");
1246
		var cells = row.getElementsByTagName("td");
1247
		for (var j = cells.length; j > 0;) {
1248
			var cell = cells[--j];
1249
			Calendar.removeClass(cell, "hilite");
1250
			Calendar.removeClass(cell, "active");
1251
		}
1252
	}
1253
	this.element.style.display = "block";
1254
	this.hidden = false;
1255
	if (this.isPopup) {
1256
		window.calendar = this;
1257
		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
1258
		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
1259
		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
1260
	}
1261
	// this.hideShowCovered();
1262
};
1263
1264
/**
1265
 *  Hides the calendar.  Also removes any "hilite" from the class of any TD
1266
 *  element.
1267
 */
1268
Calendar.prototype.hide = function () {
1269
	if (this.isPopup) {
1270
		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
1271
		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
1272
		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
1273
	}
1274
	this.element.style.display = "none";
1275
	this.hidden = true;
1276
	// this.hideShowCovered();
1277
};
1278
1279
/**
1280
 *  Shows the calendar at a given absolute position (beware that, depending on
1281
 *  the calendar element style -- position property -- this might be relative
1282
 *  to the parent's containing rectangle).
1283
 */
1284
Calendar.prototype.showAt = function (x, y) {
1285
	var s = this.element.style;
1286
	s.left = x + "px";
1287
	s.top = y + "px";
1288
	this.show();
1289
};
1290
1291
/** Shows the calendar near a given element. */
1292
Calendar.prototype.showAtElement = function (el, opts) {
1293
	var self = this;
1294
	var p = Calendar.getAbsolutePos(el);
1295
	if (!opts || typeof opts != "string") {
1296
		this.showAt(p.x, p.y + el.offsetHeight);
1297
		return true;
1298
	}
1299
	function fixPosition(box) {
1300
		if (box.x < 0)
1301
			box.x = 0;
1302
		if (box.y < 0)
1303
			box.y = 0;
1304
		var cp = document.createElement("div");
1305
		var s = cp.style;
1306
		s.position = "absolute";
1307
		s.right = s.bottom = s.width = s.height = "0px";
1308
		document.body.appendChild(cp);
1309
		var br = Calendar.getAbsolutePos(cp);
1310
		document.body.removeChild(cp);
1311
		if (Calendar.is_ie) {
1312
			br.y += document.body.scrollTop;
1313
			br.x += document.body.scrollLeft;
1314
		} else {
1315
			br.y += window.scrollY;
1316
			br.x += window.scrollX;
1317
		}
1318
		var tmp = box.x + box.width - br.x;
1319
		if (tmp > 0) box.x -= tmp;
1320
		tmp = box.y + box.height - br.y;
1321
		if (tmp > 0) box.y -= tmp;
1322
	};
1323
	this.element.style.display = "block";
1324
	Calendar.continuation_for_the_fucking_khtml_browser = function() {
1325
		var w = self.element.offsetWidth;
1326
		var h = self.element.offsetHeight;
1327
		self.element.style.display = "none";
1328
		var valign = opts.substr(0, 1);
1329
		var halign = "l";
1330
		if (opts.length > 1) {
1331
			halign = opts.substr(1, 1);
1332
		}
1333
		// vertical alignment
1334
		switch (valign) {
1335
		    case "T": p.y -= h; break;
1336
		    case "B": p.y += el.offsetHeight; break;
1337
		    case "C": p.y += (el.offsetHeight - h) / 2; break;
1338
		    case "t": p.y += el.offsetHeight - h; break;
1339
		    case "b": break; // already there
1340
		}
1341
		// horizontal alignment
1342
		switch (halign) {
1343
		    case "L": p.x -= w; break;
1344
		    case "R": p.x += el.offsetWidth; break;
1345
		    case "C": p.x += (el.offsetWidth - w) / 2; break;
1346
		    case "r": p.x += el.offsetWidth - w; break;
1347
		    case "l": break; // already there
1348
		}
1349
		p.width = w;
1350
		p.height = h + 40;
1351
		self.monthsCombo.style.display = "none";
1352
		fixPosition(p);
1353
		self.showAt(p.x, p.y);
1354
	};
1355
	if (Calendar.is_khtml)
1356
		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
1357
	else
1358
		Calendar.continuation_for_the_fucking_khtml_browser();
1359
};
1360
1361
/** Customizes the date format. */
1362
Calendar.prototype.setDateFormat = function (str) {
1363
	this.dateFormat = str;
1364
};
1365
1366
/** Customizes the tooltip date format. */
1367
Calendar.prototype.setTtDateFormat = function (str) {
1368
	this.ttDateFormat = str;
1369
};
1370
1371
/**
1372
 *  Tries to identify the date represented in a string.  If successful it also
1373
 *  calls this.setDate which moves the calendar to the given date.
1374
 */
1375
Calendar.prototype.parseDate = function (str, fmt) {
1376
	var y = 0;
1377
	var m = -1;
1378
	var d = 0;
1379
	var a = str.split(/\W+/);
1380
	if (!fmt) {
1381
		fmt = this.dateFormat;
1382
	}
1383
	var b = fmt.match(/%./g);
1384
	var i = 0, j = 0;
1385
	var hr = 0;
1386
	var min = 0;
1387
	for (i = 0; i < a.length; ++i) {
1388
		if (!a[i])
1389
			continue;
1390
		switch (b[i]) {
1391
		    case "%d":
1392
		    case "%e":
1393
			d = parseInt(a[i], 10);
1394
			break;
1395
1396
		    case "%m":
1397
			m = parseInt(a[i], 10) - 1;
1398
			break;
1399
1400
		    case "%Y":
1401
		    case "%y":
1402
			y = parseInt(a[i], 10);
1403
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
1404
			break;
1405
1406
		    case "%b":
1407
		    case "%B":
1408
			for (j = 0; j < 12; ++j) {
1409
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
1410
			}
1411
			break;
1412
1413
		    case "%H":
1414
		    case "%I":
1415
		    case "%k":
1416
		    case "%l":
1417
			hr = parseInt(a[i], 10);
1418
			break;
1419
1420
		    case "%P":
1421
		    case "%p":
1422
			if (/pm/i.test(a[i]) && hr < 12)
1423
				hr += 12;
1424
			break;
1425
1426
		    case "%M":
1427
			min = parseInt(a[i], 10);
1428
			break;
1429
		}
1430
	}
1431
	if (y != 0 && m != -1 && d != 0) {
1432
		this.setDate(new Date(y, m, d, hr, min, 0));
1433
		return;
1434
	}
1435
	y = 0; m = -1; d = 0;
1436
	for (i = 0; i < a.length; ++i) {
1437
		if (a[i].search(/[a-zA-Z]+/) != -1) {
1438
			var t = -1;
1439
			for (j = 0; j < 12; ++j) {
1440
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
1441
			}
1442
			if (t != -1) {
1443
				if (m != -1) {
1444
					d = m+1;
1445
				}
1446
				m = t;
1447
			}
1448
		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
1449
			m = a[i]-1;
1450
		} else if (parseInt(a[i], 10) > 31 && y == 0) {
1451
			y = parseInt(a[i], 10);
1452
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
1453
		} else if (d == 0) {
1454
			d = a[i];
1455
		}
1456
	}
1457
	if (y == 0) {
1458
		var today = new Date();
1459
		y = today.getFullYear();
1460
	}
1461
	if (m != -1 && d != 0) {
1462
		this.setDate(new Date(y, m, d, hr, min, 0));
1463
	}
1464
};
1465
1466
/* Calendar.prototype.hideShowCovered = function () {
1467
	var self = this;
1468
	Calendar.continuation_for_the_fucking_khtml_browser = function() {
1469
		function getVisib(obj){
1470
			var value = obj.style.visibility;
1471
			if (!value) {
1472
				if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
1473
					if (!Calendar.is_khtml)
1474
						value = document.defaultView.
1475
							getComputedStyle(obj, "").getPropertyValue("visibility");
1476
					else
1477
						value = '';
1478
				} else if (obj.currentStyle) { // IE
1479
					value = obj.currentStyle.visibility;
1480
				} else
1481
					value = '';
1482
			}
1483
			return value;
1484
		};
1485
1486
		var tags = new Array("applet", "iframe", "select");
1487
		var el = self.element;
1488
1489
		var p = Calendar.getAbsolutePos(el);
1490
		var EX1 = p.x;
1491
		var EX2 = el.offsetWidth + EX1;
1492
		var EY1 = p.y;
1493
		var EY2 = el.offsetHeight + EY1;
1494
1495
		for (var k = tags.length; k > 0; ) {
1496
			var ar = document.getElementsByTagName(tags[--k]);
1497
			var cc = null;
1498
1499
			for (var i = ar.length; i > 0;) {
1500
				cc = ar[--i];
1501
1502
				p = Calendar.getAbsolutePos(cc);
1503
				var CX1 = p.x;
1504
				var CX2 = cc.offsetWidth + CX1;
1505
				var CY1 = p.y;
1506
				var CY2 = cc.offsetHeight + CY1;
1507
1508
				if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
1509
					if (!cc.__msh_save_visibility) {
1510
						cc.__msh_save_visibility = getVisib(cc);
1511
					}
1512
					cc.style.visibility = cc.__msh_save_visibility;
1513
				} else {
1514
					if (!cc.__msh_save_visibility) {
1515
						cc.__msh_save_visibility = getVisib(cc);
1516
					}
1517
					cc.style.visibility = "hidden";
1518
				}
1519
			}
1520
		}
1521
	};
1522
	if (Calendar.is_khtml)
1523
		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
1524
	else
1525
		Calendar.continuation_for_the_fucking_khtml_browser();
1526
}; */
1527
1528
/** Internal function; it displays the bar with the names of the weekday. */
1529
Calendar.prototype._displayWeekdays = function () {
1530
	var fdow = this.firstDayOfWeek;
1531
	var cell = this.firstdayname;
1532
	var weekend = Calendar._TT["WEEKEND"];
1533
	for (var i = 0; i < 7; ++i) {
1534
		cell.className = "day name";
1535
		var realday = (i + fdow) % 7;
1536
		if (i) {
1537
			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
1538
			cell.navtype = 100;
1539
			cell.calendar = this;
1540
			cell.fdow = realday;
1541
			Calendar._add_evs(cell);
1542
		}
1543
		if (weekend.indexOf(realday.toString()) != -1) {
1544
			Calendar.addClass(cell, "weekend");
1545
		}
1546
		cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
1547
		cell = cell.nextSibling;
1548
	}
1549
};
1550
1551
/** Internal function.  Hides all combo boxes that might be displayed. */
1552
Calendar.prototype._hideCombos = function () {
1553
	this.monthsCombo.style.display = "none";
1554
	this.yearsCombo.style.display = "none";
1555
};
1556
1557
/** Internal function.  Starts dragging the element. */
1558
Calendar.prototype._dragStart = function (ev) {
1559
	if (this.dragging) {
1560
		return;
1561
	}
1562
	this.dragging = true;
1563
	var posX;
1564
	var posY;
1565
	if (Calendar.is_ie) {
1566
		posY = window.event.clientY + document.body.scrollTop;
1567
		posX = window.event.clientX + document.body.scrollLeft;
1568
	} else {
1569
		posY = ev.clientY + window.scrollY;
1570
		posX = ev.clientX + window.scrollX;
1571
	}
1572
	var st = this.element.style;
1573
	this.xOffs = posX - parseInt(st.left);
1574
	this.yOffs = posY - parseInt(st.top);
1575
	with (Calendar) {
1576
		addEvent(document, "mousemove", calDragIt);
1577
		addEvent(document, "mouseup", calDragEnd);
1578
	}
1579
};
1580
1581
// BEGIN: DATE OBJECT PATCHES
1582
1583
/** Adds the number of days array to the Date object. */
1584
Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
1585
1586
/** Constants used for time computations */
1587
Date.SECOND = 1000 /* milliseconds */;
1588
Date.MINUTE = 60 * Date.SECOND;
1589
Date.HOUR   = 60 * Date.MINUTE;
1590
Date.DAY    = 24 * Date.HOUR;
1591
Date.WEEK   =  7 * Date.DAY;
1592
1593
/** Returns the number of days in the current month */
1594
Date.prototype.getMonthDays = function(month) {
1595
	var year = this.getFullYear();
1596
	if (typeof month == "undefined") {
1597
		month = this.getMonth();
1598
	}
1599
	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
1600
		return 29;
1601
	} else {
1602
		return Date._MD[month];
1603
	}
1604
};
1605
1606
/** Returns the number of day in the year. */
1607
Date.prototype.getDayOfYear = function() {
1608
	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1609
	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
1610
	var time = now - then;
1611
	return Math.floor(time / Date.DAY);
1612
};
1613
1614
/** Returns the number of the week in year, as defined in ISO 8601. */
1615
Date.prototype.getWeekNumber = function() {
1616
	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1617
	var DoW = d.getDay();
1618
	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
1619
	var ms = d.valueOf(); // GMT
1620
	d.setMonth(0);
1621
	d.setDate(4); // Thu in Week 1
1622
	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
1623
};
1624
1625
/** Checks dates equality (ignores time) */
1626
Date.prototype.equalsTo = function(date) {
1627
	return ((this.getFullYear() == date.getFullYear()) &&
1628
		(this.getMonth() == date.getMonth()) &&
1629
		(this.getDate() == date.getDate()) &&
1630
		(this.getHours() == date.getHours()) &&
1631
		(this.getMinutes() == date.getMinutes()));
1632
};
1633
1634
/** Prints the date in a string according to the given format. */
1635
Date.prototype.print = function (str) {
1636
	var m = this.getMonth();
1637
	var d = this.getDate();
1638
	var y = this.getFullYear();
1639
	var wn = this.getWeekNumber();
1640
	var w = this.getDay();
1641
	var s = {};
1642
	var hr = this.getHours();
1643
	var pm = (hr >= 12);
1644
	var ir = (pm) ? (hr - 12) : hr;
1645
	var dy = this.getDayOfYear();
1646
	if (ir == 0)
1647
		ir = 12;
1648
	var min = this.getMinutes();
1649
	var sec = this.getSeconds();
1650
	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
1651
	s["%A"] = Calendar._DN[w]; // full weekday name
1652
	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
1653
	s["%B"] = Calendar._MN[m]; // full month name
1654
	// FIXME: %c : preferred date and time representation for the current locale
1655
	s["%C"] = 1 + Math.floor(y / 100); // the century number
1656
	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
1657
	s["%e"] = d; // the day of the month (range 1 to 31)
1658
	// FIXME: %D : american date style: %m/%d/%y
1659
	// FIXME: %E, %F, %G, %g, %h (man strftime)
1660
	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
1661
	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
1662
	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
1663
	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
1664
	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
1665
	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
1666
	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
1667
	s["%n"] = "\n";		// a newline character
1668
	s["%p"] = pm ? "PM" : "AM";
1669
	s["%P"] = pm ? "pm" : "am";
1670
	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
1671
	// FIXME: %R : the time in 24-hour notation %H:%M
1672
	s["%s"] = Math.floor(this.getTime() / 1000);
1673
	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
1674
	s["%t"] = "\t";		// a tab character
1675
	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
1676
	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
1677
	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
1678
	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
1679
	// FIXME: %x : preferred date representation for the current locale without the time
1680
	// FIXME: %X : preferred time representation for the current locale without the date
1681
	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
1682
	s["%Y"] = y;		// year with the century
1683
	s["%%"] = "%";		// a literal '%' character
1684
1685
	var re = /%./g;
1686
	if (!Calendar.is_ie5)
1687
		return str.replace(re, function (par) { return s[par] || par; });
1688
1689
	var a = str.match(re);
1690
	for (var i = 0; i < a.length; i++) {
1691
		var tmp = s[a[i]];
1692
		if (tmp) {
1693
			re = new RegExp(a[i], 'g');
1694
			str = str.replace(re, tmp);
1695
		}
1696
	}
1697
1698
	return str;
1699
};
1700
1701
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
1702
Date.prototype.setFullYear = function(y) {
1703
	var d = new Date(this);
1704
	d.__msh_oldSetFullYear(y);
1705
	if (d.getMonth() != this.getMonth())
1706
		this.setDate(28);
1707
	this.__msh_oldSetFullYear(y);
1708
};
1709
1710
// END: DATE OBJECT PATCHES
1711
1712
1713
// global object that remembers the calendar
1714
window.calendar = null;
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/jquery-ui.css (-8 / +86 lines)
Lines 56-81 Link Here
56
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
56
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
57
.ui-widget .ui-widget { font-size: 1em; }
57
.ui-widget .ui-widget { font-size: 1em; }
58
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
58
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
59
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
59
.ui-widget-content { border: 1px solid #B9D8D9; background: #ffffff; color: #222222; }
60
.ui-widget-content a { color: #222222; }
60
.ui-widget-content a { color: #222222; }
61
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
61
.ui-widget-header { border: 1px solid #B9D8D9; background: #E6F0F2 none; color: #222222; font-weight: bold; }
62
.ui-widget-header a { color: #222222; }
62
.ui-widget-header a { color: #222222; }
63
63
64
/* Interaction states
64
/* Interaction states
65
----------------------------------*/
65
----------------------------------*/
66
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
66
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B9D8D9; background: #F4F8F9 none; font-weight: normal; color: #555555; }
67
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
67
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
68
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
68
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121; }
69
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
69
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
70
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
70
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff none; font-weight: normal; color: #212121; }
71
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
71
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
72
.ui-widget :active { outline: none; }
72
.ui-widget :active { outline: none; }
73
73
74
/* Interaction Cues
74
/* Interaction Cues
75
----------------------------------*/
75
----------------------------------*/
76
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
76
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1; background: #fbf9ee; color: #363636; }
77
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
77
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
78
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
78
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec; color: #cd0a0a; }
79
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
79
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
80
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
80
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
81
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
81
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
Lines 293-299 Link Here
293
 *
293
 *
294
 * http://docs.jquery.com/UI/Autocomplete#theming
294
 * http://docs.jquery.com/UI/Autocomplete#theming
295
 */
295
 */
296
.ui-autocomplete { position: absolute; cursor: default; }
296
.ui-autocomplete { position: absolute; cursor: default; -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,.3); -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.3); box-shadow: 2px 2px 2px rgba(0,0,0,.3); }
297
298
.ui-autocomplete.ui-widget-content .ui-state-hover { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121;
299
}
300
301
.ui-autocomplete-loading {
302
    background: #FFF url("../../img/loading-small.gif") right center no-repeat;
303
}
297
304
298
/* workarounds */
305
/* workarounds */
299
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
306
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
Lines 314-319 Link Here
314
    display:block;
321
    display:block;
315
    float: left;
322
    float: left;
316
}
323
}
324
.ui-menu li {
325
    list-style:none;
326
}
317
.ui-menu .ui-menu {
327
.ui-menu .ui-menu {
318
    margin-top: -3px;
328
    margin-top: -3px;
319
}
329
}
Lines 355-357 Link Here
355
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
365
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
356
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
366
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
357
.ui-tabs .ui-tabs-hide { display: none !important; }
367
.ui-tabs .ui-tabs-hide { display: none !important; }
368
/*!
369
 * jQuery UI Datepicker 1.8.20
370
 *
371
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
372
 * Dual licensed under the MIT or GPL Version 2 licenses.
373
 * http://jquery.org/license
374
 *
375
 * http://docs.jquery.com/UI/Datepicker#theming
376
 */
377
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
378
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
379
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
380
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
381
.ui-datepicker .ui-datepicker-prev { left:2px; }
382
.ui-datepicker .ui-datepicker-next { right:2px; }
383
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
384
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
385
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
386
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
387
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
388
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
389
.ui-datepicker select.ui-datepicker-month,
390
.ui-datepicker select.ui-datepicker-year { width: 49%;}
391
.ui-datepicker table {width: 100%; font-size: .9em; border : 0; border-collapse: collapse; margin:0 0 .4em; }
392
.ui-datepicker th { background : transparent none; padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
393
.ui-datepicker td { border: 0; padding: 1px; }
394
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
395
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
396
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
397
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
398
399
/* with multiple calendars */
400
.ui-datepicker.ui-datepicker-multi { width:auto; }
401
.ui-datepicker-multi .ui-datepicker-group { float:left; }
402
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
403
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
404
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
405
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
406
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
407
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
408
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
409
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
410
411
/* RTL support */
412
.ui-datepicker-rtl { direction: rtl; }
413
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
414
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
415
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
416
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
417
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
418
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
419
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
420
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
421
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
422
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
423
424
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
425
.ui-datepicker-cover {
426
    display: none; /*sorry for IE5*/
427
    display/**/: block; /*sorry for IE5*/
428
    position: absolute; /*must have*/
429
    z-index: -1; /*must have*/
430
    filter: mask(); /*must have*/
431
    top: -4px; /*must have*/
432
    left: -4px; /*must have*/
433
    width: 200px; /*must have*/
434
    height: 200px; /*must have*/
435
}
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/jquery-ui.js (-7 / +11 lines)
Lines 1-25 Link Here
1
/*! jQuery UI - v1.8.20 - 2012-04-30
1
/*! jQuery UI - v1.8.21 - 2012-06-05
2
* https://github.com/jquery/jquery-ui
2
* https://github.com/jquery/jquery-ui
3
* Includes: jquery.ui.core.js
3
* Includes: jquery.ui.core.js
4
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
4
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
5
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.20",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
5
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.21",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
6
* https://github.com/jquery/jquery-ui
6
* https://github.com/jquery/jquery-ui
7
* Includes: jquery.ui.widget.js
7
* Includes: jquery.ui.widget.js
8
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
8
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
9
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
9
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
10
* https://github.com/jquery/jquery-ui
10
* https://github.com/jquery/jquery-ui
11
* Includes: jquery.ui.mouse.js
11
* Includes: jquery.ui.mouse.js
12
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
12
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
13
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
13
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
14
* https://github.com/jquery/jquery-ui
14
* https://github.com/jquery/jquery-ui
15
* Includes: jquery.ui.position.js
15
* Includes: jquery.ui.position.js
16
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
16
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
17
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
17
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
18
* https://github.com/jquery/jquery-ui
18
* https://github.com/jquery/jquery-ui
19
* Includes: jquery.ui.autocomplete.js
19
* Includes: jquery.ui.autocomplete.js
20
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
20
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
21
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
21
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
22
* https://github.com/jquery/jquery-ui
22
* https://github.com/jquery/jquery-ui
23
* Includes: jquery.ui.tabs.js
23
* Includes: jquery.ui.tabs.js
24
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
24
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
25
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.20"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;
25
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.21"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;/*! jQuery UI - v1.8.21 - 2012-06-05
26
* https://github.com/jquery/jquery-ui
27
* Includes: jquery.ui.datepicker.js
28
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
29
(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.21"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.21",window["DP_jQuery_"+dpuuid]=$})(jQuery);;
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt (-59 / +2 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog &rsaquo;  Placing a hold
1
[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog &rsaquo;  Placing a hold
2
[% INCLUDE 'doc-head-close.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'calendar.inc' %]
4
<script type="text/javascript">
3
<script type="text/javascript">
5
// <![CDATA[
4
// <![CDATA[
6
 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
5
 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
Lines 318-357 Link Here
318
                        [% END %]
317
                        [% END %]
319
                [% IF ( reserve_in_future ) %]
318
                [% IF ( reserve_in_future ) %]
320
                        <td>
319
                        <td>
321
              <input name="reserve_date_[% bibitemloo.biblionumber %]" id="reserve_date_[% bibitemloo.biblionumber %]" size="10">
320
              <input name="reserve_date_[% bibitemloo.biblionumber %]" id="from" size="10" class="datepickerfrom"/>
322
              <script language="JavaScript" type="text/javascript">
321
              <script language="JavaScript" type="text/javascript">
323
              //<![CDATA[
322
              //<![CDATA[
324
              $("#reserve_date_[% bibitemloo.biblionumber %]").attr( 'readonly', 'readonly' );
323
              $("#reserve_date_[% bibitemloo.biblionumber %]").attr( 'readonly', 'readonly' );
325
326
              var cal_img = document.createElement('img');
327
              cal_img.src = "[% themelang %]/lib/calendar/cal.gif";
328
              cal_img.alt = "Show Calendar";
329
              cal_img.border = "0";
330
              cal_img.id = "CalendarReserveDate[% bibitemloo.biblionumber %]";
331
              cal_img.style.cursor = "pointer";
332
              document.getElementById("reserve_date_[% bibitemloo.biblionumber %]").parentNode.appendChild( cal_img );
333
334
              function validate[% bibitemloo.biblionumber %](date) {
335
                  var today = new Date();
336
                        if ( (date > today) ||
337
                                ( date.getDate() == today.getDate() &&
338
                                  date.getMonth() == today.getMonth() &&
339
                                  date.getFullYear() == today.getFullYear() ) ) {
340
                            return false;
341
                        } else {
342
                            return true;
343
                        }
344
              };
345
              Calendar.setup(
346
              {
347
                inputField : "reserve_date_[% bibitemloo.biblionumber %]",
348
                ifFormat : "[% DHTMLcalendar_dateformat %]",
349
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
350
                disableFunc : validate[% bibitemloo.biblionumber %],
351
                dateStatusFunc : validate[% bibitemloo.biblionumber %],
352
                firstDay : [% CalendarFirstDayOfWeek %]
353
              }
354
              );
355
              //]]>
324
              //]]>
356
              </script>
325
              </script>
357
      <p style="margin:.3em 2em;">
326
      <p style="margin:.3em 2em;">
Lines 360-392 Link Here
360
329
361
		    [% END %]
330
		    [% END %]
362
	[% IF ( bibitemloo.holdable ) %]<td>
331
	[% IF ( bibitemloo.holdable ) %]<td>
363
        <input name="expiration_date_[% bibitemloo.biblionumber %]" id="expiration_date_[% bibitemloo.biblionumber %]" size="10" readonly="readonly" />
332
        <input name="expiration_date_[% bibitemloo.biblionumber %]" id="to" size="10" readonly="readonly" class="datepickerto" />
364
        <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate_[% bibitemloo.biblionumber %]" style="cursor: pointer;" />
365
        <script language="JavaScript" type="text/javascript">
366
      //<![CDATA[
367
      function validate1(date) {
368
        var today = new Date();
369
        if ( (date > today) ||
370
                      ( date.getDate() == today.getDate() &&
371
                        date.getMonth() == today.getMonth() &&
372
                        date.getFullYear() == today.getFullYear() ) ) {
373
          return false;
374
        } else {
375
          return true;
376
        }
377
      };
378
      Calendar.setup(
379
        {
380
          inputField : "expiration_date_[% bibitemloo.biblionumber %]",
381
          ifFormat : "[% DHTMLcalendar_dateformat %]",
382
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
383
          disableFunc : validate1,
384
          dateStatusFunc : validate1,
385
          firstDay : [% CalendarFirstDayOfWeek %]
386
        }
387
      );
388
      //]]>
389
        </script>
390
      <p style="margin:.3em 2em;">
333
      <p style="margin:.3em 2em;">
391
      <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
334
      <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
392
    </td>[% END %]
335
    </td>[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (-36 / +2 lines)
Lines 3-9 Link Here
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'calendar.inc' %]
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
9
<script type="text/JavaScript">
8
<script type="text/JavaScript">
Lines 46-51 $.tablesorter.addParser({ Link Here
46
            $("#renewall").submit();
45
            $("#renewall").submit();
47
        });
46
        });
48
        $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
47
        $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
48
        $( "#suspend_until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
49
            });
49
            });
50
//]]>
50
//]]>
51
</script>
51
</script>
Lines 428-467 $.tablesorter.addParser({ Link Here
428
428
429
	      [% IF AutoResumeSuspendedHolds %]
429
	      [% IF AutoResumeSuspendedHolds %]
430
	      <label for="suspend_until"> until </label>
430
	      <label for="suspend_until"> until </label>
431
              <input name="suspend_until" id="suspend_until" readonly="readonly" size="10">
431
              <input name="suspend_until" id="suspend_until" readonly="readonly" size="10" />
432
              <script language="JavaScript" type="text/javascript">
433
              //<![CDATA[
434
435
              var cal_img = document.createElement('img');
436
              cal_img.src = "[% themelang %]/lib/calendar/cal.gif";
437
              cal_img.alt = "Show Calendar";
438
              cal_img.border = "0";
439
              cal_img.id = "CalendarSuspendUntil";
440
              cal_img.style.cursor = "pointer";
441
              document.getElementById("suspend_until").parentNode.appendChild( cal_img );
442
443
              function validate(date) {
444
                  var today = new Date();
445
                        if ( (date > today) ||
446
                                ( date.getDate() == today.getDate() &&
447
                                  date.getMonth() == today.getMonth() &&
448
                                  date.getFullYear() == today.getFullYear() ) ) {
449
                            return false;
450
                        } else {
451
                            return true;
452
                        }
453
              };
454
              Calendar.setup(
455
              {
456
                inputField : "suspend_until",
457
                ifFormat : "[% DHTMLcalendar_dateformat %]",
458
                button : "CalendarSuspendUntil",
459
                disableFunc : validate,
460
                dateStatusFunc : validate
461
              }
462
              );
463
              //]]>
464
              </script>
465
              <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a></p>
432
              <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a></p>
466
              [% END %]
433
              [% END %]
467
            </form>
434
            </form>
468
- 

Return to bug 8181