formize 0.0.14 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/assets/javascripts/formize.js +100 -21
- data/lib/assets/javascripts/jquery.ui.formize.js +292 -231
- data/lib/assets/javascripts/jquery.ui.timepicker.js +1060 -0
- data/lib/assets/javascripts/locales/jquery.ui.datepicker-ar.js +18 -18
- data/lib/assets/javascripts/locales/jquery.ui.datepicker-fa.js +18 -18
- data/lib/assets/javascripts/locales/jquery.ui.datepicker-fr-CH.js +6 -6
- data/lib/assets/javascripts/locales/jquery.ui.datepicker-fr.js +1 -1
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-cs.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-de.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-el.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-es.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-et.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-fr.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-hu.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-id.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-it.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-lt.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-nl.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-ru.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-tr.js +17 -0
- data/lib/assets/javascripts/locales/jquery.ui.timepicker-vi.js +17 -0
- data/lib/assets/stylesheets/jquery-ui.css +19 -1
- data/lib/formize.rb +63 -0
- data/lib/formize/helpers.rb +21 -0
- data/lib/formize/helpers/asset_tag_helper.rb +11 -7
- data/lib/formize/helpers/form_helper.rb +6 -19
- data/lib/formize/helpers/form_tag_helper.rb +31 -0
- data/lib/formize/railtie.rb +1 -0
- data/lib/generators/formize/install/install_generator.rb +5 -5
- data/lib/tasks/formize.rake +27 -0
- metadata +34 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.17
|
@@ -1,3 +1,59 @@
|
|
1
|
+
(function($) {
|
2
|
+
$.datepicker.regional['af'] = { closeText: 'Selekteer', prevText: 'Vorige', nextText: 'Volgende', currentText: 'Vandag', monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie', 'Julie','Augustus','September','Oktober','November','Desember'], monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'], weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
3
|
+
$.datepicker.regional['ar'] = { closeText: 'إغلاق', prevText: '<السابق', nextText: 'التالي>', currentText: 'اليوم', monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'], dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], weekHeader: 'أسبوع', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: true, showMonthAfterYear: false, yearSuffix: ''};
|
4
|
+
$.datepicker.regional['az'] = { closeText: 'Bağla', prevText: '<Geri', nextText: 'İrəli>', currentText: 'Bugün', monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun', 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'], monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun', 'İyul','Avq','Sen','Okt','Noy','Dek'], dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'], dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'], dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'], weekHeader: 'Hf', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
5
|
+
$.datepicker.regional['bg'] = { closeText: 'затвори', prevText: '<назад', nextText: 'напред>', nextBigText: '>>', currentText: 'днес', monthNames: ['Януари','Февруари','Март','Април','Май','Юни', 'Юли','Август','Септември','Октомври','Ноември','Декември'], monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни', 'Юли','Авг','Сеп','Окт','Нов','Дек'], dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], weekHeader: 'Wk', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
6
|
+
$.datepicker.regional['bs'] = { closeText: 'Zatvori', prevText: '<', nextText: '>', currentText: 'Danas', monthNames: ['Januar','Februar','Mart','April','Maj','Juni', 'Juli','August','Septembar','Oktobar','Novembar','Decembar'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], weekHeader: 'Wk', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
7
|
+
$.datepicker.regional['ca'] = { closeText: 'Tancar', prevText: '<Ant', nextText: 'Seg>', currentText: 'Avui', monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Oct','Nov','Des'], dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
8
|
+
$.datepicker.regional['cs'] = { closeText: 'Zavřít', prevText: '<Dříve', nextText: 'Později>', currentText: 'Nyní', monthNames: ['leden','únor','březen','duben','květen','červen', 'červenec','srpen','září','říjen','listopad','prosinec'], monthNamesShort: ['led','úno','bře','dub','kvě','čer', 'čvc','srp','zář','říj','lis','pro'], dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], dayNamesMin: ['ne','po','út','st','čt','pá','so'], weekHeader: 'Týd', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
9
|
+
$.datepicker.regional['da'] = { closeText: 'Luk', prevText: '<Forrige', nextText: 'Næste>', currentText: 'Idag', monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], weekHeader: 'Uge', dateFormat: 'dd-mm-yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
10
|
+
$.datepicker.regional['de-CH'] = { closeText: 'schliessen', prevText: '<zurück', nextText: 'nächster>', currentText: 'heute', monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], weekHeader: 'Wo', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
11
|
+
$.datepicker.regional['de'] = { closeText: 'schließen', prevText: '<zurück', nextText: 'Vor>', currentText: 'heute', monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], weekHeader: 'Wo', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
12
|
+
$.datepicker.regional['el'] = { closeText: 'Κλείσιμο', prevText: 'Προηγούμενος', nextText: 'Επόμενος', currentText: 'Τρέχων Μήνας', monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], weekHeader: 'Εβδ', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
13
|
+
$.datepicker.regional['en-GB'] = { closeText: 'Done', prevText: 'Prev', nextText: 'Next', currentText: 'Today', monthNames: ['January','February','March','April','May','June', 'July','August','September','October','November','December'], monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
14
|
+
$.datepicker.regional['eo'] = { closeText: 'Fermi', prevText: '<Anta', nextText: 'Sekv>', currentText: 'Nuna', monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aŭg','Sep','Okt','Nov','Dec'], dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'], dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'], dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'], weekHeader: 'Sb', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
15
|
+
$.datepicker.regional['es'] = { closeText: 'Cerrar', prevText: '<Ant', nextText: 'Sig>', currentText: 'Hoy', monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', 'Jul','Ago','Sep','Oct','Nov','Dic'], dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
16
|
+
$.datepicker.regional['et'] = { closeText: 'Sulge', prevText: 'Eelnev', nextText: 'Järgnev', currentText: 'Täna', monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni', 'Juuli','August','September','Oktoober','November','Detsember'], monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni', 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'], dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], dayNamesMin: ['P','E','T','K','N','R','L'], weekHeader: 'Sm', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
17
|
+
$.datepicker.regional['eu'] = { closeText: 'Egina', prevText: '<Aur', nextText: 'Hur>', currentText: 'Gaur', monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina', 'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'], monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka', 'Uzt','Abu','Ira','Urr','Aza','Abe'], dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'], dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'], dayNamesMin: ['Ig','As','As','As','Os','Os','La'], weekHeader: 'Wk', dateFormat: 'yy/mm/dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
18
|
+
$.datepicker.regional['fa'] = { closeText: 'بستن', prevText: '<قبلي', nextText: 'بعدي>', currentText: 'امروز', monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور', 'مهر','آبان','آذر','دي','بهمن','اسفند'], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'], dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'], weekHeader: 'هف', dateFormat: 'yy/mm/dd', firstDay: 6, isRTL: true, showMonthAfterYear: false, yearSuffix: ''};
|
19
|
+
$.datepicker.regional['fi'] = { closeText: 'Sulje', prevText: '«Edellinen', nextText: 'Seuraava»', currentText: 'Tänään', monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', 'Heinä','Elo','Syys','Loka','Marras','Joulu'], dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'], dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], weekHeader: 'Vk', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
20
|
+
$.datepicker.regional['fo'] = { closeText: 'Lat aftur', prevText: '<Fyrra', nextText: 'Næsta>', currentText: 'Í dag', monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni', 'Juli','August','September','Oktober','November','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', 'Jul','Aug','Sep','Okt','Nov','Des'], dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'], dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'], dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'], weekHeader: 'Vk', dateFormat: 'dd-mm-yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
21
|
+
$.datepicker.regional['fr-CH'] = { closeText: 'Fermer', prevText: '<Préc', nextText: 'Suiv>', currentText: 'Courant', monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', 'Jul','Aoû','Sep','Oct','Nov','Déc'], dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], weekHeader: 'Sm', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
22
|
+
$.datepicker.regional['fr'] = { closeText: 'Fermer', prevText: '<Préc', nextText: 'Suiv>', currentText: 'Courant', monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', 'Jul','Aoû','Sep','Oct','Nov','Déc'], dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
23
|
+
$.datepicker.regional['he'] = { closeText: 'סגור', prevText: '<הקודם', nextText: 'הבא>', currentText: 'היום', monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], monthNamesShort: ['1','2','3','4','5','6', '7','8','9','10','11','12'], dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: true, showMonthAfterYear: false, yearSuffix: ''};
|
24
|
+
$.datepicker.regional['hr'] = { closeText: 'Zatvori', prevText: '<', nextText: '>', currentText: 'Danas', monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj', 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', 'Srp','Kol','Ruj','Lis','Stu','Pro'], dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], weekHeader: 'Tje', dateFormat: 'dd.mm.yy.', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
25
|
+
$.datepicker.regional['hu'] = { closeText: 'bezárás', prevText: '« vissza', nextText: 'előre »', currentText: 'ma', monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], weekHeader: 'Hé', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
26
|
+
$.datepicker.regional['hy'] = { closeText: 'Փակել', prevText: '<Նախ.', nextText: 'Հաջ.>', currentText: 'Այսօր', monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'], dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'], dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], weekHeader: 'ՇԲՏ', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
27
|
+
$.datepicker.regional['id'] = { closeText: 'Tutup', prevText: '<mundur', nextText: 'maju>', currentText: 'hari ini', monthNames: ['Januari','Februari','Maret','April','Mei','Juni', 'Juli','Agustus','September','Oktober','Nopember','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', 'Jul','Agus','Sep','Okt','Nop','Des'], dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], weekHeader: 'Mg', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
28
|
+
$.datepicker.regional['is'] = { closeText: 'Loka', prevText: '< Fyrri', nextText: 'Næsti >', currentText: 'Í dag', monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', 'Júlí','Ágúst','September','Október','Nóvember','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', 'Júl','Ágú','Sep','Okt','Nóv','Des'], dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], weekHeader: 'Vika', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
29
|
+
$.datepicker.regional['it'] = { closeText: 'Chiudi', prevText: '<Prec', nextText: 'Succ>', currentText: 'Oggi', monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', 'Lug','Ago','Set','Ott','Nov','Dic'], dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
30
|
+
$.datepicker.regional['ja'] = { closeText: '閉じる', prevText: '<前', nextText: '次>', currentText: '今日', monthNames: ['1月','2月','3月','4月','5月','6月', '7月','8月','9月','10月','11月','12月'], monthNamesShort: ['1月','2月','3月','4月','5月','6月', '7月','8月','9月','10月','11月','12月'], dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], dayNamesShort: ['日','月','火','水','木','金','土'], dayNamesMin: ['日','月','火','水','木','金','土'], weekHeader: '週', dateFormat: 'yy/mm/dd', firstDay: 0, isRTL: false, showMonthAfterYear: true, yearSuffix: '年'};
|
31
|
+
$.datepicker.regional['ko'] = { closeText: '닫기', prevText: '이전달', nextText: '다음달', currentText: '오늘', monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], dayNames: ['일','월','화','수','목','금','토'], dayNamesShort: ['일','월','화','수','목','금','토'], dayNamesMin: ['일','월','화','수','목','금','토'], weekHeader: 'Wk', dateFormat: 'yy-mm-dd', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: '년'};
|
32
|
+
$.datepicker.regional['lt'] = { closeText: 'Uždaryti', prevText: '<Atgal', nextText: 'Pirmyn>', currentText: 'Šiandien', monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'], monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', 'Lie','Rugp','Rugs','Spa','Lap','Gru'], dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'], dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'], dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'], weekHeader: 'Wk', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
33
|
+
$.datepicker.regional['lv'] = { closeText: 'Aizvērt', prevText: 'Iepr', nextText: 'Nāka', currentText: 'Šodien', monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs', 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn', 'Jūl','Aug','Sep','Okt','Nov','Dec'], dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'], dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], weekHeader: 'Nav', dateFormat: 'dd-mm-yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
34
|
+
$.datepicker.regional['ms'] = { closeText: 'Tutup', prevText: '<Sebelum', nextText: 'Selepas>', currentText: 'hari ini', monthNames: ['Januari','Februari','Mac','April','Mei','Jun', 'Julai','Ogos','September','Oktober','November','Disember'], monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', 'Jul','Ogo','Sep','Okt','Nov','Dis'], dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], weekHeader: 'Mg', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
35
|
+
$.datepicker.regional['nl-BE'] = { closeText: 'Sluiten', prevText: '←', nextText: '→', currentText: 'Vandaag', monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
36
|
+
$.datepicker.regional['nl'] = { closeText: 'Sluiten', prevText: '←', nextText: '→', currentText: 'Vandaag', monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], weekHeader: 'Wk', dateFormat: 'dd-mm-yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
37
|
+
$.datepicker.regional['no'] = { closeText: 'Lukk', prevText: '«Forrige', nextText: 'Neste»', currentText: 'I dag', monthNames: ['Januar','Februar','Mars','April','Mai','Juni', 'Juli','August','September','Oktober','November','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Des'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], weekHeader: 'Uke', dateFormat: 'yy-mm-dd', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
38
|
+
$.datepicker.regional['pl'] = { closeText: 'Zamknij', prevText: '<Poprzedni', nextText: 'Następny>', currentText: 'Dziś', monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', 'Lip','Sie','Wrz','Pa','Lis','Gru'], dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'], dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], weekHeader: 'Tydz', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
39
|
+
$.datepicker.regional['pt-BR'] = { closeText: 'Fechar', prevText: '<Anterior', nextText: 'Próximo>', currentText: 'Hoje', monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Dez'], dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'], dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
40
|
+
$.datepicker.regional['ro'] = { closeText: 'Închide', prevText: '« Luna precedentă', nextText: 'Luna următoare »', currentText: 'Azi', monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie', 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'], dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], weekHeader: 'Săpt', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
41
|
+
$.datepicker.regional['ru'] = { closeText: 'Закрыть', prevText: '<Пред', nextText: 'След>', currentText: 'Сегодня', monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', 'Июл','Авг','Сен','Окт','Ноя','Дек'], dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], weekHeader: 'Не', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
42
|
+
$.datepicker.regional['sk'] = { closeText: 'Zavrieť', prevText: '<Predchádzajúci', nextText: 'Nasledujúci>', currentText: 'Dnes', monthNames: ['Január','Február','Marec','Apríl','Máj','Jún', 'Júl','August','September','Október','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', 'Júl','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'], dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'], dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'], weekHeader: 'Ty', dateFormat: 'dd.mm.yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
43
|
+
$.datepicker.regional['sl'] = { closeText: 'Zapri', prevText: '<Prejšnji', nextText: 'Naslednji>', currentText: 'Trenutni', monthNames: ['Januar','Februar','Marec','April','Maj','Junij', 'Julij','Avgust','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Avg','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], weekHeader: 'Teden', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
44
|
+
$.datepicker.regional['sq'] = { closeText: 'mbylle', prevText: '<mbrapa', nextText: 'Përpara>', currentText: 'sot', monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor', 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', 'Kor','Gus','Sht','Tet','Nën','Dhj'], dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], weekHeader: 'Ja', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
45
|
+
$.datepicker.regional['sr-SR'] = { closeText: 'Zatvori', prevText: '<', nextText: '>', currentText: 'Danas', monthNames: ['Januar','Februar','Mart','April','Maj','Jun', 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Avg','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], weekHeader: 'Sed', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
46
|
+
$.datepicker.regional['sr'] = { closeText: 'Затвори', prevText: '<', nextText: '>', currentText: 'Данас', monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун', 'Јул','Август','Септембар','Октобар','Новембар','Децембар'], monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун', 'Јул','Авг','Сеп','Окт','Нов','Дец'], dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'], dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'], dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'], weekHeader: 'Сед', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
47
|
+
$.datepicker.regional['sv'] = { closeText: 'Stäng', prevText: '«Förra', nextText: 'Nästa»', currentText: 'Idag', monthNames: ['Januari','Februari','Mars','April','Maj','Juni', 'Juli','Augusti','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'], dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'], weekHeader: 'Ve', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
48
|
+
$.datepicker.regional['ta'] = { closeText: 'மூடு', prevText: 'முன்னையது', nextText: 'அடுத்தது', currentText: 'இன்று', monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி', 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'], monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி', 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'], dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'], dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'], dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'], weekHeader: 'Не', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
49
|
+
$.datepicker.regional['th'] = { closeText: 'ปิด', prevText: '« ย้อน', nextText: 'ถัดไป »', currentText: 'วันนี้', monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'], monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'], dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
50
|
+
$.datepicker.regional['tr'] = { closeText: 'kapat', prevText: '<geri', nextText: 'ileri>', currentText: 'bugün', monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'], monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz', 'Tem','Ağu','Eyl','Eki','Kas','Ara'], dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], weekHeader: 'Hf', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
51
|
+
$.datepicker.regional['uk'] = { closeText: 'Закрити', prevText: '<', nextText: '>', currentText: 'Сьогодні', monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'], monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', 'Лип','Сер','Вер','Жов','Лис','Гру'], dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'], dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], weekHeader: 'Не', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
52
|
+
$.datepicker.regional['vi'] = { closeText: 'Đóng', prevText: '<Trước', nextText: 'Tiếp>', currentText: 'Hôm nay', monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'], monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'], dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'], dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], weekHeader: 'Tu', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ''};
|
53
|
+
$.datepicker.regional['zh-CN'] = { closeText: '关闭', prevText: '<上月', nextText: '下月>', currentText: '今天', monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'], monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'], dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], weekHeader: '周', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: true, yearSuffix: '年'};
|
54
|
+
$.datepicker.regional['zh-HK'] = { closeText: '關閉', prevText: '<上月', nextText: '下月>', currentText: '今天', monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'], monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'], dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], weekHeader: '周', dateFormat: 'dd-mm-yy', firstDay: 0, isRTL: false, showMonthAfterYear: true, yearSuffix: '年'};
|
55
|
+
$.datepicker.regional['zh-TW'] = { closeText: '關閉', prevText: '<上月', nextText: '下月>', currentText: '今天', monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'], monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'], dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], weekHeader: '周', dateFormat: 'yy/mm/dd', firstDay: 1, isRTL: false, showMonthAfterYear: true, yearSuffix: '年'};
|
56
|
+
})(jQuery);
|
1
57
|
/*jslint devel: true, browser: true, sloppy: true, vars: true, white: true, maxerr: 50, indent: 2 */
|
2
58
|
|
3
59
|
(function ($) {
|
@@ -6,11 +62,11 @@
|
|
6
62
|
$.behaviours = [];
|
7
63
|
$.behave = function (selector, eventType, handler) {
|
8
64
|
if (eventType == "load") {
|
9
|
-
|
65
|
+
$(document).ready(function(event) {
|
10
66
|
$(selector).each(handler);
|
11
67
|
$(selector).prop('alreadyBound', true);
|
12
|
-
|
13
|
-
|
68
|
+
});
|
69
|
+
$.behaviours.push({selector: selector, handler: handler});
|
14
70
|
} else {
|
15
71
|
$(selector).live(eventType, handler);
|
16
72
|
}
|
@@ -98,29 +154,29 @@
|
|
98
154
|
data: form.serialize(),
|
99
155
|
success: function(data, textStatus, request) {
|
100
156
|
var returnCode = request.getResponseHeader(settings["header"])
|
101
|
-
|
157
|
+
var returns = settings["returns"], unknownReturnCode = true;
|
102
158
|
for (var code in returns) {
|
103
159
|
if (returnCode == code && $.isFunction(returns[code])) {
|
104
160
|
returns[code].call(form, frame, data, textStatus, request);
|
105
161
|
unknownReturnCode = false;
|
106
|
-
|
162
|
+
$.ajaxDialogInitialize(frame);
|
107
163
|
break;
|
108
164
|
}
|
109
165
|
}
|
110
166
|
if (unknownReturnCode) {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
167
|
+
if ($.isFunction(settings["defaultReturn"])) {
|
168
|
+
settings["defaultReturn"].call(form, frame);
|
169
|
+
} else {
|
170
|
+
alert("FAILURE (Unknown return code for header " + settings["header"] + "): " + returnCode);
|
171
|
+
}
|
116
172
|
}
|
117
173
|
},
|
118
|
-
|
174
|
+
error: function(jqXHR, textStatus, errorThrown) {
|
119
175
|
alert("FAILURE (Error "+textStatus+"): "+errorThrown);
|
120
176
|
var frame = $("#" + frame_id);
|
121
177
|
frame.dialog("close");
|
122
178
|
frame.remove();
|
123
|
-
|
179
|
+
// if ($.isFunction(settings["error"])) { settings["error"].call(form, frame, jqXHR, textStatus, errorThrown); }
|
124
180
|
}
|
125
181
|
});
|
126
182
|
return false;
|
@@ -218,6 +274,28 @@ $.behave('input[data-datepicker]', "load", function() {
|
|
218
274
|
element.datepicker(options);
|
219
275
|
});
|
220
276
|
|
277
|
+
|
278
|
+
// Initializes date fields
|
279
|
+
// Can't work properly with actual datetimepicker
|
280
|
+
// $.behave('input[data-datetimepicker]', "load", function() {
|
281
|
+
// var element = $(this);
|
282
|
+
// var locale = element.attr("data-locale");
|
283
|
+
// var options = $.datepicker.regional[locale];
|
284
|
+
// if (element.attr("data-date-format") !== null) {
|
285
|
+
// options['dateFormat'] = element.attr("data-date-format");
|
286
|
+
// }
|
287
|
+
// if (element.attr("data-time-format") !== null) {
|
288
|
+
// options['timeFormat'] = element.attr("data-time-format");
|
289
|
+
// }
|
290
|
+
// options['altField'] = '#'+element.attr("data-datetimepicker");
|
291
|
+
// options['altFormat'] = 'yy-mm-dd';
|
292
|
+
// options['altFieldTimeOnly'] = false;
|
293
|
+
// options['showSecond'] = true;
|
294
|
+
// // options['defaultDate'] = element.val();
|
295
|
+
// element.datetimepicker(options);
|
296
|
+
// });
|
297
|
+
|
298
|
+
|
221
299
|
// Initializes resizable text areas
|
222
300
|
// Minimal size is defined on default size of the area
|
223
301
|
$.behave('textarea[data-resizable]', "load", function() {
|
@@ -237,9 +315,9 @@ $.behave("a[data-add-item]", "click", function() {
|
|
237
315
|
var list_id = '#'+element.attr('data-add-item'), list = $(list_id);
|
238
316
|
var url = element.attr('href');
|
239
317
|
$.ajaxDialog(url, {
|
240
|
-
|
241
|
-
|
242
|
-
|
318
|
+
returns: {
|
319
|
+
success: function (frame, data, textStatus, request) {
|
320
|
+
var record_id = request.getResponseHeader("X-Saved-Record-Id");
|
243
321
|
if (list[0] !== undefined) {
|
244
322
|
$.ajax(list.attr('data-refresh'), {
|
245
323
|
data: {selected: record_id},
|
@@ -249,12 +327,12 @@ $.behave("a[data-add-item]", "click", function() {
|
|
249
327
|
}
|
250
328
|
});
|
251
329
|
}
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
330
|
+
frame.dialog("close");
|
331
|
+
},
|
332
|
+
invalid: function (frame, data, textStatus, request) {
|
333
|
+
frame.html(request.responseText);
|
334
|
+
}
|
335
|
+
},
|
258
336
|
});
|
259
337
|
return false;
|
260
338
|
});
|
@@ -268,3 +346,4 @@ $.behave("select[data-dependents]", "keypress", Formize.refreshDependents);
|
|
268
346
|
// Hide/show blocks depending on check boxes
|
269
347
|
$.behave("input[data-show], input[data-hide]", "load", Formize.Toggles.ifChecked);
|
270
348
|
$.behave("input[data-show], input[data-hide]", "change", Formize.Toggles.ifChecked);
|
349
|
+
|
@@ -1,231 +1,292 @@
|
|
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
|
-
|
60
|
-
(
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
(
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
var
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
(
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
(
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
function
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
1
|
+
/*jslint devel: true, browser: true, sloppy: true, vars: true, white: true, maxerr: 50, indent: 2 */
|
2
|
+
|
3
|
+
(function ($) {
|
4
|
+
// Replaces `$(selector).live("ready", handler)` which don't work
|
5
|
+
// It rebinds automatically after each ajax request all not-binded.
|
6
|
+
$.behaviours = [];
|
7
|
+
$.behave = function (selector, eventType, handler) {
|
8
|
+
if (eventType == "load") {
|
9
|
+
$(document).ready(function(event) {
|
10
|
+
$(selector).each(handler);
|
11
|
+
$(selector).prop('alreadyBound', true);
|
12
|
+
});
|
13
|
+
$.behaviours.push({selector: selector, handler: handler});
|
14
|
+
} else {
|
15
|
+
$(selector).live(eventType, handler);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
// Rebinds unbound elements on each ajax request.
|
19
|
+
$(document).ajaxStop(function () {
|
20
|
+
for (var behaviour in $.behaviours) {
|
21
|
+
behaviour = $.behaviours[behaviour];
|
22
|
+
$(behaviour.selector).each(function(index, element){
|
23
|
+
if ($(element).prop('alreadyBound') !== true) {
|
24
|
+
behaviour.handler.call($(element));
|
25
|
+
$(element).prop('alreadyBound', true);
|
26
|
+
}
|
27
|
+
});
|
28
|
+
}
|
29
|
+
});
|
30
|
+
|
31
|
+
|
32
|
+
$.ajaxDialogCount = 0;
|
33
|
+
|
34
|
+
$.ajaxDialog = function (url, settings) {
|
35
|
+
var frame_id = "dialog-" + $.ajaxDialogCount, width = $(document).width();
|
36
|
+
var defaultSettings = {
|
37
|
+
header: "X-Return-Code"
|
38
|
+
};
|
39
|
+
if (settings === null || settings === undefined) { settings = {}; }
|
40
|
+
settings = $.extend({}, defaultSettings, settings);
|
41
|
+
$.ajax(url, {
|
42
|
+
data: {dialog: frame_id},
|
43
|
+
success: function(data, textStatus, jqXHR) {
|
44
|
+
var frame = $(document.createElement('div'));
|
45
|
+
frame.attr({id: frame_id, 'class': 'dialog ajax-dialog', style: 'display:none;'});
|
46
|
+
$('body').append(frame);
|
47
|
+
frame.html(data);
|
48
|
+
frame.prop("dialogSettings", settings);
|
49
|
+
frame.dialog({
|
50
|
+
autoOpen: false,
|
51
|
+
show: 'fade',
|
52
|
+
modal: true,
|
53
|
+
width: 'auto',
|
54
|
+
height: 'auto'
|
55
|
+
});
|
56
|
+
$.ajaxDialogInitialize(frame);
|
57
|
+
frame.dialog("open");
|
58
|
+
},
|
59
|
+
error: function(jqXHR, textStatus, errorThrown) {
|
60
|
+
alert("FAILURE (Error "+textStatus+"): "+errorThrown);
|
61
|
+
var frame = $("#" + frame_id);
|
62
|
+
frame.dialog("close");
|
63
|
+
frame.remove();
|
64
|
+
}
|
65
|
+
});
|
66
|
+
$.ajaxDialogCount += 1;
|
67
|
+
};
|
68
|
+
|
69
|
+
$.ajaxDialogInitialize = function(frame) {
|
70
|
+
var frame_id = frame.attr("id");
|
71
|
+
var title = frame.prop("dialogSettings")["title"];
|
72
|
+
if (title === null || title === undefined) {
|
73
|
+
var h1 = $("#" + frame_id + " h1");
|
74
|
+
if (h1[0] !== null && h1[0] !== undefined) {
|
75
|
+
title = h1.text()
|
76
|
+
h1.remove();
|
77
|
+
}
|
78
|
+
}
|
79
|
+
frame.dialog("option", "title", title);
|
80
|
+
|
81
|
+
$("#" + frame_id + " form").each(function (index, form) {
|
82
|
+
$(form).attr('data-dialog', frame_id);
|
83
|
+
});
|
84
|
+
};
|
85
|
+
|
86
|
+
$.submitAjaxForm = function () {
|
87
|
+
var form = $(this);
|
88
|
+
var frame_id = form.attr('data-dialog');
|
89
|
+
var frame = $('#'+frame_id);
|
90
|
+
var settings = frame.prop("dialogSettings");
|
91
|
+
|
92
|
+
var field = $(document.createElement('input'));
|
93
|
+
field.attr({ type: 'hidden', name: 'dialog', value: frame_id });
|
94
|
+
form.append(field);
|
95
|
+
|
96
|
+
$.ajax(form.attr('action'), {
|
97
|
+
type: form.attr('method') || 'POST',
|
98
|
+
data: form.serialize(),
|
99
|
+
success: function(data, textStatus, request) {
|
100
|
+
var returnCode = request.getResponseHeader(settings["header"])
|
101
|
+
var returns = settings["returns"], unknownReturnCode = true;
|
102
|
+
for (var code in returns) {
|
103
|
+
if (returnCode == code && $.isFunction(returns[code])) {
|
104
|
+
returns[code].call(form, frame, data, textStatus, request);
|
105
|
+
unknownReturnCode = false;
|
106
|
+
$.ajaxDialogInitialize(frame);
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
if (unknownReturnCode) {
|
111
|
+
if ($.isFunction(settings["defaultReturn"])) {
|
112
|
+
settings["defaultReturn"].call(form, frame);
|
113
|
+
} else {
|
114
|
+
alert("FAILURE (Unknown return code for header " + settings["header"] + "): " + returnCode);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
error: function(jqXHR, textStatus, errorThrown) {
|
119
|
+
alert("FAILURE (Error "+textStatus+"): "+errorThrown);
|
120
|
+
var frame = $("#" + frame_id);
|
121
|
+
frame.dialog("close");
|
122
|
+
frame.remove();
|
123
|
+
// if ($.isFunction(settings["error"])) { settings["error"].call(form, frame, jqXHR, textStatus, errorThrown); }
|
124
|
+
}
|
125
|
+
});
|
126
|
+
return false;
|
127
|
+
};
|
128
|
+
|
129
|
+
// Submits dialog forms
|
130
|
+
$.behave(".ajax-dialog form[data-dialog]", "submit", $.submitAjaxForm);
|
131
|
+
|
132
|
+
})(jQuery);
|
133
|
+
|
134
|
+
var Formize = {};
|
135
|
+
|
136
|
+
Formize.refreshDependents = function (event) {
|
137
|
+
var element = $(this);
|
138
|
+
var dependents = element.attr('data-dependents');
|
139
|
+
var params = {};
|
140
|
+
if (element.val() !== null && element.val() !== undefined) {
|
141
|
+
params[element.attr('id')] = element.val();
|
142
|
+
$(dependents).each(function(index, item) {
|
143
|
+
// Replaces element
|
144
|
+
var url = $(item).attr('data-refresh');
|
145
|
+
if (url !== null) {
|
146
|
+
$.ajax(url, {
|
147
|
+
data: params,
|
148
|
+
success: function(data, textStatus, response) {
|
149
|
+
$(item).replaceWith(response.responseText);
|
150
|
+
},
|
151
|
+
error: function(jqXHR, textStatus, errorThrown) {
|
152
|
+
alert("FAILURE (Error "+textStatus+"): "+errorThrown);
|
153
|
+
}
|
154
|
+
});
|
155
|
+
}
|
156
|
+
});
|
157
|
+
return true;
|
158
|
+
}
|
159
|
+
return false;
|
160
|
+
}
|
161
|
+
|
162
|
+
Formize.Toggles = {
|
163
|
+
|
164
|
+
ifChecked: function () {
|
165
|
+
if (this.checked) {
|
166
|
+
$($(this).attr('data-show')).slideDown();
|
167
|
+
$($(this).attr('data-hide')).slideUp();
|
168
|
+
} else {
|
169
|
+
$($(this).attr('data-show')).slideUp();
|
170
|
+
$($(this).attr('data-hide')).slideDown();
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
// Initializes unroll inputs
|
179
|
+
$.behave('input[data-unroll]', 'load', function() {
|
180
|
+
var element = $(this), choices, paramName;
|
181
|
+
|
182
|
+
element.unrollCache = element.val();
|
183
|
+
element.autocompleteType = "text";
|
184
|
+
element.valueField = $('#'+element.attr('data-value-container'))[0];
|
185
|
+
if ($.isEmptyObject(element.valueField)) {
|
186
|
+
alert('An input '+element.id+' with a "data-unroll" attribute must contain a "data-value-container" attribute');
|
187
|
+
element.autocompleteType = "id";
|
188
|
+
}
|
189
|
+
element.maxResize = parseInt(element.attr('data-max-resize'));
|
190
|
+
if (isNaN(element.maxResize) || element.maxResize === 0) { element.maxResize = 64; }
|
191
|
+
element.size = (element.unrollCache.length < 32 ? 32 : element.unrollCache.length > element.maxResize ? element.maxResize : element.unrollCache.length);
|
192
|
+
|
193
|
+
element.autocomplete({
|
194
|
+
source: element.attr('data-unroll'),
|
195
|
+
minLength: 1,
|
196
|
+
select: function(event, ui) {
|
197
|
+
var selected = ui.item;
|
198
|
+
element.valueField.value = selected.id;
|
199
|
+
element.unrollCache = selected.label;
|
200
|
+
element.attr("size", (element.unrollCache.length < 32 ? 32 : element.unrollCache.length > element.maxResize ? element.maxResize : element.unrollCache.length));
|
201
|
+
$(element.valueField).trigger("emulated:change");
|
202
|
+
return true;
|
203
|
+
}
|
204
|
+
});
|
205
|
+
});
|
206
|
+
|
207
|
+
// Initializes date fields
|
208
|
+
$.behave('input[data-datepicker]', "load", function() {
|
209
|
+
var element = $(this);
|
210
|
+
var locale = element.attr("data-locale");
|
211
|
+
var options = $.datepicker.regional[locale];
|
212
|
+
if (element.attr("data-date-format") !== null) {
|
213
|
+
options['dateFormat'] = element.attr("data-date-format");
|
214
|
+
}
|
215
|
+
options['altField'] = '#'+element.attr("data-datepicker");
|
216
|
+
options['altFormat'] = 'yy-mm-dd';
|
217
|
+
options['defaultDate'] = element.val();
|
218
|
+
element.datepicker(options);
|
219
|
+
});
|
220
|
+
|
221
|
+
|
222
|
+
// Initializes date fields
|
223
|
+
// Can't work properly with actual datetimepicker
|
224
|
+
// $.behave('input[data-datetimepicker]', "load", function() {
|
225
|
+
// var element = $(this);
|
226
|
+
// var locale = element.attr("data-locale");
|
227
|
+
// var options = $.datepicker.regional[locale];
|
228
|
+
// if (element.attr("data-date-format") !== null) {
|
229
|
+
// options['dateFormat'] = element.attr("data-date-format");
|
230
|
+
// }
|
231
|
+
// if (element.attr("data-time-format") !== null) {
|
232
|
+
// options['timeFormat'] = element.attr("data-time-format");
|
233
|
+
// }
|
234
|
+
// options['altField'] = '#'+element.attr("data-datetimepicker");
|
235
|
+
// options['altFormat'] = 'yy-mm-dd';
|
236
|
+
// options['altFieldTimeOnly'] = false;
|
237
|
+
// options['showSecond'] = true;
|
238
|
+
// // options['defaultDate'] = element.val();
|
239
|
+
// element.datetimepicker(options);
|
240
|
+
// });
|
241
|
+
|
242
|
+
|
243
|
+
// Initializes resizable text areas
|
244
|
+
// Minimal size is defined on default size of the area
|
245
|
+
$.behave('textarea[data-resizable]', "load", function() {
|
246
|
+
var element = $(this);
|
247
|
+
element.resizable({
|
248
|
+
handles: "se",
|
249
|
+
minHeight: element.height(),
|
250
|
+
minWidth: element.width(),
|
251
|
+
create: function (event, ui) { $(this).css("padding-bottom", "0px"); },
|
252
|
+
stop: function (event, ui) { $(this).css("padding-bottom", "0px"); }
|
253
|
+
});
|
254
|
+
});
|
255
|
+
|
256
|
+
// Opens a dialog for a resource creation
|
257
|
+
$.behave("a[data-add-item]", "click", function() {
|
258
|
+
var element = $(this);
|
259
|
+
var list_id = '#'+element.attr('data-add-item'), list = $(list_id);
|
260
|
+
var url = element.attr('href');
|
261
|
+
$.ajaxDialog(url, {
|
262
|
+
returns: {
|
263
|
+
success: function (frame, data, textStatus, request) {
|
264
|
+
var record_id = request.getResponseHeader("X-Saved-Record-Id");
|
265
|
+
if (list[0] !== undefined) {
|
266
|
+
$.ajax(list.attr('data-refresh'), {
|
267
|
+
data: {selected: record_id},
|
268
|
+
success: function(data, textStatus, request) {
|
269
|
+
list.replaceWith(request.responseText);
|
270
|
+
$(list_id + ' input').trigger("emulated:change");
|
271
|
+
}
|
272
|
+
});
|
273
|
+
}
|
274
|
+
frame.dialog("close");
|
275
|
+
},
|
276
|
+
invalid: function (frame, data, textStatus, request) {
|
277
|
+
frame.html(request.responseText);
|
278
|
+
}
|
279
|
+
},
|
280
|
+
});
|
281
|
+
return false;
|
282
|
+
});
|
283
|
+
|
284
|
+
// Refresh dependents on changes
|
285
|
+
$.behave("*[data-dependents]", "change", Formize.refreshDependents);
|
286
|
+
$.behave("*[data-dependents]", "emulated:change", Formize.refreshDependents);
|
287
|
+
// Compensate for changes made with keyboard
|
288
|
+
$.behave("select[data-dependents]", "keypress", Formize.refreshDependents);
|
289
|
+
|
290
|
+
// Hide/show blocks depending on check boxes
|
291
|
+
$.behave("input[data-show], input[data-hide]", "load", Formize.Toggles.ifChecked);
|
292
|
+
$.behave("input[data-show], input[data-hide]", "change", Formize.Toggles.ifChecked);
|