Version Description
(09/16/2010) = * add new design "Chemistry" by elmastudio.de * changes for include methods od class for preview * changes the possibility for include of language specific flash files
Download this release
Release Info
Developer | Bueltge |
Plugin | WP Maintenance Mode |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.5.3 to 1.6.5
- WP Maintenance Mode-da_DK.txt +28 -0
- css/jquery.countdown.css +47 -0
- css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_55_c0402a_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png +0 -0
- css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- css/overcast/images/ui-bg_glass_35_dddddd_1x400.png +0 -0
- css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png +0 -0
- css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png +0 -0
- css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
- css/overcast/images/ui-icons_3383bb_256x240.png +0 -0
- css/overcast/images/ui-icons_454545_256x240.png +0 -0
- css/overcast/images/ui-icons_70b2e1_256x240.png +0 -0
- css/overcast/images/ui-icons_999999_256x240.png +0 -0
- css/overcast/images/ui-icons_fbc856_256x240.png +0 -0
- css/overcast/jquery-ui-1.7.2.custom.css +0 -0
- css/style.css +12 -1
- index.php +11 -0
- js/de_DE.datetimepicker.js +20 -0
- js/jquery-ui-1.7.2.custom.min.js +0 -13
- js/jquery.countdown-ar.js +11 -0
- js/jquery.countdown-cs.js +14 -0
- js/jquery.countdown-da.js +11 -0
- js/jquery.countdown-de.js +11 -0
- js/jquery.countdown-es.js +11 -0
- js/jquery.countdown-fa.js +11 -0
- js/jquery.countdown-fi.js +11 -0
- js/jquery.countdown-fr.js +11 -0
- js/jquery.countdown-gl.js +11 -0
- js/jquery.countdown-he.js +11 -0
- js/jquery.countdown-hu.js +11 -0
- js/jquery.countdown-id.js +11 -0
- js/jquery.countdown-it.js +11 -0
- js/jquery.countdown-ja.js +11 -0
- js/jquery.countdown-ko.js +12 -0
- js/jquery.countdown-lt.js +11 -0
- js/jquery.countdown-lv.js +11 -0
- js/jquery.countdown-my.js +11 -0
- js/jquery.countdown-nb.js +11 -0
- js/jquery.countdown-nl.js +11 -0
- js/jquery.countdown-pl.js +11 -0
- js/jquery.countdown-pt-BR.js +11 -0
- js/jquery.countdown-ro.js +11 -0
- js/jquery.countdown-ru.js +11 -0
- js/jquery.countdown-sk.js +14 -0
- js/jquery.countdown-sv.js +11 -0
- js/jquery.countdown-tr.js +11 -0
- js/jquery.countdown-uk.js +11 -0
- js/jquery.countdown-zh-CN.js +11 -0
- js/jquery.countdown-zh-TW.js +11 -0
- js/jquery.countdown.js +706 -0
- js/jquery.countdown.min.js +7 -0
- js/jquery.countdown.pack.js +7 -0
- js/script.php +0 -43
- js/ui.datetimepicker-de.js +21 -0
- js/ui.datetimepicker.js +1696 -0
- languages/wartungsmodus-de_DE.mo +0 -0
- languages/wartungsmodus-de_DE.po +0 -375
- languages/wartungsmodus-fr_FR.mo +0 -0
- languages/wartungsmodus-fr_FR.po +0 -333
- languages/wartungsmodus-it_IT.mo +0 -0
- languages/wartungsmodus-it_IT.po +0 -340
- languages/{wartungsmodus-be_BY.mo → wp-maintenance-mode-be_BY.mo} +0 -0
- languages/{wartungsmodus-be_BY.po → wp-maintenance-mode-be_BY.po} +0 -0
- languages/wp-maintenance-mode-da_DK.mo +0 -0
- languages/wp-maintenance-mode-da_DK.po +323 -0
- languages/wp-maintenance-mode-de_DE.mo +0 -0
- languages/wp-maintenance-mode-de_DE.po +428 -0
- languages/{wartungsmodus-es_ES.mo → wp-maintenance-mode-es_ES.mo} +0 -0
- languages/{wartungsmodus-es_ES.po → wp-maintenance-mode-es_ES.po} +0 -0
- languages/wp-maintenance-mode-fr_FR.mo +0 -0
- languages/wp-maintenance-mode-fr_FR.po +365 -0
- languages/{wartungsmodus-hr.mo → wp-maintenance-mode-hr.mo} +0 -0
- languages/{wartungsmodus-hr.po → wp-maintenance-mode-hr.po} +0 -0
- languages/wp-maintenance-mode-it_IT.mo +0 -0
- languages/wp-maintenance-mode-it_IT.po +413 -0
- languages/wp-maintenance-mode-nl_NL.mo +0 -0
- languages/wp-maintenance-mode-nl_NL.po +368 -0
- languages/wp-maintenance-mode-pl_PL.mo +0 -0
- languages/wp-maintenance-mode-pl_PL.po +365 -0
- languages/{wartungsmodus-ro_RO.mo → wp-maintenance-mode-ro_RO.mo} +0 -0
- languages/{wartungsmodus-ro_RO.po → wp-maintenance-mode-ro_RO.po} +0 -0
- languages/{wartungsmodus-sq_AL.mo → wp-maintenance-mode-sq_AL.mo} +0 -0
- languages/{wartungsmodus-sq_AL.po → wp-maintenance-mode-sq_AL.po} +2 -2
- languages/{wartungsmodus-tr_TR.mo → wp-maintenance-mode-tr_TR.mo} +0 -0
- languages/{wartungsmodus-tr_TR.po → wp-maintenance-mode-tr_TR.po} +0 -0
- languages/wp-maintenance-mode-xx_XX.pot +428 -0
- license.txt +0 -0
- readme.txt +227 -36
- screenshot-1.png +0 -0
- screenshot-10.png +0 -0
- screenshot-11.png +0 -0
- screenshot-12.png +0 -0
- screenshot-13.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- screenshot-8.png +0 -0
- screenshot-9.png +0 -0
- site.php +87 -66
- styles/af.css +7 -0
- styles/be.css +3 -0
- styles/cm.css +4 -0
- styles/dh.css +9 -0
- styles/es.css +92 -0
- styles/fl.css +4 -0
- styles/fv.css +6 -0
- styles/images/background.jpg +0 -0
- styles/images/bg.gif +0 -0
- styles/images/bg.jpg +0 -0
- styles/images/box-bg.jpg +0 -0
- styles/images/button.png +0 -0
- styles/images/do-not-enter.jpg +0 -0
- styles/images/es/bg-image.png +0 -0
- styles/images/es/bg.jpg +0 -0
- styles/images/es/button.png +0 -0
- styles/images/es/m-mode.png +0 -0
- styles/images/gnome-control_48px.png +0 -0
- styles/images/gnome_key_32px.png +0 -0
- styles/images/headline-af-de_DE.jpg +0 -0
- styles/images/headline-af-en_US.jpg +0 -0
- styles/images/headline-de_DE.jpg +0 -0
- styles/images/headline-en_US.jpg +0 -0
- styles/images/lego-bg.jpg +0 -0
- styles/images/lego-content.jpg +0 -0
- styles/images/leiste.jpg +0 -0
- styles/images/monster.jpg +0 -0
- styles/images/wartungsmodus.jpg +0 -0
- styles/ks.css +6 -0
- styles/ln.css +3 -0
- styles/monster.css +6 -0
- styles/nicki.css +4 -0
- styles/txt.css +4 -0
- styles/wartung-de_DE.swf +0 -0
- styles/wartung-es_ES.swf +0 -0
- styles/wartung.swf +0 -0
- uninstall.php +5 -0
- !wartungsmodus.php → wp-maintenance-mode.php +338 -197
WP Maintenance Mode-da_DK.txt
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
WP Maintenance Mode 1.6.5
|
2 |
+
|
3 |
+
Sprogfilerne skal ligge i wp-maintenance-mode/languages
|
4 |
+
Oplysning om stierne er pakket med.
|
5 |
+
Underst�tter dit udpakningsprogram anvendelse heraf,
|
6 |
+
kan du udpakke direkte til (formentlig) wp-content/plugins
|
7 |
+
|
8 |
+
En overs�ttelse til HTML-beskeden kunne v�re:
|
9 |
+
|
10 |
+
"<p>Beklager ulejligheden.<br />Der foreg�r i �jeblikket planlagt vedligeholdelse af siten.<br /><strong>Pr�v at komme tilbage om %1$s %2$s</strong><br />Mange tak for din forst�else.</p>"
|
11 |
+
|
12 |
+
Evt. opdateringer eller info herom kan hentes via http://wordpress.blogos.dk/wpdadkdownloads
|
13 |
+
eller direkte p� http://wordpress.blogos.dk/s%C3%B8g-efter-downloads/?did=250
|
14 |
+
|
15 |
+
Se evt. ogs� http://wordpress.blogos.dk/tag/wp-maintenance-mode
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
FOR THE DEVELOPER
|
20 |
+
You are very welcome to check for updated language files in one of the following ways:
|
21 |
+
|
22 |
+
1. On my downloads page that list all files available for download:
|
23 |
+
http://wordpress.blogos.dk/wpdadkdownloads/
|
24 |
+
|
25 |
+
2. Directly on my Download Monitor download page: http://wordpress.blogos.dk/s%C3%B8g-efter-downloads/?did=250
|
26 |
+
|
27 |
+
If I have blogged about your plugin, theme or other resource, you will be able to find it via this tag: http://wordpress.blogos.dk/tag/wp-maintenance-mode
|
28 |
+
|
css/jquery.countdown.css
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* jQuery Countdown styles 1.5.6. */
|
2 |
+
.countdown_rtl {
|
3 |
+
direction: rtl;
|
4 |
+
}
|
5 |
+
.countdown_holding span {
|
6 |
+
background-color: #ccc;
|
7 |
+
}
|
8 |
+
.countdown_row {
|
9 |
+
clear: both;
|
10 |
+
width: 100%;
|
11 |
+
padding: 0px 2px;
|
12 |
+
text-align: center;
|
13 |
+
}
|
14 |
+
.countdown_show1 .countdown_section {
|
15 |
+
width: 98%;
|
16 |
+
}
|
17 |
+
.countdown_show2 .countdown_section {
|
18 |
+
width: 48%;
|
19 |
+
}
|
20 |
+
.countdown_show3 .countdown_section {
|
21 |
+
width: 32.5%;
|
22 |
+
}
|
23 |
+
.countdown_show4 .countdown_section {
|
24 |
+
width: 24.5%;
|
25 |
+
}
|
26 |
+
.countdown_show5 .countdown_section {
|
27 |
+
width: 19.5%;
|
28 |
+
}
|
29 |
+
.countdown_show6 .countdown_section {
|
30 |
+
width: 16.25%;
|
31 |
+
}
|
32 |
+
.countdown_show7 .countdown_section {
|
33 |
+
width: 14%;
|
34 |
+
}
|
35 |
+
.countdown_section {
|
36 |
+
display: block;
|
37 |
+
float: left;
|
38 |
+
font-size: 75%;
|
39 |
+
text-align: center;
|
40 |
+
}
|
41 |
+
.countdown_amount {
|
42 |
+
font-size: 200%;
|
43 |
+
}
|
44 |
+
.countdown_descr {
|
45 |
+
display: block;
|
46 |
+
width: 100%;
|
47 |
+
}
|
css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_flat_55_c0402a_40x100.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_glass_35_dddddd_1x400.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png
CHANGED
File without changes
|
css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png
CHANGED
File without changes
|
css/overcast/images/ui-icons_3383bb_256x240.png
CHANGED
File without changes
|
css/overcast/images/ui-icons_454545_256x240.png
CHANGED
File without changes
|
css/overcast/images/ui-icons_70b2e1_256x240.png
CHANGED
File without changes
|
css/overcast/images/ui-icons_999999_256x240.png
CHANGED
File without changes
|
css/overcast/images/ui-icons_fbc856_256x240.png
CHANGED
File without changes
|
css/overcast/jquery-ui-1.7.2.custom.css
CHANGED
File without changes
|
css/style.css
CHANGED
@@ -10,6 +10,17 @@ margin: 10px;
|
|
10 |
display: none;
|
11 |
}
|
12 |
|
13 |
-
#wm_message, #wm_message_update, #wm_message_active {
|
14 |
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
10 |
display: none;
|
11 |
}
|
12 |
|
13 |
+
#wm_message, #wm_message_update, #wm_message_active, #wm_message_active2, #wm_message_update2 {
|
14 |
display: none;
|
15 |
+
}
|
16 |
+
|
17 |
+
#wphead #mm_in_admin_header {
|
18 |
+
font: normal 11px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
19 |
+
line-height: 17px;
|
20 |
+
padding: 17px 0 0 0;
|
21 |
+
float: left;
|
22 |
+
color: #464646;
|
23 |
+
}
|
24 |
+
#wphead a#mm_in_admin_header:hover {
|
25 |
+
text-decoration: underline;
|
26 |
}
|
index.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once('../../../wp-load.php');
|
3 |
+
|
4 |
+
if( !current_user_can('unfiltered_html') )
|
5 |
+
wp_die( __('Cheatin’ uh?') );
|
6 |
+
|
7 |
+
$WPMaintenanceMode = new WPMaintenanceMode();
|
8 |
+
$WPMaintenanceMode->on_active();
|
9 |
+
|
10 |
+
include 'site.php';
|
11 |
+
?>
|
js/de_DE.datetimepicker.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function( $ ) {
|
2 |
+
$.datepicker.regional['de'] = {clearText: 'l�schen', clearStatus: 'aktuelles Datum l�schen',
|
3 |
+
closeText: 'schlie�en', closeStatus: 'ohne �nderungen schlie�en',
|
4 |
+
prevText: '<zur�ck', prevStatus: 'letzten Monat zeigen',
|
5 |
+
nextText: 'Vor>', nextStatus: 'n�chsten Monat zeigen',
|
6 |
+
currentText: 'heute', currentStatus: '',
|
7 |
+
monthNames: ['Januar','Februar','M�rz','April','Mai','Juni',
|
8 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
9 |
+
monthNamesShort: ['Jan','Feb','M�r','Apr','Mai','Jun',
|
10 |
+
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
11 |
+
monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
|
12 |
+
weekHeader: 'Wo', weekStatus: 'Woche des Monats',
|
13 |
+
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
14 |
+
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
15 |
+
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
16 |
+
dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'W�hle D, M d',
|
17 |
+
dateFormat: 'dd.mm.yy', firstDay: 1,
|
18 |
+
initStatus: 'W�hle ein Datum', isRTL: false};
|
19 |
+
$.datepicker.setDefaults(jQuery.datepicker.regional['de']);
|
20 |
+
} );
|
js/jquery-ui-1.7.2.custom.min.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI Datepicker 1.7.2
|
3 |
-
*
|
4 |
-
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Datepicker
|
9 |
-
*
|
10 |
-
* Depends:
|
11 |
-
* ui.core.js
|
12 |
-
*/
|
13 |
-
(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jquery.countdown-ar.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Arabic (عربي) initialisation for the jQuery countdown extension
|
3 |
+
Translated by Talal Al Asmari (talal@psdgroups.com), April 2009. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['ar'] = {
|
6 |
+
labels: ['سنوات','أشهر','أسابيع','أيام','ساعات','دقائق','ثواني'],
|
7 |
+
labels1: ['سنة','شهر','أسبوع','يوم','ساعة','دقيقة','ثانية'],
|
8 |
+
compactLabels: ['س', 'ش', 'أ', 'ي'],
|
9 |
+
timeSeparator: ':', isRTL: true};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['ar']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-cs.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Czech initialisation for the jQuery countdown extension
|
3 |
+
* Written by Roman Chlebec (creamd@c64.sk) (2008) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['cs'] = {
|
6 |
+
labels: ['Roků', 'Měsíců', 'Týdnů', 'Dní', 'Hodin', 'Minut', 'Sekund'],
|
7 |
+
labels1: ['Rok', 'Měsíc', 'Týden', 'Den', 'Hodina', 'Minuta', 'Sekunda'],
|
8 |
+
labels2: ['Roky', 'Měsíce', 'Týdny', 'Dny', 'Hodiny', 'Minuty', 'Sekundy'],
|
9 |
+
labels3: ['Roky', 'Měsíce', 'Týdny', 'Dny', 'Hodiny', 'Minuty', 'Sekundy'],
|
10 |
+
labels4: ['Roky', 'Měsíce', 'Týdny', 'Dny', 'Hodiny', 'Minuty', 'Sekundy'],
|
11 |
+
compactLabels: ['r', 'm', 't', 'd'],
|
12 |
+
timeSeparator: ':', isRTL: false};
|
13 |
+
$.countdown.setDefaults($.countdown.regional['cs']);
|
14 |
+
})(jQuery);
|
js/jquery.countdown-da.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Danish initialisation for the jQuery countdown extension
|
3 |
+
Written by Buch (admin@buch90.dk). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['da'] = {
|
6 |
+
labels: ['År', 'Måneder', 'Uger', 'Dage', 'Timer', 'Minutter', 'Sekunder'],
|
7 |
+
labels1: ['År', 'Månad', 'Uge', 'Dag', 'Time', 'Minut', 'Sekund'],
|
8 |
+
compactLabels: ['Å', 'M', 'U', 'D'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['da']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-de.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
German initialisation for the jQuery countdown extension
|
3 |
+
Written by Keith Wood (kbwood@virginbroadband.com.au) Jan 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['de'] = {
|
6 |
+
labels: ['Jahren', 'Monate', 'Wochen', 'Tage', 'Stunden', 'Minuten', 'Sekunden'],
|
7 |
+
labels1: ['Jahre', 'Monat', 'Woche', 'Tag', 'Stunde', 'Minute', 'Sekunde'],
|
8 |
+
compactLabels: ['J', 'M', 'W', 'T'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['de']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-es.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Spanish initialisation for the jQuery countdown extension
|
3 |
+
* Written by Sergio Carracedo Martinez webmaster@neodisenoweb.com (2008) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['es'] = {
|
6 |
+
labels: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],
|
7 |
+
labels1: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],
|
8 |
+
compactLabels: ['a', 'm', 's', 'g'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['es']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-fa.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Persian (فارسی) initialisation for the jQuery countdown extension
|
3 |
+
Written by Alireza Ziaie (ziai@magfa.com) Oct 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['fa'] = {
|
6 |
+
labels: ['سال', 'ماه', 'هفته', 'روز', 'ساعت', 'دقیقه', 'ثانیه'],
|
7 |
+
labels1: ['سال', 'ماه', 'هفته', 'روز', 'ساعت', 'دقیقه', 'ثانیه'],
|
8 |
+
compactLabels: ['س', 'م', 'ه', 'ر'],
|
9 |
+
timeSeparator: ':', isRTL: true};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['fa']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-fi.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Finnish initialisation for the jQuery countdown extension
|
3 |
+
Written by Kalle Vänskä and Juha Suni (juhis.suni@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['fi'] = {
|
6 |
+
labels: ['Vuotta', 'Kuukautta', 'Viikkoa', 'Päivää', 'Tuntia', 'Minuuttia', 'Sekuntia'],
|
7 |
+
labels1: ['Vuosi', 'Kuukausi', 'Viikko', 'Päivä', 'Tunti', 'Minuutti', 'Sekunti'],
|
8 |
+
compactLabels: ['v', 'kk', 'vk', 'pv'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['fi']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-fr.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
French initialisation for the jQuery countdown extension
|
3 |
+
Written by Keith Wood (kbwood{at}iinet.com.au) Jan 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['fr'] = {
|
6 |
+
labels: ['Années', 'Mois', 'Semaines', 'Jours', 'Heures', 'Minutes', 'Secondes'],
|
7 |
+
labels1: ['Année', 'Mois', 'Semaine', 'Jour', 'Heure', 'Minute', 'Seconde'],
|
8 |
+
compactLabels: ['a', 'm', 's', 'j'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['fr']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-gl.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Galician initialisation for the jQuery countdown extension
|
3 |
+
* Written by Moncho Pena ramon.pena.rodriguez@gmail.com (2009) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['gl'] = {
|
6 |
+
labels: ['Anos', 'Meses', 'Semanas', 'Días', 'Horas', 'Minutos', 'Segundos'],
|
7 |
+
labels1: ['Anos', 'Meses', 'Semanas', 'Días', 'Horas', 'Minutos', 'Segundos'],
|
8 |
+
compactLabels: ['a', 'm', 's', 'g'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['gl']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-he.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Hebrew initialisation for the jQuery countdown extension
|
3 |
+
* Translated by Nir Livne, Dec 2008 */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['he'] = {
|
6 |
+
labels: ['שנים', 'חודשים', 'שבועות', 'ימים', 'שעות', 'דקות', 'שניות'],
|
7 |
+
labels1: ['שנה', 'חודש', 'שבוע', 'יום', 'שעה', 'דקה', 'שנייה'],
|
8 |
+
compactLabels: ['שנ', 'ח', 'שב', 'י'],
|
9 |
+
timeSeparator: ':', isRTL: true};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['he']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-hu.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Hungarian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Edmond L. (webmond@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['hu'] = {
|
6 |
+
labels: ['Év', 'Hónap', 'Hét', 'Nap', 'Óra', 'Perc', 'Másodperc'],
|
7 |
+
labels1: ['Év', 'Hónap', 'Hét', 'Nap', 'Óra', 'Perc', 'Másodperc'],
|
8 |
+
compactLabels: ['É', 'H', 'Hé', 'N'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['hu']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-id.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Indonesian initialisation for the jQuery countdown extension
|
3 |
+
Written by Erwin Yonathan Jan 2009. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['id'] = {
|
6 |
+
labels: ['tahun', 'bulan', 'minggu', 'hari', 'jam', 'menit', 'detik'],
|
7 |
+
labels1: ['tahun', 'bulan', 'minggu', 'hari', 'jam', 'menit', 'detik'],
|
8 |
+
compactLabels: ['t', 'b', 'm', 'h'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['id']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-it.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Italian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Davide Bellettini (davide.bellettini@gmail.com) Feb 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['it'] = {
|
6 |
+
labels: ['Anni', 'Mesi', 'Settimane', 'Giorni', 'Ore', 'Minuti', 'Secondi'],
|
7 |
+
labels1: ['Anni', 'Mesi', 'Settimane', 'Giorni', 'Ore', 'Minuti', 'Secondi'],
|
8 |
+
compactLabels: ['a', 'm', 's', 'g'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['it']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-ja.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Japanese initialisation for the jQuery countdown extension
|
3 |
+
Written by Ken Ishimoto (ken@ksroom.com) Aug 2009. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['ja'] = {
|
6 |
+
labels: ['年', '月', '週', '日', '時', '分', '秒'],
|
7 |
+
labels1: ['年', '月', '週', '日', '時', '分', '秒'],
|
8 |
+
compactLabels: ['年', '月', '週', '日'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['ja']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-ko.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Korean initialisation for the jQuery countdown extension
|
3 |
+
Written by Ryan Yu (ryanyu79@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['ko'] = {
|
6 |
+
labels: ['년', '월', '주', '일', '시', '분', '초'],
|
7 |
+
labels1: ['년', '월', '주', '일', '시', '분', '초'],
|
8 |
+
compactLabels: ['년', '월', '주', '일'],
|
9 |
+
compactLabels1: ['년', '월', '주', '일'],
|
10 |
+
timeSeparator: ':', isRTL: false};
|
11 |
+
$.countdown.setDefaults($.countdown.regional['ko']);
|
12 |
+
})(jQuery);
|
js/jquery.countdown-lt.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Lithuanian localisation for the jQuery countdown extension
|
3 |
+
* Written by Moacir P. de Sá Pereira (moacir{at}gmail.com) (2009) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['lt'] = {
|
6 |
+
labels: ['Metų', 'Mėnesių', 'Savaičių', 'Dienų', 'Valandų', 'Minučių', 'Sekundžių'],
|
7 |
+
labels1: ['Metai', 'Mėnuo', 'Savaitė', 'Diena', 'Valanda', 'Minutė', 'Sekundė'],
|
8 |
+
compactLabels: ['m', 'm', 's', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['lt']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-lv.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Latvian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Jānis Peisenieks janis.peisenieks@gmail.com (2010) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['lv'] = {
|
6 |
+
labels: ['Gadi', 'Mēneši', 'Nedēļas', 'Dienas', 'Stundas', 'Minūtes', 'Sekundes'],
|
7 |
+
labels1: ['Gads', 'Mēnesis', 'Nedēļa', 'Diena', 'Stunda', 'Minūte', 'Sekunde'],
|
8 |
+
compactLabels: ['l', 'm', 'n', 'd'], compactLabels1: ['g', 'm', 'n', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['lv']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-my.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Burmese initialisation for the jQuery countdown extension
|
3 |
+
Written by Win Lwin Moe (winnlwinmoe@gmail.com) Dec 2009. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['my'] = {
|
6 |
+
labels: ['နွစ္', 'လ', 'ရက္သတဿတပတ္', 'ရက္', 'နာရီ', 'မိနစ္', 'စကဿကန့္'],
|
7 |
+
labels1: ['နွစ္', 'လ', 'ရက္သတဿတပတ္', 'ရက္', 'နာရီ', 'မိနစ္', 'စကဿကန့္'],
|
8 |
+
compactLabels: ['နွစ္', 'လ', 'ရက္သတဿတပတ္', 'ရက္'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['my']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-nb.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Norwegian Bokmål translation
|
3 |
+
Written by Kristian Ravnevand */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['nb'] = {
|
6 |
+
labels: ['År', 'Måneder', 'Uker', 'Dager', 'Timer', 'Minutter', 'Sekunder'],
|
7 |
+
labels1: ['År', 'Måned', 'Uke', 'Dag', 'Time', 'Minutt', 'Sekund'],
|
8 |
+
compactLabels: ['Å', 'M', 'U', 'D'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['nb']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-nl.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Dutch initialisation for the jQuery countdown extension
|
3 |
+
Written by Mathias Bynens <http://mathiasbynens.be/> Mar 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['nl'] = {
|
6 |
+
labels: ['Jaren', 'Maanden', 'Weken', 'Dagen', 'Uren', 'Minuten', 'Seconden'],
|
7 |
+
labels1: ['Jaar', 'Maand', 'Week', 'Dag', 'Uur', 'Minuut', 'Seconde'],
|
8 |
+
compactLabels: ['j', 'm', 'w', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['nl']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-pl.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Polish initialisation for the jQuery countdown extension
|
3 |
+
* Written by Pawel Lewtak lewtak@gmail.com (2008) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['pl'] = {
|
6 |
+
labels: ['lat', 'miesięcy', 'tygodni', 'dni', 'godzin', 'minut', 'sekund'],
|
7 |
+
labels1: ['rok', 'miesiac', 'tydzien', 'dzien', 'godzina', 'minuta', 'sekunda'],
|
8 |
+
compactLabels: ['l', 'm', 't', 'd'], compactLabels1: ['r', 'm', 't', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['pl']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-pt-BR.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Brazilian initialisation for the jQuery countdown extension
|
3 |
+
Translated by Marcelo Pellicano de Oliveira (pellicano@gmail.com) Feb 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['pt-BR'] = {
|
6 |
+
labels: ['Anos', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],
|
7 |
+
labels1: ['Anos', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],
|
8 |
+
compactLabels: ['a', 'm', 's', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['pt-BR']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-ro.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Romanian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Edmond L. (webmond@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['ro'] = {
|
6 |
+
labels: ['Ani', 'Luni', 'Saptamani', 'Zile', 'Ore', 'Minute', 'Secunde'],
|
7 |
+
labels1: ['An', 'Luna', 'Saptamana', 'Ziua', 'Ora', 'Minutul', 'Secunda'],
|
8 |
+
compactLabels: ['A', 'L', 'S', 'Z'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['ro']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-ru.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Russian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Dominus i3rixon@gmail.com (2008) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['ru'] = {
|
6 |
+
labels: ['Лет', 'Месяцев', 'Недель', 'Дней', 'Часов', 'Минут', 'Секунд'],
|
7 |
+
labels1: ['Год', 'Месяц', 'Неделя', 'День', 'Час', 'Минута', 'Секунда'],
|
8 |
+
compactLabels: ['l', 'm', 'n', 'd'], compactLabels1: ['g', 'm', 'n', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['ru']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-sk.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Slovak initialisation for the jQuery countdown extension
|
3 |
+
* Written by Roman Chlebec (creamd@c64.sk) (2008) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['sk'] = {
|
6 |
+
labels: ['Rokov', 'Mesiacov', 'Týždňov', 'Dní', 'Hodín', 'Minút', 'Sekúnd'],
|
7 |
+
labels1: ['Rok', 'Mesiac', 'Týždeň', 'Deň', 'Hodina', 'Minúta', 'Sekunda'],
|
8 |
+
labels2: ['Roky', 'Mesiace', 'Týždne', 'Dni', 'Hodiny', 'Minúty', 'Sekundy'],
|
9 |
+
labels3: ['Roky', 'Mesiace', 'Týždne', 'Dni', 'Hodiny', 'Minúty', 'Sekundy'],
|
10 |
+
labels4: ['Roky', 'Mesiace', 'Týždne', 'Dni', 'Hodiny', 'Minúty', 'Sekundy'],
|
11 |
+
compactLabels: ['r', 'm', 't', 'd'],
|
12 |
+
timeSeparator: ':', isRTL: false};
|
13 |
+
$.countdown.setDefaults($.countdown.regional['sk']);
|
14 |
+
})(jQuery);
|
js/jquery.countdown-sv.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Swedish initialisation for the jQuery countdown extension
|
3 |
+
Written by Carl (carl@nordenfelt.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['sv'] = {
|
6 |
+
labels: ['År', 'Månader', 'Veckor', 'Dagar', 'Timmar', 'Minuter', 'Sekunder'],
|
7 |
+
labels1: ['År', 'Månad', 'Vecka', 'Dag', 'Timme', 'Minut', 'Sekund'],
|
8 |
+
compactLabels: ['Å', 'M', 'V', 'D'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['sv']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-tr.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Turkish initialisation for the jQuery countdown extension
|
3 |
+
* Written by Bekir Ahmetoğlu (bekir@cerek.com) Aug 2008. */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['tr'] = {
|
6 |
+
labels: ['Yıl', 'Ay', 'Hafta', 'Gün', 'Saat', 'Dakika', 'Saniye'],
|
7 |
+
labels1: ['Yıl', 'Ay', 'Hafta', 'Gün', 'Saat', 'Dakika', 'Saniye'],
|
8 |
+
compactLabels: ['y', 'a', 'h', 'g'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['tr']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-uk.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
* Ukrainian initialisation for the jQuery countdown extension
|
3 |
+
* Written by Goloborodko M misha.gm@gmail.com (2009) */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['uk'] = {
|
6 |
+
labels: ['Років', 'Місяців', 'Тижднів', 'Днів', 'Годин', 'Хвилин', 'Секунд'],
|
7 |
+
labels1: ['Рік', 'Місяць', 'Тиждень', 'День', 'Година', 'Хвилина', 'Секунда'],
|
8 |
+
compactLabels: ['r', 'm', 't', 'd'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['uk']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-zh-CN.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Simplified Chinese initialisation for the jQuery countdown extension
|
3 |
+
Written by Cloudream (cloudream@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['zh-CN'] = {
|
6 |
+
labels: ['年', '月', '周', '天', '时', '分', '秒'],
|
7 |
+
labels1: ['年', '月', '周', '天', '时', '分', '秒'],
|
8 |
+
compactLabels: ['年', '月', '周', '天'], compactLabels1: ['年', '月', '周', '天'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['zh-CN']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown-zh-TW.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Traditional Chinese initialisation for the jQuery countdown extension
|
3 |
+
Written by Cloudream (cloudream@gmail.com). */
|
4 |
+
(function($) {
|
5 |
+
$.countdown.regional['zh-TW'] = {
|
6 |
+
labels: ['年', '月', '周', '天', '時', '分', '秒'],
|
7 |
+
labels1: ['年', '月', '周', '天', '時', '分', '秒'],
|
8 |
+
compactLabels: ['年', '月', '周', '天'], compactLabels1: ['年', '月', '周', '天'],
|
9 |
+
timeSeparator: ':', isRTL: false};
|
10 |
+
$.countdown.setDefaults($.countdown.regional['zh-TW']);
|
11 |
+
})(jQuery);
|
js/jquery.countdown.js
ADDED
@@ -0,0 +1,706 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://keith-wood.name/countdown.html
|
2 |
+
Countdown for jQuery v1.5.6.
|
3 |
+
Written by Keith Wood (kbwood{at}iinet.com.au) January 2008.
|
4 |
+
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
5 |
+
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
6 |
+
Please attribute the author if you use it. */
|
7 |
+
|
8 |
+
/* Display a countdown timer.
|
9 |
+
Attach it with options like:
|
10 |
+
$('div selector').countdown(
|
11 |
+
{until: new Date(2009, 1 - 1, 1, 0, 0, 0), onExpiry: happyNewYear}); */
|
12 |
+
|
13 |
+
(function($) { // Hide scope, no $ conflict
|
14 |
+
|
15 |
+
/* Countdown manager. */
|
16 |
+
function Countdown() {
|
17 |
+
this.regional = []; // Available regional settings, indexed by language code
|
18 |
+
this.regional[''] = { // Default regional settings
|
19 |
+
// The display texts for the counters
|
20 |
+
labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'],
|
21 |
+
// The display texts for the counters if only one
|
22 |
+
labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'],
|
23 |
+
compactLabels: ['y', 'm', 'w', 'd'], // The compact texts for the counters
|
24 |
+
timeSeparator: ':', // Separator for time periods
|
25 |
+
isRTL: false // True for right-to-left languages, false for left-to-right
|
26 |
+
};
|
27 |
+
this._defaults = {
|
28 |
+
until: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count down to
|
29 |
+
// or numeric for seconds offset, or string for unit offset(s):
|
30 |
+
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
|
31 |
+
since: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from
|
32 |
+
// or numeric for seconds offset, or string for unit offset(s):
|
33 |
+
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
|
34 |
+
timezone: null, // The timezone (hours or minutes from GMT) for the target times,
|
35 |
+
// or null for client local
|
36 |
+
serverSync: null, // A function to retrieve the current server time for synchronisation
|
37 |
+
format: 'dHMS', // Format for display - upper case for always, lower case only if non-zero,
|
38 |
+
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
|
39 |
+
layout: '', // Build your own layout for the countdown
|
40 |
+
compact: false, // True to display in a compact format, false for an expanded one
|
41 |
+
description: '', // The description displayed for the countdown
|
42 |
+
expiryUrl: '', // A URL to load upon expiry, replacing the current page
|
43 |
+
expiryText: '', // Text to display upon expiry, replacing the countdown
|
44 |
+
alwaysExpire: false, // True to trigger onExpiry even if never counted down
|
45 |
+
onExpiry: null, // Callback when the countdown expires -
|
46 |
+
// receives no parameters and 'this' is the containing division
|
47 |
+
onTick: null // Callback when the countdown is updated -
|
48 |
+
// receives int[7] being the breakdown by period (based on format)
|
49 |
+
// and 'this' is the containing division
|
50 |
+
};
|
51 |
+
$.extend(this._defaults, this.regional['']);
|
52 |
+
}
|
53 |
+
|
54 |
+
var PROP_NAME = 'countdown';
|
55 |
+
|
56 |
+
var Y = 0; // Years
|
57 |
+
var O = 1; // Months
|
58 |
+
var W = 2; // Weeks
|
59 |
+
var D = 3; // Days
|
60 |
+
var H = 4; // Hours
|
61 |
+
var M = 5; // Minutes
|
62 |
+
var S = 6; // Seconds
|
63 |
+
|
64 |
+
$.extend(Countdown.prototype, {
|
65 |
+
/* Class name added to elements to indicate already configured with countdown. */
|
66 |
+
markerClassName: 'hasCountdown',
|
67 |
+
|
68 |
+
/* Shared timer for all countdowns. */
|
69 |
+
_timer: setInterval(function() { $.countdown._updateTargets(); }, 980),
|
70 |
+
/* List of currently active countdown targets. */
|
71 |
+
_timerTargets: [],
|
72 |
+
|
73 |
+
/* Override the default settings for all instances of the countdown widget.
|
74 |
+
@param options (object) the new settings to use as defaults */
|
75 |
+
setDefaults: function(options) {
|
76 |
+
this._resetExtraLabels(this._defaults, options);
|
77 |
+
extendRemove(this._defaults, options || {});
|
78 |
+
},
|
79 |
+
|
80 |
+
/* Convert a date/time to UTC.
|
81 |
+
@param tz (number) the hour or minute offset from GMT, e.g. +9, -360
|
82 |
+
@param year (Date) the date/time in that timezone or
|
83 |
+
(number) the year in that timezone
|
84 |
+
@param month (number, optional) the month (0 - 11) (omit if year is a Date)
|
85 |
+
@param day (number, optional) the day (omit if year is a Date)
|
86 |
+
@param hours (number, optional) the hour (omit if year is a Date)
|
87 |
+
@param mins (number, optional) the minute (omit if year is a Date)
|
88 |
+
@param secs (number, optional) the second (omit if year is a Date)
|
89 |
+
@param ms (number, optional) the millisecond (omit if year is a Date)
|
90 |
+
@return (Date) the equivalent UTC date/time */
|
91 |
+
UTCDate: function(tz, year, month, day, hours, mins, secs, ms) {
|
92 |
+
if (typeof year == 'object' && year.constructor == Date) {
|
93 |
+
ms = year.getMilliseconds();
|
94 |
+
secs = year.getSeconds();
|
95 |
+
mins = year.getMinutes();
|
96 |
+
hours = year.getHours();
|
97 |
+
day = year.getDate();
|
98 |
+
month = year.getMonth();
|
99 |
+
year = year.getFullYear();
|
100 |
+
}
|
101 |
+
var d = new Date();
|
102 |
+
d.setUTCFullYear(year);
|
103 |
+
d.setUTCDate(1);
|
104 |
+
d.setUTCMonth(month || 0);
|
105 |
+
d.setUTCDate(day || 1);
|
106 |
+
d.setUTCHours(hours || 0);
|
107 |
+
d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz));
|
108 |
+
d.setUTCSeconds(secs || 0);
|
109 |
+
d.setUTCMilliseconds(ms || 0);
|
110 |
+
return d;
|
111 |
+
},
|
112 |
+
|
113 |
+
/* Convert a set of periods into seconds.
|
114 |
+
Averaged for months and years.
|
115 |
+
@param periods (number[7]) the periods per year/month/week/day/hour/minute/second
|
116 |
+
@return (number) the corresponding number of seconds */
|
117 |
+
periodsToSeconds: function(periods) {
|
118 |
+
return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 +
|
119 |
+
periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6];
|
120 |
+
},
|
121 |
+
|
122 |
+
/* Retrieve one or more settings values.
|
123 |
+
@param name (string, optional) the name of the setting to retrieve
|
124 |
+
or 'all' for all instance settings or omit for all default settings
|
125 |
+
@return (any) the requested setting(s) */
|
126 |
+
_settingsCountdown: function(target, name) {
|
127 |
+
if (!name) {
|
128 |
+
return $.countdown._defaults;
|
129 |
+
}
|
130 |
+
var inst = $.data(target, PROP_NAME);
|
131 |
+
return (name == 'all' ? inst.options : inst.options[name]);
|
132 |
+
},
|
133 |
+
|
134 |
+
/* Attach the countdown widget to a div.
|
135 |
+
@param target (element) the containing division
|
136 |
+
@param options (object) the initial settings for the countdown */
|
137 |
+
_attachCountdown: function(target, options) {
|
138 |
+
var $target = $(target);
|
139 |
+
if ($target.hasClass(this.markerClassName)) {
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
$target.addClass(this.markerClassName);
|
143 |
+
var inst = {options: $.extend({}, options),
|
144 |
+
_periods: [0, 0, 0, 0, 0, 0, 0]};
|
145 |
+
$.data(target, PROP_NAME, inst);
|
146 |
+
this._changeCountdown(target);
|
147 |
+
},
|
148 |
+
|
149 |
+
/* Add a target to the list of active ones.
|
150 |
+
@param target (element) the countdown target */
|
151 |
+
_addTarget: function(target) {
|
152 |
+
if (!this._hasTarget(target)) {
|
153 |
+
this._timerTargets.push(target);
|
154 |
+
}
|
155 |
+
},
|
156 |
+
|
157 |
+
/* See if a target is in the list of active ones.
|
158 |
+
@param target (element) the countdown target
|
159 |
+
@return (boolean) true if present, false if not */
|
160 |
+
_hasTarget: function(target) {
|
161 |
+
return ($.inArray(target, this._timerTargets) > -1);
|
162 |
+
},
|
163 |
+
|
164 |
+
/* Remove a target from the list of active ones.
|
165 |
+
@param target (element) the countdown target */
|
166 |
+
_removeTarget: function(target) {
|
167 |
+
this._timerTargets = $.map(this._timerTargets,
|
168 |
+
function(value) { return (value == target ? null : value); }); // delete entry
|
169 |
+
},
|
170 |
+
|
171 |
+
/* Update each active timer target. */
|
172 |
+
_updateTargets: function() {
|
173 |
+
for (var i = 0; i < this._timerTargets.length; i++) {
|
174 |
+
this._updateCountdown(this._timerTargets[i]);
|
175 |
+
}
|
176 |
+
},
|
177 |
+
|
178 |
+
/* Redisplay the countdown with an updated display.
|
179 |
+
@param target (jQuery) the containing division
|
180 |
+
@param inst (object) the current settings for this instance */
|
181 |
+
_updateCountdown: function(target, inst) {
|
182 |
+
var $target = $(target);
|
183 |
+
inst = inst || $.data(target, PROP_NAME);
|
184 |
+
if (!inst) {
|
185 |
+
return;
|
186 |
+
}
|
187 |
+
$target.html(this._generateHTML(inst));
|
188 |
+
$target[(this._get(inst, 'isRTL') ? 'add' : 'remove') + 'Class']('countdown_rtl');
|
189 |
+
var onTick = this._get(inst, 'onTick');
|
190 |
+
if (onTick) {
|
191 |
+
var periods = inst._hold != 'lap' ? inst._periods :
|
192 |
+
this._calculatePeriods(inst, inst._show, new Date());
|
193 |
+
onTick.apply(target, [periods]);
|
194 |
+
}
|
195 |
+
var expired = inst._hold != 'pause' &&
|
196 |
+
(inst._since ? inst._now.getTime() < inst._since.getTime() :
|
197 |
+
inst._now.getTime() >= inst._until.getTime());
|
198 |
+
if (expired && !inst._expiring) {
|
199 |
+
inst._expiring = true;
|
200 |
+
if (this._hasTarget(target) || this._get(inst, 'alwaysExpire')) {
|
201 |
+
this._removeTarget(target);
|
202 |
+
var onExpiry = this._get(inst, 'onExpiry');
|
203 |
+
if (onExpiry) {
|
204 |
+
onExpiry.apply(target, []);
|
205 |
+
}
|
206 |
+
var expiryText = this._get(inst, 'expiryText');
|
207 |
+
if (expiryText) {
|
208 |
+
var layout = this._get(inst, 'layout');
|
209 |
+
inst.options.layout = expiryText;
|
210 |
+
this._updateCountdown(target, inst);
|
211 |
+
inst.options.layout = layout;
|
212 |
+
}
|
213 |
+
var expiryUrl = this._get(inst, 'expiryUrl');
|
214 |
+
if (expiryUrl) {
|
215 |
+
window.location = expiryUrl;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
inst._expiring = false;
|
219 |
+
}
|
220 |
+
else if (inst._hold == 'pause') {
|
221 |
+
this._removeTarget(target);
|
222 |
+
}
|
223 |
+
$.data(target, PROP_NAME, inst);
|
224 |
+
},
|
225 |
+
|
226 |
+
/* Reconfigure the settings for a countdown div.
|
227 |
+
@param target (element) the containing division
|
228 |
+
@param options (object) the new settings for the countdown or
|
229 |
+
(string) an individual property name
|
230 |
+
@param value (any) the individual property value
|
231 |
+
(omit if options is an object) */
|
232 |
+
_changeCountdown: function(target, options, value) {
|
233 |
+
options = options || {};
|
234 |
+
if (typeof options == 'string') {
|
235 |
+
var name = options;
|
236 |
+
options = {};
|
237 |
+
options[name] = value;
|
238 |
+
}
|
239 |
+
var inst = $.data(target, PROP_NAME);
|
240 |
+
if (inst) {
|
241 |
+
this._resetExtraLabels(inst.options, options);
|
242 |
+
extendRemove(inst.options, options);
|
243 |
+
this._adjustSettings(target, inst);
|
244 |
+
$.data(target, PROP_NAME, inst);
|
245 |
+
var now = new Date();
|
246 |
+
if ((inst._since && inst._since < now) ||
|
247 |
+
(inst._until && inst._until > now)) {
|
248 |
+
this._addTarget(target);
|
249 |
+
}
|
250 |
+
this._updateCountdown(target, inst);
|
251 |
+
}
|
252 |
+
},
|
253 |
+
|
254 |
+
/* Reset any extra labelsn and compactLabelsn entries if changing labels.
|
255 |
+
@param base (object) the options to be updated
|
256 |
+
@param options (object) the new option values */
|
257 |
+
_resetExtraLabels: function(base, options) {
|
258 |
+
var changingLabels = false;
|
259 |
+
for (var n in options) {
|
260 |
+
if (n.match(/[Ll]abels/)) {
|
261 |
+
changingLabels = true;
|
262 |
+
break;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
if (changingLabels) {
|
266 |
+
for (var n in base) { // Remove custom numbered labels
|
267 |
+
if (n.match(/[Ll]abels[0-9]/)) {
|
268 |
+
base[n] = null;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
}
|
272 |
+
},
|
273 |
+
|
274 |
+
/* Calculate interal settings for an instance.
|
275 |
+
@param target (element) the containing division
|
276 |
+
@param inst (object) the current settings for this instance */
|
277 |
+
_adjustSettings: function(target, inst) {
|
278 |
+
var serverSync = this._get(inst, 'serverSync');
|
279 |
+
serverSync = (serverSync ? serverSync.apply(target, []) : null);
|
280 |
+
var now = new Date();
|
281 |
+
var timezone = this._get(inst, 'timezone');
|
282 |
+
timezone = (timezone == null ? -now.getTimezoneOffset() : timezone);
|
283 |
+
inst._since = this._get(inst, 'since');
|
284 |
+
if (inst._since != null) {
|
285 |
+
inst._since = this.UTCDate(timezone, this._determineTime(inst._since, null));
|
286 |
+
if (inst._since && serverSync) {
|
287 |
+
inst._since.setMilliseconds(inst._since.getMilliseconds() +
|
288 |
+
now.getTime() - serverSync.getTime());
|
289 |
+
}
|
290 |
+
}
|
291 |
+
inst._until = this.UTCDate(timezone, this._determineTime(this._get(inst, 'until'), now));
|
292 |
+
if (serverSync) {
|
293 |
+
inst._until.setMilliseconds(inst._until.getMilliseconds() +
|
294 |
+
now.getTime() - serverSync.getTime());
|
295 |
+
}
|
296 |
+
inst._show = this._determineShow(inst);
|
297 |
+
},
|
298 |
+
|
299 |
+
/* Remove the countdown widget from a div.
|
300 |
+
@param target (element) the containing division */
|
301 |
+
_destroyCountdown: function(target) {
|
302 |
+
var $target = $(target);
|
303 |
+
if (!$target.hasClass(this.markerClassName)) {
|
304 |
+
return;
|
305 |
+
}
|
306 |
+
this._removeTarget(target);
|
307 |
+
$target.removeClass(this.markerClassName).empty();
|
308 |
+
$.removeData(target, PROP_NAME);
|
309 |
+
},
|
310 |
+
|
311 |
+
/* Pause a countdown widget at the current time.
|
312 |
+
Stop it running but remember and display the current time.
|
313 |
+
@param target (element) the containing division */
|
314 |
+
_pauseCountdown: function(target) {
|
315 |
+
this._hold(target, 'pause');
|
316 |
+
},
|
317 |
+
|
318 |
+
/* Pause a countdown widget at the current time.
|
319 |
+
Stop the display but keep the countdown running.
|
320 |
+
@param target (element) the containing division */
|
321 |
+
_lapCountdown: function(target) {
|
322 |
+
this._hold(target, 'lap');
|
323 |
+
},
|
324 |
+
|
325 |
+
/* Resume a paused countdown widget.
|
326 |
+
@param target (element) the containing division */
|
327 |
+
_resumeCountdown: function(target) {
|
328 |
+
this._hold(target, null);
|
329 |
+
},
|
330 |
+
|
331 |
+
/* Pause or resume a countdown widget.
|
332 |
+
@param target (element) the containing division
|
333 |
+
@param hold (string) the new hold setting */
|
334 |
+
_hold: function(target, hold) {
|
335 |
+
var inst = $.data(target, PROP_NAME);
|
336 |
+
if (inst) {
|
337 |
+
if (inst._hold == 'pause' && !hold) {
|
338 |
+
inst._periods = inst._savePeriods;
|
339 |
+
var sign = (inst._since ? '-' : '+');
|
340 |
+
inst[inst._since ? '_since' : '_until'] =
|
341 |
+
this._determineTime(sign + inst._periods[0] + 'y' +
|
342 |
+
sign + inst._periods[1] + 'o' + sign + inst._periods[2] + 'w' +
|
343 |
+
sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' +
|
344 |
+
sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's');
|
345 |
+
this._addTarget(target);
|
346 |
+
}
|
347 |
+
inst._hold = hold;
|
348 |
+
inst._savePeriods = (hold == 'pause' ? inst._periods : null);
|
349 |
+
$.data(target, PROP_NAME, inst);
|
350 |
+
this._updateCountdown(target, inst);
|
351 |
+
}
|
352 |
+
},
|
353 |
+
|
354 |
+
/* Return the current time periods.
|
355 |
+
@param target (element) the containing division
|
356 |
+
@return (number[7]) the current periods for the countdown */
|
357 |
+
_getTimesCountdown: function(target) {
|
358 |
+
var inst = $.data(target, PROP_NAME);
|
359 |
+
return (!inst ? null : (!inst._hold ? inst._periods :
|
360 |
+
this._calculatePeriods(inst, inst._show, new Date())));
|
361 |
+
},
|
362 |
+
|
363 |
+
/* Get a setting value, defaulting if necessary.
|
364 |
+
@param inst (object) the current settings for this instance
|
365 |
+
@param name (string) the name of the required setting
|
366 |
+
@return (any) the setting's value or a default if not overridden */
|
367 |
+
_get: function(inst, name) {
|
368 |
+
return (inst.options[name] != null ?
|
369 |
+
inst.options[name] : $.countdown._defaults[name]);
|
370 |
+
},
|
371 |
+
|
372 |
+
/* A time may be specified as an exact value or a relative one.
|
373 |
+
@param setting (string or number or Date) - the date/time value
|
374 |
+
as a relative or absolute value
|
375 |
+
@param defaultTime (Date) the date/time to use if no other is supplied
|
376 |
+
@return (Date) the corresponding date/time */
|
377 |
+
_determineTime: function(setting, defaultTime) {
|
378 |
+
var offsetNumeric = function(offset) { // e.g. +300, -2
|
379 |
+
var time = new Date();
|
380 |
+
time.setTime(time.getTime() + offset * 1000);
|
381 |
+
return time;
|
382 |
+
};
|
383 |
+
var offsetString = function(offset) { // e.g. '+2d', '-4w', '+3h +30m'
|
384 |
+
offset = offset.toLowerCase();
|
385 |
+
var time = new Date();
|
386 |
+
var year = time.getFullYear();
|
387 |
+
var month = time.getMonth();
|
388 |
+
var day = time.getDate();
|
389 |
+
var hour = time.getHours();
|
390 |
+
var minute = time.getMinutes();
|
391 |
+
var second = time.getSeconds();
|
392 |
+
var pattern = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;
|
393 |
+
var matches = pattern.exec(offset);
|
394 |
+
while (matches) {
|
395 |
+
switch (matches[2] || 's') {
|
396 |
+
case 's': second += parseInt(matches[1], 10); break;
|
397 |
+
case 'm': minute += parseInt(matches[1], 10); break;
|
398 |
+
case 'h': hour += parseInt(matches[1], 10); break;
|
399 |
+
case 'd': day += parseInt(matches[1], 10); break;
|
400 |
+
case 'w': day += parseInt(matches[1], 10) * 7; break;
|
401 |
+
case 'o':
|
402 |
+
month += parseInt(matches[1], 10);
|
403 |
+
day = Math.min(day, $.countdown._getDaysInMonth(year, month));
|
404 |
+
break;
|
405 |
+
case 'y':
|
406 |
+
year += parseInt(matches[1], 10);
|
407 |
+
day = Math.min(day, $.countdown._getDaysInMonth(year, month));
|
408 |
+
break;
|
409 |
+
}
|
410 |
+
matches = pattern.exec(offset);
|
411 |
+
}
|
412 |
+
return new Date(year, month, day, hour, minute, second, 0);
|
413 |
+
};
|
414 |
+
var time = (setting == null ? defaultTime :
|
415 |
+
(typeof setting == 'string' ? offsetString(setting) :
|
416 |
+
(typeof setting == 'number' ? offsetNumeric(setting) : setting)));
|
417 |
+
if (time) time.setMilliseconds(0);
|
418 |
+
return time;
|
419 |
+
},
|
420 |
+
|
421 |
+
/* Determine the number of days in a month.
|
422 |
+
@param year (number) the year
|
423 |
+
@param month (number) the month
|
424 |
+
@return (number) the days in that month */
|
425 |
+
_getDaysInMonth: function(year, month) {
|
426 |
+
return 32 - new Date(year, month, 32).getDate();
|
427 |
+
},
|
428 |
+
|
429 |
+
/* Generate the HTML to display the countdown widget.
|
430 |
+
@param inst (object) the current settings for this instance
|
431 |
+
@return (string) the new HTML for the countdown display */
|
432 |
+
_generateHTML: function(inst) {
|
433 |
+
// Determine what to show
|
434 |
+
inst._periods = periods = (inst._hold ? inst._periods :
|
435 |
+
this._calculatePeriods(inst, inst._show, new Date()));
|
436 |
+
// Show all 'asNeeded' after first non-zero value
|
437 |
+
var shownNonZero = false;
|
438 |
+
var showCount = 0;
|
439 |
+
var show = $.extend({}, inst._show);
|
440 |
+
for (var period = 0; period < inst._show.length; period++) {
|
441 |
+
shownNonZero |= (inst._show[period] == '?' && periods[period] > 0);
|
442 |
+
show[period] = (inst._show[period] == '?' && !shownNonZero ? null : inst._show[period]);
|
443 |
+
showCount += (show[period] ? 1 : 0);
|
444 |
+
}
|
445 |
+
var compact = this._get(inst, 'compact');
|
446 |
+
var layout = this._get(inst, 'layout');
|
447 |
+
var labels = (compact ? this._get(inst, 'compactLabels') : this._get(inst, 'labels'));
|
448 |
+
var timeSeparator = this._get(inst, 'timeSeparator');
|
449 |
+
var description = this._get(inst, 'description') || '';
|
450 |
+
var showCompact = function(period) {
|
451 |
+
var labelsNum = $.countdown._get(inst, 'compactLabels' + periods[period]);
|
452 |
+
return (show[period] ? periods[period] +
|
453 |
+
(labelsNum ? labelsNum[period] : labels[period]) + ' ' : '');
|
454 |
+
};
|
455 |
+
var showFull = function(period) {
|
456 |
+
var labelsNum = $.countdown._get(inst, 'labels' + periods[period]);
|
457 |
+
return (show[period] ?
|
458 |
+
'<span class="countdown_section"><span class="countdown_amount">' +
|
459 |
+
periods[period] + '</span><br/>' +
|
460 |
+
(labelsNum ? labelsNum[period] : labels[period]) + '</span>' : '');
|
461 |
+
};
|
462 |
+
return (layout ? this._buildLayout(inst, show, layout, compact) :
|
463 |
+
((compact ? // Compact version
|
464 |
+
'<span class="countdown_row countdown_amount' +
|
465 |
+
(inst._hold ? ' countdown_holding' : '') + '">' +
|
466 |
+
showCompact(Y) + showCompact(O) + showCompact(W) + showCompact(D) +
|
467 |
+
(show[H] ? this._minDigits(periods[H], 2) : '') +
|
468 |
+
(show[M] ? (show[H] ? timeSeparator : '') +
|
469 |
+
this._minDigits(periods[M], 2) : '') +
|
470 |
+
(show[S] ? (show[H] || show[M] ? timeSeparator : '') +
|
471 |
+
this._minDigits(periods[S], 2) : '') :
|
472 |
+
// Full version
|
473 |
+
'<span class="countdown_row countdown_show' + showCount +
|
474 |
+
(inst._hold ? ' countdown_holding' : '') + '">' +
|
475 |
+
showFull(Y) + showFull(O) + showFull(W) + showFull(D) +
|
476 |
+
showFull(H) + showFull(M) + showFull(S)) + '</span>' +
|
477 |
+
(description ? '<span class="countdown_row countdown_descr">' + description + '</span>' : '')));
|
478 |
+
},
|
479 |
+
|
480 |
+
/* Construct a custom layout.
|
481 |
+
@param inst (object) the current settings for this instance
|
482 |
+
@param show (string[7]) flags indicating which periods are requested
|
483 |
+
@param layout (string) the customised layout
|
484 |
+
@param compact (boolean) true if using compact labels
|
485 |
+
@return (string) the custom HTML */
|
486 |
+
_buildLayout: function(inst, show, layout, compact) {
|
487 |
+
var labels = this._get(inst, (compact ? 'compactLabels' : 'labels'));
|
488 |
+
var labelFor = function(index) {
|
489 |
+
return ($.countdown._get(inst,
|
490 |
+
(compact ? 'compactLabels' : 'labels') + inst._periods[index]) ||
|
491 |
+
labels)[index];
|
492 |
+
};
|
493 |
+
var digit = function(value, position) {
|
494 |
+
return Math.floor(value / position) % 10;
|
495 |
+
};
|
496 |
+
var subs = {desc: this._get(inst, 'description'), sep: this._get(inst, 'timeSeparator'),
|
497 |
+
yl: labelFor(Y), yn: inst._periods[Y], ynn: this._minDigits(inst._periods[Y], 2),
|
498 |
+
ynnn: this._minDigits(inst._periods[Y], 3), y1: digit(inst._periods[Y], 1),
|
499 |
+
y10: digit(inst._periods[Y], 10), y100: digit(inst._periods[Y], 100),
|
500 |
+
y1000: digit(inst._periods[Y], 1000),
|
501 |
+
ol: labelFor(O), on: inst._periods[O], onn: this._minDigits(inst._periods[O], 2),
|
502 |
+
onnn: this._minDigits(inst._periods[O], 3), o1: digit(inst._periods[O], 1),
|
503 |
+
o10: digit(inst._periods[O], 10), o100: digit(inst._periods[O], 100),
|
504 |
+
o1000: digit(inst._periods[O], 1000),
|
505 |
+
wl: labelFor(W), wn: inst._periods[W], wnn: this._minDigits(inst._periods[W], 2),
|
506 |
+
wnnn: this._minDigits(inst._periods[W], 3), w1: digit(inst._periods[W], 1),
|
507 |
+
w10: digit(inst._periods[W], 10), w100: digit(inst._periods[W], 100),
|
508 |
+
w1000: digit(inst._periods[W], 1000),
|
509 |
+
dl: labelFor(D), dn: inst._periods[D], dnn: this._minDigits(inst._periods[D], 2),
|
510 |
+
dnnn: this._minDigits(inst._periods[D], 3), d1: digit(inst._periods[D], 1),
|
511 |
+
d10: digit(inst._periods[D], 10), d100: digit(inst._periods[D], 100),
|
512 |
+
d1000: digit(inst._periods[D], 1000),
|
513 |
+
hl: labelFor(H), hn: inst._periods[H], hnn: this._minDigits(inst._periods[H], 2),
|
514 |
+
hnnn: this._minDigits(inst._periods[H], 3), h1: digit(inst._periods[H], 1),
|
515 |
+
h10: digit(inst._periods[H], 10), h100: digit(inst._periods[H], 100),
|
516 |
+
h1000: digit(inst._periods[H], 1000),
|
517 |
+
ml: labelFor(M), mn: inst._periods[M], mnn: this._minDigits(inst._periods[M], 2),
|
518 |
+
mnnn: this._minDigits(inst._periods[M], 3), m1: digit(inst._periods[M], 1),
|
519 |
+
m10: digit(inst._periods[M], 10), m100: digit(inst._periods[M], 100),
|
520 |
+
m1000: digit(inst._periods[M], 1000),
|
521 |
+
sl: labelFor(S), sn: inst._periods[S], snn: this._minDigits(inst._periods[S], 2),
|
522 |
+
snnn: this._minDigits(inst._periods[S], 3), s1: digit(inst._periods[S], 1),
|
523 |
+
s10: digit(inst._periods[S], 10), s100: digit(inst._periods[S], 100),
|
524 |
+
s1000: digit(inst._periods[S], 1000)};
|
525 |
+
var html = layout;
|
526 |
+
// Replace period containers: {p<}...{p>}
|
527 |
+
for (var i = 0; i < 7; i++) {
|
528 |
+
var period = 'yowdhms'.charAt(i);
|
529 |
+
var re = new RegExp('\\{' + period + '<\\}(.*)\\{' + period + '>\\}', 'g');
|
530 |
+
html = html.replace(re, (show[i] ? '$1' : ''));
|
531 |
+
}
|
532 |
+
// Replace period values: {pn}
|
533 |
+
$.each(subs, function(n, v) {
|
534 |
+
var re = new RegExp('\\{' + n + '\\}', 'g');
|
535 |
+
html = html.replace(re, v);
|
536 |
+
});
|
537 |
+
return html;
|
538 |
+
},
|
539 |
+
|
540 |
+
/* Ensure a numeric value has at least n digits for display.
|
541 |
+
@param value (number) the value to display
|
542 |
+
@param len (number) the minimum length
|
543 |
+
@return (string) the display text */
|
544 |
+
_minDigits: function(value, len) {
|
545 |
+
value = '' + value;
|
546 |
+
if (value.length >= len) {
|
547 |
+
return value;
|
548 |
+
}
|
549 |
+
value = '0000000000' + value;
|
550 |
+
return value.substr(value.length - len);
|
551 |
+
},
|
552 |
+
|
553 |
+
/* Translate the format into flags for each period.
|
554 |
+
@param inst (object) the current settings for this instance
|
555 |
+
@return (string[7]) flags indicating which periods are requested (?) or
|
556 |
+
required (!) by year, month, week, day, hour, minute, second */
|
557 |
+
_determineShow: function(inst) {
|
558 |
+
var format = this._get(inst, 'format');
|
559 |
+
var show = [];
|
560 |
+
show[Y] = (format.match('y') ? '?' : (format.match('Y') ? '!' : null));
|
561 |
+
show[O] = (format.match('o') ? '?' : (format.match('O') ? '!' : null));
|
562 |
+
show[W] = (format.match('w') ? '?' : (format.match('W') ? '!' : null));
|
563 |
+
show[D] = (format.match('d') ? '?' : (format.match('D') ? '!' : null));
|
564 |
+
show[H] = (format.match('h') ? '?' : (format.match('H') ? '!' : null));
|
565 |
+
show[M] = (format.match('m') ? '?' : (format.match('M') ? '!' : null));
|
566 |
+
show[S] = (format.match('s') ? '?' : (format.match('S') ? '!' : null));
|
567 |
+
return show;
|
568 |
+
},
|
569 |
+
|
570 |
+
/* Calculate the requested periods between now and the target time.
|
571 |
+
@param inst (object) the current settings for this instance
|
572 |
+
@param show (string[7]) flags indicating which periods are requested/required
|
573 |
+
@param now (Date) the current date and time
|
574 |