para 0.11.4 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/para/admin/main.scss +31 -0
  3. data/app/assets/stylesheets/para/admin/src/_affix.scss +7 -0
  4. data/app/assets/stylesheets/para/admin/src/_alert.scss +35 -0
  5. data/app/assets/stylesheets/para/admin/src/_base.scss +63 -0
  6. data/app/assets/stylesheets/para/admin/src/_bootstrap-variables.scss +766 -379
  7. data/app/assets/stylesheets/para/admin/src/_breadcrumb.scss +37 -0
  8. data/app/assets/stylesheets/para/admin/src/_buttons.scss +128 -0
  9. data/app/assets/stylesheets/para/admin/src/_checkable.scss +106 -0
  10. data/app/assets/stylesheets/para/admin/src/_common.scss +250 -0
  11. data/app/assets/stylesheets/para/admin/src/_dropdown.scss +52 -0
  12. data/app/assets/stylesheets/para/admin/src/_form.scss +359 -0
  13. data/app/assets/stylesheets/para/admin/src/_list.scss +96 -0
  14. data/app/assets/stylesheets/para/admin/src/_mixins.scss +109 -0
  15. data/app/assets/stylesheets/para/admin/src/_multi-select.scss +110 -0
  16. data/app/assets/stylesheets/para/admin/src/_navigation.scss +210 -0
  17. data/app/assets/stylesheets/para/admin/src/_navtabs.scss +68 -0
  18. data/app/assets/stylesheets/para/admin/src/_nested-many.scss +87 -0
  19. data/app/assets/stylesheets/para/admin/src/_nested_one.scss +26 -0
  20. data/app/assets/stylesheets/para/admin/src/_orderable.scss +48 -0
  21. data/app/assets/stylesheets/para/admin/src/_page-loading.scss +40 -0
  22. data/app/assets/stylesheets/para/admin/src/_pagination.scss +39 -0
  23. data/app/assets/stylesheets/para/admin/src/_panel.scss +61 -0
  24. data/app/assets/stylesheets/para/admin/src/_responsive.scss +133 -0
  25. data/app/assets/stylesheets/para/admin/src/_sorting.scss +43 -0
  26. data/app/assets/stylesheets/para/admin/src/_statcard.scss +46 -0
  27. data/app/assets/stylesheets/para/admin/src/_table.scss +36 -0
  28. data/app/assets/stylesheets/para/admin/src/_tree.scss +60 -0
  29. data/app/assets/stylesheets/para/admin/src/{_variables.sass → _variables.scss} +7 -7
  30. data/app/assets/stylesheets/para/admin/src/{_well.sass → _well.scss} +5 -4
  31. data/app/assets/stylesheets/para/admin.scss +15 -0
  32. data/app/assets/stylesheets/para/index.scss +1 -0
  33. data/app/assets/stylesheets/para/lib/datetimepicker.scss +15 -0
  34. data/app/assets/stylesheets/para/lib/fuelux.scss +46 -0
  35. data/app/assets/stylesheets/para/lib/jasny-bootstrap.scss +100 -0
  36. data/app/assets/stylesheets/para/lib/selectize.scss +129 -0
  37. data/app/assets/stylesheets/para/lib/slider.scss +14 -0
  38. data/app/controllers/para/admin/crud_resources_controller.rb +16 -9
  39. data/app/controllers/para/admin/imports_controller.rb +9 -9
  40. data/app/controllers/para/admin/jobs_controller.rb +7 -1
  41. data/app/controllers/para/admin/resources_controller.rb +17 -18
  42. data/app/controllers/para/admin/settings_component_controller.rb +2 -2
  43. data/app/helpers/para/admin/base_helper.rb +36 -25
  44. data/app/helpers/para/admin/page_helper.rb +8 -9
  45. data/app/helpers/para/flash_helper.rb +7 -28
  46. data/app/helpers/para/model_helper.rb +5 -8
  47. data/app/helpers/para/tree_helper.rb +4 -4
  48. data/app/javascripts/para/admin/async-progress.js +58 -0
  49. data/app/javascripts/para/admin/filters-form.js +12 -0
  50. data/app/javascripts/para/admin/job-tracker.js +33 -0
  51. data/app/javascripts/para/admin/table.js +58 -0
  52. data/app/javascripts/para/admin/tabs.js +110 -0
  53. data/app/javascripts/para/admin/theme_actions.js +39 -0
  54. data/app/javascripts/para/admin/tree.js +124 -0
  55. data/app/javascripts/para/application.js +2 -0
  56. data/app/javascripts/para/controllers/application.js +17 -0
  57. data/app/javascripts/para/controllers/index.js +10 -0
  58. data/app/javascripts/para/controllers/para_admin_flash_message_controller.js +48 -0
  59. data/app/javascripts/para/controllers/para_admin_modal_controller.js +43 -0
  60. data/app/javascripts/para/controllers/selectize_field_controller.js +142 -0
  61. data/app/javascripts/para/index.js +31 -0
  62. data/app/javascripts/para/inputs/material-input.js +7 -0
  63. data/app/javascripts/para/inputs/multi-select-input.js +343 -0
  64. data/app/javascripts/para/inputs/nested_many.js +151 -0
  65. data/app/javascripts/para/lib/fetch.js +41 -0
  66. data/app/javascripts/para/lib/page-loading.js +42 -0
  67. data/app/javascripts/para/simple_form_extension/colorpicker.js +30 -0
  68. data/app/javascripts/para/simple_form_extension/datetimepicker.js +115 -0
  69. data/app/javascripts/para/simple_form_extension/fileinput.js +57 -0
  70. data/app/javascripts/para/simple_form_extension/index.js +12 -0
  71. data/app/javascripts/para/simple_form_extension/selectize.js +160 -0
  72. data/app/javascripts/para/simple_form_extension/simple_form_extension_initialization.js +62 -0
  73. data/app/javascripts/para/simple_form_extension/slider.js +43 -0
  74. data/app/javascripts/para/simple_form_extension/spinbox.js +35 -0
  75. data/app/javascripts/para/vendor/bootstrap-colorpicker.js +1025 -0
  76. data/app/javascripts/para/vendor/bootstrap-slider.js +1610 -0
  77. data/app/javascripts/para/vendor/cocoon.js +150 -0
  78. data/app/javascripts/para/vendor/jquery.datetimepicker.js +2156 -0
  79. data/app/javascripts/para/vendor/jquery.js +3 -0
  80. data/app/javascripts/para/vendor/spinbox.js +438 -0
  81. data/app/javascripts/para/vendor/vertebra.js +224 -0
  82. data/app/views/admin/para/exporter/bases/_completed.html.haml +1 -1
  83. data/app/views/layouts/para/admin.html.haml +4 -2
  84. data/app/views/para/admin/imports/new.html.haml +12 -11
  85. data/app/views/para/admin/jobs/_completed.html.haml +1 -1
  86. data/app/views/para/admin/jobs/_failed.html.haml +1 -1
  87. data/app/views/para/admin/jobs/_job.html.haml +11 -0
  88. data/app/views/para/admin/jobs/show.html.haml +1 -10
  89. data/app/views/para/admin/resources/_add_button.html.haml +1 -1
  90. data/app/views/para/admin/resources/_exports_menu.html.haml +2 -2
  91. data/app/views/para/admin/resources/_filters.html.haml +1 -1
  92. data/app/views/para/admin/resources/_imports_menu.html.haml +2 -2
  93. data/app/views/para/admin/resources/_list.html.haml +27 -26
  94. data/app/views/para/admin/resources/_navigation.html.haml +10 -11
  95. data/app/views/para/admin/resources/_subclassable_add_button.html.haml +1 -1
  96. data/app/views/para/admin/shared/_flash.html.haml +18 -0
  97. data/app/views/para/admin/shared/_header.html.haml +1 -1
  98. data/app/views/para/form/_tabs.html.haml +1 -1
  99. data/app/views/para/inputs/_nested_many.html.haml +3 -3
  100. data/app/views/para/inputs/nested_many/_add.html.haml +1 -1
  101. data/app/views/para/inputs/nested_many/_add_with_subclasses.html.haml +2 -2
  102. data/app/views/para/inputs/nested_many/_container.html.haml +1 -1
  103. data/config/locales/fr.yml +1 -0
  104. data/lib/generators/para/install/install_generator.rb +10 -14
  105. data/lib/para/attribute_field/base.rb +3 -0
  106. data/lib/para/attribute_field/wysiwyg_editor.rb +15 -0
  107. data/lib/para/attribute_field.rb +1 -1
  108. data/lib/para/components_configuration.rb +1 -1
  109. data/lib/para/engine.rb +20 -22
  110. data/lib/para/ext/turbo_stream.rb +13 -0
  111. data/lib/para/ext.rb +1 -1
  112. data/lib/para/form_builder/containers.rb +33 -22
  113. data/lib/para/form_builder/nested_form.rb +6 -5
  114. data/lib/para/inputs/nested_many_input.rb +5 -0
  115. data/lib/para/markup/modal.rb +30 -15
  116. data/lib/para/markup/resources_buttons.rb +15 -11
  117. data/lib/para/model_field_parsers/wysiwyg_editor.rb +19 -0
  118. data/lib/para/model_field_parsers.rb +1 -1
  119. data/lib/para/version.rb +1 -1
  120. data/lib/para.rb +2 -8
  121. data/lib/simple_form_extension/components/icons.rb +13 -0
  122. data/lib/simple_form_extension/components/popovers.rb +46 -0
  123. data/lib/simple_form_extension/components.rb +8 -0
  124. data/lib/simple_form_extension/ext/form_builder.rb +20 -0
  125. data/lib/simple_form_extension/file_concern.rb +74 -0
  126. data/lib/simple_form_extension/inputs/boolean_input.rb +16 -0
  127. data/lib/simple_form_extension/inputs/collection_check_boxes_input.rb +15 -0
  128. data/lib/simple_form_extension/inputs/collection_radio_buttons_input.rb +15 -0
  129. data/lib/simple_form_extension/inputs/color_input.rb +37 -0
  130. data/lib/simple_form_extension/inputs/date_time_input.rb +48 -0
  131. data/lib/simple_form_extension/inputs/file_input.rb +41 -0
  132. data/lib/simple_form_extension/inputs/image_input.rb +110 -0
  133. data/lib/simple_form_extension/inputs/numeric_input.rb +27 -0
  134. data/lib/simple_form_extension/inputs/selectize_input.rb +210 -0
  135. data/lib/simple_form_extension/inputs/slider_input.rb +30 -0
  136. data/lib/simple_form_extension/inputs.rb +16 -0
  137. data/lib/simple_form_extension/railtie.rb +21 -0
  138. data/lib/simple_form_extension/resource_name_helper.rb +9 -0
  139. data/lib/simple_form_extension/translations.rb +7 -0
  140. data/lib/simple_form_extension/version.rb +3 -0
  141. data/lib/simple_form_extension.rb +30 -0
  142. data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  143. data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha.png +0 -0
  144. data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue-horizontal.png +0 -0
  145. data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue.png +0 -0
  146. data/vendor/assets/images/simple_form_extension/bootstrap-colorpicker/saturation.png +0 -0
  147. data/vendor/assets/stylesheets/bootstrap-colorpicker.scss +227 -0
  148. data/vendor/assets/stylesheets/bootstrap-slider.scss +246 -0
  149. data/vendor/assets/stylesheets/bootstrap.scss +6032 -0
  150. data/vendor/assets/stylesheets/jquery.datetimepicker.scss +568 -0
  151. metadata +120 -188
  152. data/app/assets/javascripts/admin/app.coffee +0 -1
  153. data/app/assets/javascripts/para/admin/async-progress.coffee +0 -29
  154. data/app/assets/javascripts/para/admin/filters-form.coffee +0 -11
  155. data/app/assets/javascripts/para/admin/job-tracker.coffee +0 -39
  156. data/app/assets/javascripts/para/admin/table.coffee +0 -44
  157. data/app/assets/javascripts/para/admin/tabs.coffee +0 -63
  158. data/app/assets/javascripts/para/admin/theme_actions.coffee +0 -25
  159. data/app/assets/javascripts/para/admin/tree.coffee +0 -105
  160. data/app/assets/javascripts/para/admin.coffee +0 -22
  161. data/app/assets/javascripts/para/application.js +0 -13
  162. data/app/assets/javascripts/para/inputs/material-input.coffee +0 -4
  163. data/app/assets/javascripts/para/inputs/multi-select-input.coffee +0 -174
  164. data/app/assets/javascripts/para/inputs/nested_many.coffee +0 -108
  165. data/app/assets/javascripts/para/lib/ajax.coffee +0 -11
  166. data/app/assets/javascripts/para/lib/remote-file-forms.coffee +0 -59
  167. data/app/assets/javascripts/para/lib/turbolinks-forms.coffee +0 -23
  168. data/app/assets/javascripts/para/lib/turbolinks-loading.coffee +0 -25
  169. data/app/assets/javascripts/para/lib/turbolinks-reloader.coffee +0 -19
  170. data/app/assets/stylesheets/para/admin/main.sass +0 -33
  171. data/app/assets/stylesheets/para/admin/src/_affix.sass +0 -4
  172. data/app/assets/stylesheets/para/admin/src/_alert.sass +0 -17
  173. data/app/assets/stylesheets/para/admin/src/_base.sass +0 -54
  174. data/app/assets/stylesheets/para/admin/src/_breadcrumb.sass +0 -32
  175. data/app/assets/stylesheets/para/admin/src/_buttons.sass +0 -107
  176. data/app/assets/stylesheets/para/admin/src/_checkable.sass +0 -94
  177. data/app/assets/stylesheets/para/admin/src/_common.sass +0 -202
  178. data/app/assets/stylesheets/para/admin/src/_dropdown.sass +0 -40
  179. data/app/assets/stylesheets/para/admin/src/_form.sass +0 -299
  180. data/app/assets/stylesheets/para/admin/src/_list.sass +0 -89
  181. data/app/assets/stylesheets/para/admin/src/_mixins.sass +0 -113
  182. data/app/assets/stylesheets/para/admin/src/_multi-select.sass +0 -91
  183. data/app/assets/stylesheets/para/admin/src/_navigation.sass +0 -171
  184. data/app/assets/stylesheets/para/admin/src/_navtabs.sass +0 -58
  185. data/app/assets/stylesheets/para/admin/src/_nested-many.sass +0 -75
  186. data/app/assets/stylesheets/para/admin/src/_nested_one.sass +0 -22
  187. data/app/assets/stylesheets/para/admin/src/_orderable.sass +0 -44
  188. data/app/assets/stylesheets/para/admin/src/_page-loading.sass +0 -39
  189. data/app/assets/stylesheets/para/admin/src/_pagination.sass +0 -34
  190. data/app/assets/stylesheets/para/admin/src/_panel.sass +0 -55
  191. data/app/assets/stylesheets/para/admin/src/_responsive.sass +0 -117
  192. data/app/assets/stylesheets/para/admin/src/_sorting.sass +0 -36
  193. data/app/assets/stylesheets/para/admin/src/_statcard.sass +0 -41
  194. data/app/assets/stylesheets/para/admin/src/_table.sass +0 -33
  195. data/app/assets/stylesheets/para/admin/src/_tree.sass +0 -52
  196. data/app/assets/stylesheets/para/admin.sass +0 -12
  197. data/app/assets/stylesheets/para/lib/compass/_support.scss +0 -447
  198. data/app/assets/stylesheets/para/lib/compass/css3/_box-shadow.scss +0 -88
  199. data/app/assets/stylesheets/para/lib/compass/css3/_images.scss +0 -152
  200. data/app/assets/stylesheets/para/lib/compass/css3/_inline-block.scss +0 -31
  201. data/app/assets/stylesheets/para/lib/compass/css3/_text-shadow.scss +0 -82
  202. data/app/assets/stylesheets/para/lib/compass/css3/_transform.scss +0 -590
  203. data/app/assets/stylesheets/para/lib/compass/css3/_transition.scss +0 -190
  204. data/app/assets/stylesheets/para/lib/compass/css3/_user-interface.scss +0 -71
  205. data/app/assets/stylesheets/para/lib/compass/utilities/general/_hacks.scss +0 -65
  206. data/app/assets/stylesheets/para/lib/datetimepicker.sass +0 -15
  207. data/app/assets/stylesheets/para/lib/fuelux.sass +0 -40
  208. data/app/assets/stylesheets/para/lib/jasny-bootstrap.sass +0 -97
  209. data/app/assets/stylesheets/para/lib/redactor.sass +0 -86
  210. data/app/assets/stylesheets/para/lib/selectize.sass +0 -111
  211. data/app/assets/stylesheets/para/lib/slider.sass +0 -12
  212. data/app/assets/stylesheets/para/plugins-includes.sass.erb +0 -1
  213. data/lib/para/attribute_field/redactor.rb +0 -22
  214. data/lib/para/ext/request_iframe_xhr.rb +0 -17
  215. data/lib/para/iframe_transport/middleware.rb +0 -58
  216. data/lib/para/iframe_transport.rb +0 -7
  217. data/lib/para/model_field_parsers/redactor.rb +0 -19
  218. data/vendor/assets/javascripts/jquery.iframe-transport.js +0 -260
  219. data/vendor/assets/javascripts/jquery.remote-modal-form.coffee +0 -145
  220. /data/app/assets/stylesheets/admin/{app.sass → app.scss} +0 -0
  221. /data/app/{assets/javascripts → javascripts}/para/plugins-includes.js.erb +0 -0
  222. /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/Sortable.js +0 -0
  223. /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jasny-bootstrap.js +0 -0
  224. /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jquery.scrollto.js +0 -0
  225. /data/{vendor/assets/javascripts → app/javascripts/para/vendor}/jquery.sortable.js +0 -0
  226. /data/vendor/assets/stylesheets/{animate.css → animate.scss} +0 -0
  227. /data/vendor/assets/stylesheets/{hint.css → hint.scss} +0 -0
  228. /data/vendor/assets/stylesheets/{jasny-bootstrap.css → jasny-bootstrap.scss} +0 -0
@@ -0,0 +1,2156 @@
1
+ /**
2
+ * @preserve jQuery DateTimePicker plugin v2.4.5
3
+ * @homepage http://xdsoft.net/jqplugins/datetimepicker/
4
+ * (c) 2014, Chupurnov Valeriy.
5
+ */
6
+ /*global document,window,jQuery,setTimeout,clearTimeout,HighlightedDate,getCurrentValue*/
7
+ (function ($) {
8
+ 'use strict';
9
+ var default_options = {
10
+ i18n: {
11
+ ar: { // Arabic
12
+ months: [
13
+ "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
14
+ ],
15
+ dayOfWeekShort: [
16
+ "ن", "ث", "ع", "خ", "ج", "س", "ح"
17
+ ],
18
+ dayOfWeek: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"]
19
+ },
20
+ ro: { // Romanian
21
+ months: [
22
+ "Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
23
+ ],
24
+ dayOfWeekShort: [
25
+ "Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"
26
+ ],
27
+ dayOfWeek: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]
28
+ },
29
+ id: { // Indonesian
30
+ months: [
31
+ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
32
+ ],
33
+ dayOfWeekShort: [
34
+ "Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"
35
+ ],
36
+ dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
37
+ },
38
+ is: { // Icelandic
39
+ months: [
40
+ "Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"
41
+ ],
42
+ dayOfWeekShort: [
43
+ "Sun", "Mán", "Þrið", "Mið", "Fim", "Fös", "Lau"
44
+ ],
45
+ dayOfWeek: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"]
46
+ },
47
+ bg: { // Bulgarian
48
+ months: [
49
+ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
50
+ ],
51
+ dayOfWeekShort: [
52
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
53
+ ],
54
+ dayOfWeek: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
55
+ },
56
+ fa: { // Persian/Farsi
57
+ months: [
58
+ 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
59
+ ],
60
+ dayOfWeekShort: [
61
+ 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
62
+ ],
63
+ dayOfWeek: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"]
64
+ },
65
+ ru: { // Russian
66
+ months: [
67
+ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
68
+ ],
69
+ dayOfWeekShort: [
70
+ "Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
71
+ ],
72
+ dayOfWeek: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]
73
+ },
74
+ uk: { // Ukrainian
75
+ months: [
76
+ 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
77
+ ],
78
+ dayOfWeekShort: [
79
+ "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
80
+ ],
81
+ dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"]
82
+ },
83
+ en: { // English
84
+ months: [
85
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
86
+ ],
87
+ dayOfWeekShort: [
88
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
89
+ ],
90
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
91
+ },
92
+ el: { // Ελληνικά
93
+ months: [
94
+ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
95
+ ],
96
+ dayOfWeekShort: [
97
+ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
98
+ ],
99
+ dayOfWeek: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]
100
+ },
101
+ de: { // German
102
+ months: [
103
+ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
104
+ ],
105
+ dayOfWeekShort: [
106
+ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
107
+ ],
108
+ dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
109
+ },
110
+ nl: { // Dutch
111
+ months: [
112
+ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
113
+ ],
114
+ dayOfWeekShort: [
115
+ "zo", "ma", "di", "wo", "do", "vr", "za"
116
+ ],
117
+ dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]
118
+ },
119
+ tr: { // Turkish
120
+ months: [
121
+ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
122
+ ],
123
+ dayOfWeekShort: [
124
+ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
125
+ ],
126
+ dayOfWeek: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
127
+ },
128
+ fr: { //French
129
+ months: [
130
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
131
+ ],
132
+ dayOfWeekShort: [
133
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
134
+ ],
135
+ dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]
136
+ },
137
+ es: { // Spanish
138
+ months: [
139
+ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
140
+ ],
141
+ dayOfWeekShort: [
142
+ "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
143
+ ],
144
+ dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]
145
+ },
146
+ th: { // Thai
147
+ months: [
148
+ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
149
+ ],
150
+ dayOfWeekShort: [
151
+ 'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
152
+ ],
153
+ dayOfWeek: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"]
154
+ },
155
+ pl: { // Polish
156
+ months: [
157
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
158
+ ],
159
+ dayOfWeekShort: [
160
+ "nd", "pn", "wt", "śr", "cz", "pt", "sb"
161
+ ],
162
+ dayOfWeek: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"]
163
+ },
164
+ pt: { // Portuguese
165
+ months: [
166
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
167
+ ],
168
+ dayOfWeekShort: [
169
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
170
+ ],
171
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
172
+ },
173
+ ch: { // Simplified Chinese
174
+ months: [
175
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
176
+ ],
177
+ dayOfWeekShort: [
178
+ "日", "一", "二", "三", "四", "五", "六"
179
+ ]
180
+ },
181
+ se: { // Swedish
182
+ months: [
183
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
184
+ ],
185
+ dayOfWeekShort: [
186
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
187
+ ]
188
+ },
189
+ kr: { // Korean
190
+ months: [
191
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
192
+ ],
193
+ dayOfWeekShort: [
194
+ "일", "월", "화", "수", "목", "금", "토"
195
+ ],
196
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
197
+ },
198
+ it: { // Italian
199
+ months: [
200
+ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
201
+ ],
202
+ dayOfWeekShort: [
203
+ "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
204
+ ],
205
+ dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
206
+ },
207
+ da: { // Dansk
208
+ months: [
209
+ "January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "November", "December"
210
+ ],
211
+ dayOfWeekShort: [
212
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
213
+ ],
214
+ dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]
215
+ },
216
+ no: { // Norwegian
217
+ months: [
218
+ "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
219
+ ],
220
+ dayOfWeekShort: [
221
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
222
+ ],
223
+ dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag']
224
+ },
225
+ ja: { // Japanese
226
+ months: [
227
+ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
228
+ ],
229
+ dayOfWeekShort: [
230
+ "日", "月", "火", "水", "木", "金", "土"
231
+ ],
232
+ dayOfWeek: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"]
233
+ },
234
+ vi: { // Vietnamese
235
+ months: [
236
+ "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"
237
+ ],
238
+ dayOfWeekShort: [
239
+ "CN", "T2", "T3", "T4", "T5", "T6", "T7"
240
+ ],
241
+ dayOfWeek: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]
242
+ },
243
+ sl: { // Slovenščina
244
+ months: [
245
+ "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
246
+ ],
247
+ dayOfWeekShort: [
248
+ "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
249
+ ],
250
+ dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]
251
+ },
252
+ cs: { // Čeština
253
+ months: [
254
+ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
255
+ ],
256
+ dayOfWeekShort: [
257
+ "Ne", "Po", "Út", "St", "Čt", "Pá", "So"
258
+ ]
259
+ },
260
+ hu: { // Hungarian
261
+ months: [
262
+ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
263
+ ],
264
+ dayOfWeekShort: [
265
+ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
266
+ ],
267
+ dayOfWeek: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"]
268
+ },
269
+ az: { //Azerbaijanian (Azeri)
270
+ months: [
271
+ "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
272
+ ],
273
+ dayOfWeekShort: [
274
+ "B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
275
+ ],
276
+ dayOfWeek: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"]
277
+ },
278
+ bs: { //Bosanski
279
+ months: [
280
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
281
+ ],
282
+ dayOfWeekShort: [
283
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
284
+ ],
285
+ dayOfWeek: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
286
+ },
287
+ ca: { //Català
288
+ months: [
289
+ "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
290
+ ],
291
+ dayOfWeekShort: [
292
+ "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
293
+ ],
294
+ dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]
295
+ },
296
+ 'en-GB': { //English (British)
297
+ months: [
298
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
299
+ ],
300
+ dayOfWeekShort: [
301
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
302
+ ],
303
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
304
+ },
305
+ et: { //"Eesti"
306
+ months: [
307
+ "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
308
+ ],
309
+ dayOfWeekShort: [
310
+ "P", "E", "T", "K", "N", "R", "L"
311
+ ],
312
+ dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"]
313
+ },
314
+ eu: { //Euskara
315
+ months: [
316
+ "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
317
+ ],
318
+ dayOfWeekShort: [
319
+ "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
320
+ ],
321
+ dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata']
322
+ },
323
+ fi: { //Finnish (Suomi)
324
+ months: [
325
+ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
326
+ ],
327
+ dayOfWeekShort: [
328
+ "Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
329
+ ],
330
+ dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]
331
+ },
332
+ gl: { //Galego
333
+ months: [
334
+ "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
335
+ ],
336
+ dayOfWeekShort: [
337
+ "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
338
+ ],
339
+ dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"]
340
+ },
341
+ hr: { //Hrvatski
342
+ months: [
343
+ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
344
+ ],
345
+ dayOfWeekShort: [
346
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
347
+ ],
348
+ dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
349
+ },
350
+ ko: { //Korean (한국어)
351
+ months: [
352
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
353
+ ],
354
+ dayOfWeekShort: [
355
+ "일", "월", "화", "수", "목", "금", "토"
356
+ ],
357
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
358
+ },
359
+ lt: { //Lithuanian (lietuvių)
360
+ months: [
361
+ "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
362
+ ],
363
+ dayOfWeekShort: [
364
+ "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
365
+ ],
366
+ dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]
367
+ },
368
+ lv: { //Latvian (Latviešu)
369
+ months: [
370
+ "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
371
+ ],
372
+ dayOfWeekShort: [
373
+ "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
374
+ ],
375
+ dayOfWeek: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]
376
+ },
377
+ mk: { //Macedonian (Македонски)
378
+ months: [
379
+ "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
380
+ ],
381
+ dayOfWeekShort: [
382
+ "нед", "пон", "вто", "сре", "чет", "пет", "саб"
383
+ ],
384
+ dayOfWeek: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]
385
+ },
386
+ mn: { //Mongolian (Монгол)
387
+ months: [
388
+ "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
389
+ ],
390
+ dayOfWeekShort: [
391
+ "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
392
+ ],
393
+ dayOfWeek: ["Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба", "Ням"]
394
+ },
395
+ 'pt-BR': { //Português(Brasil)
396
+ months: [
397
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
398
+ ],
399
+ dayOfWeekShort: [
400
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
401
+ ],
402
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
403
+ },
404
+ sk: { //Slovenčina
405
+ months: [
406
+ "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
407
+ ],
408
+ dayOfWeekShort: [
409
+ "Ne", "Po", "Ut", "St", "Št", "Pi", "So"
410
+ ],
411
+ dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]
412
+ },
413
+ sq: { //Albanian (Shqip)
414
+ months: [
415
+ "Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"
416
+ ],
417
+ dayOfWeekShort: [
418
+ "Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"
419
+ ],
420
+ dayOfWeek: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"]
421
+ },
422
+ 'sr-YU': { //Serbian (Srpski)
423
+ months: [
424
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
425
+ ],
426
+ dayOfWeekShort: [
427
+ "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
428
+ ],
429
+ dayOfWeek: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]
430
+ },
431
+ sr: { //Serbian Cyrillic (Српски)
432
+ months: [
433
+ "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
434
+ ],
435
+ dayOfWeekShort: [
436
+ "нед", "пон", "уто", "сре", "чет", "пет", "суб"
437
+ ],
438
+ dayOfWeek: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]
439
+ },
440
+ sv: { //Svenska
441
+ months: [
442
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
443
+ ],
444
+ dayOfWeekShort: [
445
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
446
+ ],
447
+ dayOfWeek: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"]
448
+ },
449
+ 'zh-TW': { //Traditional Chinese (繁體中文)
450
+ months: [
451
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
452
+ ],
453
+ dayOfWeekShort: [
454
+ "日", "一", "二", "三", "四", "五", "六"
455
+ ],
456
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
457
+ },
458
+ zh: { //Simplified Chinese (简体中文)
459
+ months: [
460
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
461
+ ],
462
+ dayOfWeekShort: [
463
+ "日", "一", "二", "三", "四", "五", "六"
464
+ ],
465
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
466
+ },
467
+ he: { //Hebrew (עברית)
468
+ months: [
469
+ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
470
+ ],
471
+ dayOfWeekShort: [
472
+ 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
473
+ ],
474
+ dayOfWeek: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"]
475
+ },
476
+ hy: { // Armenian
477
+ months: [
478
+ "Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
479
+ ],
480
+ dayOfWeekShort: [
481
+ "Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
482
+ ],
483
+ dayOfWeek: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"]
484
+ },
485
+ kg: { // Kyrgyz
486
+ months: [
487
+ 'Үчтүн айы', 'Бирдин айы', 'Жалган Куран', 'Чын Куран', 'Бугу', 'Кулжа', 'Теке', 'Баш Оона', 'Аяк Оона', 'Тогуздун айы', 'Жетинин айы', 'Бештин айы'
488
+ ],
489
+ dayOfWeekShort: [
490
+ "Жек", "Дүй", "Шей", "Шар", "Бей", "Жум", "Ише"
491
+ ],
492
+ dayOfWeek: [
493
+ "Жекшемб", "Дүйшөмб", "Шейшемб", "Шаршемб", "Бейшемби", "Жума", "Ишенб"
494
+ ]
495
+ }
496
+ },
497
+ value: '',
498
+ rtl: false,
499
+
500
+ format: 'Y/m/d H:i',
501
+ formatTime: 'H:i',
502
+ formatDate: 'Y/m/d',
503
+
504
+ startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
505
+ step: 60,
506
+ monthChangeSpinner: true,
507
+
508
+ closeOnDateSelect: false,
509
+ closeOnTimeSelect: true,
510
+ closeOnWithoutClick: true,
511
+ closeOnInputClick: true,
512
+
513
+ timepicker: true,
514
+ datepicker: true,
515
+ weeks: false,
516
+
517
+ defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
518
+ defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
519
+
520
+ minDate: false,
521
+ maxDate: false,
522
+ minTime: false,
523
+ maxTime: false,
524
+ disabledMinTime: false,
525
+ disabledMaxTime: false,
526
+
527
+ allowTimes: [],
528
+ opened: false,
529
+ initTime: true,
530
+ inline: false,
531
+ theme: '',
532
+
533
+ onSelectDate: function () {},
534
+ onSelectTime: function () {},
535
+ onChangeMonth: function () {},
536
+ onChangeYear: function () {},
537
+ onChangeDateTime: function () {},
538
+ onShow: function () {},
539
+ onClose: function () {},
540
+ onGenerate: function () {},
541
+
542
+ withoutCopyright: true,
543
+ inverseButton: false,
544
+ hours12: false,
545
+ next: 'xdsoft_next',
546
+ prev : 'xdsoft_prev',
547
+ dayOfWeekStart: 0,
548
+ parentID: 'body',
549
+ timeHeightInTimePicker: 25,
550
+ timepickerScrollbar: true,
551
+ todayButton: true,
552
+ prevButton: true,
553
+ nextButton: true,
554
+ defaultSelect: true,
555
+
556
+ scrollMonth: true,
557
+ scrollTime: true,
558
+ scrollInput: true,
559
+
560
+ lazyInit: false,
561
+ mask: false,
562
+ validateOnBlur: true,
563
+ allowBlank: true,
564
+ yearStart: 1950,
565
+ yearEnd: 2050,
566
+ monthStart: 0,
567
+ monthEnd: 11,
568
+ style: '',
569
+ id: '',
570
+ fixed: false,
571
+ roundTime: 'round', // ceil, floor
572
+ className: '',
573
+ weekends: [],
574
+ highlightedDates: [],
575
+ highlightedPeriods: [],
576
+ disabledDates : [],
577
+ disabledWeekDays: [],
578
+ yearOffset: 0,
579
+ beforeShowDay: null,
580
+
581
+ enterLikeTab: true,
582
+ showApplyButton: false
583
+ };
584
+
585
+ var globalLocaleDefault = 'en',
586
+ globalLocale = 'en';
587
+ // for locale settings
588
+ $.datetimepicker = {
589
+ setLocale: function(locale){
590
+ globalLocale = default_options.i18n[locale]?locale:globalLocaleDefault;
591
+ // Override Parse and Format Library entities
592
+ Date.monthNames = default_options.i18n[globalLocale].months;
593
+ Date.dayNames = default_options.i18n[globalLocale].dayOfWeek;
594
+ }
595
+ };
596
+
597
+ // fix for ie8
598
+ if (!window.getComputedStyle) {
599
+ window.getComputedStyle = function (el, pseudo) {
600
+ this.el = el;
601
+ this.getPropertyValue = function (prop) {
602
+ var re = /(\-([a-z]){1})/g;
603
+ if (prop === 'float') {
604
+ prop = 'styleFloat';
605
+ }
606
+ if (re.test(prop)) {
607
+ prop = prop.replace(re, function (a, b, c) {
608
+ return c.toUpperCase();
609
+ });
610
+ }
611
+ return el.currentStyle[prop] || null;
612
+ };
613
+ return this;
614
+ };
615
+ }
616
+ if (!Array.prototype.indexOf) {
617
+ Array.prototype.indexOf = function (obj, start) {
618
+ var i, j;
619
+ for (i = (start || 0), j = this.length; i < j; i += 1) {
620
+ if (this[i] === obj) { return i; }
621
+ }
622
+ return -1;
623
+ };
624
+ }
625
+ Date.prototype.countDaysInMonth = function () {
626
+ return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
627
+ };
628
+ $.fn.xdsoftScroller = function (percent) {
629
+ return this.each(function () {
630
+ var timeboxparent = $(this),
631
+ pointerEventToXY = function (e) {
632
+ var out = {x: 0, y: 0},
633
+ touch;
634
+ if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
635
+ touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
636
+ out.x = touch.clientX;
637
+ out.y = touch.clientY;
638
+ } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
639
+ out.x = e.clientX;
640
+ out.y = e.clientY;
641
+ }
642
+ return out;
643
+ },
644
+ move = 0,
645
+ timebox,
646
+ parentHeight,
647
+ height,
648
+ scrollbar,
649
+ scroller,
650
+ maximumOffset = 100,
651
+ start = false,
652
+ startY = 0,
653
+ startTop = 0,
654
+ h1 = 0,
655
+ touchStart = false,
656
+ startTopScroll = 0,
657
+ calcOffset = function () {};
658
+ if (percent === 'hide') {
659
+ timeboxparent.find('.xdsoft_scrollbar').hide();
660
+ return;
661
+ }
662
+ if (!$(this).hasClass('xdsoft_scroller_box')) {
663
+ timebox = timeboxparent.children().eq(0);
664
+ parentHeight = timeboxparent[0].clientHeight;
665
+ height = timebox[0].offsetHeight;
666
+ scrollbar = $('<div class="xdsoft_scrollbar"></div>');
667
+ scroller = $('<div class="xdsoft_scroller"></div>');
668
+ scrollbar.append(scroller);
669
+
670
+ timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
671
+ calcOffset = function calcOffset(event) {
672
+ var offset = pointerEventToXY(event).y - startY + startTopScroll;
673
+ if (offset < 0) {
674
+ offset = 0;
675
+ }
676
+ if (offset + scroller[0].offsetHeight > h1) {
677
+ offset = h1 - scroller[0].offsetHeight;
678
+ }
679
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
680
+ };
681
+
682
+ scroller
683
+ .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
684
+ if (!parentHeight) {
685
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
686
+ }
687
+
688
+ startY = pointerEventToXY(event).y;
689
+ startTopScroll = parseInt(scroller.css('margin-top'), 10);
690
+ h1 = scrollbar[0].offsetHeight;
691
+
692
+ if (event.type === 'mousedown') {
693
+ if (document) {
694
+ $(document.body).addClass('xdsoft_noselect');
695
+ }
696
+ $([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
697
+ $([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
698
+ .off('mousemove.xdsoft_scroller', calcOffset)
699
+ .removeClass('xdsoft_noselect');
700
+ });
701
+ $(document.body).on('mousemove.xdsoft_scroller', calcOffset);
702
+ } else {
703
+ touchStart = true;
704
+ event.stopPropagation();
705
+ event.preventDefault();
706
+ }
707
+ })
708
+ .on('touchmove', function (event) {
709
+ if (touchStart) {
710
+ event.preventDefault();
711
+ calcOffset(event);
712
+ }
713
+ })
714
+ .on('touchend touchcancel', function (event) {
715
+ touchStart = false;
716
+ startTopScroll = 0;
717
+ });
718
+
719
+ timeboxparent
720
+ .on('scroll_element.xdsoft_scroller', function (event, percentage) {
721
+ if (!parentHeight) {
722
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
723
+ }
724
+ percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
725
+
726
+ scroller.css('margin-top', maximumOffset * percentage);
727
+
728
+ setTimeout(function () {
729
+ timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
730
+ }, 10);
731
+ })
732
+ .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
733
+ var percent, sh;
734
+ parentHeight = timeboxparent[0].clientHeight;
735
+ height = timebox[0].offsetHeight;
736
+ percent = parentHeight / height;
737
+ sh = percent * scrollbar[0].offsetHeight;
738
+ if (percent > 1) {
739
+ scroller.hide();
740
+ } else {
741
+ scroller.show();
742
+ scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
743
+ maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
744
+ if (noTriggerScroll !== true) {
745
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]);
746
+ }
747
+ }
748
+ });
749
+
750
+ timeboxparent.on('mousewheel', function (event) {
751
+ var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
752
+
753
+ top = top - (event.deltaY * 20);
754
+ if (top < 0) {
755
+ top = 0;
756
+ }
757
+
758
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
759
+ event.stopPropagation();
760
+ return false;
761
+ });
762
+
763
+ timeboxparent.on('touchstart', function (event) {
764
+ start = pointerEventToXY(event);
765
+ startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
766
+ });
767
+
768
+ timeboxparent.on('touchmove', function (event) {
769
+ if (start) {
770
+ event.preventDefault();
771
+ var coord = pointerEventToXY(event);
772
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
773
+ }
774
+ });
775
+
776
+ timeboxparent.on('touchend touchcancel', function (event) {
777
+ start = false;
778
+ startTop = 0;
779
+ });
780
+ }
781
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
782
+ });
783
+ };
784
+
785
+ $.fn.datetimepicker = function (opt) {
786
+ var KEY0 = 48,
787
+ KEY9 = 57,
788
+ _KEY0 = 96,
789
+ _KEY9 = 105,
790
+ CTRLKEY = 17,
791
+ DEL = 46,
792
+ ENTER = 13,
793
+ ESC = 27,
794
+ BACKSPACE = 8,
795
+ ARROWLEFT = 37,
796
+ ARROWUP = 38,
797
+ ARROWRIGHT = 39,
798
+ ARROWDOWN = 40,
799
+ TAB = 9,
800
+ F5 = 116,
801
+ AKEY = 65,
802
+ CKEY = 67,
803
+ VKEY = 86,
804
+ ZKEY = 90,
805
+ YKEY = 89,
806
+ ctrlDown = false,
807
+ options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
808
+
809
+ lazyInitTimer = 0,
810
+ createDateTimePicker,
811
+ destroyDateTimePicker,
812
+
813
+ lazyInit = function (input) {
814
+ input
815
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function initOnActionCallback(event) {
816
+ if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
817
+ return;
818
+ }
819
+ clearTimeout(lazyInitTimer);
820
+ lazyInitTimer = setTimeout(function () {
821
+
822
+ if (!input.data('xdsoft_datetimepicker')) {
823
+ createDateTimePicker(input);
824
+ }
825
+ input
826
+ .off('open.xdsoft focusin.xdsoft mousedown.xdsoft', initOnActionCallback)
827
+ .trigger('open.xdsoft');
828
+ }, 100);
829
+ });
830
+ };
831
+
832
+ createDateTimePicker = function (input) {
833
+ var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
834
+ xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
835
+ datepicker = $('<div class="xdsoft_datepicker active"></div>'),
836
+ mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
837
+ '<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
838
+ '<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
839
+ '<button type="button" class="xdsoft_next"></button></div>'),
840
+ calendar = $('<div class="xdsoft_calendar"></div>'),
841
+ timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
842
+ timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
843
+ timebox = $('<div class="xdsoft_time_variant"></div>'),
844
+ applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
845
+ /*scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
846
+ scroller = $('<div class="xdsoft_scroller"></div>'),*/
847
+ monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
848
+ yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
849
+ triggerAfterOpen = false,
850
+ XDSoft_datetime,
851
+ //scroll_element,
852
+ xchangeTimer,
853
+ timerclick,
854
+ current_time_index,
855
+ setPos,
856
+ timer = 0,
857
+ timer1 = 0,
858
+ _xdsoft_datetime;
859
+
860
+ if (options.id) {
861
+ datetimepicker.attr('id', options.id);
862
+ }
863
+ if (options.style) {
864
+ datetimepicker.attr('style', options.style);
865
+ }
866
+ if (options.weeks) {
867
+ datetimepicker.addClass('xdsoft_showweeks');
868
+ }
869
+ if (options.rtl) {
870
+ datetimepicker.addClass('xdsoft_rtl');
871
+ }
872
+
873
+ datetimepicker.addClass('xdsoft_' + options.theme);
874
+ datetimepicker.addClass(options.className);
875
+
876
+ mounth_picker
877
+ .find('.xdsoft_month span')
878
+ .after(monthselect);
879
+ mounth_picker
880
+ .find('.xdsoft_year span')
881
+ .after(yearselect);
882
+
883
+ mounth_picker
884
+ .find('.xdsoft_month,.xdsoft_year')
885
+ .on('mousedown.xdsoft', function (event) {
886
+ var select = $(this).find('.xdsoft_select').eq(0),
887
+ val = 0,
888
+ top = 0,
889
+ visible = select.is(':visible'),
890
+ items,
891
+ i;
892
+
893
+ mounth_picker
894
+ .find('.xdsoft_select')
895
+ .hide();
896
+ if (_xdsoft_datetime.currentTime) {
897
+ val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
898
+ }
899
+
900
+ select[visible ? 'hide' : 'show']();
901
+ for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
902
+ if (items.eq(i).data('value') === val) {
903
+ break;
904
+ } else {
905
+ top += items[0].offsetHeight;
906
+ }
907
+ }
908
+
909
+ select.xdsoftScroller(top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
910
+ event.stopPropagation();
911
+ return false;
912
+ });
913
+
914
+ mounth_picker
915
+ .find('.xdsoft_select')
916
+ .xdsoftScroller()
917
+ .on('mousedown.xdsoft', function (event) {
918
+ event.stopPropagation();
919
+ event.preventDefault();
920
+ })
921
+ .on('mousedown.xdsoft', '.xdsoft_option', function (event) {
922
+
923
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
924
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
925
+ }
926
+
927
+ var year = _xdsoft_datetime.currentTime.getFullYear();
928
+ if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
929
+ _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
930
+ }
931
+
932
+ $(this).parent().parent().hide();
933
+
934
+ datetimepicker.trigger('xchange.xdsoft');
935
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
936
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
937
+ }
938
+
939
+ if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
940
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
941
+ }
942
+ });
943
+
944
+ datetimepicker.setOptions = function (_options) {
945
+ var highlightedDates = {},
946
+ getCaretPos = function (input) {
947
+ try {
948
+ if (document.selection && document.selection.createRange) {
949
+ var range = document.selection.createRange();
950
+ return range.getBookmark().charCodeAt(2) - 2;
951
+ }
952
+ if (input.setSelectionRange) {
953
+ return input.selectionStart;
954
+ }
955
+ } catch (e) {
956
+ return 0;
957
+ }
958
+ },
959
+ setCaretPos = function (node, pos) {
960
+ node = (typeof node === "string" || node instanceof String) ? document.getElementById(node) : node;
961
+ if (!node) {
962
+ return false;
963
+ }
964
+ if (node.createTextRange) {
965
+ var textRange = node.createTextRange();
966
+ textRange.collapse(true);
967
+ textRange.moveEnd('character', pos);
968
+ textRange.moveStart('character', pos);
969
+ textRange.select();
970
+ return true;
971
+ }
972
+ if (node.setSelectionRange) {
973
+ node.setSelectionRange(pos, pos);
974
+ return true;
975
+ }
976
+ return false;
977
+ },
978
+ isValidValue = function (mask, value) {
979
+ var reg = mask
980
+ .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
981
+ .replace(/_/g, '{digit+}')
982
+ .replace(/([0-9]{1})/g, '{digit$1}')
983
+ .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
984
+ .replace(/\{digit[\+]\}/g, '[0-9_]{1}');
985
+ return (new RegExp(reg)).test(value);
986
+ };
987
+ options = $.extend(true, {}, options, _options);
988
+
989
+ if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
990
+ options.allowTimes = $.extend(true, [], _options.allowTimes);
991
+ }
992
+
993
+ if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
994
+ options.weekends = $.extend(true, [], _options.weekends);
995
+ }
996
+
997
+ if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) {
998
+ $.each(_options.highlightedDates, function (index, value) {
999
+ var splitData = $.map(value.split(','), $.trim),
1000
+ exDesc,
1001
+ hDate = new HighlightedDate(Date.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style
1002
+ keyDate = hDate.date.dateFormat(options.formatDate);
1003
+ if (highlightedDates[keyDate] !== undefined) {
1004
+ exDesc = highlightedDates[keyDate].desc;
1005
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1006
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1007
+ }
1008
+ } else {
1009
+ highlightedDates[keyDate] = hDate;
1010
+ }
1011
+ });
1012
+
1013
+ options.highlightedDates = $.extend(true, [], highlightedDates);
1014
+ }
1015
+
1016
+ if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) {
1017
+ highlightedDates = $.extend(true, [], options.highlightedDates);
1018
+ $.each(_options.highlightedPeriods, function (index, value) {
1019
+ var dateTest, // start date
1020
+ dateEnd,
1021
+ desc,
1022
+ hDate,
1023
+ keyDate,
1024
+ exDesc,
1025
+ style;
1026
+ if ($.isArray(value)) {
1027
+ dateTest = value[0];
1028
+ dateEnd = value[1];
1029
+ desc = value[2];
1030
+ style = value[3];
1031
+ }
1032
+ else {
1033
+ var splitData = $.map(value.split(','), $.trim);
1034
+ dateTest = Date.parseDate(splitData[0], options.formatDate);
1035
+ dateEnd = Date.parseDate(splitData[1], options.formatDate);
1036
+ desc = splitData[2];
1037
+ style = splitData[3];
1038
+ }
1039
+
1040
+ while (dateTest <= dateEnd) {
1041
+ hDate = new HighlightedDate(dateTest, desc, style);
1042
+ keyDate = dateTest.dateFormat(options.formatDate);
1043
+ dateTest.setDate(dateTest.getDate() + 1);
1044
+ if (highlightedDates[keyDate] !== undefined) {
1045
+ exDesc = highlightedDates[keyDate].desc;
1046
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1047
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1048
+ }
1049
+ } else {
1050
+ highlightedDates[keyDate] = hDate;
1051
+ }
1052
+ }
1053
+ });
1054
+
1055
+ options.highlightedDates = $.extend(true, [], highlightedDates);
1056
+ }
1057
+
1058
+ if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
1059
+ options.disabledDates = $.extend(true, [], _options.disabledDates);
1060
+ }
1061
+
1062
+ if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) {
1063
+ options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays);
1064
+ }
1065
+
1066
+ if ((options.open || options.opened) && (!options.inline)) {
1067
+ input.trigger('open.xdsoft');
1068
+ }
1069
+
1070
+ if (options.inline) {
1071
+ triggerAfterOpen = true;
1072
+ datetimepicker.addClass('xdsoft_inline');
1073
+ input.after(datetimepicker).hide();
1074
+ }
1075
+
1076
+ if (options.inverseButton) {
1077
+ options.next = 'xdsoft_prev';
1078
+ options.prev = 'xdsoft_next';
1079
+ }
1080
+
1081
+ if (options.datepicker) {
1082
+ datepicker.addClass('active');
1083
+ } else {
1084
+ datepicker.removeClass('active');
1085
+ }
1086
+
1087
+ if (options.timepicker) {
1088
+ timepicker.addClass('active');
1089
+ } else {
1090
+ timepicker.removeClass('active');
1091
+ }
1092
+
1093
+ if (options.value) {
1094
+ _xdsoft_datetime.setCurrentTime(options.value);
1095
+ if (input && input.val) {
1096
+ input.val(_xdsoft_datetime.str);
1097
+ }
1098
+ }
1099
+
1100
+ if (isNaN(options.dayOfWeekStart)) {
1101
+ options.dayOfWeekStart = 0;
1102
+ } else {
1103
+ options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
1104
+ }
1105
+
1106
+ if (!options.timepickerScrollbar) {
1107
+ timeboxparent.xdsoftScroller('hide');
1108
+ }
1109
+
1110
+ if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) {
1111
+ options.minDate = _xdsoft_datetime.strToDateTime(options.minDate).dateFormat(options.formatDate);
1112
+ }
1113
+
1114
+ if (options.maxDate && /^[\+\-](.*)$/.test(options.maxDate)) {
1115
+ options.maxDate = _xdsoft_datetime.strToDateTime(options.maxDate).dateFormat(options.formatDate);
1116
+ }
1117
+
1118
+ applyButton.toggle(options.showApplyButton);
1119
+
1120
+ mounth_picker
1121
+ .find('.xdsoft_today_button')
1122
+ .css('visibility', !options.todayButton ? 'hidden' : 'visible');
1123
+
1124
+ mounth_picker
1125
+ .find('.' + options.prev)
1126
+ .css('visibility', !options.prevButton ? 'hidden' : 'visible');
1127
+
1128
+ mounth_picker
1129
+ .find('.' + options.next)
1130
+ .css('visibility', !options.nextButton ? 'hidden' : 'visible');
1131
+
1132
+ if (options.mask) {
1133
+ input.off('keydown.xdsoft');
1134
+
1135
+ if (options.mask === true) {
1136
+ options.mask = options.format
1137
+ .replace(/Y/g, '9999')
1138
+ .replace(/F/g, '9999')
1139
+ .replace(/m/g, '19')
1140
+ .replace(/d/g, '39')
1141
+ .replace(/H/g, '29')
1142
+ .replace(/i/g, '59')
1143
+ .replace(/s/g, '59');
1144
+ }
1145
+
1146
+ if ($.type(options.mask) === 'string') {
1147
+ if (!isValidValue(options.mask, input.val())) {
1148
+ input.val(options.mask.replace(/[0-9]/g, '_'));
1149
+ }
1150
+
1151
+ input.on('keydown.xdsoft', function (event) {
1152
+ var val = this.value,
1153
+ key = event.which,
1154
+ pos,
1155
+ digit;
1156
+
1157
+ if (((key >= KEY0 && key <= KEY9) || (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) {
1158
+ pos = getCaretPos(this);
1159
+ digit = (key !== BACKSPACE && key !== DEL) ? String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key) : '_';
1160
+
1161
+ if ((key === BACKSPACE || key === DEL) && pos) {
1162
+ pos -= 1;
1163
+ digit = '_';
1164
+ }
1165
+
1166
+ while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
1167
+ pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
1168
+ }
1169
+
1170
+ val = val.substr(0, pos) + digit + val.substr(pos + 1);
1171
+ if ($.trim(val) === '') {
1172
+ val = options.mask.replace(/[0-9]/g, '_');
1173
+ } else {
1174
+ if (pos === options.mask.length) {
1175
+ event.preventDefault();
1176
+ return false;
1177
+ }
1178
+ }
1179
+
1180
+ pos += (key === BACKSPACE || key === DEL) ? 0 : 1;
1181
+ while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
1182
+ pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
1183
+ }
1184
+
1185
+ if (isValidValue(options.mask, val)) {
1186
+ this.value = val;
1187
+ setCaretPos(this, pos);
1188
+ } else if ($.trim(val) === '') {
1189
+ this.value = options.mask.replace(/[0-9]/g, '_');
1190
+ } else {
1191
+ input.trigger('error_input.xdsoft');
1192
+ }
1193
+ } else {
1194
+ if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
1195
+ return true;
1196
+ }
1197
+ }
1198
+
1199
+ event.preventDefault();
1200
+ return false;
1201
+ });
1202
+ }
1203
+ }
1204
+ if (options.validateOnBlur) {
1205
+ input
1206
+ .off('blur.xdsoft')
1207
+ .on('blur.xdsoft', function () {
1208
+ if (options.allowBlank && !$.trim($(this).val()).length) {
1209
+ $(this).val(null);
1210
+ datetimepicker.data('xdsoft_datetime').empty();
1211
+ } else if (!Date.parseDate($(this).val(), options.format)) {
1212
+ var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
1213
+ splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
1214
+
1215
+ // parse the numbers as 0312 => 03:12
1216
+ if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
1217
+ $(this).val([splittedHours, splittedMinutes].map(function (item) {
1218
+ return item > 9 ? item : '0' + item;
1219
+ }).join(':'));
1220
+ } else {
1221
+ $(this).val((_xdsoft_datetime.now()).dateFormat(options.format));
1222
+ }
1223
+
1224
+ datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
1225
+ } else {
1226
+ datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
1227
+ }
1228
+
1229
+ datetimepicker.trigger('changedatetime.xdsoft');
1230
+ });
1231
+ }
1232
+ options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
1233
+
1234
+ datetimepicker
1235
+ .trigger('xchange.xdsoft')
1236
+ .trigger('afterOpen.xdsoft');
1237
+ };
1238
+
1239
+ datetimepicker
1240
+ .data('options', options)
1241
+ .on('mousedown.xdsoft', function (event) {
1242
+ event.stopPropagation();
1243
+ event.preventDefault();
1244
+ yearselect.hide();
1245
+ monthselect.hide();
1246
+ return false;
1247
+ });
1248
+
1249
+ //scroll_element = timepicker.find('.xdsoft_time_box');
1250
+ timeboxparent.append(timebox);
1251
+ timeboxparent.xdsoftScroller();
1252
+
1253
+ datetimepicker.on('afterOpen.xdsoft', function () {
1254
+ timeboxparent.xdsoftScroller();
1255
+ });
1256
+
1257
+ datetimepicker
1258
+ .append(datepicker)
1259
+ .append(timepicker);
1260
+
1261
+ if (options.withoutCopyright !== true) {
1262
+ datetimepicker
1263
+ .append(xdsoft_copyright);
1264
+ }
1265
+
1266
+ datepicker
1267
+ .append(mounth_picker)
1268
+ .append(calendar)
1269
+ .append(applyButton);
1270
+
1271
+ $(options.parentID)
1272
+ .append(datetimepicker);
1273
+
1274
+ XDSoft_datetime = function () {
1275
+ var _this = this;
1276
+ _this.now = function (norecursion) {
1277
+ var d = new Date(),
1278
+ date,
1279
+ time;
1280
+
1281
+ if (!norecursion && options.defaultDate) {
1282
+ date = _this.strToDateTime(options.defaultDate);
1283
+ d.setFullYear(date.getFullYear());
1284
+ d.setMonth(date.getMonth());
1285
+ d.setDate(date.getDate());
1286
+ }
1287
+
1288
+ if (options.yearOffset) {
1289
+ d.setFullYear(d.getFullYear() + options.yearOffset);
1290
+ }
1291
+
1292
+ if (!norecursion && options.defaultTime) {
1293
+ time = _this.strtotime(options.defaultTime);
1294
+ d.setHours(time.getHours());
1295
+ d.setMinutes(time.getMinutes());
1296
+ }
1297
+ return d;
1298
+ };
1299
+
1300
+ _this.isValidDate = function (d) {
1301
+ if (Object.prototype.toString.call(d) !== "[object Date]") {
1302
+ return false;
1303
+ }
1304
+ return !isNaN(d.getTime());
1305
+ };
1306
+
1307
+ _this.setCurrentTime = function (dTime) {
1308
+ _this.currentTime = (typeof dTime === 'string') ? _this.strToDateTime(dTime) : _this.isValidDate(dTime) ? dTime : _this.now();
1309
+ datetimepicker.trigger('xchange.xdsoft');
1310
+ };
1311
+
1312
+ _this.empty = function () {
1313
+ _this.currentTime = null;
1314
+ };
1315
+
1316
+ _this.getCurrentTime = function (dTime) {
1317
+ return _this.currentTime;
1318
+ };
1319
+
1320
+ _this.nextMonth = function () {
1321
+
1322
+ if (_this.currentTime === undefined || _this.currentTime === null) {
1323
+ _this.currentTime = _this.now();
1324
+ }
1325
+
1326
+ var month = _this.currentTime.getMonth() + 1,
1327
+ year;
1328
+ if (month === 12) {
1329
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
1330
+ month = 0;
1331
+ }
1332
+
1333
+ year = _this.currentTime.getFullYear();
1334
+
1335
+ _this.currentTime.setDate(
1336
+ Math.min(
1337
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1338
+ _this.currentTime.getDate()
1339
+ )
1340
+ );
1341
+ _this.currentTime.setMonth(month);
1342
+
1343
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1344
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1345
+ }
1346
+
1347
+ if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
1348
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1349
+ }
1350
+
1351
+ datetimepicker.trigger('xchange.xdsoft');
1352
+ return month;
1353
+ };
1354
+
1355
+ _this.prevMonth = function () {
1356
+
1357
+ if (_this.currentTime === undefined || _this.currentTime === null) {
1358
+ _this.currentTime = _this.now();
1359
+ }
1360
+
1361
+ var month = _this.currentTime.getMonth() - 1;
1362
+ if (month === -1) {
1363
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
1364
+ month = 11;
1365
+ }
1366
+ _this.currentTime.setDate(
1367
+ Math.min(
1368
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1369
+ _this.currentTime.getDate()
1370
+ )
1371
+ );
1372
+ _this.currentTime.setMonth(month);
1373
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1374
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1375
+ }
1376
+ datetimepicker.trigger('xchange.xdsoft');
1377
+ return month;
1378
+ };
1379
+
1380
+ _this.getWeekOfYear = function (datetime) {
1381
+ var onejan = new Date(datetime.getFullYear(), 0, 1);
1382
+ return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
1383
+ };
1384
+
1385
+ _this.strToDateTime = function (sDateTime) {
1386
+ var tmpDate = [], timeOffset, currentTime;
1387
+
1388
+ if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
1389
+ return sDateTime;
1390
+ }
1391
+
1392
+ tmpDate = /^(\+|\-)(.*)$/.exec(sDateTime);
1393
+ if (tmpDate) {
1394
+ tmpDate[2] = Date.parseDate(tmpDate[2], options.formatDate);
1395
+ }
1396
+ if (tmpDate && tmpDate[2]) {
1397
+ timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
1398
+ currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
1399
+ } else {
1400
+ currentTime = sDateTime ? Date.parseDate(sDateTime, options.format) : _this.now();
1401
+ }
1402
+
1403
+ if (!_this.isValidDate(currentTime)) {
1404
+ currentTime = _this.now();
1405
+ }
1406
+
1407
+ return currentTime;
1408
+ };
1409
+
1410
+ _this.strToDate = function (sDate) {
1411
+ if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
1412
+ return sDate;
1413
+ }
1414
+
1415
+ var currentTime = sDate ? Date.parseDate(sDate, options.formatDate) : _this.now(true);
1416
+ if (!_this.isValidDate(currentTime)) {
1417
+ currentTime = _this.now(true);
1418
+ }
1419
+ return currentTime;
1420
+ };
1421
+
1422
+ _this.strtotime = function (sTime) {
1423
+ if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
1424
+ return sTime;
1425
+ }
1426
+ var currentTime = sTime ? Date.parseDate(sTime, options.formatTime) : _this.now(true);
1427
+ if (!_this.isValidDate(currentTime)) {
1428
+ currentTime = _this.now(true);
1429
+ }
1430
+ return currentTime;
1431
+ };
1432
+
1433
+ _this.str = function () {
1434
+ return _this.currentTime.dateFormat(options.format);
1435
+ };
1436
+ _this.currentTime = this.now();
1437
+ };
1438
+
1439
+ _xdsoft_datetime = new XDSoft_datetime();
1440
+
1441
+ applyButton.on('click', function (e) {//pathbrite
1442
+ e.preventDefault();
1443
+ datetimepicker.data('changed', true);
1444
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
1445
+ input.val(_xdsoft_datetime.str());
1446
+ datetimepicker.trigger('close.xdsoft');
1447
+ });
1448
+ mounth_picker
1449
+ .find('.xdsoft_today_button')
1450
+ .on('mousedown.xdsoft', function () {
1451
+ datetimepicker.data('changed', true);
1452
+ _xdsoft_datetime.setCurrentTime(0);
1453
+ datetimepicker.trigger('afterOpen.xdsoft');
1454
+ }).on('dblclick.xdsoft', function () {
1455
+ var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
1456
+ currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
1457
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
1458
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1459
+ if (currentDate < minDate) {
1460
+ return;
1461
+ }
1462
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1463
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
1464
+ if (currentDate > maxDate) {
1465
+ return;
1466
+ }
1467
+ input.val(_xdsoft_datetime.str());
1468
+ input.trigger('change');
1469
+ datetimepicker.trigger('close.xdsoft');
1470
+ });
1471
+ mounth_picker
1472
+ .find('.xdsoft_prev,.xdsoft_next')
1473
+ .on('mousedown.xdsoft', function () {
1474
+ var $this = $(this),
1475
+ timer = 0,
1476
+ stop = false;
1477
+
1478
+ (function arguments_callee1(v) {
1479
+ if ($this.hasClass(options.next)) {
1480
+ _xdsoft_datetime.nextMonth();
1481
+ } else if ($this.hasClass(options.prev)) {
1482
+ _xdsoft_datetime.prevMonth();
1483
+ }
1484
+ if (options.monthChangeSpinner) {
1485
+ if (!stop) {
1486
+ timer = setTimeout(arguments_callee1, v || 100);
1487
+ }
1488
+ }
1489
+ }(500));
1490
+
1491
+ $([document.body, window]).on('mouseup.xdsoft', function arguments_callee2() {
1492
+ clearTimeout(timer);
1493
+ stop = true;
1494
+ $([document.body, window]).off('mouseup.xdsoft', arguments_callee2);
1495
+ });
1496
+ });
1497
+
1498
+ timepicker
1499
+ .find('.xdsoft_prev,.xdsoft_next')
1500
+ .on('mousedown.xdsoft', function () {
1501
+ var $this = $(this),
1502
+ timer = 0,
1503
+ stop = false,
1504
+ period = 110;
1505
+ (function arguments_callee4(v) {
1506
+ var pheight = timeboxparent[0].clientHeight,
1507
+ height = timebox[0].offsetHeight,
1508
+ top = Math.abs(parseInt(timebox.css('marginTop'), 10));
1509
+ if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
1510
+ timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
1511
+ } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
1512
+ timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
1513
+ }
1514
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox.css('marginTop'), 10) / (height - pheight))]);
1515
+ period = (period > 10) ? 10 : period - 10;
1516
+ if (!stop) {
1517
+ timer = setTimeout(arguments_callee4, v || period);
1518
+ }
1519
+ }(500));
1520
+ $([document.body, window]).on('mouseup.xdsoft', function arguments_callee5() {
1521
+ clearTimeout(timer);
1522
+ stop = true;
1523
+ $([document.body, window])
1524
+ .off('mouseup.xdsoft', arguments_callee5);
1525
+ });
1526
+ });
1527
+
1528
+ xchangeTimer = 0;
1529
+ // base handler - generating a calendar and timepicker
1530
+ datetimepicker
1531
+ .on('xchange.xdsoft', function (event) {
1532
+ clearTimeout(xchangeTimer);
1533
+ xchangeTimer = setTimeout(function () {
1534
+
1535
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
1536
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1537
+ }
1538
+
1539
+ var table = '',
1540
+ start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
1541
+ i = 0,
1542
+ j,
1543
+ today = _xdsoft_datetime.now(),
1544
+ maxDate = false,
1545
+ minDate = false,
1546
+ hDate,
1547
+ day,
1548
+ d,
1549
+ y,
1550
+ m,
1551
+ w,
1552
+ classes = [],
1553
+ customDateSettings,
1554
+ newRow = true,
1555
+ time = '',
1556
+ h = '',
1557
+ line_time,
1558
+ description;
1559
+
1560
+ while (start.getDay() !== options.dayOfWeekStart) {
1561
+ start.setDate(start.getDate() - 1);
1562
+ }
1563
+
1564
+ table += '<table><thead><tr>';
1565
+
1566
+ if (options.weeks) {
1567
+ table += '<th></th>';
1568
+ }
1569
+
1570
+ for (j = 0; j < 7; j += 1) {
1571
+ table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>';
1572
+ }
1573
+
1574
+ table += '</tr></thead>';
1575
+ table += '<tbody>';
1576
+
1577
+ if (options.maxDate !== false) {
1578
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1579
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
1580
+ }
1581
+
1582
+ if (options.minDate !== false) {
1583
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
1584
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1585
+ }
1586
+
1587
+ while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
1588
+ classes = [];
1589
+ i += 1;
1590
+
1591
+ day = start.getDay();
1592
+ d = start.getDate();
1593
+ y = start.getFullYear();
1594
+ m = start.getMonth();
1595
+ w = _xdsoft_datetime.getWeekOfYear(start);
1596
+ description = '';
1597
+
1598
+ classes.push('xdsoft_date');
1599
+
1600
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
1601
+ customDateSettings = options.beforeShowDay.call(datetimepicker, start);
1602
+ } else {
1603
+ customDateSettings = null;
1604
+ }
1605
+
1606
+ if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {
1607
+ classes.push('xdsoft_disabled');
1608
+ } else if (options.disabledDates.indexOf(start.dateFormat(options.formatDate)) !== -1) {
1609
+ classes.push('xdsoft_disabled');
1610
+ } else if (options.disabledWeekDays.indexOf(day) !== -1) {
1611
+ classes.push('xdsoft_disabled');
1612
+ }
1613
+
1614
+ if (customDateSettings && customDateSettings[1] !== "") {
1615
+ classes.push(customDateSettings[1]);
1616
+ }
1617
+
1618
+ if (_xdsoft_datetime.currentTime.getMonth() !== m) {
1619
+ classes.push('xdsoft_other_month');
1620
+ }
1621
+
1622
+ if ((options.defaultSelect || datetimepicker.data('changed')) && _xdsoft_datetime.currentTime.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
1623
+ classes.push('xdsoft_current');
1624
+ }
1625
+
1626
+ if (today.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
1627
+ classes.push('xdsoft_today');
1628
+ }
1629
+
1630
+ if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(start.dateFormat(options.formatDate)) !== -1) {
1631
+ classes.push('xdsoft_weekend');
1632
+ }
1633
+
1634
+ if (options.highlightedDates[start.dateFormat(options.formatDate)] !== undefined) {
1635
+ hDate = options.highlightedDates[start.dateFormat(options.formatDate)];
1636
+ classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style);
1637
+ description = hDate.desc === undefined ? '' : hDate.desc;
1638
+ }
1639
+
1640
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
1641
+ classes.push(options.beforeShowDay(start));
1642
+ }
1643
+
1644
+ if (newRow) {
1645
+ table += '<tr>';
1646
+ newRow = false;
1647
+ if (options.weeks) {
1648
+ table += '<th>' + w + '</th>';
1649
+ }
1650
+ }
1651
+
1652
+ table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' +
1653
+ '<div>' + d + '</div>' +
1654
+ '</td>';
1655
+
1656
+ if (start.getDay() === options.dayOfWeekStartPrev) {
1657
+ table += '</tr>';
1658
+ newRow = true;
1659
+ }
1660
+
1661
+ start.setDate(d + 1);
1662
+ }
1663
+ table += '</tbody></table>';
1664
+
1665
+ calendar.html(table);
1666
+
1667
+ mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
1668
+ mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
1669
+
1670
+ // generate timebox
1671
+ time = '';
1672
+ h = '';
1673
+ m = '';
1674
+ line_time = function line_time(h, m) {
1675
+ var now = _xdsoft_datetime.now(), optionDateTime, current_time;
1676
+ now.setHours(h);
1677
+ h = parseInt(now.getHours(), 10);
1678
+ now.setMinutes(m);
1679
+ m = parseInt(now.getMinutes(), 10);
1680
+ optionDateTime = new Date(_xdsoft_datetime.currentTime);
1681
+ optionDateTime.setHours(h);
1682
+ optionDateTime.setMinutes(m);
1683
+ classes = [];
1684
+ if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) {
1685
+ classes.push('xdsoft_disabled');
1686
+ }
1687
+ if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || ((options.disabledMinTime !== false && now.getTime() > _xdsoft_datetime.strtotime(options.disabledMinTime).getTime()) && (options.disabledMaxTime !== false && now.getTime() < _xdsoft_datetime.strtotime(options.disabledMaxTime).getTime()))) {
1688
+ classes.push('xdsoft_disabled');
1689
+ }
1690
+
1691
+ current_time = new Date(_xdsoft_datetime.currentTime);
1692
+ current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
1693
+ current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
1694
+
1695
+ if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && (options.step > 59 || current_time.getMinutes() === parseInt(m, 10))) {
1696
+ if (options.defaultSelect || datetimepicker.data('changed')) {
1697
+ classes.push('xdsoft_current');
1698
+ } else if (options.initTime) {
1699
+ classes.push('xdsoft_init_time');
1700
+ }
1701
+ }
1702
+ if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
1703
+ classes.push('xdsoft_today');
1704
+ }
1705
+ time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + now.dateFormat(options.formatTime) + '</div>';
1706
+ };
1707
+
1708
+ if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
1709
+ for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
1710
+ for (j = 0; j < 60; j += options.step) {
1711
+ h = (i < 10 ? '0' : '') + i;
1712
+ m = (j < 10 ? '0' : '') + j;
1713
+ line_time(h, m);
1714
+ }
1715
+ }
1716
+ } else {
1717
+ for (i = 0; i < options.allowTimes.length; i += 1) {
1718
+ h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
1719
+ m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
1720
+ line_time(h, m);
1721
+ }
1722
+ }
1723
+
1724
+ timebox.html(time);
1725
+
1726
+ opt = '';
1727
+ i = 0;
1728
+
1729
+ for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) {
1730
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + i + '</div>';
1731
+ }
1732
+ yearselect.children().eq(0)
1733
+ .html(opt);
1734
+
1735
+ for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10); i += 1) {
1736
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>';
1737
+ }
1738
+ monthselect.children().eq(0).html(opt);
1739
+ $(datetimepicker)
1740
+ .trigger('generate.xdsoft');
1741
+ }, 10);
1742
+ event.stopPropagation();
1743
+ })
1744
+ .on('afterOpen.xdsoft', function () {
1745
+ if (options.timepicker) {
1746
+ var classType, pheight, height, top;
1747
+ if (timebox.find('.xdsoft_current').length) {
1748
+ classType = '.xdsoft_current';
1749
+ } else if (timebox.find('.xdsoft_init_time').length) {
1750
+ classType = '.xdsoft_init_time';
1751
+ }
1752
+ if (classType) {
1753
+ pheight = timeboxparent[0].clientHeight;
1754
+ height = timebox[0].offsetHeight;
1755
+ top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
1756
+ if ((height - pheight) < top) {
1757
+ top = height - pheight;
1758
+ }
1759
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
1760
+ } else {
1761
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
1762
+ }
1763
+ }
1764
+ });
1765
+
1766
+ timerclick = 0;
1767
+ calendar
1768
+ .on('click.xdsoft', 'td', function (xdevent) {
1769
+ xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
1770
+ timerclick += 1;
1771
+ var $this = $(this),
1772
+ currentTime = _xdsoft_datetime.currentTime;
1773
+
1774
+ if (currentTime === undefined || currentTime === null) {
1775
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1776
+ currentTime = _xdsoft_datetime.currentTime;
1777
+ }
1778
+
1779
+ if ($this.hasClass('xdsoft_disabled')) {
1780
+ return false;
1781
+ }
1782
+
1783
+ currentTime.setDate(1);
1784
+ currentTime.setFullYear($this.data('year'));
1785
+ currentTime.setMonth($this.data('month'));
1786
+ currentTime.setDate($this.data('date'));
1787
+
1788
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
1789
+
1790
+ input.val(_xdsoft_datetime.str());
1791
+
1792
+ if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
1793
+ options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1794
+ }
1795
+
1796
+ datetimepicker.data('changed', true);
1797
+ datetimepicker.trigger('xchange.xdsoft');
1798
+ datetimepicker.trigger('changedatetime.xdsoft');
1799
+ if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !options.timepicker))) && !options.inline) {
1800
+ datetimepicker.trigger('close.xdsoft');
1801
+ }
1802
+ setTimeout(function () {
1803
+ timerclick = 0;
1804
+ }, 200);
1805
+ });
1806
+
1807
+ timebox
1808
+ .on('click.xdsoft', 'div', function (xdevent) {
1809
+ xdevent.stopPropagation();
1810
+ var $this = $(this),
1811
+ currentTime = _xdsoft_datetime.currentTime;
1812
+
1813
+ if (currentTime === undefined || currentTime === null) {
1814
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1815
+ currentTime = _xdsoft_datetime.currentTime;
1816
+ }
1817
+
1818
+ if ($this.hasClass('xdsoft_disabled')) {
1819
+ return false;
1820
+ }
1821
+ currentTime.setHours($this.data('hour'));
1822
+ currentTime.setMinutes($this.data('minute'));
1823
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
1824
+
1825
+ datetimepicker.data('input').val(_xdsoft_datetime.str());
1826
+
1827
+ if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
1828
+ options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1829
+ }
1830
+ datetimepicker.data('changed', true);
1831
+ datetimepicker.trigger('xchange.xdsoft');
1832
+ datetimepicker.trigger('changedatetime.xdsoft');
1833
+ if (options.inline !== true && options.closeOnTimeSelect === true) {
1834
+ datetimepicker.trigger('close.xdsoft');
1835
+ }
1836
+ });
1837
+
1838
+
1839
+ datepicker
1840
+ .on('mousewheel.xdsoft', function (event) {
1841
+ if (!options.scrollMonth) {
1842
+ return true;
1843
+ }
1844
+ if (event.deltaY < 0) {
1845
+ _xdsoft_datetime.nextMonth();
1846
+ } else {
1847
+ _xdsoft_datetime.prevMonth();
1848
+ }
1849
+ return false;
1850
+ });
1851
+
1852
+ input
1853
+ .on('mousewheel.xdsoft', function (event) {
1854
+ if (!options.scrollInput) {
1855
+ return true;
1856
+ }
1857
+ if (!options.datepicker && options.timepicker) {
1858
+ current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
1859
+ if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
1860
+ current_time_index += event.deltaY;
1861
+ }
1862
+ if (timebox.children().eq(current_time_index).length) {
1863
+ timebox.children().eq(current_time_index).trigger('mousedown');
1864
+ }
1865
+ return false;
1866
+ }
1867
+ if (options.datepicker && !options.timepicker) {
1868
+ datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
1869
+ if (input.val) {
1870
+ input.val(_xdsoft_datetime.str());
1871
+ }
1872
+ datetimepicker.trigger('changedatetime.xdsoft');
1873
+ return false;
1874
+ }
1875
+ });
1876
+
1877
+ datetimepicker
1878
+ .on('changedatetime.xdsoft', function (event) {
1879
+ if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
1880
+ var $input = datetimepicker.data('input');
1881
+ options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
1882
+ delete options.value;
1883
+ $input.trigger('change');
1884
+ }
1885
+ })
1886
+ .on('generate.xdsoft', function () {
1887
+ if (options.onGenerate && $.isFunction(options.onGenerate)) {
1888
+ options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1889
+ }
1890
+ if (triggerAfterOpen) {
1891
+ datetimepicker.trigger('afterOpen.xdsoft');
1892
+ triggerAfterOpen = false;
1893
+ }
1894
+ })
1895
+ .on('click.xdsoft', function (xdevent) {
1896
+ xdevent.stopPropagation();
1897
+ });
1898
+
1899
+ current_time_index = 0;
1900
+
1901
+ setPos = function () {
1902
+ var offset = datetimepicker.data('input').offset(), top = offset.top + datetimepicker.data('input')[0].offsetHeight - 1, left = offset.left, position = "absolute", node;
1903
+ if (datetimepicker.data('input').parent().css('direction') == 'rtl')
1904
+ left -= (datetimepicker.outerWidth() - datetimepicker.data('input').outerWidth());
1905
+ if (options.fixed) {
1906
+ top -= $(window).scrollTop();
1907
+ left -= $(window).scrollLeft();
1908
+ position = "fixed";
1909
+ } else {
1910
+ if (top + datetimepicker[0].offsetHeight > $(window).height() + $(window).scrollTop()) {
1911
+ top = offset.top - datetimepicker[0].offsetHeight + 1;
1912
+ }
1913
+ if (top < 0) {
1914
+ top = 0;
1915
+ }
1916
+ if (left + datetimepicker[0].offsetWidth > $(window).width()) {
1917
+ left = $(window).width() - datetimepicker[0].offsetWidth;
1918
+ }
1919
+ }
1920
+
1921
+ node = datetimepicker[0];
1922
+ do {
1923
+ node = node.parentNode;
1924
+ if (window.getComputedStyle(node).getPropertyValue('position') === 'relative' && $(window).width() >= node.offsetWidth) {
1925
+ left = left - (($(window).width() - node.offsetWidth) / 2);
1926
+ break;
1927
+ }
1928
+ } while (node.nodeName !== 'HTML');
1929
+ datetimepicker.css({
1930
+ left: left,
1931
+ top: top,
1932
+ position: position
1933
+ });
1934
+ };
1935
+ datetimepicker
1936
+ .on('open.xdsoft', function (event) {
1937
+ var onShow = true;
1938
+ if (options.onShow && $.isFunction(options.onShow)) {
1939
+ onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
1940
+ }
1941
+ if (onShow !== false) {
1942
+ datetimepicker.show();
1943
+ setPos();
1944
+ $(window)
1945
+ .off('resize.xdsoft', setPos)
1946
+ .on('resize.xdsoft', setPos);
1947
+
1948
+ if (options.closeOnWithoutClick) {
1949
+ $([document.body, window]).on('mousedown.xdsoft', function arguments_callee6() {
1950
+ datetimepicker.trigger('close.xdsoft');
1951
+ $([document.body, window]).off('mousedown.xdsoft', arguments_callee6);
1952
+ });
1953
+ }
1954
+ }
1955
+ })
1956
+ .on('close.xdsoft', function (event) {
1957
+ var onClose = true;
1958
+ mounth_picker
1959
+ .find('.xdsoft_month,.xdsoft_year')
1960
+ .find('.xdsoft_select')
1961
+ .hide();
1962
+ if (options.onClose && $.isFunction(options.onClose)) {
1963
+ onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
1964
+ }
1965
+ if (onClose !== false && !options.opened && !options.inline) {
1966
+ datetimepicker.hide();
1967
+ }
1968
+ event.stopPropagation();
1969
+ })
1970
+ .on('toggle.xdsoft', function (event) {
1971
+ if (datetimepicker.is(':visible')) {
1972
+ datetimepicker.trigger('close.xdsoft');
1973
+ } else {
1974
+ datetimepicker.trigger('open.xdsoft');
1975
+ }
1976
+ })
1977
+ .data('input', input);
1978
+
1979
+ timer = 0;
1980
+ timer1 = 0;
1981
+
1982
+ datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
1983
+ datetimepicker.setOptions(options);
1984
+
1985
+ function getCurrentValue() {
1986
+ var ct = false, time;
1987
+
1988
+ if (options.startDate) {
1989
+ ct = _xdsoft_datetime.strToDate(options.startDate);
1990
+ } else {
1991
+ ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
1992
+ if (ct) {
1993
+ ct = _xdsoft_datetime.strToDateTime(ct);
1994
+ } else if (options.defaultDate) {
1995
+ ct = _xdsoft_datetime.strToDateTime(options.defaultDate);
1996
+ if (options.defaultTime) {
1997
+ time = _xdsoft_datetime.strtotime(options.defaultTime);
1998
+ ct.setHours(time.getHours());
1999
+ ct.setMinutes(time.getMinutes());
2000
+ }
2001
+ }
2002
+ }
2003
+
2004
+ if (ct && _xdsoft_datetime.isValidDate(ct)) {
2005
+ datetimepicker.data('changed', true);
2006
+ } else {
2007
+ ct = '';
2008
+ }
2009
+
2010
+ return ct || 0;
2011
+ }
2012
+
2013
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
2014
+
2015
+ input
2016
+ .data('xdsoft_datetimepicker', datetimepicker)
2017
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function (event) {
2018
+ if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
2019
+ return;
2020
+ }
2021
+ clearTimeout(timer);
2022
+ timer = setTimeout(function () {
2023
+ if (input.is(':disabled')) {
2024
+ return;
2025
+ }
2026
+
2027
+ triggerAfterOpen = true;
2028
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
2029
+
2030
+ datetimepicker.trigger('open.xdsoft');
2031
+ }, 100);
2032
+ })
2033
+ .on('keydown.xdsoft', function (event) {
2034
+ var val = this.value, elementSelector,
2035
+ key = event.which;
2036
+ if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
2037
+ elementSelector = $("input:visible,textarea:visible");
2038
+ datetimepicker.trigger('close.xdsoft');
2039
+ elementSelector.eq(elementSelector.index(this) + 1).focus();
2040
+ return false;
2041
+ }
2042
+ if ([TAB].indexOf(key) !== -1) {
2043
+ datetimepicker.trigger('close.xdsoft');
2044
+ return true;
2045
+ }
2046
+ });
2047
+ };
2048
+ destroyDateTimePicker = function (input) {
2049
+ var datetimepicker = input.data('xdsoft_datetimepicker');
2050
+ if (datetimepicker) {
2051
+ datetimepicker.data('xdsoft_datetime', null);
2052
+ datetimepicker.remove();
2053
+ input
2054
+ .data('xdsoft_datetimepicker', null)
2055
+ .off('.xdsoft');
2056
+ $(window).off('resize.xdsoft');
2057
+ $([window, document.body]).off('mousedown.xdsoft');
2058
+ if (input.unmousewheel) {
2059
+ input.unmousewheel();
2060
+ }
2061
+ }
2062
+ };
2063
+ $(document)
2064
+ .off('keydown.xdsoftctrl keyup.xdsoftctrl')
2065
+ .on('keydown.xdsoftctrl', function (e) {
2066
+ if (e.keyCode === CTRLKEY) {
2067
+ ctrlDown = true;
2068
+ }
2069
+ })
2070
+ .on('keyup.xdsoftctrl', function (e) {
2071
+ if (e.keyCode === CTRLKEY) {
2072
+ ctrlDown = false;
2073
+ }
2074
+ });
2075
+ return this.each(function () {
2076
+ var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
2077
+ if (datetimepicker) {
2078
+ if ($.type(opt) === 'string') {
2079
+ switch (opt) {
2080
+ case 'show':
2081
+ $(this).select().focus();
2082
+ datetimepicker.trigger('open.xdsoft');
2083
+ break;
2084
+ case 'hide':
2085
+ datetimepicker.trigger('close.xdsoft');
2086
+ break;
2087
+ case 'toggle':
2088
+ datetimepicker.trigger('toggle.xdsoft');
2089
+ break;
2090
+ case 'destroy':
2091
+ destroyDateTimePicker($(this));
2092
+ break;
2093
+ case 'reset':
2094
+ this.value = this.defaultValue;
2095
+ if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(Date.parseDate(this.value, options.format))) {
2096
+ datetimepicker.data('changed', false);
2097
+ }
2098
+ datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
2099
+ break;
2100
+ case 'validate':
2101
+ $input = datetimepicker.data('input');
2102
+ $input.trigger('blur.xdsoft');
2103
+ break;
2104
+ }
2105
+ } else {
2106
+ datetimepicker
2107
+ .setOptions(opt);
2108
+ }
2109
+ return 0;
2110
+ }
2111
+ if ($.type(opt) !== 'string') {
2112
+ if (!options.lazyInit || options.open || options.inline) {
2113
+ createDateTimePicker($(this));
2114
+ } else {
2115
+ lazyInit($(this));
2116
+ }
2117
+ }
2118
+ });
2119
+ };
2120
+ $.fn.datetimepicker.defaults = default_options;
2121
+ }(jQuery));
2122
+
2123
+ function HighlightedDate(date, desc, style) {
2124
+ "use strict";
2125
+ this.date = date;
2126
+ this.desc = desc;
2127
+ this.style = style;
2128
+ }
2129
+
2130
+ (function () {
2131
+
2132
+ /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
2133
+ * Licensed under the MIT License (LICENSE.txt).
2134
+ *
2135
+ * Version: 3.1.12
2136
+ *
2137
+ * Requires: jQuery 1.2.2+
2138
+ */
2139
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
2140
+
2141
+ // Parse and Format Library
2142
+ //http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/
2143
+ /*
2144
+ * Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
2145
+ *
2146
+ * This program is free software; you can redistribute it and/or modify it
2147
+ * under the terms of the GNU Lesser General Public License as published by the
2148
+ * Free Software Foundation, version 2.1.
2149
+ *
2150
+ * This program is distributed in the hope that it will be useful, but WITHOUT
2151
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2152
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
2153
+ * details.
2154
+ */
2155
+ Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){if(b=="unixtime"){return parseInt(this.getTime()/1000);}if(Date.formatFunctions[b]==null){Date.createNewFormat(b);}var a=Date.formatFunctions[b];return this[a]();};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var codePrefix="Date.prototype."+funcName+" = function() {return ";var code="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;code+="'"+String.escape(ch)+"' + ";}else{code+=Date.getFormatCode(ch);}}}if(code.length==0){code="\"\"";}else{code=code.substring(0,code.length-3);}eval(codePrefix+code+";}");};Date.getFormatCode=function(a){switch(a){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(a)+"' + ";}};Date.parseDate=function(a,c){if(c=="unixtime"){return new Date(!isNaN(parseInt(a))?parseInt(a)*1000:0);}if(Date.parseFunctions[c]==null){Date.createParser(c);}var b=Date.parseFunctions[c];return Date[b](a);};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;regex+=String.escape(ch);}else{obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){code+=obj.c;}}}}code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$",'i');eval(code);};Date.formatCodeToRegex=function(b,a){switch(b){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+a+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+a+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+a+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+a+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+a+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+a+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0");};Date.prototype.getDayOfYear=function(){var a=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var b=0;b<this.getMonth();++b){a+=Date.daysInMonth[b];}return a+this.getDate();};Date.prototype.getWeekOfYear=function(){var b=this.getDayOfYear()+(4-this.getDay());var a=new Date(this.getFullYear(),0,1);var c=(7-a.getDay()+4);return String.leftPad(Math.ceil((b-c)/7)+1,2,"0");};Date.prototype.isLeapYear=function(){var a=this.getFullYear();return((a&3)==0&&(a%100||(a%400==0&&a)));};Date.prototype.getFirstDayOfMonth=function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a;};Date.prototype.getLastDayOfMonth=function(){var a=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(a<0)?(a+7):a;};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};String.escape=function(a){return a.replace(/('|\\)/g,"\\$1");};String.leftPad=function(d,b,c){var a=new String(d);if(c==null){c=" ";}while(a.length<b){a=c+a;}return a;};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};
2156
+ }());