Changeset 3398
- Timestamp:
- 07/29/16 17:03:51 (7 years ago)
- Location:
- plugins/countdown
- Files:
-
- 6 added
- 1 deleted
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/countdown/_define.php
r3219 r3398 24 24 $this->registerModule( 25 25 /* Name */ "CountDown", 26 /* Description*/ "CountDown widget", 27 /* Author */ "Moe (http://gniark.net/)", 28 /* Version */ '1.4', 29 /* Permissions */ 'admin' 26 /* Description*/ "Countdown and stopwatch", 27 /* Author */ "Moe (http://gniark.net/), Pierre Van Glabeke", 28 /* Version */ '1.5', 29 /* Properties */ 30 array( 31 'permissions' => 'admin', 32 'type' => 'plugin', 33 'dc_min' => '2.9', 34 'support' => 'http://lab.dotclear.org/wiki/plugin/countdown', 35 'details' => 'http://plugins.dotaddict.org/dc2/details/countdown' 36 ) 30 37 ); 31 ?> -
plugins/countdown/_prepend.php
r2073 r3398 23 23 24 24 require_once(dirname(__FILE__).'/_widget.php'); 25 26 ?> -
plugins/countdown/_widget.php
r3219 r3398 33 33 $tz = $core->blog->settings->system->blog_timezone; 34 34 35 $w->create('CountDown',__('CountDown'), 36 array('CountDownBehaviors','Show')); 35 $w->create('CountDown',__('Countdown'), 36 array('CountDownBehaviors','Show'), 37 null, 38 __('A countdown to a future date or stopwatch to a past date')); 37 39 38 40 $w->CountDown->setting('title',__('Title:'),__('CountDown'),'text'); … … 133 135 $w->CountDown->setting('content_only',__('Content only'),0,'check'); 134 136 $w->CountDown->setting('class',__('CSS class:'),''); 137 $w->CountDown->setting('offline',__('Offline'),0,'check'); 135 138 } 136 139 … … 149 152 global $core; 150 153 154 if ($w->offline) 155 return; 156 151 157 if (($w->homeonly == 1 && $core->url->type != 'default') || 152 158 ($w->homeonly == 2 && $core->url->type == 'default')) { … … 195 201 196 202 # output 197 $header = (strlen($w->title) > 0)198 ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '';199 203 $text = ($after) ? $w->text_after : $w->text_before; 200 204 if (strlen($text) > 0) {$text .= ' ';} … … 211 215 if (!$w->dynamic) 212 216 { 213 return $res = ($w->content_only ? '' : '<div class="countdown'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').$header. 214 '<p class="text">'.$text.'<span>'.$str.'</span></p>'. 215 ($w->content_only ? '' : '</div>'); 216 } 217 218 $res = ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 219 '<p>'.$text.'<span>'.$str.'</span></p>'; 220 return $w->renderDiv($w->content_only,'countdown '.$w->class,'',$res); 221 } 222 217 223 else 218 224 { … … 257 263 } 258 264 259 return $res = ($w->content_only ? '' : '<div class="countdown'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').$header.260 '<p class="text"id="countdown-'.$id.'">'.$text.$str.'</p>'.265 $res = ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 266 '<p id="countdown-'.$id.'">'.$text.$str.'</p>'. 261 267 '<script type="text/javascript">'."\n". 262 268 '//<![CDATA['."\n". … … 274 280 '});'."\n". 275 281 '//]]>'. 276 '</script>'."\n" .277 ($w->content_only ? '' : '</div>');282 '</script>'."\n"; 283 return $w->renderDiv($w->content_only,'countdown '.$w->class,'',$res); 278 284 } 279 285 } 280 286 } 281 ?> -
plugins/countdown/js/countdownBasic.html
r3194 r3398 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">1 <!DOCTYPE html> 2 2 <html> 3 3 <head> … … 8 8 #defaultCountdown { width: 240px; height: 45px; } 9 9 </style> 10 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 11 <script type="text/javascript" src="jquery.countdown.js"></script> 12 <script type="text/javascript"> 10 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 11 <script src="jquery.plugin.js"></script> 12 <script src="jquery.countdown.js"></script> 13 <script> 13 14 $(function () { 14 15 var austDay = new Date(); … … 26 27 can be used as the basis for your own experimentation.</p> 27 28 <p>For more detail see the <a href="http://keith-wood.name/countdownRef.html">documentation reference</a> page.</p> 28 <p>Counting down to 26 January <span id="year">201 0</span>.</p>29 <p>Counting down to 26 January <span id="year">2014</span>.</p> 29 30 <div id="defaultCountdown"></div> 30 31 </body> -
plugins/countdown/js/jquery.countdown-ar.js
r3194 r3398 3 3 Translated by Talal Al Asmari (talal@psdgroups.com), April 2009. */ 4 4 (function($) { 5 $.countdown.regional ['ar'] = {5 $.countdown.regionalOptions['ar'] = { 6 6 labels: ['سنوات','أشهر','أسابيع','أيام','ساعات','دقائق','ثواني'], 7 7 labels1: ['سنة','شهر','أسبوع','يوم','ساعة','دقيقة','ثانية'], … … 10 10 digits: ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'], 11 11 timeSeparator: ':', isRTL: true}; 12 $.countdown.setDefaults($.countdown.regional ['ar']);12 $.countdown.setDefaults($.countdown.regionalOptions['ar']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-bg.js
r3194 r3398 3 3 * Written by Manol Trendafilov manol@rastermania.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['bg'] = {5 $.countdown.regionalOptions['bg'] = { 6 6 labels: ['Години', 'Месеца', 'Седмица', 'Дни', 'Часа', 'Минути', 'Секунди'], 7 7 labels1: ['Година', 'Месец', 'Седмица', 'Ден', 'Час', 'Минута', 'Секунда'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['bg']);12 $.countdown.setDefaults($.countdown.regionalOptions['bg']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-bs.js
r3194 r3398 3 3 * Written by Miralem Mehic miralem@mehic.info (2011) */ 4 4 (function($) { 5 $.countdown.regional ['bs'] = {5 $.countdown.regionalOptions['bs'] = { 6 6 labels: ['Godina', 'Mjeseci', 'Sedmica', 'Dana', 'Sati', 'Minuta', 'Sekundi'], 7 7 labels1: ['Godina', 'Mjesec', 'Sedmica', 'Dan', 'Sat', 'Minuta', 'Sekunda'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['bs']);15 $.countdown.setDefaults($.countdown.regionalOptions['bs']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-ca.js
r3194 r3398 3 3 Written by Amanida Media www.amanidamedia.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['ca'] = {5 $.countdown.regionalOptions['ca'] = { 6 6 labels: ['Anys', 'Mesos', 'Setmanes', 'Dies', 'Hores', 'Minuts', 'Segons'], 7 7 labels1: ['Anys', 'Mesos', 'Setmanes', 'Dies', 'Hores', 'Minuts', 'Segons'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['ca']);12 $.countdown.setDefaults($.countdown.regionalOptions['ca']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-cs.js
r3194 r3398 3 3 * Written by Roman Chlebec (creamd@c64.sk) (2008) */ 4 4 (function($) { 5 $.countdown.regional ['cs'] = {5 $.countdown.regionalOptions['cs'] = { 6 6 labels: ['Roků', 'Měsíců', 'Týdnů', 'Dní', 'Hodin', 'Minut', 'Sekund'], 7 7 labels1: ['Rok', 'Měsíc', 'Týden', 'Den', 'Hodina', 'Minuta', 'Sekunda'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['cs']);15 $.countdown.setDefaults($.countdown.regionalOptions['cs']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-cy.js
r3194 r3398 3 3 Written by Gareth Jones | http://garethvjones.com | October 2011. */ 4 4 (function($) { 5 $.countdown.regional ['cy'] = {5 $.countdown.regionalOptions['cy'] = { 6 6 labels: ['Blynyddoedd', 'Mis', 'Wythnosau', 'Diwrnodau', 'Oriau', 'Munudau', 'Eiliadau'], 7 7 labels1: ['Blwyddyn', 'Mis', 'Wythnos', 'Diwrnod', 'Awr', 'Munud', 'Eiliad'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['cy']);12 $.countdown.setDefaults($.countdown.regionalOptions['cy']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-da.js
r3194 r3398 3 3 Written by Buch (admin@buch90.dk). */ 4 4 (function($) { 5 $.countdown.regional ['da'] = {5 $.countdown.regionalOptions['da'] = { 6 6 labels: ['År', 'Måneder', 'Uger', 'Dage', 'Timer', 'Minutter', 'Sekunder'], 7 labels1: ['År', 'Mån ad', 'Uge', 'Dag', 'Time', 'Minut', 'Sekund'],7 labels1: ['År', 'Måned', 'Uge', 'Dag', 'Time', 'Minut', 'Sekund'], 8 8 compactLabels: ['Å', 'M', 'U', 'D'], 9 9 whichLabels: null, 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['da']);12 $.countdown.setDefaults($.countdown.regionalOptions['da']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-de.js
r3194 r3398 3 3 Written by Samuel Wulf. */ 4 4 (function($) { 5 $.countdown.regional ['de'] = {5 $.countdown.regionalOptions['de'] = { 6 6 labels: ['Jahre', 'Monate', 'Wochen', 'Tage', 'Stunden', 'Minuten', 'Sekunden'], 7 7 labels1: ['Jahr', 'Monat', 'Woche', 'Tag', 'Stunde', 'Minute', 'Sekunde'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['de']);12 $.countdown.setDefaults($.countdown.regionalOptions['de']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-el.js
r3194 r3398 3 3 Written by Philip. */ 4 4 (function($) { 5 $.countdown.regional ['el'] = {5 $.countdown.regionalOptions['el'] = { 6 6 labels: ['Χρόνια', 'Μήνες', 'Εβδομάδες', 'Μέρες', 'Ώρες', 'Λεπτά', 'Δευτερόλεπτα'], 7 7 labels1: ['Χρόνος', 'Μήνας', 'Εβδομάδα', 'Ημέρα', 'Ώρα', 'Λεπτό', 'Δευτερόλεπτο'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['el']);12 $.countdown.setDefaults($.countdown.regionalOptions['el']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-es.js
r3194 r3398 3 3 * Written by Sergio Carracedo Martinez webmaster@neodisenoweb.com (2008) */ 4 4 (function($) { 5 $.countdown.regional ['es'] = {5 $.countdown.regionalOptions['es'] = { 6 6 labels: ['Años', 'Meses', 'Semanas', 'Días', 'Horas', 'Minutos', 'Segundos'], 7 7 labels1: ['Año', 'Mes', 'Semana', 'Día', 'Hora', 'Minuto', 'Segundo'], 8 compactLabels: ['a', 'm', 's', ' g'],8 compactLabels: ['a', 'm', 's', 'd'], 9 9 whichLabels: null, 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['es']);12 $.countdown.setDefaults($.countdown.regionalOptions['es']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-et.js
r3194 r3398 3 3 Written by Helmer <helmer{at}city.ee> */ 4 4 (function($) { 5 $.countdown.regional ['et'] = {5 $.countdown.regionalOptions['et'] = { 6 6 labels: ['Aastat', 'Kuud', 'Nädalat', 'Päeva', 'Tundi', 'Minutit', 'Sekundit'], 7 7 labels1: ['Aasta', 'Kuu', 'Nädal', 'Päev', 'Tund', 'Minut', 'Sekund'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['et']);12 $.countdown.setDefaults($.countdown.regionalOptions['et']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-fa.js
r3194 r3398 4 4 Digits corrected by Hamed Ramezanian Feb 2013. */ 5 5 (function($) { 6 $.countdown.regional ['fa'] = {6 $.countdown.regionalOptions['fa'] = { 7 7 labels: ['سال', 'ماه', 'هفته', 'روز', 'ساعت', 'دقیقه', 'ثانیه'], 8 8 labels1: ['سال', 'ماه', 'هفته', 'روز', 'ساعت', 'دقیقه', 'ثانیه'], … … 11 11 digits: ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'], 12 12 timeSeparator: ':', isRTL: true}; 13 $.countdown.setDefaults($.countdown.regional ['fa']);13 $.countdown.setDefaults($.countdown.regionalOptions['fa']); 14 14 })(jQuery); -
plugins/countdown/js/jquery.countdown-fi.js
r3194 r3398 3 3 Written by Kalle Vänskä and Juha Suni (juhis.suni@gmail.com). Corrected by Olli. */ 4 4 (function($) { 5 $.countdown.regional ['fi'] = {5 $.countdown.regionalOptions['fi'] = { 6 6 labels: ['vuotta', 'kuukautta', 'viikkoa', 'päivää', 'tuntia', 'minuuttia', 'sekuntia'], 7 7 labels1: ['vuosi', 'kuukausi', 'viikko', 'päivä', 'tunti', 'minuutti', 'sekunti'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['fi']);12 $.countdown.setDefaults($.countdown.regionalOptions['fi']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-fr.js
r3194 r3398 3 3 Written by Keith Wood (kbwood{at}iinet.com.au) Jan 2008. */ 4 4 (function($) { 5 $.countdown.regional ['fr'] = {5 $.countdown.regionalOptions['fr'] = { 6 6 labels: ['Années', 'Mois', 'Semaines', 'Jours', 'Heures', 'Minutes', 'Secondes'], 7 7 labels1: ['Année', 'Mois', 'Semaine', 'Jour', 'Heure', 'Minute', 'Seconde'], … … 12 12 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 13 13 timeSeparator: ':', isRTL: false}; 14 $.countdown.setDefaults($.countdown.regional ['fr']);14 $.countdown.setDefaults($.countdown.regionalOptions['fr']); 15 15 })(jQuery); -
plugins/countdown/js/jquery.countdown-gl.js
r3194 r3398 3 3 * Written by Moncho Pena ramon.pena.rodriguez@gmail.com (2009) and Angel Farrapeira */ 4 4 (function($) { 5 $.countdown.regional ['gl'] = {5 $.countdown.regionalOptions['gl'] = { 6 6 labels: ['Anos', 'Meses', 'Semanas', 'Días', 'Horas', 'Minutos', 'Segundos'], 7 7 labels1: ['Ano', 'Mes', 'Semana', 'Día', 'Hora', 'Minuto', 'Segundo'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['gl']);12 $.countdown.setDefaults($.countdown.regionalOptions['gl']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-gu.js
r3194 r3398 3 3 * Written by Sahil Jariwala jariwala.sahil@gmail.com (2012) */ 4 4 (function($) { 5 $.countdown.regional ['gu'] = {5 $.countdown.regionalOptions['gu'] = { 6 6 labels: ['વર્ષ', 'મહિનો', 'અઠવાડિયા', 'દિવસ', 'કલાક', 'મિનિટ','સેકન્ડ'], 7 7 labels1: ['વર્ષ','મહિનો','અઠવાડિયા','દિવસ','કલાક','મિનિટ', 'સેકન્ડ'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['gu']);12 $.countdown.setDefaults($.countdown.regionalOptions['gu']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-he.js
r3194 r3398 3 3 * Translated by Nir Livne, Dec 2008 */ 4 4 (function($) { 5 $.countdown.regional ['he'] = {5 $.countdown.regionalOptions['he'] = { 6 6 labels: ['שנים', 'חודשים', 'שבועות', 'ימים', 'שעות', 'דקות', 'שניות'], 7 7 labels1: ['שנה', 'חודש', 'שבוע', 'יום', 'שעה', 'דקה', 'שנייה'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: true}; 12 $.countdown.setDefaults($.countdown.regional ['he']);12 $.countdown.setDefaults($.countdown.regionalOptions['he']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-hr.js
r3194 r3398 1 /* http://keith-wood.name/countdown.html 2 * Croatian Latin initialisation for the jQuery countdown extension 3 * Written by Dejan Broz info@hqfactory.com (2011) */ 1 /** 2 * http://keith-wood.name/countdown.html 3 * Croatian l10n for the jQuery countdown plugin 4 * Written by Dejan Broz info@hqfactory.com (2011) 5 * Improved by zytzagoo (2014) 6 */ 4 7 (function($) { 5 $.countdown.regional['hr'] = { 8 $.countdown.regionalOptions['hr'] = { 9 // plurals 6 10 labels: ['Godina', 'Mjeseci', 'Tjedana', 'Dana', 'Sati', 'Minuta', 'Sekundi'], 7 labels1: ['Godina', 'Mjesec', 'Tjedan', 'Dan', 'Sat', 'Minuta', 'Sekunda'], 8 labels2: ['Godine', 'Mjeseca', 'Tjedna', 'Dana', 'Sata', 'Minute', 'Sekunde'], 11 // singles 12 labels1: ['Godina', 'Mjesec', 'Tjedan', 'Dan', 'Sat', 'Minutu', 'Sekundu'], 13 // paucals 14 labels2: ['Godine', 'Mjeseca', 'Tjedana', 'Dana', 'Sata', 'Minute', 'Sekunde'], 9 15 compactLabels: ['g', 'm', 't', 'd'], 10 whichLabels: function(amount) { 11 return (amount == 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); 16 whichLabels: function(amount){ 17 amount = parseInt(amount, 10); 18 if (amount % 10 === 1 && amount % 100 !== 11) { 19 return 1; // singles (/.*1$/ && ! /.*11$/) 20 } 21 if (amount % 10 >= 2 && amount % 10 <= 4 && (amount % 100 < 10 || amount % 100 >= 20)) { 22 return 2; // paucals (/.*[234]$/ && ! /.*1[234]$/ 23 } 24 return 0; // default plural (most common case) 12 25 }, 13 26 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 27 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['hr']);28 $.countdown.setDefaults($.countdown.regionalOptions['hr']); 16 29 })(jQuery); -
plugins/countdown/js/jquery.countdown-hu.js
r3194 r3398 3 3 * Written by Edmond L. (webmond@gmail.com). */ 4 4 (function($) { 5 $.countdown.regional ['hu'] = {5 $.countdown.regionalOptions['hu'] = { 6 6 labels: ['Év', 'Hónap', 'Hét', 'Nap', 'Óra', 'Perc', 'Másodperc'], 7 7 labels1: ['Év', 'Hónap', 'Hét', 'Nap', 'Óra', 'Perc', 'Másodperc'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['hu']);12 $.countdown.setDefaults($.countdown.regionalOptions['hu']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-hy.js
r3194 r3398 3 3 * Written by Artur Martirosyan. (artur{at}zoom.am) October 2011. */ 4 4 (function($) { 5 $.countdown.regional ['hy'] = {5 $.countdown.regionalOptions['hy'] = { 6 6 labels: ['Տարի', 'Ամիս', 'Շաբաթ', 'Օր', 'Ժամ', 'Րոպե', 'Վարկյան'], 7 7 labels1: ['Տարի', 'Ամիս', 'Շաբաթ', 'Օր', 'Ժամ', 'Րոպե', 'Վարկյան'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['hy']);12 $.countdown.setDefaults($.countdown.regionalOptions['hy']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-id.js
r3194 r3398 3 3 Written by Erwin Yonathan Jan 2009. */ 4 4 (function($) { 5 $.countdown.regional ['id'] = {5 $.countdown.regionalOptions['id'] = { 6 6 labels: ['tahun', 'bulan', 'minggu', 'hari', 'jam', 'menit', 'detik'], 7 7 labels1: ['tahun', 'bulan', 'minggu', 'hari', 'jam', 'menit', 'detik'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['id']);12 $.countdown.setDefaults($.countdown.regionalOptions['id']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-it.js
r3194 r3398 3 3 * Written by Davide Bellettini (davide.bellettini@gmail.com) and Roberto Chiaveri Feb 2008. */ 4 4 (function($) { 5 $.countdown.regional ['it'] = {5 $.countdown.regionalOptions['it'] = { 6 6 labels: ['Anni', 'Mesi', 'Settimane', 'Giorni', 'Ore', 'Minuti', 'Secondi'], 7 7 labels1: ['Anno', 'Mese', 'Settimana', 'Giorno', 'Ora', 'Minuto', 'Secondo'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['it']);12 $.countdown.setDefaults($.countdown.regionalOptions['it']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-ja.js
r3194 r3398 3 3 Written by Ken Ishimoto (ken@ksroom.com) Aug 2009. */ 4 4 (function($) { 5 $.countdown.regional ['ja'] = {5 $.countdown.regionalOptions['ja'] = { 6 6 labels: ['年', '月', '週', '日', '時', '分', '秒'], 7 7 labels1: ['年', '月', '週', '日', '時', '分', '秒'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['ja']);12 $.countdown.setDefaults($.countdown.regionalOptions['ja']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-kn.js
r3194 r3398 3 3 * Written by Guru Chaturvedi guru@gangarasa.com (2011) */ 4 4 (function($) { 5 $.countdown.regional ['kn'] = {5 $.countdown.regionalOptions['kn'] = { 6 6 labels: ['ವರ್ಷಗಳು', 'ತಿಂಗಳು', 'ವಾರಗಳು', 'ದಿನಗಳು', 'ಘಂಟೆಗಳು', 'ನಿಮಿಷಗಳು', 'ಕ್ಷಣಗಳು'], 7 7 labels1: ['ವರ್ಷ', 'ತಿಂಗಳು', 'ವಾರ', 'ದಿನ', 'ಘಂಟೆ', 'ನಿಮಿಷ', 'ಕ್ಷಣ'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['kn']);12 $.countdown.setDefaults($.countdown.regionalOptions['kn']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-ko.js
r3194 r3398 3 3 Written by Ryan Yu (ryanyu79@gmail.com). */ 4 4 (function($) { 5 $.countdown.regional ['ko'] = {5 $.countdown.regionalOptions['ko'] = { 6 6 labels: ['년', '월', '주', '일', '시', '분', '초'], 7 7 labels1: ['년', '월', '주', '일', '시', '분', '초'], … … 11 11 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 12 12 timeSeparator: ':', isRTL: false}; 13 $.countdown.setDefaults($.countdown.regional ['ko']);13 $.countdown.setDefaults($.countdown.regionalOptions['ko']); 14 14 })(jQuery); -
plugins/countdown/js/jquery.countdown-lt.js
r3194 r3398 3 3 * Written by Moacir P. de Sá Pereira (moacir{at}gmail.com) (2009) */ 4 4 (function($) { 5 $.countdown.regional ['lt'] = {5 $.countdown.regionalOptions['lt'] = { 6 6 labels: ['Metų', 'Mėnesių', 'Savaičių', 'Dienų', 'Valandų', 'Minučių', 'Sekundžių'], 7 7 labels1: ['Metai', 'Mėnuo', 'Savaitė', 'Diena', 'Valanda', 'Minutė', 'Sekundė'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['lt']);12 $.countdown.setDefaults($.countdown.regionalOptions['lt']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-lv.js
r3194 r3398 3 3 * Written by Jānis Peisenieks janis.peisenieks@gmail.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['lv'] = {5 $.countdown.regionalOptions['lv'] = { 6 6 labels: ['Gadi', 'Mēneši', 'Nedēļas', 'Dienas', 'Stundas', 'Minūtes', 'Sekundes'], 7 7 labels1: ['Gads', 'Mēnesis', 'Nedēļa', 'Diena', 'Stunda', 'Minūte', 'Sekunde'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['lv']);12 $.countdown.setDefaults($.countdown.regionalOptions['lv']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-ml.js
r3194 r3398 3 3 * Written by Harilal.B (harilal1234@gmail.com) Feb 2013. */ 4 4 (function($) { 5 $.countdown.regional ['ml'] = {5 $.countdown.regionalOptions['ml'] = { 6 6 labels: ['വര്ഷങ്ങള്', 'മാസങ്ങള്', 'ആഴ്ചകള്', 'ദിവസങ്ങള്', 'മണിക്കൂറുകള്', 'മിനിറ്റുകള്', 'സെക്കന്റുകള്'], 7 7 labels1: ['വര്ഷം', 'മാസം', 'ആഴ്ച', 'ദിവസം', 'മണിക്കൂര്', 'മിനിറ്റ്', 'സെക്കന്റ്'], … … 11 11 // digits: ['൦', '൧', '൨', '൩', '൪', '൫', '൬', '൭', '൮', '൯'], 12 12 timeSeparator: ':', isRTL: false}; 13 $.countdown.setDefaults($.countdown.regional ['ml']);13 $.countdown.setDefaults($.countdown.regionalOptions['ml']); 14 14 })(jQuery); -
plugins/countdown/js/jquery.countdown-ms.js
r3194 r3398 3 3 Written by Jason Ong (jason{at}portalgroove.com) May 2010. */ 4 4 (function($) { 5 $.countdown.regional ['ms'] = {5 $.countdown.regionalOptions['ms'] = { 6 6 labels: ['Tahun', 'Bulan', 'Minggu', 'Hari', 'Jam', 'Minit', 'Saat'], 7 7 labels1: ['Tahun', 'Bulan', 'Minggu', 'Hari', 'Jam', 'Minit', 'Saat'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['ms']);12 $.countdown.setDefaults($.countdown.regionalOptions['ms']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-my.js
r3194 r3398 3 3 Written by Win Lwin Moe (winnlwinmoe@gmail.com) Dec 2009. */ 4 4 (function($) { 5 $.countdown.regional ['my'] = {5 $.countdown.regionalOptions['my'] = { 6 6 labels: ['နွစ္', 'လ', 'ရက္သတဿတပတ္', 'ရက္', 'နာရီ', 'မိနစ္', 'စကဿကန့္'], 7 7 labels1: ['နွစ္', 'လ', 'ရက္သတဿတပတ္', 'ရက္', 'နာရီ', 'မိနစ္', 'စကဿကန့္'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['my']);12 $.countdown.setDefaults($.countdown.regionalOptions['my']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-nb.js
r3194 r3398 3 3 Written by Kristian Ravnevand */ 4 4 (function($) { 5 $.countdown.regional ['nb'] = {5 $.countdown.regionalOptions['nb'] = { 6 6 labels: ['År', 'Måneder', 'Uker', 'Dager', 'Timer', 'Minutter', 'Sekunder'], 7 7 labels1: ['År', 'Måned', 'Uke', 'Dag', 'Time', 'Minutt', 'Sekund'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['nb']);12 $.countdown.setDefaults($.countdown.regionalOptions['nb']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-nl.js
r3194 r3398 3 3 Written by Mathias Bynens <http://mathiasbynens.be/> Mar 2008. */ 4 4 (function($) { 5 $.countdown.regional ['nl'] = {5 $.countdown.regionalOptions['nl'] = { 6 6 labels: ['Jaren', 'Maanden', 'Weken', 'Dagen', 'Uren', 'Minuten', 'Seconden'], 7 7 labels1: ['Jaar', 'Maand', 'Week', 'Dag', 'Uur', 'Minuut', 'Seconde'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['nl']);12 $.countdown.setDefaults($.countdown.regionalOptions['nl']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-pl.js
r3194 r3398 3 3 * Written by Pawel Lewtak lewtak@gmail.com (2008) */ 4 4 (function($) { 5 $.countdown.regional ['pl'] = {5 $.countdown.regionalOptions['pl'] = { 6 6 labels: ['lat', 'miesięcy', 'tygodni', 'dni', 'godzin', 'minut', 'sekund'], 7 7 labels1: ['rok', 'miesiąc', 'tydzień', 'dzień', 'godzina', 'minuta', 'sekunda'], … … 15 15 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 16 16 timeSeparator: ':', isRTL: false}; 17 $.countdown.setDefaults($.countdown.regional ['pl']);17 $.countdown.setDefaults($.countdown.regionalOptions['pl']); 18 18 })(jQuery); -
plugins/countdown/js/jquery.countdown-pt-BR.js
r3194 r3398 4 4 and Juan Roldan (juan.roldan[at]relayweb.com.br) Mar 2012. */ 5 5 (function($) { 6 $.countdown.regional ['pt-BR'] = {6 $.countdown.regionalOptions['pt-BR'] = { 7 7 labels: ['Anos', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'], 8 8 labels1: ['Ano', 'Mês', 'Semana', 'Dia', 'Hora', 'Minuto', 'Segundo'], … … 11 11 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 12 12 timeSeparator: ':', isRTL: false}; 13 $.countdown.setDefaults($.countdown.regional ['pt-BR']);13 $.countdown.setDefaults($.countdown.regionalOptions['pt-BR']); 14 14 })(jQuery); -
plugins/countdown/js/jquery.countdown-ro.js
r3194 r3398 3 3 * Written by Edmond L. (webmond@gmail.com). */ 4 4 (function($) { 5 $.countdown.regional ['ro'] = {5 $.countdown.regionalOptions['ro'] = { 6 6 labels: ['Ani', 'Luni', 'Saptamani', 'Zile', 'Ore', 'Minute', 'Secunde'], 7 7 labels1: ['An', 'Luna', 'Saptamana', 'Ziua', 'Ora', 'Minutul', 'Secunda'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['ro']);12 $.countdown.setDefaults($.countdown.regionalOptions['ro']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-ru.js
r3194 r3398 3 3 * Written by Sergey K. (xslade{at}gmail.com) June 2010. */ 4 4 (function($) { 5 $.countdown.regional ['ru'] = {5 $.countdown.regionalOptions['ru'] = { 6 6 labels: ['Лет', 'Месяцев', 'Недель', 'Дней', 'Часов', 'Минут', 'Секунд'], 7 7 labels1: ['Год', 'Месяц', 'Неделя', 'День', 'Час', 'Минута', 'Секунда'], … … 16 16 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 17 17 timeSeparator: ':', isRTL: false}; 18 $.countdown.setDefaults($.countdown.regional ['ru']);18 $.countdown.setDefaults($.countdown.regionalOptions['ru']); 19 19 })(jQuery); -
plugins/countdown/js/jquery.countdown-sk.js
r3194 r3398 3 3 * Written by Roman Chlebec (creamd@c64.sk) (2008) */ 4 4 (function($) { 5 $.countdown.regional ['sk'] = {5 $.countdown.regionalOptions['sk'] = { 6 6 labels: ['Rokov', 'Mesiacov', 'Týždňov', 'Dní', 'Hodín', 'Minút', 'Sekúnd'], 7 7 labels1: ['Rok', 'Mesiac', 'Týždeň', 'Deň', 'Hodina', 'Minúta', 'Sekunda'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['sk']);15 $.countdown.setDefaults($.countdown.regionalOptions['sk']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-sl.js
r3194 r3398 3 3 * Written by Borut Tomažin (debijan{at}gmail.com) (2011) */ 4 4 (function($) { 5 $.countdown.regional ['sl'] = {5 $.countdown.regionalOptions['sl'] = { 6 6 labels: ['Let', 'Mesecev', 'Tednov', 'Dni', 'Ur', 'Minut', 'Sekund'], 7 7 labels1: ['Leto', 'Mesec', 'Teden', 'Dan', 'Ura', 'Minuta', 'Sekunda'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['sl']);12 $.countdown.setDefaults($.countdown.regionalOptions['sl']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-sq.js
r3194 r3398 3 3 Written by Erzen Komoni. */ 4 4 (function($) { 5 $.countdown.regional ['sq'] = {5 $.countdown.regionalOptions['sq'] = { 6 6 labels: ['Vite', 'Muaj', 'Javë', 'Ditë', 'Orë', 'Minuta', 'Sekonda'], 7 7 labels1: ['Vit', 'Muaj', 'Javë', 'Dit', 'Orë', 'Minutë', 'Sekond'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['sq']);12 $.countdown.setDefaults($.countdown.regionalOptions['sq']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-sr-SR.js
r3194 r3398 3 3 * Written by Predrag Leka lp@lemurcake.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['sr-SR'] = {5 $.countdown.regionalOptions['sr-SR'] = { 6 6 labels: ['Godina', 'Meseci', 'Nedelja', 'Dana', 'Časova', 'Minuta', 'Sekundi'], 7 7 labels1: ['Godina', 'Mesec', 'Nedelja', 'Dan', 'Čas', 'Minut', 'Sekunda'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['sr-SR']);15 $.countdown.setDefaults($.countdown.regionalOptions['sr-SR']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-sr.js
r3194 r3398 3 3 * Written by Predrag Leka lp@lemurcake.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['sr'] = {5 $.countdown.regionalOptions['sr'] = { 6 6 labels: ['Година', 'Месеци', 'Недеља', 'Дана', 'Часова', 'Минута', 'Секунди'], 7 7 labels1: ['Година', 'месец', 'Недеља', 'Дан', 'Час', 'Минут', 'Секунда'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['sr']);15 $.countdown.setDefaults($.countdown.regionalOptions['sr']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-sv.js
r3194 r3398 3 3 Written by Carl (carl@nordenfelt.com). */ 4 4 (function($) { 5 $.countdown.regional ['sv'] = {5 $.countdown.regionalOptions['sv'] = { 6 6 labels: ['År', 'Månader', 'Veckor', 'Dagar', 'Timmar', 'Minuter', 'Sekunder'], 7 7 labels1: ['År', 'Månad', 'Vecka', 'Dag', 'Timme', 'Minut', 'Sekund'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['sv']);12 $.countdown.setDefaults($.countdown.regionalOptions['sv']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-th.js
r3194 r3398 3 3 Written by Pornchai Sakulsrimontri (li_sin_th@yahoo.com). */ 4 4 (function($) { 5 $.countdown.regional ['th'] = {5 $.countdown.regionalOptions['th'] = { 6 6 labels: ['ปี', 'เดือน', 'สัปดาห์', 'วัน', 'ชั่วโมง', 'นาที', 'วินาที'], 7 7 labels1: ['ปี', 'เดือน', 'สัปดาห์', 'วัน', 'ชั่วโมง', 'นาที', 'วินาที'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['th']);12 $.countdown.setDefaults($.countdown.regionalOptions['th']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-tr.js
r3194 r3398 3 3 * Written by Bekir Ahmetoğlu (bekir@cerek.com) Aug 2008. */ 4 4 (function($) { 5 $.countdown.regional ['tr'] = {5 $.countdown.regionalOptions['tr'] = { 6 6 labels: ['Yıl', 'Ay', 'Hafta', 'Gün', 'Saat', 'Dakika', 'Saniye'], 7 7 labels1: ['Yıl', 'Ay', 'Hafta', 'Gün', 'Saat', 'Dakika', 'Saniye'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['tr']);12 $.countdown.setDefaults($.countdown.regionalOptions['tr']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-uk.js
r3194 r3398 3 3 * Written by Goloborodko M misha.gm@gmail.com (2009), corrections by Iгор Kоновал */ 4 4 (function($) { 5 $.countdown.regional ['uk'] = {5 $.countdown.regionalOptions['uk'] = { 6 6 labels: ['Років', 'Місяців', 'Тижнів', 'Днів', 'Годин', 'Хвилин', 'Секунд'], 7 7 labels1: ['Рік', 'Місяць', 'Тиждень', 'День', 'Година', 'Хвилина', 'Секунда'], … … 13 13 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 14 14 timeSeparator: ':', isRTL: false}; 15 $.countdown.setDefaults($.countdown.regional ['uk']);15 $.countdown.setDefaults($.countdown.regionalOptions['uk']); 16 16 })(jQuery); -
plugins/countdown/js/jquery.countdown-uz.js
r3194 r3398 3 3 * Written by Alisher U. (ulugbekov{at}gmail.com) August 2012. */ 4 4 (function($) { 5 $.countdown.regional ['uz'] = {5 $.countdown.regionalOptions['uz'] = { 6 6 labels: ['Yil', 'Oy', 'Hafta', 'Kun', 'Soat', 'Daqiqa', 'Soniya'], 7 7 labels1: ['Yil', 'Oy', 'Hafta', 'Kun', 'Soat', 'Daqiqa', 'Soniya'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['uz']);12 $.countdown.setDefaults($.countdown.regionalOptions['uz']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-vi.js
r3194 r3398 3 3 * Written by Pham Tien Hung phamtienhung@gmail.com (2010) */ 4 4 (function($) { 5 $.countdown.regional ['vi'] = {5 $.countdown.regionalOptions['vi'] = { 6 6 labels: ['Năm', 'Tháng', 'Tuần', 'Ngày', 'Giờ', 'Phút', 'Giây'], 7 7 labels1: ['Năm', 'Tháng', 'Tuần', 'Ngày', 'Giờ', 'Phút', 'Giây'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['vi']);12 $.countdown.setDefaults($.countdown.regionalOptions['vi']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-zh-CN.js
r3194 r3398 3 3 Written by Cloudream (cloudream@gmail.com). */ 4 4 (function($) { 5 $.countdown.regional ['zh-CN'] = {5 $.countdown.regionalOptions['zh-CN'] = { 6 6 labels: ['年', '月', '周', '天', '时', '分', '秒'], 7 7 labels1: ['年', '月', '周', '天', '时', '分', '秒'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['zh-CN']);12 $.countdown.setDefaults($.countdown.regionalOptions['zh-CN']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown-zh-TW.js
r3194 r3398 3 3 Written by Cloudream (cloudream@gmail.com). */ 4 4 (function($) { 5 $.countdown.regional ['zh-TW'] = {5 $.countdown.regionalOptions['zh-TW'] = { 6 6 labels: ['年', '月', '周', '天', '時', '分', '秒'], 7 7 labels1: ['年', '月', '周', '天', '時', '分', '秒'], … … 10 10 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 11 11 timeSeparator: ':', isRTL: false}; 12 $.countdown.setDefaults($.countdown.regional ['zh-TW']);12 $.countdown.setDefaults($.countdown.regionalOptions['zh-TW']); 13 13 })(jQuery); -
plugins/countdown/js/jquery.countdown.css
r3194 r3398 1 /* jQuery Countdown styles 1.6.3. */2 . hasCountdown {1 /* jQuery Countdown styles 2.0.0. */ 2 .is-countdown { 3 3 border: 1px solid #ccc; 4 4 background-color: #eee; 5 5 } 6 .countdown _rtl {6 .countdown-rtl { 7 7 direction: rtl; 8 8 } 9 .countdown _holding span {9 .countdown-holding span { 10 10 color: #888; 11 11 } 12 .countdown _row {12 .countdown-row { 13 13 clear: both; 14 14 width: 100%; … … 16 16 text-align: center; 17 17 } 18 .countdown _show1 .countdown_section {18 .countdown-show1 .countdown-section { 19 19 width: 98%; 20 20 } 21 .countdown _show2 .countdown_section {21 .countdown-show2 .countdown-section { 22 22 width: 48%; 23 23 } 24 .countdown _show3 .countdown_section {24 .countdown-show3 .countdown-section { 25 25 width: 32.5%; 26 26 } 27 .countdown _show4 .countdown_section {27 .countdown-show4 .countdown-section { 28 28 width: 24.5%; 29 29 } 30 .countdown _show5 .countdown_section {30 .countdown-show5 .countdown-section { 31 31 width: 19.5%; 32 32 } 33 .countdown _show6 .countdown_section {33 .countdown-show6 .countdown-section { 34 34 width: 16.25%; 35 35 } 36 .countdown _show7 .countdown_section {36 .countdown-show7 .countdown-section { 37 37 width: 14%; 38 38 } 39 .countdown _section {39 .countdown-section { 40 40 display: block; 41 41 float: left; … … 43 43 text-align: center; 44 44 } 45 .countdown _amount {46 45 .countdown-amount { 46 font-size: 200%; 47 47 } 48 .countdown_descr { 48 .countdown-period { 49 display: block; 50 } 51 .countdown-descr { 49 52 display: block; 50 53 width: 100%; -
plugins/countdown/js/jquery.countdown.js
r3194 r3398 1 1 /* http://keith-wood.name/countdown.html 2 Countdown for jQuery v 1.6.3.2 Countdown for jQuery v2.0.2. 3 3 Written by Keith Wood (kbwood{at}iinet.com.au) January 2008. 4 Available under the MIT (http s://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license.4 Available under the MIT (http://keith-wood.name/licence.html) license. 5 5 Please attribute the author if you use it. */ 6 6 7 /* Display a countdown timer.8 Attach it with options like:9 $('div selector').countdown(10 {until: new Date(2009, 1 - 1, 1, 0, 0, 0), onExpiry: happyNewYear}); */11 12 7 (function($) { // Hide scope, no $ conflict 13 8 14 /* Countdown manager. */ 15 function Countdown() { 16 this.regional = []; // Available regional settings, indexed by language code 17 this.regional[''] = { // Default regional settings 18 // The display texts for the counters 19 labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], 20 // The display texts for the counters if only one 21 labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], 22 compactLabels: ['y', 'm', 'w', 'd'], // The compact texts for the counters 23 whichLabels: null, // Function to determine which labels to use 24 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], // The digits to display 25 timeSeparator: ':', // Separator for time periods 26 isRTL: false // True for right-to-left languages, false for left-to-right 27 }; 28 this._defaults = { 29 until: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count down to 30 // or numeric for seconds offset, or string for unit offset(s): 31 // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds 32 since: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from 33 // or numeric for seconds offset, or string for unit offset(s): 34 // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds 35 timezone: null, // The timezone (hours or minutes from GMT) for the target times, 36 // or null for client local 37 serverSync: null, // A function to retrieve the current server time for synchronisation 38 format: 'dHMS', // Format for display - upper case for always, lower case only if non-zero, 39 // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds 40 layout: '', // Build your own layout for the countdown 41 compact: false, // True to display in a compact format, false for an expanded one 42 significant: 0, // The number of periods with values to show, zero for all 43 description: '', // The description displayed for the countdown 44 expiryUrl: '', // A URL to load upon expiry, replacing the current page 45 expiryText: '', // Text to display upon expiry, replacing the countdown 46 alwaysExpire: false, // True to trigger onExpiry even if never counted down 47 onExpiry: null, // Callback when the countdown expires - 48 // receives no parameters and 'this' is the containing division 49 onTick: null, // Callback when the countdown is updated - 50 // receives int[7] being the breakdown by period (based on format) 51 // and 'this' is the containing division 52 tickInterval: 1 // Interval (seconds) between onTick callbacks 53 }; 54 $.extend(this._defaults, this.regional['']); 55 this._serverSyncs = []; 56 var now = (typeof Date.now == 'function' ? Date.now : 57 function() { return new Date().getTime(); }); 58 var perfAvail = (window.performance && typeof window.performance.now == 'function'); 59 // Shared timer for all countdowns 60 function timerCallBack(timestamp) { 61 var drawStart = (timestamp < 1e12 ? // New HTML5 high resolution timer 62 (perfAvail ? (performance.now() + performance.timing.navigationStart) : now()) : 63 // Integer milliseconds since unix epoch 64 timestamp || now()); 65 if (drawStart - animationStartTime >= 1000) { 66 plugin._updateTargets(); 67 animationStartTime = drawStart; 68 } 69 requestAnimationFrame(timerCallBack); 70 } 71 var requestAnimationFrame = window.requestAnimationFrame || 72 window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || 73 window.oRequestAnimationFrame || window.msRequestAnimationFrame || null; 74 // This is when we expect a fall-back to setInterval as it's much more fluid 75 var animationStartTime = 0; 76 if (!requestAnimationFrame || $.noRequestAnimationFrame) { 77 $.noRequestAnimationFrame = null; 78 setInterval(function() { plugin._updateTargets(); }, 980); // Fall back to good old setInterval 79 } 80 else { 81 animationStartTime = window.animationStartTime || 82 window.webkitAnimationStartTime || window.mozAnimationStartTime || 83 window.oAnimationStartTime || window.msAnimationStartTime || now(); 84 requestAnimationFrame(timerCallBack); 85 } 86 } 87 88 var Y = 0; // Years 89 var O = 1; // Months 90 var W = 2; // Weeks 91 var D = 3; // Days 92 var H = 4; // Hours 93 var M = 5; // Minutes 94 var S = 6; // Seconds 95 96 $.extend(Countdown.prototype, { 97 /* Class name added to elements to indicate already configured with countdown. */ 98 markerClassName: 'hasCountdown', 99 /* Name of the data property for instance settings. */ 100 propertyName: 'countdown', 101 102 /* Class name for the right-to-left marker. */ 103 _rtlClass: 'countdown_rtl', 104 /* Class name for the countdown section marker. */ 105 _sectionClass: 'countdown_section', 106 /* Class name for the period amount marker. */ 107 _amountClass: 'countdown_amount', 108 /* Class name for the countdown row marker. */ 109 _rowClass: 'countdown_row', 110 /* Class name for the holding countdown marker. */ 111 _holdingClass: 'countdown_holding', 112 /* Class name for the showing countdown marker. */ 113 _showClass: 'countdown_show', 114 /* Class name for the description marker. */ 115 _descrClass: 'countdown_descr', 116 117 /* List of currently active countdown targets. */ 118 _timerTargets: [], 9 var pluginName = 'countdown'; 10 11 var Y = 0; // Years 12 var O = 1; // Months 13 var W = 2; // Weeks 14 var D = 3; // Days 15 var H = 4; // Hours 16 var M = 5; // Minutes 17 var S = 6; // Seconds 18 19 /** Create the countdown plugin. 20 <p>Sets an element to show the time remaining until a given instant.</p> 21 <p>Expects HTML like:</p> 22 <pre><div></div></pre> 23 <p>Provide inline configuration like:</p> 24 <pre><div data-countdown="name: 'value'"></div></pre> 25 @module Countdown 26 @augments JQPlugin 27 @example $(selector).countdown({until: +300}) */ 28 $.JQPlugin.createPlugin({ 119 29 120 /* Override the default settings for all instances of the countdown widget. 121 @param options (object) the new settings to use as defaults */ 122 setDefaults: function(options) { 123 this._resetExtraLabels(this._defaults, options); 124 $.extend(this._defaults, options || {}); 125 }, 126 127 /* Convert a date/time to UTC. 128 @param tz (number) the hour or minute offset from GMT, e.g. +9, -360 129 @param year (Date) the date/time in that timezone or 130 (number) the year in that timezone 131 @param month (number, optional) the month (0 - 11) (omit if year is a Date) 132 @param day (number, optional) the day (omit if year is a Date) 133 @param hours (number, optional) the hour (omit if year is a Date) 134 @param mins (number, optional) the minute (omit if year is a Date) 135 @param secs (number, optional) the second (omit if year is a Date) 136 @param ms (number, optional) the millisecond (omit if year is a Date) 137 @return (Date) the equivalent UTC date/time */ 138 UTCDate: function(tz, year, month, day, hours, mins, secs, ms) { 139 if (typeof year == 'object' && year.constructor == Date) { 140 ms = year.getMilliseconds(); 141 secs = year.getSeconds(); 142 mins = year.getMinutes(); 143 hours = year.getHours(); 144 day = year.getDate(); 145 month = year.getMonth(); 146 year = year.getFullYear(); 147 } 148 var d = new Date(); 149 d.setUTCFullYear(year); 150 d.setUTCDate(1); 151 d.setUTCMonth(month || 0); 152 d.setUTCDate(day || 1); 153 d.setUTCHours(hours || 0); 154 d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz)); 155 d.setUTCSeconds(secs || 0); 156 d.setUTCMilliseconds(ms || 0); 157 return d; 158 }, 159 160 /* Convert a set of periods into seconds. 30 /** The name of the plugin. */ 31 name: pluginName, 32 33 /** Countdown expiry callback. 34 Triggered when the countdown expires. 35 @callback expiryCallback */ 36 37 /** Countdown server synchronisation callback. 38 Triggered when the countdown is initialised. 39 @callback serverSyncCallback 40 @return {Date} The current date/time on the server as expressed in the local timezone. */ 41 42 /** Countdown tick callback. 43 Triggered on every <code>tickInterval</code> ticks of the countdown. 44 @callback tickCallback 45 @param periods {number[]} The breakdown by period (years, months, weeks, days, 46 hours, minutes, seconds) of the time remaining/passed. */ 47 48 /** Countdown which labels callback. 49 Triggered when the countdown is being display to determine which set of labels 50 (<code>labels</code>, <code>labels1</code>, ...) are to be used for the current period value. 51 @callback whichLabelsCallback 52 @param num {number} The current period value. 53 @return {number} The suffix for the label set to use. */ 54 55 /** Default settings for the plugin. 56 @property until {Date|number|string} The date/time to count down to, or number of seconds 57 offset from now, or string of amounts and units for offset(s) from now: 58 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. 59 @example until: new Date(2013, 12-1, 25, 13, 30) 60 until: +300 61 until: '+1O -2D' 62 @property [since] {Date|number|string} The date/time to count up from, or 63 number of seconds offset from now, or string for unit offset(s): 64 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. 65 @example since: new Date(2013, 1-1, 1) 66 since: -300 67 since: '-1O +2D' 68 @property [timezone=null] {number} The timezone (hours or minutes from GMT) for the target times, 69 or null for client local timezone. 70 @example timezone: +10 71 timezone: -60 72 @property [serverSync=null] {serverSyncCallback} A function to retrieve the current server time 73 for synchronisation. 74 @property [format='dHMS'] {string} The format for display - upper case for always, lower case only if non-zero, 75 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. 76 @property [layout=''] {string} Build your own layout for the countdown. 77 @example layout: '{d<}{dn} {dl}{d>} {hnn}:{mnn}:{snn}' 78 @property [compact=false] {boolean} True to display in a compact format, false for an expanded one. 79 @property [padZeroes=false] {boolean} True to add leading zeroes 80 @property [significant=0] {number} The number of periods with non-zero values to show, zero for all. 81 @property [description=''] {string} The description displayed for the countdown. 82 @property [expiryUrl=''] {string} A URL to load upon expiry, replacing the current page. 83 @property [expiryText=''] {string} Text to display upon expiry, replacing the countdown. This may be HTML. 84 @property [alwaysExpire=false] {boolean} True to trigger <code>onExpiry</code> even if target time has passed. 85 @property [onExpiry=null] {expiryCallback} Callback when the countdown expires - 86 receives no parameters and <code>this</code> is the containing division. 87 @example onExpiry: function() { 88 ... 89 } 90 @property [onTick=null] {tickCallback} Callback when the countdown is updated - 91 receives <code>number[7]</code> being the breakdown by period 92 (years, months, weeks, days, hours, minutes, seconds - based on 93 <code>format</code>) and <code>this</code> is the containing division. 94 @example onTick: function(periods) { 95 var secs = $.countdown.periodsToSeconds(periods); 96 if (secs < 300) { // Last five minutes 97 ... 98 } 99 } 100 @property [tickInterval=1] {number} The interval (seconds) between <code>onTick</code> callbacks. */ 101 defaultOptions: { 102 until: null, 103 since: null, 104 timezone: null, 105 serverSync: null, 106 format: 'dHMS', 107 layout: '', 108 compact: false, 109 padZeroes: false, 110 significant: 0, 111 description: '', 112 expiryUrl: '', 113 expiryText: '', 114 alwaysExpire: false, 115 onExpiry: null, 116 onTick: null, 117 tickInterval: 1 118 }, 119 120 /** Localisations for the plugin. 121 Entries are objects indexed by the language code ('' being the default US/English). 122 Each object has the following attributes. 123 @property [labels=['Years','Months','Weeks','Days','Hours','Minutes','Seconds']] {string[]} 124 The display texts for the counter periods. 125 @property [labels1=['Year','Month','Week','Day','Hour','Minute','Second']] {string[]} 126 The display texts for the counter periods if they have a value of 1. 127 Add other <code>labels<em>n</em></code> attributes as necessary to 128 cater for other numeric idiosyncrasies of the localisation. 129 @property [compactLabels=['y','m','w','d']] {string[]} The compact texts for the counter periods. 130 @property [whichLabels=null] {whichLabelsCallback} A function to determine which 131 <code>labels<em>n</em></code> to use. 132 @example whichLabels: function(num) { 133 return (num > 1 ? 0 : 1); 134 } 135 @property [digits=['0','1',...,'9']] {number[]} The digits to display (0-9). 136 @property [timeSeparator=':'] {string} Separator for time periods in the compact layout. 137 @property [isRTL=false] {boolean} True for right-to-left languages, false for left-to-right. */ 138 regionalOptions: { // Available regional settings, indexed by language/country code 139 '': { // Default regional settings - English/US 140 labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], 141 labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], 142 compactLabels: ['y', 'm', 'w', 'd'], 143 whichLabels: null, 144 digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 145 timeSeparator: ':', 146 isRTL: false 147 } 148 }, 149 150 /** Names of getter methods - those that can't be chained. */ 151 _getters: ['getTimes'], 152 153 /* Class name for the right-to-left marker. */ 154 _rtlClass: pluginName + '-rtl', 155 /* Class name for the countdown section marker. */ 156 _sectionClass: pluginName + '-section', 157 /* Class name for the period amount marker. */ 158 _amountClass: pluginName + '-amount', 159 /* Class name for the period name marker. */ 160 _periodClass: pluginName + '-period', 161 /* Class name for the countdown row marker. */ 162 _rowClass: pluginName + '-row', 163 /* Class name for the holding countdown marker. */ 164 _holdingClass: pluginName + '-holding', 165 /* Class name for the showing countdown marker. */ 166 _showClass: pluginName + '-show', 167 /* Class name for the description marker. */ 168 _descrClass: pluginName + '-descr', 169 170 /* List of currently active countdown elements. */ 171 _timerElems: [], 172 173 /** Additional setup for the countdown. 174 Apply default localisations. 175 Create the timer. */ 176 _init: function() { 177 var self = this; 178 this._super(); 179 this._serverSyncs = []; 180 var now = (typeof Date.now == 'function' ? Date.now : 181 function() { return new Date().getTime(); }); 182 var perfAvail = (window.performance && typeof window.performance.now == 'function'); 183 // Shared timer for all countdowns 184 function timerCallBack(timestamp) { 185 var drawStart = (timestamp < 1e12 ? // New HTML5 high resolution timer 186 (perfAvail ? (performance.now() + performance.timing.navigationStart) : now()) : 187 // Integer milliseconds since unix epoch 188 timestamp || now()); 189 if (drawStart - animationStartTime >= 1000) { 190 self._updateElems(); 191 animationStartTime = drawStart; 192 } 193 requestAnimationFrame(timerCallBack); 194 } 195 var requestAnimationFrame = window.requestAnimationFrame || 196 window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || 197 window.oRequestAnimationFrame || window.msRequestAnimationFrame || null; 198 // This is when we expect a fall-back to setInterval as it's much more fluid 199 var animationStartTime = 0; 200 if (!requestAnimationFrame || $.noRequestAnimationFrame) { 201 $.noRequestAnimationFrame = null; 202 setInterval(function() { self._updateElems(); }, 980); // Fall back to good old setInterval 203 } 204 else { 205 animationStartTime = window.animationStartTime || 206 window.webkitAnimationStartTime || window.mozAnimationStartTime || 207 window.oAnimationStartTime || window.msAnimationStartTime || now(); 208 requestAnimationFrame(timerCallBack); 209 } 210 }, 211 212 /** Convert a date/time to UTC. 213 @param tz {number} The hour or minute offset from GMT, e.g. +9, -360. 214 @param year {Date|number} the date/time in that timezone or the year in that timezone. 215 @param [month] {number} The month (0 - 11) (omit if <code>year</code> is a <code>Date</code>). 216 @param [day] {number} The day (omit if <code>year</code> is a <code>Date</code>). 217 @param [hours] {number} The hour (omit if <code>year</code> is a <code>Date</code>). 218 @param [mins] {number} The minute (omit if <code>year</code> is a <code>Date</code>). 219 @param [secs] {number} The second (omit if <code>year</code> is a <code>Date</code>). 220 @param [ms] {number} The millisecond (omit if <code>year</code> is a <code>Date</code>). 221 @return {Date} The equivalent UTC date/time. 222 @example $.countdown.UTCDate(+10, 2013, 12-1, 25, 12, 0) 223 $.countdown.UTCDate(-7, new Date(2013, 12-1, 25, 12, 0)) */ 224 UTCDate: function(tz, year, month, day, hours, mins, secs, ms) { 225 if (typeof year == 'object' && year.constructor == Date) { 226 ms = year.getMilliseconds(); 227 secs = year.getSeconds(); 228 mins = year.getMinutes(); 229 hours = year.getHours(); 230 day = year.getDate(); 231 month = year.getMonth(); 232 year = year.getFullYear(); 233 } 234 var d = new Date(); 235 d.setUTCFullYear(year); 236 d.setUTCDate(1); 237 d.setUTCMonth(month || 0); 238 d.setUTCDate(day || 1); 239 d.setUTCHours(hours || 0); 240 d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz)); 241 d.setUTCSeconds(secs || 0); 242 d.setUTCMilliseconds(ms || 0); 243 return d; 244 }, 245 246 /** Convert a set of periods into seconds. 161 247 Averaged for months and years. 162 @param periods (number[7]) the periods per year/month/week/day/hour/minute/second 163 @return (number) the corresponding number of seconds */ 164 periodsToSeconds: function(periods) { 165 return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 + 166 periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6]; 167 }, 168 169 /* Attach the countdown widget to a div. 170 @param target (element) the containing division 171 @param options (object) the initial settings for the countdown */ 172 _attachPlugin: function(target, options) { 173 target = $(target); 174 if (target.hasClass(this.markerClassName)) { 175 return; 176 } 177 var inst = {options: $.extend({}, this._defaults), _periods: [0, 0, 0, 0, 0, 0, 0]}; 178 target.addClass(this.markerClassName).data(this.propertyName, inst); 179 this._optionPlugin(target, options); 180 }, 181 182 /* Add a target to the list of active ones. 183 @param target (element) the countdown target */ 184 _addTarget: function(target) { 185 if (!this._hasTarget(target)) { 186 this._timerTargets.push(target); 187 } 188 }, 189 190 /* See if a target is in the list of active ones. 191 @param target (element) the countdown target 192 @return (boolean) true if present, false if not */ 193 _hasTarget: function(target) { 194 return ($.inArray(target, this._timerTargets) > -1); 195 }, 196 197 /* Remove a target from the list of active ones. 198 @param target (element) the countdown target */ 199 _removeTarget: function(target) { 200 this._timerTargets = $.map(this._timerTargets, 201 function(value) { return (value == target ? null : value); }); // delete entry 202 }, 203 204 /* Update each active timer target. */ 205 _updateTargets: function() { 206 for (var i = this._timerTargets.length - 1; i >= 0; i--) { 207 this._updateCountdown(this._timerTargets[i]); 208 } 209 }, 210 211 /* Reconfigure the settings for a countdown div. 212 @param target (element) the control to affect 213 @param options (object) the new options for this instance or 214 (string) an individual property name 215 @param value (any) the individual property value (omit if options 216 is an object or to retrieve the value of a setting) 217 @return (any) if retrieving a value */ 218 _optionPlugin: function(target, options, value) { 219 target = $(target); 220 var inst = target.data(this.propertyName); 221 if (!options || (typeof options == 'string' && value == null)) { // Get option 222 var name = options; 223 options = (inst || {}).options; 224 return (options && name ? options[name] : options); 225 } 226 227 if (!target.hasClass(this.markerClassName)) { 228 return; 229 } 230 options = options || {}; 231 if (typeof options == 'string') { 232 var name = options; 233 options = {}; 234 options[name] = value; 235 } 236 if (options.layout) { 237 options.layout = options.layout.replace(/</g, '<').replace(/>/g, '>'); 238 } 239 this._resetExtraLabels(inst.options, options); 240 var timezoneChanged = (inst.options.timezone != options.timezone); 241 $.extend(inst.options, options); 242 this._adjustSettings(target, inst, 243 options.until != null || options.since != null || timezoneChanged); 244 var now = new Date(); 245 if ((inst._since && inst._since < now) || (inst._until && inst._until > now)) { 246 this._addTarget(target[0]); 247 } 248 this._updateCountdown(target, inst); 249 }, 250 251 /* Redisplay the countdown with an updated display. 252 @param target (jQuery) the containing division 253 @param inst (object) the current settings for this instance */ 254 _updateCountdown: function(target, inst) { 255 var $target = $(target); 256 inst = inst || $target.data(this.propertyName); 257 if (!inst) { 258 return; 259 } 260 $target.html(this._generateHTML(inst)).toggleClass(this._rtlClass, inst.options.isRTL); 261 if ($.isFunction(inst.options.onTick)) { 262 var periods = inst._hold != 'lap' ? inst._periods : 263 this._calculatePeriods(inst, inst._show, inst.options.significant, new Date()); 264 if (inst.options.tickInterval == 1 || 265 this.periodsToSeconds(periods) % inst.options.tickInterval == 0) { 266 inst.options.onTick.apply(target, [periods]); 267 } 268 } 269 var expired = inst._hold != 'pause' && 270 (inst._since ? inst._now.getTime() < inst._since.getTime() : 271 inst._now.getTime() >= inst._until.getTime()); 272 if (expired && !inst._expiring) { 273 inst._expiring = true; 274 if (this._hasTarget(target) || inst.options.alwaysExpire) { 275 this._removeTarget(target); 276 if ($.isFunction(inst.options.onExpiry)) { 277 inst.options.onExpiry.apply(target, []); 278 } 279 if (inst.options.expiryText) { 280 var layout = inst.options.layout; 281 inst.options.layout = inst.options.expiryText; 282 this._updateCountdown(target, inst); 283 inst.options.layout = layout; 284 } 285 if (inst.options.expiryUrl) { 286 window.location = inst.options.expiryUrl; 287 } 288 } 289 inst._expiring = false; 290 } 291 else if (inst._hold == 'pause') { 292 this._removeTarget(target); 293 } 294 $target.data(this.propertyName, inst); 295 }, 296 297 /* Reset any extra labelsn and compactLabelsn entries if changing labels. 298 @param base (object) the options to be updated 299 @param options (object) the new option values */ 300 _resetExtraLabels: function(base, options) { 301 var changingLabels = false; 302 for (var n in options) { 303 if (n != 'whichLabels' && n.match(/[Ll]abels/)) { 304 changingLabels = true; 305 break; 306 } 307 } 308 if (changingLabels) { 248 @param periods {number[]} The periods per year/month/week/day/hour/minute/second. 249 @return {number} The corresponding number of seconds. 250 @example var secs = $.countdown.periodsToSeconds(periods) */ 251 periodsToSeconds: function(periods) { 252 return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 + 253 periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6]; 254 }, 255 256 /** Resynchronise the countdowns with the server. 257 @example $.countdown.resync() */ 258 resync: function() { 259 var self = this; 260 $('.' + this._getMarker()).each(function() { // Each countdown 261 var inst = $.data(this, self.name); 262 if (inst.options.serverSync) { // If synced 263 var serverSync = null; 264 for (var i = 0; i < self._serverSyncs.length; i++) { 265 if (self._serverSyncs[i][0] == inst.options.serverSync) { // Find sync details 266 serverSync = self._serverSyncs[i]; 267 break; 268 } 269 } 270 if (serverSync[2] == null) { // Recalculate if missing 271 var serverResult = ($.isFunction(inst.options.serverSync) ? 272 inst.options.serverSync.apply(this, []) : null); 273 serverSync[2] = 274 (serverResult ? new Date().getTime() - serverResult.getTime() : 0) - serverSync[1]; 275 } 276 if (inst._since) { // Apply difference 277 inst._since.setMilliseconds(inst._since.getMilliseconds() + serverSync[2]); 278 } 279 inst._until.setMilliseconds(inst._until.getMilliseconds() + serverSync[2]); 280 } 281 }); 282 for (var i = 0; i < self._serverSyncs.length; i++) { // Update sync details 283 if (self._serverSyncs[i][2] != null) { 284 self._serverSyncs[i][1] += self._serverSyncs[i][2]; 285 delete self._serverSyncs[i][2]; 286 } 287 } 288 }, 289 290 _instSettings: function(elem, options) { 291 return {_periods: [0, 0, 0, 0, 0, 0, 0]}; 292 }, 293 294 /** Add an element to the list of active ones. 295 @private 296 @param elem {Element} The countdown element. */ 297 _addElem: function(elem) { 298 if (!this._hasElem(elem)) { 299 this._timerElems.push(elem); 300 } 301 }, 302 303 /** See if an element is in the list of active ones. 304 @private 305 @param elem {Element} The countdown element. 306 @return {boolean} True if present, false if not. */ 307 _hasElem: function(elem) { 308 return ($.inArray(elem, this._timerElems) > -1); 309 }, 310 311 /** Remove an element from the list of active ones. 312 @private 313 @param elem {Element} The countdown element. */ 314 _removeElem: function(elem) { 315 this._timerElems = $.map(this._timerElems, 316 function(value) { return (value == elem ? null : value); }); // delete entry 317 }, 318 319 /** Update each active timer element. 320 @private */ 321 _updateElems: function() { 322 for (var i = this._timerElems.length - 1; i >= 0; i--) { 323 this._updateCountdown(this._timerElems[i]); 324 } 325 }, 326 327 _optionsChanged: function(elem, inst, options) { 328 if (options.layout) { 329 options.layout = options.layout.replace(/</g, '<').replace(/>/g, '>'); 330 } 331 this._resetExtraLabels(inst.options, options); 332 var timezoneChanged = (inst.options.timezone != options.timezone); 333 $.extend(inst.options, options); 334 this._adjustSettings(elem, inst, 335 options.until != null || options.since != null || timezoneChanged); 336 var now = new Date(); 337 if ((inst._since && inst._since < now) || (inst._until && inst._until > now)) { 338 this._addElem(elem[0]); 339 } 340 this._updateCountdown(elem, inst); 341 }, 342 343 /** Redisplay the countdown with an updated display. 344 @private 345 @param elem {Element|jQuery} The containing division. 346 @param inst {object} The current settings for this instance. */ 347 _updateCountdown: function(elem, inst) { 348 elem = elem.jquery ? elem : $(elem); 349 inst = inst || this._getInst(elem); 350 if (!inst) { 351 return; 352 } 353 elem.html(this._generateHTML(inst)).toggleClass(this._rtlClass, inst.options.isRTL); 354 if ($.isFunction(inst.options.onTick)) { 355 var periods = inst._hold != 'lap' ? inst._periods : 356 this._calculatePeriods(inst, inst._show, inst.options.significant, new Date()); 357 if (inst.options.tickInterval == 1 || 358 this.periodsToSeconds(periods) % inst.options.tickInterval == 0) { 359 inst.options.onTick.apply(elem[0], [periods]); 360 } 361 } 362 var expired = inst._hold != 'pause' && 363 (inst._since ? inst._now.getTime() < inst._since.getTime() : 364 inst._now.getTime() >= inst._until.getTime()); 365 if (expired && !inst._expiring) { 366 inst._expiring = true; 367 if (this._hasElem(elem[0]) || inst.options.alwaysExpire) { 368 this._removeElem(elem[0]); 369 if ($.isFunction(inst.options.onExpiry)) { 370 inst.options.onExpiry.apply(elem[0], []); 371 } 372 if (inst.options.expiryText) { 373 var layout = inst.options.layout; 374 inst.options.layout = inst.options.expiryText; 375 this._updateCountdown(elem[0], inst); 376 inst.options.layout = layout; 377 } 378 if (inst.options.expiryUrl) { 379 window.location = inst.options.expiryUrl; 380 } 381 } 382 inst._expiring = false; 383 } 384 else if (inst._hold == 'pause') { 385 this._removeElem(elem[0]); 386 } 387 }, 388 389 /** Reset any extra labelsn and compactLabelsn entries if changing labels. 390 @private 391 @param base {object} The options to be updated. 392 @param options {object} The new option values. */ 393 _resetExtraLabels: function(base, options) { 394 for (var n in options) { 395 if (n.match(/[Ll]abels[02-9]|compactLabels1/)) { 396 base[n] = options[n]; 397 } 398 } 309 399 for (var n in base) { // Remove custom numbered labels 310 if (n.match(/[Ll]abels[02-9]|compactLabels1/) ) {400 if (n.match(/[Ll]abels[02-9]|compactLabels1/) && typeof options[n] === 'undefined') { 311 401 base[n] = null; 312 402 } 313 403 } 314 } 315 }, 404 }, 316 405 317 /* Calculate interal settings for an instance. 318 @param target (element) the containing division 319 @param inst (object) the current settings for this instance 320 @param recalc (boolean) true if until or since are set */ 321 _adjustSettings: function(target, inst, recalc) { 322 var now; 323 var serverOffset = 0; 406 /** Calculate internal settings for an instance. 407 @private 408 @param elem {jQuery} The containing division. 409 @param inst {object} The current settings for this instance. 410 @param recalc {boolean} True if until or since are set. */ 411 _adjustSettings: function(elem, inst, recalc) { 324 412 var serverEntry = null; 325 413 for (var i = 0; i < this._serverSyncs.length; i++) { … … 330 418 } 331 419 if (serverEntry != null) { 332 serverOffset = (inst.options.serverSync ? serverEntry : 0);333 now = new Date();420 var serverOffset = (inst.options.serverSync ? serverEntry : 0); 421 var now = new Date(); 334 422 } 335 423 else { 336 424 var serverResult = ($.isFunction(inst.options.serverSync) ? 337 inst.options.serverSync.apply(target, []) : null);338 now = new Date();339 serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0);425 inst.options.serverSync.apply(elem[0], []) : null); 426 var now = new Date(); 427 var serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0); 340 428 this._serverSyncs.push([inst.options.serverSync, serverOffset]); 341 429 } … … 358 446 }, 359 447 360 /* Remove the countdown widget from a div. 361 @param target (element) the containing division */ 362 _destroyPlugin: function(target) { 363 target = $(target); 364 if (!target.hasClass(this.markerClassName)) { 365 return; 366 } 367 this._removeTarget(target[0]); 368 target.removeClass(this.markerClassName).empty().removeData(this.propertyName); 369 }, 370 371 /* Pause a countdown widget at the current time. 448 /** Remove the countdown widget from a div. 449 @param elem {jQuery} The containing division. 450 @param inst {object} The current instance object. */ 451 _preDestroy: function(elem, inst) { 452 this._removeElem(elem[0]); 453 elem.empty(); 454 }, 455 456 /** Pause a countdown widget at the current time. 372 457 Stop it running but remember and display the current time. 373 @param target (element) the containing division */ 374 _pausePlugin: function(target) { 375 this._hold(target, 'pause'); 376 }, 377 378 /* Pause a countdown widget at the current time. 458 @param elem {Element} The containing division. 459 @example $(selector).countdown('pause') */ 460 pause: function(elem) { 461 this._hold(elem, 'pause'); 462 }, 463 464 /** Pause a countdown widget at the current time. 379 465 Stop the display but keep the countdown running. 380 @param target (element) the containing division */ 381 _lapPlugin: function(target) { 382 this._hold(target, 'lap'); 383 }, 384 385 /* Resume a paused countdown widget. 386 @param target (element) the containing division */ 387 _resumePlugin: function(target) { 388 this._hold(target, null); 389 }, 390 391 /* Pause or resume a countdown widget. 392 @param target (element) the containing division 393 @param hold (string) the new hold setting */ 394 _hold: function(target, hold) { 395 var inst = $.data(target, this.propertyName); 466 @param elem {Element} The containing division. 467 @example $(selector).countdown('lap') */ 468 lap: function(elem) { 469 this._hold(elem, 'lap'); 470 }, 471 472 /** Resume a paused countdown widget. 473 @param elem {Element} The containing division. 474 @example $(selector).countdown('resume') */ 475 resume: function(elem) { 476 this._hold(elem, null); 477 }, 478 479 /** Toggle a paused countdown widget. 480 @param elem {Element} The containing division. 481 @example $(selector).countdown('toggle') */ 482 toggle: function(elem) { 483 var inst = $.data(elem, this.name) || {}; 484 this[!inst._hold ? 'pause' : 'resume'](elem); 485 }, 486 487 /** Toggle a lapped countdown widget. 488 @param elem {Element} The containing division. 489 @example $(selector).countdown('toggleLap') */ 490 toggleLap: function(elem) { 491 var inst = $.data(elem, this.name) || {}; 492 this[!inst._hold ? 'lap' : 'resume'](elem); 493 }, 494 495 /** Pause or resume a countdown widget. 496 @private 497 @param elem {Element} The containing division. 498 @param hold {string} The new hold setting. */ 499 _hold: function(elem, hold) { 500 var inst = $.data(elem, this.name); 396 501 if (inst) { 397 502 if (inst._hold == 'pause' && !hold) { … … 403 508 sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' + 404 509 sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's'); 405 this._addTarget(target);510 this._addElem(elem); 406 511 } 407 512 inst._hold = hold; 408 513 inst._savePeriods = (hold == 'pause' ? inst._periods : null); 409 $.data(target, this.propertyName, inst); 410 this._updateCountdown(target, inst); 411 } 412 }, 413 414 /* Return the current time periods. 415 @param target (element) the containing division 416 @return (number[7]) the current periods for the countdown */ 417 _getTimesPlugin: function(target) { 418 var inst = $.data(target, this.propertyName); 514 $.data(elem, this.name, inst); 515 this._updateCountdown(elem, inst); 516 } 517 }, 518 519 /** Return the current time periods. 520 @param elem {Element} The containing division. 521 @return {number[]} The current periods for the countdown. 522 @example var periods = $(selector).countdown('getTimes') */ 523 getTimes: function(elem) { 524 var inst = $.data(elem, this.name); 419 525 return (!inst ? null : (inst._hold == 'pause' ? inst._savePeriods : (!inst._hold ? inst._periods : 420 526 this._calculatePeriods(inst, inst._show, inst.options.significant, new Date())))); 421 527 }, 422 528 423 /* A time may be specified as an exact value or a relative one.424 @param setting (string or number or Date) - the date/time value425 as a relative or absolute value426 @param defaultTime (Date) the date/time to use if no other is supplied427 @return (Date) the corresponding date/time*/529 /** A time may be specified as an exact value or a relative one. 530 @private 531 @param setting {string|number|Date} The date/time value as a relative or absolute value. 532 @param defaultTime {Date} The date/time to use if no other is supplied. 533 @return {Date} The corresponding date/time. */ 428 534 _determineTime: function(setting, defaultTime) { 535 var self = this; 429 536 var offsetNumeric = function(offset) { // e.g. +300, -2 430 537 var time = new Date(); … … 452 559 case 'o': 453 560 month += parseInt(matches[1], 10); 454 day = Math.min(day, plugin._getDaysInMonth(year, month));561 day = Math.min(day, self._getDaysInMonth(year, month)); 455 562 break; 456 563 case 'y': 457 564 year += parseInt(matches[1], 10); 458 day = Math.min(day, plugin._getDaysInMonth(year, month));565 day = Math.min(day, self._getDaysInMonth(year, month)); 459 566 break; 460 567 } … … 470 577 }, 471 578 472 /* Determine the number of days in a month. 473 @param year (number) the year 474 @param month (number) the month 475 @return (number) the days in that month */ 579 /** Determine the number of days in a month. 580 @private 581 @param year {number} The year. 582 @param month {number} The month. 583 @return {number} The days in that month. */ 476 584 _getDaysInMonth: function(year, month) { 477 585 return 32 - new Date(year, month, 32).getDate(); 478 586 }, 479 587 480 /* Determine which set of labels should be used for an amount. 481 @param num (number) the amount to be displayed 482 @return (number) the set of labels to be used for this amount */ 588 /** Default implementation to determine which set of labels should be used for an amount. 589 Use the <code>labels</code> attribute with the same numeric suffix (if it exists). 590 @private 591 @param num {number} The amount to be displayed. 592 @return {number} The set of labels to be used for this amount. */ 483 593 _normalLabels: function(num) { 484 594 return num; 485 595 }, 486 596 487 /* Generate the HTML to display the countdown widget. 488 @param inst (object) the current settings for this instance 489 @return (string) the new HTML for the countdown display */ 597 /** Generate the HTML to display the countdown widget. 598 @private 599 @param inst {object} The current settings for this instance. 600 @return {string} The new HTML for the countdown display. */ 490 601 _generateHTML: function(inst) { 491 602 var self = this; … … 523 634 (labelsNum ? labelsNum[period] : labels[period]) + ' ' : ''); 524 635 }; 636 var minDigits = (inst.options.padZeroes ? 2 : 1); 525 637 var showFull = function(period) { 526 638 var labelsNum = inst.options['labels' + whichLabels(inst._periods[period])]; 527 639 return ((!inst.options.significant && show[period]) || 528 640 (inst.options.significant && showSignificant[period]) ? 529 '<span class="' + plugin._sectionClass + '">' + 530 '<span class="' + plugin._amountClass + '">' + 531 self._translateDigits(inst, inst._periods[period]) + '</span><br/>' + 532 (labelsNum ? labelsNum[period] : labels[period]) + '</span>' : ''); 641 '<span class="' + self._sectionClass + '">' + 642 '<span class="' + self._amountClass + '">' + 643 self._minDigits(inst, inst._periods[period], minDigits) + '</span>' + 644 '<span class="' + self._periodClass + '">' + 645 (labelsNum ? labelsNum[period] : labels[period]) + '</span></span>' : ''); 533 646 }; 534 647 return (inst.options.layout ? this._buildLayout(inst, show, inst.options.layout, … … 552 665 }, 553 666 554 /* Construct a custom layout. 555 @param inst (object) the current settings for this instance 556 @param show (string[7]) flags indicating which periods are requested 557 @param layout (string) the customised layout 558 @param compact (boolean) true if using compact labels 559 @param significant (number) the number of periods with values to show, zero for all 560 @param showSignificant (boolean[7]) other periods to show for significance 561 @return (string) the custom HTML */ 667 /** Construct a custom layout. 668 @private 669 @param inst {object} The current settings for this instance. 670 @param show {boolean[]} Flags indicating which periods are requested. 671 @param layout {string} The customised layout. 672 @param compact {boolean} True if using compact labels. 673 @param significant {number} The number of periods with values to show, zero for all. 674 @param showSignificant {boolean[]} Other periods to show for significance. 675 @return {string} The custom HTML. */ 562 676 _buildLayout: function(inst, show, layout, compact, significant, showSignificant) { 563 677 var labels = inst.options[compact ? 'compactLabels' : 'labels']; … … 622 736 }, 623 737 624 /* Ensure a numeric value has at least n digits for display. 625 @param inst (object) the current settings for this instance 626 @param value (number) the value to display 627 @param len (number) the minimum length 628 @return (string) the display text */ 738 /** Ensure a numeric value has at least n digits for display. 739 @private 740 @param inst {object} The current settings for this instance. 741 @param value {number} The value to display. 742 @param len {number} The minimum length. 743 @return {string} The display text. */ 629 744 _minDigits: function(inst, value, len) { 630 745 value = '' + value; … … 636 751 }, 637 752 638 /* Translate digits into other representations. 639 @param inst (object) the current settings for this instance 640 @param value (string) the text to translate 641 @return (string) the translated text */ 753 /** Translate digits into other representations. 754 @private 755 @param inst {object} The current settings for this instance. 756 @param value {string} The text to translate. 757 @return {string} The translated text. */ 642 758 _translateDigits: function(inst, value) { 643 759 return ('' + value).replace(/[0-9]/g, function(digit) { … … 646 762 }, 647 763 648 /* Translate the format into flags for each period. 649 @param inst (object) the current settings for this instance 650 @return (string[7]) flags indicating which periods are requested (?) or 651 required (!) by year, month, week, day, hour, minute, second */ 764 /** Translate the format into flags for each period. 765 @private 766 @param inst {object} The current settings for this instance. 767 @return {string[]} Flags indicating which periods are requested (?) or 768 required (!) by year, month, week, day, hour, minute, second. */ 652 769 _determineShow: function(inst) { 653 770 var format = inst.options.format; … … 663 780 }, 664 781 665 /* Calculate the requested periods between now and the target time. 666 @param inst (object) the current settings for this instance 667 @param show (string[7]) flags indicating which periods are requested/required 668 @param significant (number) the number of periods with values to show, zero for all 669 @param now (Date) the current date and time 670 @return (number[7]) the current time periods (always positive) 671 by year, month, week, day, hour, minute, second */ 782 /** Calculate the requested periods between now and the target time. 783 @private 784 @param inst {object} The current settings for this instance. 785 @param show {string[]} Flags indicating which periods are requested/required. 786 @param significant {number} The number of periods with values to show, zero for all. 787 @param now {Date} The current date and time. 788 @return {number[]} The current time periods (always positive) 789 by year, month, week, day, hour, minute, second. */ 672 790 _calculatePeriods: function(inst, show, significant, now) { 673 791 // Find endpoints … … 693 811 if (show[Y] || show[O]) { 694 812 // Treat end of months as the same 695 var lastNow = plugin._getDaysInMonth(now.getFullYear(), now.getMonth());696 var lastUntil = plugin._getDaysInMonth(until.getFullYear(), until.getMonth());813 var lastNow = this._getDaysInMonth(now.getFullYear(), now.getMonth()); 814 var lastUntil = this._getDaysInMonth(until.getFullYear(), until.getMonth()); 697 815 var sameDay = (until.getDate() == now.getDate() || 698 816 (until.getDate() >= Math.min(lastNow, lastUntil) && … … 710 828 now = new Date(now.getTime()); 711 829 var wasLastDay = (now.getDate() == lastNow); 712 var lastDay = plugin._getDaysInMonth(now.getFullYear() + periods[Y],830 var lastDay = this._getDaysInMonth(now.getFullYear() + periods[Y], 713 831 now.getMonth() + periods[O]); 714 832 if (now.getDate() > lastDay) { … … 763 881 return periods; 764 882 } 765 });766 767 // The list of commands that return values and don't permit chaining768 var getters = ['getTimes'];769 770 /* Determine whether a command is a getter and doesn't permit chaining.771 @param command (string, optional) the command to run772 @param otherArgs ([], optional) any other arguments for the command773 @return true if the command is a getter, false if not */774 function isNotChained(command, otherArgs) {775 if (command == 'option' && (otherArgs.length == 0 ||776 (otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {777 return true;778 }779 return $.inArray(command, getters) > -1;780 }781 782 /* Process the countdown functionality for a jQuery selection.783 @param options (object) the new settings to use for these instances (optional) or784 (string) the command to run (optional)785 @return (jQuery) for chaining further calls or786 (any) getter value */787 $.fn.countdown = function(options) {788 var otherArgs = Array.prototype.slice.call(arguments, 1);789 if (isNotChained(options, otherArgs)) {790 return plugin['_' + options + 'Plugin'].791 apply(plugin, [this[0]].concat(otherArgs));792 }793 return this.each(function() {794 if (typeof options == 'string') {795 if (!plugin['_' + options + 'Plugin']) {796 throw 'Unknown command: ' + options;797 }798 plugin['_' + options + 'Plugin'].799 apply(plugin, [this].concat(otherArgs));800 }801 else {802 plugin._attachPlugin(this, options || {});803 }804 883 }); 805 };806 807 /* Initialise the countdown functionality. */808 var plugin = $.countdown = new Countdown(); // Singleton instance809 884 810 885 })(jQuery); -
plugins/countdown/js/jquery.countdown.min.js
r3194 r3398 1 1 /* http://keith-wood.name/countdown.html 2 Countdown for jQuery v 1.6.3.2 Countdown for jQuery v2.0.2. 3 3 Written by Keith Wood (kbwood{at}iinet.com.au) January 2008. 4 Available under the MIT (http s://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license.4 Available under the MIT (http://keith-wood.name/licence.html) license. 5 5 Please attribute the author if you use it. */ 6 (function($){ function Countdown(){this.regional=[];this.regional['']={labels:['Years','Months','Weeks','Days','Hours','Minutes','Seconds'],labels1:['Year','Month','Week','Day','Hour','Minute','Second'],compactLabels:['y','m','w','d'],whichLabels:null,digits:['0','1','2','3','4','5','6','7','8','9'],timeSeparator:':',isRTL:false};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:'dHMS',layout:'',compact:false,significant:0,description:'',expiryUrl:'',expiryText:'',alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1};$.extend(this._defaults,this.regional['']);this._serverSyncs=[];var c=(typeof Date.now=='function'?Date.now:function(){return new Date().getTime()});var d=(window.performance&&typeof window.performance.now=='function');function timerCallBack(a){var b=(a<1e12?(d?(performance.now()+performance.timing.navigationStart):c()):a||c());if(b-f>=1000){x._updateTargets();f=b}e(timerCallBack)}var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var f=0;if(!e||$.noRequestAnimationFrame){$.noRequestAnimationFrame=null;setInterval(function(){x._updateTargets()},980)}else{f=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||c();e(timerCallBack)}}var Y=0;var O=1;var W=2;var D=3;var H=4;var M=5;var S=6;$.extend(Countdown.prototype,{markerClassName:'hasCountdown',propertyName:'countdown',_rtlClass:'countdown_rtl',_sectionClass:'countdown_section',_amountClass:'countdown_amount',_rowClass:'countdown_row',_holdingClass:'countdown_holding',_showClass:'countdown_show',_descrClass:'countdown_descr',_timerTargets:[],setDefaults:function(a){this._resetExtraLabels(this._defaults,a);$.extend(this._defaults,a||{})},UTCDate:function(a,b,c,e,f,g,h,i){if(typeof b=='object'&&b.constructor==Date){i=b.getMilliseconds();h=b.getSeconds();g=b.getMinutes();f=b.getHours();e=b.getDate();c=b.getMonth();b=b.getFullYear()}var d=new Date();d.setUTCFullYear(b);d.setUTCDate(1);d.setUTCMonth(c||0);d.setUTCDate(e||1);d.setUTCHours(f||0);d.setUTCMinutes((g||0)-(Math.abs(a)<30?a*60:a));d.setUTCSeconds(h||0);d.setUTCMilliseconds(i||0);return d},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},_attachPlugin:function(a,b){a=$(a);if(a.hasClass(this.markerClassName)){return}var c={options:$.extend({},this._defaults),_periods:[0,0,0,0,0,0,0]};a.addClass(this.markerClassName).data(this.propertyName,c);this._optionPlugin(a,b)},_addTarget:function(a){if(!this._hasTarget(a)){this._timerTargets.push(a)}},_hasTarget:function(a){return($.inArray(a,this._timerTargets)>-1)},_removeTarget:function(b){this._timerTargets=$.map(this._timerTargets,function(a){return(a==b?null:a)})},_updateTargets:function(){for(var i=this._timerTargets.length-1;i>=0;i--){this._updateCountdown(this._timerTargets[i])}},_optionPlugin:function(a,b,c){a=$(a);var d=a.data(this.propertyName);if(!b||(typeof b=='string'&&c==null)){var e=b;b=(d||{}).options;return(b&&e?b[e]:b)}if(!a.hasClass(this.markerClassName)){return}b=b||{};if(typeof b=='string'){var e=b;b={};b[e]=c}if(b.layout){b.layout=b.layout.replace(/</g,'<').replace(/>/g,'>')}this._resetExtraLabels(d.options,b);var f=(d.options.timezone!=b.timezone);$.extend(d.options,b);this._adjustSettings(a,d,b.until!=null||b.since!=null||f);var g=new Date();if((d._since&&d._since<g)||(d._until&&d._until>g)){this._addTarget(a[0])}this._updateCountdown(a,d)},_updateCountdown:function(a,b){var c=$(a);b=b||c.data(this.propertyName);if(!b){return}c.html(this._generateHTML(b)).toggleClass(this._rtlClass,b.options.isRTL);if($.isFunction(b.options.onTick)){var d=b._hold!='lap'?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date());if(b.options.tickInterval==1||this.periodsToSeconds(d)%b.options.tickInterval==0){b.options.onTick.apply(a,[d])}}var e=b._hold!='pause'&&(b._since?b._now.getTime()<b._since.getTime():b._now.getTime()>=b._until.getTime());if(e&&!b._expiring){b._expiring=true;if(this._hasTarget(a)||b.options.alwaysExpire){this._removeTarget(a);if($.isFunction(b.options.onExpiry)){b.options.onExpiry.apply(a,[])}if(b.options.expiryText){var f=b.options.layout;b.options.layout=b.options.expiryText;this._updateCountdown(a,b);b.options.layout=f}if(b.options.expiryUrl){window.location=b.options.expiryUrl}}b._expiring=false}else if(b._hold=='pause'){this._removeTarget(a)}c.data(this.propertyName,b)},_resetExtraLabels:function(a,b){var c=false;for(var n in b){if(n!='whichLabels'&&n.match(/[Ll]abels/)){c=true;break}}if(c){for(var n in a){if(n.match(/[Ll]abels[02-9]|compactLabels1/)){a[n]=null}}}},_adjustSettings:function(a,b,c){var d;var e=0;var f=null;for(var i=0;i<this._serverSyncs.length;i++){if(this._serverSyncs[i][0]==b.options.serverSync){f=this._serverSyncs[i][1];break}}if(f!=null){e=(b.options.serverSync?f:0);d=new Date()}else{var g=($.isFunction(b.options.serverSync)?b.options.serverSync.apply(a,[]):null);d=new Date();e=(g?d.getTime()-g.getTime():0);this._serverSyncs.push([b.options.serverSync,e])}var h=b.options.timezone;h=(h==null?-d.getTimezoneOffset():h);if(c||(!c&&b._until==null&&b._since==null)){b._since=b.options.since;if(b._since!=null){b._since=this.UTCDate(h,this._determineTime(b._since,null));if(b._since&&e){b._since.setMilliseconds(b._since.getMilliseconds()+e)}}b._until=this.UTCDate(h,this._determineTime(b.options.until,d));if(e){b._until.setMilliseconds(b._until.getMilliseconds()+e)}}b._show=this._determineShow(b)},_destroyPlugin:function(a){a=$(a);if(!a.hasClass(this.markerClassName)){return}this._removeTarget(a[0]);a.removeClass(this.markerClassName).empty().removeData(this.propertyName)},_pausePlugin:function(a){this._hold(a,'pause')},_lapPlugin:function(a){this._hold(a,'lap')},_resumePlugin:function(a){this._hold(a,null)},_hold:function(a,b){var c=$.data(a,this.propertyName);if(c){if(c._hold=='pause'&&!b){c._periods=c._savePeriods;var d=(c._since?'-':'+');c[c._since?'_since':'_until']=this._determineTime(d+c._periods[0]+'y'+d+c._periods[1]+'o'+d+c._periods[2]+'w'+d+c._periods[3]+'d'+d+c._periods[4]+'h'+d+c._periods[5]+'m'+d+c._periods[6]+'s');this._addTarget(a)}c._hold=b;c._savePeriods=(b=='pause'?c._periods:null);$.data(a,this.propertyName,c);this._updateCountdown(a,c)}},_getTimesPlugin:function(a){var b=$.data(a,this.propertyName);return(!b?null:(b._hold=='pause'?b._savePeriods:(!b._hold?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date()))))},_determineTime:function(k,l){var m=function(a){var b=new Date();b.setTime(b.getTime()+a*1000);return b};var n=function(a){a=a.toLowerCase();var b=new Date();var c=b.getFullYear();var d=b.getMonth();var e=b.getDate();var f=b.getHours();var g=b.getMinutes();var h=b.getSeconds();var i=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var j=i.exec(a);while(j){switch(j[2]||'s'){case's':h+=parseInt(j[1],10);break;case'm':g+=parseInt(j[1],10);break;case'h':f+=parseInt(j[1],10);break;case'd':e+=parseInt(j[1],10);break;case'w':e+=parseInt(j[1],10)*7;break;case'o':d+=parseInt(j[1],10);e=Math.min(e,x._getDaysInMonth(c,d));break;case'y':c+=parseInt(j[1],10);e=Math.min(e,x._getDaysInMonth(c,d));break}j=i.exec(a)}return new Date(c,d,e,f,g,h,0)};var o=(k==null?l:(typeof k=='string'?n(k):(typeof k=='number'?m(k):k)));if(o)o.setMilliseconds(0);return o},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(c){var d=this;c._periods=(c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date()));var e=false;var f=0;var g=c.options.significant;var h=$.extend({},c._show);for(var i=Y;i<=S;i++){e|=(c._show[i]=='?'&&c._periods[i]>0);h[i]=(c._show[i]=='?'&&!e?null:c._show[i]);f+=(h[i]?1:0);g-=(c._periods[i]>0?1:0)}var j=[false,false,false,false,false,false,false];for(var i=S;i>=Y;i--){if(c._show[i]){if(c._periods[i]){j[i]=true}else{j[i]=g>0;g--}}}var k=(c.options.compact?c.options.compactLabels:c.options.labels);var l=c.options.whichLabels||this._normalLabels;var m=function(a){var b=c.options['compactLabels'+l(c._periods[a])];return(h[a]?d._translateDigits(c,c._periods[a])+(b?b[a]:k[a])+' ':'')};var n=function(a){var b=c.options['labels'+l(c._periods[a])];return((!c.options.significant&&h[a])||(c.options.significant&&j[a])?'<span class="'+x._sectionClass+'">'+'<span class="'+x._amountClass+'">'+d._translateDigits(c,c._periods[a])+'</span><br/>'+(b?b[a]:k[a])+'</span>':'')};return(c.options.layout?this._buildLayout(c,h,c.options.layout,c.options.compact,c.options.significant,j):((c.options.compact?'<span class="'+this._rowClass+' '+this._amountClass+(c._hold?' '+this._holdingClass:'')+'">'+m(Y)+m(O)+m(W)+m(D)+(h[H]?this._minDigits(c,c._periods[H],2):'')+(h[M]?(h[H]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[M],2):'')+(h[S]?(h[H]||h[M]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[S],2):''):'<span class="'+this._rowClass+' '+this._showClass+(c.options.significant||f)+(c._hold?' '+this._holdingClass:'')+'">'+n(Y)+n(O)+n(W)+n(D)+n(H)+n(M)+n(S))+'</span>'+(c.options.description?'<span class="'+this._rowClass+' '+this._descrClass+'">'+c.options.description+'</span>':'')))},_buildLayout:function(c,d,e,f,g,h){var j=c.options[f?'compactLabels':'labels'];var k=c.options.whichLabels||this._normalLabels;var l=function(a){return(c.options[(f?'compactLabels':'labels')+k(c._periods[a])]||j)[a]};var m=function(a,b){return c.options.digits[Math.floor(a/b)%10]};var o={desc:c.options.description,sep:c.options.timeSeparator,yl:l(Y),yn:this._minDigits(c,c._periods[Y],1),ynn:this._minDigits(c,c._periods[Y],2),ynnn:this._minDigits(c,c._periods[Y],3),y1:m(c._periods[Y],1),y10:m(c._periods[Y],10),y100:m(c._periods[Y],100),y1000:m(c._periods[Y],1000),ol:l(O),on:this._minDigits(c,c._periods[O],1),onn:this._minDigits(c,c._periods[O],2),onnn:this._minDigits(c,c._periods[O],3),o1:m(c._periods[O],1),o10:m(c._periods[O],10),o100:m(c._periods[O],100),o1000:m(c._periods[O],1000),wl:l(W),wn:this._minDigits(c,c._periods[W],1),wnn:this._minDigits(c,c._periods[W],2),wnnn:this._minDigits(c,c._periods[W],3),w1:m(c._periods[W],1),w10:m(c._periods[W],10),w100:m(c._periods[W],100),w1000:m(c._periods[W],1000),dl:l(D),dn:this._minDigits(c,c._periods[D],1),dnn:this._minDigits(c,c._periods[D],2),dnnn:this._minDigits(c,c._periods[D],3),d1:m(c._periods[D],1),d10:m(c._periods[D],10),d100:m(c._periods[D],100),d1000:m(c._periods[D],1000),hl:l(H),hn:this._minDigits(c,c._periods[H],1),hnn:this._minDigits(c,c._periods[H],2),hnnn:this._minDigits(c,c._periods[H],3),h1:m(c._periods[H],1),h10:m(c._periods[H],10),h100:m(c._periods[H],100),h1000:m(c._periods[H],1000),ml:l(M),mn:this._minDigits(c,c._periods[M],1),mnn:this._minDigits(c,c._periods[M],2),mnnn:this._minDigits(c,c._periods[M],3),m1:m(c._periods[M],1),m10:m(c._periods[M],10),m100:m(c._periods[M],100),m1000:m(c._periods[M],1000),sl:l(S),sn:this._minDigits(c,c._periods[S],1),snn:this._minDigits(c,c._periods[S],2),snnn:this._minDigits(c,c._periods[S],3),s1:m(c._periods[S],1),s10:m(c._periods[S],10),s100:m(c._periods[S],100),s1000:m(c._periods[S],1000)};var p=e;for(var i=Y;i<=S;i++){var q='yowdhms'.charAt(i);var r=new RegExp('\\{'+q+'<\\}([\\s\\S]*)\\{'+q+'>\\}','g');p=p.replace(r,((!g&&d[i])||(g&&h[i])?'$1':''))}$.each(o,function(n,v){var a=new RegExp('\\{'+n+'\\}','g');p=p.replace(a,v)});return p},_minDigits:function(a,b,c){b=''+b;if(b.length>=c){return this._translateDigits(a,b)}b='0000000000'+b;return this._translateDigits(a,b.substr(b.length-c))},_translateDigits:function(b,c){return(''+c).replace(/[0-9]/g,function(a){return b.options.digits[a]})},_determineShow:function(a){var b=a.options.format;var c=[];c[Y]=(b.match('y')?'?':(b.match('Y')?'!':null));c[O]=(b.match('o')?'?':(b.match('O')?'!':null));c[W]=(b.match('w')?'?':(b.match('W')?'!':null));c[D]=(b.match('d')?'?':(b.match('D')?'!':null));c[H]=(b.match('h')?'?':(b.match('H')?'!':null));c[M]=(b.match('m')?'?':(b.match('M')?'!':null));c[S]=(b.match('s')?'?':(b.match('S')?'!':null));return c},_calculatePeriods:function(c,d,e,f){c._now=f;c._now.setMilliseconds(0);var g=new Date(c._now.getTime());if(c._since){if(f.getTime()<c._since.getTime()){c._now=f=g}else{f=c._since}}else{g.setTime(c._until.getTime());if(f.getTime()>c._until.getTime()){c._now=f=g}}var h=[0,0,0,0,0,0,0];if(d[Y]||d[O]){var i=x._getDaysInMonth(f.getFullYear(),f.getMonth());var j=x._getDaysInMonth(g.getFullYear(),g.getMonth());var k=(g.getDate()==f.getDate()||(g.getDate()>=Math.min(i,j)&&f.getDate()>=Math.min(i,j)));var l=function(a){return(a.getHours()*60+a.getMinutes())*60+a.getSeconds()};var m=Math.max(0,(g.getFullYear()-f.getFullYear())*12+g.getMonth()-f.getMonth()+((g.getDate()<f.getDate()&&!k)||(k&&l(g)<l(f))?-1:0));h[Y]=(d[Y]?Math.floor(m/12):0);h[O]=(d[O]?m-h[Y]*12:0);f=new Date(f.getTime());var n=(f.getDate()==i);var o=x._getDaysInMonth(f.getFullYear()+h[Y],f.getMonth()+h[O]);if(f.getDate()>o){f.setDate(o)}f.setFullYear(f.getFullYear()+h[Y]);f.setMonth(f.getMonth()+h[O]);if(n){f.setDate(o)}}var p=Math.floor((g.getTime()-f.getTime())/1000);var q=function(a,b){h[a]=(d[a]?Math.floor(p/b):0);p-=h[a]*b};q(W,604800);q(D,86400);q(H,3600);q(M,60);q(S,1);if(p>0&&!c._since){var r=[1,12,4.3482,7,24,60,60];var s=S;var t=1;for(var u=S;u>=Y;u--){if(d[u]){if(h[s]>=t){h[s]=0;p=1}if(p>0){h[u]++;p=0;s=u;t=1}}t*=r[u]}}if(e){for(var u=Y;u<=S;u++){if(e&&h[u]){e--}else if(!e){h[u]=0}}}return h}});var w=['getTimes'];function isNotChained(a,b){if(a=='option'&&(b.length==0||(b.length==1&&typeof b[0]=='string'))){return true}return $.inArray(a,w)>-1}$.fn.countdown=function(a){var b=Array.prototype.slice.call(arguments,1);if(isNotChained(a,b)){return x['_'+a+'Plugin'].apply(x,[this[0]].concat(b))}return this.each(function(){if(typeof a=='string'){if(!x['_'+a+'Plugin']){throw'Unknown command: '+a;}x['_'+a+'Plugin'].apply(x,[this].concat(b))}else{x._attachPlugin(this,a||{})}})};var x=$.countdown=new Countdown()})(jQuery);6 (function($){var w='countdown';var Y=0;var O=1;var W=2;var D=3;var H=4;var M=5;var S=6;$.JQPlugin.createPlugin({name:w,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:'dHMS',layout:'',compact:false,padZeroes:false,significant:0,description:'',expiryUrl:'',expiryText:'',alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{'':{labels:['Years','Months','Weeks','Days','Hours','Minutes','Seconds'],labels1:['Year','Month','Week','Day','Hour','Minute','Second'],compactLabels:['y','m','w','d'],whichLabels:null,digits:['0','1','2','3','4','5','6','7','8','9'],timeSeparator:':',isRTL:false}},_getters:['getTimes'],_rtlClass:w+'-rtl',_sectionClass:w+'-section',_amountClass:w+'-amount',_periodClass:w+'-period',_rowClass:w+'-row',_holdingClass:w+'-holding',_showClass:w+'-show',_descrClass:w+'-descr',_timerElems:[],_init:function(){var c=this;this._super();this._serverSyncs=[];var d=(typeof Date.now=='function'?Date.now:function(){return new Date().getTime()});var e=(window.performance&&typeof window.performance.now=='function');function timerCallBack(a){var b=(a<1e12?(e?(performance.now()+performance.timing.navigationStart):d()):a||d());if(b-g>=1000){c._updateElems();g=b}f(timerCallBack)}var f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var g=0;if(!f||$.noRequestAnimationFrame){$.noRequestAnimationFrame=null;setInterval(function(){c._updateElems()},980)}else{g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d();f(timerCallBack)}},UTCDate:function(a,b,c,e,f,g,h,i){if(typeof b=='object'&&b.constructor==Date){i=b.getMilliseconds();h=b.getSeconds();g=b.getMinutes();f=b.getHours();e=b.getDate();c=b.getMonth();b=b.getFullYear()}var d=new Date();d.setUTCFullYear(b);d.setUTCDate(1);d.setUTCMonth(c||0);d.setUTCDate(e||1);d.setUTCHours(f||0);d.setUTCMinutes((g||0)-(Math.abs(a)<30?a*60:a));d.setUTCSeconds(h||0);d.setUTCMilliseconds(i||0);return d},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},resync:function(){var d=this;$('.'+this._getMarker()).each(function(){var a=$.data(this,d.name);if(a.options.serverSync){var b=null;for(var i=0;i<d._serverSyncs.length;i++){if(d._serverSyncs[i][0]==a.options.serverSync){b=d._serverSyncs[i];break}}if(b[2]==null){var c=($.isFunction(a.options.serverSync)?a.options.serverSync.apply(this,[]):null);b[2]=(c?new Date().getTime()-c.getTime():0)-b[1]}if(a._since){a._since.setMilliseconds(a._since.getMilliseconds()+b[2])}a._until.setMilliseconds(a._until.getMilliseconds()+b[2])}});for(var i=0;i<d._serverSyncs.length;i++){if(d._serverSyncs[i][2]!=null){d._serverSyncs[i][1]+=d._serverSyncs[i][2];delete d._serverSyncs[i][2]}}},_instSettings:function(a,b){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(a){if(!this._hasElem(a)){this._timerElems.push(a)}},_hasElem:function(a){return($.inArray(a,this._timerElems)>-1)},_removeElem:function(b){this._timerElems=$.map(this._timerElems,function(a){return(a==b?null:a)})},_updateElems:function(){for(var i=this._timerElems.length-1;i>=0;i--){this._updateCountdown(this._timerElems[i])}},_optionsChanged:function(a,b,c){if(c.layout){c.layout=c.layout.replace(/</g,'<').replace(/>/g,'>')}this._resetExtraLabels(b.options,c);var d=(b.options.timezone!=c.timezone);$.extend(b.options,c);this._adjustSettings(a,b,c.until!=null||c.since!=null||d);var e=new Date();if((b._since&&b._since<e)||(b._until&&b._until>e)){this._addElem(a[0])}this._updateCountdown(a,b)},_updateCountdown:function(a,b){a=a.jquery?a:$(a);b=b||this._getInst(a);if(!b){return}a.html(this._generateHTML(b)).toggleClass(this._rtlClass,b.options.isRTL);if($.isFunction(b.options.onTick)){var c=b._hold!='lap'?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date());if(b.options.tickInterval==1||this.periodsToSeconds(c)%b.options.tickInterval==0){b.options.onTick.apply(a[0],[c])}}var d=b._hold!='pause'&&(b._since?b._now.getTime()<b._since.getTime():b._now.getTime()>=b._until.getTime());if(d&&!b._expiring){b._expiring=true;if(this._hasElem(a[0])||b.options.alwaysExpire){this._removeElem(a[0]);if($.isFunction(b.options.onExpiry)){b.options.onExpiry.apply(a[0],[])}if(b.options.expiryText){var e=b.options.layout;b.options.layout=b.options.expiryText;this._updateCountdown(a[0],b);b.options.layout=e}if(b.options.expiryUrl){window.location=b.options.expiryUrl}}b._expiring=false}else if(b._hold=='pause'){this._removeElem(a[0])}},_resetExtraLabels:function(a,b){for(var n in b){if(n.match(/[Ll]abels[02-9]|compactLabels1/)){a[n]=b[n]}}for(var n in a){if(n.match(/[Ll]abels[02-9]|compactLabels1/)&&typeof b[n]==='undefined'){a[n]=null}}},_adjustSettings:function(a,b,c){var d=null;for(var i=0;i<this._serverSyncs.length;i++){if(this._serverSyncs[i][0]==b.options.serverSync){d=this._serverSyncs[i][1];break}}if(d!=null){var e=(b.options.serverSync?d:0);var f=new Date()}else{var g=($.isFunction(b.options.serverSync)?b.options.serverSync.apply(a[0],[]):null);var f=new Date();var e=(g?f.getTime()-g.getTime():0);this._serverSyncs.push([b.options.serverSync,e])}var h=b.options.timezone;h=(h==null?-f.getTimezoneOffset():h);if(c||(!c&&b._until==null&&b._since==null)){b._since=b.options.since;if(b._since!=null){b._since=this.UTCDate(h,this._determineTime(b._since,null));if(b._since&&e){b._since.setMilliseconds(b._since.getMilliseconds()+e)}}b._until=this.UTCDate(h,this._determineTime(b.options.until,f));if(e){b._until.setMilliseconds(b._until.getMilliseconds()+e)}}b._show=this._determineShow(b)},_preDestroy:function(a,b){this._removeElem(a[0]);a.empty()},pause:function(a){this._hold(a,'pause')},lap:function(a){this._hold(a,'lap')},resume:function(a){this._hold(a,null)},toggle:function(a){var b=$.data(a,this.name)||{};this[!b._hold?'pause':'resume'](a)},toggleLap:function(a){var b=$.data(a,this.name)||{};this[!b._hold?'lap':'resume'](a)},_hold:function(a,b){var c=$.data(a,this.name);if(c){if(c._hold=='pause'&&!b){c._periods=c._savePeriods;var d=(c._since?'-':'+');c[c._since?'_since':'_until']=this._determineTime(d+c._periods[0]+'y'+d+c._periods[1]+'o'+d+c._periods[2]+'w'+d+c._periods[3]+'d'+d+c._periods[4]+'h'+d+c._periods[5]+'m'+d+c._periods[6]+'s');this._addElem(a)}c._hold=b;c._savePeriods=(b=='pause'?c._periods:null);$.data(a,this.name,c);this._updateCountdown(a,c)}},getTimes:function(a){var b=$.data(a,this.name);return(!b?null:(b._hold=='pause'?b._savePeriods:(!b._hold?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date()))))},_determineTime:function(k,l){var m=this;var n=function(a){var b=new Date();b.setTime(b.getTime()+a*1000);return b};var o=function(a){a=a.toLowerCase();var b=new Date();var c=b.getFullYear();var d=b.getMonth();var e=b.getDate();var f=b.getHours();var g=b.getMinutes();var h=b.getSeconds();var i=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var j=i.exec(a);while(j){switch(j[2]||'s'){case's':h+=parseInt(j[1],10);break;case'm':g+=parseInt(j[1],10);break;case'h':f+=parseInt(j[1],10);break;case'd':e+=parseInt(j[1],10);break;case'w':e+=parseInt(j[1],10)*7;break;case'o':d+=parseInt(j[1],10);e=Math.min(e,m._getDaysInMonth(c,d));break;case'y':c+=parseInt(j[1],10);e=Math.min(e,m._getDaysInMonth(c,d));break}j=i.exec(a)}return new Date(c,d,e,f,g,h,0)};var p=(k==null?l:(typeof k=='string'?o(k):(typeof k=='number'?n(k):k)));if(p)p.setMilliseconds(0);return p},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(c){var d=this;c._periods=(c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date()));var e=false;var f=0;var g=c.options.significant;var h=$.extend({},c._show);for(var i=Y;i<=S;i++){e|=(c._show[i]=='?'&&c._periods[i]>0);h[i]=(c._show[i]=='?'&&!e?null:c._show[i]);f+=(h[i]?1:0);g-=(c._periods[i]>0?1:0)}var j=[false,false,false,false,false,false,false];for(var i=S;i>=Y;i--){if(c._show[i]){if(c._periods[i]){j[i]=true}else{j[i]=g>0;g--}}}var k=(c.options.compact?c.options.compactLabels:c.options.labels);var l=c.options.whichLabels||this._normalLabels;var m=function(a){var b=c.options['compactLabels'+l(c._periods[a])];return(h[a]?d._translateDigits(c,c._periods[a])+(b?b[a]:k[a])+' ':'')};var n=(c.options.padZeroes?2:1);var o=function(a){var b=c.options['labels'+l(c._periods[a])];return((!c.options.significant&&h[a])||(c.options.significant&&j[a])?'<span class="'+d._sectionClass+'">'+'<span class="'+d._amountClass+'">'+d._minDigits(c,c._periods[a],n)+'</span>'+'<span class="'+d._periodClass+'">'+(b?b[a]:k[a])+'</span></span>':'')};return(c.options.layout?this._buildLayout(c,h,c.options.layout,c.options.compact,c.options.significant,j):((c.options.compact?'<span class="'+this._rowClass+' '+this._amountClass+(c._hold?' '+this._holdingClass:'')+'">'+m(Y)+m(O)+m(W)+m(D)+(h[H]?this._minDigits(c,c._periods[H],2):'')+(h[M]?(h[H]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[M],2):'')+(h[S]?(h[H]||h[M]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[S],2):''):'<span class="'+this._rowClass+' '+this._showClass+(c.options.significant||f)+(c._hold?' '+this._holdingClass:'')+'">'+o(Y)+o(O)+o(W)+o(D)+o(H)+o(M)+o(S))+'</span>'+(c.options.description?'<span class="'+this._rowClass+' '+this._descrClass+'">'+c.options.description+'</span>':'')))},_buildLayout:function(c,d,e,f,g,h){var j=c.options[f?'compactLabels':'labels'];var k=c.options.whichLabels||this._normalLabels;var l=function(a){return(c.options[(f?'compactLabels':'labels')+k(c._periods[a])]||j)[a]};var m=function(a,b){return c.options.digits[Math.floor(a/b)%10]};var o={desc:c.options.description,sep:c.options.timeSeparator,yl:l(Y),yn:this._minDigits(c,c._periods[Y],1),ynn:this._minDigits(c,c._periods[Y],2),ynnn:this._minDigits(c,c._periods[Y],3),y1:m(c._periods[Y],1),y10:m(c._periods[Y],10),y100:m(c._periods[Y],100),y1000:m(c._periods[Y],1000),ol:l(O),on:this._minDigits(c,c._periods[O],1),onn:this._minDigits(c,c._periods[O],2),onnn:this._minDigits(c,c._periods[O],3),o1:m(c._periods[O],1),o10:m(c._periods[O],10),o100:m(c._periods[O],100),o1000:m(c._periods[O],1000),wl:l(W),wn:this._minDigits(c,c._periods[W],1),wnn:this._minDigits(c,c._periods[W],2),wnnn:this._minDigits(c,c._periods[W],3),w1:m(c._periods[W],1),w10:m(c._periods[W],10),w100:m(c._periods[W],100),w1000:m(c._periods[W],1000),dl:l(D),dn:this._minDigits(c,c._periods[D],1),dnn:this._minDigits(c,c._periods[D],2),dnnn:this._minDigits(c,c._periods[D],3),d1:m(c._periods[D],1),d10:m(c._periods[D],10),d100:m(c._periods[D],100),d1000:m(c._periods[D],1000),hl:l(H),hn:this._minDigits(c,c._periods[H],1),hnn:this._minDigits(c,c._periods[H],2),hnnn:this._minDigits(c,c._periods[H],3),h1:m(c._periods[H],1),h10:m(c._periods[H],10),h100:m(c._periods[H],100),h1000:m(c._periods[H],1000),ml:l(M),mn:this._minDigits(c,c._periods[M],1),mnn:this._minDigits(c,c._periods[M],2),mnnn:this._minDigits(c,c._periods[M],3),m1:m(c._periods[M],1),m10:m(c._periods[M],10),m100:m(c._periods[M],100),m1000:m(c._periods[M],1000),sl:l(S),sn:this._minDigits(c,c._periods[S],1),snn:this._minDigits(c,c._periods[S],2),snnn:this._minDigits(c,c._periods[S],3),s1:m(c._periods[S],1),s10:m(c._periods[S],10),s100:m(c._periods[S],100),s1000:m(c._periods[S],1000)};var p=e;for(var i=Y;i<=S;i++){var q='yowdhms'.charAt(i);var r=new RegExp('\\{'+q+'<\\}([\\s\\S]*)\\{'+q+'>\\}','g');p=p.replace(r,((!g&&d[i])||(g&&h[i])?'$1':''))}$.each(o,function(n,v){var a=new RegExp('\\{'+n+'\\}','g');p=p.replace(a,v)});return p},_minDigits:function(a,b,c){b=''+b;if(b.length>=c){return this._translateDigits(a,b)}b='0000000000'+b;return this._translateDigits(a,b.substr(b.length-c))},_translateDigits:function(b,c){return(''+c).replace(/[0-9]/g,function(a){return b.options.digits[a]})},_determineShow:function(a){var b=a.options.format;var c=[];c[Y]=(b.match('y')?'?':(b.match('Y')?'!':null));c[O]=(b.match('o')?'?':(b.match('O')?'!':null));c[W]=(b.match('w')?'?':(b.match('W')?'!':null));c[D]=(b.match('d')?'?':(b.match('D')?'!':null));c[H]=(b.match('h')?'?':(b.match('H')?'!':null));c[M]=(b.match('m')?'?':(b.match('M')?'!':null));c[S]=(b.match('s')?'?':(b.match('S')?'!':null));return c},_calculatePeriods:function(c,d,e,f){c._now=f;c._now.setMilliseconds(0);var g=new Date(c._now.getTime());if(c._since){if(f.getTime()<c._since.getTime()){c._now=f=g}else{f=c._since}}else{g.setTime(c._until.getTime());if(f.getTime()>c._until.getTime()){c._now=f=g}}var h=[0,0,0,0,0,0,0];if(d[Y]||d[O]){var i=this._getDaysInMonth(f.getFullYear(),f.getMonth());var j=this._getDaysInMonth(g.getFullYear(),g.getMonth());var k=(g.getDate()==f.getDate()||(g.getDate()>=Math.min(i,j)&&f.getDate()>=Math.min(i,j)));var l=function(a){return(a.getHours()*60+a.getMinutes())*60+a.getSeconds()};var m=Math.max(0,(g.getFullYear()-f.getFullYear())*12+g.getMonth()-f.getMonth()+((g.getDate()<f.getDate()&&!k)||(k&&l(g)<l(f))?-1:0));h[Y]=(d[Y]?Math.floor(m/12):0);h[O]=(d[O]?m-h[Y]*12:0);f=new Date(f.getTime());var n=(f.getDate()==i);var o=this._getDaysInMonth(f.getFullYear()+h[Y],f.getMonth()+h[O]);if(f.getDate()>o){f.setDate(o)}f.setFullYear(f.getFullYear()+h[Y]);f.setMonth(f.getMonth()+h[O]);if(n){f.setDate(o)}}var p=Math.floor((g.getTime()-f.getTime())/1000);var q=function(a,b){h[a]=(d[a]?Math.floor(p/b):0);p-=h[a]*b};q(W,604800);q(D,86400);q(H,3600);q(M,60);q(S,1);if(p>0&&!c._since){var r=[1,12,4.3482,7,24,60,60];var s=S;var t=1;for(var u=S;u>=Y;u--){if(d[u]){if(h[s]>=t){h[s]=0;p=1}if(p>0){h[u]++;p=0;s=u;t=1}}t*=r[u]}}if(e){for(var u=Y;u<=S;u++){if(e&&h[u]){e--}else if(!e){h[u]=0}}}return h}})})(jQuery); -
plugins/countdown/locales/fr/main.po
r3193 r3398 11 11 "X-Generator: Poedit 1.5.7\n" 12 12 13 msgid "Countdown and stopwatch" 14 msgstr "Compte à rebours ou chronomètre" 15 16 msgid "A countdown to a future date or stopwatch to a past date" 17 msgstr "Un compte à rebours vers une date à venir ou un chronomètre vers une date passée" 18 13 19 #: _widget.php:38 14 msgid "Count Down"20 msgid "Countdown" 15 21 msgstr "Chronomètre" 16 22 … … 37 43 #: _widget.php:162 38 44 msgid "year" 39 msgstr "an née"45 msgstr "an" 40 46 41 47 #: _widget.php:164 … … 93 99 #: _widget.php:162 94 100 msgid "years" 95 msgstr "an nées"101 msgstr "ans" 96 102 97 103 #: _widget.php:164
Note: See TracChangeset
for help on using the changeset viewer.