|
Lines 6-13
Link Here
|
| 6 |
<script> |
6 |
<script> |
| 7 |
var debug = "[% debug | html %]"; |
7 |
var debug = "[% debug | html %]"; |
| 8 |
var dateformat_pref = "[% Koha.Preference('dateformat ') | html %]"; |
8 |
var dateformat_pref = "[% Koha.Preference('dateformat ') | html %]"; |
| 9 |
var dateformat_string = [% IF ( dateformat == "us" ) %]"mm/dd/yy"[% ELSIF ( dateformat == "metric" ) %]"dd/mm/yy"[% ELSIF ( dateformat == "dmydot" ) %]"dd.mm.yy"[% ELSE %]"yy-mm-dd"[% END %]; |
9 |
var dateformat_string = ""; |
| 10 |
var flatpickr_dateformat_string = [% IF ( dateformat == "us" ) %]"m/d/Y"[% ELSIF ( dateformat == "metric" ) %]"d/m/Y"[% ELSIF ( dateformat == "dmydot" ) %]"d.m.Y"[% ELSE %]"Y-m-d"[% END %]; |
10 |
var flatpickr_dateformat_string = ""; |
|
|
11 |
switch ( dateformat_pref ){ |
| 12 |
case "us": |
| 13 |
dateformat_string = "mm/dd/yy"; |
| 14 |
flatpickr_dateformat_string = "m/d/Y"; |
| 15 |
break; |
| 16 |
case "metric": |
| 17 |
dateformat_string = "dd/mm/yy"; |
| 18 |
flatpickr_dateformat_string = "d/m/Y"; |
| 19 |
break; |
| 20 |
case "dmydot": |
| 21 |
dateformat_string = "dd.mm.yy"; |
| 22 |
flatpickr_dateformat_string = "d.m.Y"; |
| 23 |
break; |
| 24 |
default: |
| 25 |
dateformat_string = "yy-mm-dd"; |
| 26 |
flatpickr_dateformat_string = "Y-m-d"; |
| 27 |
} |
| 11 |
var sentmsg = 0; |
28 |
var sentmsg = 0; |
| 12 |
var bidi = [% IF(bidi) %] true[% ELSE %] false[% END %]; |
29 |
var bidi = [% IF(bidi) %] true[% ELSE %] false[% END %]; |
| 13 |
var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]'; |
30 |
var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]'; |
| 14 |
- |
|
|