diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1245ede8..35dea1dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -176,7 +176,7 @@ jobs: release-version: ${{ steps.myvars.outputs.tag_version }} release-name: ${{ steps.myvars.outputs.github_repo }} minimum-version: ${{ steps.koha-version-oldstable.outputs.version-major-minor }} - plugin-module: "Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm" + plugin-module: "Koha/Plugin/Com/ByWaterSolutions/EdifactLSC.pm" - name: See if kpz was created run: | diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC.pm similarity index 98% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC.pm index 1f2ae818..e284c2cf 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC; ## It's good practive to use Modern::Perl use Modern::Perl; @@ -28,9 +28,9 @@ our $VERSION = "{VERSION}"; ## Here is our metadata, some keys are required, some are optional our $metadata = { - name => 'Edifact - Enhanced', + name => 'Edifact - LSC', author => 'Kyle M Hall', - description => 'Edifact Enhanced plugin', + description => 'Edifact Enhanced plugin customized for LSC', date_authored => '2015-12-21', date_updated => '1900-01-01', minimum_version => '22.05.06', @@ -60,30 +60,30 @@ sub new { sub edifact { my ( $self, $args ) = @_; - require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact; + require Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact; - my $edifact = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact->new($args); + my $edifact = Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact->new($args); return $edifact; } sub edifact_order { my ( $self, $args ) = @_; - require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order; + require Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Order; $args->{params}->{plugin} = $self; - my $edifact_order = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order->new( $args->{params} ); + my $edifact_order = Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Order->new( $args->{params} ); return $edifact_order; } sub edifact_transport { my ( $self, $args ) = @_; - require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport; + require Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Transport; $args->{params}->{plugin} = $self; - my $edifact_transport = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport->new( $args->{vendor_edi_account_id}, $self ); + my $edifact_transport = Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Transport->new( $args->{vendor_edi_account_id}, $self ); return $edifact_transport; } diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact.pm similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact.pm index ad1f1526..7418afdc 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact; # Copyright 2014 PTFS-Europe Ltd # @@ -22,8 +22,8 @@ use warnings; use File::Slurp; use Carp; use Encode qw( from_to ); -use Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment; -use Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message; +use Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Segment; +use Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Message; my $separator = { component => q{\:}, @@ -174,7 +174,7 @@ sub message_array { elsif ( $seg->tag eq 'UNT' ) { $in_msg = 0; if ( @{$msg} ) { - push @{$msg_arr}, Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message->new($msg); + push @{$msg_arr}, Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Message->new($msg); $msg = []; } } @@ -226,7 +226,7 @@ sub segmentize { }x; my @segmented; while ( $raw =~ /($re)/g ) { - push @segmented, Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment->new( { seg_string => $1 } ); + push @segmented, Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Segment->new( { seg_string => $1 } ); } return \@segmented; } diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Message.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Message.pm similarity index 98% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Message.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Message.pm index 9886e154..a1fed89b 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Message.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Message.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Message; # Copyright 2014 PTFS-Europe Ltd # diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Order.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Order.pm similarity index 99% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Order.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Order.pm index 050f56e9..4a08b262 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Order.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Order.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Order; use Modern::Perl; use utf8; @@ -140,7 +140,7 @@ sub interchange_header { my $hdr = 'UNB+UNOC:3'; # controling agency character set syntax version number # Interchange Sender - + # If plugin is set to send Buyer SAN in header *and* the vendor username as buyer SAN is set, send that # If plugin is set to send Buyer SAN in header *and* the buyer sand should come from the library ean description if ( $self->{plugin}->retrieve_data('buyer_san_in_header') && $self->{plugin}->retrieve_data('buyer_san_extract_from_library_ean_description') ) { @@ -320,7 +320,7 @@ sub order_msg_header { push @header, name_and_address( 'BUYER', - $self->{sender}->ean, + $self->{sender}->ean, $self->{sender}->id_code_qualifier, ); } diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Segment.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Segment.pm similarity index 98% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Segment.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Segment.pm index 2a5aae4c..874b4d4a 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Segment.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Segment.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Segment; # Copyright 2014 PTFS-Europe Ltd # diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Transport.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Transport.pm similarity index 99% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Transport.pm rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Transport.pm index 96b878f6..25ed36e2 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/Edifact/Transport.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/Edifact/Transport.pm @@ -1,4 +1,4 @@ -package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport; +package Koha::Plugin::Com::ByWaterSolutions::EdifactLSC::Edifact::Transport; # Copyright 2014 PTFS-Europe Ltd # diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/configure.tt b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/configure.tt similarity index 95% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/configure.tt rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/configure.tt index 6a35ef6d..2c818760 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/configure.tt +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/configure.tt @@ -6,7 +6,7 @@ - - - - - -
-

Unobtrusive JavaScript datePicker widget

-

Disable Days & Dates Demo

-
- -

- -

- -

- -

- -

-
-

View the related “language in the lab” post for this demo.

-
- - - + + + + frequency decoder ~ datePicker disable dates & days demo + + + + + + +
+

Unobtrusive JavaScript datePicker widget

+

Disable Days & Dates Demo

+
+ +

+ +

+ +

+ +

+ +

+
+

View the related “language in the lab” post for this demo.

+
+ + diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/index.html b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/index.html similarity index 97% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/index.html rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/index.html index 2dda064a..6d765bd3 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/index.html +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/index.html @@ -1,304 +1,304 @@ - - - - frequency decoder ~ Unobtrusive JavaScript datePicker widgit demo - - - - - - -
-

Unobtrusive JavaScript date-picker widgit

-

Keyboard access

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Key CombinationAction
Day navigation
Ctrl + Next year
Ctrl + Previous year
Ctrl + Next month
Ctrl + Previous month
SpaceTodays date
EscClose date-picker (no date selected)
ReturnSelect highlighted date and close date-picker
2 - 7Select the corresponding day as the first day of the week
- -

DatePicker Demos

-
- Single Input (static) DatePicker -

class=“format-d-m-y divider-dash highlight-days-12 no-fade”

- -

-
- -
- Split Input (fade-in) DatePicker -

class="highlight-days-67 range-low-2006-08-11 range-high-2009-09-13 disable-days-12 split-date"

-
- - - - - - - - - - -
//
-
-
- -
- SelectList (static) DatePicker -

class="highlight-days-67 disable-days-12 split-date range-low-1960-02-13 no-fade"

-

Note: I’ve set the lower limit of the datePicker to be (ten years) lower than the lowest possible year you can select using the year selectList in order to test the automatic resetting of the lower/higher date ranges i.e. the year selectList starts at 1970 but the className defined range has been stipulated as 1960; the datePicker should automatically reset the range to be range-low-1970-02-13.

-
- - - -
-
- -
- Mixed Input (fade-in, no transparency) DatePicker -

class="highlight-days-67 disable-days-12 split-date no-transparency"

-
- - - -
-
- -

View the related “language in the lab” post for this demo.

-
- - + + + + frequency decoder ~ Unobtrusive JavaScript datePicker widgit demo + + + + + + +
+

Unobtrusive JavaScript date-picker widgit

+

Keyboard access

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key CombinationAction
Day navigation
Ctrl + Next year
Ctrl + Previous year
Ctrl + Next month
Ctrl + Previous month
SpaceTodays date
EscClose date-picker (no date selected)
ReturnSelect highlighted date and close date-picker
2 - 7Select the corresponding day as the first day of the week
+ +

DatePicker Demos

+
+ Single Input (static) DatePicker +

class=“format-d-m-y divider-dash highlight-days-12 no-fade”

+ +

+
+ +
+ Split Input (fade-in) DatePicker +

class="highlight-days-67 range-low-2006-08-11 range-high-2009-09-13 disable-days-12 split-date"

+
+ + + + + + + + + + +
//
+
+
+ +
+ SelectList (static) DatePicker +

class="highlight-days-67 disable-days-12 split-date range-low-1960-02-13 no-fade"

+

Note: I’ve set the lower limit of the datePicker to be (ten years) lower than the lowest possible year you can select using the year selectList in order to test the automatic resetting of the lower/higher date ranges i.e. the year selectList starts at 1970 but the className defined range has been stipulated as 1960; the datePicker should automatically reset the range to be range-low-1970-02-13.

+
+ + + +
+
+ +
+ Mixed Input (fade-in, no transparency) DatePicker +

class="highlight-days-67 disable-days-12 split-date no-transparency"

+
+ + + +
+
+ +

View the related “language in the lab” post for this demo.

+
+ + diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/datepicker.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/datepicker.js similarity index 95% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/datepicker.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/datepicker.js index a62a0106..1aa4e796 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/datepicker.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/datepicker.js @@ -1,1445 +1,1445 @@ -/* - DatePicker v4.4 by frequency-decoder.com - - Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/) - - Please credit frequency-decoder in any derivative work - thanks. - - You are free: - - * to copy, distribute, display, and perform the work - * to make derivative works - * to make commercial use of the work - - Under the following conditions: - - by Attribution. - -------------- - You must attribute the work in the manner specified by the author or licensor. - - sa - -- - Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. - - * For any reuse or distribution, you must make clear to others the license terms of this work. - * Any of these conditions can be waived if you get permission from the copyright holder. -*/ -var datePickerController; - -(function() { - -// Detect the browser language -datePicker.languageinfo = navigator.language ? navigator.language : navigator.userLanguage; -datePicker.languageinfo = datePicker.languageinfo ? datePicker.languageinfo.toLowerCase().replace(/-[a-z]+$/, "") : 'en'; - -// Load the appropriate language file -var scriptFiles = document.getElementsByTagName('head')[0].getElementsByTagName('script'); -var loc = scriptFiles[scriptFiles.length - 1].src.substr(0, scriptFiles[scriptFiles.length - 1].src.lastIndexOf("/")) + "/lang/" + datePicker.languageinfo + ".js"; - -var script = document.createElement('script'); -script.type = "text/javascript"; -script.src = loc; -script.setAttribute("charset", "utf-8"); -/*@cc_on -/*@if(@_win32) - var bases = document.getElementsByTagName('base'); - if (bases.length && bases[0].childNodes.length) { - bases[0].appendChild(script); - } else { - document.getElementsByTagName('head')[0].appendChild(script); - }; -@else @*/ -document.getElementsByTagName('head')[0].appendChild(script); -/*@end -@*/ -script = null; - -// Defaults should the locale file not load -datePicker.months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; -datePicker.fullDay = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]; -datePicker.titles = ["Previous month","Next month","Previous year","Next year", "Today", "Show Calendar"]; - -datePicker.getDaysPerMonth = function(nMonth, nYear) { - nMonth = (nMonth + 12) % 12; - return (((0 == (nYear%4)) && ((0 != (nYear%100)) || (0 == (nYear%400)))) && nMonth == 1) ? 29: [31,28,31,30,31,30,31,31,30,31,30,31][nMonth]; -}; - -function datePicker(options) { - - this.defaults = {}; - for(opt in options) { this[opt] = this.defaults[opt] = options[opt]; }; - - this.date = new Date(); - this.yearinc = 1; - this.timer = null; - this.pause = 1000; - this.timerSet = false; - this.fadeTimer = null; - this.interval = new Date(); - this.firstDayOfWeek = this.defaults.firstDayOfWeek = this.dayInc = this.monthInc = this.yearInc = this.opacity = this.opacityTo = 0; - this.dateSet = null; - this.visible = false; - this.disabledDates = []; - this.enabledDates = []; - this.nbsp = String.fromCharCode( 160 ); - var o = this; - - o.events = { - onblur:function(e) { - o.removeKeyboardEvents(); - }, - onfocus:function(e) { - o.addKeyboardEvents(); - }, - onkeydown: function (e) { - o.stopTimer(); - if(!o.visible) return false; - - if(e == null) e = document.parentWindow.event; - var kc = e.keyCode ? e.keyCode : e.charCode; - - if( kc == 13 ) { - // close (return) - var td = document.getElementById(o.id + "-date-picker-hover"); - if(!td || td.className.search(/out-of-range|day-disabled/) != -1) return o.killEvent(e); - o.returnFormattedDate(); - o.hide(); - return o.killEvent(e); - } else if(kc == 27) { - // close (esc) - o.hide(); - return o.killEvent(e); - } else if(kc == 32 || kc == 0) { - // today (space) - o.date = new Date(); - o.updateTable(); - return o.killEvent(e); - }; - - // Internet Explorer fires the keydown event faster than the JavaScript engine can - // update the interface. The following attempts to fix this. - /*@cc_on - @if(@_win32) - if(new Date().getTime() - o.interval.getTime() < 100) return o.killEvent(e); - o.interval = new Date(); - @end - @*/ - - if ((kc > 49 && kc < 56) || (kc > 97 && kc < 104)) { - if (kc > 96) kc -= (96-48); - kc -= 49; - o.firstDayOfWeek = (o.firstDayOfWeek + kc) % 7; - o.updateTable(); - return o.killEvent(e); - }; - - if ( kc < 37 || kc > 40 ) return true; - - var d = new Date( o.date ).valueOf(); - - if ( kc == 37 ) { - // ctrl + left = previous month - if( e.ctrlKey ) { - d = new Date( o.date ); - d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() - 1,d.getFullYear())) ); - d.setMonth( d.getMonth() - 1 ); - } else { - d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() - 1 ); - }; - } else if ( kc == 39 ) { - // ctrl + right = next month - if( e.ctrlKey ) { - d = new Date( o.date ); - d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() + 1,d.getFullYear())) ); - d.setMonth( d.getMonth() + 1 ); - } else { - d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() + 1 ); - }; - } else if ( kc == 38 ) { - // ctrl + up = next year - if( e.ctrlKey ) { - d = new Date( o.date ); - d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() + 1)) ); - d.setFullYear( d.getFullYear() + 1 ); - } else { - d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() - 7 ); - }; - } else if ( kc == 40 ) { - // ctrl + down = prev year - if( e.ctrlKey ) { - d = new Date( o.date ); - d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() - 1)) ); - d.setFullYear( d.getFullYear() - 1 ); - } else { - d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() + 7 ); - }; - }; - - var tmpDate = new Date(d); - - if(o.outOfRange(tmpDate)) return o.killEvent(e); - - var cacheDate = new Date(o.date); - o.date = tmpDate; - - if(cacheDate.getFullYear() != o.date.getFullYear() || cacheDate.getMonth() != o.date.getMonth()) o.updateTable(); - else { - o.disableTodayButton(); - var tds = o.table.getElementsByTagName('td'); - var txt; - var start = o.date.getDate() - 6; - if(start < 0) start = 0; - - for(var i = start, td; td = tds[i]; i++) { - txt = Number(td.firstChild.nodeValue); - if(isNaN(txt) || txt != o.date.getDate()) continue; - o.removeHighlight(); - td.id = o.id + "-date-picker-hover"; - td.className = td.className.replace(/date-picker-hover/g, "") + " date-picker-hover"; - }; - }; - return o.killEvent(e); - }, - gotoToday: function(e) { - o.date = new Date(); - o.updateTable(); - return o.killEvent(e); - }, - onmousedown: function(e) { - if ( e == null ) e = document.parentWindow.event; - var el = e.target != null ? e.target : e.srcElement; - - var found = false; - while(el.parentNode) { - if(el.id && (el.id == "fd-"+o.id || el.id == "fd-but-"+o.id)) { - found = true; - break; - }; - try { - el = el.parentNode; - } catch(err) { - break; - }; - }; - if(found) return true; - o.stopTimer(); - datePickerController.hideAll(); - }, - onmouseover: function(e) { - o.stopTimer(); - var txt = this.firstChild.nodeValue; - if(this.className == "out-of-range" || txt.search(/^[\d]+$/) == -1) return; - - o.removeHighlight(); - - this.id = o.id+"-date-picker-hover"; - this.className = this.className.replace(/date-picker-hover/g, "") + " date-picker-hover"; - - o.date.setDate(this.firstChild.nodeValue); - o.disableTodayButton(); - }, - onclick: function(e) { - if(o.opacity != o.opacityTo || this.className.search(/out-of-range|day-disabled/) != -1) return false; - if ( e == null ) e = document.parentWindow.event; - var el = e.target != null ? e.target : e.srcElement; - while ( el.nodeType != 1 ) el = el.parentNode; - var d = new Date( o.date ); - var txt = el.firstChild.data; - if(txt.search(/^[\d]+$/) == -1) return; - var n = Number( txt ); - if(isNaN(n)) { return true; }; - d.setDate( n ); - o.date = d; - o.returnFormattedDate(); - if(!o.staticPos) o.hide(); - o.stopTimer(); - return o.killEvent(e); - }, - incDec: function(e) { - if ( e == null ) e = document.parentWindow.event; - var el = e.target != null ? e.target : e.srcElement; - - if(el && el.className && el.className.search('fd-disabled') != -1) { return false; } - datePickerController.addEvent(document, "mouseup", o.events.clearTimer); - o.timerInc = 800; - o.dayInc = arguments[1]; - o.yearInc = arguments[2]; - o.monthInc = arguments[3]; - o.timerSet = true; - - o.updateTable(); - return true; - }, - clearTimer: function(e) { - o.stopTimer(); - o.timerInc = 1000; - o.yearInc = 0; - o.monthInc = 0; - o.dayInc = 0; - datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); - } - }; - o.stopTimer = function() { - o.timerSet = false; - window.clearTimeout(o.timer); - }; - o.removeHighlight = function() { - if(document.getElementById(o.id+"-date-picker-hover")) { - document.getElementById(o.id+"-date-picker-hover").className = document.getElementById(o.id+"-date-picker-hover").className.replace("date-picker-hover", ""); - document.getElementById(o.id+"-date-picker-hover").id = ""; - }; - }; - o.reset = function() { - for(def in o.defaults) { o[def] = o.defaults[def]; }; - }; - o.setOpacity = function(op) { - o.div.style.opacity = op/100; - o.div.style.filter = 'alpha(opacity=' + op + ')'; - o.opacity = op; - }; - o.fade = function() { - window.clearTimeout(o.fadeTimer); - o.fadeTimer = null; - delete(o.fadeTimer); - - var diff = Math.round(o.opacity + ((o.opacityTo - o.opacity) / 4)); - - o.setOpacity(diff); - - if(Math.abs(o.opacityTo - diff) > 3 && !o.noTransparency) { - o.fadeTimer = window.setTimeout(o.fade, 50); - } else { - o.setOpacity(o.opacityTo); - if(o.opacityTo == 0) { - o.div.style.display = "none"; - o.visible = false; - } else { - o.visible = true; - }; - }; - }; - o.killEvent = function(e) { - e = e || document.parentWindow.event; - - if(e.stopPropagation) { - e.stopPropagation(); - e.preventDefault(); - }; - - /*@cc_on - @if(@_win32) - e.cancelBubble = true; - e.returnValue = false; - @end - @*/ - return false; - }; - o.getElem = function() { - return document.getElementById(o.id.replace(/^fd-/, '')) || false; - }; - o.setRangeLow = function(range) { - if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; - o.low = o.defaults.low = range; - if(o.staticPos) o.updateTable(true); - }; - o.setRangeHigh = function(range) { - if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; - o.high = o.defaults.high = range; - if(o.staticPos) o.updateTable(true); - }; - o.setDisabledDays = function(dayArray) { - o.disableDays = o.defaults.disableDays = dayArray; - if(o.staticPos) o.updateTable(true); - }; - o.setDisabledDates = function(dateArray) { - var fin = []; - for(var i = dateArray.length; i-- ;) { - if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01])$/) != -1) fin[fin.length] = dateArray[i]; - }; - if(fin.length) { - o.disabledDates = fin; - o.enabledDates = []; - if(o.staticPos) o.updateTable(true); - }; - }; - o.setEnabledDates = function(dateArray) { - var fin = []; - for(var i = dateArray.length; i-- ;) { - if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01]|\*\*)$/) != -1 && dateArray[i] != "********") fin[fin.length] = dateArray[i]; - }; - if(fin.length) { - o.disabledDates = []; - o.enabledDates = fin; - if(o.staticPos) o.updateTable(true); - }; - }; - o.getDisabledDates = function(y, m) { - if(o.enabledDates.length) return o.getEnabledDates(y, m); - var obj = {}; - var d = datePicker.getDaysPerMonth(m - 1, y); - m = m < 10 ? "0" + String(m) : m; - for(var i = o.disabledDates.length; i-- ;) { - var tmp = o.disabledDates[i].replace("****", y).replace("**", m); - if(tmp < Number(String(y)+m+"01") || tmp > Number(y+String(m)+d)) continue; - obj[tmp] = 1; - }; - return obj; - }; - o.getEnabledDates = function(y, m) { - var obj = {}; - var d = datePicker.getDaysPerMonth(m - 1, y); - m = m < 10 ? "0" + String(m) : m; - var day,tmp,de,me,ye,disabled; - for(var dd = 1; dd <= d; dd++) { - day = dd < 10 ? "0" + String(dd) : dd; - disabled = true; - for(var i = o.enabledDates.length; i-- ;) { - tmp = o.enabledDates[i]; - ye = String(o.enabledDates[i]).substr(0,4); - me = String(o.enabledDates[i]).substr(4,2); - de = String(o.enabledDates[i]).substr(6,2); - - if(ye == y && me == m && de == day) { - disabled = false; - break; - } - - if(ye == "****" || me == "**" || de == "**") { - if(ye == "****") tmp = tmp.replace(/^\*\*\*\*/, y); - if(me == "**") tmp = tmp = tmp.substr(0,4) + String(m) + tmp.substr(6,2); - if(de == "**") tmp = tmp.replace(/\*\*/, day); - - if(tmp == String(y + String(m) + day)) { - disabled = false; - break; - }; - }; - }; - if(disabled) obj[String(y + String(m) + day)] = 1; - }; - return obj; - }; - o.setFirstDayOfWeek = function(e) { - if ( e == null ) e = document.parentWindow.event; - var elem = e.target != null ? e.target : e.srcElement; - if(elem.tagName.toLowerCase() != "th") { - while(elem.tagName.toLowerCase() != "th") elem = elem.parentNode; - }; - var cnt = 0; - while(elem.previousSibling) { - elem = elem.previousSibling; - if(elem.tagName.toLowerCase() == "th") cnt++; - }; - o.firstDayOfWeek = (o.firstDayOfWeek + cnt) % 7; - o.updateTableHeaders(); - return o.killEvent(e); - }; - o.truePosition = function(element) { - var pos = o.cumulativeOffset(element); - if(window.opera) { return pos; } - var iebody = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body; - var dsocleft = document.all ? iebody.scrollLeft : window.pageXOffset; - var dsoctop = document.all ? iebody.scrollTop : window.pageYOffset; - var posReal = o.realOffset(element); - return [pos[0] - posReal[0] + dsocleft, pos[1] - posReal[1] + dsoctop]; - }; - o.realOffset = function(element) { - var t = 0, l = 0; - do { - t += element.scrollTop || 0; - l += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [l, t]; - }; - o.cumulativeOffset = function(element) { - var t = 0, l = 0; - do { - t += element.offsetTop || 0; - l += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [l, t]; - }; - o.resize = function() { - if(!o.created || !o.getElem()) return; - - o.div.style.visibility = "hidden"; - if(!o.staticPos) { o.div.style.left = o.div.style.top = "0px"; } - o.div.style.display = "block"; - - var osh = o.div.offsetHeight; - var osw = o.div.offsetWidth; - - o.div.style.visibility = "visible"; - o.div.style.display = "none"; - - if(!o.staticPos) { - var elem = document.getElementById('fd-but-' + o.id); - var pos = o.truePosition(elem); - var trueBody = (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body; - var scrollTop = window.devicePixelRatio || window.opera ? 0 : trueBody.scrollTop; - var scrollLeft = window.devicePixelRatio || window.opera ? 0 : trueBody.scrollLeft; - - if(parseInt(trueBody.clientWidth+scrollLeft) < parseInt(osw+pos[0])) { - o.div.style.left = Math.abs(parseInt((trueBody.clientWidth+scrollLeft) - osw)) + "px"; - } else { - o.div.style.left = pos[0] + "px"; - }; - - if(parseInt(trueBody.clientHeight+scrollTop) < parseInt(osh+pos[1]+elem.offsetHeight+2)) { - o.div.style.top = Math.abs(parseInt(pos[1] - (osh + 2))) + "px"; - } else { - o.div.style.top = Math.abs(parseInt(pos[1] + elem.offsetHeight + 2)) + "px"; - }; - }; - /*@cc_on - @if(@_jscript_version <= 5.6) - if(o.staticPos) return; - o.iePopUp.style.top = o.div.style.top; - o.iePopUp.style.left = o.div.style.left; - o.iePopUp.style.width = osw + "px"; - o.iePopUp.style.height = (osh - 2) + "px"; - @end - @*/ - }; - o.equaliseDates = function() { - var clearDayFound = false; - var tmpDate; - for(var i = o.low; i <= o.high; i++) { - tmpDate = String(i); - if(!o.disableDays[new Date(tmpDate.substr(0,4), tmpDate.substr(6,2), tmpDate.substr(4,2)).getDay() - 1]) { - clearDayFound = true; - break; - }; - }; - if(!clearDayFound) o.disableDays = o.defaults.disableDays = [0,0,0,0,0,0,0]; - }; - o.outOfRange = function(tmpDate) { - if(!o.low && !o.high) return false; - - var level = false; - if(!tmpDate) { - level = true; - tmpDate = o.date; - }; - - var d = (tmpDate.getDate() < 10) ? "0" + tmpDate.getDate() : tmpDate.getDate(); - var m = ((tmpDate.getMonth() + 1) < 10) ? "0" + (tmpDate.getMonth() + 1) : tmpDate.getMonth() + 1; - var y = tmpDate.getFullYear(); - var dt = String(y)+String(m)+String(d); - - if(o.low && parseInt(dt) < parseInt(o.low)) { - if(!level) return true; - o.date = new Date(o.low.substr(0,4), o.low.substr(4,2)-1, o.low.substr(6,2), 5, 0, 0); - return false; - }; - if(o.high && parseInt(dt) > parseInt(o.high)) { - if(!level) return true; - o.date = new Date( o.high.substr(0,4), o.high.substr(4,2)-1, o.high.substr(6,2), 5, 0, 0); - }; - return false; - }; - o.createButton = function() { - if(o.staticPos) { return; }; - - var but; - - if(!document.getElementById("fd-but-" + o.id)) { - var inp = o.getElem(); - - but = document.createElement('a'); - but.href = "#"; - - var span = document.createElement('span'); - span.appendChild(document.createTextNode(String.fromCharCode( 160 ))); - - but.className = "date-picker-control"; - but.title = (typeof(fdLocale) == "object" && options.locale && fdLocale.titles.length > 5) ? fdLocale.titles[5] : ""; - - but.id = "fd-but-" + o.id; - but.appendChild(span); - - if(inp.nextSibling) { - inp.parentNode.insertBefore(but, inp.nextSibling); - } else { - inp.parentNode.appendChild(but); - }; - } else { - but = document.getElementById("fd-but-" + o.id); - }; - - but.onclick = but.onpress = function(e) { - e = e || window.event; - var inpId = this.id.replace('fd-but-',''); - try { var dp = datePickerController.getDatePicker(inpId); } catch(err) { return false; }; - - if(e.type == "press") { - var kc = e.keyCode != null ? e.keyCode : e.charCode; - if(kc != 13) { return true; }; - if(dp.visible) { - hideAll(); - return false; - }; - }; - - if(!dp.visible) { - datePickerController.hideAll(inpId); - dp.show(); - } else { - datePickerController.hideAll(); - }; - return false; - }; - but = null; - }, - o.create = function() { - - function createTH(details) { - var th = document.createElement('th'); - if(details.thClassName) th.className = details.thClassName; - if(details.colspan) { - /*@cc_on - /*@if (@_win32) - th.setAttribute('colSpan',details.colspan); - @else @*/ - th.setAttribute('colspan',details.colspan); - /*@end - @*/ - }; - /*@cc_on - /*@if (@_win32) - th.unselectable = "on"; - /*@end@*/ - return th; - }; - - function createThAndButton(tr, obj) { - for(var i = 0, details; details = obj[i]; i++) { - var th = createTH(details); - tr.appendChild(th); - var but = document.createElement('span'); - but.className = details.className; - but.id = o.id + details.id; - but.appendChild(document.createTextNode(details.text)); - but.title = details.title || ""; - if(details.onmousedown) but.onmousedown = details.onmousedown; - if(details.onclick) but.onclick = details.onclick; - if(details.onmouseout) but.onmouseout = details.onmouseout; - th.appendChild(but); - }; - }; - - /*@cc_on - @if(@_jscript_version <= 5.6) - if(!document.getElementById("iePopUpHack")) { - o.iePopUp = document.createElement('iframe'); - o.iePopUp.src = "javascript:'';"; - o.iePopUp.setAttribute('className','iehack'); - o.iePopUp.scrolling="no"; - o.iePopUp.frameBorder="0"; - o.iePopUp.name = o.iePopUp.id = "iePopUpHack"; - document.body.appendChild(o.iePopUp); - } else { - o.iePopUp = document.getElementById("iePopUpHack"); - }; - @end - @*/ - - if(typeof(fdLocale) == "object" && o.locale) { - datePicker.titles = fdLocale.titles; - datePicker.months = fdLocale.months; - datePicker.fullDay = fdLocale.fullDay; - // Optional parameters - if(fdLocale.dayAbbr) datePicker.dayAbbr = fdLocale.dayAbbr; - if(fdLocale.firstDayOfWeek) o.firstDayOfWeek = o.defaults.firstDayOfWeek = fdLocale.firstDayOfWeek; - }; - - o.div = document.createElement('div'); - o.div.style.zIndex = 9999; - o.div.id = "fd-"+o.id; - o.div.className = "datePicker"; - - if(!o.staticPos) { - document.getElementsByTagName('body')[0].appendChild(o.div); - } else { - elem = o.getElem(); - if(!elem) { - o.div = null; - return; - }; - o.div.className += " staticDP"; - o.div.setAttribute("tabIndex", "0"); - o.div.onfocus = o.events.onfocus; - o.div.onblur = o.events.onblur; - elem.parentNode.insertBefore(o.div, elem.nextSibling); - if(o.hideInput && elem.type && elem.type == "text") elem.setAttribute("type", "hidden"); - }; - - //var nbsp = String.fromCharCode( 160 ); - var tr, row, col, tableHead, tableBody; - - o.table = document.createElement('table'); - o.div.appendChild( o.table ); - - tableHead = document.createElement('thead'); - o.table.appendChild( tableHead ); - - tr = document.createElement('tr'); - tableHead.appendChild(tr); - - // Title Bar - o.titleBar = createTH({thClassName:"date-picker-title", colspan:7}); - tr.appendChild( o.titleBar ); - tr = null; - - var span = document.createElement('span'); - span.className = "month-display"; - o.titleBar.appendChild(span); - - span = document.createElement('span'); - span.className = "year-display"; - o.titleBar.appendChild(span); - - span = null; - - tr = document.createElement('tr'); - tableHead.appendChild(tr); - - createThAndButton(tr, [{className:"prev-but", id:"-prev-year-but", text:"\u00AB", title:datePicker.titles[2], onmousedown:function(e) { o.events.incDec(e,0,-1,0); }, onmouseout:o.events.clearTimer },{className:"prev-but", id:"-prev-month-but", text:"\u2039", title:datePicker.titles[0], onmousedown:function(e) { o.events.incDec(e,0,0,-1); }, onmouseout:o.events.clearTimer },{colspan:3, className:"today-but", id:"-today-but", text:datePicker.titles.length > 4 ? datePicker.titles[4] : "Today", onclick:o.events.gotoToday},{className:"next-but", id:"-next-month-but", text:"\u203A", title:datePicker.titles[1], onmousedown:function(e) { o.events.incDec(e,0,0,1); }, onmouseout:o.events.clearTimer },{className:"next-but", id:"-next-year-but", text:"\u00BB", title:datePicker.titles[3], onmousedown:function(e) { o.events.incDec(e,0,1,0); }, onmouseout:o.events.clearTimer }]); - - tableBody = document.createElement('tbody'); - o.table.appendChild( tableBody ); - - for(var rows = 0; rows < 7; rows++) { - row = document.createElement('tr'); - - if(rows != 0) tableBody.appendChild(row); - else tableHead.appendChild(row); - - for(var cols = 0; cols < 7; cols++) { - col = (rows == 0) ? document.createElement('th') : document.createElement('td'); - - row.appendChild(col); - if(rows != 0) { - col.appendChild(document.createTextNode(o.nbsp)); - col.onmouseover = o.events.onmouseover; - col.onclick = o.events.onclick; - } else { - col.className = "date-picker-day-header"; - col.scope = "col"; - }; - col = null; - }; - row = null; - }; - - // Table headers - var but; - var ths = o.table.getElementsByTagName('thead')[0].getElementsByTagName('tr')[2].getElementsByTagName('th'); - for ( var y = 0; y < 7; y++ ) { - if(y > 0) { - but = document.createElement("span"); - but.className = "fd-day-header"; - but.onclick = ths[y].onclick = o.setFirstDayOfWeek; - but.appendChild(document.createTextNode(o.nbsp)); - ths[y].appendChild(but); - but = null; - } else { - ths[y].appendChild(document.createTextNode(o.nbsp)); - }; - }; - - o.ths = o.table.getElementsByTagName('thead')[0].getElementsByTagName('tr')[2].getElementsByTagName('th'); - o.trs = o.table.getElementsByTagName('tbody')[0].getElementsByTagName('tr'); - - o.updateTableHeaders(); - - tableBody = tableHead = tr = createThAndButton = createTH = null; - - if(o.low && o.high && (o.high - o.low < 7)) { o.equaliseDates(); }; - - o.created = true; - - if(o.staticPos) { - var yyN = document.getElementById(o.id); - datePickerController.addEvent(yyN, "change", o.changeHandler); - if(o.splitDate) { - var mmN = document.getElementById(o.id+'-mm'); - var ddN = document.getElementById(o.id+'-dd'); - datePickerController.addEvent(mmN, "change", o.changeHandler); - datePickerController.addEvent(ddN, "change", o.changeHandler); - }; - - o.show(); - } else { - o.createButton(); - o.resize(); - o.fade(); - }; - }; - o.changeHandler = function() { - o.setDateFromInput(); - o.updateTable(); - }; - o.setDateFromInput = function() { - function m2c(val) { - return String(val).length < 2 ? "00".substring(0, 2 - String(val).length) + String(val) : val; - }; - - o.dateSet = null; - - var elem = o.getElem(); - if(!elem) return; - - if(!o.splitDate) { - var date = datePickerController.dateFormat(elem.value, o.format.search(/m-d-y/i) != -1); - } else { - var mmN = document.getElementById(o.id+'-mm'); - var ddN = document.getElementById(o.id+'-dd'); - var tm = parseInt(mmN.tagName.toLowerCase() == "input" ? mmN.value : mmN.options[mmN.selectedIndex].value, 10); - var td = parseInt(ddN.tagName.toLowerCase() == "input" ? ddN.value : ddN.options[ddN.selectedIndex].value, 10); - var ty = parseInt(elem.tagName.toLowerCase() == "input" ? elem.value : elem.options[elem.selectedIndex || 0].value, 10); - var date = datePickerController.dateFormat(tm + "/" + td + "/" + ty, true); - }; - - var badDate = false; - if(!date) { - badDate = true; - date = String(new Date().getFullYear()) + m2c(new Date().getMonth()+1) + m2c(new Date().getDate()); - }; - - var d,m,y; - y = Number(date.substr(0, 4)); - m = Number(date.substr(4, 2)) - 1; - d = Number(date.substr(6, 2)); - - var dpm = datePicker.getDaysPerMonth(m, y); - if(d > dpm) d = dpm; - - if(new Date(y, m, d) == 'Invalid Date' || new Date(y, m, d) == 'NaN') { - badDate = true; - o.date = new Date(); - o.date.setHours(5); - return; - }; - - o.date = new Date(y, m, d); - o.date.setHours(5); - - if(!badDate) o.dateSet = new Date(o.date); - m2c = null; - }; - o.setSelectIndex = function(elem, indx) { - var len = elem.options.length; - indx = Number(indx); - for(var opt = 0; opt < len; opt++) { - if(elem.options[opt].value == indx) { - elem.selectedIndex = opt; - return; - }; - }; - }, - o.returnFormattedDate = function() { - - var elem = o.getElem(); - if(!elem) return; - - var d = (o.date.getDate() < 10) ? "0" + o.date.getDate() : o.date.getDate(); - var m = ((o.date.getMonth() + 1) < 10) ? "0" + (o.date.getMonth() + 1) : o.date.getMonth() + 1; - var yyyy = o.date.getFullYear(); - var disabledDates = o.getDisabledDates(yyyy, m); - var weekDay = ( o.date.getDay() + 6 ) % 7; - - if(!(o.disableDays[weekDay] || String(yyyy)+m+d in disabledDates)) { - - if(o.splitDate) { - var ddE = document.getElementById(o.id+"-dd"); - var mmE = document.getElementById(o.id+"-mm"); - - if(ddE.tagName.toLowerCase() == "input") { ddE.value = d; } - else { o.setSelectIndex(ddE, d); /*ddE.selectedIndex = d - 1;*/ }; - - if(mmE.tagName.toLowerCase() == "input") { mmE.value = m; } - else { o.setSelectIndex(mmE, m); /*mmE.selectedIndex = m - 1;*/ }; - - if(elem.tagName.toLowerCase() == "input") elem.value = yyyy; - else { - o.setSelectIndex(elem, yyyy); /* - for(var opt = 0; opt < elem.options.length; opt++) { - if(elem.options[opt].value == yyyy) { - elem.selectedIndex = opt; - break; - }; - }; - */ - }; - } else { - elem.value = o.format.replace('y',yyyy).replace('m',m).replace('d',d).replace(/-/g,o.divider); - }; - if(!elem.type || elem.type && elem.type != "hidden"){ elem.focus(); } - if(o.staticPos) { - o.dateSet = new Date( o.date ); - o.updateTable(); - }; - - // Programmatically fire the onchange event - if(document.createEvent) { - var onchangeEvent = document.createEvent('HTMLEvents'); - onchangeEvent.initEvent('change', true, false); - elem.dispatchEvent(onchangeEvent); - } else if(document.createEventObject) { - elem.fireEvent('onchange'); - }; - }; - }; - o.disableTodayButton = function() { - var today = new Date(); - document.getElementById(o.id + "-today-but").className = document.getElementById(o.id + "-today-but").className.replace("fd-disabled", ""); - if(o.outOfRange(today) || (o.date.getDate() == today.getDate() && o.date.getMonth() == today.getMonth() && o.date.getFullYear() == today.getFullYear())) { - document.getElementById(o.id + "-today-but").className += " fd-disabled"; - document.getElementById(o.id + "-today-but").onclick = null; - } else { - document.getElementById(o.id + "-today-but").onclick = o.events.gotoToday; - }; - }; - o.updateTableHeaders = function() { - var d, but; - var ths = o.ths; - for ( var y = 0; y < 7; y++ ) { - d = (o.firstDayOfWeek + y) % 7; - ths[y].title = datePicker.fullDay[d]; - - if(y > 0) { - but = ths[y].getElementsByTagName("span")[0]; - but.removeChild(but.firstChild); - but.appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); - but.title = datePicker.fullDay[d]; - but = null; - } else { - ths[y].removeChild(ths[y].firstChild); - ths[y].appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); - }; - }; - o.updateTable(); - }; - - o.updateTable = function(noCallback) { - - if(o.timerSet) { - var d = new Date(o.date); - d.setDate( Math.min(d.getDate()+o.dayInc, datePicker.getDaysPerMonth(d.getMonth()+o.monthInc,d.getFullYear()+o.yearInc)) ); - d.setMonth( d.getMonth() + o.monthInc ); - d.setFullYear( d.getFullYear() + o.yearInc ); - o.date = d; - }; - - if(!noCallback && "onupdate" in datePickerController && typeof(datePickerController.onupdate) == "function") datePickerController.onupdate(o); - - o.outOfRange(); - o.disableTodayButton(); - - // Set the tmpDate to the second day of this month (to avoid daylight savings time madness on Windows) - var tmpDate = new Date( o.date.getFullYear(), o.date.getMonth(), 2 ); - tmpDate.setHours(5); - - var tdm = tmpDate.getMonth(); - var tdy = tmpDate.getFullYear(); - - // Do the disableDates for this year and month - var disabledDates = o.getDisabledDates(o.date.getFullYear(), o.date.getMonth() + 1); - - var today = new Date(); - - // Previous buttons out of range - var b = document.getElementById(o.id + "-prev-year-but"); - b.className = b.className.replace("fd-disabled", ""); - if(o.outOfRange(new Date((tdy - 1), Number(tdm), datePicker.getDaysPerMonth(Number(tdm), tdy-1)))) { - b.className += " fd-disabled"; - if(o.yearInc == -1) o.stopTimer(); - }; - - b = document.getElementById(o.id + "-prev-month-but") - b.className = b.className.replace("fd-disabled", ""); - if(o.outOfRange(new Date(tdy, (Number(tdm) - 1), datePicker.getDaysPerMonth(Number(tdm)-1, tdy)))) { - b.className += " fd-disabled"; - if(o.monthInc == -1) o.stopTimer(); - }; - - // Next buttons out of range - b= document.getElementById(o.id + "-next-year-but") - b.className = b.className.replace("fd-disabled", ""); - if(o.outOfRange(new Date((tdy + 1), Number(tdm), 1))) { - b.className += " fd-disabled"; - if(o.yearInc == 1) o.stopTimer(); - }; - - b = document.getElementById(o.id + "-next-month-but") - b.className = b.className.replace("fd-disabled", ""); - if(o.outOfRange(new Date(tdy, Number(tdm) + 1, 1))) { - b.className += " fd-disabled"; - if(o.monthInc == 1) o.stopTimer(); - }; - - b = null; - - var cd = o.date.getDate(); - var cm = o.date.getMonth(); - var cy = o.date.getFullYear(); - - // Title Bar - var span = o.titleBar.getElementsByTagName("span"); - while(span[0].firstChild) span[0].removeChild(span[0].firstChild); - while(span[1].firstChild) span[1].removeChild(span[1].firstChild); - span[0].appendChild(document.createTextNode(datePicker.months[cm] + o.nbsp)); - span[1].appendChild(document.createTextNode(cy)); - - tmpDate.setDate( 1 ); - - var dt, cName, td, tds, i; - var weekDay = ( tmpDate.getDay() + 6 ) % 7; - var firstColIndex = (( (weekDay - o.firstDayOfWeek) + 7 ) % 7) - 1; - var dpm = datePicker.getDaysPerMonth(cm, cy); - - var todayD = today.getDate(); - var todayM = today.getMonth(); - var todayY = today.getFullYear(); - - var c = "class"; - /*@cc_on - @if(@_win32) - c = "className"; - @end - @*/ - - var stub = String(tdy) + (String(tdm+1).length < 2 ? "0" + (tdm+1) : tdm+1); - - for(var row = 0; row < 6; row++) { - - tds = o.trs[row].getElementsByTagName('td'); - - for(var col = 0; col < 7; col++) { - - td = tds[col]; - td.removeChild(td.firstChild); - - td.setAttribute("id", ""); - td.setAttribute("title", ""); - - i = (row * 7) + col; - - if(i > firstColIndex && i <= (firstColIndex + dpm)) { - dt = i - firstColIndex; - - tmpDate.setDate(dt); - td.appendChild(document.createTextNode(dt)); - - if(o.outOfRange(tmpDate)) { - td.setAttribute(c, "out-of-range"); - } else { - - cName = []; - weekDay = ( tmpDate.getDay() + 6 ) % 7; - - if(dt == todayD && tdm == todayM && tdy == todayY) { - cName.push("date-picker-today"); - }; - - if(o.dateSet != null && o.dateSet.getDate() == dt && o.dateSet.getMonth() == tdm && o.dateSet.getFullYear() == tdy) { - cName.push("date-picker-selected-date"); - }; - - if(o.disableDays[weekDay] || stub + String(dt < 10 ? "0" + dt : dt) in disabledDates) { - cName.push("day-disabled"); - } else if(o.highlightDays[weekDay]) { - cName.push("date-picker-highlight"); - }; - - if(cd == dt) { - td.setAttribute("id", o.id + "-date-picker-hover"); - cName.push("date-picker-hover"); - }; - - cName.push("dm-" + dt + '-' + (tdm + 1) + " " + " dmy-" + dt + '-' + (tdm + 1) + '-' + tdy); - td.setAttribute(c, cName.join(' ')); - td.setAttribute("title", datePicker.months[cm] + o.nbsp + dt + "," + o.nbsp + cy); - }; - } else { - td.appendChild(document.createTextNode(o.nbsp)); - td.setAttribute(c, "date-picker-unused"); - }; - }; - }; - - if(o.timerSet) { - o.timerInc = 50 + Math.round(((o.timerInc - 50) / 1.8)); - o.timer = window.setTimeout(o.updateTable, o.timerInc); - }; - }; - o.addKeyboardEvents = function() { - datePickerController.addEvent(document, "keypress", o.events.onkeydown); - /*@cc_on - @if(@_win32) - datePickerController.removeEvent(document, "keypress", o.events.onkeydown); - datePickerController.addEvent(document, "keydown", o.events.onkeydown); - @end - @*/ - if(window.devicePixelRatio) { - datePickerController.removeEvent(document, "keypress", o.events.onkeydown); - datePickerController.addEvent(document, "keydown", o.events.onkeydown); - }; - }; - o.removeKeyboardEvents =function() { - datePickerController.removeEvent(document, "keypress", o.events.onkeydown); - datePickerController.removeEvent(document, "keydown", o.events.onkeydown); - }; - o.show = function() { - var elem = o.getElem(); - if(!elem || o.visible || elem.disabled) return; - - o.reset(); - o.setDateFromInput(); - o.updateTable(); - - if(!o.staticPos) o.resize(); - - datePickerController.addEvent(o.staticPos ? o.table : document, "mousedown", o.events.onmousedown); - - if(!o.staticPos) { o.addKeyboardEvents(); }; - - o.opacityTo = o.noTransparency ? 99 : 90; - o.div.style.display = "block"; - /*@cc_on - @if(@_jscript_version <= 5.6) - if(!o.staticPos) o.iePopUp.style.display = "block"; - @end - @*/ - - o.fade(); - o.visible = true; - }; - o.hide = function() { - if(!o.visible) return; - o.stopTimer(); - if(o.staticPos) return; - - datePickerController.removeEvent(document, "mousedown", o.events.onmousedown); - datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); - o.removeKeyboardEvents(); - - /*@cc_on - @if(@_jscript_version <= 5.6) - o.iePopUp.style.display = "none"; - @end - @*/ - - o.opacityTo = 0; - o.fade(); - o.visible = false; - var elem = o.getElem(); - if(!elem.type || elem.type && elem.type != "hidden") { elem.focus(); }; - }; - o.destroy = function() { - // Cleanup for Internet Explorer - datePickerController.removeEvent(o.staticPos ? o.table : document, "mousedown", o.events.onmousedown); - datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); - o.removeKeyboardEvents(); - - if(o.staticPos) { - var yyN = document.getElementById(o.id); - datePickerController.removeEvent(yyN, "change", o.changeHandler); - if(o.splitDate) { - var mmN = document.getElementById(o.id+'-mm'); - var ddN = document.getElementById(o.id+'-dd'); - - datePickerController.removeEvent(mmN, "change", o.changeHandler); - datePickerController.removeEvent(ddN, "change", o.changeHandler); - }; - o.div.onfocus = o.div.onblur = null; - }; - - var ths = o.table.getElementsByTagName("th"); - for(var i = 0, th; th = ths[i]; i++) { - th.onmouseover = th.onmouseout = th.onmousedown = th.onclick = null; - }; - - var tds = o.table.getElementsByTagName("td"); - for(var i = 0, td; td = tds[i]; i++) { - td.onmouseover = td.onclick = null; - }; - - var butts = o.table.getElementsByTagName("span"); - for(var i = 0, butt; butt = butts[i]; i++) { - butt.onmousedown = butt.onclick = butt.onkeypress = null; - }; - - o.ths = o.trs = null; - - clearTimeout(o.fadeTimer); - clearTimeout(o.timer); - o.fadeTimer = o.timer = null; - - /*@cc_on - @if(@_jscript_version <= 5.6) - o.iePopUp = null; - @end - @*/ - - if(!o.staticPos && document.getElementById(o.id.replace(/^fd-/, 'fd-but-'))) { - var butt = document.getElementById(o.id.replace(/^fd-/, 'fd-but-')); - butt.onclick = butt.onpress = null; - }; - - if(o.div && o.div.parentNode) { - o.div.parentNode.removeChild(o.div); - }; - - o.titleBar = o.table = o.div = null; - o = null; - }; - o.create(); -}; - -datePickerController = function() { - var datePickers = {}; - var uniqueId = 0; - - var addEvent = function(obj, type, fn) { - if( obj.attachEvent ) { - obj["e"+type+fn] = fn; - obj[type+fn] = function(){obj["e"+type+fn]( window.event );}; - obj.attachEvent( "on"+type, obj[type+fn] ); - } else { - obj.addEventListener( type, fn, true ); - }; - }; - var removeEvent = function(obj, type, fn) { - try { - if( obj.detachEvent ) { - obj.detachEvent( "on"+type, obj[type+fn] ); - obj[type+fn] = null; - } else { - obj.removeEventListener( type, fn, true ); - }; - } catch(err) {}; - }; - var hideAll = function(exception) { - var dp; - for(dp in datePickers) { - if(!datePickers[dp].created || datePickers[dp].staticPos) continue; - if(exception && exception == datePickers[dp].id) { continue; }; - if(document.getElementById(datePickers[dp].id)) { datePickers[dp].hide(); }; - }; - }; - var cleanUp = function() { - var dp; - for(dp in datePickers) { - if(!document.getElementById(datePickers[dp].id)) { - if(!datePickers[dp].created) continue; - datePickers[dp].destroy(); - datePickers[dp] = null; - delete datePickers[dp]; - }; - }; - }; - var destroy = function() { - for(dp in datePickers) { - if(!datePickers[dp].created) continue; - datePickers[dp].destroy(); - datePickers[dp] = null; - delete datePickers[dp]; - }; - datePickers = null; - /*@cc_on - @if(@_jscript_version <= 5.6) - if(document.getElementById("iePopUpHack")) { - document.body.removeChild(document.getElementById("iePopUpHack")); - }; - @end - @*/ - datePicker.script = null; - removeEvent(window, 'load', datePickerController.create); - removeEvent(window, 'unload', datePickerController.destroy); - }; - var dateFormat = function(dateIn, favourMDY) { - var dateTest = [ - { regExp:/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/, d:1, m:3, y:5 }, // dmy - { regExp:/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/, d:3, m:1, y:5 }, // mdy - { regExp:/^(\d\d\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/, d:5, m:3, y:1 } // ymd - ]; - - var start; - var cnt = 0; - while(cnt < 3) { - start = (cnt + (favourMDY ? 4 : 3)) % 3; - if(dateIn.match(dateTest[start].regExp)) { - res = dateIn.match(dateTest[start].regExp); - y = res[dateTest[start].y]; - m = res[dateTest[start].m]; - d = res[dateTest[start].d]; - if(m.length == 1) m = "0" + m; - if(d.length == 1) d = "0" + d; - if(y.length != 4) y = (parseInt(y) < 50) ? '20' + y : '19' + y; - return String(y)+m+d; - }; - cnt++; - }; - return 0; - }; - var joinNodeLists = function() { - if(!arguments.length) { return []; } - var nodeList = []; - for (var i = 0; i < arguments.length; i++) { - for (var j = 0, item; item = arguments[i][j]; j++) { - nodeList[nodeList.length] = item; - }; - }; - return nodeList; - }; - var addDatePicker = function(inpId, options) { - if(!(inpId in datePickers)) { - datePickers[inpId] = new datePicker(options); - }; - }; - var getDatePicker = function(inpId) { - if(!(inpId in datePickers)) { throw "No datePicker has been created for the form element with an id of '" + inpId.toString() + "'"; }; - return datePickers[inpId]; - }; - var grepRangeLimits = function(sel) { - var range = []; - for(var i = 0; i < sel.options.length; i++) { - if(sel.options[i].value.search(/^\d\d\d\d$/) == -1) { continue; }; - if(!range[0] || Number(sel.options[i].value) < range[0]) { range[0] = Number(sel.options[i].value); }; - if(!range[1] || Number(sel.options[i].value) > range[1]) { range[1] = Number(sel.options[i].value); }; - }; - return range; - }; - var create = function(inp) { - if(!(typeof document.createElement != "undefined" && typeof document.documentElement != "undefined" && typeof document.documentElement.offsetWidth == "number")) return; - - var inputs = (inp && inp.tagName) ? [inp] : joinNodeLists(document.getElementsByTagName('input'), document.getElementsByTagName('select')); - var regExp1 = /disable-days-([1-7]){1,6}/g; // the days to disable - var regExp2 = /no-transparency/g; // do not use transparency effects - var regExp3 = /highlight-days-([1-7]){1,7}/g; // the days to highlight in red - var regExp4 = /range-low-(\d\d\d\d-\d\d-\d\d)/g; // the lowest selectable date - var regExp5 = /range-high-(\d\d\d\d-\d\d-\d\d)/g; // the highest selectable date - var regExp6 = /format-(d-m-y|m-d-y|y-m-d)/g; // the input/output date format - var regExp7 = /divider-(dot|slash|space|dash)/g; // the character used to divide the date - var regExp8 = /no-locale/g; // do not attempt to detect the browser language - var regExp9 = /no-fade/g; // always show the datepicker - var regExp10 = /hide-input/g; // hide the input - - for(var i=0, inp; inp = inputs[i]; i++) { - if(inp.className && (inp.className.search(regExp6) != -1 || inp.className.search(/split-date/) != -1) && ((inp.tagName.toLowerCase() == "input" && (inp.type == "text" || inp.type == "hidden")) || inp.tagName.toLowerCase() == "select")) { - - if(inp.id && document.getElementById('fd-'+inp.id)) { continue; }; - - if(!inp.id) { inp.id = "fdDatePicker-" + uniqueId++; }; - - var options = { - id:inp.id, - low:"", - high:"", - divider:"/", - format:"d-m-y", - highlightDays:[0,0,0,0,0,1,1], - disableDays:[0,0,0,0,0,0,0], - locale:inp.className.search(regExp8) == -1, - splitDate:0, - noTransparency:inp.className.search(regExp2) != -1, - staticPos:inp.className.search(regExp9) != -1, - hideInput:inp.className.search(regExp10) != -1 - }; - - if(!options.staticPos) { - options.hideInput = false; - } else { - options.noTransparency = true; - }; - - // Split the date into three parts ? - if(inp.className.search(/split-date/) != -1) { - if(document.getElementById(inp.id+'-dd') && document.getElementById(inp.id+'-mm') && document.getElementById(inp.id+'-dd').tagName.search(/input|select/i) != -1 && document.getElementById(inp.id+'-mm').tagName.search(/input|select/i) != -1) { - options.splitDate = 1; - }; - }; - - // Date format(variations of d-m-y) - if(inp.className.search(regExp6) != -1) { - options.format = inp.className.match(regExp6)[0].replace('format-',''); - }; - - // What divider to use, a "/", "-", "." or " " - if(inp.className.search(regExp7) != -1) { - var dividers = { dot:".", space:" ", dash:"-", slash:"/" }; - options.divider = (inp.className.search(regExp7) != -1 && inp.className.match(regExp7)[0].replace('divider-','') in dividers) ? dividers[inp.className.match(regExp7)[0].replace('divider-','')] : "/"; - }; - - // The days to highlight - if(inp.className.search(regExp3) != -1) { - var tmp = inp.className.match(regExp3)[0].replace(/highlight-days-/, ''); - options.highlightDays = [0,0,0,0,0,0,0]; - for(var j = 0; j < tmp.length; j++) { - options.highlightDays[tmp.charAt(j) - 1] = 1; - }; - }; - - // The days to disable - if(inp.className.search(regExp1) != -1) { - var tmp = inp.className.match(regExp1)[0].replace(/disable-days-/, ''); - options.disableDays = [0,0,0,0,0,0,0]; - for(var j = 0; j < tmp.length; j++) { - options.disableDays[tmp.charAt(j) - 1] = 1; - }; - }; - - // The lower limit - if(inp.className.search(/range-low-today/i) != -1) { - options.low = datePickerController.dateFormat((new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + new Date().getFullYear(), true); - } else if(inp.className.search(regExp4) != -1) { - options.low = datePickerController.dateFormat(inp.className.match(regExp4)[0].replace(/range-low-/, ''), false); - if(!options.low) { - options.low = ''; - }; - }; - - // The higher limit - if(inp.className.search(/range-high-today/i) != -1 && inp.className.search(/range-low-today/i) == -1) { - options.high = datePickerController.dateFormat((new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + new Date().getFullYear(), true); - } else if(inp.className.search(regExp5) != -1) { - options.high = datePickerController.dateFormat(inp.className.match(regExp5)[0].replace(/range-high-/, ''), false); - if(!options.high) { - options.high = ''; - }; - }; - - // Always round lower & higher limits if a selectList involved - if(inp.tagName.search(/select/i) != -1) { - var range = grepRangeLimits(inp); - options.low = options.low ? range[0] + String(options.low).substr(4,4) : datePickerController.dateFormat(range[0] + "/01/01"); - options.high = options.high ? range[1] + String(options.low).substr(4,4) : datePickerController.dateFormat(range[1] + "/12/31"); - }; - - addDatePicker(inp.id, options); - }; - }; - } - - return { - addEvent:addEvent, - removeEvent:removeEvent, - create:create, - destroy:destroy, - cleanUp:cleanUp, - addDatePicker:addDatePicker, - getDatePicker:getDatePicker, - dateFormat:dateFormat, - datePickers:datePickers, - hideAll:hideAll - }; -}(); - -})(); - -datePickerController.addEvent(window, 'load', datePickerController.create); -datePickerController.addEvent(window, 'unload', datePickerController.destroy); +/* + DatePicker v4.4 by frequency-decoder.com + + Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/) + + Please credit frequency-decoder in any derivative work - thanks. + + You are free: + + * to copy, distribute, display, and perform the work + * to make derivative works + * to make commercial use of the work + + Under the following conditions: + + by Attribution. + -------------- + You must attribute the work in the manner specified by the author or licensor. + + sa + -- + Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. + + * For any reuse or distribution, you must make clear to others the license terms of this work. + * Any of these conditions can be waived if you get permission from the copyright holder. +*/ +var datePickerController; + +(function() { + +// Detect the browser language +datePicker.languageinfo = navigator.language ? navigator.language : navigator.userLanguage; +datePicker.languageinfo = datePicker.languageinfo ? datePicker.languageinfo.toLowerCase().replace(/-[a-z]+$/, "") : 'en'; + +// Load the appropriate language file +var scriptFiles = document.getElementsByTagName('head')[0].getElementsByTagName('script'); +var loc = scriptFiles[scriptFiles.length - 1].src.substr(0, scriptFiles[scriptFiles.length - 1].src.lastIndexOf("/")) + "/lang/" + datePicker.languageinfo + ".js"; + +var script = document.createElement('script'); +script.type = "text/javascript"; +script.src = loc; +script.setAttribute("charset", "utf-8"); +/*@cc_on +/*@if(@_win32) + var bases = document.getElementsByTagName('base'); + if (bases.length && bases[0].childNodes.length) { + bases[0].appendChild(script); + } else { + document.getElementsByTagName('head')[0].appendChild(script); + }; +@else @*/ +document.getElementsByTagName('head')[0].appendChild(script); +/*@end +@*/ +script = null; + +// Defaults should the locale file not load +datePicker.months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; +datePicker.fullDay = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]; +datePicker.titles = ["Previous month","Next month","Previous year","Next year", "Today", "Show Calendar"]; + +datePicker.getDaysPerMonth = function(nMonth, nYear) { + nMonth = (nMonth + 12) % 12; + return (((0 == (nYear%4)) && ((0 != (nYear%100)) || (0 == (nYear%400)))) && nMonth == 1) ? 29: [31,28,31,30,31,30,31,31,30,31,30,31][nMonth]; +}; + +function datePicker(options) { + + this.defaults = {}; + for(opt in options) { this[opt] = this.defaults[opt] = options[opt]; }; + + this.date = new Date(); + this.yearinc = 1; + this.timer = null; + this.pause = 1000; + this.timerSet = false; + this.fadeTimer = null; + this.interval = new Date(); + this.firstDayOfWeek = this.defaults.firstDayOfWeek = this.dayInc = this.monthInc = this.yearInc = this.opacity = this.opacityTo = 0; + this.dateSet = null; + this.visible = false; + this.disabledDates = []; + this.enabledDates = []; + this.nbsp = String.fromCharCode( 160 ); + var o = this; + + o.events = { + onblur:function(e) { + o.removeKeyboardEvents(); + }, + onfocus:function(e) { + o.addKeyboardEvents(); + }, + onkeydown: function (e) { + o.stopTimer(); + if(!o.visible) return false; + + if(e == null) e = document.parentWindow.event; + var kc = e.keyCode ? e.keyCode : e.charCode; + + if( kc == 13 ) { + // close (return) + var td = document.getElementById(o.id + "-date-picker-hover"); + if(!td || td.className.search(/out-of-range|day-disabled/) != -1) return o.killEvent(e); + o.returnFormattedDate(); + o.hide(); + return o.killEvent(e); + } else if(kc == 27) { + // close (esc) + o.hide(); + return o.killEvent(e); + } else if(kc == 32 || kc == 0) { + // today (space) + o.date = new Date(); + o.updateTable(); + return o.killEvent(e); + }; + + // Internet Explorer fires the keydown event faster than the JavaScript engine can + // update the interface. The following attempts to fix this. + /*@cc_on + @if(@_win32) + if(new Date().getTime() - o.interval.getTime() < 100) return o.killEvent(e); + o.interval = new Date(); + @end + @*/ + + if ((kc > 49 && kc < 56) || (kc > 97 && kc < 104)) { + if (kc > 96) kc -= (96-48); + kc -= 49; + o.firstDayOfWeek = (o.firstDayOfWeek + kc) % 7; + o.updateTable(); + return o.killEvent(e); + }; + + if ( kc < 37 || kc > 40 ) return true; + + var d = new Date( o.date ).valueOf(); + + if ( kc == 37 ) { + // ctrl + left = previous month + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() - 1,d.getFullYear())) ); + d.setMonth( d.getMonth() - 1 ); + } else { + d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() - 1 ); + }; + } else if ( kc == 39 ) { + // ctrl + right = next month + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() + 1,d.getFullYear())) ); + d.setMonth( d.getMonth() + 1 ); + } else { + d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() + 1 ); + }; + } else if ( kc == 38 ) { + // ctrl + up = next year + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() + 1)) ); + d.setFullYear( d.getFullYear() + 1 ); + } else { + d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() - 7 ); + }; + } else if ( kc == 40 ) { + // ctrl + down = prev year + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() - 1)) ); + d.setFullYear( d.getFullYear() - 1 ); + } else { + d = new Date( o.date.getFullYear(), o.date.getMonth(), o.date.getDate() + 7 ); + }; + }; + + var tmpDate = new Date(d); + + if(o.outOfRange(tmpDate)) return o.killEvent(e); + + var cacheDate = new Date(o.date); + o.date = tmpDate; + + if(cacheDate.getFullYear() != o.date.getFullYear() || cacheDate.getMonth() != o.date.getMonth()) o.updateTable(); + else { + o.disableTodayButton(); + var tds = o.table.getElementsByTagName('td'); + var txt; + var start = o.date.getDate() - 6; + if(start < 0) start = 0; + + for(var i = start, td; td = tds[i]; i++) { + txt = Number(td.firstChild.nodeValue); + if(isNaN(txt) || txt != o.date.getDate()) continue; + o.removeHighlight(); + td.id = o.id + "-date-picker-hover"; + td.className = td.className.replace(/date-picker-hover/g, "") + " date-picker-hover"; + }; + }; + return o.killEvent(e); + }, + gotoToday: function(e) { + o.date = new Date(); + o.updateTable(); + return o.killEvent(e); + }, + onmousedown: function(e) { + if ( e == null ) e = document.parentWindow.event; + var el = e.target != null ? e.target : e.srcElement; + + var found = false; + while(el.parentNode) { + if(el.id && (el.id == "fd-"+o.id || el.id == "fd-but-"+o.id)) { + found = true; + break; + }; + try { + el = el.parentNode; + } catch(err) { + break; + }; + }; + if(found) return true; + o.stopTimer(); + datePickerController.hideAll(); + }, + onmouseover: function(e) { + o.stopTimer(); + var txt = this.firstChild.nodeValue; + if(this.className == "out-of-range" || txt.search(/^[\d]+$/) == -1) return; + + o.removeHighlight(); + + this.id = o.id+"-date-picker-hover"; + this.className = this.className.replace(/date-picker-hover/g, "") + " date-picker-hover"; + + o.date.setDate(this.firstChild.nodeValue); + o.disableTodayButton(); + }, + onclick: function(e) { + if(o.opacity != o.opacityTo || this.className.search(/out-of-range|day-disabled/) != -1) return false; + if ( e == null ) e = document.parentWindow.event; + var el = e.target != null ? e.target : e.srcElement; + while ( el.nodeType != 1 ) el = el.parentNode; + var d = new Date( o.date ); + var txt = el.firstChild.data; + if(txt.search(/^[\d]+$/) == -1) return; + var n = Number( txt ); + if(isNaN(n)) { return true; }; + d.setDate( n ); + o.date = d; + o.returnFormattedDate(); + if(!o.staticPos) o.hide(); + o.stopTimer(); + return o.killEvent(e); + }, + incDec: function(e) { + if ( e == null ) e = document.parentWindow.event; + var el = e.target != null ? e.target : e.srcElement; + + if(el && el.className && el.className.search('fd-disabled') != -1) { return false; } + datePickerController.addEvent(document, "mouseup", o.events.clearTimer); + o.timerInc = 800; + o.dayInc = arguments[1]; + o.yearInc = arguments[2]; + o.monthInc = arguments[3]; + o.timerSet = true; + + o.updateTable(); + return true; + }, + clearTimer: function(e) { + o.stopTimer(); + o.timerInc = 1000; + o.yearInc = 0; + o.monthInc = 0; + o.dayInc = 0; + datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); + } + }; + o.stopTimer = function() { + o.timerSet = false; + window.clearTimeout(o.timer); + }; + o.removeHighlight = function() { + if(document.getElementById(o.id+"-date-picker-hover")) { + document.getElementById(o.id+"-date-picker-hover").className = document.getElementById(o.id+"-date-picker-hover").className.replace("date-picker-hover", ""); + document.getElementById(o.id+"-date-picker-hover").id = ""; + }; + }; + o.reset = function() { + for(def in o.defaults) { o[def] = o.defaults[def]; }; + }; + o.setOpacity = function(op) { + o.div.style.opacity = op/100; + o.div.style.filter = 'alpha(opacity=' + op + ')'; + o.opacity = op; + }; + o.fade = function() { + window.clearTimeout(o.fadeTimer); + o.fadeTimer = null; + delete(o.fadeTimer); + + var diff = Math.round(o.opacity + ((o.opacityTo - o.opacity) / 4)); + + o.setOpacity(diff); + + if(Math.abs(o.opacityTo - diff) > 3 && !o.noTransparency) { + o.fadeTimer = window.setTimeout(o.fade, 50); + } else { + o.setOpacity(o.opacityTo); + if(o.opacityTo == 0) { + o.div.style.display = "none"; + o.visible = false; + } else { + o.visible = true; + }; + }; + }; + o.killEvent = function(e) { + e = e || document.parentWindow.event; + + if(e.stopPropagation) { + e.stopPropagation(); + e.preventDefault(); + }; + + /*@cc_on + @if(@_win32) + e.cancelBubble = true; + e.returnValue = false; + @end + @*/ + return false; + }; + o.getElem = function() { + return document.getElementById(o.id.replace(/^fd-/, '')) || false; + }; + o.setRangeLow = function(range) { + if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; + o.low = o.defaults.low = range; + if(o.staticPos) o.updateTable(true); + }; + o.setRangeHigh = function(range) { + if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; + o.high = o.defaults.high = range; + if(o.staticPos) o.updateTable(true); + }; + o.setDisabledDays = function(dayArray) { + o.disableDays = o.defaults.disableDays = dayArray; + if(o.staticPos) o.updateTable(true); + }; + o.setDisabledDates = function(dateArray) { + var fin = []; + for(var i = dateArray.length; i-- ;) { + if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01])$/) != -1) fin[fin.length] = dateArray[i]; + }; + if(fin.length) { + o.disabledDates = fin; + o.enabledDates = []; + if(o.staticPos) o.updateTable(true); + }; + }; + o.setEnabledDates = function(dateArray) { + var fin = []; + for(var i = dateArray.length; i-- ;) { + if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01]|\*\*)$/) != -1 && dateArray[i] != "********") fin[fin.length] = dateArray[i]; + }; + if(fin.length) { + o.disabledDates = []; + o.enabledDates = fin; + if(o.staticPos) o.updateTable(true); + }; + }; + o.getDisabledDates = function(y, m) { + if(o.enabledDates.length) return o.getEnabledDates(y, m); + var obj = {}; + var d = datePicker.getDaysPerMonth(m - 1, y); + m = m < 10 ? "0" + String(m) : m; + for(var i = o.disabledDates.length; i-- ;) { + var tmp = o.disabledDates[i].replace("****", y).replace("**", m); + if(tmp < Number(String(y)+m+"01") || tmp > Number(y+String(m)+d)) continue; + obj[tmp] = 1; + }; + return obj; + }; + o.getEnabledDates = function(y, m) { + var obj = {}; + var d = datePicker.getDaysPerMonth(m - 1, y); + m = m < 10 ? "0" + String(m) : m; + var day,tmp,de,me,ye,disabled; + for(var dd = 1; dd <= d; dd++) { + day = dd < 10 ? "0" + String(dd) : dd; + disabled = true; + for(var i = o.enabledDates.length; i-- ;) { + tmp = o.enabledDates[i]; + ye = String(o.enabledDates[i]).substr(0,4); + me = String(o.enabledDates[i]).substr(4,2); + de = String(o.enabledDates[i]).substr(6,2); + + if(ye == y && me == m && de == day) { + disabled = false; + break; + } + + if(ye == "****" || me == "**" || de == "**") { + if(ye == "****") tmp = tmp.replace(/^\*\*\*\*/, y); + if(me == "**") tmp = tmp = tmp.substr(0,4) + String(m) + tmp.substr(6,2); + if(de == "**") tmp = tmp.replace(/\*\*/, day); + + if(tmp == String(y + String(m) + day)) { + disabled = false; + break; + }; + }; + }; + if(disabled) obj[String(y + String(m) + day)] = 1; + }; + return obj; + }; + o.setFirstDayOfWeek = function(e) { + if ( e == null ) e = document.parentWindow.event; + var elem = e.target != null ? e.target : e.srcElement; + if(elem.tagName.toLowerCase() != "th") { + while(elem.tagName.toLowerCase() != "th") elem = elem.parentNode; + }; + var cnt = 0; + while(elem.previousSibling) { + elem = elem.previousSibling; + if(elem.tagName.toLowerCase() == "th") cnt++; + }; + o.firstDayOfWeek = (o.firstDayOfWeek + cnt) % 7; + o.updateTableHeaders(); + return o.killEvent(e); + }; + o.truePosition = function(element) { + var pos = o.cumulativeOffset(element); + if(window.opera) { return pos; } + var iebody = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body; + var dsocleft = document.all ? iebody.scrollLeft : window.pageXOffset; + var dsoctop = document.all ? iebody.scrollTop : window.pageYOffset; + var posReal = o.realOffset(element); + return [pos[0] - posReal[0] + dsocleft, pos[1] - posReal[1] + dsoctop]; + }; + o.realOffset = function(element) { + var t = 0, l = 0; + do { + t += element.scrollTop || 0; + l += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [l, t]; + }; + o.cumulativeOffset = function(element) { + var t = 0, l = 0; + do { + t += element.offsetTop || 0; + l += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [l, t]; + }; + o.resize = function() { + if(!o.created || !o.getElem()) return; + + o.div.style.visibility = "hidden"; + if(!o.staticPos) { o.div.style.left = o.div.style.top = "0px"; } + o.div.style.display = "block"; + + var osh = o.div.offsetHeight; + var osw = o.div.offsetWidth; + + o.div.style.visibility = "visible"; + o.div.style.display = "none"; + + if(!o.staticPos) { + var elem = document.getElementById('fd-but-' + o.id); + var pos = o.truePosition(elem); + var trueBody = (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body; + var scrollTop = window.devicePixelRatio || window.opera ? 0 : trueBody.scrollTop; + var scrollLeft = window.devicePixelRatio || window.opera ? 0 : trueBody.scrollLeft; + + if(parseInt(trueBody.clientWidth+scrollLeft) < parseInt(osw+pos[0])) { + o.div.style.left = Math.abs(parseInt((trueBody.clientWidth+scrollLeft) - osw)) + "px"; + } else { + o.div.style.left = pos[0] + "px"; + }; + + if(parseInt(trueBody.clientHeight+scrollTop) < parseInt(osh+pos[1]+elem.offsetHeight+2)) { + o.div.style.top = Math.abs(parseInt(pos[1] - (osh + 2))) + "px"; + } else { + o.div.style.top = Math.abs(parseInt(pos[1] + elem.offsetHeight + 2)) + "px"; + }; + }; + /*@cc_on + @if(@_jscript_version <= 5.6) + if(o.staticPos) return; + o.iePopUp.style.top = o.div.style.top; + o.iePopUp.style.left = o.div.style.left; + o.iePopUp.style.width = osw + "px"; + o.iePopUp.style.height = (osh - 2) + "px"; + @end + @*/ + }; + o.equaliseDates = function() { + var clearDayFound = false; + var tmpDate; + for(var i = o.low; i <= o.high; i++) { + tmpDate = String(i); + if(!o.disableDays[new Date(tmpDate.substr(0,4), tmpDate.substr(6,2), tmpDate.substr(4,2)).getDay() - 1]) { + clearDayFound = true; + break; + }; + }; + if(!clearDayFound) o.disableDays = o.defaults.disableDays = [0,0,0,0,0,0,0]; + }; + o.outOfRange = function(tmpDate) { + if(!o.low && !o.high) return false; + + var level = false; + if(!tmpDate) { + level = true; + tmpDate = o.date; + }; + + var d = (tmpDate.getDate() < 10) ? "0" + tmpDate.getDate() : tmpDate.getDate(); + var m = ((tmpDate.getMonth() + 1) < 10) ? "0" + (tmpDate.getMonth() + 1) : tmpDate.getMonth() + 1; + var y = tmpDate.getFullYear(); + var dt = String(y)+String(m)+String(d); + + if(o.low && parseInt(dt) < parseInt(o.low)) { + if(!level) return true; + o.date = new Date(o.low.substr(0,4), o.low.substr(4,2)-1, o.low.substr(6,2), 5, 0, 0); + return false; + }; + if(o.high && parseInt(dt) > parseInt(o.high)) { + if(!level) return true; + o.date = new Date( o.high.substr(0,4), o.high.substr(4,2)-1, o.high.substr(6,2), 5, 0, 0); + }; + return false; + }; + o.createButton = function() { + if(o.staticPos) { return; }; + + var but; + + if(!document.getElementById("fd-but-" + o.id)) { + var inp = o.getElem(); + + but = document.createElement('a'); + but.href = "#"; + + var span = document.createElement('span'); + span.appendChild(document.createTextNode(String.fromCharCode( 160 ))); + + but.className = "date-picker-control"; + but.title = (typeof(fdLocale) == "object" && options.locale && fdLocale.titles.length > 5) ? fdLocale.titles[5] : ""; + + but.id = "fd-but-" + o.id; + but.appendChild(span); + + if(inp.nextSibling) { + inp.parentNode.insertBefore(but, inp.nextSibling); + } else { + inp.parentNode.appendChild(but); + }; + } else { + but = document.getElementById("fd-but-" + o.id); + }; + + but.onclick = but.onpress = function(e) { + e = e || window.event; + var inpId = this.id.replace('fd-but-',''); + try { var dp = datePickerController.getDatePicker(inpId); } catch(err) { return false; }; + + if(e.type == "press") { + var kc = e.keyCode != null ? e.keyCode : e.charCode; + if(kc != 13) { return true; }; + if(dp.visible) { + hideAll(); + return false; + }; + }; + + if(!dp.visible) { + datePickerController.hideAll(inpId); + dp.show(); + } else { + datePickerController.hideAll(); + }; + return false; + }; + but = null; + }, + o.create = function() { + + function createTH(details) { + var th = document.createElement('th'); + if(details.thClassName) th.className = details.thClassName; + if(details.colspan) { + /*@cc_on + /*@if (@_win32) + th.setAttribute('colSpan',details.colspan); + @else @*/ + th.setAttribute('colspan',details.colspan); + /*@end + @*/ + }; + /*@cc_on + /*@if (@_win32) + th.unselectable = "on"; + /*@end@*/ + return th; + }; + + function createThAndButton(tr, obj) { + for(var i = 0, details; details = obj[i]; i++) { + var th = createTH(details); + tr.appendChild(th); + var but = document.createElement('span'); + but.className = details.className; + but.id = o.id + details.id; + but.appendChild(document.createTextNode(details.text)); + but.title = details.title || ""; + if(details.onmousedown) but.onmousedown = details.onmousedown; + if(details.onclick) but.onclick = details.onclick; + if(details.onmouseout) but.onmouseout = details.onmouseout; + th.appendChild(but); + }; + }; + + /*@cc_on + @if(@_jscript_version <= 5.6) + if(!document.getElementById("iePopUpHack")) { + o.iePopUp = document.createElement('iframe'); + o.iePopUp.src = "javascript:'';"; + o.iePopUp.setAttribute('className','iehack'); + o.iePopUp.scrolling="no"; + o.iePopUp.frameBorder="0"; + o.iePopUp.name = o.iePopUp.id = "iePopUpHack"; + document.body.appendChild(o.iePopUp); + } else { + o.iePopUp = document.getElementById("iePopUpHack"); + }; + @end + @*/ + + if(typeof(fdLocale) == "object" && o.locale) { + datePicker.titles = fdLocale.titles; + datePicker.months = fdLocale.months; + datePicker.fullDay = fdLocale.fullDay; + // Optional parameters + if(fdLocale.dayAbbr) datePicker.dayAbbr = fdLocale.dayAbbr; + if(fdLocale.firstDayOfWeek) o.firstDayOfWeek = o.defaults.firstDayOfWeek = fdLocale.firstDayOfWeek; + }; + + o.div = document.createElement('div'); + o.div.style.zIndex = 9999; + o.div.id = "fd-"+o.id; + o.div.className = "datePicker"; + + if(!o.staticPos) { + document.getElementsByTagName('body')[0].appendChild(o.div); + } else { + elem = o.getElem(); + if(!elem) { + o.div = null; + return; + }; + o.div.className += " staticDP"; + o.div.setAttribute("tabIndex", "0"); + o.div.onfocus = o.events.onfocus; + o.div.onblur = o.events.onblur; + elem.parentNode.insertBefore(o.div, elem.nextSibling); + if(o.hideInput && elem.type && elem.type == "text") elem.setAttribute("type", "hidden"); + }; + + //var nbsp = String.fromCharCode( 160 ); + var tr, row, col, tableHead, tableBody; + + o.table = document.createElement('table'); + o.div.appendChild( o.table ); + + tableHead = document.createElement('thead'); + o.table.appendChild( tableHead ); + + tr = document.createElement('tr'); + tableHead.appendChild(tr); + + // Title Bar + o.titleBar = createTH({thClassName:"date-picker-title", colspan:7}); + tr.appendChild( o.titleBar ); + tr = null; + + var span = document.createElement('span'); + span.className = "month-display"; + o.titleBar.appendChild(span); + + span = document.createElement('span'); + span.className = "year-display"; + o.titleBar.appendChild(span); + + span = null; + + tr = document.createElement('tr'); + tableHead.appendChild(tr); + + createThAndButton(tr, [{className:"prev-but", id:"-prev-year-but", text:"\u00AB", title:datePicker.titles[2], onmousedown:function(e) { o.events.incDec(e,0,-1,0); }, onmouseout:o.events.clearTimer },{className:"prev-but", id:"-prev-month-but", text:"\u2039", title:datePicker.titles[0], onmousedown:function(e) { o.events.incDec(e,0,0,-1); }, onmouseout:o.events.clearTimer },{colspan:3, className:"today-but", id:"-today-but", text:datePicker.titles.length > 4 ? datePicker.titles[4] : "Today", onclick:o.events.gotoToday},{className:"next-but", id:"-next-month-but", text:"\u203A", title:datePicker.titles[1], onmousedown:function(e) { o.events.incDec(e,0,0,1); }, onmouseout:o.events.clearTimer },{className:"next-but", id:"-next-year-but", text:"\u00BB", title:datePicker.titles[3], onmousedown:function(e) { o.events.incDec(e,0,1,0); }, onmouseout:o.events.clearTimer }]); + + tableBody = document.createElement('tbody'); + o.table.appendChild( tableBody ); + + for(var rows = 0; rows < 7; rows++) { + row = document.createElement('tr'); + + if(rows != 0) tableBody.appendChild(row); + else tableHead.appendChild(row); + + for(var cols = 0; cols < 7; cols++) { + col = (rows == 0) ? document.createElement('th') : document.createElement('td'); + + row.appendChild(col); + if(rows != 0) { + col.appendChild(document.createTextNode(o.nbsp)); + col.onmouseover = o.events.onmouseover; + col.onclick = o.events.onclick; + } else { + col.className = "date-picker-day-header"; + col.scope = "col"; + }; + col = null; + }; + row = null; + }; + + // Table headers + var but; + var ths = o.table.getElementsByTagName('thead')[0].getElementsByTagName('tr')[2].getElementsByTagName('th'); + for ( var y = 0; y < 7; y++ ) { + if(y > 0) { + but = document.createElement("span"); + but.className = "fd-day-header"; + but.onclick = ths[y].onclick = o.setFirstDayOfWeek; + but.appendChild(document.createTextNode(o.nbsp)); + ths[y].appendChild(but); + but = null; + } else { + ths[y].appendChild(document.createTextNode(o.nbsp)); + }; + }; + + o.ths = o.table.getElementsByTagName('thead')[0].getElementsByTagName('tr')[2].getElementsByTagName('th'); + o.trs = o.table.getElementsByTagName('tbody')[0].getElementsByTagName('tr'); + + o.updateTableHeaders(); + + tableBody = tableHead = tr = createThAndButton = createTH = null; + + if(o.low && o.high && (o.high - o.low < 7)) { o.equaliseDates(); }; + + o.created = true; + + if(o.staticPos) { + var yyN = document.getElementById(o.id); + datePickerController.addEvent(yyN, "change", o.changeHandler); + if(o.splitDate) { + var mmN = document.getElementById(o.id+'-mm'); + var ddN = document.getElementById(o.id+'-dd'); + datePickerController.addEvent(mmN, "change", o.changeHandler); + datePickerController.addEvent(ddN, "change", o.changeHandler); + }; + + o.show(); + } else { + o.createButton(); + o.resize(); + o.fade(); + }; + }; + o.changeHandler = function() { + o.setDateFromInput(); + o.updateTable(); + }; + o.setDateFromInput = function() { + function m2c(val) { + return String(val).length < 2 ? "00".substring(0, 2 - String(val).length) + String(val) : val; + }; + + o.dateSet = null; + + var elem = o.getElem(); + if(!elem) return; + + if(!o.splitDate) { + var date = datePickerController.dateFormat(elem.value, o.format.search(/m-d-y/i) != -1); + } else { + var mmN = document.getElementById(o.id+'-mm'); + var ddN = document.getElementById(o.id+'-dd'); + var tm = parseInt(mmN.tagName.toLowerCase() == "input" ? mmN.value : mmN.options[mmN.selectedIndex].value, 10); + var td = parseInt(ddN.tagName.toLowerCase() == "input" ? ddN.value : ddN.options[ddN.selectedIndex].value, 10); + var ty = parseInt(elem.tagName.toLowerCase() == "input" ? elem.value : elem.options[elem.selectedIndex || 0].value, 10); + var date = datePickerController.dateFormat(tm + "/" + td + "/" + ty, true); + }; + + var badDate = false; + if(!date) { + badDate = true; + date = String(new Date().getFullYear()) + m2c(new Date().getMonth()+1) + m2c(new Date().getDate()); + }; + + var d,m,y; + y = Number(date.substr(0, 4)); + m = Number(date.substr(4, 2)) - 1; + d = Number(date.substr(6, 2)); + + var dpm = datePicker.getDaysPerMonth(m, y); + if(d > dpm) d = dpm; + + if(new Date(y, m, d) == 'Invalid Date' || new Date(y, m, d) == 'NaN') { + badDate = true; + o.date = new Date(); + o.date.setHours(5); + return; + }; + + o.date = new Date(y, m, d); + o.date.setHours(5); + + if(!badDate) o.dateSet = new Date(o.date); + m2c = null; + }; + o.setSelectIndex = function(elem, indx) { + var len = elem.options.length; + indx = Number(indx); + for(var opt = 0; opt < len; opt++) { + if(elem.options[opt].value == indx) { + elem.selectedIndex = opt; + return; + }; + }; + }, + o.returnFormattedDate = function() { + + var elem = o.getElem(); + if(!elem) return; + + var d = (o.date.getDate() < 10) ? "0" + o.date.getDate() : o.date.getDate(); + var m = ((o.date.getMonth() + 1) < 10) ? "0" + (o.date.getMonth() + 1) : o.date.getMonth() + 1; + var yyyy = o.date.getFullYear(); + var disabledDates = o.getDisabledDates(yyyy, m); + var weekDay = ( o.date.getDay() + 6 ) % 7; + + if(!(o.disableDays[weekDay] || String(yyyy)+m+d in disabledDates)) { + + if(o.splitDate) { + var ddE = document.getElementById(o.id+"-dd"); + var mmE = document.getElementById(o.id+"-mm"); + + if(ddE.tagName.toLowerCase() == "input") { ddE.value = d; } + else { o.setSelectIndex(ddE, d); /*ddE.selectedIndex = d - 1;*/ }; + + if(mmE.tagName.toLowerCase() == "input") { mmE.value = m; } + else { o.setSelectIndex(mmE, m); /*mmE.selectedIndex = m - 1;*/ }; + + if(elem.tagName.toLowerCase() == "input") elem.value = yyyy; + else { + o.setSelectIndex(elem, yyyy); /* + for(var opt = 0; opt < elem.options.length; opt++) { + if(elem.options[opt].value == yyyy) { + elem.selectedIndex = opt; + break; + }; + }; + */ + }; + } else { + elem.value = o.format.replace('y',yyyy).replace('m',m).replace('d',d).replace(/-/g,o.divider); + }; + if(!elem.type || elem.type && elem.type != "hidden"){ elem.focus(); } + if(o.staticPos) { + o.dateSet = new Date( o.date ); + o.updateTable(); + }; + + // Programmatically fire the onchange event + if(document.createEvent) { + var onchangeEvent = document.createEvent('HTMLEvents'); + onchangeEvent.initEvent('change', true, false); + elem.dispatchEvent(onchangeEvent); + } else if(document.createEventObject) { + elem.fireEvent('onchange'); + }; + }; + }; + o.disableTodayButton = function() { + var today = new Date(); + document.getElementById(o.id + "-today-but").className = document.getElementById(o.id + "-today-but").className.replace("fd-disabled", ""); + if(o.outOfRange(today) || (o.date.getDate() == today.getDate() && o.date.getMonth() == today.getMonth() && o.date.getFullYear() == today.getFullYear())) { + document.getElementById(o.id + "-today-but").className += " fd-disabled"; + document.getElementById(o.id + "-today-but").onclick = null; + } else { + document.getElementById(o.id + "-today-but").onclick = o.events.gotoToday; + }; + }; + o.updateTableHeaders = function() { + var d, but; + var ths = o.ths; + for ( var y = 0; y < 7; y++ ) { + d = (o.firstDayOfWeek + y) % 7; + ths[y].title = datePicker.fullDay[d]; + + if(y > 0) { + but = ths[y].getElementsByTagName("span")[0]; + but.removeChild(but.firstChild); + but.appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); + but.title = datePicker.fullDay[d]; + but = null; + } else { + ths[y].removeChild(ths[y].firstChild); + ths[y].appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); + }; + }; + o.updateTable(); + }; + + o.updateTable = function(noCallback) { + + if(o.timerSet) { + var d = new Date(o.date); + d.setDate( Math.min(d.getDate()+o.dayInc, datePicker.getDaysPerMonth(d.getMonth()+o.monthInc,d.getFullYear()+o.yearInc)) ); + d.setMonth( d.getMonth() + o.monthInc ); + d.setFullYear( d.getFullYear() + o.yearInc ); + o.date = d; + }; + + if(!noCallback && "onupdate" in datePickerController && typeof(datePickerController.onupdate) == "function") datePickerController.onupdate(o); + + o.outOfRange(); + o.disableTodayButton(); + + // Set the tmpDate to the second day of this month (to avoid daylight savings time madness on Windows) + var tmpDate = new Date( o.date.getFullYear(), o.date.getMonth(), 2 ); + tmpDate.setHours(5); + + var tdm = tmpDate.getMonth(); + var tdy = tmpDate.getFullYear(); + + // Do the disableDates for this year and month + var disabledDates = o.getDisabledDates(o.date.getFullYear(), o.date.getMonth() + 1); + + var today = new Date(); + + // Previous buttons out of range + var b = document.getElementById(o.id + "-prev-year-but"); + b.className = b.className.replace("fd-disabled", ""); + if(o.outOfRange(new Date((tdy - 1), Number(tdm), datePicker.getDaysPerMonth(Number(tdm), tdy-1)))) { + b.className += " fd-disabled"; + if(o.yearInc == -1) o.stopTimer(); + }; + + b = document.getElementById(o.id + "-prev-month-but") + b.className = b.className.replace("fd-disabled", ""); + if(o.outOfRange(new Date(tdy, (Number(tdm) - 1), datePicker.getDaysPerMonth(Number(tdm)-1, tdy)))) { + b.className += " fd-disabled"; + if(o.monthInc == -1) o.stopTimer(); + }; + + // Next buttons out of range + b= document.getElementById(o.id + "-next-year-but") + b.className = b.className.replace("fd-disabled", ""); + if(o.outOfRange(new Date((tdy + 1), Number(tdm), 1))) { + b.className += " fd-disabled"; + if(o.yearInc == 1) o.stopTimer(); + }; + + b = document.getElementById(o.id + "-next-month-but") + b.className = b.className.replace("fd-disabled", ""); + if(o.outOfRange(new Date(tdy, Number(tdm) + 1, 1))) { + b.className += " fd-disabled"; + if(o.monthInc == 1) o.stopTimer(); + }; + + b = null; + + var cd = o.date.getDate(); + var cm = o.date.getMonth(); + var cy = o.date.getFullYear(); + + // Title Bar + var span = o.titleBar.getElementsByTagName("span"); + while(span[0].firstChild) span[0].removeChild(span[0].firstChild); + while(span[1].firstChild) span[1].removeChild(span[1].firstChild); + span[0].appendChild(document.createTextNode(datePicker.months[cm] + o.nbsp)); + span[1].appendChild(document.createTextNode(cy)); + + tmpDate.setDate( 1 ); + + var dt, cName, td, tds, i; + var weekDay = ( tmpDate.getDay() + 6 ) % 7; + var firstColIndex = (( (weekDay - o.firstDayOfWeek) + 7 ) % 7) - 1; + var dpm = datePicker.getDaysPerMonth(cm, cy); + + var todayD = today.getDate(); + var todayM = today.getMonth(); + var todayY = today.getFullYear(); + + var c = "class"; + /*@cc_on + @if(@_win32) + c = "className"; + @end + @*/ + + var stub = String(tdy) + (String(tdm+1).length < 2 ? "0" + (tdm+1) : tdm+1); + + for(var row = 0; row < 6; row++) { + + tds = o.trs[row].getElementsByTagName('td'); + + for(var col = 0; col < 7; col++) { + + td = tds[col]; + td.removeChild(td.firstChild); + + td.setAttribute("id", ""); + td.setAttribute("title", ""); + + i = (row * 7) + col; + + if(i > firstColIndex && i <= (firstColIndex + dpm)) { + dt = i - firstColIndex; + + tmpDate.setDate(dt); + td.appendChild(document.createTextNode(dt)); + + if(o.outOfRange(tmpDate)) { + td.setAttribute(c, "out-of-range"); + } else { + + cName = []; + weekDay = ( tmpDate.getDay() + 6 ) % 7; + + if(dt == todayD && tdm == todayM && tdy == todayY) { + cName.push("date-picker-today"); + }; + + if(o.dateSet != null && o.dateSet.getDate() == dt && o.dateSet.getMonth() == tdm && o.dateSet.getFullYear() == tdy) { + cName.push("date-picker-selected-date"); + }; + + if(o.disableDays[weekDay] || stub + String(dt < 10 ? "0" + dt : dt) in disabledDates) { + cName.push("day-disabled"); + } else if(o.highlightDays[weekDay]) { + cName.push("date-picker-highlight"); + }; + + if(cd == dt) { + td.setAttribute("id", o.id + "-date-picker-hover"); + cName.push("date-picker-hover"); + }; + + cName.push("dm-" + dt + '-' + (tdm + 1) + " " + " dmy-" + dt + '-' + (tdm + 1) + '-' + tdy); + td.setAttribute(c, cName.join(' ')); + td.setAttribute("title", datePicker.months[cm] + o.nbsp + dt + "," + o.nbsp + cy); + }; + } else { + td.appendChild(document.createTextNode(o.nbsp)); + td.setAttribute(c, "date-picker-unused"); + }; + }; + }; + + if(o.timerSet) { + o.timerInc = 50 + Math.round(((o.timerInc - 50) / 1.8)); + o.timer = window.setTimeout(o.updateTable, o.timerInc); + }; + }; + o.addKeyboardEvents = function() { + datePickerController.addEvent(document, "keypress", o.events.onkeydown); + /*@cc_on + @if(@_win32) + datePickerController.removeEvent(document, "keypress", o.events.onkeydown); + datePickerController.addEvent(document, "keydown", o.events.onkeydown); + @end + @*/ + if(window.devicePixelRatio) { + datePickerController.removeEvent(document, "keypress", o.events.onkeydown); + datePickerController.addEvent(document, "keydown", o.events.onkeydown); + }; + }; + o.removeKeyboardEvents =function() { + datePickerController.removeEvent(document, "keypress", o.events.onkeydown); + datePickerController.removeEvent(document, "keydown", o.events.onkeydown); + }; + o.show = function() { + var elem = o.getElem(); + if(!elem || o.visible || elem.disabled) return; + + o.reset(); + o.setDateFromInput(); + o.updateTable(); + + if(!o.staticPos) o.resize(); + + datePickerController.addEvent(o.staticPos ? o.table : document, "mousedown", o.events.onmousedown); + + if(!o.staticPos) { o.addKeyboardEvents(); }; + + o.opacityTo = o.noTransparency ? 99 : 90; + o.div.style.display = "block"; + /*@cc_on + @if(@_jscript_version <= 5.6) + if(!o.staticPos) o.iePopUp.style.display = "block"; + @end + @*/ + + o.fade(); + o.visible = true; + }; + o.hide = function() { + if(!o.visible) return; + o.stopTimer(); + if(o.staticPos) return; + + datePickerController.removeEvent(document, "mousedown", o.events.onmousedown); + datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); + o.removeKeyboardEvents(); + + /*@cc_on + @if(@_jscript_version <= 5.6) + o.iePopUp.style.display = "none"; + @end + @*/ + + o.opacityTo = 0; + o.fade(); + o.visible = false; + var elem = o.getElem(); + if(!elem.type || elem.type && elem.type != "hidden") { elem.focus(); }; + }; + o.destroy = function() { + // Cleanup for Internet Explorer + datePickerController.removeEvent(o.staticPos ? o.table : document, "mousedown", o.events.onmousedown); + datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); + o.removeKeyboardEvents(); + + if(o.staticPos) { + var yyN = document.getElementById(o.id); + datePickerController.removeEvent(yyN, "change", o.changeHandler); + if(o.splitDate) { + var mmN = document.getElementById(o.id+'-mm'); + var ddN = document.getElementById(o.id+'-dd'); + + datePickerController.removeEvent(mmN, "change", o.changeHandler); + datePickerController.removeEvent(ddN, "change", o.changeHandler); + }; + o.div.onfocus = o.div.onblur = null; + }; + + var ths = o.table.getElementsByTagName("th"); + for(var i = 0, th; th = ths[i]; i++) { + th.onmouseover = th.onmouseout = th.onmousedown = th.onclick = null; + }; + + var tds = o.table.getElementsByTagName("td"); + for(var i = 0, td; td = tds[i]; i++) { + td.onmouseover = td.onclick = null; + }; + + var butts = o.table.getElementsByTagName("span"); + for(var i = 0, butt; butt = butts[i]; i++) { + butt.onmousedown = butt.onclick = butt.onkeypress = null; + }; + + o.ths = o.trs = null; + + clearTimeout(o.fadeTimer); + clearTimeout(o.timer); + o.fadeTimer = o.timer = null; + + /*@cc_on + @if(@_jscript_version <= 5.6) + o.iePopUp = null; + @end + @*/ + + if(!o.staticPos && document.getElementById(o.id.replace(/^fd-/, 'fd-but-'))) { + var butt = document.getElementById(o.id.replace(/^fd-/, 'fd-but-')); + butt.onclick = butt.onpress = null; + }; + + if(o.div && o.div.parentNode) { + o.div.parentNode.removeChild(o.div); + }; + + o.titleBar = o.table = o.div = null; + o = null; + }; + o.create(); +}; + +datePickerController = function() { + var datePickers = {}; + var uniqueId = 0; + + var addEvent = function(obj, type, fn) { + if( obj.attachEvent ) { + obj["e"+type+fn] = fn; + obj[type+fn] = function(){obj["e"+type+fn]( window.event );}; + obj.attachEvent( "on"+type, obj[type+fn] ); + } else { + obj.addEventListener( type, fn, true ); + }; + }; + var removeEvent = function(obj, type, fn) { + try { + if( obj.detachEvent ) { + obj.detachEvent( "on"+type, obj[type+fn] ); + obj[type+fn] = null; + } else { + obj.removeEventListener( type, fn, true ); + }; + } catch(err) {}; + }; + var hideAll = function(exception) { + var dp; + for(dp in datePickers) { + if(!datePickers[dp].created || datePickers[dp].staticPos) continue; + if(exception && exception == datePickers[dp].id) { continue; }; + if(document.getElementById(datePickers[dp].id)) { datePickers[dp].hide(); }; + }; + }; + var cleanUp = function() { + var dp; + for(dp in datePickers) { + if(!document.getElementById(datePickers[dp].id)) { + if(!datePickers[dp].created) continue; + datePickers[dp].destroy(); + datePickers[dp] = null; + delete datePickers[dp]; + }; + }; + }; + var destroy = function() { + for(dp in datePickers) { + if(!datePickers[dp].created) continue; + datePickers[dp].destroy(); + datePickers[dp] = null; + delete datePickers[dp]; + }; + datePickers = null; + /*@cc_on + @if(@_jscript_version <= 5.6) + if(document.getElementById("iePopUpHack")) { + document.body.removeChild(document.getElementById("iePopUpHack")); + }; + @end + @*/ + datePicker.script = null; + removeEvent(window, 'load', datePickerController.create); + removeEvent(window, 'unload', datePickerController.destroy); + }; + var dateFormat = function(dateIn, favourMDY) { + var dateTest = [ + { regExp:/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/, d:1, m:3, y:5 }, // dmy + { regExp:/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/, d:3, m:1, y:5 }, // mdy + { regExp:/^(\d\d\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/, d:5, m:3, y:1 } // ymd + ]; + + var start; + var cnt = 0; + while(cnt < 3) { + start = (cnt + (favourMDY ? 4 : 3)) % 3; + if(dateIn.match(dateTest[start].regExp)) { + res = dateIn.match(dateTest[start].regExp); + y = res[dateTest[start].y]; + m = res[dateTest[start].m]; + d = res[dateTest[start].d]; + if(m.length == 1) m = "0" + m; + if(d.length == 1) d = "0" + d; + if(y.length != 4) y = (parseInt(y) < 50) ? '20' + y : '19' + y; + return String(y)+m+d; + }; + cnt++; + }; + return 0; + }; + var joinNodeLists = function() { + if(!arguments.length) { return []; } + var nodeList = []; + for (var i = 0; i < arguments.length; i++) { + for (var j = 0, item; item = arguments[i][j]; j++) { + nodeList[nodeList.length] = item; + }; + }; + return nodeList; + }; + var addDatePicker = function(inpId, options) { + if(!(inpId in datePickers)) { + datePickers[inpId] = new datePicker(options); + }; + }; + var getDatePicker = function(inpId) { + if(!(inpId in datePickers)) { throw "No datePicker has been created for the form element with an id of '" + inpId.toString() + "'"; }; + return datePickers[inpId]; + }; + var grepRangeLimits = function(sel) { + var range = []; + for(var i = 0; i < sel.options.length; i++) { + if(sel.options[i].value.search(/^\d\d\d\d$/) == -1) { continue; }; + if(!range[0] || Number(sel.options[i].value) < range[0]) { range[0] = Number(sel.options[i].value); }; + if(!range[1] || Number(sel.options[i].value) > range[1]) { range[1] = Number(sel.options[i].value); }; + }; + return range; + }; + var create = function(inp) { + if(!(typeof document.createElement != "undefined" && typeof document.documentElement != "undefined" && typeof document.documentElement.offsetWidth == "number")) return; + + var inputs = (inp && inp.tagName) ? [inp] : joinNodeLists(document.getElementsByTagName('input'), document.getElementsByTagName('select')); + var regExp1 = /disable-days-([1-7]){1,6}/g; // the days to disable + var regExp2 = /no-transparency/g; // do not use transparency effects + var regExp3 = /highlight-days-([1-7]){1,7}/g; // the days to highlight in red + var regExp4 = /range-low-(\d\d\d\d-\d\d-\d\d)/g; // the lowest selectable date + var regExp5 = /range-high-(\d\d\d\d-\d\d-\d\d)/g; // the highest selectable date + var regExp6 = /format-(d-m-y|m-d-y|y-m-d)/g; // the input/output date format + var regExp7 = /divider-(dot|slash|space|dash)/g; // the character used to divide the date + var regExp8 = /no-locale/g; // do not attempt to detect the browser language + var regExp9 = /no-fade/g; // always show the datepicker + var regExp10 = /hide-input/g; // hide the input + + for(var i=0, inp; inp = inputs[i]; i++) { + if(inp.className && (inp.className.search(regExp6) != -1 || inp.className.search(/split-date/) != -1) && ((inp.tagName.toLowerCase() == "input" && (inp.type == "text" || inp.type == "hidden")) || inp.tagName.toLowerCase() == "select")) { + + if(inp.id && document.getElementById('fd-'+inp.id)) { continue; }; + + if(!inp.id) { inp.id = "fdDatePicker-" + uniqueId++; }; + + var options = { + id:inp.id, + low:"", + high:"", + divider:"/", + format:"d-m-y", + highlightDays:[0,0,0,0,0,1,1], + disableDays:[0,0,0,0,0,0,0], + locale:inp.className.search(regExp8) == -1, + splitDate:0, + noTransparency:inp.className.search(regExp2) != -1, + staticPos:inp.className.search(regExp9) != -1, + hideInput:inp.className.search(regExp10) != -1 + }; + + if(!options.staticPos) { + options.hideInput = false; + } else { + options.noTransparency = true; + }; + + // Split the date into three parts ? + if(inp.className.search(/split-date/) != -1) { + if(document.getElementById(inp.id+'-dd') && document.getElementById(inp.id+'-mm') && document.getElementById(inp.id+'-dd').tagName.search(/input|select/i) != -1 && document.getElementById(inp.id+'-mm').tagName.search(/input|select/i) != -1) { + options.splitDate = 1; + }; + }; + + // Date format(variations of d-m-y) + if(inp.className.search(regExp6) != -1) { + options.format = inp.className.match(regExp6)[0].replace('format-',''); + }; + + // What divider to use, a "/", "-", "." or " " + if(inp.className.search(regExp7) != -1) { + var dividers = { dot:".", space:" ", dash:"-", slash:"/" }; + options.divider = (inp.className.search(regExp7) != -1 && inp.className.match(regExp7)[0].replace('divider-','') in dividers) ? dividers[inp.className.match(regExp7)[0].replace('divider-','')] : "/"; + }; + + // The days to highlight + if(inp.className.search(regExp3) != -1) { + var tmp = inp.className.match(regExp3)[0].replace(/highlight-days-/, ''); + options.highlightDays = [0,0,0,0,0,0,0]; + for(var j = 0; j < tmp.length; j++) { + options.highlightDays[tmp.charAt(j) - 1] = 1; + }; + }; + + // The days to disable + if(inp.className.search(regExp1) != -1) { + var tmp = inp.className.match(regExp1)[0].replace(/disable-days-/, ''); + options.disableDays = [0,0,0,0,0,0,0]; + for(var j = 0; j < tmp.length; j++) { + options.disableDays[tmp.charAt(j) - 1] = 1; + }; + }; + + // The lower limit + if(inp.className.search(/range-low-today/i) != -1) { + options.low = datePickerController.dateFormat((new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + new Date().getFullYear(), true); + } else if(inp.className.search(regExp4) != -1) { + options.low = datePickerController.dateFormat(inp.className.match(regExp4)[0].replace(/range-low-/, ''), false); + if(!options.low) { + options.low = ''; + }; + }; + + // The higher limit + if(inp.className.search(/range-high-today/i) != -1 && inp.className.search(/range-low-today/i) == -1) { + options.high = datePickerController.dateFormat((new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + new Date().getFullYear(), true); + } else if(inp.className.search(regExp5) != -1) { + options.high = datePickerController.dateFormat(inp.className.match(regExp5)[0].replace(/range-high-/, ''), false); + if(!options.high) { + options.high = ''; + }; + }; + + // Always round lower & higher limits if a selectList involved + if(inp.tagName.search(/select/i) != -1) { + var range = grepRangeLimits(inp); + options.low = options.low ? range[0] + String(options.low).substr(4,4) : datePickerController.dateFormat(range[0] + "/01/01"); + options.high = options.high ? range[1] + String(options.low).substr(4,4) : datePickerController.dateFormat(range[1] + "/12/31"); + }; + + addDatePicker(inp.id, options); + }; + }; + } + + return { + addEvent:addEvent, + removeEvent:removeEvent, + create:create, + destroy:destroy, + cleanUp:cleanUp, + addDatePicker:addDatePicker, + getDatePicker:getDatePicker, + dateFormat:dateFormat, + datePickers:datePickers, + hideAll:hideAll + }; +}(); + +})(); + +datePickerController.addEvent(window, 'load', datePickerController.create); +datePickerController.addEvent(window, 'unload', datePickerController.destroy); diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/af.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/af.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/af.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/af.js index 1e2e21e1..fe3ab87b 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/af.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/af.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Januarie", - "Februarie", - "Maart", - "April", - "Mei", - "Junie", - "Julie", - "Augustus", - "September", - "Oktober", - "November", - "Desember" - ], - fullDay:[ - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrydag", - "Saterdag", - "Sondag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Vorige maand", - "Volgende maand", - "Vorige jaar", - "Volgende jaar" - ] -}; +var fdLocale = { + months:[ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + fullDay:[ + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag", + "Sondag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Vorige maand", + "Volgende maand", + "Vorige jaar", + "Volgende jaar" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ar.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ar.js similarity index 93% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ar.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ar.js index 602091a0..683a52a8 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ar.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ar.js @@ -1,50 +1,50 @@ -var fdLocale = { - months:[ - "يناير", - "فبراير", - "مارس", - "أبريل", - "مايو", - "يونيو", - "يوليو", - "أغسطس", - "سبتمبر", - "أكتوبر", - "نوٿمبر", - "ديسمبر" - ], - fullDay:[ - "الاثنين", - "الثلاثاء", - "الأربعاء", - "الخميس", - "الجمعة", - "السبت", - "الأحد" - ], - - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice */ - - - dayAbbr:[ - "الاثنين", - "الثلاثاء", - "الأربعاء", - "الخميس", - "الجمعة", - "السبت", - "الأحد" - ], - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - - titles:[ - "الشهر السابق", - "الشهر المقبل", - "السنة السابقة", - "السنة المقبلة" - ] -}; +var fdLocale = { + months:[ + "يناير", + "فبراير", + "مارس", + "أبريل", + "مايو", + "يونيو", + "يوليو", + "أغسطس", + "سبتمبر", + "أكتوبر", + "نوٿمبر", + "ديسمبر" + ], + fullDay:[ + "الاثنين", + "الثلاثاء", + "الأربعاء", + "الخميس", + "الجمعة", + "السبت", + "الأحد" + ], + + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice */ + + + dayAbbr:[ + "الاثنين", + "الثلاثاء", + "الأربعاء", + "الخميس", + "الجمعة", + "السبت", + "الأحد" + ], + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + + titles:[ + "الشهر السابق", + "الشهر المقبل", + "السنة السابقة", + "السنة المقبلة" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/de.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/de.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/de.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/de.js index f13de395..d810b168 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/de.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/de.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Januar", - "Februar", - "M\u00e4rz", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" - ], - fullDay:[ - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag", - "Sonntag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Voriger Monat", - "N\u00e4chst. Monat", - "Voriges Jahr", - "N\u00e4chst. Jahr" - ] -}; +var fdLocale = { + months:[ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + fullDay:[ + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag", + "Sonntag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Voriger Monat", + "N\u00e4chst. Monat", + "Voriges Jahr", + "N\u00e4chst. Jahr" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/du.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/du.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/du.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/du.js index 5d77b6b9..af0b25ca 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/du.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/du.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December" - ], - fullDay:[ - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Vorige Maand", - "Volgende Maand", - "Vorig jaar", - "Volgend jaar" - ] -}; +var fdLocale = { + months:[ + "Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December" + ], + fullDay:[ + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag", + "Zondag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Vorige Maand", + "Volgende Maand", + "Vorig jaar", + "Volgend jaar" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/en.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/en.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/en.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/en.js index fe5eec40..30528abb 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/en.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/en.js @@ -1,42 +1,42 @@ -var fdLocale = { - months:[ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - fullDay:[ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Previous month", - "Next month", - "Previous year", - "Next year", - "Today", - "Show Calendar" - ] -}; +var fdLocale = { + months:[ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + fullDay:[ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Previous month", + "Next month", + "Previous year", + "Next year", + "Today", + "Show Calendar" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/es.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/es.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/es.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/es.js index 4aecdcd6..a99753b5 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/es.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/es.js @@ -1,41 +1,41 @@ -var fdLocale = { - months:[ - "Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre" - ], - fullDay:[ - "Lunes", - "Martes", - "Mi\u00e9rcoles", - "Jueves", - "Viernes", - "S\u00e1bado", - "Domingo" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Mes Anterior", - "Mes Siguiente", - "A\u00f1o anterior", - "A\u00f1o Siguiente", - "Hoy" - ] -}; +var fdLocale = { + months:[ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre" + ], + fullDay:[ + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado", + "Domingo" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Mes Anterior", + "Mes Siguiente", + "A\u00f1o anterior", + "A\u00f1o Siguiente", + "Hoy" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fi.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fi.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fi.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fi.js index 1e204f3b..fbf172b9 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fi.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fi.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Tammikuu", - "Helmikuu", - "Maaliskuu", - "Huhtikuu", - "Toukokuu", - "Kes\u00e4kuu", - "Hein\u00e4kuu", - "Elokuu", - "Syyskuu", - "Lokakuu", - "Marraskuu", - "Joulukuu" - ], - fullDay:[ - "Maanantai", - "Tiistai", - "Keskiviikko", - "Torstai", - "Perjantai", - "Lauantai", - "Sunnuntai" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Edellinen kuukausi", - "Seuraava kuukausi", - "Edellinen vuosi", - "Seuraava vuosi" - ] -}; +var fdLocale = { + months:[ + "Tammikuu", + "Helmikuu", + "Maaliskuu", + "Huhtikuu", + "Toukokuu", + "Kes\u00e4kuu", + "Hein\u00e4kuu", + "Elokuu", + "Syyskuu", + "Lokakuu", + "Marraskuu", + "Joulukuu" + ], + fullDay:[ + "Maanantai", + "Tiistai", + "Keskiviikko", + "Torstai", + "Perjantai", + "Lauantai", + "Sunnuntai" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Edellinen kuukausi", + "Seuraava kuukausi", + "Edellinen vuosi", + "Seuraava vuosi" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fr.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fr.js similarity index 92% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fr.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fr.js index fb524a30..5dcf238a 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/fr.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/fr.js @@ -1,44 +1,44 @@ -var fdLocale = { - months:[ - "Janvier", - "F\u00E9vrier", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Ao\u00FBt", - "Septembre", - "Octobre", - "Novembre", - "D\u00E9cembre" - ], - fullDay:[ - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche" - ], - - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - - titles:[ - "Mois pr\u00E9cedent", - "Mois suivant", - "Ann\u00E9e pr\u00E9cedente", - "Ann\u00E9e suivante", - "Aujourd\u2019hui", - "Voir Calendrier" - ] -}; +var fdLocale = { + months:[ + "Janvier", + "F\u00E9vrier", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Ao\u00FBt", + "Septembre", + "Octobre", + "Novembre", + "D\u00E9cembre" + ], + fullDay:[ + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi", + "Dimanche" + ], + + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + + titles:[ + "Mois pr\u00E9cedent", + "Mois suivant", + "Ann\u00E9e pr\u00E9cedente", + "Ann\u00E9e suivante", + "Aujourd\u2019hui", + "Voir Calendrier" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/gr.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/gr.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/gr.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/gr.js index 8f52c108..e2758c56 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/gr.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/gr.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Ιανουάριος", - "Φεβρουάριος", - "Μάρτιος", - "Απρίλιος", - "Μάιος", - "Ιούνιος", - "Ιούλιος", - "Αύγουστος", - "Σεπτέμβριος", - "Οκτώβριος", - "Νοέμβριος", - "Δεκέμβριος" - ], - fullDay:[ - "Δευτέρα", - "Τρίτη", - "Τετάρτη", - "Πέμπτη", - "Παρασκευή", - "Σάββατο", - "Κυριακή" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Προηγούμενος μήνας", - "Επόμενος μήνας", - "Προηγούμενη χρόνιά", - "Επόμενη χρονιά" - ] +var fdLocale = { + months:[ + "Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάιος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος" + ], + fullDay:[ + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο", + "Κυριακή" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Προηγούμενος μήνας", + "Επόμενος μήνας", + "Προηγούμενη χρόνιά", + "Επόμενη χρονιά" + ] }; \ No newline at end of file diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/he.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/he.js similarity index 95% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/he.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/he.js index 8b1167a3..a87061ea 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/he.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/he.js @@ -1,49 +1,49 @@ -var fdLocale = { - months:[ - "ינואר", - "פברואר", - "מרץ", - "אפריל", - "מאי", - "יוני", - "יולי", - "אוגוסט", - "ספטמבר", - "אוקטובר", - "נובמבר", - "דצמבר" - ], - fullDay:[ - "שני", - "שלישי", - "רביעי", - "חמישי", - "שישי", - "שבת", - "ראשון" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - */ - dayAbbr:[ - 'ב', - 'ג', - 'ד', - 'ה', - 'ו', - 'ש', - 'א' - ], - - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - */ - firstDayOfWeek:6, - - titles:[ - "חודש קודם", - "חודש הבא", - "שנה קודמת", - "שנה הבאה", - "היום" - ] -}; +var fdLocale = { + months:[ + "ינואר", + "פברואר", + "מרץ", + "אפריל", + "מאי", + "יוני", + "יולי", + "אוגוסט", + "ספטמבר", + "אוקטובר", + "נובמבר", + "דצמבר" + ], + fullDay:[ + "שני", + "שלישי", + "רביעי", + "חמישי", + "שישי", + "שבת", + "ראשון" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + */ + dayAbbr:[ + 'ב', + 'ג', + 'ד', + 'ה', + 'ו', + 'ש', + 'א' + ], + + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + */ + firstDayOfWeek:6, + + titles:[ + "חודש קודם", + "חודש הבא", + "שנה קודמת", + "שנה הבאה", + "היום" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/it.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/it.js similarity index 98% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/it.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/it.js index 828f21fc..10bd657f 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/it.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/it.js @@ -1,13 +1,13 @@ -// italian translation by raf - -var fdLocale = { - months:[ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" ], - fullDay:[ "Luned\u00ec", "Marted\u00ec", "Mercoled\u00ec", "Gioved\u00ec", "Venerd\u00ec", "Sabato", "Domenica" ], - /* - Only stipulate the dayAbbr should the first letter of the fullDay not suffice - dayAbbr:[], - Only stipulate the firstDayOfWeek should the first day not be Monday - firstDayOfWeek:0, - */ - titles:[ "Mese Precedente", "Mese Successivo", "Anno Precedente", "Anno Successivo", "Oggi" ] -}; +// italian translation by raf + +var fdLocale = { + months:[ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" ], + fullDay:[ "Luned\u00ec", "Marted\u00ec", "Mercoled\u00ec", "Gioved\u00ec", "Venerd\u00ec", "Sabato", "Domenica" ], + /* + Only stipulate the dayAbbr should the first letter of the fullDay not suffice + dayAbbr:[], + Only stipulate the firstDayOfWeek should the first day not be Monday + firstDayOfWeek:0, + */ + titles:[ "Mese Precedente", "Mese Successivo", "Anno Precedente", "Anno Successivo", "Oggi" ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/nl.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/nl.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/nl.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/nl.js index 5d77b6b9..af0b25ca 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/nl.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/nl.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December" - ], - fullDay:[ - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Vorige Maand", - "Volgende Maand", - "Vorig jaar", - "Volgend jaar" - ] -}; +var fdLocale = { + months:[ + "Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December" + ], + fullDay:[ + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag", + "Zondag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Vorige Maand", + "Volgende Maand", + "Vorig jaar", + "Volgend jaar" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/no.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/no.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/no.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/no.js index 1a1186ab..92aa7852 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/no.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/no.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember" - ], - fullDay:[ - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "L\u00f8rdag", - "S\u00f8ndag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Forrige m\u00e5ned", - "Neste m\u00e5ned", - "Forrige \u00e5r", - "Neste \u00e5r" - ] -}; +var fdLocale = { + months:[ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" + ], + fullDay:[ + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "L\u00f8rdag", + "S\u00f8ndag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Forrige m\u00e5ned", + "Neste m\u00e5ned", + "Forrige \u00e5r", + "Neste \u00e5r" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/pt.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/pt.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/pt.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/pt.js index ccd77337..4ce8d8a3 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/pt.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/pt.js @@ -1,50 +1,50 @@ -var fdLocale = { - months:[ - "Janeiro", - "Fevereiro", - "Mar\u00E7o", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - fullDay:[ - "Segunda", - "Ter\u00E7a", - "Quarta", - "Quinta", - "Sexta", - "S\u00E1bado", - "Domingo" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - dayAbbr:["Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sab", - "Dom"], - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - firstDayOfWeek:6, - titles:[ - "M\u00EAs anterior", - "Pr\u00F3ximo m\u00EAs", - "Ano anterior", - "Pr\u00F3ximo ano", - "Hoje", - "Exibir calend\u00E1rio" - ] -}; +var fdLocale = { + months:[ + "Janeiro", + "Fevereiro", + "Mar\u00E7o", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + fullDay:[ + "Segunda", + "Ter\u00E7a", + "Quarta", + "Quinta", + "Sexta", + "S\u00E1bado", + "Domingo" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + dayAbbr:["Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sab", + "Dom"], + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + firstDayOfWeek:6, + titles:[ + "M\u00EAs anterior", + "Pr\u00F3ximo m\u00EAs", + "Ano anterior", + "Pr\u00F3ximo ano", + "Hoje", + "Exibir calend\u00E1rio" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ro.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ro.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ro.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ro.js index 6d801612..a1bbbcfb 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ro.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ro.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie" - ], - fullDay:[ - "Luni", - "Mar\u0163i", - "Miercuri", - "Joi", - "Vineri", - "S\u00e2mb\u00e3t\u00e3", - "Duminic\u00e3" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Luna anterioar\u00e3", - "Luna urm\u00e3toare", - "Anul anterior", - "Anul urm\u00e3tor" - ] -}; +var fdLocale = { + months:[ + "Ianuarie", + "Februarie", + "Martie", + "Aprilie", + "Mai", + "Iunie", + "Iulie", + "August", + "Septembrie", + "Octombrie", + "Noiembrie", + "Decembrie" + ], + fullDay:[ + "Luni", + "Mar\u0163i", + "Miercuri", + "Joi", + "Vineri", + "S\u00e2mb\u00e3t\u00e3", + "Duminic\u00e3" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Luna anterioar\u00e3", + "Luna urm\u00e3toare", + "Anul anterior", + "Anul urm\u00e3tor" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ru.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ru.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ru.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ru.js index d45f224f..c58f985c 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ru.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ru.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Январь", - "Февраль", - "Март", - "Апрель", - "Май", - "Июнь", - "Июль", - "Август", - "Сентябрь", - "Октябрь", - "Ноябрь", - "Декабрь" - ], - fullDay:[ - "Понедельник", - "Вторник", - "Среда", - "Четверг", - "Пятница", - "Суббота", - "Воскресенье" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Предыдущий месяц", - "Следующий месяц", - "Предыдущий год", - "Следующий год" - ] -}; +var fdLocale = { + months:[ + "Январь", + "Февраль", + "Март", + "Апрель", + "Май", + "Июнь", + "Июль", + "Август", + "Сентябрь", + "Октябрь", + "Ноябрь", + "Декабрь" + ], + fullDay:[ + "Понедельник", + "Вторник", + "Среда", + "Четверг", + "Пятница", + "Суббота", + "Воскресенье" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Предыдущий месяц", + "Следующий месяц", + "Предыдущий год", + "Следующий год" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sp.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sp.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sp.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sp.js index ecfd7dcf..a4a052f5 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sp.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sp.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre" - ], - fullDay:[ - "Lunes", - "Martes", - "Mi\u00e9rcoles", - "Jueves", - "Viernes", - "S\u00e1bado", - "Domingo" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Mes Anterior", - "Mes Siguiente", - "A\u00f1o Anterior", - "A\u00f1o Siguiente" - ] -}; +var fdLocale = { + months:[ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre" + ], + fullDay:[ + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado", + "Domingo" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Mes Anterior", + "Mes Siguiente", + "A\u00f1o Anterior", + "A\u00f1o Siguiente" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sv.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sv.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sv.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sv.js index 3c5c2a14..7bdc75d9 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/sv.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/sv.js @@ -1,41 +1,41 @@ -// Swedish -var fdLocale = { - months:[ - "Januari", - "Februari", - "Mars", - "April", - "Maj", - "Juni", - "Juli", - "Augusti", - "September", - "Oktober", - "November", - "December" - ], - fullDay:[ - "M\u00e5ndag", - "Tisdag", - "Onsdag", - "Torsdag", - "Fredag", - "L\u00f6rdag", - "S\u00f6ndag" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "F\u00f6reg\u00e5ende m\u00e5nad", - "N\u00e4sta m\u00e5nad", - "F\u00f6reg\u00e5ende \u00e5r", - "N\u00e4sta \u00e5r" - ] -}; +// Swedish +var fdLocale = { + months:[ + "Januari", + "Februari", + "Mars", + "April", + "Maj", + "Juni", + "Juli", + "Augusti", + "September", + "Oktober", + "November", + "December" + ], + fullDay:[ + "M\u00e5ndag", + "Tisdag", + "Onsdag", + "Torsdag", + "Fredag", + "L\u00f6rdag", + "S\u00f6ndag" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "F\u00f6reg\u00e5ende m\u00e5nad", + "N\u00e4sta m\u00e5nad", + "F\u00f6reg\u00e5ende \u00e5r", + "N\u00e4sta \u00e5r" + ] +}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ua.js b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ua.js similarity index 96% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ua.js rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ua.js index 9aa2fb63..b380cdca 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/js/lang/ua.js +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/js/lang/ua.js @@ -1,40 +1,40 @@ -var fdLocale = { - months:[ - "Січень", - "Лютий", - "Березень", - "Квітень", - "Травень", - "Червень", - "Липень", - "Серпень", - "Вересень", - "Жовтень", - "Листопад", - "Грудень" - ], - fullDay:[ - "Понеділок", - "Вівторок", - "Середа", - "Четвер", - "П'ятниця", - "Субота", - "Неділя" - ], - /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice - - dayAbbr:[], - */ - - /* Only stipulate the firstDayOfWeek should the first day not be Monday - - firstDayOfWeek:0, - */ - titles:[ - "Попередній місяць", - "Наступний місяць", - "Попередній рік", - "Наступний рік" - ] +var fdLocale = { + months:[ + "Січень", + "Лютий", + "Березень", + "Квітень", + "Травень", + "Червень", + "Липень", + "Серпень", + "Вересень", + "Жовтень", + "Листопад", + "Грудень" + ], + fullDay:[ + "Понеділок", + "Вівторок", + "Середа", + "Четвер", + "П'ятниця", + "Субота", + "Неділя" + ], + /* Only stipulate the dayAbbr should the first letter of the fullDay not suffice + + dayAbbr:[], + */ + + /* Only stipulate the firstDayOfWeek should the first day not be Monday + + firstDayOfWeek:0, + */ + titles:[ + "Попередній місяць", + "Наступний місяць", + "Попередній рік", + "Наступний рік" + ] }; \ No newline at end of file diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/backstripes.gif b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/backstripes.gif similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/backstripes.gif rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/backstripes.gif diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bg_header.jpg b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bg_header.jpg similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bg_header.jpg rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bg_header.jpg diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bullet1.gif b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bullet1.gif similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bullet1.gif rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bullet1.gif diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bullet2.gif b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bullet2.gif similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/bullet2.gif rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/bullet2.gif diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/cal.gif b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/cal.gif similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/cal.gif rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/cal.gif diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/gradient-e5e5e5-ffffff.gif b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/gradient-e5e5e5-ffffff.gif similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/media/gradient-e5e5e5-ffffff.gif rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/media/gradient-e5e5e5-ffffff.gif diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/onUpdate.html b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/onUpdate.html similarity index 97% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/onUpdate.html rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/onUpdate.html index c7671cf0..a5bbc7df 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/onUpdate.html +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/onUpdate.html @@ -1,66 +1,65 @@ - - - - frequency decoder ~ Unobtrusive JavaScript datePicker widgit demo - - - - - - - -
-

Unobtrusive JavaScript date-picker widgit

-

onupdate Demo

-
- onupdate callback demo -

The following datePicker has Easter Monday dynamically calculated by the datePickerController.onupdate method and the result used to disable the date in question using the datePickers’ setDisabledDates method. Additionally, I’ve dynamically updated a stylesheet that displays the calculated Easter Monday date with a red background.

-

class=“format-d-m-y divider-dash highlight-days-12 range-low-today no-transparency”

- -

-
-

View the related “language in the lab” post for this demo.

-
- - - + + + + frequency decoder ~ Unobtrusive JavaScript datePicker widgit demo + + + + + + + +
+

Unobtrusive JavaScript date-picker widgit

+

onupdate Demo

+
+ onupdate callback demo +

The following datePicker has Easter Monday dynamically calculated by the datePickerController.onupdate method and the result used to disable the date in question using the datePickers’ setDisabledDates method. Additionally, I’ve dynamically updated a stylesheet that displays the calculated Easter Monday date with a red background.

+

class=“format-d-m-y divider-dash highlight-days-12 range-low-today no-transparency”

+ +

+
+

View the related “language in the lab” post for this demo.

+
+ + diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/reservation.html b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/reservation.html similarity index 97% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/reservation.html rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/reservation.html index e9e3cbfc..234c227d 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/reservation.html +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/reservation.html @@ -1,111 +1,111 @@ - - - - frequency decoder ~ datePicker reservation demo - - - - - - - - -
-

Unobtrusive JavaScript date-picker widgit

-

Reservation Demo

-
- -

- - -

-
-

View the related “language in the lab” post for this demo.

-
- - + + + + frequency decoder ~ datePicker reservation demo + + + + + + + + +
+

Unobtrusive JavaScript date-picker widgit

+

Reservation Demo

+
+ +

+ + +

+
+

View the related “language in the lab” post for this demo.

+
+ + diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/unicode.html b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/unicode.html similarity index 95% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/unicode.html rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/unicode.html index 572b9127..cdb1160c 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/datepicker/unicode.html +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/datepicker/unicode.html @@ -1,203 +1,202 @@ - - -frequency decoder ~ Unicode & HTML entity conversion service - - - - - -

frequency decoder

-

Unicode & HTML entity conversion service

-
-
- Phrase - -

-
-
- Converted Versions - -

- -

- -

-
- -
-

This page is nothing but a slight modification of the Slayer Office “Unicode Hex Value Lookup” and I can’t take any credit for the javascript that drives the conversions.

- - - + + +frequency decoder ~ Unicode & HTML entity conversion service + + + + + +

frequency decoder

+

Unicode & HTML entity conversion service

+
+
+ Phrase + +

+
+
+ Converted Versions + +

+ +

+ +

+
+ +
+

This page is nothing but a slight modification of the Slayer Office “Unicode Hex Value Lookup” and I can’t take any credit for the javascript that drives the conversions.

+ + diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/logo.png b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/logo.png similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/logo.png rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/logo.png diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/report-step2-csv.tt b/Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/report-step2-csv.tt similarity index 100% rename from Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced/report-step2-csv.tt rename to Koha/Plugin/Com/ByWaterSolutions/EdifactLSC/report-step2-csv.tt diff --git a/gulpfile.js b/gulpfile.js index 493ab4d9..e8400f5d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,7 +10,7 @@ const today = dt.format('Y-m-d'); const package_json = JSON.parse(fs.readFileSync('./package.json')); const release_filename = `${package_json.name}-v${package_json.version}.kpz`; -const pm_file = 'EdifactEnhanced.pm'; +const pm_file = 'EdifactLSC.pm'; const pm_file_path = 'Koha/Plugin/Com/ByWaterSolutions/'; const pm_file_path_full = pm_file_path + pm_file; const pm_file_path_dist = 'dist/' + pm_file_path; @@ -36,6 +36,7 @@ gulp.task('build', () => { gulp.task('release', () => { gulp.src(release_filename) .pipe(release({ + tag: package_json.version + '-' + process.env.TRAVIS_BRANCH, manifest: require('./package.json') // package.json from which default values will be extracted if they're missing })); }); diff --git a/package.json b/package.json index 617e114f..9abe00db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "koha-plugin-edifact-enhanced", - "description": "Koha Edifact Enhanced Plugin", + "name": "koha-plugin-edifact-enhanced-lsc", + "description": "Koha Edifact Enhanced Plugin - LSC", "devDependencies": { "gulp": "^3.9.1", "gulp-cli": "^1.2.2",