From 4bc916924f0c86f642b1f98c82f62a9d0e65de6b Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Wed, 30 Jan 2019 18:39:39 +0300 Subject: [PATCH 1/3] App Store Pre-Sale Feature --- app/Http/Controllers/Modules/Home.php | 3 +- app/Http/Controllers/Modules/Item.php | 4 + app/Traits/Modules.php | 11 + public/css/countdown.css | 121 +++ public/css/jquery.countdown.css | 54 + .../jquery/countdown/jquery.countdown-ar.js | 16 + .../jquery/countdown/jquery.countdown-bg.js | 17 + .../jquery/countdown/jquery.countdown-bn.js | 16 + .../jquery/countdown/jquery.countdown-bs.js | 19 + .../jquery/countdown/jquery.countdown-ca.js | 16 + .../jquery/countdown/jquery.countdown-cs.js | 19 + .../jquery/countdown/jquery.countdown-cy.js | 2 + .../jquery/countdown/jquery.countdown-da.js | 16 + .../jquery/countdown/jquery.countdown-de.js | 16 + .../jquery/countdown/jquery.countdown-el.js | 16 + .../jquery/countdown/jquery.countdown-es.js | 16 + .../jquery/countdown/jquery.countdown-et.js | 16 + .../jquery/countdown/jquery.countdown-fa.js | 17 + .../jquery/countdown/jquery.countdown-fi.js | 16 + .../jquery/countdown/jquery.countdown-fo.js | 16 + .../jquery/countdown/jquery.countdown-fr.js | 18 + .../jquery/countdown/jquery.countdown-gl.js | 16 + .../jquery/countdown/jquery.countdown-gu.js | 16 + .../jquery/countdown/jquery.countdown-he.js | 16 + .../jquery/countdown/jquery.countdown-hr.js | 27 + .../jquery/countdown/jquery.countdown-hu.js | 16 + .../jquery/countdown/jquery.countdown-hy.js | 16 + .../jquery/countdown/jquery.countdown-id.js | 16 + .../jquery/countdown/jquery.countdown-is.js | 16 + .../jquery/countdown/jquery.countdown-it.js | 16 + .../jquery/countdown/jquery.countdown-ja.js | 16 + .../jquery/countdown/jquery.countdown-kn.js | 16 + .../jquery/countdown/jquery.countdown-ko.js | 17 + .../jquery/countdown/jquery.countdown-lt.js | 16 + .../jquery/countdown/jquery.countdown-lv.js | 17 + .../jquery/countdown/jquery.countdown-mk.js | 17 + .../jquery/countdown/jquery.countdown-ml.js | 18 + .../jquery/countdown/jquery.countdown-ms.js | 16 + .../jquery/countdown/jquery.countdown-my.js | 16 + .../jquery/countdown/jquery.countdown-nb.js | 16 + .../jquery/countdown/jquery.countdown-nl.js | 16 + .../jquery/countdown/jquery.countdown-pl.js | 22 + .../countdown/jquery.countdown-pt-BR.js | 17 + .../jquery/countdown/jquery.countdown-ro.js | 16 + .../jquery/countdown/jquery.countdown-ru.js | 23 + .../jquery/countdown/jquery.countdown-sk.js | 19 + .../jquery/countdown/jquery.countdown-sl.js | 22 + .../jquery/countdown/jquery.countdown-sq.js | 16 + .../countdown/jquery.countdown-sr-SR.js | 19 + .../jquery/countdown/jquery.countdown-sr.js | 19 + .../jquery/countdown/jquery.countdown-sv.js | 16 + .../jquery/countdown/jquery.countdown-th.js | 16 + .../jquery/countdown/jquery.countdown-tr.js | 16 + .../jquery/countdown/jquery.countdown-uk.js | 19 + .../jquery/countdown/jquery.countdown-ur.js | 16 + .../jquery/countdown/jquery.countdown-uz.js | 16 + .../jquery/countdown/jquery.countdown-vi.js | 16 + .../countdown/jquery.countdown-zh-CN.js | 17 + .../countdown/jquery.countdown-zh-TW.js | 17 + .../js/jquery/countdown/jquery.countdown.js | 964 ++++++++++++++++++ .../jquery/countdown/jquery.countdown.min.js | 7 + .../jquery/countdown/jquery.countdown.min.map | 1 + public/js/jquery/countdown/jquery.plugin.js | 388 +++++++ .../js/jquery/countdown/jquery.plugin.min.js | 9 + .../js/jquery/countdown/jquery.plugin.min.map | 1 + resources/lang/en-GB/modules.php | 2 + resources/views/modules/home/index.blade.php | 16 + .../views/modules/item/pre_sale.blade.php | 255 +++++ resources/views/modules/tiles/index.blade.php | 6 +- .../views/partials/modules/pre_sale.blade.php | 46 + 70 files changed, 2796 insertions(+), 2 deletions(-) create mode 100644 public/css/countdown.css create mode 100644 public/css/jquery.countdown.css create mode 100644 public/js/jquery/countdown/jquery.countdown-ar.js create mode 100644 public/js/jquery/countdown/jquery.countdown-bg.js create mode 100644 public/js/jquery/countdown/jquery.countdown-bn.js create mode 100644 public/js/jquery/countdown/jquery.countdown-bs.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ca.js create mode 100644 public/js/jquery/countdown/jquery.countdown-cs.js create mode 100644 public/js/jquery/countdown/jquery.countdown-cy.js create mode 100644 public/js/jquery/countdown/jquery.countdown-da.js create mode 100644 public/js/jquery/countdown/jquery.countdown-de.js create mode 100644 public/js/jquery/countdown/jquery.countdown-el.js create mode 100644 public/js/jquery/countdown/jquery.countdown-es.js create mode 100644 public/js/jquery/countdown/jquery.countdown-et.js create mode 100644 public/js/jquery/countdown/jquery.countdown-fa.js create mode 100644 public/js/jquery/countdown/jquery.countdown-fi.js create mode 100644 public/js/jquery/countdown/jquery.countdown-fo.js create mode 100644 public/js/jquery/countdown/jquery.countdown-fr.js create mode 100644 public/js/jquery/countdown/jquery.countdown-gl.js create mode 100644 public/js/jquery/countdown/jquery.countdown-gu.js create mode 100644 public/js/jquery/countdown/jquery.countdown-he.js create mode 100644 public/js/jquery/countdown/jquery.countdown-hr.js create mode 100644 public/js/jquery/countdown/jquery.countdown-hu.js create mode 100644 public/js/jquery/countdown/jquery.countdown-hy.js create mode 100644 public/js/jquery/countdown/jquery.countdown-id.js create mode 100644 public/js/jquery/countdown/jquery.countdown-is.js create mode 100644 public/js/jquery/countdown/jquery.countdown-it.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ja.js create mode 100644 public/js/jquery/countdown/jquery.countdown-kn.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ko.js create mode 100644 public/js/jquery/countdown/jquery.countdown-lt.js create mode 100644 public/js/jquery/countdown/jquery.countdown-lv.js create mode 100644 public/js/jquery/countdown/jquery.countdown-mk.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ml.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ms.js create mode 100644 public/js/jquery/countdown/jquery.countdown-my.js create mode 100644 public/js/jquery/countdown/jquery.countdown-nb.js create mode 100644 public/js/jquery/countdown/jquery.countdown-nl.js create mode 100644 public/js/jquery/countdown/jquery.countdown-pl.js create mode 100644 public/js/jquery/countdown/jquery.countdown-pt-BR.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ro.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ru.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sk.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sl.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sq.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sr-SR.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sr.js create mode 100644 public/js/jquery/countdown/jquery.countdown-sv.js create mode 100644 public/js/jquery/countdown/jquery.countdown-th.js create mode 100644 public/js/jquery/countdown/jquery.countdown-tr.js create mode 100644 public/js/jquery/countdown/jquery.countdown-uk.js create mode 100644 public/js/jquery/countdown/jquery.countdown-ur.js create mode 100644 public/js/jquery/countdown/jquery.countdown-uz.js create mode 100644 public/js/jquery/countdown/jquery.countdown-vi.js create mode 100644 public/js/jquery/countdown/jquery.countdown-zh-CN.js create mode 100644 public/js/jquery/countdown/jquery.countdown-zh-TW.js create mode 100644 public/js/jquery/countdown/jquery.countdown.js create mode 100644 public/js/jquery/countdown/jquery.countdown.min.js create mode 100644 public/js/jquery/countdown/jquery.countdown.min.map create mode 100644 public/js/jquery/countdown/jquery.plugin.js create mode 100644 public/js/jquery/countdown/jquery.plugin.min.js create mode 100644 public/js/jquery/countdown/jquery.plugin.min.map create mode 100644 resources/views/modules/item/pre_sale.blade.php create mode 100644 resources/views/partials/modules/pre_sale.blade.php diff --git a/app/Http/Controllers/Modules/Home.php b/app/Http/Controllers/Modules/Home.php index e1ad914d9..ea3b9e16d 100644 --- a/app/Http/Controllers/Modules/Home.php +++ b/app/Http/Controllers/Modules/Home.php @@ -26,11 +26,12 @@ class Home extends Controller ] ]; + $pre_sale = $this->getPreSaleModules($data); $paid = $this->getPaidModules($data); $new = $this->getNewModules($data); $free = $this->getFreeModules($data); $installed = Module::all()->pluck('status', 'alias')->toArray(); - return view('modules.home.index', compact('paid', 'new', 'free', 'installed')); + return view('modules.home.index', compact('pre_sale', 'paid', 'new', 'free', 'installed')); } } diff --git a/app/Http/Controllers/Modules/Item.php b/app/Http/Controllers/Modules/Item.php index e329f6e48..7163749cb 100644 --- a/app/Http/Controllers/Modules/Item.php +++ b/app/Http/Controllers/Modules/Item.php @@ -65,6 +65,10 @@ class Item extends Controller $module->action_url .= $character . http_build_query($parameters); } + if ($module->status == 'pre_sale') { + return view('modules.item.pre_sale', compact('module', 'installed', 'enable')); + } + return view('modules.item.show', compact('module', 'installed', 'enable')); } diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php index 802f7f720..5df2fdee7 100644 --- a/app/Traits/Modules.php +++ b/app/Traits/Modules.php @@ -167,6 +167,17 @@ trait Modules return $installed; } + public function getPreSaleModules($data = []) + { + $response = $this->getRemote('apps/pre_sale', 'GET', $data); + + if ($response && ($response->getStatusCode() == 200)) { + return json_decode($response->getBody())->data; + } + + return []; + } + public function getPaidModules($data = []) { $response = $this->getRemote('apps/paid', 'GET', $data); diff --git a/public/css/countdown.css b/public/css/countdown.css new file mode 100644 index 000000000..617ff600b --- /dev/null +++ b/public/css/countdown.css @@ -0,0 +1,121 @@ + +/*----------------------------------------------------------------------------------- + + Shortcodes: countdown.css + +-----------------------------------------------------------------------------------*/ + + +/* ---------------------------------------------------------------- + Countdown +-----------------------------------------------------------------*/ + +.countdown { display: block; } + +.countdown-row { + display: block; + position: relative; + text-align: center; +} + +.countdown-section { + display: inline-block; + font-size: 11px; + line-height: 1; + text-align: center; + width: 25%; + border-left: 1px dotted #BBB; + color: #888; + text-transform: capitalize; +} + +.countdown-section:first-child { border-left: 0; } + +.countdown-amount { + display: block; + font-size: 20px; + color: #333; + margin-bottom: 5px; +} + +.countdown-descr { + display: block; + width: 100%; +} + + +/* Countdown - Medium +-----------------------------------------------------------------*/ + +.countdown-medium .countdown-section { font-size: 14px; } + +.countdown-medium .countdown-amount { + font-size: 30px; + margin-bottom: 7px; +} + + +/* Countdown - Large +-----------------------------------------------------------------*/ + +.countdown-large .countdown-section { font-size: 18px; } + +.countdown-large .countdown-amount { + font-size: 44px; + font-weight: 600; + margin-bottom: 8px; +} + + +/* Countdown - Inline +-----------------------------------------------------------------*/ + +.countdown.countdown-inline { display: inline-block; } + +.countdown.countdown-inline .countdown-row { + display: inline-block; + text-align: center; +} + +.countdown.countdown-inline .countdown-section { + display: inline-block; + font-size: inherit; + line-height: inherit; + width: auto; + border: none; + color: inherit; + margin-left: 7px; + text-transform: inherit; +} + +.countdown.countdown-inline .countdown-section:first-child { margin-left: 0; } + +.countdown.countdown-inline .countdown-amount { + display: inline-block; + font-size: inherit; + color: inherit; + font-weight: bold; + margin: 0 3px 0 0; +} + +.countdown.countdown-inline .countdown-descr { + display: inline-block; + width: auto; +} + + +/* Countdown - Coming Soon +-----------------------------------------------------------------*/ + +body:not(.device-xs):not(.device-xxs) .countdown.countdown-large.coming-soon .countdown-section { + border: none; + padding: 15px; +} + +body:not(.device-xs):not(.device-xxs) .countdown.countdown-large.coming-soon .countdown-amount { + height: 140px; + line-height: 140px; + border-radius: 50%; + background-color: rgba(0,0,0,0.2); + margin-bottom: 15px !important; +} \ No newline at end of file diff --git a/public/css/jquery.countdown.css b/public/css/jquery.countdown.css new file mode 100644 index 000000000..4e48b1c9f --- /dev/null +++ b/public/css/jquery.countdown.css @@ -0,0 +1,54 @@ +/* jQuery Countdown styles 2.0.0. */ +.is-countdown { + border: 1px solid #ccc; + background-color: #eee; +} +.countdown-rtl { + direction: rtl; +} +.countdown-holding span { + color: #888; +} +.countdown-row { + clear: both; + width: 100%; + padding: 0px 2px; + text-align: center; +} +.countdown-show1 .countdown-section { + width: 98%; +} +.countdown-show2 .countdown-section { + width: 48%; +} +.countdown-show3 .countdown-section { + width: 32.5%; +} +.countdown-show4 .countdown-section { + width: 24.5%; +} +.countdown-show5 .countdown-section { + width: 19.5%; +} +.countdown-show6 .countdown-section { + width: 16.25%; +} +.countdown-show7 .countdown-section { + width: 14%; +} +.countdown-section { + display: block; + float: left; + font-size: 75%; + text-align: center; +} +.countdown-amount { + font-size: 200%; +} +.countdown-period { + display: block; +} +.countdown-descr { + display: block; + width: 100%; +} diff --git a/public/js/jquery/countdown/jquery.countdown-ar.js b/public/js/jquery/countdown/jquery.countdown-ar.js new file mode 100644 index 000000000..6711d9eb3 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ar.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Arabic (عربي) initialisation for the jQuery countdown extension + Translated by Talal Al Asmari (talal@psdgroups.com), April 2009. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ar = { + labels: ['سنوات','أشهر','أسابيع','أيام','ساعات','دقائق','ثواني'], + labels1: ['سنة','شهر','أسبوع','يوم','ساعة','دقيقة','ثانية'], + compactLabels: ['س','ش','أ','ي'], + whichLabels: null, + digits: ['٠','١','٢','٣','٤','٥','٦','٧','٨','٩'], + timeSeparator: ':', + isRTL: true + }; + $.countdown.setDefaults($.countdown.regionalOptions.ar); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-bg.js b/public/js/jquery/countdown/jquery.countdown-bg.js new file mode 100644 index 000000000..7bda89f77 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-bg.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + * Bulgarian initialisation for the jQuery countdown extension + * Written by Manol Trendafilov manol@rastermania.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.bg = { + labels: ['Години','Месеца','Седмица','Дни','Часа','Минути','Секунди'], + labels1: ['Година','Месец','Седмица','Ден','Час','Минута','Секунда'], + compactLabels: ['l','m','n','d'], + compactLabels1: ['g','m','n','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.bg); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-bn.js b/public/js/jquery/countdown/jquery.countdown-bn.js new file mode 100644 index 000000000..c824f2ef8 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-bn.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Bengali/Bangla initialisation for the jQuery countdown extension + * Written by Mohammed Tajuddin (tajuddin@chittagong-it.com) Jan 2011. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.bn = { + labels: ['বছর','মাস','সপ্তাহ','দিন','ঘন্টা','মিনিট','সেকেন্ড'], + labels1: ['বছর','মাস','সপ্তাহ','দিন','ঘন্টা','মিনিট','সেকেন্ড'], + compactLabels: ['ব','মা','স','দি'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.bn); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-bs.js b/public/js/jquery/countdown/jquery.countdown-bs.js new file mode 100644 index 000000000..d81852309 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-bs.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Bosnian Latin initialisation for the jQuery countdown extension + * Written by Miralem Mehic miralem@mehic.info (2011) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.bs = { + labels: ['Godina','Mjeseci','Sedmica','Dana','Sati','Minuta','Sekundi'], + labels1: ['Godina','Mjesec','Sedmica','Dan','Sat','Minuta','Sekunda'], + labels2: ['Godine','Mjeseca','Sedmica','Dana','Sata','Minute','Sekunde'], + compactLabels: ['g','m','t','d'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.bs); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ca.js b/public/js/jquery/countdown/jquery.countdown-ca.js new file mode 100644 index 000000000..deaa26070 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ca.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Catalan initialisation for the jQuery countdown extension + Written by Amanida Media www.amanidamedia.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ca = { + labels: ['Anys','Mesos','Setmanes','Dies','Hores','Minuts','Segons'], + labels1: ['Anys','Mesos','Setmanes','Dies','Hores','Minuts','Segons'], + compactLabels: ['a','m','s','g'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ca); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-cs.js b/public/js/jquery/countdown/jquery.countdown-cs.js new file mode 100644 index 000000000..097b901e2 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-cs.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Czech initialisation for the jQuery countdown extension + * Written by Roman Chlebec (creamd@c64.sk) (2008) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.cs = { + labels: ['Roků','Měsíců','Týdnů','Dní','Hodin','Minut','Sekund'], + labels1: ['Rok','Měsíc','Týden','Den','Hodina','Minuta','Sekunda'], + labels2: ['Roky','Měsíce','Týdny','Dny','Hodiny','Minuty','Sekundy'], + compactLabels: ['r','m','t','d'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.cs); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-cy.js b/public/js/jquery/countdown/jquery.countdown-cy.js new file mode 100644 index 000000000..5637cc45d --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-cy.js @@ -0,0 +1,2 @@ +/* http://keith-wood.name/countdown.html Welsh initialisation for the jQuery countdown extension Written by Gareth Jones | http://garethvjones.com | October 2011. */ (function($) { 'use strict'; $.countdown.regionalOptions.cy = { labels: ['Blynyddoedd','Mis','Wythnosau','Diwrnodau','Oriau','Munudau','Eiliadau'], labels1: ['Blwyddyn','Mis','Wythnos','Diwrnod','Awr','Munud','Eiliad'], compactLabels: ['b','m','w','d'], whichLabels: null, digits: ['0','1','2','3','4','5','6','7','8','9'], timeSeparator: ':', + isRTL: false }; $.countdown.setDefaults($.countdown.regionalOptions.cy); })(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-da.js b/public/js/jquery/countdown/jquery.countdown-da.js new file mode 100644 index 000000000..3c165270f --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-da.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Danish initialisation for the jQuery countdown extension + Written by Buch (admin@buch90.dk). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.da = { + labels: ['År','Måneder','Uger','Dage','Timer','Minutter','Sekunder'], + labels1: ['År','Måned','Uge','Dag','Time','Minut','Sekund'], + compactLabels: ['Å','M','U','D'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.da); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-de.js b/public/js/jquery/countdown/jquery.countdown-de.js new file mode 100644 index 000000000..bf02f7781 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-de.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + German initialisation for the jQuery countdown extension + Written by Samuel Wulf. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.de = { + labels: ['Jahre','Monate','Wochen','Tage','Stunden','Minuten','Sekunden'], + labels1: ['Jahr','Monat','Woche','Tag','Stunde','Minute','Sekunde'], + compactLabels: ['J','M','W','T'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.de); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-el.js b/public/js/jquery/countdown/jquery.countdown-el.js new file mode 100644 index 000000000..f7f1f1c1f --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-el.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Greek initialisation for the jQuery countdown extension + Written by Philip. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.el = { + labels: ['Χρόνια','Μήνες','Εβδομάδες','Μέρες','Ώρες','Λεπτά','Δευτερόλεπτα'], + labels1: ['Χρόνος','Μήνας','Εβδομάδα','Ημέρα','Ώρα','Λεπτό','Δευτερόλεπτο'], + compactLabels: ['Χρ.','Μην.','Εβδ.','Ημ.'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.el); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-es.js b/public/js/jquery/countdown/jquery.countdown-es.js new file mode 100644 index 000000000..b68311398 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-es.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Spanish initialisation for the jQuery countdown extension + * Written by Sergio Carracedo Martinez webmaster@neodisenoweb.com (2008) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.es = { + labels: ['Años','Meses','Semanas','Días','Horas','Minutos','Segundos'], + labels1: ['Año','Mes','Semana','Día','Hora','Minuto','Segundo'], + compactLabels: ['a','m','s','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.es); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-et.js b/public/js/jquery/countdown/jquery.countdown-et.js new file mode 100644 index 000000000..2ea1becff --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-et.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Estonian initialisation for the jQuery countdown extension + Written by Helmer */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.et = { + labels: ['Aastat','Kuud','Nädalat','Päeva','Tundi','Minutit','Sekundit'], + labels1: ['Aasta','Kuu','Nädal','Päev','Tund','Minut','Sekund'], + compactLabels: ['a','k','n','p'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.et); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-fa.js b/public/js/jquery/countdown/jquery.countdown-fa.js new file mode 100644 index 000000000..e0453b30e --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-fa.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + Persian (فارسی) initialisation for the jQuery countdown extension + Written by Alireza Ziaie (ziai@magfa.com) Oct 2008. + Digits corrected by Hamed Ramezanian Feb 2013. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.fa = { + labels: ['سال','ماه','هفته','روز','ساعت','دقیقه','ثانیه'], + labels1: ['سال','ماه','هفته','روز','ساعت','دقیقه','ثانیه'], + compactLabels: ['س','م','ه','ر'], + whichLabels: null, + digits: ['۰','۱','۲','۳','۴','۵','۶','۷','۸','۹'], + timeSeparator: ':', + isRTL: true + }; + $.countdown.setDefaults($.countdown.regionalOptions.fa); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-fi.js b/public/js/jquery/countdown/jquery.countdown-fi.js new file mode 100644 index 000000000..5bcd1716d --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-fi.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Finnish initialisation for the jQuery countdown extension + Written by Kalle Vänskä and Juha Suni (juhis.suni@gmail.com). Corrected by Olli. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.fi = { + labels: ['vuotta','kuukautta','viikkoa','päivää','tuntia','minuuttia','sekuntia'], + labels1: ['vuosi','kuukausi','viikko','päivä','tunti','minuutti','sekunti'], + compactLabels: ['v','kk','vk','pv'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.fi); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-fo.js b/public/js/jquery/countdown/jquery.countdown-fo.js new file mode 100644 index 000000000..cf625ab9a --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-fo.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Faroese initialisation for the jQuery countdown extension + Written by Kasper Friis Christensen (kasper@friischristensen.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.fo = { + labels: ['Ár','Mánaðir','Vikur','Dagar','Tímar','Minuttir','Sekund'], + labels1: ['Ár','Mánaður','Vika','Dagur','Tími','Minuttur','Sekund'], + compactLabels: ['Á','M','V','D'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.fo); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-fr.js b/public/js/jquery/countdown/jquery.countdown-fr.js new file mode 100644 index 000000000..fb9339e14 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-fr.js @@ -0,0 +1,18 @@ +/* http://keith-wood.name/countdown.html + French initialisation for the jQuery countdown extension + Written by Keith Wood (wood.keith{at}optusnet.com.au) Jan 2008. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.fr = { + labels: ['Années','Mois','Semaines','Jours','Heures','Minutes','Secondes'], + labels1: ['Année','Mois','Semaine','Jour','Heure','Minute','Seconde'], + compactLabels: ['a','m','s','j'], + whichLabels: function(amount) { + return (amount > 1 ? 0 : 1); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.fr); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-gl.js b/public/js/jquery/countdown/jquery.countdown-gl.js new file mode 100644 index 000000000..ca08bdc44 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-gl.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Galician initialisation for the jQuery countdown extension + * Written by Moncho Pena ramon.pena.rodriguez@gmail.com (2009) and Angel Farrapeira */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.gl = { + labels: ['Anos','Meses','Semanas','Días','Horas','Minutos','Segundos'], + labels1: ['Ano','Mes','Semana','Día','Hora','Minuto','Segundo'], + compactLabels: ['a','m','s','g'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.gl); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-gu.js b/public/js/jquery/countdown/jquery.countdown-gu.js new file mode 100644 index 000000000..7ea2f221a --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-gu.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Gujarati initialization for the jQuery countdown extension + * Written by Sahil Jariwala jariwala.sahil@gmail.com (2012) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.gu = { + labels: ['વર્ષ','મહિનો','અઠવાડિયા','દિવસ','કલાક','મિનિટ','સેકન્ડ'], + labels1: ['વર્ષ','મહિનો','અઠવાડિયા','દિવસ','કલાક','મિનિટ','સેકન્ડ'], + compactLabels: ['વ','મ','અ','દિ'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.gu); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-he.js b/public/js/jquery/countdown/jquery.countdown-he.js new file mode 100644 index 000000000..b2faebc72 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-he.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Hebrew initialisation for the jQuery countdown extension + * Translated by Nir Livne, Dec 2008 */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.he = { + labels: ['שנים','חודשים','שבועות','ימים','שעות','דקות','שניות'], + labels1: ['שנה','חודש','שבוע','יום','שעה','דקה','שנייה'], + compactLabels: ['שנ','ח','שב','י'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: true + }; + $.countdown.setDefaults($.countdown.regionalOptions.he); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-hr.js b/public/js/jquery/countdown/jquery.countdown-hr.js new file mode 100644 index 000000000..9c8893d15 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-hr.js @@ -0,0 +1,27 @@ +/* http://keith-wood.name/countdown.html + * Croatian l10n for the jQuery countdown plugin + * Written by Dejan Broz info@hqfactory.com (2011) + * Improved by zytzagoo (2014) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.hr = { + labels: ['Godina','Mjeseci','Tjedana','Dana','Sati','Minuta','Sekundi'], // plurals + labels1: ['Godina','Mjesec','Tjedan','Dan','Sat','Minutu','Sekundu'], // singles + labels2: ['Godine','Mjeseca','Tjedana','Dana','Sata','Minute','Sekunde'], // paucals + compactLabels: ['g','m','t','d'], + whichLabels: function(amount){ + amount = parseInt(amount, 10); + if (amount % 10 === 1 && amount % 100 !== 11) { + return 1; // singles (/.*1$/ && ! /.*11$/) + } + if (amount % 10 >= 2 && amount % 10 <= 4 && (amount % 100 < 10 || amount % 100 >= 20)) { + return 2; // paucals (/.*[234]$/ && ! /.*1[234]$/ + } + return 0; // default plural (most common case) + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.hr); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-hu.js b/public/js/jquery/countdown/jquery.countdown-hu.js new file mode 100644 index 000000000..510750611 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-hu.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Hungarian initialisation for the jQuery countdown extension + * Written by Edmond L. (webmond@gmail.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.hu = { + labels: ['Év','Hónap','Hét','Nap','Óra','Perc','Másodperc'], + labels1: ['Év','Hónap','Hét','Nap','Óra','Perc','Másodperc'], + compactLabels: ['É','H','Hé','N'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.hu); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-hy.js b/public/js/jquery/countdown/jquery.countdown-hy.js new file mode 100644 index 000000000..25703757d --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-hy.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Armenian initialisation for the jQuery countdown extension + * Written by Artur Martirosyan. (artur{at}zoom.am) October 2011. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.hy = { + labels: ['Տարի','Ամիս','Շաբաթ','Օր','Ժամ','Րոպե','Վարկյան'], + labels1: ['Տարի','Ամիս','Շաբաթ','Օր','Ժամ','Րոպե','Վարկյան'], + compactLabels: ['տ','ա','շ','օ'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.hy); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-id.js b/public/js/jquery/countdown/jquery.countdown-id.js new file mode 100644 index 000000000..1ffd812ae --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-id.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Indonesian initialisation for the jQuery countdown extension + Written by Erwin Yonathan Jan 2009. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.id = { + labels: ['tahun','bulan','minggu','hari','jam','menit','detik'], + labels1: ['tahun','bulan','minggu','hari','jam','menit','detik'], + compactLabels: ['t','b','m','h'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.id); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-is.js b/public/js/jquery/countdown/jquery.countdown-is.js new file mode 100644 index 000000000..3840141a3 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-is.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Icelandic initialisation for the jQuery countdown extension + Written by Róbert K. L. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.is = { + labels: ['Ár','Mánuðir','Vikur','Dagar','Klukkustundir','Mínútur','Sekúndur'], + labels1: ['Ár','Mánuður','Vika','Dagur','Klukkustund','Mínúta','Sekúnda'], + compactLabels: ['ár.','mán.','vik.','dag.','klst.','mín.','sek.'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.is); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-it.js b/public/js/jquery/countdown/jquery.countdown-it.js new file mode 100644 index 000000000..09e8e16a7 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-it.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Italian initialisation for the jQuery countdown extension + * Written by Davide Bellettini (davide.bellettini@gmail.com) and Roberto Chiaveri Feb 2008. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.it = { + labels: ['Anni','Mesi','Settimane','Giorni','Ore','Minuti','Secondi'], + labels1: ['Anno','Mese','Settimana','Giorno','Ora','Minuto','Secondo'], + compactLabels: ['a','m','s','g'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.it); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ja.js b/public/js/jquery/countdown/jquery.countdown-ja.js new file mode 100644 index 000000000..0c3a7de67 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ja.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Japanese initialisation for the jQuery countdown extension + Written by Ken Ishimoto (ken@ksroom.com) Aug 2009. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ja = { + labels: ['年','月','週','日','時','分','秒'], + labels1: ['年','月','週','日','時','分','秒'], + compactLabels: ['年','月','週','日'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ja); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-kn.js b/public/js/jquery/countdown/jquery.countdown-kn.js new file mode 100644 index 000000000..b0531ff81 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-kn.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Kannada initialization for the jQuery countdown extension + * Written by Guru Chaturvedi guru@gangarasa.com (2011) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.kn = { + labels: ['ವರ್ಷಗಳು','ತಿಂಗಳು','ವಾರಗಳು','ದಿನಗಳು','ಘಂಟೆಗಳು','ನಿಮಿಷಗಳು','ಕ್ಷಣಗಳು'], + labels1: ['ವರ್ಷ','ತಿಂಗಳು','ವಾರ','ದಿನ','ಘಂಟೆ','ನಿಮಿಷ','ಕ್ಷಣ'], + compactLabels: ['ವ','ತಿ','ವಾ','ದಿ'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.kn); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ko.js b/public/js/jquery/countdown/jquery.countdown-ko.js new file mode 100644 index 000000000..a4a8e62bd --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ko.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + Korean initialisation for the jQuery countdown extension + Written by Ryan Yu (ryanyu79@gmail.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ko = { + labels: ['년','월','주','일','시','분','초'], + labels1: ['년','월','주','일','시','분','초'], + compactLabels: ['년','월','주','일'], + compactLabels1: ['년','월','주','일'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ko); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-lt.js b/public/js/jquery/countdown/jquery.countdown-lt.js new file mode 100644 index 000000000..b8f8d3a35 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-lt.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Lithuanian localisation for the jQuery countdown extension + * Written by Moacir P. de Sá Pereira (moacir{at}gmail.com) (2009) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.lt = { + labels: ['Metų','Mėnesių','Savaičių','Dienų','Valandų','Minučių','Sekundžių'], + labels1: ['Metai','Mėnuo','Savaitė','Diena','Valanda','Minutė','Sekundė'], + compactLabels: ['m','m','s','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.lt); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-lv.js b/public/js/jquery/countdown/jquery.countdown-lv.js new file mode 100644 index 000000000..83a315c13 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-lv.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + * Latvian initialisation for the jQuery countdown extension + * Written by Jānis Peisenieks janis.peisenieks@gmail.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.lv = { + labels: ['Gadi','Mēneši','Nedēļas','Dienas','Stundas','Minūtes','Sekundes'], + labels1: ['Gads','Mēnesis','Nedēļa','Diena','Stunda','Minūte','Sekunde'], + compactLabels: ['l','m','n','d'], + compactLabels1: ['g','m','n','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.lv); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-mk.js b/public/js/jquery/countdown/jquery.countdown-mk.js new file mode 100644 index 000000000..67595ee94 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-mk.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + * Macedonian initialisation for the jQuery countdown extension + * Written by Gorast Cvetkovski cvetkovski@gorast.com (2016) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.mk = { + labels: ['Години','Месеци','Недели','Дена','Часа','Минути','Секунди'], + labels1: ['Година','Месец','Недела','Ден','Час','Минута','Секунда'], + compactLabels: ['l','m','n','d'], + compactLabels1: ['g','m','n','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.mk); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ml.js b/public/js/jquery/countdown/jquery.countdown-ml.js new file mode 100644 index 000000000..54ac4d612 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ml.js @@ -0,0 +1,18 @@ +/* http://keith-wood.name/countdown.html + * Malayalam/(Indian>>Kerala) initialisation for the jQuery countdown extension + * Written by Harilal.B (harilal1234@gmail.com) Feb 2013. */ +(function($) { + 'use strict'; + /* jshint -W100 */ + $.countdown.regionalOptions.ml = { + labels: ['വര്‍ഷങ്ങള്‍','മാസങ്ങള്‍','ആഴ്ചകള്‍','ദിവസങ്ങള്‍','മണിക്കൂറുകള്‍','മിനിറ്റുകള്‍','സെക്കന്റുകള്‍'], + labels1: ['വര്‍ഷം','മാസം','ആഴ്ച','ദിവസം','മണിക്കൂര്‍','മിനിറ്റ്','സെക്കന്റ്'], + compactLabels: ['വ','മ','ആ','ദി'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], +// digits: ['൦','൧','൨','൩','൪','൫','൬','൭','൮','൯'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ml); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-ms.js b/public/js/jquery/countdown/jquery.countdown-ms.js new file mode 100644 index 000000000..7d49b7563 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ms.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Malay initialisation for the jQuery countdown extension + Written by Jason Ong (jason{at}portalgroove.com) May 2010. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ms = { + labels: ['Tahun','Bulan','Minggu','Hari','Jam','Minit','Saat'], + labels1: ['Tahun','Bulan','Minggu','Hari','Jam','Minit','Saat'], + compactLabels: ['t','b','m','h'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ms); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-my.js b/public/js/jquery/countdown/jquery.countdown-my.js new file mode 100644 index 000000000..b0eae7152 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-my.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Burmese initialisation for the jQuery countdown extension + Written by Win Lwin Moe (winnlwinmoe@gmail.com) Dec 2009. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.my = { + labels: ['နွစ္','လ','ရက္သတဿတပတ္','ရက္','နာရီ','မိနစ္','စကဿကန့္'], + labels1: ['နွစ္','လ','ရက္သတဿတပတ္','ရက္','နာရီ','မိနစ္','စကဿကန့္'], + compactLabels: ['နွစ္','လ','ရက္သတဿတပတ္','ရက္'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.my); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-nb.js b/public/js/jquery/countdown/jquery.countdown-nb.js new file mode 100644 index 000000000..4875338c5 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-nb.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Norwegian Bokmål translation + Written by Kristian Ravnevand */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.nb = { + labels: ['År','Måneder','Uker','Dager','Timer','Minutter','Sekunder'], + labels1: ['År','Måned','Uke','Dag','Time','Minutt','Sekund'], + compactLabels: ['Å','M','U','D'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.nb); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-nl.js b/public/js/jquery/countdown/jquery.countdown-nl.js new file mode 100644 index 000000000..1ab35e333 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-nl.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Dutch initialisation for the jQuery countdown extension + Written by Mathias Bynens Mar 2008. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.nl = { + labels: ['Jaren','Maanden','Weken','Dagen','Uren','Minuten','Seconden'], + labels1: ['Jaar','Maand','Week','Dag','Uur','Minuut','Seconde'], + compactLabels: ['j','m','w','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.nl); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-pl.js b/public/js/jquery/countdown/jquery.countdown-pl.js new file mode 100644 index 000000000..3890cd519 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-pl.js @@ -0,0 +1,22 @@ +/* http://keith-wood.name/countdown.html + * Polish initialisation for the jQuery countdown extension + * Written by Pawel Lewtak lewtak@gmail.com (2008) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.pl = { + labels: ['lat','miesięcy','tygodni','dni','godzin','minut','sekund'], + labels1: ['rok','miesiąc','tydzień','dzień','godzina','minuta','sekunda'], + labels2: ['lata','miesiące','tygodnie','dni','godziny','minuty','sekundy'], + compactLabels: ['l','m','t','d'], + compactLabels1: ['r','m','t','d'], + whichLabels: function(amount) { + var units = amount % 10; + var tens = Math.floor((amount % 100) / 10); + return (amount === 1 ? 1 : (units >= 2 && units <= 4 && tens !== 1 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.pl); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-pt-BR.js b/public/js/jquery/countdown/jquery.countdown-pt-BR.js new file mode 100644 index 000000000..98ec2ffc1 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-pt-BR.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + Brazilian initialisation for the jQuery countdown extension + Translated by Marcelo Pellicano de Oliveira (pellicano@gmail.com) Feb 2008. + and Juan Roldan (juan.roldan[at]relayweb.com.br) Mar 2012. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions['pt-BR'] = { + labels: ['Anos','Meses','Semanas','Dias','Horas','Minutos','Segundos'], + labels1: ['Ano','Mês','Semana','Dia','Hora','Minuto','Segundo'], + compactLabels: ['a','m','s','d'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions['pt-BR']); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ro.js b/public/js/jquery/countdown/jquery.countdown-ro.js new file mode 100644 index 000000000..4dca22b0f --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ro.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Romanian initialisation for the jQuery countdown extension + * Written by Edmond L. (webmond@gmail.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ro = { + labels: ['Ani','Luni','Saptamani','Zile','Ore','Minute','Secunde'], + labels1: ['An','Luna','Saptamana','Ziua','Ora','Minutul','Secunda'], + compactLabels: ['A','L','S','Z'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ro); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ru.js b/public/js/jquery/countdown/jquery.countdown-ru.js new file mode 100644 index 000000000..5c58cb31b --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ru.js @@ -0,0 +1,23 @@ +/* http://keith-wood.name/countdown.html + * Russian initialisation for the jQuery countdown extension + * Written by Sergey K. (xslade{at}gmail.com) June 2010. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ru = { + labels: ['Лет','Месяцев','Недель','Дней','Часов','Минут','Секунд'], + labels1: ['Год','Месяц','Неделя','День','Час','Минута','Секунда'], + labels2: ['Года','Месяца','Недели','Дня','Часа','Минуты','Секунды'], + compactLabels: ['л','м','н','д'], + compactLabels1: ['г','м','н','д'], + whichLabels: function(amount) { + var units = amount % 10; + var tens = Math.floor((amount % 100) / 10); + return (amount === 1 ? 1 : (units >= 2 && units <= 4 && tens !== 1 ? 2 : + (units === 1 && tens !== 1 ? 1 : 0))); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.ru); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-sk.js b/public/js/jquery/countdown/jquery.countdown-sk.js new file mode 100644 index 000000000..034a93d38 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sk.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Slovak initialisation for the jQuery countdown extension + * Written by Roman Chlebec (creamd@c64.sk) (2008) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.sk = { + labels: ['Rokov','Mesiacov','Týždňov','Dní','Hodín','Minút','Sekúnd'], + labels1: ['Rok','Mesiac','Týždeň','Deň','Hodina','Minúta','Sekunda'], + labels2: ['Roky','Mesiace','Týždne','Dni','Hodiny','Minúty','Sekundy'], + compactLabels: ['r','m','t','d'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.sk); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-sl.js b/public/js/jquery/countdown/jquery.countdown-sl.js new file mode 100644 index 000000000..b4311c725 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sl.js @@ -0,0 +1,22 @@ +/* http://keith-wood.name/countdown.html + * Slovenian localisation for the jQuery countdown extension + * Written by Borut Tomažin (debijan{at}gmail.com) (2011) + * updated by Jan Zavrl (jan@iuvo.si) (2015) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.sl = { + labels: ['Let','Mesecev','Tednov','Dni','Ur','Minut','Sekund'], // Plurals + labels1: ['Leto','Mesec','Teden','Dan','Ura','Minuta','Sekunda'], // Singles + labels2: ['Leti','Meseca','Tedna','Dneva','Uri','Minuti','Sekundi'], // Doubles + labels3: ['Leta','Meseci','Tedni','Dnevi','Ure','Minute','Sekunde'], // 3's + labels4: ['Leta','Meseci','Tedni','Dnevi','Ure','Minute','Sekunde'], // 4's + compactLabels: ['l','m','t','d'], + whichLabels: function(amount) { + return (amount > 4 ? 0 : amount); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.sl); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-sq.js b/public/js/jquery/countdown/jquery.countdown-sq.js new file mode 100644 index 000000000..c7e3f87f1 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sq.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Albanian initialisation for the jQuery countdown extension + Written by Erzen Komoni. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.sq = { + labels: ['Vite','Muaj','Javë','Ditë','Orë','Minuta','Sekonda'], + labels1: ['Vit','Muaj','Javë','Dit','Orë','Minutë','Sekond'], + compactLabels: ['V','M','J','D'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.sq); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-sr-SR.js b/public/js/jquery/countdown/jquery.countdown-sr-SR.js new file mode 100644 index 000000000..a3e543b00 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sr-SR.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Serbian Latin initialisation for the jQuery countdown extension + * Written by Predrag Leka lp@lemurcake.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions['sr-SR'] = { + labels: ['Godina','Meseci','Nedelja','Dana','Časova','Minuta','Sekundi'], + labels1: ['Godina','Mesec','Nedelja','Dan','Čas','Minut','Sekunda'], + labels2: ['Godine','Meseca','Nedelje','Dana','Časa','Minuta','Sekunde'], + compactLabels: ['g','m','n','d'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions['sr-SR']); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-sr.js b/public/js/jquery/countdown/jquery.countdown-sr.js new file mode 100644 index 000000000..cdfeefb84 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sr.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Serbian Cyrillic initialisation for the jQuery countdown extension + * Written by Predrag Leka lp@lemurcake.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.sr = { + labels: ['Година','Месеци','Недеља','Дана','Часова','Минута','Секунди'], + labels1: ['Година','месец','Недеља','Дан','Час','Минут','Секунда'], + labels2: ['Године','Месеца','Недеље','Дана','Часа','Минута','Секунде'], + compactLabels: ['г','м','н','д'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.sr); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-sv.js b/public/js/jquery/countdown/jquery.countdown-sv.js new file mode 100644 index 000000000..b3bf57af0 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-sv.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Swedish initialisation for the jQuery countdown extension + Written by Carl (carl@nordenfelt.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.sv = { + labels: ['År','Månader','Veckor','Dagar','Timmar','Minuter','Sekunder'], + labels1: ['År','Månad','Vecka','Dag','Timme','Minut','Sekund'], + compactLabels: ['Å','M','V','D'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.sv); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-th.js b/public/js/jquery/countdown/jquery.countdown-th.js new file mode 100644 index 000000000..179d3db87 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-th.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Thai initialisation for the jQuery countdown extension + Written by Pornchai Sakulsrimontri (li_sin_th@yahoo.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.th = { + labels: ['ปี','เดือน','สัปดาห์','วัน','ชั่วโมง','นาที','วินาที'], + labels1: ['ปี','เดือน','สัปดาห์','วัน','ชั่วโมง','นาที','วินาที'], + compactLabels: ['ปี','เดือน','สัปดาห์','วัน'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.th); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-tr.js b/public/js/jquery/countdown/jquery.countdown-tr.js new file mode 100644 index 000000000..eefc93ac0 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-tr.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html +* Turkish initialisation for the jQuery countdown extension +* Written by Bekir Ahmetoğlu (bekir@cerek.com) Aug 2008. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.tr = { + labels: ['Yıl','Ay','Hafta','Gün','Saat','Dakika','Saniye'], + labels1: ['Yıl','Ay','Hafta','Gün','Saat','Dakika','Saniye'], + compactLabels: ['y','a','h','g'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.tr); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-uk.js b/public/js/jquery/countdown/jquery.countdown-uk.js new file mode 100644 index 000000000..00365364a --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-uk.js @@ -0,0 +1,19 @@ +/* http://keith-wood.name/countdown.html + * Ukrainian initialisation for the jQuery countdown extension + * Written by Goloborodko M misha.gm@gmail.com (2009), corrections by Iгор Kоновал */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.uk = { + labels: ['Років','Місяців','Тижнів','Днів','Годин','Хвилин','Секунд'], + labels1: ['Рік','Місяць','Тиждень','День','Година','Хвилина','Секунда'], + labels2: ['Роки','Місяці','Тижні','Дні','Години','Хвилини','Секунди'], + compactLabels: ['r','m','t','d'], + whichLabels: function(amount) { + return (amount === 1 ? 1 : (amount >=2 && amount <= 4 ? 2 : 0)); + }, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.uk); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-ur.js b/public/js/jquery/countdown/jquery.countdown-ur.js new file mode 100644 index 000000000..642f8b6b2 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-ur.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + Urdu (اردو) initialisation for the jQuery countdown extension + Translated by Azhar Rasheed (azhar.rasheed19@gmail.com), November 2013. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.ur = { + labels: ['سال','مہينے','ہفتے','دن','گھنٹے','منٹس','سيکنڑز'], + labels1: ['سال','ماہ','ہفتہ','دن','گھنٹہ','منٹ','سیکنڈز'], + compactLabels: ['(ق)','سینٹ','ایک','J'], + whichLabels: null, + digits: ['٠','١','٢','٣','۴','۵','۶','۷','٨','٩'], + timeSeparator: ':', + isRTL: true + }; + $.countdown.setDefaults($.countdown.regionalOptions.ur); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-uz.js b/public/js/jquery/countdown/jquery.countdown-uz.js new file mode 100644 index 000000000..18eb174e8 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-uz.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Uzbek initialisation for the jQuery countdown extension + * Written by Alisher U. (ulugbekov{at}gmail.com) August 2012. */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.uz = { + labels: ['Yil','Oy','Hafta','Kun','Soat','Daqiqa','Soniya'], + labels1: ['Yil','Oy','Hafta','Kun','Soat','Daqiqa','Soniya'], + compactLabels: ['y','o','h','k'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.uz); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-vi.js b/public/js/jquery/countdown/jquery.countdown-vi.js new file mode 100644 index 000000000..70a7bf7cc --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-vi.js @@ -0,0 +1,16 @@ +/* http://keith-wood.name/countdown.html + * Vietnamese initialisation for the jQuery countdown extension + * Written by Pham Tien Hung phamtienhung@gmail.com (2010) */ +(function($) { + 'use strict'; + $.countdown.regionalOptions.vi = { + labels: ['Năm','Tháng','Tuần','Ngày','Giờ','Phút','Giây'], + labels1: ['Năm','Tháng','Tuần','Ngày','Giờ','Phút','Giây'], + compactLabels: ['năm','th','tu','ng'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions.vi); +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown-zh-CN.js b/public/js/jquery/countdown/jquery.countdown-zh-CN.js new file mode 100644 index 000000000..1cac90f7f --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-zh-CN.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + Simplified Chinese initialisation for the jQuery countdown extension + Written by Cloudream (cloudream@gmail.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions['zh-CN'] = { + labels: ['年','月','周','天','时','分','秒'], + labels1: ['年','月','周','天','时','分','秒'], + compactLabels: ['年','月','周','天'], + compactLabels1: ['年','月','周','天'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions['zh-CN']); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown-zh-TW.js b/public/js/jquery/countdown/jquery.countdown-zh-TW.js new file mode 100644 index 000000000..c31c407a0 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown-zh-TW.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + Traditional Chinese initialisation for the jQuery countdown extension + Written by Cloudream (cloudream@gmail.com). */ +(function($) { + 'use strict'; + $.countdown.regionalOptions['zh-TW'] = { + labels: ['年','月','周','天','時','分','秒'], + labels1: ['年','月','周','天','時','分','秒'], + compactLabels: ['年','月','周','天'], + compactLabels1: ['年','月','周','天'], + whichLabels: null, + digits: ['0','1','2','3','4','5','6','7','8','9'], + timeSeparator: ':', + isRTL: false + }; + $.countdown.setDefaults($.countdown.regionalOptions['zh-TW']); +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown.js b/public/js/jquery/countdown/jquery.countdown.js new file mode 100644 index 000000000..5a77d227a --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown.js @@ -0,0 +1,964 @@ +/*! http://keith-wood.name/countdown.html + Countdown for jQuery v2.1.0. + Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2008. + Available under the MIT (http://keith-wood.name/licence.html) license. + Please attribute the author if you use it. */ + +(function($) { // Hide scope, no $ conflict + 'use strict'; + + var pluginName = 'countdown'; + + var Y = 0; // Years + var O = 1; // Months + var W = 2; // Weeks + var D = 3; // Days + var H = 4; // Hours + var M = 5; // Minutes + var S = 6; // Seconds + + /** Create the countdown plugin. +

Sets an element to show the time remaining until a given instant.

+

Expects HTML like:

+
<div></div>
+

Provide inline configuration like:

+
<div data-countdown="name: 'value', ..."></div>
+ @module Countdown + @augments JQPlugin + @example $(selector).countdown({until: +300}) */ + $.JQPlugin.createPlugin({ + + /** The name of the plugin. + @default 'countdown' */ + name: pluginName, + + /** Countdown expiry callback. + Used with the {@linkcode module:Countdown~defaultOptions|onExpiry} option and + triggered when the countdown expires. + @global + @callback CountdownExpiryCallback + @this Element + @example onExpiry: function() { + alert('Done'); +} */ + + /** Countdown server synchronisation callback. + Used with the {@linkcode module:Countdown~defaultOptions|serverSync} option and + triggered when the countdown is initialised. + @global + @callback CountdownServerSyncCallback + @return {Date} The current date/time on the server as expressed in the local timezone. + @this $.countdown + @example serverSync: function() { + var time = null; + $.ajax({url: 'http://myserver.com/serverTime.php', + async: false, dataType: 'text', + success: function(text) { + time = new Date(text); + }, error: function(http, message, exc) { + time = new Date(); + }); + return time; +} */ + + /** Countdown tick callback. + Used with the {@linkcode module:Countdown~defaultOptions|onTick} option and + triggered on every {@linkcode module:Countdown~defaultOptions|tickInterval} ticks of the countdown. + @global + @callback CountdownTickCallback + @this Element + @param {number[]} periods The breakdown by period (years, months, weeks, days, + hours, minutes, seconds) of the time remaining/passed. + @example onTick: function(periods) { + $('#altTime').text(periods[4] + ':' + twoDigits(periods[5]) + + ':' + twoDigits(periods[6])); +} */ + + /** Countdown which labels callback. + Used with the {@linkcode module:Countdown~regionalOptions|whichLabels} option and + triggered when the countdown is being display to determine which set of labels + (labels, labels1, ...) are to be used for the current period value. + @global + @callback CountdownWhichLabelsCallback + @param {number} num The current period value. + @return {number} The suffix for the label set to use, or zero for the default labels. + @example whichLabels: function(num) { + return (num === 1 ? 1 : (num >= 2 && num <= 4 ? 2 : 0)); +} */ + + /** Default settings for the plugin. + @property {Date|number|string} [until] The date/time to count down to, or number of seconds + offset from now, or string of amounts and units for offset(s) from now: + 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. + One of until or since must be specified. + If both are given since takes precedence. + @example until: new Date(2013, 12-1, 25, 13, 30) +until: +300 +until: '+1O -2D' + @property {Date|number|string} [since] The date/time to count up from, or number of seconds + offset from now, or string of amounts and units for offset(s) from now: + 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. + One of until or since must be specified. + If both are given since takes precedence. + @example since: new Date(2013, 1-1, 1) +since: -300 +since: '-1O +2D' + @property {number} [timezone=null] The timezone (hours or minutes from GMT) for the target times, + or null for client local timezone. + @example timezone: +10 +timezone: -60 + @property {CountdownServerSyncCallback} [serverSync=null] A function to retrieve the current server time + for synchronisation. + @property {string} [format='dHMS'] The format for display - upper case to always show, + lower case to show only if non-zero, + 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds. + @property {string} [layout='']

Build your own layout for the countdown.

+

Indicate substitution points with '{desc}' for the description, '{sep}' for the time separator, + '{pv}' where p is 'y' for years, 'o' for months, 'w' for weeks, 'd' for days, + 'h' for hours, 'm' for minutes, or 's' for seconds and v is 'n' for the period value, + 'nn' for the period value with a minimum of two digits, + 'nnn' for the period value with a minimum of three digits, or + 'l' for the period label (long or short form depending on the compact setting), or + '{pd}' where p is as above and d is '1' for the units digit, '10' for the tens digit, + '100' for the hundreds digit, or '1000' for the thousands digit.

+

If you need to exclude entire sections when the period value is zero and + you have specified the period as optional, surround these sections with + '{p<}' and '{p>}', where p is the same as above.

+

Your layout can just be simple text, or can contain HTML markup as well.

+ @example layout: '{d<}{dn} {dl}{d>} {hnn}:{mnn}:{snn}' + @property {boolean} [compact=false] true to display in a compact format, + false for an expanded one. + @property {boolean} [padZeroes=false] true to add leading zeroes. + @property {number} [significant=0] The maximum number of periods with non-zero values to show, zero for all. + @property {string} [description=''] The description displayed for the countdown. + @property {string} [expiryUrl=''] A URL to load upon expiry, replacing the current page. + @property {string} [expiryText=''] Text to display upon expiry, replacing the countdown. This may be HTML. + @property {boolean} [alwaysExpire=false] true to trigger onExpiry + even if the target time has passed. + @property {CountdownExpiryCallback} [onExpiry=null] Callback when the countdown expires - + receives no parameters and this is the containing element. + @example onExpiry: function() { + ... +} + @property {CountdownTickCallback} [onTick=null] Callback when the countdown is updated - + receives number[7] being the breakdown by period + (years, months, weeks, days, hours, minutes, seconds - based on + format) and this is the containing element. + @example onTick: function(periods) { + var secs = $.countdown.periodsToSeconds(periods); + if (secs < 300) { // Last five minutes + ... + } +} + @property {number} [tickInterval=1] The interval (seconds) between onTick callbacks. */ + 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 + }, + + /** Localisations for the plugin. + Entries are objects indexed by the language code ('' being the default US/English). + Each object has the following attributes. + @property {string[]} [labels=['Years','Months','Weeks','Days','Hours','Minutes','Seconds']] + The display texts for the counter periods. + @property {string[]} [labels1=['Year','Month','Week','Day','Hour','Minute','Second']] + The display texts for the counter periods if they have a value of 1. + Add other labelsn attributes as necessary to + cater for other numeric idiosyncrasies of the localisation. + @property {string[]}[compactLabels=['y','m','w','d']] The compact texts for the counter periods. + @property {CountdownWhichLabelsCallback} [whichLabels=null] A function to determine which + labelsn to use. + @example whichLabels: function(num) { + return (num > 1 ? 0 : 1); +} + @property {string[]} [digits=['0','1',...,'9']] The digits to display (0-9). + @property {string} [timeSeparator=':'] Separator for time periods in the compact layout. + @property {boolean} [isRTL=false] true for right-to-left languages, + false for left-to-right. */ + regionalOptions: { // Available regional settings, indexed by language/country code + '': { // Default regional settings - English/US + 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 + } + }, + + /* Class name for the right-to-left marker. */ + _rtlClass: pluginName + '-rtl', + /* Class name for the countdown section marker. */ + _sectionClass: pluginName + '-section', + /* Class name for the period amount marker. */ + _amountClass: pluginName + '-amount', + /* Class name for the period name marker. */ + _periodClass: pluginName + '-period', + /* Class name for the countdown row marker. */ + _rowClass: pluginName + '-row', + /* Class name for the holding countdown marker. */ + _holdingClass: pluginName + '-holding', + /* Class name for the showing countdown marker. */ + _showClass: pluginName + '-show', + /* Class name for the description marker. */ + _descrClass: pluginName + '-descr', + + /* List of currently active countdown elements. */ + _timerElems: [], + + /** Additional setup for the countdown. + Apply default localisations. + Create the timer. + @private */ + _init: function() { + var self = this; + this._super(); + this._serverSyncs = []; + var now = (typeof Date.now === 'function' ? Date.now : function() { return new Date().getTime(); }); + var perfAvail = (window.performance && typeof window.performance.now === 'function'); + // Shared timer for all countdowns + function timerCallBack(timestamp) { + var drawStart = (timestamp < 1e12 ? // New HTML5 high resolution timer + (perfAvail ? (window.performance.now() + window.performance.timing.navigationStart) : now()) : + // Integer milliseconds since unix epoch + timestamp || now()); + if (drawStart - animationStartTime >= 1000) { + self._updateElems(); + animationStartTime = drawStart; + } + requestAnimationFrame(timerCallBack); + } + var requestAnimationFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || window.msRequestAnimationFrame || null; + // This is when we expect a fall-back to setInterval as it's much more fluid + var animationStartTime = 0; + if (!requestAnimationFrame || $.noRequestAnimationFrame) { + $.noRequestAnimationFrame = null; + // Fall back to good old setInterval + $.countdown._timer = setInterval(function() { self._updateElems(); }, 1000); + } + else { + animationStartTime = window.animationStartTime || + window.webkitAnimationStartTime || window.mozAnimationStartTime || + window.oAnimationStartTime || window.msAnimationStartTime || now(); + requestAnimationFrame(timerCallBack); + } + }, + + /** Convert a date/time to UTC. + @param {number} tz The hour or minute offset from GMT, e.g. +9, -360. + @param {Date|number} year the date/time in that timezone or the year in that timezone. + @param {number} [month] The month (0 - 11) (omit if year is a Date). + @param {number} [day] The day (omit if year is a Date). + @param {number} [hours] The hour (omit if year is a Date). + @param {number} [mins] The minute (omit if year is a Date). + @param {number} [secs] The second (omit if year is a Date). + @param {number} [ms] The millisecond (omit if year is a Date). + @return {Date} The equivalent UTC date/time. + @example $.countdown.UTCDate(+10, 2013, 12-1, 25, 12, 0) +$.countdown.UTCDate(-7, new Date(2013, 12-1, 25, 12, 0)) */ + UTCDate: function(tz, year, month, day, hours, mins, secs, ms) { + if (typeof year === 'object' && year instanceof Date) { + ms = year.getMilliseconds(); + secs = year.getSeconds(); + mins = year.getMinutes(); + hours = year.getHours(); + day = year.getDate(); + month = year.getMonth(); + year = year.getFullYear(); + } + var d = new Date(); + d.setUTCFullYear(year); + d.setUTCDate(1); + d.setUTCMonth(month || 0); + d.setUTCDate(day || 1); + d.setUTCHours(hours || 0); + d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz)); + d.setUTCSeconds(secs || 0); + d.setUTCMilliseconds(ms || 0); + return d; + }, + + /** Convert a set of periods into seconds. + Averaged for months and years. + @param {number[]} periods The periods per year/month/week/day/hour/minute/second. + @return {number} The corresponding number of seconds. + @example var secs = $.countdown.periodsToSeconds(periods) */ + periodsToSeconds: function(periods) { + return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 + + periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6]; + }, + + /** Resynchronise the countdowns with the server. + @example $.countdown.resync() */ + resync: function() { + var self = this; + $('.' + this._getMarker()).each(function() { // Each countdown + var inst = $.data(this, self.name); + if (inst.options.serverSync) { // If synced + var serverSync = null; + for (var i = 0; i < self._serverSyncs.length; i++) { + if (self._serverSyncs[i][0] === inst.options.serverSync) { // Find sync details + serverSync = self._serverSyncs[i]; + break; + } + } + if (self._eqNull(serverSync[2])) { // Recalculate if missing + var serverResult = ($.isFunction(inst.options.serverSync) ? + inst.options.serverSync.apply(this, []) : null); + serverSync[2] = + (serverResult ? new Date().getTime() - serverResult.getTime() : 0) - serverSync[1]; + } + if (inst._since) { // Apply difference + inst._since.setMilliseconds(inst._since.getMilliseconds() + serverSync[2]); + } + inst._until.setMilliseconds(inst._until.getMilliseconds() + serverSync[2]); + } + }); + for (var i = 0; i < self._serverSyncs.length; i++) { // Update sync details + if (!self._eqNull(self._serverSyncs[i][2])) { + self._serverSyncs[i][1] += self._serverSyncs[i][2]; + delete self._serverSyncs[i][2]; + } + } + }, + + _instSettings: function(elem, options) { // jshint unused:false + return {_periods: [0, 0, 0, 0, 0, 0, 0]}; + }, + + /** Add an element to the list of active ones. + @private + @param {Element} elem The countdown element. */ + _addElem: function(elem) { + if (!this._hasElem(elem)) { + this._timerElems.push(elem); + } + }, + + /** See if an element is in the list of active ones. + @private + @param {Element} elem The countdown element. + @return {boolean} true if present, false if not. */ + _hasElem: function(elem) { + return ($.inArray(elem, this._timerElems) > -1); + }, + + /** Remove an element from the list of active ones. + @private + @param {Element} elem The countdown element. */ + _removeElem: function(elem) { + this._timerElems = $.map(this._timerElems, + function(value) { return (value === elem ? null : value); }); // delete entry + }, + + /** Update each active timer element. + @private */ + _updateElems: function() { + for (var i = this._timerElems.length - 1; i >= 0; i--) { + this._updateCountdown(this._timerElems[i]); + } + }, + + _optionsChanged: function(elem, inst, options) { + if (options.layout) { + options.layout = options.layout.replace(/</g, '<').replace(/>/g, '>'); + } + this._resetExtraLabels(inst.options, options); + var timezoneChanged = (inst.options.timezone !== options.timezone); + $.extend(inst.options, options); + this._adjustSettings(elem, inst, + !this._eqNull(options.until) || !this._eqNull(options.since) || timezoneChanged); + var now = new Date(); + if ((inst._since && inst._since < now) || (inst._until && inst._until > now)) { + this._addElem(elem[0]); + } + this._updateCountdown(elem, inst); + }, + + /** Redisplay the countdown with an updated display. + @private + @param {Element|jQuery} elem The containing element. + @param {object} inst The current settings for this instance. */ + _updateCountdown: function(elem, inst) { + elem = elem.jquery ? elem : $(elem); + inst = inst || this._getInst(elem); + if (!inst) { + return; + } + elem.html(this._generateHTML(inst)).toggleClass(this._rtlClass, inst.options.isRTL); + if (inst._hold !== 'pause' && $.isFunction(inst.options.onTick)) { + var periods = inst._hold !== 'lap' ? inst._periods : + this._calculatePeriods(inst, inst._show, inst.options.significant, new Date()); + if (inst.options.tickInterval === 1 || + this.periodsToSeconds(periods) % inst.options.tickInterval === 0) { + inst.options.onTick.apply(elem[0], [periods]); + } + } + var expired = inst._hold !== 'pause' && + (inst._since ? inst._now.getTime() < inst._since.getTime() : + inst._now.getTime() >= inst._until.getTime()); + if (expired && !inst._expiring) { + inst._expiring = true; + if (this._hasElem(elem[0]) || inst.options.alwaysExpire) { + this._removeElem(elem[0]); + if ($.isFunction(inst.options.onExpiry)) { + inst.options.onExpiry.apply(elem[0], []); + } + if (inst.options.expiryText) { + var layout = inst.options.layout; + inst.options.layout = inst.options.expiryText; + this._updateCountdown(elem[0], inst); + inst.options.layout = layout; + } + if (inst.options.expiryUrl) { + window.location = inst.options.expiryUrl; + } + } + inst._expiring = false; + } + else if (inst._hold === 'pause') { + this._removeElem(elem[0]); + } + }, + + /** Reset any extra labelsn and compactLabelsn entries if changing labels. + @private + @param {object} base The options to be updated. + @param {object} options The new option values. */ + _resetExtraLabels: function(base, options) { + var n = null; + for (n in options) { + if (n.match(/[Ll]abels[02-9]|compactLabels1/)) { + base[n] = options[n]; + } + } + for (n in base) { // Remove custom numbered labels + if (n.match(/[Ll]abels[02-9]|compactLabels1/) && typeof options[n] === 'undefined') { + base[n] = null; + } + } + }, + + /** Determine whether or not a value is equivalent to null. + @private + @param {object} value The value to test. + @return {boolean} true if equivalent to null, false if not. */ + _eqNull: function(value) { + return typeof value === 'undefined' || value === null; + }, + + + /** Calculate internal settings for an instance. + @private + @param {jQuery} elem The containing element. + @param {object} inst The current settings for this instance. + @param {boolean} recalc true if until or since are set. */ + _adjustSettings: function(elem, inst, recalc) { + var serverEntry = null; + for (var i = 0; i < this._serverSyncs.length; i++) { + if (this._serverSyncs[i][0] === inst.options.serverSync) { + serverEntry = this._serverSyncs[i][1]; + break; + } + } + var now = null; + var serverOffset = null; + if (!this._eqNull(serverEntry)) { + now = new Date(); + serverOffset = (inst.options.serverSync ? serverEntry : 0); + } + else { + var serverResult = ($.isFunction(inst.options.serverSync) ? + inst.options.serverSync.apply(elem[0], []) : null); + now = new Date(); + serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0); + this._serverSyncs.push([inst.options.serverSync, serverOffset]); + } + var timezone = inst.options.timezone; + timezone = (this._eqNull(timezone) ? -now.getTimezoneOffset() : timezone); + if (recalc || (!recalc && this._eqNull(inst._until) && this._eqNull(inst._since))) { + inst._since = inst.options.since; + if (!this._eqNull(inst._since)) { + inst._since = this.UTCDate(timezone, this._determineTime(inst._since, null)); + if (inst._since && serverOffset) { + inst._since.setMilliseconds(inst._since.getMilliseconds() + serverOffset); + } + } + inst._until = this.UTCDate(timezone, this._determineTime(inst.options.until, now)); + if (serverOffset) { + inst._until.setMilliseconds(inst._until.getMilliseconds() + serverOffset); + } + } + inst._show = this._determineShow(inst); + }, + + /** Remove the countdown widget from an element. + @private + @param {jQuery} elem The containing element. + @param {object} inst The current instance object. */ + _preDestroy: function(elem, inst) { // jshint unused:false + this._removeElem(elem[0]); + elem.empty(); + }, + + /** Pause a countdown widget at the current time. + Stop it running but remember and display the current time. + @param {Element} elem The containing element. + @example $(selector).countdown('pause') */ + pause: function(elem) { + this._hold(elem, 'pause'); + }, + + /** Pause a countdown widget at the current time. + Stop the display but keep the countdown running. + @param {Element} elem The containing element. + @example $(selector).countdown('lap') */ + lap: function(elem) { + this._hold(elem, 'lap'); + }, + + /** Resume a paused countdown widget. + @param {Element} elem The containing element. + @example $(selector).countdown('resume') */ + resume: function(elem) { + this._hold(elem, null); + }, + + /** Toggle a paused countdown widget. + @param {Element} elem The containing element. + @example $(selector).countdown('toggle') */ + toggle: function(elem) { + var inst = $.data(elem, this.name) || {}; + this[!inst._hold ? 'pause' : 'resume'](elem); + }, + + /** Toggle a lapped countdown widget. + @param {Element} elem The containing element. + @example $(selector).countdown('toggleLap') */ + toggleLap: function(elem) { + var inst = $.data(elem, this.name) || {}; + this[!inst._hold ? 'lap' : 'resume'](elem); + }, + + /** Pause or resume a countdown widget. + @private + @param {Element} elem The containing element. + @param {string} hold The new hold setting. */ + _hold: function(elem, hold) { + var inst = $.data(elem, this.name); + if (inst) { + if (inst._hold === 'pause' && !hold) { + inst._periods = inst._savePeriods; + var sign = (inst._since ? '-' : '+'); + inst[inst._since ? '_since' : '_until'] = + this._determineTime(sign + inst._periods[0] + 'y' + + sign + inst._periods[1] + 'o' + sign + inst._periods[2] + 'w' + + sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' + + sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's'); + this._addElem(elem); + } + inst._hold = hold; + inst._savePeriods = (hold === 'pause' ? inst._periods : null); + $.data(elem, this.name, inst); + this._updateCountdown(elem, inst); + } + }, + + /** Return the current time periods, broken down by years, months, weeks, days, hours, minutes, and seconds. + @param {Element} elem The containing element. + @return {number[]} The current periods for the countdown. + @example var periods = $(selector).countdown('getTimes') */ + getTimes: function(elem) { + var inst = $.data(elem, this.name); + return (!inst ? null : (inst._hold === 'pause' ? inst._savePeriods : (!inst._hold ? inst._periods : + this._calculatePeriods(inst, inst._show, inst.options.significant, new Date())))); + }, + + /** A time may be specified as an exact value or a relative one. + @private + @param {string|number|Date} setting The date/time value as a relative or absolute value. + @param {Date} defaultTime The date/time to use if no other is supplied. + @return {Date} The corresponding date/time. */ + _determineTime: function(setting, defaultTime) { + var self = this; + var offsetNumeric = function(offset) { // e.g. +300, -2 + var time = new Date(); + time.setTime(time.getTime() + offset * 1000); + return time; + }; + var offsetString = function(offset) { // e.g. '+2d', '-4w', '+3h +30m' + offset = offset.toLowerCase(); + var time = new Date(); + var year = time.getFullYear(); + var month = time.getMonth(); + var day = time.getDate(); + var hour = time.getHours(); + var minute = time.getMinutes(); + var second = time.getSeconds(); + var pattern = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g; + var matches = pattern.exec(offset); + while (matches) { + switch (matches[2] || 's') { + case 's': + second += parseInt(matches[1], 10); + break; + case 'm': + minute += parseInt(matches[1], 10); + break; + case 'h': + hour += parseInt(matches[1], 10); + break; + case 'd': + day += parseInt(matches[1], 10); + break; + case 'w': + day += parseInt(matches[1], 10) * 7; + break; + case 'o': + month += parseInt(matches[1], 10); + day = Math.min(day, self._getDaysInMonth(year, month)); + break; + case 'y': + year += parseInt(matches[1], 10); + day = Math.min(day, self._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day, hour, minute, second, 0); + }; + var time = (this._eqNull(setting) ? defaultTime : + (typeof setting === 'string' ? offsetString(setting) : + (typeof setting === 'number' ? offsetNumeric(setting) : setting))); + if (time) { + time.setMilliseconds(0); + } + return time; + }, + + /** Determine the number of days in a month. + @private + @param {number} year The year. + @param {number} month The month. + @return {number} The days in that month. */ + _getDaysInMonth: function(year, month) { + return 32 - new Date(year, month, 32).getDate(); + }, + + /** Default implementation to determine which set of labels should be used for an amount. + Use the labels attribute with the same numeric suffix (if it exists). + @private + @param {number} num The amount to be displayed. + @return {number} The set of labels to be used for this amount. */ + _normalLabels: function(num) { + return num; + }, + + /** Generate the HTML to display the countdown widget. + @private + @param {object} inst The current settings for this instance. + @return {string} The new HTML for the countdown display. */ + _generateHTML: function(inst) { + var self = this; + // Determine what to show + inst._periods = (inst._hold ? inst._periods : + this._calculatePeriods(inst, inst._show, inst.options.significant, new Date())); + // Show all 'asNeeded' after first non-zero value + var shownNonZero = false; + var showCount = 0; + var sigCount = inst.options.significant; + var show = $.extend({}, inst._show); + var period = null; + for (period = Y; period <= S; period++) { + shownNonZero = shownNonZero || (inst._show[period] === '?' && inst._periods[period] > 0); + show[period] = (inst._show[period] === '?' && !shownNonZero ? null : inst._show[period]); + showCount += (show[period] ? 1 : 0); + sigCount -= (inst._periods[period] > 0 ? 1 : 0); + } + var showSignificant = [false, false, false, false, false, false, false]; + for (period = S; period >= Y; period--) { // Determine significant periods + if (inst._show[period]) { + if (inst._periods[period]) { + showSignificant[period] = true; + } + else { + showSignificant[period] = sigCount > 0; + sigCount--; + } + } + } + var labels = (inst.options.compact ? inst.options.compactLabels : inst.options.labels); + var whichLabels = inst.options.whichLabels || this._normalLabels; + var showCompact = function(period) { + var labelsNum = inst.options['compactLabels' + whichLabels(inst._periods[period])]; + return (show[period] ? self._translateDigits(inst, inst._periods[period]) + + (labelsNum ? labelsNum[period] : labels[period]) + ' ' : ''); + }; + var minDigits = (inst.options.padZeroes ? 2 : 1); + var showFull = function(period) { + var labelsNum = inst.options['labels' + whichLabels(inst._periods[period])]; + return ((!inst.options.significant && show[period]) || + (inst.options.significant && showSignificant[period]) ? + '' + + '' + + self._minDigits(inst, inst._periods[period], minDigits) + '' + + '' + + (labelsNum ? labelsNum[period] : labels[period]) + '' : ''); + }; + return (inst.options.layout ? this._buildLayout(inst, show, inst.options.layout, + inst.options.compact, inst.options.significant, showSignificant) : + ((inst.options.compact ? // Compact version + '' + + showCompact(Y) + showCompact(O) + showCompact(W) + showCompact(D) + + (show[H] ? this._minDigits(inst, inst._periods[H], 2) : '') + + (show[M] ? (show[H] ? inst.options.timeSeparator : '') + + this._minDigits(inst, inst._periods[M], 2) : '') + + (show[S] ? (show[H] || show[M] ? inst.options.timeSeparator : '') + + this._minDigits(inst, inst._periods[S], 2) : '') : + // Full version + '' + + showFull(Y) + showFull(O) + showFull(W) + showFull(D) + + showFull(H) + showFull(M) + showFull(S)) + '' + + (inst.options.description ? '' + + inst.options.description + '' : ''))); + }, + + /** Construct a custom layout. + @private + @param {object} inst The current settings for this instance. + @param {boolean[]} show Flags indicating which periods are requested. + @param {string} layout The customised layout. + @param {boolean} compact true if using compact labels. + @param {number} significant The number of periods with values to show, zero for all. + @param {boolean[]} showSignificant Other periods to show for significance. + @return {string} The custom HTML. */ + _buildLayout: function(inst, show, layout, compact, significant, showSignificant) { + var labels = inst.options[compact ? 'compactLabels' : 'labels']; + var whichLabels = inst.options.whichLabels || this._normalLabels; + var labelFor = function(index) { + return (inst.options[(compact ? 'compactLabels' : 'labels') + + whichLabels(inst._periods[index])] || labels)[index]; + }; + var digit = function(value, position) { + return inst.options.digits[Math.floor(value / position) % 10]; + }; + var subs = {desc: inst.options.description, sep: inst.options.timeSeparator, + yl: labelFor(Y), yn: this._minDigits(inst, inst._periods[Y], 1), + ynn: this._minDigits(inst, inst._periods[Y], 2), + ynnn: this._minDigits(inst, inst._periods[Y], 3), y1: digit(inst._periods[Y], 1), + y10: digit(inst._periods[Y], 10), y100: digit(inst._periods[Y], 100), + y1000: digit(inst._periods[Y], 1000), + ol: labelFor(O), on: this._minDigits(inst, inst._periods[O], 1), + onn: this._minDigits(inst, inst._periods[O], 2), + onnn: this._minDigits(inst, inst._periods[O], 3), o1: digit(inst._periods[O], 1), + o10: digit(inst._periods[O], 10), o100: digit(inst._periods[O], 100), + o1000: digit(inst._periods[O], 1000), + wl: labelFor(W), wn: this._minDigits(inst, inst._periods[W], 1), + wnn: this._minDigits(inst, inst._periods[W], 2), + wnnn: this._minDigits(inst, inst._periods[W], 3), w1: digit(inst._periods[W], 1), + w10: digit(inst._periods[W], 10), w100: digit(inst._periods[W], 100), + w1000: digit(inst._periods[W], 1000), + dl: labelFor(D), dn: this._minDigits(inst, inst._periods[D], 1), + dnn: this._minDigits(inst, inst._periods[D], 2), + dnnn: this._minDigits(inst, inst._periods[D], 3), d1: digit(inst._periods[D], 1), + d10: digit(inst._periods[D], 10), d100: digit(inst._periods[D], 100), + d1000: digit(inst._periods[D], 1000), + hl: labelFor(H), hn: this._minDigits(inst, inst._periods[H], 1), + hnn: this._minDigits(inst, inst._periods[H], 2), + hnnn: this._minDigits(inst, inst._periods[H], 3), h1: digit(inst._periods[H], 1), + h10: digit(inst._periods[H], 10), h100: digit(inst._periods[H], 100), + h1000: digit(inst._periods[H], 1000), + ml: labelFor(M), mn: this._minDigits(inst, inst._periods[M], 1), + mnn: this._minDigits(inst, inst._periods[M], 2), + mnnn: this._minDigits(inst, inst._periods[M], 3), m1: digit(inst._periods[M], 1), + m10: digit(inst._periods[M], 10), m100: digit(inst._periods[M], 100), + m1000: digit(inst._periods[M], 1000), + sl: labelFor(S), sn: this._minDigits(inst, inst._periods[S], 1), + snn: this._minDigits(inst, inst._periods[S], 2), + snnn: this._minDigits(inst, inst._periods[S], 3), s1: digit(inst._periods[S], 1), + s10: digit(inst._periods[S], 10), s100: digit(inst._periods[S], 100), + s1000: digit(inst._periods[S], 1000)}; + var html = layout; + // Replace period containers: {p<}...{p>} + for (var i = Y; i <= S; i++) { + var period = 'yowdhms'.charAt(i); + var re = new RegExp('\\{' + period + '<\\}([\\s\\S]*)\\{' + period + '>\\}', 'g'); + html = html.replace(re, ((!significant && show[i]) || + (significant && showSignificant[i]) ? '$1' : '')); + } + // Replace period values: {pn} + $.each(subs, function(n, v) { + var re = new RegExp('\\{' + n + '\\}', 'g'); + html = html.replace(re, v); + }); + return html; + }, + + /** Ensure a numeric value has at least n digits for display. + @private + @param {object} inst The current settings for this instance. + @param {number} value The value to display. + @param {number} len The minimum length. + @return {string} The display text. */ + _minDigits: function(inst, value, len) { + value = '' + value; + if (value.length >= len) { + return this._translateDigits(inst, value); + } + value = '0000000000' + value; + return this._translateDigits(inst, value.substr(value.length - len)); + }, + + /** Translate digits into other representations. + @private + @param {object} inst The current settings for this instance. + @param {string} value The text to translate. + @return {string} The translated text. */ + _translateDigits: function(inst, value) { + return ('' + value).replace(/[0-9]/g, function(digit) { + return inst.options.digits[digit]; + }); + }, + + /** Translate the format into flags for each period. + @private + @param {object} inst The current settings for this instance. + @return {string[]} Flags indicating which periods are requested (?) or + required (!) by year, month, week, day, hour, minute, second. */ + _determineShow: function(inst) { + var format = inst.options.format; + var show = []; + show[Y] = (format.match('y') ? '?' : (format.match('Y') ? '!' : null)); + show[O] = (format.match('o') ? '?' : (format.match('O') ? '!' : null)); + show[W] = (format.match('w') ? '?' : (format.match('W') ? '!' : null)); + show[D] = (format.match('d') ? '?' : (format.match('D') ? '!' : null)); + show[H] = (format.match('h') ? '?' : (format.match('H') ? '!' : null)); + show[M] = (format.match('m') ? '?' : (format.match('M') ? '!' : null)); + show[S] = (format.match('s') ? '?' : (format.match('S') ? '!' : null)); + return show; + }, + + /** Calculate the requested periods between now and the target time. + @private + @param {object} inst The current settings for this instance. + @param {string[]} show Flags indicating which periods are requested/required. + @param {number} significant The number of periods with values to show, zero for all. + @param {Date} now The current date and time. + @return {number[]} The current time periods (always positive) + by year, month, week, day, hour, minute, second. */ + _calculatePeriods: function(inst, show, significant, now) { + // Find endpoints + inst._now = now; + inst._now.setMilliseconds(0); + var until = new Date(inst._now.getTime()); + if (inst._since) { + if (now.getTime() < inst._since.getTime()) { + inst._now = now = until; + } + else { + now = inst._since; + } + } + else { + until.setTime(inst._until.getTime()); + if (now.getTime() > inst._until.getTime()) { + inst._now = now = until; + } + } + // Calculate differences by period + var periods = [0, 0, 0, 0, 0, 0, 0]; + if (show[Y] || show[O]) { + // Treat end of months as the same + var lastNow = this._getDaysInMonth(now.getFullYear(), now.getMonth()); + var lastUntil = this._getDaysInMonth(until.getFullYear(), until.getMonth()); + var sameDay = (until.getDate() === now.getDate() || + (until.getDate() >= Math.min(lastNow, lastUntil) && + now.getDate() >= Math.min(lastNow, lastUntil))); + var getSecs = function(date) { + return (date.getHours() * 60 + date.getMinutes()) * 60 + date.getSeconds(); + }; + var months = Math.max(0, + (until.getFullYear() - now.getFullYear()) * 12 + until.getMonth() - now.getMonth() + + ((until.getDate() < now.getDate() && !sameDay) || + (sameDay && getSecs(until) < getSecs(now)) ? -1 : 0)); + periods[Y] = (show[Y] ? Math.floor(months / 12) : 0); + periods[O] = (show[O] ? months - periods[Y] * 12 : 0); + // Adjust for months difference and end of month if necessary + now = new Date(now.getTime()); + var wasLastDay = (now.getDate() === lastNow); + var lastDay = this._getDaysInMonth(now.getFullYear() + periods[Y], + now.getMonth() + periods[O]); + if (now.getDate() > lastDay) { + now.setDate(lastDay); + } + now.setFullYear(now.getFullYear() + periods[Y]); + now.setMonth(now.getMonth() + periods[O]); + if (wasLastDay) { + now.setDate(lastDay); + } + } + var diff = Math.floor((until.getTime() - now.getTime()) / 1000); + var period = null; + var extractPeriod = function(period, numSecs) { + periods[period] = (show[period] ? Math.floor(diff / numSecs) : 0); + diff -= periods[period] * numSecs; + }; + extractPeriod(W, 604800); + extractPeriod(D, 86400); + extractPeriod(H, 3600); + extractPeriod(M, 60); + extractPeriod(S, 1); + if (diff > 0 && !inst._since) { // Round up if left overs + var multiplier = [1, 12, 4.3482, 7, 24, 60, 60]; + var lastShown = S; + var max = 1; + for (period = S; period >= Y; period--) { + if (show[period]) { + if (periods[lastShown] >= max) { + periods[lastShown] = 0; + diff = 1; + } + if (diff > 0) { + periods[period]++; + diff = 0; + lastShown = period; + max = 1; + } + } + max *= multiplier[period]; + } + } + if (significant) { // Zero out insignificant periods + for (period = Y; period <= S; period++) { + if (significant && periods[period]) { + significant--; + } + else if (!significant) { + periods[period] = 0; + } + } + } + return periods; + } + }); + +})(jQuery); diff --git a/public/js/jquery/countdown/jquery.countdown.min.js b/public/js/jquery/countdown/jquery.countdown.min.js new file mode 100644 index 000000000..e554c375a --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown.min.js @@ -0,0 +1,7 @@ +/*! http://keith-wood.name/countdown.html + Countdown for jQuery v2.1.0. + Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2008. + Available under the MIT (http://keith-wood.name/licence.html) license. + Please attribute the author if you use it. */ +!function(a){"use strict";var b="countdown",c=0,d=1,e=2,f=3,g=4,h=5,i=6;a.JQPlugin.createPlugin({name:b,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,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:!1}},_rtlClass:b+"-rtl",_sectionClass:b+"-section",_amountClass:b+"-amount",_periodClass:b+"-period",_rowClass:b+"-row",_holdingClass:b+"-holding",_showClass:b+"-show",_descrClass:b+"-descr",_timerElems:[],_init:function(){function b(a){var h=a<1e12?e?window.performance.now()+window.performance.timing.navigationStart:d():a||d();h-g>=1e3&&(c._updateElems(),g=h),f(b)}var c=this;this._super(),this._serverSyncs=[];var d="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},e=window.performance&&"function"==typeof window.performance.now,f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,g=0;!f||a.noRequestAnimationFrame?(a.noRequestAnimationFrame=null,a.countdown._timer=setInterval(function(){c._updateElems()},1e3)):(g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d(),f(b))},UTCDate:function(a,b,c,d,e,f,g,h){"object"==typeof b&&b instanceof Date&&(h=b.getMilliseconds(),g=b.getSeconds(),f=b.getMinutes(),e=b.getHours(),d=b.getDate(),c=b.getMonth(),b=b.getFullYear());var i=new Date;return i.setUTCFullYear(b),i.setUTCDate(1),i.setUTCMonth(c||0),i.setUTCDate(d||1),i.setUTCHours(e||0),i.setUTCMinutes((f||0)-(Math.abs(a)<30?60*a:a)),i.setUTCSeconds(g||0),i.setUTCMilliseconds(h||0),i},periodsToSeconds:function(a){return 31557600*a[0]+2629800*a[1]+604800*a[2]+86400*a[3]+3600*a[4]+60*a[5]+a[6]},resync:function(){var b=this;a("."+this._getMarker()).each(function(){var c=a.data(this,b.name);if(c.options.serverSync){for(var d=null,e=0;e-1},_removeElem:function(b){this._timerElems=a.map(this._timerElems,function(a){return a===b?null:a})},_updateElems:function(){for(var a=this._timerElems.length-1;a>=0;a--)this._updateCountdown(this._timerElems[a])},_optionsChanged:function(b,c,d){d.layout&&(d.layout=d.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(c.options,d);var e=c.options.timezone!==d.timezone;a.extend(c.options,d),this._adjustSettings(b,c,!this._eqNull(d.until)||!this._eqNull(d.since)||e);var f=new Date;(c._since&&c._sincef)&&this._addElem(b[0]),this._updateCountdown(b,c)},_updateCountdown:function(b,c){if(b=b.jquery?b:a(b),c=c||this._getInst(b)){if(b.html(this._generateHTML(c)).toggleClass(this._rtlClass,c.options.isRTL),"pause"!==c._hold&&a.isFunction(c.options.onTick)){var d="lap"!==c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date);1!==c.options.tickInterval&&this.periodsToSeconds(d)%c.options.tickInterval!==0||c.options.onTick.apply(b[0],[d])}var e="pause"!==c._hold&&(c._since?c._now.getTime()=c._until.getTime());if(e&&!c._expiring){if(c._expiring=!0,this._hasElem(b[0])||c.options.alwaysExpire){if(this._removeElem(b[0]),a.isFunction(c.options.onExpiry)&&c.options.onExpiry.apply(b[0],[]),c.options.expiryText){var f=c.options.layout;c.options.layout=c.options.expiryText,this._updateCountdown(b[0],c),c.options.layout=f}c.options.expiryUrl&&(window.location=c.options.expiryUrl)}c._expiring=!1}else"pause"===c._hold&&this._removeElem(b[0])}},_resetExtraLabels:function(a,b){var c=null;for(c in b)c.match(/[Ll]abels[02-9]|compactLabels1/)&&(a[c]=b[c]);for(c in a)c.match(/[Ll]abels[02-9]|compactLabels1/)&&"undefined"==typeof b[c]&&(a[c]=null)},_eqNull:function(a){return"undefined"==typeof a||null===a},_adjustSettings:function(b,c,d){for(var e=null,f=0;f0,n[o]="?"!==b._show[o]||k?b._show[o]:null,l+=n[o]?1:0,m-=b._periods[o]>0?1:0;var p=[!1,!1,!1,!1,!1,!1,!1];for(o=i;o>=c;o--)b._show[o]&&(b._periods[o]?p[o]=!0:(p[o]=m>0,m--));var q=b.options.compact?b.options.compactLabels:b.options.labels,r=b.options.whichLabels||this._normalLabels,s=function(a){var c=b.options["compactLabels"+r(b._periods[a])];return n[a]?j._translateDigits(b,b._periods[a])+(c?c[a]:q[a])+" ":""},t=b.options.padZeroes?2:1,u=function(a){var c=b.options["labels"+r(b._periods[a])];return!b.options.significant&&n[a]||b.options.significant&&p[a]?''+j._minDigits(b,b._periods[a],t)+''+(c?c[a]:q[a])+"":""};return b.options.layout?this._buildLayout(b,n,b.options.layout,b.options.compact,b.options.significant,p):(b.options.compact?''+s(c)+s(d)+s(e)+s(f)+(n[g]?this._minDigits(b,b._periods[g],2):"")+(n[h]?(n[g]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[h],2):"")+(n[i]?(n[g]||n[h]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[i],2):""):''+u(c)+u(d)+u(e)+u(f)+u(g)+u(h)+u(i))+""+(b.options.description?''+b.options.description+"":"")},_buildLayout:function(b,j,k,l,m,n){for(var o=b.options[l?"compactLabels":"labels"],p=b.options.whichLabels||this._normalLabels,q=function(a){return(b.options[(l?"compactLabels":"labels")+p(b._periods[a])]||o)[a]},r=function(a,c){return b.options.digits[Math.floor(a/c)%10]},s={desc:b.options.description,sep:b.options.timeSeparator,yl:q(c),yn:this._minDigits(b,b._periods[c],1),ynn:this._minDigits(b,b._periods[c],2),ynnn:this._minDigits(b,b._periods[c],3),y1:r(b._periods[c],1),y10:r(b._periods[c],10),y100:r(b._periods[c],100),y1000:r(b._periods[c],1e3),ol:q(d),on:this._minDigits(b,b._periods[d],1),onn:this._minDigits(b,b._periods[d],2),onnn:this._minDigits(b,b._periods[d],3),o1:r(b._periods[d],1),o10:r(b._periods[d],10),o100:r(b._periods[d],100),o1000:r(b._periods[d],1e3),wl:q(e),wn:this._minDigits(b,b._periods[e],1),wnn:this._minDigits(b,b._periods[e],2),wnnn:this._minDigits(b,b._periods[e],3),w1:r(b._periods[e],1),w10:r(b._periods[e],10),w100:r(b._periods[e],100),w1000:r(b._periods[e],1e3),dl:q(f),dn:this._minDigits(b,b._periods[f],1),dnn:this._minDigits(b,b._periods[f],2),dnnn:this._minDigits(b,b._periods[f],3),d1:r(b._periods[f],1),d10:r(b._periods[f],10),d100:r(b._periods[f],100),d1000:r(b._periods[f],1e3),hl:q(g),hn:this._minDigits(b,b._periods[g],1),hnn:this._minDigits(b,b._periods[g],2),hnnn:this._minDigits(b,b._periods[g],3),h1:r(b._periods[g],1),h10:r(b._periods[g],10),h100:r(b._periods[g],100),h1000:r(b._periods[g],1e3),ml:q(h),mn:this._minDigits(b,b._periods[h],1),mnn:this._minDigits(b,b._periods[h],2),mnnn:this._minDigits(b,b._periods[h],3),m1:r(b._periods[h],1),m10:r(b._periods[h],10),m100:r(b._periods[h],100),m1000:r(b._periods[h],1e3),sl:q(i),sn:this._minDigits(b,b._periods[i],1),snn:this._minDigits(b,b._periods[i],2),snnn:this._minDigits(b,b._periods[i],3),s1:r(b._periods[i],1),s10:r(b._periods[i],10),s100:r(b._periods[i],100),s1000:r(b._periods[i],1e3)},t=k,u=c;u<=i;u++){var v="yowdhms".charAt(u),w=new RegExp("\\{"+v+"<\\}([\\s\\S]*)\\{"+v+">\\}","g");t=t.replace(w,!m&&j[u]||m&&n[u]?"$1":"")}return a.each(s,function(a,b){var c=new RegExp("\\{"+a+"\\}","g");t=t.replace(c,b)}),t},_minDigits:function(a,b,c){return b=""+b,b.length>=c?this._translateDigits(a,b):(b="0000000000"+b,this._translateDigits(a,b.substr(b.length-c)))},_translateDigits:function(a,b){return(""+b).replace(/[0-9]/g,function(b){return a.options.digits[b]})},_determineShow:function(a){var b=a.options.format,j=[];return j[c]=b.match("y")?"?":b.match("Y")?"!":null,j[d]=b.match("o")?"?":b.match("O")?"!":null,j[e]=b.match("w")?"?":b.match("W")?"!":null,j[f]=b.match("d")?"?":b.match("D")?"!":null,j[g]=b.match("h")?"?":b.match("H")?"!":null,j[h]=b.match("m")?"?":b.match("M")?"!":null,j[i]=b.match("s")?"?":b.match("S")?"!":null,j},_calculatePeriods:function(a,b,j,k){a._now=k,a._now.setMilliseconds(0);var l=new Date(a._now.getTime());a._since?k.getTime()a._until.getTime()&&(a._now=k=l));var m=[0,0,0,0,0,0,0];if(b[c]||b[d]){var n=this._getDaysInMonth(k.getFullYear(),k.getMonth()),o=this._getDaysInMonth(l.getFullYear(),l.getMonth()),p=l.getDate()===k.getDate()||l.getDate()>=Math.min(n,o)&&k.getDate()>=Math.min(n,o),q=function(a){return 60*(60*a.getHours()+a.getMinutes())+a.getSeconds()},r=Math.max(0,12*(l.getFullYear()-k.getFullYear())+l.getMonth()-k.getMonth()+(l.getDate()t&&k.setDate(t),k.setFullYear(k.getFullYear()+m[c]),k.setMonth(k.getMonth()+m[d]),s&&k.setDate(t)}var u=Math.floor((l.getTime()-k.getTime())/1e3),v=null,w=function(a,c){m[a]=b[a]?Math.floor(u/c):0,u-=m[a]*c};if(w(e,604800),w(f,86400),w(g,3600),w(h,60),w(i,1),u>0&&!a._since){var x=[1,12,4.3482,7,24,60,60],y=i,z=1;for(v=i;v>=c;v--)b[v]&&(m[y]>=z&&(m[y]=0,u=1),u>0&&(m[v]++,u=0,y=v,z=1)),z*=x[v]}if(j)for(v=c;v<=i;v++)j&&m[v]?j--:j||(m[v]=0);return m}})}(jQuery); +//# sourceMappingURL=jquery.countdown.min.map \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.countdown.min.map b/public/js/jquery/countdown/jquery.countdown.min.map new file mode 100644 index 000000000..e87223b19 --- /dev/null +++ b/public/js/jquery/countdown/jquery.countdown.min.map @@ -0,0 +1 @@ +{"version":3,"sources":["..\\..\\src\\js\\jquery.countdown.js"],"names":["$","pluginName","Y","O","W","D","H","M","S","JQPlugin","createPlugin","name","defaultOptions","until","since","timezone","serverSync","format","layout","compact","padZeroes","significant","description","expiryUrl","expiryText","alwaysExpire","onExpiry","onTick","tickInterval","regionalOptions","","labels","labels1","compactLabels","whichLabels","digits","timeSeparator","isRTL","_rtlClass","_sectionClass","_amountClass","_periodClass","_rowClass","_holdingClass","_showClass","_descrClass","_timerElems","_init","timerCallBack","timestamp","drawStart","perfAvail","window","performance","now","timing","navigationStart","animationStartTime","self","_updateElems","requestAnimationFrame","this","_super","_serverSyncs","Date","getTime","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","noRequestAnimationFrame","countdown","_timer","setInterval","webkitAnimationStartTime","mozAnimationStartTime","oAnimationStartTime","msAnimationStartTime","UTCDate","tz","year","month","day","hours","mins","secs","ms","getMilliseconds","getSeconds","getMinutes","getHours","getDate","getMonth","getFullYear","d","setUTCFullYear","setUTCDate","setUTCMonth","setUTCHours","setUTCMinutes","Math","abs","setUTCSeconds","setUTCMilliseconds","periodsToSeconds","periods","resync","_getMarker","each","inst","data","options","i","length","_eqNull","serverResult","isFunction","apply","_since","setMilliseconds","_until","_instSettings","elem","_periods","_addElem","_hasElem","push","inArray","_removeElem","map","value","_updateCountdown","_optionsChanged","replace","_resetExtraLabels","timezoneChanged","extend","_adjustSettings","jquery","_getInst","html","_generateHTML","toggleClass","_hold","_calculatePeriods","_show","expired","_now","_expiring","location","base","n","match","recalc","serverEntry","serverOffset","getTimezoneOffset","_determineTime","_determineShow","_preDestroy","empty","pause","lap","resume","toggle","toggleLap","hold","_savePeriods","sign","getTimes","setting","defaultTime","offsetNumeric","offset","time","setTime","offsetString","toLowerCase","hour","minute","second","pattern","matches","exec","parseInt","min","_getDaysInMonth","_normalLabels","num","shownNonZero","showCount","sigCount","show","period","showSignificant","showCompact","labelsNum","_translateDigits","minDigits","showFull","_minDigits","_buildLayout","labelFor","index","digit","position","floor","subs","desc","sep","yl","yn","ynn","ynnn","y1","y10","y100","y1000","ol","on","onn","onnn","o1","o10","o100","o1000","wl","wn","wnn","wnnn","w1","w10","w100","w1000","dl","dn","dnn","dnnn","d1","d10","d100","d1000","hl","hn","hnn","hnnn","h1","h10","h100","h1000","ml","mn","mnn","mnnn","m1","m10","m100","m1000","sl","sn","snn","snnn","s1","s10","s100","s1000","charAt","re","RegExp","v","len","substr","lastNow","lastUntil","sameDay","getSecs","date","months","max","wasLastDay","lastDay","setDate","setFullYear","setMonth","diff","extractPeriod","numSecs","multiplier","lastShown","jQuery"],"mappings":";;;;;CAMA,SAAUA,GACT,YAEA,IAAIC,GAAa,YAEbC,EAAI,EACJC,EAAI,EACJC,EAAI,EACJC,EAAI,EACJC,EAAI,EACJC,EAAI,EACJC,EAAI,CAWRR,GAAES,SAASC,cAIVC,KAAMV,EAyHNW,gBACCC,MAAO,KACPC,MAAO,KACPC,SAAU,KACVC,WAAY,K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AOjM,EAAMoD,UAAYX,EAAIW,WAAa,KACtDgI,EAAS,KACT4F,EAAgB,SAAS5F,EAAQ6F,GACpCrL,EAAQwF,GAAWD,EAAKC,GAAU7F,KAAK0G,MAAM8E,EAAOE,GAAW,EAC/DF,GAAQnL,EAAQwF,GAAU6F,EAO3B,IALAD,EAAczR,EAAG,QACjByR,EAAcxR,EAAG,OACjBwR,EAAcvR,EAAG,MACjBuR,EAActR,EAAG,IACjBsR,EAAcrR,EAAG,GACboR,EAAO,IAAM/K,EAAKS,OAAQ,CAC7B,GAAIyK,IAAc,EAAG,GAAI,OAAQ,EAAG,GAAI,GAAI,IACxCC,EAAYxR,EACZ8Q,EAAM,CACV,KAAKrF,EAASzL,EAAGyL,GAAU/L,EAAG+L,IACzBD,EAAKC,KACJxF,EAAQuL,IAAcV,IACzB7K,EAAQuL,GAAa,EACrBJ,EAAO,GAEJA,EAAO,IACVnL,EAAQwF,KACR2F,EAAO,EACPI,EAAY/F,EACZqF,EAAM,IAGRA,GAAOS,EAAW9F,GAGpB,GAAI5K,EACH,IAAK4K,EAAS/L,EAAG+L,GAAUzL,EAAGyL,IACzB5K,GAAeoF,EAAQwF,GAC1B5K,IAESA,IACToF,EAAQwF,GAAU,EAIrB,OAAOxF,OAIPwL","file":"jquery.countdown.min.js"} \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.plugin.js b/public/js/jquery/countdown/jquery.plugin.js new file mode 100644 index 000000000..9567d1d7b --- /dev/null +++ b/public/js/jquery/countdown/jquery.plugin.js @@ -0,0 +1,388 @@ +/* globals JQClass */ +/*! Simple JavaScript Inheritance + * By John Resig http://ejohn.org/ + * MIT Licensed. + */ +// Inspired by base2 and Prototype +(function(){ + 'use strict'; + var initializing = false; + + // The base JQClass implementation (does nothing) + window.JQClass = function(){}; + + // Collection of derived classes + JQClass.classes = {}; + + // Create a new JQClass that inherits from this class + JQClass.extend = function extender(prop) { + var base = this.prototype; + + // Instantiate a base class (but only create the instance, don't run the init constructor) + initializing = true; + var prototype = new this(); + initializing = false; + + // Copy the properties over onto the new prototype + for (var name in prop) { // jshint loopfunc:true + // Check if we're overwriting an existing function + if (typeof prop[name] === 'function' && typeof base[name] === 'function') { + prototype[name] = (function (name, fn) { + return function () { + var __super = this._super; + // Add a new ._super() method that is the same method but on the super-class + this._super = function (args) { + return base[name].apply(this, args || []); + }; + var ret = fn.apply(this, arguments); + // The method only needs to be bound temporarily, so we remove it when we're done executing + this._super = __super; + return ret; + }; + })(name, prop[name]); + // Check if we're overwriting existing default options. + } else if (typeof prop[name] === 'object' && typeof base[name] === 'object' && name === 'defaultOptions') { + var obj1 = base[name]; + var obj2 = prop[name]; + var obj3 = {}; + var key; + for (key in obj1) { // jshint forin:false + obj3[key] = obj1[key]; + } + for (key in obj2) { // jshint forin:false + obj3[key] = obj2[key]; + } + prototype[name] = obj3; + } else { + prototype[name] = prop[name]; + } + } + + // The dummy class constructor + function JQClass() { + // All construction is actually done in the init method + if (!initializing && this._init) { + this._init.apply(this, arguments); + } + } + + // Populate our constructed prototype object + JQClass.prototype = prototype; + + // Enforce the constructor to be what we expect + JQClass.prototype.constructor = JQClass; + + // And make this class extendable + JQClass.extend = extender; + + return JQClass; + }; +})(); +/*! Abstract base class for collection plugins v1.0.2. + Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013. + Licensed under the MIT license (http://keith-wood.name/licence.html). */ +(function($) { // Ensure $, encapsulate + 'use strict'; + + /**

Abstract base class for collection plugins v1.0.2.

+

Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013.

+

Licensed under the MIT license (http://keith-wood.name/licence.html).

+

Use {@link $.JQPlugin.createPlugin} to create new plugins using this framework.

+

This base class provides common functionality such as:

+
    +
  • Creates jQuery bridge - allowing you to invoke your plugin on a collection of elements.
  • +
  • Handles initialisation including reading settings from metadata - + an instance object is attached to the affected element(s) containing all the necessary data.
  • +
  • Handles option retrieval and update - options can be set through default values, + through inline metadata, or through instantiation settings.
    + Metadata is specified as an attribute on the element: + data-<pluginName>="<option name>: '<value>', ...". + Dates should be specified as strings in this format: 'new Date(y, m-1, d)'.
  • +
  • Handles method calling - inner functions starting with '_'are inaccessible, + whereas others can be called via $(selector).pluginName('functionName').
  • +
  • Handles plugin destruction - removing all trace of the plugin.
  • +
+ @module JQPlugin + @abstract */ + JQClass.classes.JQPlugin = JQClass.extend({ + + /** Name to identify this plugin. + @example name: 'tabs' */ + name: 'plugin', + + /** Default options for instances of this plugin (default: {}). + @example defaultOptions: { + selectedClass: 'selected', + triggers: 'click' +} */ + defaultOptions: {}, + + /** Options dependent on the locale. + Indexed by language and (optional) country code, with '' denoting the default language (English/US). + Normally additional languages would be provided as separate files to all them to be included as needed. + @example regionalOptions: { + '': { + greeting: 'Hi' + } +} */ + regionalOptions: {}, + + /** Whether or not a deep merge should be performed when accumulating options. + The default is true but can be overridden in a sub-class. */ + deepMerge: true, + + /** Retrieve a marker class for affected elements. + In the format: is-<pluginName>. + @protected + @return {string} The marker class. */ + _getMarker: function() { + return 'is-' + this.name; + }, + + /** Initialise the plugin. + Create the jQuery bridge - plugin name xyz + produces singleton $.xyz and collection function $.fn.xyz. + @protected */ + _init: function() { + // Apply default localisations + $.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {}); + // Camel-case the name + var jqName = camelCase(this.name); + // Expose jQuery singleton manager + $[jqName] = this; + // Expose jQuery collection plugin + $.fn[jqName] = function(options) { + var otherArgs = Array.prototype.slice.call(arguments, 1); + var inst = this; + var returnValue = this; + this.each(function () { + if (typeof options === 'string') { + if (options[0] === '_' || !$[jqName][options]) { + throw 'Unknown method: ' + options; + } + var methodValue = $[jqName][options].apply($[jqName], [this].concat(otherArgs)); + if (methodValue !== inst && methodValue !== undefined) { + returnValue = methodValue; + return false; + } + } else { + $[jqName]._attach(this, options); + } + }); + return returnValue; + }; + }, + + /** Set default options for all subsequent instances. + @param {object} options The new default options. + @example $.pluginName.setDefaults({name: value, ...}) */ + setDefaults: function(options) { + $.extend(this.defaultOptions, options || {}); + }, + + /** Initialise an element. Called internally only. + Adds an instance object as data named for the plugin. + Override {@linkcode module:JQPlugin~_postAttach|_postAttach} for plugin-specific processing. + @private + @param {Element} elem The element to enhance. + @param {object} options Overriding settings. */ + _attach: function(elem, options) { + elem = $(elem); + if (elem.hasClass(this._getMarker())) { + return; + } + elem.addClass(this._getMarker()); + options = $.extend(this.deepMerge, {}, this.defaultOptions, this._getMetadata(elem), options || {}); + var inst = $.extend({name: this.name, elem: elem, options: options}, this._instSettings(elem, options)); + elem.data(this.name, inst); // Save instance against element + this._postAttach(elem, inst); + this.option(elem, options); + }, + + /** Retrieve additional instance settings. + Override this in a sub-class to provide extra settings. + These are added directly to the instance object. + Default attributes of an instance object are shown as properties below: + @protected + @param {jQuery} elem The current jQuery element. + @param {object} options The instance options. + @return {object} Any extra instance values. + @property {Element} elem The element to which this instance applies. + @property {string} name The name of this plugin. + @property {object} options The accumulated options for this instance. + @example _instSettings: function(elem, options) { + return {nav: elem.find(options.navSelector)}; +} */ + _instSettings: function(elem, options) { // jshint unused:false + return {}; + }, + + /** Plugin specific post initialisation. + Override this in a sub-class to perform extra activities. + This is where you would implement your plugin's main functionality. + @protected + @param {jQuery} elem The current jQuery element. + @param {object} inst The instance settings. + @example _postAttach: function(elem, inst) { + elem.on('click.' + this.name, function() { + ... + }); +} */ + _postAttach: function(elem, inst) { // jshint unused:false + }, + + /** Retrieve metadata configuration from the element. + Metadata is specified as an attribute: + data-<pluginName>="<option name>: '<value>', ...". + Dates should be specified as strings in this format: 'new Date(y, m-1, d)'. + @private + @param {jQuery} elem The source element. + @return {object} The inline configuration or {}. */ + _getMetadata: function(elem) { + try { + var data = elem.data(this.name.toLowerCase()) || ''; + data = data.replace(/(\\?)'/g, function(e, t) { + return t ? '\'' : '"'; + }).replace(/([a-zA-Z0-9]+):/g, function(match, group, i) { + var count = data.substring(0, i).match(/"/g); // Handle embedded ':' + return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':'); + }).replace(/\\:/g, ':'); + data = $.parseJSON('{' + data + '}'); + for (var key in data) { + if (data.hasOwnProperty(key)) { + var value = data[key]; + if (typeof value === 'string' && value.match(/^new Date\(([-0-9,\s]*)\)$/)) { // Convert dates + data[key] = eval(value); // jshint ignore:line + } + } + } + return data; + } + catch (e) { + return {}; + } + }, + + /** Retrieve the instance data for element. + @protected + @param {Element} elem The source element. + @return {object} The instance data or {} if none. */ + _getInst: function(elem) { + return $(elem).data(this.name) || {}; + }, + + /** Retrieve or reconfigure the settings for a plugin. + If new settings are provided they are applied to the instance options. + If an option name only is provided the value of that option is returned. + If no name or value is provided, all options are returned. + Override {@linkcode module:JQPlugin~_optionsChanged|_optionsChanged} + for plugin-specific processing when option values change. + @param {Element} elem The source element. + @param {object|string} [name] The collection of new option values or the name of a single option. + @param {any} [value] The value for a single named option. + @return {any|object} If retrieving a single value or all options. + @example $(selector).plugin('option', 'name', value) // Set one option +$(selector).plugin('option', {name: value, ...}) // Set multiple options +var value = $(selector).plugin('option', 'name') // Get one option +var options = $(selector).plugin('option') // Get all options */ + option: function(elem, name, value) { + elem = $(elem); + var inst = elem.data(this.name); + var options = name || {}; + if (!name || (typeof name === 'string' && typeof value === 'undefined')) { + options = (inst || {}).options; + return (options && name ? options[name] : options); + } + if (!elem.hasClass(this._getMarker())) { + return; + } + if (typeof name === 'string') { + options = {}; + options[name] = value; + } + this._optionsChanged(elem, inst, options); + $.extend(inst.options, options); + }, + + /** Plugin specific options processing. + Old value available in inst.options[name], new value in options[name]. + Override this in a sub-class to perform extra activities. + @protected + @param {jQuery} elem The current jQuery element. + @param {object} inst The instance settings. + @param {object} options The new options. + @example _optionsChanged: function(elem, inst, options) { + if (options.name != inst.options.name) { + elem.removeClass(inst.options.name).addClass(options.name); + } +} */ + _optionsChanged: function(elem, inst, options) { // jshint unused:false + }, + + /** Remove all trace of the plugin. + Override {@linkcode module:JQPlugin~_preDestroy|_preDestroy} for plugin-specific processing. + @param {Element} elem The source element. + @example $(selector).plugin('destroy') */ + destroy: function(elem) { + elem = $(elem); + if (!elem.hasClass(this._getMarker())) { + return; + } + this._preDestroy(elem, this._getInst(elem)); + elem.removeData(this.name).removeClass(this._getMarker()); + }, + + /** Plugin specific pre destruction. + It is invoked as part of the {@linkcode module:JQPlugin~destroy|destroy} processing. + Override this in a sub-class to perform extra activities and undo everything that was + done in the {@linkcode module:JQPlugin~_postAttach|_postAttach} or + {@linkcode module:JQPlugin~_optionsChanged|_optionsChanged} functions. + @protected + @param {jQuery} elem The current jQuery element. + @param {object} inst The instance settings. + @example _preDestroy: function(elem, inst) { + elem.off('.' + this.name); +} */ + _preDestroy: function(elem, inst) { // jshint unused:false + } + }); + + /** Convert names from hyphenated to camel-case. + @private + @param {string} value The original hyphenated name. + @return {string} The camel-case version. */ + function camelCase(name) { + return name.replace(/-([a-z])/g, function(match, group) { + return group.toUpperCase(); + }); + } + + /** Expose the plugin base. + @namespace $.JQPlugin */ + $.JQPlugin = { + + /** Create a new collection plugin. + @memberof $.JQPlugin + @param {string} [superClass='JQPlugin'] The name of the parent class to inherit from. + @param {object} overrides The property/function overrides for the new class. + See {@link module:JQPlugin|JQPlugin} for the base functionality. + @example $.JQPlugin.createPlugin({ // Define the plugin + name: 'tabs', + defaultOptions: {selectedClass: 'selected'}, + _initSettings: function(elem, options) { return {...}; }, + _postAttach: function(elem, inst) { ... } +}); +$('selector').tabs(); // And instantiate it */ + createPlugin: function(superClass, overrides) { + if (typeof superClass === 'object') { + overrides = superClass; + superClass = 'JQPlugin'; + } + superClass = camelCase(superClass); + var className = camelCase(overrides.name); + JQClass.classes[className] = JQClass.classes[superClass].extend(overrides); + new JQClass.classes[className](); // jshint ignore:line + } + }; + +})(jQuery); \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.plugin.min.js b/public/js/jquery/countdown/jquery.plugin.min.js new file mode 100644 index 000000000..335d97fc7 --- /dev/null +++ b/public/js/jquery/countdown/jquery.plugin.min.js @@ -0,0 +1,9 @@ +/*! Simple JavaScript Inheritance + * By John Resig http://ejohn.org/ + * MIT Licensed. + */ +!function(){"use strict";var a=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultOptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! Abstract base class for collection plugins v1.0.2. + Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013. + Licensed under the MIT license (http://keith-wood.name/licence.html). */ +function($){"use strict";function camelCase(a){return a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var a=camelCase(this.name);$[a]=this,$.fn[a]=function(b){var c=Array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"Unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasClass(this._getMarker())){a.addClass(this._getMarker()),b=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c),this._postAttach(a,c),this.option(a,b)}},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parseJSON("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasClass(this._getMarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionsChanged(a,d,e),$.extend(d.options,e)))},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasClass(this._getMarker())&&(this._preDestroy(a,this._getInst(a)),a.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(a,b){}}),$.JQPlugin={createPlugin:function(a,b){"object"==typeof a&&(b=a,a="JQPlugin"),a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b),new JQClass.classes[c]}}}(jQuery); +//# sourceMappingURL=jquery.plugin.min.map \ No newline at end of file diff --git a/public/js/jquery/countdown/jquery.plugin.min.map b/public/js/jquery/countdown/jquery.plugin.min.map new file mode 100644 index 000000000..25c133642 --- /dev/null +++ b/public/js/jquery/countdown/jquery.plugin.min.map @@ -0,0 +1 @@ +{"version":3,"sources":["..\\..\\src\\js\\jquery.plugin.js"],"names":["initializing","window","JQClass","classes","extend","extender","prop","this","_init","apply","arguments","base","prototype","name","fn","__super","_super","args","ret","key","obj1","obj2","obj3","constructor","$","camelCase","replace","match","group","toUpperCase","JQPlugin","defaultOptions","regionalOptions","deepMerge","_getMarker","jqName","options","otherArgs","Array","slice","call","inst","returnValue","each","methodValue","concat","undefined","_attach","setDefaults","elem","hasClass","addClass","_getMetadata","_instSettings","data","_postAttach","option","toLowerCase","e","t","i","count","substring","length","parseJSON","hasOwnProperty","value","eval","_getInst","_optionsChanged","destroy","_preDestroy","removeData","removeClass","createPlugin","superClass","overrides","className","jQuery"],"mappings":";;;;CAMA,WACC,YACA,IAAIA,IAAe,CAGnBC,QAAOC,QAAU,aAGjBA,QAAQC,WAGRD,QAAQE,OAAS,QAASC,GAASC,GA4ClC,QAASJ,MAEHF,GAAgBO,KAAKC,OACzBD,KAAKC,MAAMC,MAAMF,KAAMG,WA9CzB,GAAIC,GAAOJ,KAAKK,SAGhBZ,IAAe,CACf,IAAIY,GAAY,GAAIL,KACpBP,IAAe,CAGf,KAAK,GAAIa,KAAQP,GAEhB,GAA0B,kBAAfA,GAAKO,IAA8C,kBAAfF,GAAKE,GACnDD,EAAUC,GAAQ,SAAWA,EAAMC,GAClC,MAAO,YACN,GAAIC,GAAUR,KAAKS,MAEnBT,MAAKS,OAAS,SAAUC,GACvB,MAAON,GAAKE,GAAMJ,MAAMF,KAAMU,OAE/B,IAAIC,GAAMJ,EAAGL,MAAMF,KAAMG,UAGzB,OADAH,MAAKS,OAASD,EACPG,IAENL,EAAMP,EAAKO,QAER,IAA0B,gBAAfP,GAAKO,IAA4C,gBAAfF,GAAKE,IAA+B,mBAATA,EAA2B,CACzG,GAGIM,GAHAC,EAAOT,EAAKE,GACZQ,EAAOf,EAAKO,GACZS,IAEJ,KAAKH,IAAOC,GACXE,EAAKH,GAAOC,EAAKD,EAElB,KAAKA,IAAOE,GACXC,EAAKH,GAAOE,EAAKF,EAElBP,GAAUC,GAAQS,MAElBV,GAAUC,GAAQP,EAAKO,EAqBzB,OARAX,GAAQU,UAAYA,EAGpBV,EAAQU,UAAUW,YAAcrB,EAGhCA,EAAQE,OAASC,EAEVH;;;AAMT,SAAUsB,GACT,YA6QA,SAASC,WAAUZ,GAClB,MAAOA,GAAKa,QAAQ,YAAa,SAASC,EAAOC,GAChD,MAAOA,GAAMC,gBAzP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,gBAGxB3B,KAAKgE,YAAYtB,EAAM1C,KAAK6D,SAASnB,IACrCA,EAAKuB,WAAWjE,KAAKM,MAAM4D,YAAYlE,KAAK2B,gBAc7CqC,YAAa,SAAStB,EAAMR,OAgB7BjB,EAAEM,UAcD4C,aAAc,SAASC,EAAYC,GACR,gBAAfD,KACVC,EAAYD,EACZA,EAAa,YAEdA,EAAalD,UAAUkD,EACvB,IAAIE,GAAYpD,UAAUmD,EAAU/D,KACpCX,SAAQC,QAAQ0E,GAAa3E,QAAQC,QAAQwE,GAAYvE,OAAOwE,GAChE,GAAI1E,SAAQC,QAAQ0E,MAIpBC","file":"jquery.plugin.min.js"} \ No newline at end of file diff --git a/resources/lang/en-GB/modules.php b/resources/lang/en-GB/modules.php index 7e58d6a79..ec31fa55c 100644 --- a/resources/lang/en-GB/modules.php +++ b/resources/lang/en-GB/modules.php @@ -5,6 +5,7 @@ return [ 'title' => 'API Token', 'api_token' => 'Token', 'my_apps' => 'My Apps', + 'pre_sale' => 'Pre-Sale', 'top_paid' => 'Top Paid', 'new' => 'New', 'top_free' => 'Top Free', @@ -61,6 +62,7 @@ return [ 'badge' => [ 'installed' => 'Installed', + 'pre_sale' => 'Pre-Sale', ], 'button' => [ diff --git a/resources/views/modules/home/index.blade.php b/resources/views/modules/home/index.blade.php index 11d966195..4280fa187 100644 --- a/resources/views/modules/home/index.blade.php +++ b/resources/views/modules/home/index.blade.php @@ -11,6 +11,22 @@ @include('partials.modules.bar')
+ @if ($pre_sale) +
+
+

{{ trans('modules.pre_sale') }}

+
+ + @if ($pre_sale->data) + @foreach ($pre_sale->data as $module) + @include('partials.modules.pre_sale') + @endforeach + @else + @include('partials.modules.no_apps') + @endif +
+ @endif + @if ($paid)
diff --git a/resources/views/modules/item/pre_sale.blade.php b/resources/views/modules/item/pre_sale.blade.php new file mode 100644 index 000000000..9dfc49f65 --- /dev/null +++ b/resources/views/modules/item/pre_sale.blade.php @@ -0,0 +1,255 @@ +@extends('layouts.modules') + +@section('title', trans_choice('general.modules', 2)) + +@section('new_button') +  {{ trans('modules.api_token') }} +  {{ trans('modules.my_apps') }} +@endsection + +@section('content') + @include('partials.modules.bar') + +
+
+
+
+

{{ $module->name }}

+
+ + +
+ +
+
+

{{ trans_choice('general.actions', 1) }}

+
+ +
+
+
+ +
+
+ @if ($module->price == '0.0000') + {{ trans('modules.free') }} + @else + {!! $module->price_prefix !!} + @if (isset($module->special_price)) + {{ $module->price }} + {{ $module->special_price }} + @else + {{ $module->price }} + @endif + {!! $module->price_suffix !!} + @endif +
+
+
+ + + + +
+ + +
+

{{ trans('modules.about') }}

+
+ +
+
+ + + @if ($module->vendor_name) + + + + + @endif + @if ($module->version) + + + + + @endif + @if ($module->created_at) + + + + + @endif + @if ($module->updated_at) + + + + + @endif + @if ($module->compatibility) + + + + + @endif + @if ($module->category) + + + + + @endif + +
{{ trans_choice('general.developers', 1) }}{{ $module->vendor_name }}
{{ trans('footer.version') }}{{ $module->version }}
{{ trans('modules.added') }}{{ Date::parse($module->created_at)->format($date_format) }}
{{ trans('modules.updated') }}{{ Date::parse($module->updated_at)->diffForHumans() }}
{{ trans('modules.compatibility') }}{{ $module->compatibility }}
{{ trans_choice('general.categories', 1) }}{{ $module->category->name }}
+
+ +
+ +
+
+
+ + @if ($module->purchase_faq) + {!! $module->purchase_faq !!} + @endif +@endsection + +@push('js') + + + +@if (language()->getShortCode() != 'en') + +@endif +@endpush + +@push('css') + + +@endpush + +@push('stylesheet') + +@endpush + +@push('scripts') + +@endpush diff --git a/resources/views/modules/tiles/index.blade.php b/resources/views/modules/tiles/index.blade.php index 844359199..4010bcc91 100644 --- a/resources/views/modules/tiles/index.blade.php +++ b/resources/views/modules/tiles/index.blade.php @@ -18,7 +18,11 @@ @if ($modules) @foreach ($modules->data as $module) - @include('partials.modules.item') + @if ($module->status == 'active') + @include('partials.modules.item') + @else + @include('partials.modules.pre_sale') + @endif @endforeach
    diff --git a/resources/views/partials/modules/pre_sale.blade.php b/resources/views/partials/modules/pre_sale.blade.php new file mode 100644 index 000000000..8ddb1bbfb --- /dev/null +++ b/resources/views/partials/modules/pre_sale.blade.php @@ -0,0 +1,46 @@ +
    +
    +
    +

    {{ $module->name }}

    + + + {{ trans('modules.badge.pre_sale') }} + + +
    + + + + + + + +
    + +
    \ No newline at end of file From badc8c68ac2f88a8da9a10da6032bba6c97d3a97 Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Wed, 30 Jan 2019 19:29:22 +0300 Subject: [PATCH 2/3] Pre-sale date get dynamic --- resources/views/modules/item/pre_sale.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/modules/item/pre_sale.blade.php b/resources/views/modules/item/pre_sale.blade.php index 9dfc49f65..389f906ef 100644 --- a/resources/views/modules/item/pre_sale.blade.php +++ b/resources/views/modules/item/pre_sale.blade.php @@ -233,7 +233,7 @@ keyboard: true }); - var newDate = new Date(2019, 5, 15); + var newDate = new Date({{ $module->pre_sale_date['year'] }}, {{ $module->pre_sale_date['month'] }}, {{ $module->pre_sale_date['day'] }}); $('#countdown-pre-sale').countdown({ until: newDate From 533044762092cc8f384fe23cc0a4fcf8fbce4c71 Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Thu, 31 Jan 2019 18:19:30 +0300 Subject: [PATCH 3/3] App store pre-sale on category page. --- app/Http/Controllers/Modules/Item.php | 2 +- resources/views/modules/tiles/index.blade.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Modules/Item.php b/app/Http/Controllers/Modules/Item.php index 7163749cb..885c2d1c3 100644 --- a/app/Http/Controllers/Modules/Item.php +++ b/app/Http/Controllers/Modules/Item.php @@ -65,7 +65,7 @@ class Item extends Controller $module->action_url .= $character . http_build_query($parameters); } - if ($module->status == 'pre_sale') { + if ($module->status_type == 'pre_sale') { return view('modules.item.pre_sale', compact('module', 'installed', 'enable')); } diff --git a/resources/views/modules/tiles/index.blade.php b/resources/views/modules/tiles/index.blade.php index 4010bcc91..b613c6643 100644 --- a/resources/views/modules/tiles/index.blade.php +++ b/resources/views/modules/tiles/index.blade.php @@ -18,10 +18,10 @@ @if ($modules) @foreach ($modules->data as $module) - @if ($module->status == 'active') - @include('partials.modules.item') - @else + @if ($module->status_type == 'pre_sale') @include('partials.modules.pre_sale') + @else + @include('partials.modules.item') @endif @endforeach