├── .gitignore ├── index.php ├── screenshots ├── cron_php.png ├── example1.png ├── example2.png ├── example3.png └── example4.png ├── test ├── lib │ ├── jasmine-2.1.2 │ │ ├── jasmine_favicon.png │ │ ├── boot.js │ │ ├── console.js │ │ ├── jasmine-html.js │ │ └── jasmine.css │ └── jquery-1.7.2.min.js ├── SpecRunner.html ├── MIT.LICENSE └── spec │ └── jqCronSpec.en.js ├── demo ├── demo.tpl ├── demo_1.php ├── demo_3.php ├── demo_4.php ├── demo_5.php ├── demo_2.php ├── demo_6.php ├── index.php └── style.css ├── composer.json ├── bower.json ├── README.md ├── src ├── jqCron.cn.js ├── jqCron.ja.js ├── jqCron.fr.js ├── jqCron.de.js ├── jqCron.fa.js ├── jqCron.es.js ├── jqCron.en.js ├── jqCron.pt-br.js ├── jqCron.bg.js ├── jqCron.pl.js ├── jqCron.css ├── Cron.php └── jqCron.js └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | nbproject -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
__JSPRE__
4 |
__HTMLPRE__
5 |
6 |
7 | __HTML__ 8 |
9 | 10 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arnapou/jqcron", 3 | "description": "Arnapou jqCron", 4 | "authors": [ 5 | { 6 | "name": "Arnaud Buathier", 7 | "email": "arnaud@arnapou.net", 8 | "homepage": "http://arnapou.net" 9 | } 10 | ], 11 | "autoload": { 12 | "files": [ "src/Cron.php" ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arnapou-jqcron", 3 | "authors": [ 4 | "Arnaud Buathier " 5 | ], 6 | "description": "Cron jQuery plugin", 7 | "license": "MIT", 8 | "homepage": "https://github.com/arnapou/jqcron", 9 | "ignore": [ 10 | "*", 11 | "!src/*" 12 | ], 13 | "dependencies": { 14 | "jquery": "~2.1.4" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jqCron 2 | ====== 3 | 4 | Cron jQuery plugin 5 | 6 | Originaly created in july 2012. 7 | 8 | Live demo there : http://jqcron.arnapou.net/ 9 | 10 | Features 11 | ======== 12 | * multi select 13 | * i18n 14 | * custom binding with dom element (can be two ways sync for instance with input) 15 | * lots of options (reset button, default value, ...) 16 | * php class to test matching dates 17 | 18 | -------------------------------------------------------------------------------- /demo/demo_1.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | $('.example1').jqCron(); 18 | }); 19 | ========== 20 |
-------------------------------------------------------------------------------- /demo/demo_3.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | $('.example3').jqCron(); 18 | }); 19 | ========== 20 | -------------------------------------------------------------------------------- /test/SpecRunner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Jasmine Spec Runner for jqCron lib 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /demo/demo_4.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | $('.example4-selector').jqCron({ 18 | default_value: '30 2 1 * *', 19 | bind_to: $('.example4-span'), 20 | bind_method: { 21 | set: function($element, value) { 22 | $element.html(value); 23 | } 24 | } 25 | }); 26 | }); 27 | ========== 28 |
29 |

-------------------------------------------------------------------------------- /demo/demo_5.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | $('.example5-selector').jqCron({ 18 | default_value: '30 2 1 * *', 19 | numeric_zero_pad: true, 20 | bind_to: $('.example5-span'), 21 | bind_method: { 22 | set: function($element, value) { 23 | $element.html(value); 24 | } 25 | } 26 | }); 27 | }); 28 | ========== 29 |
30 |

-------------------------------------------------------------------------------- /demo/demo_2.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | $('.example2').jqCron({ 18 | enabled_minute: true, 19 | multiple_dom: true, 20 | multiple_month: true, 21 | multiple_mins: true, 22 | multiple_dow: true, 23 | multiple_time_hours: true, 24 | multiple_time_minutes: true, 25 | default_period: 'week', 26 | default_value: '15 10-12 * * 1-5', 27 | no_reset_button: false, 28 | lang: 'en' 29 | }); 30 | }); 31 | ========== 32 |
-------------------------------------------------------------------------------- /src/jqCron.cn.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) John Lou 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.cn = { 11 | empty: '每', 12 | empty_minutes: '每', 13 | empty_time_hours: '每小时', 14 | empty_time_minutes: '每分钟', 15 | empty_day_of_week: '每天', 16 | empty_day_of_month: '每天', 17 | empty_month: '每月', 18 | name_minute: '分', 19 | name_hour: '时', 20 | name_day: '天', 21 | name_week: '周', 22 | name_month: '月', 23 | name_year: '年', 24 | text_period: '每 ', 25 | text_mins: ' , 分', 26 | text_time: ' , 分', 27 | text_dow: ' , ', 28 | text_month: ' , ', 29 | text_dom: ' , 第天', 30 | error1: '标记 %s 不支持 !', 31 | error2: '不正确的元素格式', 32 | error3: 'jQuery 元素必须在 jqCron的设置中传入', 33 | error4: '无法识别的表达式', 34 | weekdays: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], 35 | months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] 36 | }; 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Arnaud Buathier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/jqCron.ja.js: -------------------------------------------------------------------------------- 1 | /* It's not advisable to enable year mode when using this translation. 2 | The results are extremely awkward and difficult to understand 3 | for Japanese readers due to the ordering of the fields. Every 4 | other mode for jqCron reads naturally. */ 5 | 6 | jqCronDefaultSettings.texts.ja = { 7 | empty: '毎。。', 8 | empty_minutes: '毎', 9 | empty_time_hours: '毎', 10 | empty_time_minutes: '毎', 11 | empty_day_of_week: 'すべての', 12 | empty_day_of_month: "毎", 13 | empty_month: '毎', 14 | name_minute: '分', 15 | name_hour: '時', 16 | name_day: '日', 17 | name_week: '週', 18 | name_month: '月', 19 | name_year: '年', 20 | text_period: '毎', 21 | text_mins: '分 ', 22 | text_time: '分', 23 | text_dow: '曜日 ', 24 | text_month: '月 ', 25 | text_dom: '日 ', 26 | error1: 'The tag %s is not supported !', 27 | error2: 'Bad number of elements', 28 | error3: 'The jquery_element should be set into jqCron settings', 29 | error4: 'Unrecognized expression', 30 | weekdays: ['月', '火', '水', '木', '金', '土', '月'], 31 | months: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] 32 | }; 33 | -------------------------------------------------------------------------------- /src/jqCron.fr.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.fr = { 11 | empty: '-tout-', 12 | name_minute: 'minute', 13 | name_hour: 'heure', 14 | name_day: 'jour', 15 | name_week: 'semaine', 16 | name_month: 'mois', 17 | name_year: 'année', 18 | text_period: 'Chaque ', 19 | text_mins: 'à minutes', 20 | text_time: 'à :', 21 | text_dow: 'le ', 22 | text_month: 'de ', 23 | text_dom: 'le ', 24 | error1: 'La balise %s n\'est pas supportée !', 25 | error2: 'Mauvais nombre d\'éléments', 26 | error3: 'La propriété jquery_element doit être définie dans les paramètres jqCron', 27 | error4: 'Expression non reconnue', 28 | weekdays: ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'], 29 | months: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'] 30 | }; 31 | -------------------------------------------------------------------------------- /test/MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2014 Pivotal Labs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/jqCron.de.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.de = { 11 | empty: '-Alle-', 12 | name_minute: 'Minute', 13 | name_hour: 'Stunde', 14 | name_day: 'Tag', 15 | name_week: 'Woche', 16 | name_month: 'Monat', 17 | name_year: 'Jahr', 18 | text_period: 'Jede ', 19 | text_mins: 'um minuten nach der Stunde', 20 | text_time: 'um :', 21 | text_dow: 'am ', 22 | text_month: 'im ', 23 | text_dom: 'am ', 24 | error1: 'Der Tag %s wird nicht unterstützt!', 25 | error2: 'Ungültige Anzahl an Werten!', 26 | error3: 'Das jquery_element sollte in den jqCron-Einstellungen gesetzt werden!', 27 | error4: 'Ungültiger Ausdruck', 28 | weekdays: ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'], 29 | months: ['Jänner', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] 30 | }; 31 | -------------------------------------------------------------------------------- /src/jqCron.fa.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.fa = { 11 | empty: 'همه', 12 | empty_minutes: 'هر دقیقه', 13 | empty_time_hours: 'هر ساعت', 14 | empty_time_minutes: 'هر دقیقه', 15 | empty_day_of_week: 'هر روز هفته', 16 | empty_day_of_month: 'همه روزهای', 17 | empty_month: 'همه ماه‌های', 18 | name_minute: 'دقیقه', 19 | name_hour: 'ساعت', 20 | name_day: 'روز', 21 | name_week: 'هفته', 22 | name_month: 'ماه', 23 | name_year: 'سال', 24 | text_period: 'هر ', 25 | text_mins: ' در دقیقه ', 26 | text_time: ' در ساعت و دقیقه ', 27 | text_dow: ' روز ', 28 | text_month: ' در ماه سال،', 29 | text_dom: ' در روز ماه،', 30 | error1: 'کد %s پشتیبانی نمی‌شود !', 31 | error2: 'عدد صحیح نیست', 32 | error3: 'jquery_element باید برای تنظیمات jqCron ارسال شود', 33 | error4: 'عبارت صحیح نیست', 34 | weekdays: ['دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنج‌شنبه', 'جمعه', 'شنبه', 'یکشنبه '], 35 | months: ['ژانویه', 'فوریه', 'ماچ', 'آپریل', 'می', 'ژوئن', 'جولای', 'آگوست', 'سپتمبر', 'اکتبر', 'نوامبر', 'دسمبر'] 36 | }; 37 | -------------------------------------------------------------------------------- /demo/demo_6.php: -------------------------------------------------------------------------------- 1 | basename(__FILE__, '.php'), 7 | '__JS__' => $elements[1], 8 | '__JSPRE__' => htmlspecialchars($elements[1]), 9 | '__HTML__' => $elements[2], 10 | '__HTMLPRE__' => htmlspecialchars($elements[2]), 11 | ) 12 | ); 13 | 14 | __halt_compiler(); 15 | ========== 16 | $(function(){ 17 | var cron = 18 | $('.example5') 19 | .jqCron() 20 | .jqCronGetInstance(); 21 | 22 | $('.a5-enable').click(function(e){ 23 | cron.enable(); 24 | e.preventDefault(); 25 | }); 26 | 27 | $('.a5-disable').click(function(e){ 28 | cron.disable(); 29 | e.preventDefault(); 30 | }); 31 | 32 | $('.a5-toggle').click(function(e){ 33 | if(cron.isDisabled()) 34 | cron.enable(); 35 | else 36 | cron.disable(); 37 | e.preventDefault(); 38 | }); 39 | }); 40 | ========== 41 |
42 |

43 | Enable 44 | Disable 45 | Toggle 46 |

-------------------------------------------------------------------------------- /src/jqCron.es.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.es = { 11 | empty: 'todo', 12 | empty_minutes: 'todo', 13 | empty_time_hours: 'toda hora', 14 | empty_time_minutes: 'todo minuto', 15 | empty_day_of_week: 'todo día de la semana', 16 | empty_day_of_month: 'todo día del mes', 17 | empty_month: 'todo mes', 18 | name_minute: 'minuto', 19 | name_hour: 'hora', 20 | name_day: 'día', 21 | name_week: 'semana', 22 | name_month: 'mes', 23 | name_year: 'año', 24 | text_period: 'Todo(a) ', 25 | text_mins: ' al minuto(s) de la hora', 26 | text_time: ' a las :', 27 | text_dow: ' en ', 28 | text_month: ' de ', 29 | text_dom: ' en ', 30 | error1: 'The tag %s is not supported !', 31 | error2: 'Bad number of elements', 32 | error3: 'The jquery_element should be set into jqCron settings', 33 | error4: 'Unrecognized expression', 34 | weekdays: ['lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado', 'domingo'], 35 | months: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'] 36 | }; 37 | -------------------------------------------------------------------------------- /src/jqCron.en.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.en = { 11 | empty: 'every', 12 | empty_minutes: 'every', 13 | empty_time_hours: 'every hour', 14 | empty_time_minutes: 'every minute', 15 | empty_day_of_week: 'every day of the week', 16 | empty_day_of_month: 'every day of the month', 17 | empty_month: 'every month', 18 | name_minute: 'minute', 19 | name_hour: 'hour', 20 | name_day: 'day', 21 | name_week: 'week', 22 | name_month: 'month', 23 | name_year: 'year', 24 | text_period: 'Every ', 25 | text_mins: ' at minute(s) past the hour', 26 | text_time: ' at :', 27 | text_dow: ' on ', 28 | text_month: ' of ', 29 | text_dom: ' on ', 30 | error1: 'The tag %s is not supported !', 31 | error2: 'Bad number of elements', 32 | error3: 'The jquery_element should be set into jqCron settings', 33 | error4: 'Unrecognized expression', 34 | weekdays: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'], 35 | months: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] 36 | }; 37 | -------------------------------------------------------------------------------- /src/jqCron.pt-br.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.pt_br = { 11 | empty: 'todo', 12 | empty_minutes: 'todo', 13 | empty_time_hours: 'toda hora', 14 | empty_time_minutes: 'todo minuto', 15 | empty_day_of_week: 'todo dia da semana', 16 | empty_day_of_month: 'todo dia do mês', 17 | empty_month: 'todo mês', 18 | name_minute: 'minuto', 19 | name_hour: 'hora', 20 | name_day: 'dia', 21 | name_week: 'semana', 22 | name_month: 'mês', 23 | name_year: 'ano', 24 | text_period: 'Todo(a) ', 25 | text_mins: 'e minutos(s) depois', 26 | text_time: ' às :', 27 | text_dow: ' , ', 28 | text_month: ' de ', 29 | text_dom: ' no(s) dia(s) ', 30 | error1: 'A tag %s não é suportada !', 31 | error2: 'Quantidade errada de elementos', 32 | error3: 'A propriedade jquery_element deve ser definida dentro dos parametros do jqCron', 33 | error4: 'Expressão não reconhecida', 34 | weekdays: ['segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado', 'domingo'], 35 | months: ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agost', 'setembro', 'outubro', 'novembro', 'dezembro'] 36 | }; 37 | -------------------------------------------------------------------------------- /src/jqCron.bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.bg = { 11 | empty: 'вс.', 12 | empty_minutes: '(всяка минута)', 13 | empty_time_hours: '(всеки час)', 14 | empty_time_minutes: '(всяка минута)', 15 | empty_day_of_week: '(всеки ден от седмицата)', 16 | empty_day_of_month: '(всяко)', 17 | empty_month: '(всеки месец)', 18 | name_minute: 'Всяка минута', 19 | name_hour: 'Всеки час', 20 | name_day: 'Всеки ден', 21 | name_week: 'Всяка седмица', 22 | name_month: 'Всеки месец', 23 | name_year: 'Всяка година', 24 | text_period: '', 25 | text_mins: ' във и минути', 26 | text_time: ' във часа и минути', 27 | text_dow: ', ', 28 | text_month: ' през ', 29 | text_dom: ' на число,', 30 | error1: 'Маркерът %s не се поддържа!', 31 | error2: 'Грешен брой елементи.', 32 | error3: 'Параметърът jquery_element трябва да бъде зададен в настройките на jqCron.', 33 | error4: 'Неразпознат cron-изарз.', 34 | weekdays: ['понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота', 'неделя'], 35 | months: ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември'] 36 | }; 37 | -------------------------------------------------------------------------------- /src/jqCron.pl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | jqCronDefaultSettings.texts.pl = { 11 | empty: 'co minutę', 12 | empty_minutes: 'każdej minucie', 13 | empty_time_hours: 'każdej godzinie', 14 | empty_time_minutes: 'w każdej minucie', 15 | empty_day_of_week: 'każdy dzień', 16 | empty_day_of_month: 'w każdy dzień', 17 | empty_month: 'każdego miesiąca', 18 | name_minute: 'minuta', 19 | name_hour: 'o każdej godzinie', 20 | name_day: 'każdego dnia', 21 | name_week: 'każdego tygodnia', 22 | name_month: 'każdego miesiąca', 23 | name_year: 'każdego roku', 24 | text_period: 'Uruchamiaj ', 25 | text_mins: ' w minucie(tach) godziny', 26 | text_time: ' o :', 27 | text_dow: ' w ', 28 | text_month: ' ', 29 | text_dom: ' ', 30 | error1: 'Ten tag %s nie jest obsługiwany!', 31 | error2: 'Błędna liczba elementów', 32 | error3: 'Element jquery_element powinien być ustawiony w jqCron settings', 33 | error4: 'Nierozpoznane wyrażenie', 34 | weekdays: ['poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota', 'niedziela'], 35 | months: ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'] 36 | }; 37 | -------------------------------------------------------------------------------- /src/jqCron.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * This file is part of the Arnapou jqCron package. 4 | * 5 | * (c) Arnaud Buathier 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | .jqCron-selector { 12 | position: relative; 13 | } 14 | .jqCron-cross, 15 | .jqCron-selector-title { 16 | cursor: pointer; 17 | border-radius: 3px; 18 | border: 1px solid #ddd; 19 | margin: 0 0.2em; 20 | padding: 0 0.5em; 21 | } 22 | .jqCron-container.disable .jqCron-cross:hover, 23 | .jqCron-container.disable .jqCron-selector-title:hover, 24 | .jqCron-cross, 25 | .jqCron-selector-title { 26 | background: #eee; 27 | border-color: #ddd; 28 | } 29 | .jqCron-cross:hover, 30 | .jqCron-selector-title:hover { 31 | background-color: #ddd; 32 | border-color: #aaa; 33 | } 34 | .jqCron-cross { 35 | border-radius: 1em; 36 | font-size: 80%; 37 | padding: 0 0.3em; 38 | } 39 | .jqCron-selector-list { 40 | background: #eee; 41 | border: 1px solid #aaa; 42 | -webkit-box-shadow: 2px 2px 3px #ccc; 43 | box-shadow: 2px 2px 3px #ccc; 44 | left: 0.2em; 45 | list-style: none; 46 | margin: 0; 47 | padding: 0; 48 | position: absolute; 49 | top: 1.5em; 50 | z-index: 1; 51 | } 52 | .jqCron-selector-list li { 53 | -webkit-box-sizing: border-box; 54 | -moz-box-sizing: border-box; 55 | -ms-box-sizing: border-box; 56 | box-sizing: border-box; 57 | cursor: default; 58 | display: inline-block; 59 | margin: 0; 60 | padding: 0.1em 0.4em; 61 | width: 100%; 62 | } 63 | .jqCron-selector-list li.selected { 64 | background: #0088cc; 65 | color: white; 66 | } 67 | .jqCron-selector-list li:hover { 68 | background: #5fb9e7; 69 | color: white; 70 | } 71 | .jqCron-selector-list.cols2 { 72 | width: 4em; 73 | } 74 | .jqCron-selector-list.cols2 li { 75 | width: 50%; 76 | } 77 | .jqCron-selector-list.cols3 { 78 | width: 6em; 79 | } 80 | .jqCron-selector-list.cols3 li { 81 | width: 33%; 82 | } 83 | .jqCron-selector-list.cols4 { 84 | width: 8em; 85 | } 86 | .jqCron-selector-list.cols4 li { 87 | width: 25%; 88 | } 89 | .jqCron-selector-list.cols5 { 90 | width: 10em; 91 | } 92 | .jqCron-selector-list.cols5 li { 93 | width: 20%; 94 | } 95 | .jqCron-error .jqCron-selector-title { 96 | background: #fee; 97 | border: 1px solid #fdd; 98 | color: red; 99 | } 100 | .jqCron-container.disable * { 101 | color: #888; 102 | } 103 | .jqCron-container.disable .jqCron-selector-title { 104 | background: #eee !important; 105 | } 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /test/spec/jqCronSpec.en.js: -------------------------------------------------------------------------------- 1 | describe("#Player", function() { 2 | 3 | beforeAll(function() { 4 | $(function () { 5 | $('#cronexp').jqCron({ 6 | enabled_minute: false, 7 | multiple_dom: true, 8 | multiple_month: true, 9 | multiple_mins: false, 10 | multiple_dow: true, 11 | multiple_time_hours: true, 12 | multiple_time_minutes: false, 13 | default_period: 'week', 14 | default_value: '* * * * 1', 15 | no_reset_button: true, 16 | lang: 'en' 17 | }); 18 | }); 19 | }); 20 | 21 | it("should translate every hour schedule correctly", function () { 22 | var cronExp = "43 * * * *"; 23 | var cronHumanTextInEnglish = "Every hour at 43 minute(s) past the hour"; 24 | 25 | $('#cronexp').jqCronGetInstance().setCron(cronExp); 26 | 27 | expect($('#cronexp').jqCronGetInstance().getHumanText()).toEqual(cronHumanTextInEnglish); 28 | }); 29 | 30 | 31 | it("should translate every day schedule correctly", function () { 32 | var cronExp = "20 5,7,10 * * *"; 33 | var cronHumanTextInEnglish = "Every day at 5,7,10:20"; 34 | 35 | $('#cronexp').jqCronGetInstance().setCron(cronExp); 36 | 37 | expect($('#cronexp').jqCronGetInstance().getHumanText()).toEqual(cronHumanTextInEnglish); 38 | }); 39 | 40 | it("should translate every week schedule correctly", function () { 41 | var cronExp = "20 10 * * 1-5"; 42 | var cronHumanTextInEnglish = "Every week on monday-friday at 10:20"; 43 | 44 | $('#cronexp').jqCronGetInstance().setCron(cronExp); 45 | 46 | expect($('#cronexp').jqCronGetInstance().getHumanText()).toEqual(cronHumanTextInEnglish); 47 | }); 48 | 49 | it("should translate every month schedule correctly", function () { 50 | var cronExp = "52 8-9 26 * *"; 51 | var cronHumanTextInEnglish = "Every month on 26 at 8-9:52"; 52 | 53 | $('#cronexp').jqCronGetInstance().setCron(cronExp); 54 | 55 | expect($('#cronexp').jqCronGetInstance().getHumanText()).toEqual(cronHumanTextInEnglish); 56 | }); 57 | 58 | it("should translate every year schedule correctly", function () { 59 | var cronExp = "34 21 3 5 *"; 60 | var cronHumanTextInEnglish = "Every year on 3 of may at 21:34"; 61 | 62 | $('#cronexp').jqCronGetInstance().setCron(cronExp); 63 | 64 | expect($('#cronexp').jqCronGetInstance().getHumanText()).toEqual(cronHumanTextInEnglish); 65 | }); 66 | 67 | 68 | }); 69 | -------------------------------------------------------------------------------- /demo/index.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | $pages = array( 12 | 'demo_1' => 'Demo 1', 13 | 'demo_2' => 'Demo 2', 14 | 'demo_3' => 'Demo 3', 15 | 'demo_4' => 'Demo 4', 16 | 'demo_5' => 'Demo 5', 17 | 'demo_6' => 'Demo 6', 18 | ); 19 | 20 | if (isset($_GET['page']) && in_array($_GET['page'], array_keys($pages), true)) { 21 | $current = $_GET['page']; 22 | } 23 | if (!isset($current)) { 24 | foreach ($pages as $page => $title) { 25 | $current = $page; 26 | break; 27 | } 28 | } 29 | ?> 30 | 31 | 32 | jqCron 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 63 | 64 | 65 | 66 |
67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /demo/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | * { 10 | outline: 0 !important; 11 | } 12 | .container { 13 | margin-top: 1em; 14 | margin-bottom: 5em; 15 | } 16 | .github-icon { 17 | display: inline-block; 18 | width: 1em; 19 | height: 1em; 20 | vertical-align: middle; 21 | background-position: center; 22 | background-repeat: no-repeat; 23 | background-size: 100% 100%; 24 | background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjY0cHgiIGhlaWdodD0iNjRweCIgdmlld0JveD0iMCAwIDQzOC41NDkgNDM4LjU0OSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDM4LjU0OSA0MzguNTQ5OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cjxn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L2c+Cjwvc3ZnPgo=); 25 | } -------------------------------------------------------------------------------- /test/lib/jasmine-2.1.2/boot.js: -------------------------------------------------------------------------------- 1 | /** 2 | Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project. 3 | 4 | If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms. 5 | 6 | The location of `boot.js` can be specified and/or overridden in `jasmine.yml`. 7 | 8 | [jasmine-gem]: http://github.com/pivotal/jasmine-gem 9 | */ 10 | 11 | (function() { 12 | 13 | /** 14 | * ## Require & Instantiate 15 | * 16 | * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference. 17 | */ 18 | window.jasmine = jasmineRequire.core(jasmineRequire); 19 | 20 | /** 21 | * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference. 22 | */ 23 | jasmineRequire.html(jasmine); 24 | 25 | /** 26 | * Create the Jasmine environment. This is used to run all specs in a project. 27 | */ 28 | var env = jasmine.getEnv(); 29 | 30 | /** 31 | * ## The Global Interface 32 | * 33 | * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged. 34 | */ 35 | var jasmineInterface = jasmineRequire.interface(jasmine, env); 36 | 37 | /** 38 | * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`. 39 | */ 40 | if (typeof window == "undefined" && typeof exports == "object") { 41 | extend(exports, jasmineInterface); 42 | } else { 43 | extend(window, jasmineInterface); 44 | } 45 | 46 | /** 47 | * ## Runner Parameters 48 | * 49 | * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface. 50 | */ 51 | 52 | var queryString = new jasmine.QueryString({ 53 | getWindowLocation: function() { return window.location; } 54 | }); 55 | 56 | var catchingExceptions = queryString.getParam("catch"); 57 | env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions); 58 | 59 | /** 60 | * ## Reporters 61 | * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any). 62 | */ 63 | var htmlReporter = new jasmine.HtmlReporter({ 64 | env: env, 65 | onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); }, 66 | getContainer: function() { return document.body; }, 67 | createElement: function() { return document.createElement.apply(document, arguments); }, 68 | createTextNode: function() { return document.createTextNode.apply(document, arguments); }, 69 | timer: new jasmine.Timer() 70 | }); 71 | 72 | /** 73 | * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript. 74 | */ 75 | env.addReporter(jasmineInterface.jsApiReporter); 76 | env.addReporter(htmlReporter); 77 | 78 | /** 79 | * Filter which specs will be run by matching the start of the full name against the `spec` query param. 80 | */ 81 | var specFilter = new jasmine.HtmlSpecFilter({ 82 | filterString: function() { return queryString.getParam("spec"); } 83 | }); 84 | 85 | env.specFilter = function(spec) { 86 | return specFilter.matches(spec.getFullName()); 87 | }; 88 | 89 | /** 90 | * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack. 91 | */ 92 | window.setTimeout = window.setTimeout; 93 | window.setInterval = window.setInterval; 94 | window.clearTimeout = window.clearTimeout; 95 | window.clearInterval = window.clearInterval; 96 | 97 | /** 98 | * ## Execution 99 | * 100 | * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded. 101 | */ 102 | var currentWindowOnload = window.onload; 103 | 104 | window.onload = function() { 105 | if (currentWindowOnload) { 106 | currentWindowOnload(); 107 | } 108 | htmlReporter.initialize(); 109 | env.execute(); 110 | }; 111 | 112 | /** 113 | * Helper function for readability above. 114 | */ 115 | function extend(destination, source) { 116 | for (var property in source) destination[property] = source[property]; 117 | return destination; 118 | } 119 | 120 | }()); 121 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.1.2/console.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2014 Pivotal Labs 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | function getJasmineRequireObj() { 24 | if (typeof module !== 'undefined' && module.exports) { 25 | return exports; 26 | } else { 27 | window.jasmineRequire = window.jasmineRequire || {}; 28 | return window.jasmineRequire; 29 | } 30 | } 31 | 32 | getJasmineRequireObj().console = function(jRequire, j$) { 33 | j$.ConsoleReporter = jRequire.ConsoleReporter(); 34 | }; 35 | 36 | getJasmineRequireObj().ConsoleReporter = function() { 37 | 38 | var noopTimer = { 39 | start: function(){}, 40 | elapsed: function(){ return 0; } 41 | }; 42 | 43 | function ConsoleReporter(options) { 44 | var print = options.print, 45 | showColors = options.showColors || false, 46 | onComplete = options.onComplete || function() {}, 47 | timer = options.timer || noopTimer, 48 | specCount, 49 | failureCount, 50 | failedSpecs = [], 51 | pendingCount, 52 | ansi = { 53 | green: '\x1B[32m', 54 | red: '\x1B[31m', 55 | yellow: '\x1B[33m', 56 | none: '\x1B[0m' 57 | }, 58 | failedSuites = []; 59 | 60 | print('ConsoleReporter is deprecated and will be removed in a future version.'); 61 | 62 | this.jasmineStarted = function() { 63 | specCount = 0; 64 | failureCount = 0; 65 | pendingCount = 0; 66 | print('Started'); 67 | printNewline(); 68 | timer.start(); 69 | }; 70 | 71 | this.jasmineDone = function() { 72 | printNewline(); 73 | for (var i = 0; i < failedSpecs.length; i++) { 74 | specFailureDetails(failedSpecs[i]); 75 | } 76 | 77 | if(specCount > 0) { 78 | printNewline(); 79 | 80 | var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' + 81 | failureCount + ' ' + plural('failure', failureCount); 82 | 83 | if (pendingCount) { 84 | specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount); 85 | } 86 | 87 | print(specCounts); 88 | } else { 89 | print('No specs found'); 90 | } 91 | 92 | printNewline(); 93 | var seconds = timer.elapsed() / 1000; 94 | print('Finished in ' + seconds + ' ' + plural('second', seconds)); 95 | printNewline(); 96 | 97 | for(i = 0; i < failedSuites.length; i++) { 98 | suiteFailureDetails(failedSuites[i]); 99 | } 100 | 101 | onComplete(failureCount === 0); 102 | }; 103 | 104 | this.specDone = function(result) { 105 | specCount++; 106 | 107 | if (result.status == 'pending') { 108 | pendingCount++; 109 | print(colored('yellow', '*')); 110 | return; 111 | } 112 | 113 | if (result.status == 'passed') { 114 | print(colored('green', '.')); 115 | return; 116 | } 117 | 118 | if (result.status == 'failed') { 119 | failureCount++; 120 | failedSpecs.push(result); 121 | print(colored('red', 'F')); 122 | } 123 | }; 124 | 125 | this.suiteDone = function(result) { 126 | if (result.failedExpectations && result.failedExpectations.length > 0) { 127 | failureCount++; 128 | failedSuites.push(result); 129 | } 130 | }; 131 | 132 | return this; 133 | 134 | function printNewline() { 135 | print('\n'); 136 | } 137 | 138 | function colored(color, str) { 139 | return showColors ? (ansi[color] + str + ansi.none) : str; 140 | } 141 | 142 | function plural(str, count) { 143 | return count == 1 ? str : str + 's'; 144 | } 145 | 146 | function repeat(thing, times) { 147 | var arr = []; 148 | for (var i = 0; i < times; i++) { 149 | arr.push(thing); 150 | } 151 | return arr; 152 | } 153 | 154 | function indent(str, spaces) { 155 | var lines = (str || '').split('\n'); 156 | var newArr = []; 157 | for (var i = 0; i < lines.length; i++) { 158 | newArr.push(repeat(' ', spaces).join('') + lines[i]); 159 | } 160 | return newArr.join('\n'); 161 | } 162 | 163 | function specFailureDetails(result) { 164 | printNewline(); 165 | print(result.fullName); 166 | 167 | for (var i = 0; i < result.failedExpectations.length; i++) { 168 | var failedExpectation = result.failedExpectations[i]; 169 | printNewline(); 170 | print(indent(failedExpectation.message, 2)); 171 | print(indent(failedExpectation.stack, 2)); 172 | } 173 | 174 | printNewline(); 175 | } 176 | 177 | function suiteFailureDetails(result) { 178 | for (var i = 0; i < result.failedExpectations.length; i++) { 179 | printNewline(); 180 | print(colored('red', 'An error was thrown in an afterAll')); 181 | printNewline(); 182 | print(colored('red', 'AfterAll ' + result.failedExpectations[i].message)); 183 | 184 | } 185 | printNewline(); 186 | } 187 | } 188 | 189 | return ConsoleReporter; 190 | }; 191 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.1.2/jasmine-html.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2014 Pivotal Labs 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | jasmineRequire.html = function(j$) { 24 | j$.ResultsNode = jasmineRequire.ResultsNode(); 25 | j$.HtmlReporter = jasmineRequire.HtmlReporter(j$); 26 | j$.QueryString = jasmineRequire.QueryString(); 27 | j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter(); 28 | }; 29 | 30 | jasmineRequire.HtmlReporter = function(j$) { 31 | 32 | var noopTimer = { 33 | start: function() {}, 34 | elapsed: function() { return 0; } 35 | }; 36 | 37 | function HtmlReporter(options) { 38 | var env = options.env || {}, 39 | getContainer = options.getContainer, 40 | createElement = options.createElement, 41 | createTextNode = options.createTextNode, 42 | onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {}, 43 | timer = options.timer || noopTimer, 44 | results = [], 45 | specsExecuted = 0, 46 | failureCount = 0, 47 | pendingSpecCount = 0, 48 | htmlReporterMain, 49 | symbols, 50 | failedSuites = []; 51 | 52 | this.initialize = function() { 53 | clearPrior(); 54 | htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'}, 55 | createDom('div', {className: 'banner'}, 56 | createDom('a', {className: 'title', href: 'http://jasmine.github.io/', target: '_blank'}), 57 | createDom('span', {className: 'version'}, j$.version) 58 | ), 59 | createDom('ul', {className: 'symbol-summary'}), 60 | createDom('div', {className: 'alert'}), 61 | createDom('div', {className: 'results'}, 62 | createDom('div', {className: 'failures'}) 63 | ) 64 | ); 65 | getContainer().appendChild(htmlReporterMain); 66 | 67 | symbols = find('.symbol-summary'); 68 | }; 69 | 70 | var totalSpecsDefined; 71 | this.jasmineStarted = function(options) { 72 | totalSpecsDefined = options.totalSpecsDefined || 0; 73 | timer.start(); 74 | }; 75 | 76 | var summary = createDom('div', {className: 'summary'}); 77 | 78 | var topResults = new j$.ResultsNode({}, '', null), 79 | currentParent = topResults; 80 | 81 | this.suiteStarted = function(result) { 82 | currentParent.addChild(result, 'suite'); 83 | currentParent = currentParent.last(); 84 | }; 85 | 86 | this.suiteDone = function(result) { 87 | if (result.status == 'failed') { 88 | failedSuites.push(result); 89 | } 90 | 91 | if (currentParent == topResults) { 92 | return; 93 | } 94 | 95 | currentParent = currentParent.parent; 96 | }; 97 | 98 | this.specStarted = function(result) { 99 | currentParent.addChild(result, 'spec'); 100 | }; 101 | 102 | var failures = []; 103 | this.specDone = function(result) { 104 | if(noExpectations(result) && typeof console !== 'undefined' && typeof console.error !== 'undefined') { 105 | console.error('Spec \'' + result.fullName + '\' has no expectations.'); 106 | } 107 | 108 | if (result.status != 'disabled') { 109 | specsExecuted++; 110 | } 111 | 112 | symbols.appendChild(createDom('li', { 113 | className: noExpectations(result) ? 'empty' : result.status, 114 | id: 'spec_' + result.id, 115 | title: result.fullName 116 | } 117 | )); 118 | 119 | if (result.status == 'failed') { 120 | failureCount++; 121 | 122 | var failure = 123 | createDom('div', {className: 'spec-detail failed'}, 124 | createDom('div', {className: 'description'}, 125 | createDom('a', {title: result.fullName, href: specHref(result)}, result.fullName) 126 | ), 127 | createDom('div', {className: 'messages'}) 128 | ); 129 | var messages = failure.childNodes[1]; 130 | 131 | for (var i = 0; i < result.failedExpectations.length; i++) { 132 | var expectation = result.failedExpectations[i]; 133 | messages.appendChild(createDom('div', {className: 'result-message'}, expectation.message)); 134 | messages.appendChild(createDom('div', {className: 'stack-trace'}, expectation.stack)); 135 | } 136 | 137 | failures.push(failure); 138 | } 139 | 140 | if (result.status == 'pending') { 141 | pendingSpecCount++; 142 | } 143 | }; 144 | 145 | this.jasmineDone = function() { 146 | var banner = find('.banner'); 147 | banner.appendChild(createDom('span', {className: 'duration'}, 'finished in ' + timer.elapsed() / 1000 + 's')); 148 | 149 | var alert = find('.alert'); 150 | 151 | alert.appendChild(createDom('span', { className: 'exceptions' }, 152 | createDom('label', { className: 'label', 'for': 'raise-exceptions' }, 'raise exceptions'), 153 | createDom('input', { 154 | className: 'raise', 155 | id: 'raise-exceptions', 156 | type: 'checkbox' 157 | }) 158 | )); 159 | var checkbox = find('#raise-exceptions'); 160 | 161 | checkbox.checked = !env.catchingExceptions(); 162 | checkbox.onclick = onRaiseExceptionsClick; 163 | 164 | if (specsExecuted < totalSpecsDefined) { 165 | var skippedMessage = 'Ran ' + specsExecuted + ' of ' + totalSpecsDefined + ' specs - run all'; 166 | alert.appendChild( 167 | createDom('span', {className: 'bar skipped'}, 168 | createDom('a', {href: '?', title: 'Run all specs'}, skippedMessage) 169 | ) 170 | ); 171 | } 172 | var statusBarMessage = ''; 173 | var statusBarClassName = 'bar '; 174 | 175 | if (totalSpecsDefined > 0) { 176 | statusBarMessage += pluralize('spec', specsExecuted) + ', ' + pluralize('failure', failureCount); 177 | if (pendingSpecCount) { statusBarMessage += ', ' + pluralize('pending spec', pendingSpecCount); } 178 | statusBarClassName += (failureCount > 0) ? 'failed' : 'passed'; 179 | } else { 180 | statusBarClassName += 'skipped'; 181 | statusBarMessage += 'No specs found'; 182 | } 183 | 184 | alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage)); 185 | 186 | for(i = 0; i < failedSuites.length; i++) { 187 | var failedSuite = failedSuites[i]; 188 | for(var j = 0; j < failedSuite.failedExpectations.length; j++) { 189 | var errorBarMessage = 'AfterAll ' + failedSuite.failedExpectations[j].message; 190 | var errorBarClassName = 'bar errored'; 191 | alert.appendChild(createDom('span', {className: errorBarClassName}, errorBarMessage)); 192 | } 193 | } 194 | 195 | var results = find('.results'); 196 | results.appendChild(summary); 197 | 198 | summaryList(topResults, summary); 199 | 200 | function summaryList(resultsTree, domParent) { 201 | var specListNode; 202 | for (var i = 0; i < resultsTree.children.length; i++) { 203 | var resultNode = resultsTree.children[i]; 204 | if (resultNode.type == 'suite') { 205 | var suiteListNode = createDom('ul', {className: 'suite', id: 'suite-' + resultNode.result.id}, 206 | createDom('li', {className: 'suite-detail'}, 207 | createDom('a', {href: specHref(resultNode.result)}, resultNode.result.description) 208 | ) 209 | ); 210 | 211 | summaryList(resultNode, suiteListNode); 212 | domParent.appendChild(suiteListNode); 213 | } 214 | if (resultNode.type == 'spec') { 215 | if (domParent.getAttribute('class') != 'specs') { 216 | specListNode = createDom('ul', {className: 'specs'}); 217 | domParent.appendChild(specListNode); 218 | } 219 | var specDescription = resultNode.result.description; 220 | if(noExpectations(resultNode.result)) { 221 | specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription; 222 | } 223 | specListNode.appendChild( 224 | createDom('li', { 225 | className: resultNode.result.status, 226 | id: 'spec-' + resultNode.result.id 227 | }, 228 | createDom('a', {href: specHref(resultNode.result)}, specDescription) 229 | ) 230 | ); 231 | } 232 | } 233 | } 234 | 235 | if (failures.length) { 236 | alert.appendChild( 237 | createDom('span', {className: 'menu bar spec-list'}, 238 | createDom('span', {}, 'Spec List | '), 239 | createDom('a', {className: 'failures-menu', href: '#'}, 'Failures'))); 240 | alert.appendChild( 241 | createDom('span', {className: 'menu bar failure-list'}, 242 | createDom('a', {className: 'spec-list-menu', href: '#'}, 'Spec List'), 243 | createDom('span', {}, ' | Failures '))); 244 | 245 | find('.failures-menu').onclick = function() { 246 | setMenuModeTo('failure-list'); 247 | }; 248 | find('.spec-list-menu').onclick = function() { 249 | setMenuModeTo('spec-list'); 250 | }; 251 | 252 | setMenuModeTo('failure-list'); 253 | 254 | var failureNode = find('.failures'); 255 | for (var i = 0; i < failures.length; i++) { 256 | failureNode.appendChild(failures[i]); 257 | } 258 | } 259 | }; 260 | 261 | return this; 262 | 263 | function find(selector) { 264 | return getContainer().querySelector('.jasmine_html-reporter ' + selector); 265 | } 266 | 267 | function clearPrior() { 268 | // return the reporter 269 | var oldReporter = find(''); 270 | 271 | if(oldReporter) { 272 | getContainer().removeChild(oldReporter); 273 | } 274 | } 275 | 276 | function createDom(type, attrs, childrenVarArgs) { 277 | var el = createElement(type); 278 | 279 | for (var i = 2; i < arguments.length; i++) { 280 | var child = arguments[i]; 281 | 282 | if (typeof child === 'string') { 283 | el.appendChild(createTextNode(child)); 284 | } else { 285 | if (child) { 286 | el.appendChild(child); 287 | } 288 | } 289 | } 290 | 291 | for (var attr in attrs) { 292 | if (attr == 'className') { 293 | el[attr] = attrs[attr]; 294 | } else { 295 | el.setAttribute(attr, attrs[attr]); 296 | } 297 | } 298 | 299 | return el; 300 | } 301 | 302 | function pluralize(singular, count) { 303 | var word = (count == 1 ? singular : singular + 's'); 304 | 305 | return '' + count + ' ' + word; 306 | } 307 | 308 | function specHref(result) { 309 | return '?spec=' + encodeURIComponent(result.fullName); 310 | } 311 | 312 | function setMenuModeTo(mode) { 313 | htmlReporterMain.setAttribute('class', 'jasmine_html-reporter ' + mode); 314 | } 315 | 316 | function noExpectations(result) { 317 | return (result.failedExpectations.length + result.passedExpectations.length) === 0 && 318 | result.status === 'passed'; 319 | } 320 | } 321 | 322 | return HtmlReporter; 323 | }; 324 | 325 | jasmineRequire.HtmlSpecFilter = function() { 326 | function HtmlSpecFilter(options) { 327 | var filterString = options && options.filterString() && options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); 328 | var filterPattern = new RegExp(filterString); 329 | 330 | this.matches = function(specName) { 331 | return filterPattern.test(specName); 332 | }; 333 | } 334 | 335 | return HtmlSpecFilter; 336 | }; 337 | 338 | jasmineRequire.ResultsNode = function() { 339 | function ResultsNode(result, type, parent) { 340 | this.result = result; 341 | this.type = type; 342 | this.parent = parent; 343 | 344 | this.children = []; 345 | 346 | this.addChild = function(result, type) { 347 | this.children.push(new ResultsNode(result, type, this)); 348 | }; 349 | 350 | this.last = function() { 351 | return this.children[this.children.length - 1]; 352 | }; 353 | } 354 | 355 | return ResultsNode; 356 | }; 357 | 358 | jasmineRequire.QueryString = function() { 359 | function QueryString(options) { 360 | 361 | this.setParam = function(key, value) { 362 | var paramMap = queryStringToParamMap(); 363 | paramMap[key] = value; 364 | options.getWindowLocation().search = toQueryString(paramMap); 365 | }; 366 | 367 | this.getParam = function(key) { 368 | return queryStringToParamMap()[key]; 369 | }; 370 | 371 | return this; 372 | 373 | function toQueryString(paramMap) { 374 | var qStrPairs = []; 375 | for (var prop in paramMap) { 376 | qStrPairs.push(encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop])); 377 | } 378 | return '?' + qStrPairs.join('&'); 379 | } 380 | 381 | function queryStringToParamMap() { 382 | var paramStr = options.getWindowLocation().search.substring(1), 383 | params = [], 384 | paramMap = {}; 385 | 386 | if (paramStr.length > 0) { 387 | params = paramStr.split('&'); 388 | for (var i = 0; i < params.length; i++) { 389 | var p = params[i].split('='); 390 | var value = decodeURIComponent(p[1]); 391 | if (value === 'true' || value === 'false') { 392 | value = JSON.parse(value); 393 | } 394 | paramMap[decodeURIComponent(p[0])] = value; 395 | } 396 | } 397 | 398 | return paramMap; 399 | } 400 | 401 | } 402 | 403 | return QueryString; 404 | }; 405 | -------------------------------------------------------------------------------- /src/Cron.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | /* 13 | * Usage examples : 14 | * ---------------- 15 | * 16 | * $cron = new Cron('10-30/5 12 * * *'); 17 | * 18 | * var_dump($cron->getMinutes()); 19 | * // array(5) { 20 | * // [0]=> int(10) 21 | * // [1]=> int(15) 22 | * // [2]=> int(20) 23 | * // [3]=> int(25) 24 | * // [4]=> int(30) 25 | * // } 26 | * 27 | * var_dump($cron->getText('fr')); 28 | * // string(32) "Chaque jour à 12:10,15,20,25,30" 29 | * 30 | * var_dump($cron->getText('en')); 31 | * // string(30) "Every day at 12:10,15,20,25,30" 32 | * 33 | * var_dump($cron->getType()); 34 | * // string(3) "day" 35 | * 36 | * var_dump($cron->getCronHours()); 37 | * // string(2) "12" 38 | * 39 | * var_dump($cron->matchExact(new \DateTime('2012-07-01 13:25:10'))); 40 | * // bool(false) 41 | * 42 | * var_dump($cron->matchExact(new \DateTime('2012-07-01 12:15:20'))); 43 | * // bool(true) 44 | * 45 | * var_dump($cron->matchWithMargin(new \DateTime('2012-07-01 12:32:50'), -3, 5)); 46 | * // bool(true) 47 | */ 48 | 49 | class Cron { 50 | 51 | const TYPE_UNDEFINED = ''; 52 | const TYPE_MINUTE = 'minute'; 53 | const TYPE_HOUR = 'hour'; 54 | const TYPE_DAY = 'day'; 55 | const TYPE_WEEK = 'week'; 56 | const TYPE_MONTH = 'month'; 57 | const TYPE_YEAR = 'year'; 58 | 59 | /** 60 | * 61 | * @var array 62 | */ 63 | protected $texts = array( 64 | 'fr' => array( 65 | 'empty' => '-tout-', 66 | 'name_minute' => 'minute', 67 | 'name_hour' => 'heure', 68 | 'name_day' => 'jour', 69 | 'name_week' => 'semaine', 70 | 'name_month' => 'mois', 71 | 'name_year' => 'année', 72 | 'text_period' => 'Chaque %s', 73 | 'text_mins' => 'à %s minutes', 74 | 'text_time' => 'à %s:%s', 75 | 'text_dow' => 'le %s', 76 | 'text_month' => 'de %s', 77 | 'text_dom' => 'le %s', 78 | 'weekdays' => array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'), 79 | 'months' => array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'), 80 | ), 81 | 'en' => array( 82 | 'empty' => '-all-', 83 | 'name_minute' => 'minute', 84 | 'name_hour' => 'hour', 85 | 'name_day' => 'day', 86 | 'name_week' => 'week', 87 | 'name_month' => 'month', 88 | 'name_year' => 'year', 89 | 'text_period' => 'Every %s', 90 | 'text_mins' => 'at %s minutes past the hour', 91 | 'text_time' => 'at %s:%s', 92 | 'text_dow' => 'on %s', 93 | 'text_month' => 'of %s', 94 | 'text_dom' => 'on the %s', 95 | 'weekdays' => array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'), 96 | 'months' => array('january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'), 97 | ), 98 | ); 99 | 100 | /** 101 | * min hour dom month dow 102 | * @var string 103 | */ 104 | protected $cron = ''; 105 | 106 | /** 107 | * 108 | * @var array 109 | */ 110 | protected $minutes = array(); 111 | 112 | /** 113 | * 114 | * @var array 115 | */ 116 | protected $hours = array(); 117 | 118 | /** 119 | * 120 | * @var array 121 | */ 122 | protected $months = array(); 123 | 124 | /** 125 | * 0-7 : sunday, monday, ... saturday, sunday 126 | * @var array 127 | */ 128 | protected $dow = array(); 129 | 130 | /** 131 | * 132 | * @var array 133 | */ 134 | protected $dom = array(); 135 | 136 | /** 137 | * 138 | * @param string $cron 139 | */ 140 | public function __construct($cron = null) { 141 | if (!empty($cron)) { 142 | $this->setCron($cron); 143 | } 144 | } 145 | 146 | /** 147 | * 148 | * @return string 149 | */ 150 | public function getCron() { 151 | return implode(' ', array( 152 | $this->getCronMinutes(), 153 | $this->getCronHours(), 154 | $this->getCronDaysOfMonth(), 155 | $this->getCronMonths(), 156 | $this->getCronDaysOfWeek(), 157 | )); 158 | } 159 | 160 | /** 161 | * 162 | * @param string $lang 'fr' or 'en' 163 | * @return string 164 | */ 165 | public function getText($lang) { 166 | // check lang 167 | if (!isset($this->texts[$lang])) { 168 | return $this->getCron(); 169 | } 170 | $texts = $this->texts[$lang]; 171 | // check type 172 | $type = $this->getType(); 173 | if ($type == self::TYPE_UNDEFINED) { 174 | return $this->getCron(); 175 | } 176 | // init 177 | $elements = array(); 178 | $elements[] = sprintf($texts['text_period'], $texts['name_' . $type]); 179 | // hour 180 | if (in_array($type, array(self::TYPE_HOUR))) { 181 | $elements[] = sprintf($texts['text_mins'], $this->getCronMinutes()); 182 | } 183 | // week 184 | if (in_array($type, array(self::TYPE_WEEK))) { 185 | $dow = $this->getCronDaysOfWeek(); 186 | foreach ($texts['weekdays'] as $i => $wd) { 187 | $dow = str_replace((string) ($i + 1), $wd, $dow); 188 | } 189 | $elements[] = sprintf($texts['text_dow'], $dow); 190 | } 191 | // month + year 192 | if (in_array($type, array(self::TYPE_MONTH, self::TYPE_YEAR))) { 193 | $elements[] = sprintf($texts['text_dom'], $this->getCronDaysOfMonth()); 194 | } 195 | // year 196 | if (in_array($type, array(self::TYPE_YEAR))) { 197 | $months = $this->getCronMonths(); 198 | for ($i = count($texts['months']) - 1; $i >= 0; $i--) { 199 | $months = str_replace((string) ($i + 1), $texts['months'][$i], $months); 200 | } 201 | $elements[] = sprintf($texts['text_month'], $months); 202 | } 203 | // day + week + month + year 204 | if (in_array($type, array(self::TYPE_DAY, self::TYPE_WEEK, self::TYPE_MONTH, self::TYPE_YEAR))) { 205 | $elements[] = sprintf($texts['text_time'], $this->getCronHours(), $this->getCronMinutes()); 206 | } 207 | return str_replace('*', $texts['empty'], implode(' ', $elements)); 208 | } 209 | 210 | /** 211 | * 212 | * @return string 213 | */ 214 | public function getType() { 215 | $mask = preg_replace('/[^\* ]/si', '-', $this->getCron()); 216 | $mask = preg_replace('/-+/si', '-', $mask); 217 | $mask = preg_replace('/[^-\*]/si', '', $mask); 218 | if ($mask == '*****') { 219 | return self::TYPE_MINUTE; 220 | } 221 | elseif ($mask == '-****') { 222 | return self::TYPE_HOUR; 223 | } 224 | elseif (substr($mask, -3) == '***') { 225 | return self::TYPE_DAY; 226 | } 227 | elseif (substr($mask, -3) == '-**') { 228 | return self::TYPE_MONTH; 229 | } 230 | elseif (substr($mask, -3) == '**-') { 231 | return self::TYPE_WEEK; 232 | } 233 | elseif (substr($mask, -2) == '-*') { 234 | return self::TYPE_YEAR; 235 | } 236 | return self::TYPE_UNDEFINED; 237 | } 238 | 239 | /** 240 | * 241 | * @param string $cron 242 | * @return Cron 243 | */ 244 | public function setCron($cron) { 245 | // sanitize 246 | $cron = trim($cron); 247 | $cron = preg_replace('/\s+/', ' ', $cron); 248 | // explode 249 | $elements = explode(' ', $cron); 250 | if (count($elements) != 5) { 251 | throw new Exception('Bad number of elements'); 252 | } 253 | $this->cron = $cron; 254 | $this->setMinutes($elements[0]); 255 | $this->setHours($elements[1]); 256 | $this->setDaysOfMonth($elements[2]); 257 | $this->setMonths($elements[3]); 258 | $this->setDaysOfWeek($elements[4]); 259 | return $this; 260 | } 261 | 262 | /** 263 | * 264 | * @return string 265 | */ 266 | public function getCronMinutes() { 267 | return $this->arrayToCron($this->minutes); 268 | } 269 | 270 | /** 271 | * 272 | * @return string 273 | */ 274 | public function getCronHours() { 275 | return $this->arrayToCron($this->hours); 276 | } 277 | 278 | /** 279 | * 280 | * @return string 281 | */ 282 | public function getCronDaysOfMonth() { 283 | return $this->arrayToCron($this->dom); 284 | } 285 | 286 | /** 287 | * 288 | * @return string 289 | */ 290 | public function getCronMonths() { 291 | return $this->arrayToCron($this->months); 292 | } 293 | 294 | /** 295 | * 296 | * @return string 297 | */ 298 | public function getCronDaysOfWeek() { 299 | return $this->arrayToCron($this->dow); 300 | } 301 | 302 | /** 303 | * 304 | * @return array 305 | */ 306 | public function getMinutes() { 307 | return $this->minutes; 308 | } 309 | 310 | /** 311 | * 312 | * @return array 313 | */ 314 | public function getHours() { 315 | return $this->hours; 316 | } 317 | 318 | /** 319 | * 320 | * @return array 321 | */ 322 | public function getDaysOfMonth() { 323 | return $this->dom; 324 | } 325 | 326 | /** 327 | * 328 | * @return array 329 | */ 330 | public function getMonths() { 331 | return $this->months; 332 | } 333 | 334 | /** 335 | * 336 | * @return array 337 | */ 338 | public function getDaysOfWeek() { 339 | return $this->dow; 340 | } 341 | 342 | /** 343 | * 344 | * @param string|array $minutes 345 | * @return Cron 346 | */ 347 | public function setMinutes($minutes) { 348 | $this->minutes = $this->cronToArray($minutes, 0, 59); 349 | return $this; 350 | } 351 | 352 | /** 353 | * 354 | * @param string|array $hours 355 | * @return Cron 356 | */ 357 | public function setHours($hours) { 358 | $this->hours = $this->cronToArray($hours, 0, 23); 359 | return $this; 360 | } 361 | 362 | /** 363 | * 364 | * @param string|array $months 365 | * @return Cron 366 | */ 367 | public function setMonths($months) { 368 | $this->months = $this->cronToArray($months, 1, 12); 369 | return $this; 370 | } 371 | 372 | /** 373 | * 374 | * @param string|array $dow 375 | * @return Cron 376 | */ 377 | public function setDaysOfWeek($dow) { 378 | $this->dow = $this->cronToArray($dow, 0, 7); 379 | return $this; 380 | } 381 | 382 | /** 383 | * 384 | * @param string|array $dom 385 | * @return Cron 386 | */ 387 | public function setDaysOfMonth($dom) { 388 | $this->dom = $this->cronToArray($dom, 1, 31); 389 | return $this; 390 | } 391 | 392 | /** 393 | * 394 | * @param mixed $date 395 | * @param int $min 396 | * @param int $hour 397 | * @param int $day 398 | * @param int $month 399 | * @param int $weekday 400 | * @return DateTime 401 | */ 402 | protected function parseDate($date, &$min, &$hour, &$day, &$month, &$weekday) { 403 | if (is_numeric($date) && intval($date) == $date) { 404 | $date = new \DateTime('@' . $date); 405 | } 406 | elseif (is_string($date)) { 407 | $date = new \DateTime('@' . strtotime($date)); 408 | } 409 | if ($date instanceof \DateTime) { 410 | $min = intval($date->format('i')); 411 | $hour = intval($date->format('H')); 412 | $day = intval($date->format('d')); 413 | $month = intval($date->format('m')); 414 | $weekday = intval($date->format('w')); // 0-6 415 | } 416 | else { 417 | throw new Exception('Date format not supported'); 418 | } 419 | return new \DateTime($date->format('Y-m-d H:i:sP')); 420 | } 421 | 422 | /** 423 | * 424 | * @param int|string|\Datetime $date 425 | */ 426 | public function matchExact($date) { 427 | $date = $this->parseDate($date, $min, $hour, $day, $month, $weekday); 428 | return 429 | (empty($this->minutes) || in_array($min, $this->minutes)) && 430 | (empty($this->hours) || in_array($hour, $this->hours)) && 431 | (empty($this->dom) || in_array($day, $this->dom)) && 432 | (empty($this->months) || in_array($month, $this->months)) && 433 | (empty($this->dow) || in_array($weekday, $this->dow) || ($weekday == 0 && in_array(7, $this->dow)) || ($weekday == 7 && in_array(0, $this->dow)) 434 | ); 435 | } 436 | 437 | /** 438 | * 439 | * @param int|string|\Datetime $date 440 | * @param int $minuteBefore 441 | * @param int $minuteAfter 442 | */ 443 | public function matchWithMargin($date, $minuteBefore = 0, $minuteAfter = 0) { 444 | if ($minuteBefore > 0) { 445 | throw new Exception('MinuteBefore parameter cannot be positive !'); 446 | } 447 | if ($minuteAfter < 0) { 448 | throw new Exception('MinuteAfter parameter cannot be negative !'); 449 | } 450 | $date = $this->parseDate($date, $min, $hour, $day, $month, $weekday); 451 | $interval = new \DateInterval('PT1M'); // 1 min 452 | if ($minuteBefore != 0) { 453 | $date->sub(new \DateInterval('PT' . abs($minuteBefore) . 'M')); 454 | } 455 | $n = $minuteAfter - $minuteBefore + 1; 456 | for ($i = 0; $i < $n; $i++) { 457 | if ($this->matchExact($date)) { 458 | return true; 459 | } 460 | $date->add($interval); 461 | } 462 | return false; 463 | } 464 | 465 | /** 466 | * 467 | * @param array $array 468 | * @return string 469 | */ 470 | protected function arrayToCron($array) { 471 | $n = count($array); 472 | if (!is_array($array) || $n == 0) { 473 | return '*'; 474 | } 475 | $cron = array($array[0]); 476 | $s = $c = $array[0]; 477 | for ($i = 1; $i < $n; $i++) { 478 | if ($array[$i] == $c + 1) { 479 | $c = $array[$i]; 480 | $cron[count($cron) - 1] = $s . '-' . $c; 481 | } 482 | else { 483 | $s = $c = $array[$i]; 484 | $cron[] = $c; 485 | } 486 | } 487 | return implode(',', $cron); 488 | } 489 | 490 | /** 491 | * 492 | * @param string $string 493 | * @param int $min 494 | * @param int $max 495 | * @return array 496 | */ 497 | protected function cronToArray($string, $min, $max) { 498 | $array = array(); 499 | if (is_array($string)) { 500 | foreach ($string as $val) { 501 | if (is_numeric($val) && intval($val) == $val && $val >= $min && $val <= $max) { 502 | $array[] = intval($val); 503 | } 504 | } 505 | } 506 | else if ($string !== '*') { 507 | while ($string != '') { 508 | // test "*/n" expression 509 | if (preg_match('/^\*\/([0-9]+),?/', $string, $m)) { 510 | for ($i = max(0, $min); $i <= min(59, $max); $i+=$m[1]) { 511 | $array[] = intval($i); 512 | } 513 | $string = substr($string, strlen($m[0])); 514 | continue; 515 | } 516 | // test "a-b/n" expression 517 | if (preg_match('/^([0-9]+)-([0-9]+)\/([0-9]+),?/', $string, $m)) { 518 | for ($i = max($m[1], $min); $i <= min($m[2], $max); $i+=$m[3]) { 519 | $array[] = intval($i); 520 | } 521 | $string = substr($string, strlen($m[0])); 522 | continue; 523 | } 524 | // test "a-b" expression 525 | if (preg_match('/^([0-9]+)-([0-9]+),?/', $string, $m)) { 526 | for ($i = max($m[1], $min); $i <= min($m[2], $max); $i++) { 527 | $array[] = intval($i); 528 | } 529 | $string = substr($string, strlen($m[0])); 530 | continue; 531 | } 532 | // test "c" expression 533 | if (preg_match('/^([0-9]+),?/', $string, $m)) { 534 | if ($m[1] >= $min && $m[1] <= $max) { 535 | $array[] = intval($m[1]); 536 | } 537 | $string = substr($string, strlen($m[0])); 538 | continue; 539 | } 540 | // something goes wrong in the expression 541 | return array(); 542 | } 543 | } 544 | sort($array); 545 | return $array; 546 | } 547 | 548 | } 549 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.1.2/jasmine.css: -------------------------------------------------------------------------------- 1 | body { overflow-y: scroll; } 2 | 3 | .jasmine_html-reporter { background-color: #eee; padding: 5px; margin: -8px; font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333; } 4 | .jasmine_html-reporter a { text-decoration: none; } 5 | .jasmine_html-reporter a:hover { text-decoration: underline; } 6 | .jasmine_html-reporter p, .jasmine_html-reporter h1, .jasmine_html-reporter h2, .jasmine_html-reporter h3, .jasmine_html-reporter h4, .jasmine_html-reporter h5, .jasmine_html-reporter h6 { margin: 0; line-height: 14px; } 7 | .jasmine_html-reporter .banner, .jasmine_html-reporter .symbol-summary, .jasmine_html-reporter .summary, .jasmine_html-reporter .result-message, .jasmine_html-reporter .spec .description, .jasmine_html-reporter .spec-detail .description, .jasmine_html-reporter .alert .bar, .jasmine_html-reporter .stack-trace { padding-left: 9px; padding-right: 9px; } 8 | .jasmine_html-reporter .banner { position: relative; } 9 | .jasmine_html-reporter .banner .title { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAZCAMAAACGusnyAAACdlBMVEX/////AP+AgICqVaqAQICZM5mAVYCSSZKAQICOOY6ATYCLRouAQICJO4mSSYCIRIiPQICHPIeOR4CGQ4aMQICGPYaLRoCFQ4WKQICPPYWJRYCOQoSJQICNPoSIRICMQoSHQICHRICKQoOHQICKPoOJO4OJQYOMQICMQ4CIQYKLQICIPoKLQ4CKQICNPoKJQISMQ4KJQoSLQYKJQISLQ4KIQoSKQYKIQICIQISMQoSKQYKLQIOLQoOJQYGLQIOKQIOMQoGKQYOLQYGKQIOLQoGJQYOJQIOKQYGJQIOKQoGKQIGLQIKLQ4KKQoGLQYKJQIGKQYKJQIGKQIKJQoGKQYKLQIGKQYKLQIOJQoKKQoOJQYKKQIOJQoKKQoOKQIOLQoKKQYOLQYKJQIOKQoKKQYKKQoKJQYOKQYKLQIOKQoKLQYOKQYKLQIOJQoGKQYKJQYGJQoGKQYKLQoGLQYGKQoGJQYKKQYGJQIKKQoGJQYKLQIKKQYGLQYKKQYGKQYGKQYKJQYOKQoKJQYOKQYKLQYOLQYOKQYKLQYOKQoKKQYKKQYOKQYOJQYKKQYKLQYKKQIKKQoKKQYKKQYKKQoKJQIKKQYKLQYKKQYKKQIKKQYKKQYKKQYKKQIKKQYKJQYGLQYGKQYKKQYKKQYGKQIKKQYGKQYOJQoKKQYOLQYKKQYOKQoKKQYKKQoKKQYKKQYKJQYKLQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKJQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKKQYKLQYKKQYKKQYKKQYKKQYKKQYKKQYKKQ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CwtMTg0LjgxNiB6IgogICAgICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgICAgIGlkPSJwYXRoNTYiCiAgICAgICAgICAgICBzdHlsZT0iZmlsbDojOGE0MTgyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiAvPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=') no-repeat, none; -moz-background-size: 100%; -o-background-size: 100%; -webkit-background-size: 100%; background-size: 100%; display: block; float: left; width: 90px; height: 25px; } 10 | .jasmine_html-reporter .banner .version { margin-left: 14px; position: relative; top: 6px; } 11 | .jasmine_html-reporter .banner .duration { position: absolute; right: 14px; top: 6px; } 12 | .jasmine_html-reporter #jasmine_content { position: fixed; right: 100%; } 13 | .jasmine_html-reporter .version { color: #aaa; } 14 | .jasmine_html-reporter .banner { margin-top: 14px; } 15 | .jasmine_html-reporter .duration { color: #aaa; float: right; } 16 | .jasmine_html-reporter .symbol-summary { overflow: hidden; *zoom: 1; margin: 14px 0; } 17 | .jasmine_html-reporter .symbol-summary li { display: inline-block; height: 8px; width: 14px; font-size: 16px; } 18 | .jasmine_html-reporter .symbol-summary li.passed { font-size: 14px; } 19 | .jasmine_html-reporter .symbol-summary li.passed:before { color: #007069; content: "\02022"; } 20 | .jasmine_html-reporter .symbol-summary li.failed { line-height: 9px; } 21 | .jasmine_html-reporter .symbol-summary li.failed:before { color: #ca3a11; content: "\d7"; font-weight: bold; margin-left: -1px; } 22 | .jasmine_html-reporter .symbol-summary li.disabled { font-size: 14px; } 23 | .jasmine_html-reporter .symbol-summary li.disabled:before { color: #bababa; content: "\02022"; } 24 | .jasmine_html-reporter .symbol-summary li.pending { line-height: 17px; } 25 | .jasmine_html-reporter .symbol-summary li.pending:before { color: #ba9d37; content: "*"; } 26 | .jasmine_html-reporter .symbol-summary li.empty { font-size: 14px; } 27 | .jasmine_html-reporter .symbol-summary li.empty:before { color: #ba9d37; content: "\02022"; } 28 | .jasmine_html-reporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; } 29 | .jasmine_html-reporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } 30 | .jasmine_html-reporter .bar.failed { background-color: #ca3a11; } 31 | .jasmine_html-reporter .bar.passed { background-color: #007069; } 32 | .jasmine_html-reporter .bar.skipped { background-color: #bababa; } 33 | .jasmine_html-reporter .bar.errored { background-color: #ca3a11; } 34 | .jasmine_html-reporter .bar.menu { background-color: #fff; color: #aaa; } 35 | .jasmine_html-reporter .bar.menu a { color: #333; } 36 | .jasmine_html-reporter .bar a { color: white; } 37 | .jasmine_html-reporter.spec-list .bar.menu.failure-list, .jasmine_html-reporter.spec-list .results .failures { display: none; } 38 | .jasmine_html-reporter.failure-list .bar.menu.spec-list, .jasmine_html-reporter.failure-list .summary { display: none; } 39 | .jasmine_html-reporter .running-alert { background-color: #666; } 40 | .jasmine_html-reporter .results { margin-top: 14px; } 41 | .jasmine_html-reporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; } 42 | .jasmine_html-reporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } 43 | .jasmine_html-reporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; } 44 | .jasmine_html-reporter.showDetails .summary { display: none; } 45 | .jasmine_html-reporter.showDetails #details { display: block; } 46 | .jasmine_html-reporter .summaryMenuItem { font-weight: bold; text-decoration: underline; } 47 | .jasmine_html-reporter .summary { margin-top: 14px; } 48 | .jasmine_html-reporter .summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; } 49 | .jasmine_html-reporter .summary ul.suite { margin-top: 7px; margin-bottom: 7px; } 50 | .jasmine_html-reporter .summary li.passed a { color: #007069; } 51 | .jasmine_html-reporter .summary li.failed a { color: #ca3a11; } 52 | .jasmine_html-reporter .summary li.empty a { color: #ba9d37; } 53 | .jasmine_html-reporter .summary li.pending a { color: #ba9d37; } 54 | .jasmine_html-reporter .description + .suite { margin-top: 0; } 55 | .jasmine_html-reporter .suite { margin-top: 14px; } 56 | .jasmine_html-reporter .suite a { color: #333; } 57 | .jasmine_html-reporter .failures .spec-detail { margin-bottom: 28px; } 58 | .jasmine_html-reporter .failures .spec-detail .description { background-color: #ca3a11; } 59 | .jasmine_html-reporter .failures .spec-detail .description a { color: white; } 60 | .jasmine_html-reporter .result-message { padding-top: 14px; color: #333; white-space: pre; } 61 | .jasmine_html-reporter .result-message span.result { display: block; } 62 | .jasmine_html-reporter .stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666; border: 1px solid #ddd; background: white; white-space: pre; } 63 | -------------------------------------------------------------------------------- /src/jqCron.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Arnapou jqCron package. 3 | * 4 | * (c) Arnaud Buathier 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | /** 11 | * Default settings 12 | */ 13 | var jqCronDefaultSettings = { 14 | texts: {}, 15 | monthdays: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31], 16 | hours: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], 17 | hour_labels: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"], 18 | minutes: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59], 19 | lang: 'en', 20 | enabled_minute: false, 21 | enabled_hour: true, 22 | enabled_day: true, 23 | enabled_week: true, 24 | enabled_month: true, 25 | enabled_year: true, 26 | multiple_dom: false, 27 | multiple_month: false, 28 | multiple_mins: false, 29 | multiple_dow: false, 30 | multiple_time_hours: false, 31 | multiple_time_minutes: false, 32 | numeric_zero_pad: false, 33 | default_period: 'day', 34 | default_value: '', 35 | no_reset_button: true, 36 | disabled: false, 37 | bind_to: null, 38 | bind_method: { 39 | set: function($element, value) { 40 | $element.is(':input') ? $element.val(value) : $element.data('jqCronValue', value); 41 | }, 42 | get: function($element) { 43 | return $element.is(':input') ? $element.val() : $element.data('jqCronValue'); 44 | } 45 | } 46 | }; 47 | 48 | /** 49 | * Custom extend of json for jqCron settings. 50 | * We don't use jQuery.extend because simple extend does not fit our needs, and deep extend has a bad 51 | * feature for us : it replaces keys of "Arrays" instead of replacing the full array. 52 | */ 53 | (function($){ 54 | var extend = function(dst, src) { 55 | for(var i in src) { 56 | if($.isPlainObject(src[i])) { 57 | dst[i] = extend(dst[i] && $.isPlainObject(dst[i]) ? dst[i] : {}, src[i]); 58 | } 59 | else if($.isArray(src[i])) { 60 | dst[i] = src[i].slice(0); 61 | } 62 | else if(src[i] !== undefined) { 63 | dst[i] = src[i]; 64 | } 65 | } 66 | return dst; 67 | }; 68 | this.jqCronMergeSettings = function(obj) { 69 | return extend(extend({}, jqCronDefaultSettings), obj || {}); 70 | }; 71 | }).call(this, jQuery); 72 | 73 | /** 74 | * Shortcut to get the instance of jqCron instance from one jquery object 75 | */ 76 | (function($){ 77 | $.fn.jqCronGetInstance = function() { 78 | return this.data('jqCron'); 79 | }; 80 | }).call(this, jQuery); 81 | 82 | /** 83 | * Main plugin 84 | */ 85 | (function($){ 86 | $.fn.jqCron = function(settings) { 87 | var saved_settings = settings; 88 | return this.each(function() { 89 | var cron, saved; 90 | var $this = $(this); 91 | var settings = jqCronMergeSettings(saved_settings); // clone settings 92 | var translations = settings.texts[settings.lang]; 93 | 94 | if (typeof(translations) !== 'object' || $.isEmptyObject(translations)) { 95 | console && console.error( 96 | 'Missing translations for language "' + settings.lang + '". ' + 97 | 'Please include jqCron.' + settings.lang + '.js or manually provide ' + 98 | 'the necessary translations when calling $.fn.jqCron().' 99 | ); 100 | return; 101 | } 102 | 103 | if(!settings.jquery_container) { 104 | if($this.is(':container')) { 105 | settings.jquery_element = $this.uniqueId('jqCron'); 106 | } 107 | else if($this.is(':autoclose')) { 108 | // delete already generated dom if exists 109 | if($this.next('.jqCron').length == 1) { 110 | $this.next('.jqCron').remove(); 111 | } 112 | // generate new 113 | settings.jquery_element = $('').uniqueId('jqCron').insertAfter($this); 114 | } 115 | else { 116 | console && console.error(settings.texts[settings.lang].error1.replace('%s', this.tagName)); 117 | return; 118 | } 119 | } 120 | 121 | // autoset bind_to if it is an input 122 | if($this.is(':input')) { 123 | settings.bind_to = settings.bind_to || $this; 124 | } 125 | 126 | // init cron object 127 | if(settings.bind_to){ 128 | if(settings.bind_to.is(':input')) { 129 | // auto bind from input to object if an input, textarea ... 130 | settings.bind_to.blur(function(){ 131 | var value = settings.bind_method.get(settings.bind_to); 132 | $this.jqCronGetInstance().setCron(value); 133 | }); 134 | } 135 | saved = settings.bind_method.get(settings.bind_to); 136 | cron = new jqCron(settings); 137 | cron.setCron(saved); 138 | } 139 | else { 140 | cron = new jqCron(settings); 141 | } 142 | $(this).data('jqCron', cron); 143 | }); 144 | }; 145 | }).call(this, jQuery); 146 | 147 | /** 148 | * jqCron class 149 | */ 150 | (function($){ 151 | var jqCronInstances = []; 152 | 153 | function jqCron(settings) { 154 | var _initialized = false; 155 | var _self = this; 156 | var _$elt = this; 157 | var _$obj = $(''); 158 | var _$blocks = $(''); 159 | var _$blockPERIOD = $(''); 160 | var _$blockDOM = $(''); 161 | var _$blockMONTH = $(''); 162 | var _$blockMINS = $(''); 163 | var _$blockDOW = $(''); 164 | var _$blockTIME = $(''); 165 | var _$cross = $(''); 166 | var _selectors = []; 167 | var _selectorPeriod, _selectorMins, _selectorTimeH, _selectorTimeM, _selectorDow, _selectorDom, _selectorMonth; 168 | 169 | // instanciate a new selector 170 | function newSelector($block, multiple, type){ 171 | var selector = new jqCronSelector(_self, $block, multiple, type); 172 | selector.$.bind('selector:open', function(){ 173 | // we close all opened selectors of all other jqCron 174 | for(var n = jqCronInstances.length; n--; ){ 175 | if(jqCronInstances[n] != _self) { 176 | jqCronInstances[n].closeSelectors(); 177 | } 178 | else { 179 | // we close all other opened selectors of this jqCron 180 | for(var o = _selectors.length; o--; ){ 181 | if(_selectors[o] != selector) { 182 | _selectors[o].close(); 183 | } 184 | } 185 | } 186 | } 187 | }); 188 | selector.$.bind('selector:change', function(){ 189 | var boundChanged = false; 190 | // don't propagate if not initialized 191 | if(!_initialized) return; 192 | // bind data between two minute selectors (only if they have the same multiple settings) 193 | if(settings.multiple_mins == settings.multiple_time_minutes) { 194 | if(selector == _selectorMins) { 195 | boundChanged = _selectorTimeM.setValue(_selectorMins.getValue()); 196 | } 197 | else if(selector == _selectorTimeM) { 198 | boundChanged = _selectorMins.setValue(_selectorTimeM.getValue()); 199 | } 200 | } 201 | // we propagate the change event to the main object 202 | boundChanged || _$obj.trigger('cron:change', _self.getCron()); 203 | }); 204 | _selectors.push(selector); 205 | return selector; 206 | } 207 | 208 | // disable the selector 209 | this.disable = function(){ 210 | _$obj.addClass('disable'); 211 | settings.disable = true; 212 | _self.closeSelectors(); 213 | }; 214 | 215 | // return if the selector is disabled 216 | this.isDisabled = function() { 217 | return settings.disable == true; 218 | }; 219 | 220 | // enable the selector 221 | this.enable = function(){ 222 | _$obj.removeClass('disable'); 223 | settings.disable = false; 224 | }; 225 | 226 | // get cron value 227 | this.getCron = function(){ 228 | var period = _selectorPeriod.getValue(); 229 | var items = ['*', '*', '*', '*', '*']; 230 | if(period == 'hour') { 231 | items[0] = _selectorMins.getCronValue(); 232 | } 233 | if(period == 'day' || period == 'week' || period == 'month' || period == 'year') { 234 | items[0] = _selectorTimeM.getCronValue(); 235 | items[1] = _selectorTimeH.getCronValue(); 236 | } 237 | if(period == 'month' || period == 'year') { 238 | items[2] = _selectorDom.getCronValue(); 239 | } 240 | if(period == 'year') { 241 | items[3] = _selectorMonth.getCronValue(); 242 | } 243 | if(period == 'week') { 244 | items[4] = _selectorDow.getCronValue(); 245 | } 246 | return items.join(' '); 247 | }; 248 | 249 | // set cron (string like * * * * *) 250 | this.setCron = function(str) { 251 | if(!str) return; 252 | try { 253 | str = str.replace(/\s+/g, ' ').replace(/^ +/, '').replace(/ +$/, ''); // sanitize 254 | var mask = str.replace(/[^\* ]/g, '-').replace(/-+/g, '-').replace(/ +/g, ''); 255 | var items = str.split(' '); 256 | if (items.length != 5) _self.error(_self.getText('error2')); 257 | if(mask == '*****') { // 1 possibility 258 | _selectorPeriod.setValue('minute'); 259 | } 260 | else if(mask == '-****') { // 1 possibility 261 | _selectorPeriod.setValue('hour'); 262 | _selectorMins.setCronValue(items[0]); 263 | _selectorTimeM.setCronValue(items[0]); 264 | } 265 | else if(mask.substring(2, mask.length) == '***') { // 4 possibilities 266 | _selectorPeriod.setValue('day'); 267 | _selectorMins.setCronValue(items[0]); 268 | _selectorTimeM.setCronValue(items[0]); 269 | _selectorTimeH.setCronValue(items[1]); 270 | } 271 | else if(mask.substring(2, mask.length) == '-**') { // 4 possibilities 272 | _selectorPeriod.setValue('month'); 273 | _selectorMins.setCronValue(items[0]); 274 | _selectorTimeM.setCronValue(items[0]); 275 | _selectorTimeH.setCronValue(items[1]); 276 | _selectorDom.setCronValue(items[2]); 277 | } 278 | else if(mask.substring(2, mask.length) == '**-') { // 4 possibilities 279 | _selectorPeriod.setValue('week'); 280 | _selectorMins.setCronValue(items[0]); 281 | _selectorTimeM.setCronValue(items[0]); 282 | _selectorTimeH.setCronValue(items[1]); 283 | _selectorDow.setCronValue(items[4]); 284 | } 285 | else if (mask.substring(3, mask.length) == '-*') { // 8 possibilities 286 | _selectorPeriod.setValue('year'); 287 | _selectorMins.setCronValue(items[0]); 288 | _selectorTimeM.setCronValue(items[0]); 289 | _selectorTimeH.setCronValue(items[1]); 290 | _selectorDom.setCronValue(items[2]); 291 | _selectorMonth.setCronValue(items[3]); 292 | } 293 | else { 294 | _self.error(_self.getText('error4')); 295 | } 296 | _self.clearError(); 297 | } catch(e) {} 298 | }; 299 | 300 | // close all child selectors 301 | this.closeSelectors = function(){ 302 | for(var n = _selectors.length; n--; ){ 303 | _selectors[n].close(); 304 | } 305 | }; 306 | 307 | // get the main element id 308 | this.getId = function(){ 309 | return _$elt.attr('id'); 310 | } 311 | 312 | // get the translated text 313 | this.getText = function(key) { 314 | var text = settings.texts[settings.lang][key] || null; 315 | if(typeof(text) == "string" && text.match(')/gi, ''); 317 | text = '' + text + ''; 318 | } 319 | return text; 320 | }; 321 | 322 | // get the human readable text 323 | this.getHumanText = function() { 324 | var texts=[]; 325 | _$obj 326 | .find('> span > span:visible') 327 | .find('.jqCron-text, .jqCron-selector > span') 328 | .each(function() { 329 | var text = $(this).text().replace(/\s+$/g, '').replace(/^\s+/g, ''); 330 | text && texts.push(text); 331 | }); 332 | return texts.join(' ').replace(/\s:\s/g, ':'); 333 | } 334 | 335 | // get settings 336 | this.getSettings = function(){ 337 | return settings; 338 | }; 339 | 340 | // display an error 341 | this.error = function(msg) { 342 | console && console.error('[jqCron Error] ' + msg); 343 | _$obj.addClass('jqCron-error').attr('title', msg); 344 | throw msg; 345 | }; 346 | 347 | // clear error 348 | this.clearError = function(){ 349 | _$obj.attr('title', '').removeClass('jqCron-error'); 350 | }; 351 | 352 | // clear 353 | this.clear = function() { 354 | _selectorDom.setValue([]); 355 | _selectorDow.setValue([]); 356 | _selectorMins.setValue([]); 357 | _selectorMonth.setValue([]); 358 | _selectorTimeH.setValue([]); 359 | _selectorTimeM.setValue([]); 360 | _self.triggerChange(); 361 | }; 362 | 363 | // init (called in constructor) 364 | this.init = function(){ 365 | var n,i,list; 366 | if(_initialized) return; 367 | 368 | settings = jqCronMergeSettings(settings); 369 | settings.jquery_element || _self.error(_self.getText('error3')); 370 | _$elt = settings.jquery_element; 371 | _$elt.append(_$obj); 372 | _$obj.data('id', settings.id); 373 | _$obj.data('jqCron', _self); 374 | _$obj.append(_$blocks); 375 | settings.no_reset_button || _$obj.append(_$cross); 376 | (!settings.disable) || _$obj.addClass('disable'); 377 | _$blocks.append(_$blockPERIOD); 378 | _$blocks.append(_$blockDOM); 379 | _$blocks.append(_$blockMONTH); 380 | _$blocks.append(_$blockMINS); 381 | _$blocks.append(_$blockDOW); 382 | _$blocks.append(_$blockTIME); 383 | 384 | // various binding 385 | _$cross.click(function(){ 386 | _self.isDisabled() || _self.clear(); 387 | }); 388 | 389 | // binding from cron to target 390 | _$obj.bind('cron:change', function(evt, value){ 391 | if(!settings.bind_to) return; 392 | settings.bind_method.set && settings.bind_method.set(settings.bind_to, value); 393 | _self.clearError(); 394 | }); 395 | 396 | // PERIOD 397 | _$blockPERIOD.append(_self.getText('text_period')); 398 | _selectorPeriod = newSelector(_$blockPERIOD, false, 'period'); 399 | settings.enabled_minute && _selectorPeriod.add('minute', _self.getText('name_minute')); 400 | settings.enabled_hour && _selectorPeriod.add('hour', _self.getText('name_hour')); 401 | settings.enabled_day && _selectorPeriod.add('day', _self.getText('name_day')); 402 | settings.enabled_week && _selectorPeriod.add('week', _self.getText('name_week')); 403 | settings.enabled_month && _selectorPeriod.add('month', _self.getText('name_month')); 404 | settings.enabled_year && _selectorPeriod.add('year', _self.getText('name_year')); 405 | _selectorPeriod.$.bind('selector:change', function(e, value){ 406 | _$blockDOM.hide(); 407 | _$blockMONTH.hide(); 408 | _$blockMINS.hide(); 409 | _$blockDOW.hide(); 410 | _$blockTIME.hide(); 411 | if(value == 'hour') { 412 | _$blockMINS.show(); 413 | } 414 | else if(value == 'day') { 415 | _$blockTIME.show(); 416 | } 417 | else if(value == 'week') { 418 | _$blockDOW.show(); 419 | _$blockTIME.show(); 420 | } 421 | else if(value == 'month') { 422 | _$blockDOM.show(); 423 | _$blockTIME.show(); 424 | } 425 | else if(value == 'year') { 426 | _$blockDOM.show(); 427 | _$blockMONTH.show(); 428 | _$blockTIME.show(); 429 | } 430 | }); 431 | _selectorPeriod.setValue(settings.default_period); 432 | 433 | // MINS (minutes) 434 | _$blockMINS.append(_self.getText('text_mins')); 435 | _selectorMins = newSelector(_$blockMINS, settings.multiple_mins, 'minutes'); 436 | for(i=0, list=settings.minutes; i'); 515 | var _$title = $(''); 516 | var _$selector = $(''); 517 | var _values = {}; 518 | var _value = []; 519 | var _hasNumericTexts = true; 520 | var _numeric_zero_pad = _cron.getSettings().numeric_zero_pad; 521 | 522 | // return an array without doublon 523 | function array_unique(l){ 524 | var i=0,n=l.length,k={},a=[]; 525 | while(i' + value + ''); 710 | _$list.append($item); 711 | _values[key] = $item; 712 | $item.click(function(){ 713 | if(_multiple && $(this).hasClass('selected')) { 714 | _self.removeValue(key); 715 | } 716 | else { 717 | _self.addValue(key); 718 | if(!_multiple) _self.close(); 719 | } 720 | }); 721 | }; 722 | 723 | // expose main jquery object 724 | this.$ = _$selector; 725 | 726 | // constructor 727 | _$block.find('b:eq(0)').after(_$selector).remove(); 728 | _$selector 729 | .addClass('jqCron-selector-' + _$block.find('.jqCron-selector').length) 730 | .append(_$title) 731 | .append(_$list) 732 | .bind('selector:open', function(){ 733 | if(_hasNumericTexts) { 734 | var nbcols = 1, n = _$list.find('li').length; 735 | if(n > 5 && n <= 16) nbcols = 2; 736 | else if(n > 16 && n <= 23) nbcols = 3; 737 | else if(n > 23 && n <= 40) nbcols = 4; 738 | else if(n > 40) nbcols = 5; 739 | _$list.addClass('cols'+nbcols); 740 | } 741 | _$list.show(); 742 | }) 743 | .bind('selector:close', function(){ 744 | _$list.hide(); 745 | }) 746 | .bind('selector:change', function(){ 747 | _$title.html(_self.getTitleText()); 748 | }) 749 | .click(function(e){ 750 | e.stopPropagation(); 751 | }) 752 | .trigger('selector:change') 753 | ; 754 | $.fn.disableSelection && _$selector.disableSelection(); // only work with jQuery UI 755 | _$title.click(function(e){ 756 | (_self.isOpened() || _cron.isDisabled()) ? _self.close() : _self.open(); 757 | }); 758 | _self.close(); 759 | _self.clear(); 760 | } 761 | this.jqCronSelector = jqCronSelector; 762 | }).call(this, jQuery); 763 | 764 | /** 765 | * Generate unique id for each element. 766 | * Skip elements which have already an id. 767 | */ 768 | (function($){ 769 | var jqUID = 0; 770 | var jqGetUID = function(prefix){ 771 | var id; 772 | while(1) { 773 | jqUID++; 774 | id = ((prefix || 'JQUID')+'') + jqUID; 775 | if(!document.getElementById(id)) return id; 776 | } 777 | }; 778 | $.fn.uniqueId = function(prefix) { 779 | return this.each(function(){ 780 | if($(this).attr('id')) return; 781 | var id = jqGetUID(prefix); 782 | $(this).attr('id', id); 783 | }); 784 | }; 785 | }).call(this, jQuery); 786 | 787 | 788 | /** 789 | * Extends jQuery selectors with new block selector 790 | */ 791 | (function($){ 792 | $.extend($.expr[':'], { 793 | container: function(a) { 794 | return (a.tagName+'').toLowerCase() in { 795 | a:1, 796 | abbr:1, 797 | acronym:1, 798 | address:1, 799 | b:1, 800 | big:1, 801 | blockquote:1, 802 | button:1, 803 | cite:1, 804 | code:1, 805 | dd: 1, 806 | del:1, 807 | dfn:1, 808 | div:1, 809 | dt:1, 810 | em:1, 811 | fieldset:1, 812 | form:1, 813 | h1:1, 814 | h2:1, 815 | h3:1, 816 | h4:1, 817 | h5:1, 818 | h6: 1, 819 | i:1, 820 | ins:1, 821 | kbd:1, 822 | label:1, 823 | li:1, 824 | p:1, 825 | pre:1, 826 | q:1, 827 | samp:1, 828 | small:1, 829 | span:1, 830 | strong:1, 831 | sub: 1, 832 | sup:1, 833 | td:1, 834 | tt:1 835 | }; 836 | }, 837 | autoclose: function(a) { 838 | return (a.tagName+'').toLowerCase() in { 839 | area:1, 840 | base:1, 841 | basefont:1, 842 | br:1, 843 | col:1, 844 | frame:1, 845 | hr:1, 846 | img:1, 847 | input:1, 848 | link:1, 849 | meta:1, 850 | param:1 851 | }; 852 | } 853 | }); 854 | }).call(this, jQuery); 855 | -------------------------------------------------------------------------------- /test/lib/jquery-1.7.2.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.7.2 jquery.com | jquery.org/license */ 2 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( 3 | a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f 4 | .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); --------------------------------------------------------------------------------