WP Maintenance Mode - Version 2.0.0

Version Description

(02/09/2014) = * Changed design and functionality, new features * Changed multisite behaviour: now you can activate maintenance individually (each blog from the network has it's own maintenance settings) * Removed actions: wm_header, wm_footer, wm_content * Removed filters: wm_header * Removed [loginform] shortcode * Some filters are depreciated (but still available in next 4 releases, after that will be removed) and replaced with new ones: - wm_heading -> wpmm_heading, - wp_maintenance_mode_status_code -> wp_maintenance_mode_status_code - wm_title -> wpmm_meta_title - wm_meta_author -> wpmm_meta_author - wm_meta_description -> wpmm_meta_description - wm_meta_keywords -> wpmm_meta_keywords * Added new filters: - wpmm_backtime - can be used to change the backtime from page header - wpmm_meta_robots - can be used to change Robots Meta Tag option (from General) - wpmm_text - can be used to change Text option (from Design > Content) - wpmm_scripts - can be used to embed new javascripts files - wpmm_styles - can be used to embed new css files - wpmm_search_bots - if you have Bypass for Search Bots option (from General) activated, it can be used to add new bots (useragents) * Removed themes and now we have a "Design" & "Modules" tabs, where the look and functionality of the maintenance page can be changed as you need

Download this release

Release Info

Developer GeorgeJipa
Plugin Icon 128x128 WP Maintenance Mode
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.8.11 to 2.0.0

Files changed (278) hide show
  1. assets/css/index.php +2 -0
  2. assets/css/style-admin.css +133 -0
  3. assets/css/style.css +403 -0
  4. assets/images/backgrounds/bg1.jpg +0 -0
  5. assets/images/backgrounds/bg10.jpg +0 -0
  6. assets/images/backgrounds/bg10_thumb.jpg +0 -0
  7. assets/images/backgrounds/bg11.jpg +0 -0
  8. assets/images/backgrounds/bg11_thumb.jpg +0 -0
  9. assets/images/backgrounds/bg1_thumb.jpg +0 -0
  10. assets/images/backgrounds/bg2.jpg +0 -0
  11. assets/images/backgrounds/bg2_thumb.jpg +0 -0
  12. assets/images/backgrounds/bg3.jpg +0 -0
  13. assets/images/backgrounds/bg3_thumb.jpg +0 -0
  14. assets/images/backgrounds/bg4.jpg +0 -0
  15. assets/images/backgrounds/bg4_thumb.jpg +0 -0
  16. assets/images/backgrounds/bg5.jpg +0 -0
  17. assets/images/backgrounds/bg5_thumb.jpg +0 -0
  18. assets/images/backgrounds/bg6.jpg +0 -0
  19. assets/images/backgrounds/bg6_thumb.jpg +0 -0
  20. assets/images/backgrounds/bg7.jpg +0 -0
  21. assets/images/backgrounds/bg7_thumb.jpg +0 -0
  22. assets/images/backgrounds/bg8.jpg +0 -0
  23. assets/images/backgrounds/bg8_thumb.jpg +0 -0
  24. assets/images/backgrounds/bg9.jpg +0 -0
  25. assets/images/backgrounds/bg9_thumb.jpg +0 -0
  26. assets/images/icn_sprite.png +0 -0
  27. assets/images/icon-48.png +0 -0
  28. assets/images/index.php +2 -0
  29. assets/images/resources/ayoshop.jpg +0 -0
  30. assets/images/resources/flatui.jpg +0 -0
  31. assets/images/resources/linecons.jpg +0 -0
  32. assets/index.php +2 -0
  33. assets/js/index.php +2 -0
  34. {js → assets/js}/jquery-ui-timepicker-addon.js +862 -572
  35. assets/js/jquery.countdown.js +853 -0
  36. assets/js/jquery.countdown.min.js +6 -0
  37. assets/js/jquery.plugin.js +344 -0
  38. assets/js/jquery.plugin.min.js +4 -0
  39. assets/js/jquery.validate.js +1357 -0
  40. assets/js/jquery.validate.min.js +4 -0
  41. assets/js/scripts-admin.js +114 -0
  42. assets/js/scripts.js +80 -0
  43. css/jquery.countdown.css +0 -51
  44. css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  45. css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
  46. css/overcast/images/ui-bg_flat_55_c0402a_40x100.png +0 -0
  47. css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png +0 -0
  48. css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
  49. css/overcast/images/ui-bg_glass_35_dddddd_1x400.png +0 -0
  50. css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png +0 -0
  51. css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png +0 -0
  52. css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
  53. css/overcast/images/ui-icons_3383bb_256x240.png +0 -0
  54. css/overcast/images/ui-icons_454545_256x240.png +0 -0
  55. css/overcast/images/ui-icons_70b2e1_256x240.png +0 -0
  56. css/overcast/images/ui-icons_999999_256x240.png +0 -0
  57. css/overcast/images/ui-icons_fbc856_256x240.png +0 -0
  58. css/overcast/jquery-ui-1.7.2.custom.css +0 -406
  59. css/overcast/jquery-ui-1.8.21.custom.css +0 -354
  60. css/style.css +0 -36
  61. inc/key-check.php +0 -104
  62. inc/login-form.php +0 -57
  63. inc/wp-maintenance-mode-settings.php +0 -471
  64. includes/classes/index.php +2 -0
  65. includes/classes/wp-maintenance-mode-admin.php +341 -0
  66. includes/classes/wp-maintenance-mode.php +689 -0
  67. includes/functions/helpers.php +55 -0
  68. includes/functions/index.php +2 -0
  69. includes/index.php +2 -0
  70. index.php +2 -30
  71. js/i18n/jquery-ui-i18n.js +0 -1646
  72. js/i18n/jquery.ui.datepicker-af.js +0 -23
  73. js/i18n/jquery.ui.datepicker-ar-DZ.js +0 -23
  74. js/i18n/jquery.ui.datepicker-ar.js +0 -23
  75. js/i18n/jquery.ui.datepicker-az.js +0 -23
  76. js/i18n/jquery.ui.datepicker-bg.js +0 -24
  77. js/i18n/jquery.ui.datepicker-bs.js +0 -23
  78. js/i18n/jquery.ui.datepicker-ca.js +0 -23
  79. js/i18n/jquery.ui.datepicker-cs.js +0 -23
  80. js/i18n/jquery.ui.datepicker-cy-GB.js +0 -23
  81. js/i18n/jquery.ui.datepicker-da.js +0 -23
  82. js/i18n/jquery.ui.datepicker-de.js +0 -23
  83. js/i18n/jquery.ui.datepicker-el.js +0 -23
  84. js/i18n/jquery.ui.datepicker-en-AU.js +0 -23
  85. js/i18n/jquery.ui.datepicker-en-GB.js +0 -23
  86. js/i18n/jquery.ui.datepicker-en-NZ.js +0 -23
  87. js/i18n/jquery.ui.datepicker-eo.js +0 -23
  88. js/i18n/jquery.ui.datepicker-es.js +0 -23
  89. js/i18n/jquery.ui.datepicker-et.js +0 -23
  90. js/i18n/jquery.ui.datepicker-eu.js +0 -23
  91. js/i18n/jquery.ui.datepicker-fa.js +0 -59
  92. js/i18n/jquery.ui.datepicker-fi.js +0 -23
  93. js/i18n/jquery.ui.datepicker-fo.js +0 -23
  94. js/i18n/jquery.ui.datepicker-fr-CH.js +0 -23
  95. js/i18n/jquery.ui.datepicker-fr.js +0 -25
  96. js/i18n/jquery.ui.datepicker-gl.js +0 -23
  97. js/i18n/jquery.ui.datepicker-he.js +0 -23
  98. js/i18n/jquery.ui.datepicker-hi.js +0 -23
  99. js/i18n/jquery.ui.datepicker-hr.js +0 -23
  100. js/i18n/jquery.ui.datepicker-hu.js +0 -23
  101. js/i18n/jquery.ui.datepicker-hy.js +0 -23
  102. js/i18n/jquery.ui.datepicker-id.js +0 -23
  103. js/i18n/jquery.ui.datepicker-is.js +0 -23
  104. js/i18n/jquery.ui.datepicker-it.js +0 -23
  105. js/i18n/jquery.ui.datepicker-ja.js +0 -23
  106. js/i18n/jquery.ui.datepicker-ka.js +0 -21
  107. js/i18n/jquery.ui.datepicker-kk.js +0 -23
  108. js/i18n/jquery.ui.datepicker-km.js +0 -23
  109. js/i18n/jquery.ui.datepicker-ko.js +0 -23
  110. js/i18n/jquery.ui.datepicker-lb.js +0 -23
  111. js/i18n/jquery.ui.datepicker-lt.js +0 -23
  112. js/i18n/jquery.ui.datepicker-lv.js +0 -23
  113. js/i18n/jquery.ui.datepicker-mk.js +0 -23
  114. js/i18n/jquery.ui.datepicker-ml.js +0 -23
  115. js/i18n/jquery.ui.datepicker-ms.js +0 -23
  116. js/i18n/jquery.ui.datepicker-nl-BE.js +0 -23
  117. js/i18n/jquery.ui.datepicker-nl.js +0 -23
  118. js/i18n/jquery.ui.datepicker-no.js +0 -23
  119. js/i18n/jquery.ui.datepicker-pl.js +0 -23
  120. js/i18n/jquery.ui.datepicker-pt-BR.js +0 -23
  121. js/i18n/jquery.ui.datepicker-pt.js +0 -22
  122. js/i18n/jquery.ui.datepicker-rm.js +0 -21
  123. js/i18n/jquery.ui.datepicker-ro.js +0 -26
  124. js/i18n/jquery.ui.datepicker-ru.js +0 -23
  125. js/i18n/jquery.ui.datepicker-sk.js +0 -23
  126. js/i18n/jquery.ui.datepicker-sl.js +0 -24
  127. js/i18n/jquery.ui.datepicker-sq.js +0 -23
  128. js/i18n/jquery.ui.datepicker-sr-SR.js +0 -23
  129. js/i18n/jquery.ui.datepicker-sr.js +0 -23
  130. js/i18n/jquery.ui.datepicker-sv.js +0 -23
  131. js/i18n/jquery.ui.datepicker-ta.js +0 -23
  132. js/i18n/jquery.ui.datepicker-th.js +0 -23
  133. js/i18n/jquery.ui.datepicker-tj.js +0 -23
  134. js/i18n/jquery.ui.datepicker-tr.js +0 -23
  135. js/i18n/jquery.ui.datepicker-uk.js +0 -24
  136. js/i18n/jquery.ui.datepicker-vi.js +0 -23
  137. js/i18n/jquery.ui.datepicker-zh-CN.js +0 -23
  138. js/i18n/jquery.ui.datepicker-zh-HK.js +0 -23
  139. js/i18n/jquery.ui.datepicker-zh-TW.js +0 -23
  140. js/jquery.countdown-ar.js +0 -12
  141. js/jquery.countdown-bg.js +0 -12
  142. js/jquery.countdown-bn.js +0 -0
  143. js/jquery.countdown-ca.js +0 -12
  144. js/jquery.countdown-cs.js +0 -15
  145. js/jquery.countdown-da.js +0 -12
  146. js/jquery.countdown-de.js +0 -12
  147. js/jquery.countdown-el.js +0 -12
  148. js/jquery.countdown-es.js +0 -12
  149. js/jquery.countdown-et.js +0 -12
  150. js/jquery.countdown-fa.js +0 -12
  151. js/jquery.countdown-fi.js +0 -12
  152. js/jquery.countdown-fr.js +0 -12
  153. js/jquery.countdown-gl.js +0 -12
  154. js/jquery.countdown-he.js +0 -12
  155. js/jquery.countdown-hr.js +0 -15
  156. js/jquery.countdown-hu.js +0 -12
  157. js/jquery.countdown-id.js +0 -12
  158. js/jquery.countdown-it.js +0 -12
  159. js/jquery.countdown-ja.js +0 -12
  160. js/jquery.countdown-ko.js +0 -13
  161. js/jquery.countdown-lt.js +0 -12
  162. js/jquery.countdown-lv.js +0 -12
  163. js/jquery.countdown-ms.js +0 -12
  164. js/jquery.countdown-my.js +0 -12
  165. js/jquery.countdown-nb.js +0 -12
  166. js/jquery.countdown-nl.js +0 -12
  167. js/jquery.countdown-pl.js +0 -17
  168. js/jquery.countdown-pt-BR.js +0 -12
  169. js/jquery.countdown-ro.js +0 -12
  170. js/jquery.countdown-ru.js +0 -18
  171. js/jquery.countdown-sk.js +0 -15
  172. js/jquery.countdown-sl.js +0 -12
  173. js/jquery.countdown-sr-SR.js +0 -15
  174. js/jquery.countdown-sr.js +0 -15
  175. js/jquery.countdown-sv.js +0 -12
  176. js/jquery.countdown-th.js +0 -12
  177. js/jquery.countdown-tr.js +0 -12
  178. js/jquery.countdown-uk.js +0 -12
  179. js/jquery.countdown-vi.js +0 -12
  180. js/jquery.countdown-zh-CN.js +0 -12
  181. js/jquery.countdown-zh-TW.js +0 -12
  182. js/jquery.countdown.js +0 -777
  183. js/jquery.countdown.min.js +0 -7
  184. js/jquery.countdown.pack.js +0 -7
  185. js/wp-maintenance-mode.js +0 -94
  186. languages/index.php +2 -0
  187. languages/wp-maintenance-mode-ar_AR.mo +0 -0
  188. languages/wp-maintenance-mode-ar_AR.po +0 -432
  189. languages/wp-maintenance-mode-be_BY.mo +0 -0
  190. languages/wp-maintenance-mode-be_BY.po +0 -268
  191. languages/wp-maintenance-mode-bn_BD.mo +0 -0
  192. languages/wp-maintenance-mode-bn_BD.po +0 -276
  193. languages/wp-maintenance-mode-cs_CZ.mo +0 -0
  194. languages/wp-maintenance-mode-cs_CZ.po +0 -531
  195. languages/wp-maintenance-mode-da_DK.mo +0 -0
  196. languages/wp-maintenance-mode-da_DK.po +0 -323
  197. languages/wp-maintenance-mode-de_DE.mo +0 -0
  198. languages/wp-maintenance-mode-de_DE.po +0 -531
  199. languages/wp-maintenance-mode-en_US.mo +0 -0
  200. languages/wp-maintenance-mode-en_US.po +390 -0
  201. languages/wp-maintenance-mode-es_ES.mo +0 -0
  202. languages/wp-maintenance-mode-es_ES.po +0 -515
  203. languages/wp-maintenance-mode-fr_FR.mo +0 -0
  204. languages/wp-maintenance-mode-fr_FR.po +0 -575
  205. languages/wp-maintenance-mode-hr.mo +0 -0
  206. languages/wp-maintenance-mode-hr.po +0 -366
  207. languages/wp-maintenance-mode-it_IT.mo +0 -0
  208. languages/wp-maintenance-mode-it_IT.po +0 -418
  209. languages/wp-maintenance-mode-ja.mo +0 -0
  210. languages/wp-maintenance-mode-ja.po +0 -573
  211. languages/wp-maintenance-mode-ja_JP.mo +0 -0
  212. languages/wp-maintenance-mode-ja_JP.po +0 -452
  213. languages/wp-maintenance-mode-lt_LT.mo +0 -0
  214. languages/wp-maintenance-mode-lt_LT.po +0 -430
  215. languages/wp-maintenance-mode-nl_NL.mo +0 -0
  216. languages/wp-maintenance-mode-nl_NL.po +0 -368
  217. languages/wp-maintenance-mode-pl_PL.mo +0 -0
  218. languages/wp-maintenance-mode-pl_PL.po +0 -365
  219. languages/wp-maintenance-mode-ro_RO.mo +0 -0
  220. languages/wp-maintenance-mode-ro_RO.po +396 -415
  221. languages/wp-maintenance-mode-ru_RU.mo +0 -0
  222. languages/wp-maintenance-mode-ru_RU.po +0 -432
  223. languages/wp-maintenance-mode-sq_AL.mo +0 -0
  224. languages/wp-maintenance-mode-sq_AL.po +0 -329
  225. languages/wp-maintenance-mode-sr_RS.mo +0 -0
  226. languages/wp-maintenance-mode-sr_RS.po +0 -277
  227. languages/wp-maintenance-mode-sv_SE.mo +0 -0
  228. languages/wp-maintenance-mode-sv_SE.po +0 -345
  229. languages/wp-maintenance-mode-tr_TR.mo +0 -0
  230. languages/wp-maintenance-mode-tr_TR.po +0 -320
  231. languages/wp-maintenance-mode-uk.mo +0 -0
  232. languages/wp-maintenance-mode-uk.po +0 -578
  233. languages/wp-maintenance-mode-xx_XX.pot +0 -531
  234. license.txt +0 -674
  235. readme.md +82 -36
  236. readme.txt +64 -196
  237. site.php +0 -141
  238. styles/af.css +0 -95
  239. styles/be.css +0 -54
  240. styles/cm.css +0 -53
  241. styles/dh.css +0 -108
  242. styles/es.css +0 -98
  243. styles/fl.css +0 -138
  244. styles/fv.css +0 -108
  245. styles/images/background.jpg +0 -0
  246. styles/images/bg.gif +0 -0
  247. styles/images/bg.jpg +0 -0
  248. styles/images/box-bg.jpg +0 -0
  249. styles/images/button.png +0 -0
  250. styles/images/do-not-enter.jpg +0 -0
  251. styles/images/es/bg-image.png +0 -0
  252. styles/images/es/bg.jpg +0 -0
  253. styles/images/es/button.png +0 -0
  254. styles/images/es/m-mode.png +0 -0
  255. styles/images/gnome-control_48px.png +0 -0
  256. styles/images/gnome_key_32px.png +0 -0
  257. styles/images/headline-af-de_DE.jpg +0 -0
  258. styles/images/headline-af-en_US.jpg +0 -0
  259. styles/images/headline-de_DE.jpg +0 -0
  260. styles/images/headline-en_US.jpg +0 -0
  261. styles/images/lego-bg.jpg +0 -0
  262. styles/images/lego-content.jpg +0 -0
  263. styles/images/leiste.jpg +0 -0
  264. styles/images/monster.jpg +0 -0
  265. styles/images/wartungsmodus.jpg +0 -0
  266. styles/ks.css +0 -64
  267. styles/ln.css +0 -108
  268. styles/monster.css +0 -97
  269. styles/nicki.css +0 -66
  270. styles/txt.css +0 -65
  271. styles/wartung-de_DE.swf +0 -0
  272. styles/wartung-es_ES.swf +0 -0
  273. styles/wartung.swf +0 -0
  274. uninstall.php +35 -8
  275. views/index.php +2 -0
  276. views/maintenance.php +115 -0
  277. views/notice.php +5 -0
  278. views/settings.php +69 -0
assets/css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/css/style-admin.css ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h2.wpmm-title {
2
+ background: url('../images/icon-48.png') no-repeat left center;
3
+ line-height: 42px;
4
+ margin-bottom: 30px;
5
+ height: 48px;
6
+ padding-left: 55px;
7
+ }
8
+
9
+ /* WRAP*/
10
+ .wpmm-wrapper {
11
+ display: table;
12
+ width: 100%;
13
+ }
14
+
15
+ .wpmm-wrapper #content {
16
+ min-width: 800px;
17
+ }
18
+
19
+ .wpmm-wrapper #sidebar {
20
+ padding: 0 0 0 20px;
21
+ width: 280px;
22
+ }
23
+
24
+ .wpmm-wrapper #sidebar .sidebar_box {
25
+ background: none repeat scroll 0 0 #fff;
26
+ border: 1px solid #e5e5e5;
27
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
28
+ min-width: 255px;
29
+ line-height: 1;
30
+ margin-bottom: 20px;
31
+ padding: 0;
32
+ }
33
+
34
+ .wpmm-wrapper #sidebar .sidebar_box h3 {
35
+ margin: 0;
36
+ padding: 8px 12px;
37
+ border-bottom: 1px solid #ececec;
38
+ }
39
+
40
+ .wpmm-wrapper #sidebar .sidebar_box .inside {
41
+ margin: 6px 0 0;
42
+ font-size: 13px;
43
+ line-height: 1.4em;
44
+ padding: 0 12px 12px;
45
+ }
46
+
47
+ .wpmm-wrapper .wrapper-cell {
48
+ display: table-cell;
49
+ }
50
+
51
+ .wpmm-wrapper .hidden {
52
+ display: none;
53
+ }
54
+
55
+ /* TABS */
56
+ .nav-tab-wrapper {
57
+ border-bottom: 1px solid #ccc;
58
+ padding-bottom: 0;
59
+ padding-left: 10px;
60
+ }
61
+
62
+ .nav-tab-wrapper a {
63
+ font-size: 15px;
64
+ font-weight: 700;
65
+ line-height: 24px;
66
+ padding: 6px 10px;
67
+ }
68
+
69
+ /* TABS CONTENT */
70
+ .tabs-content {
71
+ margin-top: 20px;
72
+ padding-left: 10px;
73
+ }
74
+
75
+ .tabs-content .wp-color-result {
76
+ margin-bottom: -2px;
77
+ }
78
+
79
+ .tabs-content ul.bg_list {
80
+ float: left;
81
+ }
82
+
83
+ .tabs-content ul.bg_list li {
84
+ float: left;
85
+ margin-right: 7px;
86
+ opacity: 0.4;
87
+ }
88
+
89
+ .tabs-content ul.bg_list li.active {
90
+ opacity: 1;
91
+ }
92
+
93
+ .tabs-content ul.bg_list li input {
94
+ display: none;
95
+ }
96
+
97
+ .tabs-content .countdown_details input {
98
+ width: 70px;
99
+ }
100
+
101
+ .tabs-content .countdown_details .margin_left {
102
+ margin-left: 30px;
103
+ }
104
+
105
+ /* SIDEBARS */
106
+ #sidebar .subscribe_box form {
107
+ margin-top: 10px;
108
+ }
109
+
110
+ #sidebar .subscribe_box input {
111
+ height: 40px;
112
+ width: 100%;
113
+ }
114
+
115
+ #sidebar .subscribe_box .button {
116
+ height: 30px;
117
+ margin-top: 10px;
118
+ width: 100%;
119
+ }
120
+
121
+ #sidebar .news_box ul, .info_box ul {
122
+ margin-top: 10px;
123
+ margin-bottom: -5px;
124
+ }
125
+
126
+ #sidebar .resources_box ul {
127
+ margin-top: 10px;
128
+ margin-bottom: -15px;
129
+ }
130
+
131
+ #sidebar .resources_box li {
132
+ margin-bottom: 10px;
133
+ }
assets/css/style.css ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
2
+ margin: 0;
3
+ padding: 0;
4
+ border: 0;
5
+ font-size: 100%;
6
+ font: inherit;
7
+ vertical-align: baseline;
8
+ text-decoration: none;
9
+ }
10
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
11
+ display: block;
12
+ }
13
+ body {
14
+ line-height: 1;
15
+ }
16
+ ol, ul {
17
+ list-style: none;
18
+ }
19
+ blockquote, q {
20
+ display: block;
21
+ width: 400px;
22
+ margin: 0 auto;
23
+ text-align: left;
24
+ position: relative;
25
+ font-style: italic;
26
+ }
27
+ blockquote:before, blockquote:after, q:before, q:after {
28
+ content: '"';
29
+ content: none;
30
+ }
31
+ table {
32
+ border-collapse: collapse;
33
+ border-spacing: 0;
34
+ }
35
+ em, i {
36
+ font-style: italic;
37
+ }
38
+ del {
39
+ text-decoration: line-through;
40
+ }
41
+ strong, b {
42
+ font-weight: bold;
43
+ }
44
+ ol {
45
+ width: 500px;
46
+ margin: 0 auto;
47
+ text-align: left;
48
+ }
49
+ ol li {
50
+ list-style-type:decimal;
51
+ }
52
+ ul {
53
+ width: 500px;
54
+ margin: 0 auto;
55
+ text-align: left;
56
+ }
57
+ ul li {
58
+ list-style:disc;
59
+ }
60
+ a {
61
+ color: inherit;
62
+ text-decoration: underline;
63
+ }
64
+ body, html {
65
+ min-height: 100%;
66
+ /*height: 100%;*/
67
+ }
68
+ body {
69
+ background-color: #fff;
70
+ color: #1b1f23;
71
+ font-family: Helvetica Neue, Arial, sans-serif;
72
+ }
73
+ .wrap {
74
+ width: 500xp;
75
+ margin: 100px auto 0;
76
+ text-align: center;
77
+ }
78
+ .wrap h1 {
79
+ font-size: 30px;
80
+ font-weight: 700;
81
+ margin: 0 0 90px;
82
+ }
83
+ .wrap h2 {
84
+ font-size: 24px;
85
+ font-weight: 400;
86
+ line-height: 45px;
87
+ margin: 0 0 80px;
88
+ }
89
+ .wrap h3 {
90
+ font-size: 24px;
91
+ font-weight: 400px;
92
+ margin: 0 0 45px;
93
+ }
94
+
95
+ .wrap .author_link {
96
+ margin-top: 15px;
97
+ color: #616161;
98
+ margin: 0 0 50px;
99
+ }
100
+
101
+ .wrap .author_link a {
102
+ color: #000;
103
+ }
104
+
105
+ /**
106
+ * COUNTDOWN
107
+ **/
108
+ .wrap .countdown {
109
+ margin: 0 0 85px;
110
+ }
111
+ .wrap .countdown span {
112
+ font-size: 30px;
113
+ }
114
+
115
+ /**
116
+ * SUBSCRIBE FORM
117
+ **/
118
+ .wrap form.subscribe_form {
119
+ width: 465px;
120
+ margin: 0 0 75px;
121
+ display: inline-block;
122
+ border: 3px solid #e0e0e0;
123
+ box-sizing: border-box;
124
+ }
125
+ .wrap form.subscribe_form input {
126
+ margin: 0;
127
+ outline: 0;
128
+ border: 0;
129
+ float: left;
130
+ font-size: 18px;
131
+ padding: 20px 25px;
132
+ box-sizing: content-box;
133
+ }
134
+ .wrap form.subscribe_form input[type="text"] {
135
+ width: 245px;
136
+ }
137
+ .wrap form.subscribe_form input[type="submit"] {
138
+ background: #000;
139
+ color: #fff;
140
+ float: right;
141
+ cursor: pointer;
142
+ padding: 20px 30px;
143
+ border-left: 3px solid #e0e0e0;
144
+ }
145
+ .wrap form.subscribe_form input[type="submit"]:hover {
146
+ background: #fff;
147
+ color: #000;
148
+ border-left: 3px solid #e0e0e0;
149
+
150
+ }
151
+ .wrap form.subscribe_form input[type="submit"]:active {
152
+ background: #1e1e1e;
153
+ color: #fff;
154
+ }
155
+ .wrap form.subscribe_form .error {
156
+ color: red;
157
+ }
158
+ .wrap form.subscribe_form label.error {
159
+ display: none !important;
160
+ }
161
+
162
+ /**
163
+ * SOCIAL NETWORKS
164
+ **/
165
+ .wrap .social {
166
+ margin: 0 0 70px;
167
+ }
168
+ .wrap .social a {
169
+ width: 22px;
170
+ height: 22px;
171
+ margin: 0 0 20px 60px;
172
+ background-image: url('../images/icn_sprite.png');
173
+ background-repeat: no-repeat;
174
+ display: inline-block;
175
+ text-indent: -999em;
176
+ }
177
+ .wrap .social a:first-of-type {
178
+ margin: 0 0 20px 0;
179
+ }
180
+ .wrap .social .git {
181
+ background-position: 0 0;
182
+ }
183
+ .wrap .social .fb {
184
+ background-position: -240px 0;
185
+ }
186
+ .wrap .social .tw {
187
+ background-position: -162px 0px;
188
+ }
189
+ .wrap .social .rss {
190
+ background-position: -402px 0;
191
+ }
192
+ .wrap .social .mail {
193
+ background-position: -560px 0;
194
+ }
195
+ .wrap .social .pin {
196
+ background-position: -322px 0;
197
+ }
198
+ .wrap .social .dribbble {
199
+ background-position: -82px 0;
200
+ }
201
+ .wrap .social .gplus {
202
+ background-position: -486px 0;
203
+ }
204
+
205
+ /**
206
+ * CONTACT FORM
207
+ **/
208
+ .wrap .contact_us {
209
+ color: #000;
210
+ border: 3px solid #000;
211
+ font-size: 18px;
212
+ padding: 15px 40px;
213
+ display: inline-block;
214
+ margin: 0 0 70px;
215
+ }
216
+
217
+ .wrap .contact_us:hover {
218
+ background: #000;
219
+ color: #fff;
220
+
221
+ }
222
+
223
+ .contact_us {
224
+ text-decoration: none;
225
+ }
226
+
227
+ .contact {
228
+ position: fixed;
229
+ display: none;
230
+ top: 0;
231
+ bottom: 0;
232
+ left: 0;
233
+ right: 0;
234
+ background: rgba(27, 31, 35, 0.95);
235
+ }
236
+ .contact label.error {
237
+ color: red;
238
+ float: left;
239
+ font-size: 11px;
240
+ padding-top: 10px;
241
+ }
242
+ .contact .form {
243
+ width: 520px;
244
+ text-align: center;
245
+ padding: 40px;
246
+ background: #f9f9f9;
247
+ box-sizing: border-box;
248
+ margin: 100px auto;
249
+ transition: 0.2s transform ease-in-out;
250
+ }
251
+ .contact .form input, .contact .form textarea {
252
+ padding: 15px 20px;
253
+ margin: 0;
254
+ outline: 0;
255
+ width: 100%;
256
+ background: #f9f9f9;
257
+ border: 3px solid #e0e0e0;
258
+ font-size: 18px;
259
+ font-family: Helvetica Neue, Arial, sans-serif;
260
+ box-sizing: border-box;
261
+ resize: none;
262
+ }
263
+ .contact .form textarea {
264
+ height: 175px;
265
+ padding: 20px;
266
+ }
267
+ .contact .form input[type="text"]::-webkit-input-placeholder, .contact .form textarea::-webkit-input-placeholder {
268
+ color: #dadada;
269
+ }
270
+ .contact .form input[type="text"]::-moz-input-placeholder, .contact .form textarea::-moz-input-placeholder {
271
+ color: #dadada;
272
+ }
273
+ .contact .form input[type="text"]::-ms-input-placeholder, .contact .form textarea::-ms-input-placeholder {
274
+ color: #dadada;
275
+ }
276
+ .contact .form .col {
277
+ width: 205px;
278
+ margin: 0 0 30px;
279
+ display: inline-block;
280
+ float: left;
281
+ }
282
+ .contact .form .col.last {
283
+ float: right;
284
+ }
285
+ .contact .form .submit {
286
+ margin: 30px 0 0;
287
+ text-align: center;
288
+ clear: left;
289
+ }
290
+ .contact .form .submit input {
291
+ cursor: pointer;
292
+ display: inline-block;
293
+ background: #1b1f24;
294
+ color: #fff;
295
+ border: 0;
296
+ padding: 20px 45px;
297
+ width: auto;
298
+ }
299
+
300
+ /*======= MOVE ANIMATION =======*/
301
+ .contact .move_top {
302
+ transform: perspective(1000px) translateY(-200px);
303
+ }
304
+ .contact .move_bottom {
305
+ transform: perspective(1000px) translateY(0);
306
+
307
+ }
308
+
309
+ /*======= ZOOM ANIMATION =======*/
310
+ .contact .zoom {
311
+ transform: perspective(1000px) scale(0.5);
312
+ transition: 0.3s transform ease-in-out;
313
+ }
314
+ .contact .zoomed {
315
+ transform: perspective(1000px) scale(1);
316
+ }
317
+
318
+ /*======= FOLD ANIMATION =======*/
319
+ .contact .fold {
320
+ transform: perspective(1000px) rotateY(90deg);
321
+ }
322
+ .contact .unfold {
323
+ transform: perspective(1000px) rotateY(0);
324
+ }
325
+
326
+ /**
327
+ * EDITS WHEN HAVE BACKGROUND CLASS
328
+ **/
329
+ .background {
330
+ background: url('../images/backgrounds/bg1.jpg') no-repeat center top fixed;
331
+ background-size: cover;
332
+ }
333
+ .background .countdown span {
334
+ color: #fff;
335
+ }
336
+ .background form.subscribe_form input[type="submit"] {
337
+ color: #000;
338
+ background: #fff;
339
+ }
340
+ .background form.subscribe_form input[type="text"] {
341
+ background: transparent;
342
+ color: #fff;
343
+ }
344
+ .background form.subscribe_form input.error[type="text"] {
345
+ color: red;
346
+ }
347
+ .background form.subscribe_form input[type="text"]::-webkit-input-placeholder {
348
+ color: #fff;
349
+ }
350
+ .background form.subscribe_form input[type="text"]::-moz-input-placeholder {
351
+ color: #fff;
352
+ }
353
+ .background form.subscribe_form input[type="text"]::-ms-input-placeholder {
354
+ color: #fff;
355
+ }
356
+ .background .contact_us {
357
+ color: #fff;
358
+ border-color: #fff;
359
+ }
360
+
361
+ /**
362
+ * MEDIA QUERIES (RESPONSIVE)
363
+ **/
364
+ @media only screen and (max-width: 550px) {
365
+ .wrap {
366
+ width: 90%;
367
+ margin: 50px auto 0;
368
+ }
369
+ .wrap h1 {
370
+ margin: 0 0 50px;
371
+ }
372
+ .wrap h2, .wrap h3 {
373
+ font-size: 18px;
374
+ }
375
+ .wrap form {
376
+ box-sizing: border-box;
377
+ width: 100%;
378
+ }
379
+ .wrap form input {
380
+ box-sizing: border-box;
381
+ }
382
+ .wrap form input[type="text"], .wrap form input[type="submit"] {
383
+ width: 100%;
384
+ }
385
+ .wrap .contact_us {
386
+ margin: 0 0 50px;
387
+ }
388
+ .contact .form {
389
+ width: 90%;
390
+ }
391
+ .contact .form p.col {
392
+ width: 100%;
393
+ }
394
+ .contact .form input[type="submit"] {
395
+ width: 100%;
396
+ }
397
+ ul, ol {
398
+ width: 80%;
399
+ }
400
+ blockquote, q {
401
+ width: 70%;
402
+ }
403
+ }
assets/images/backgrounds/bg1.jpg ADDED
Binary file
assets/images/backgrounds/bg10.jpg ADDED
Binary file
assets/images/backgrounds/bg10_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg11.jpg ADDED
Binary file
assets/images/backgrounds/bg11_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg1_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg2.jpg ADDED
Binary file
assets/images/backgrounds/bg2_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg3.jpg ADDED
Binary file
assets/images/backgrounds/bg3_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg4.jpg ADDED
Binary file
assets/images/backgrounds/bg4_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg5.jpg ADDED
Binary file
assets/images/backgrounds/bg5_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg6.jpg ADDED
Binary file
assets/images/backgrounds/bg6_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg7.jpg ADDED
Binary file
assets/images/backgrounds/bg7_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg8.jpg ADDED
Binary file
assets/images/backgrounds/bg8_thumb.jpg ADDED
Binary file
assets/images/backgrounds/bg9.jpg ADDED
Binary file
assets/images/backgrounds/bg9_thumb.jpg ADDED
Binary file
assets/images/icn_sprite.png ADDED
Binary file
assets/images/icon-48.png ADDED
Binary file
assets/images/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/images/resources/ayoshop.jpg ADDED
Binary file
assets/images/resources/flatui.jpg ADDED
Binary file
assets/images/resources/linecons.jpg ADDED
Binary file
assets/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/js/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
{js → assets/js}/jquery-ui-timepicker-addon.js RENAMED
@@ -1,18 +1,13 @@
1
  /*
2
- * jQuery timepicker addon
3
  * By: Trent Richardson [http://trentrichardson.com]
4
- * Version 1.2
5
- * Last Modified: 02/02/2013
6
  *
7
  * Copyright 2013 Trent Richardson
8
- * You may use this project under MIT or GPL licenses.
9
- * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
10
  * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
11
  */
12
 
13
- /*jslint evil: true, white: false, undef: false, nomen: false */
14
-
15
- (function($) {
16
 
17
  /*
18
  * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
@@ -27,7 +22,7 @@
27
  */
28
  $.extend($.ui, {
29
  timepicker: {
30
- version: "1.2"
31
  }
32
  });
33
 
@@ -37,7 +32,7 @@
37
  * Settings for (groups of) time pickers are maintained in an instance object,
38
  * allowing multiple different settings on the same page.
39
  */
40
- var Timepicker = function() {
41
  this.regional = []; // Available regional settings, indexed by language code
42
  this.regional[''] = { // Default regional settings
43
  currentText: 'Now',
@@ -52,54 +47,62 @@
52
  minuteText: 'Minute',
53
  secondText: 'Second',
54
  millisecText: 'Millisecond',
 
55
  timezoneText: 'Time Zone',
56
  isRTL: false
57
  };
58
  this._defaults = { // Global defaults for all the datetime picker instances
59
  showButtonPanel: true,
60
  timeOnly: false,
61
- showHour: true,
62
- showMinute: true,
63
- showSecond: false,
64
- showMillisec: false,
65
- showTimezone: false,
 
 
66
  showTime: true,
67
  stepHour: 1,
68
  stepMinute: 1,
69
  stepSecond: 1,
70
  stepMillisec: 1,
 
71
  hour: 0,
72
  minute: 0,
73
  second: 0,
74
  millisec: 0,
 
75
  timezone: null,
76
- useLocalTimezone: false,
77
- defaultTimezone: "+0000",
78
  hourMin: 0,
79
  minuteMin: 0,
80
  secondMin: 0,
81
  millisecMin: 0,
 
82
  hourMax: 23,
83
  minuteMax: 59,
84
  secondMax: 59,
85
  millisecMax: 999,
 
86
  minDateTime: null,
87
  maxDateTime: null,
 
 
88
  onSelect: null,
89
  hourGrid: 0,
90
  minuteGrid: 0,
91
  secondGrid: 0,
92
  millisecGrid: 0,
 
93
  alwaysSetTime: true,
94
  separator: ' ',
95
  altFieldTimeOnly: true,
96
  altTimeFormat: null,
97
  altSeparator: null,
98
  altTimeSuffix: null,
 
99
  pickerTimeFormat: null,
100
  pickerTimeSuffix: null,
101
  showTimepicker: true,
102
- timezoneIso8601: false,
103
  timezoneList: null,
104
  addSliderAccess: false,
105
  sliderAccessArgs: null,
@@ -119,35 +122,41 @@
119
  minute_slider: null,
120
  second_slider: null,
121
  millisec_slider: null,
 
122
  timezone_select: null,
 
 
123
  hour: 0,
124
  minute: 0,
125
  second: 0,
126
  millisec: 0,
 
127
  timezone: null,
128
- defaultTimezone: "+0000",
129
  hourMinOriginal: null,
130
  minuteMinOriginal: null,
131
  secondMinOriginal: null,
132
  millisecMinOriginal: null,
 
133
  hourMaxOriginal: null,
134
  minuteMaxOriginal: null,
135
  secondMaxOriginal: null,
136
  millisecMaxOriginal: null,
 
137
  ampm: '',
138
  formattedDate: '',
139
  formattedTime: '',
140
  formattedDateTime: '',
141
  timezoneList: null,
142
- units: ['hour','minute','second','millisec'],
 
143
  control: null,
144
 
145
  /*
146
  * Override the default settings for all instances of the time picker.
147
- * @param settings object - the new settings to use as defaults (anonymous object)
148
- * @return the manager object
149
  */
150
- setDefaults: function(settings) {
151
  extendRemove(this._defaults, settings || {});
152
  return this;
153
  },
@@ -155,14 +164,14 @@
155
  /*
156
  * Create a new Timepicker instance
157
  */
158
- _newInst: function($input, o) {
159
  var tp_inst = new Timepicker(),
160
  inlineSettings = {},
161
- fns = {},
162
- overrides, i;
163
 
164
  for (var attrName in this._defaults) {
165
- if(this._defaults.hasOwnProperty(attrName)){
166
  var attrValue = $input.attr('time:' + attrName);
167
  if (attrValue) {
168
  try {
@@ -173,87 +182,104 @@
173
  }
174
  }
175
  }
176
- overrides = {
177
- beforeShow: function (input, dp_inst) {
178
- if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
179
- return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);
180
- }
181
- },
182
- onChangeMonthYear: function (year, month, dp_inst) {
183
- // Update the time as well : this prevents the time from disappearing from the $input field.
184
- tp_inst._updateDateTime(dp_inst);
185
- if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
186
- tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
187
- }
188
- },
189
- onClose: function (dateText, dp_inst) {
190
- if (tp_inst.timeDefined === true && $input.val() !== '') {
191
- tp_inst._updateDateTime(dp_inst);
192
- }
193
- if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
194
- tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);
195
- }
196
- }
197
- };
198
- for (i in overrides) {
199
- if (overrides.hasOwnProperty(i)) {
200
- fns[i] = o[i] || null;
201
- }
202
- }
203
- tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, overrides, {
204
- evnts:fns,
205
- timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
206
- });
207
- tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) {
 
 
208
  return val.toUpperCase();
209
  });
210
- tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) {
211
  return val.toUpperCase();
212
  });
213
 
 
 
 
 
 
 
214
  // controlType is string - key to our this._controls
215
- if(typeof(tp_inst._defaults.controlType) === 'string'){
216
- if($.fn[tp_inst._defaults.controlType] === undefined){
217
  tp_inst._defaults.controlType = 'select';
218
  }
219
  tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
220
  }
221
  // controlType is an object and must implement create, options, value methods
222
- else{
223
  tp_inst.control = tp_inst._defaults.controlType;
224
  }
225
 
226
- if (tp_inst._defaults.timezoneList === null) {
227
- var timezoneList = ['-1200', '-1100', '-1000', '-0930', '-0900', '-0800', '-0700', '-0600', '-0500', '-0430', '-0400', '-0330', '-0300', '-0200', '-0100', '+0000',
228
- '+0100', '+0200', '+0300', '+0330', '+0400', '+0430', '+0500', '+0530', '+0545', '+0600', '+0630', '+0700', '+0800', '+0845', '+0900', '+0930',
229
- '+1000', '+1030', '+1100', '+1130', '+1200', '+1245', '+1300', '+1400'];
230
-
231
- if (tp_inst._defaults.timezoneIso8601) {
232
- timezoneList = $.map(timezoneList, function(val) {
233
- return val == '+0000' ? 'Z' : (val.substring(0, 3) + ':' + val.substring(3));
234
- });
 
 
235
  }
236
- tp_inst._defaults.timezoneList = timezoneList;
237
  }
238
-
239
- tp_inst.timezone = tp_inst._defaults.timezone;
240
- tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin? tp_inst._defaults.hourMin :
241
- tp_inst._defaults.hour > tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
242
- tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin :
243
- tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
244
- tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin :
245
- tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second;
246
- tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin :
247
- tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
 
 
 
 
 
248
  tp_inst.ampm = '';
249
  tp_inst.$input = $input;
250
 
251
- if (o.altField) {
252
- tp_inst.$altInput = $(o.altField).css({
253
- cursor: 'pointer'
254
- }).focus(function() {
255
- $input.trigger("focus");
256
- });
 
 
 
257
  }
258
 
259
  if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
@@ -276,7 +302,7 @@
276
  if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
277
  tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
278
  }
279
- tp_inst.$input.bind('focus', function() {
280
  tp_inst._onFocus();
281
  });
282
 
@@ -286,7 +312,7 @@
286
  /*
287
  * add our sliders to the calendar
288
  */
289
- _addTimePicker: function(dp_inst) {
290
  var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
291
 
292
  this.timeDefined = this._parseTime(currDT);
@@ -297,7 +323,7 @@
297
  /*
298
  * parse the time string from input value or _setTime
299
  */
300
- _parseTime: function(timeString, withDate) {
301
  if (!this.inst) {
302
  this.inst = $.datepicker._getInst(this.$input[0]);
303
  }
@@ -331,49 +357,54 @@
331
  /*
332
  * generate and inject html for timepicker into ui datepicker
333
  */
334
- _injectTimePicker: function() {
335
  var $dp = this.inst.dpDiv,
336
  o = this.inst.settings,
337
  tp_inst = this,
338
  litem = '',
339
  uitem = '',
 
340
  max = {},
341
  gridSize = {},
342
- size = null;
 
 
343
 
344
  // Prevent displaying twice
345
  if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
346
  var noDisplay = ' style="display:none;"',
347
- html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
348
  '<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
349
 
350
  // Create the markup
351
- for(var i=0,l=this.units.length; i<l; i++){
352
  litem = this.units[i];
353
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
 
 
354
  // Added by Peter Medeiros:
355
  // - Figure out what the hour/minute/second max should be based on the step values.
356
  // - Example: if stepMinute is 15, then minMax is 45.
357
- max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
358
  gridSize[litem] = 0;
359
 
360
- html += '<dt class="ui_tpicker_'+ litem +'_label"' + ((o['show'+uitem]) ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
361
- '<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + ((o['show'+uitem]) ? '' : noDisplay) + '></div>';
362
 
363
- if (o['show'+uitem] && o[litem+'Grid'] > 0) {
364
  html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
365
 
366
- if(litem == 'hour'){
367
- for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
368
  gridSize[litem]++;
369
- var tmph = $.datepicker.formatTime(useAmpm(o.pickerTimeFormat || o.timeFormat)? 'hht':'HH', {hour:h}, o);
370
- html += '<td data-for="'+litem+'">' + tmph + '</td>';
371
  }
372
  }
373
- else{
374
- for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) {
375
  gridSize[litem]++;
376
- html += '<td data-for="'+litem+'">' + ((m < 10) ? '0' : '') + m + '</td>';
377
  }
378
  }
379
 
@@ -383,8 +414,9 @@
383
  }
384
 
385
  // Timezone
386
- html += '<dt class="ui_tpicker_timezone_label"' + ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
387
- html += '<dd class="ui_tpicker_timezone" ' + ((o.showTimezone) ? '' : noDisplay) + '></dd>';
 
388
 
389
  // Create the elements from string
390
  html += '</dl></div>';
@@ -397,45 +429,45 @@
397
  }
398
 
399
  // add sliders, adjust grids, add events
400
- for(var i=0,l=tp_inst.units.length; i<l; i++){
401
  litem = tp_inst.units[i];
402
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
 
403
 
404
  // add the slider
405
- tp_inst[litem+'_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_'+litem+'_slider'), litem, tp_inst[litem], o[litem+'Min'], max[litem], o['step'+uitem]);
406
 
407
  // adjust the grid and add click event
408
- if (o['show'+uitem] && o[litem+'Grid'] > 0) {
409
- size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']);
410
- $tp.find('.ui_tpicker_'+litem+' table').css({
411
  width: size + "%",
412
- marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"),
413
- marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0',
414
  borderCollapse: 'collapse'
415
- }).find("td").click(function(e){
416
  var $t = $(this),
417
  h = $t.html(),
418
- n = parseInt(h.replace(/[^0-9]/g),10),
419
  ap = h.replace(/[^apm]/ig),
420
  f = $t.data('for'); // loses scope, so we use data-for
421
 
422
- if(f == 'hour'){
423
- if(ap.indexOf('p') !== -1 && n < 12){
424
  n += 12;
425
  }
426
- else{
427
- if(ap.indexOf('a') !== -1 && n === 12){
428
  n = 0;
429
  }
430
  }
431
  }
432
 
433
- tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n);
434
 
435
  tp_inst._onTimeChange();
436
  tp_inst._onSelectHandler();
437
- })
438
- .css({
439
  cursor: 'pointer',
440
  width: (100 / gridSize[litem]) + '%',
441
  textAlign: 'center',
@@ -447,26 +479,24 @@
447
  // Add timezone options
448
  this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
449
  $.fn.append.apply(this.timezone_select,
450
- $.map(o.timezoneList, function(val, idx) {
451
- return $("<option />").val(typeof val == "object" ? val.value : val).text(typeof val == "object" ? val.label : val);
452
  }));
453
- if (typeof(this.timezone) != "undefined" && this.timezone !== null && this.timezone !== "") {
454
- var local_date = new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12);
455
- var local_timezone = $.timepicker.timeZoneOffsetString(local_date);
456
- if (local_timezone == this.timezone) {
457
- selectLocalTimeZone(tp_inst);
458
  } else {
459
  this.timezone_select.val(this.timezone);
460
  }
461
  } else {
462
- if (typeof(this.hour) != "undefined" && this.hour !== null && this.hour !== "") {
463
- this.timezone_select.val(o.defaultTimezone);
464
  } else {
465
- selectLocalTimeZone(tp_inst);
466
  }
467
  }
468
- this.timezone_select.change(function() {
469
- tp_inst._defaults.useLocalTimezone = false;
470
  tp_inst._onTimeChange();
471
  tp_inst._onSelectHandler();
472
  });
@@ -494,21 +524,21 @@
494
  rtl = this._defaults.isRTL;
495
  sliderAccessArgs.isRTL = rtl;
496
 
497
- setTimeout(function() { // fix for inline mode
498
  if ($tp.find('.ui-slider-access').length === 0) {
499
  $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
500
 
501
  // fix any grids since sliders are shorter
502
  var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
503
  if (sliderAccessWidth) {
504
- $tp.find('table:visible').each(function() {
505
  var $g = $(this),
506
  oldWidth = $g.outerWidth(),
507
- oldMarginLeft = $g.css(rtl? 'marginRight':'marginLeft').toString().replace('%', ''),
508
  newWidth = oldWidth - sliderAccessWidth,
509
  newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',
510
  css = { width: newWidth, marginRight: 0, marginLeft: 0 };
511
- css[rtl? 'marginRight':'marginLeft'] = newMarginLeft;
512
  $g.css(css);
513
  });
514
  }
@@ -517,6 +547,7 @@
517
  }
518
  // end slideAccess integration
519
 
 
520
  }
521
  },
522
 
@@ -524,7 +555,7 @@
524
  * This function tries to limit the ability to go outside the
525
  * min/max date range
526
  */
527
- _limitMinMaxDateTime: function(dp_inst, adjustSliders) {
528
  var o = this._defaults,
529
  dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
530
 
@@ -536,14 +567,15 @@
536
  var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
537
  minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
538
 
539
- if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null) {
540
  this.hourMinOriginal = o.hourMin;
541
  this.minuteMinOriginal = o.minuteMin;
542
  this.secondMinOriginal = o.secondMin;
543
  this.millisecMinOriginal = o.millisecMin;
 
544
  }
545
 
546
- if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
547
  this._defaults.hourMin = minDateTime.getHours();
548
  if (this.hour <= this._defaults.hourMin) {
549
  this.hour = this._defaults.hourMin;
@@ -554,26 +586,36 @@
554
  if (this.second <= this._defaults.secondMin) {
555
  this.second = this._defaults.secondMin;
556
  this._defaults.millisecMin = minDateTime.getMilliseconds();
557
- } else {
558
- if (this.millisec < this._defaults.millisecMin) {
559
  this.millisec = this._defaults.millisecMin;
 
 
 
 
 
 
560
  }
 
561
  this._defaults.millisecMin = this.millisecMinOriginal;
 
562
  }
563
  } else {
564
  this._defaults.secondMin = this.secondMinOriginal;
565
  this._defaults.millisecMin = this.millisecMinOriginal;
 
566
  }
567
  } else {
568
  this._defaults.minuteMin = this.minuteMinOriginal;
569
  this._defaults.secondMin = this.secondMinOriginal;
570
  this._defaults.millisecMin = this.millisecMinOriginal;
 
571
  }
572
  } else {
573
  this._defaults.hourMin = this.hourMinOriginal;
574
  this._defaults.minuteMin = this.minuteMinOriginal;
575
  this._defaults.secondMin = this.secondMinOriginal;
576
  this._defaults.millisecMin = this.millisecMinOriginal;
 
577
  }
578
  }
579
 
@@ -581,14 +623,15 @@
581
  var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
582
  maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
583
 
584
- if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null) {
585
  this.hourMaxOriginal = o.hourMax;
586
  this.minuteMaxOriginal = o.minuteMax;
587
  this.secondMaxOriginal = o.secondMax;
588
  this.millisecMaxOriginal = o.millisecMax;
 
589
  }
590
 
591
- if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()) {
592
  this._defaults.hourMax = maxDateTime.getHours();
593
  if (this.hour >= this._defaults.hourMax) {
594
  this.hour = this._defaults.hourMax;
@@ -599,51 +642,104 @@
599
  if (this.second >= this._defaults.secondMax) {
600
  this.second = this._defaults.secondMax;
601
  this._defaults.millisecMax = maxDateTime.getMilliseconds();
602
- } else {
603
- if (this.millisec > this._defaults.millisecMax) {
604
  this.millisec = this._defaults.millisecMax;
 
 
 
 
 
 
605
  }
 
606
  this._defaults.millisecMax = this.millisecMaxOriginal;
 
607
  }
608
  } else {
609
  this._defaults.secondMax = this.secondMaxOriginal;
610
  this._defaults.millisecMax = this.millisecMaxOriginal;
 
611
  }
612
  } else {
613
  this._defaults.minuteMax = this.minuteMaxOriginal;
614
  this._defaults.secondMax = this.secondMaxOriginal;
615
  this._defaults.millisecMax = this.millisecMaxOriginal;
 
616
  }
617
  } else {
618
  this._defaults.hourMax = this.hourMaxOriginal;
619
  this._defaults.minuteMax = this.minuteMaxOriginal;
620
  this._defaults.secondMax = this.secondMaxOriginal;
621
  this._defaults.millisecMax = this.millisecMaxOriginal;
 
622
  }
623
  }
624
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
625
  if (adjustSliders !== undefined && adjustSliders === true) {
626
  var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
627
  minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
628
  secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
629
- millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10);
 
630
 
631
  if (this.hour_slider) {
632
- this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax });
633
  this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
634
  }
635
  if (this.minute_slider) {
636
- this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax });
637
  this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
638
  }
639
  if (this.second_slider) {
640
- this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax });
641
  this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
642
  }
643
  if (this.millisec_slider) {
644
- this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax });
645
  this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
646
  }
 
 
 
 
647
  }
648
 
649
  },
@@ -652,29 +748,36 @@
652
  * when a slider moves, set the internal time...
653
  * on time change is also called when the time is updated in the text field
654
  */
655
- _onTimeChange: function() {
 
 
 
656
  var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
657
  minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
658
  second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,
659
  millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,
 
660
  timezone = (this.timezone_select) ? this.timezone_select.val() : false,
661
  o = this._defaults,
662
  pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
663
  pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;
664
 
665
- if (typeof(hour) == 'object') {
666
  hour = false;
667
  }
668
- if (typeof(minute) == 'object') {
669
  minute = false;
670
  }
671
- if (typeof(second) == 'object') {
672
  second = false;
673
  }
674
- if (typeof(millisec) == 'object') {
675
  millisec = false;
676
  }
677
- if (typeof(timezone) == 'object') {
 
 
 
678
  timezone = false;
679
  }
680
 
@@ -690,14 +793,26 @@
690
  if (millisec !== false) {
691
  millisec = parseInt(millisec, 10);
692
  }
 
 
 
 
 
 
693
 
694
  var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
695
 
696
  // If the update was done in the input field, the input field should not be updated.
697
  // If the update was done using the sliders, update the input field.
698
- var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec
699
- || (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
700
- || ((this.timezone === null && timezone != this.defaultTimezone) || (this.timezone !== null && timezone != this.timezone)));
 
 
 
 
 
 
701
 
702
  if (hasChanged) {
703
 
@@ -713,6 +828,9 @@
713
  if (millisec !== false) {
714
  this.millisec = millisec;
715
  }
 
 
 
716
  if (timezone !== false) {
717
  this.timezone = timezone;
718
  }
@@ -723,17 +841,17 @@
723
 
724
  this._limitMinMaxDateTime(this.inst, true);
725
  }
726
- if (useAmpm(o.timeFormat)) {
727
  this.ampm = ampm;
728
  }
729
 
730
  // Updates the time within the timepicker
731
  this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
732
  if (this.$timeObj) {
733
- if(pickerTimeFormat === o.timeFormat){
734
  this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
735
  }
736
- else{
737
  this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
738
  }
739
  }
@@ -741,6 +859,7 @@
741
  this.timeDefined = true;
742
  if (hasChanged) {
743
  this._updateDateTime();
 
744
  }
745
  },
746
 
@@ -748,7 +867,7 @@
748
  * call custom onSelect.
749
  * bind to sliders slidestop, and grid click.
750
  */
751
- _onSelectHandler: function() {
752
  var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
753
  var inputEl = this.$input ? this.$input[0] : null;
754
  if (onSelect && inputEl) {
@@ -759,9 +878,14 @@
759
  /*
760
  * update our input with the new date time..
761
  */
762
- _updateDateTime: function(dp_inst) {
763
  dp_inst = this.inst || dp_inst;
764
- var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
 
 
 
 
 
765
  dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
766
  formatCfg = $.datepicker._getFormatConfig(dp_inst),
767
  timeAvailable = dt !== null && this.timeDefined;
@@ -769,10 +893,10 @@
769
  var formattedDateTime = this.formattedDate;
770
 
771
  // if a slider was changed but datepicker doesn't have a value yet, set it
772
- if(dp_inst.lastVal==""){
773
- dp_inst.currentYear=dp_inst.selectedYear;
774
- dp_inst.currentMonth=dp_inst.selectedMonth;
775
- dp_inst.currentDay=dp_inst.selectedDay;
776
  }
777
 
778
  /*
@@ -784,9 +908,9 @@
784
  // return;
785
  //}
786
 
787
- if (this._defaults.timeOnly === true) {
788
  formattedDateTime = this.formattedTime;
789
- } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
790
  formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
791
  }
792
 
@@ -794,20 +918,34 @@
794
 
795
  if (!this._defaults.showTimepicker) {
796
  this.$input.val(this.formattedDate);
797
- } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) {
798
  this.$altInput.val(this.formattedTime);
799
  this.$input.val(this.formattedDate);
800
  } else if (this.$altInput) {
801
  this.$input.val(formattedDateTime);
802
  var altFormattedDateTime = '',
803
- altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator,
804
- altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
805
-
806
- if (this._defaults.altFormat) altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
807
- else altFormattedDateTime = this.formattedDate;
808
- if (altFormattedDateTime) altFormattedDateTime += altSeparator;
809
- if (this._defaults.altTimeFormat) altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
810
- else altFormattedDateTime += this.formattedTime + altTimeSuffix;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
  this.$altInput.val(altFormattedDateTime);
812
  } else {
813
  this.$input.val(formattedDateTime);
@@ -816,13 +954,13 @@
816
  this.$input.trigger("change");
817
  },
818
 
819
- _onFocus: function() {
820
  if (!this.$input.val() && this._defaults.defaultValue) {
821
  this.$input.val(this._defaults.defaultValue);
822
  var inst = $.datepicker._getInst(this.$input.get(0)),
823
  tp_inst = $.datepicker._get(inst, 'timepicker');
824
  if (tp_inst) {
825
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
826
  try {
827
  $.datepicker._updateDatepicker(inst);
828
  } catch (err) {
@@ -840,29 +978,30 @@
840
  _controls: {
841
  // slider methods
842
  slider: {
843
- create: function(tp_inst, obj, unit, val, min, max, step){
844
  var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60
845
  return obj.prop('slide', null).slider({
846
  orientation: "horizontal",
847
- value: rtl? val*-1 : val,
848
- min: rtl? max*-1 : min,
849
- max: rtl? min*-1 : max,
850
  step: step,
851
- slide: function(event, ui) {
852
- tp_inst.control.value(tp_inst, $(this), unit, rtl? ui.value*-1:ui.value);
853
  tp_inst._onTimeChange();
854
  },
855
- stop: function(event, ui) {
856
  tp_inst._onSelectHandler();
857
  }
858
  });
859
  },
860
- options: function(tp_inst, obj, unit, opts, val){
861
- if(tp_inst._defaults.isRTL){
862
- if(typeof(opts) == 'string'){
863
- if(opts == 'min' || opts == 'max'){
864
- if(val !== undefined)
865
- return obj.slider(opts, val*-1);
 
866
  return Math.abs(obj.slider(opts));
867
  }
868
  return obj.slider(opts);
@@ -870,68 +1009,75 @@
870
  var min = opts.min,
871
  max = opts.max;
872
  opts.min = opts.max = null;
873
- if(min !== undefined)
874
  opts.max = min * -1;
875
- if(max !== undefined)
 
876
  opts.min = max * -1;
 
877
  return obj.slider(opts);
878
  }
879
- if(typeof(opts) == 'string' && val !== undefined)
880
- return obj.slider(opts, val);
 
881
  return obj.slider(opts);
882
  },
883
- value: function(tp_inst, obj, unit, val){
884
- if(tp_inst._defaults.isRTL){
885
- if(val !== undefined)
886
- return obj.slider('value', val*-1);
 
887
  return Math.abs(obj.slider('value'));
888
  }
889
- if(val !== undefined)
890
  return obj.slider('value', val);
 
891
  return obj.slider('value');
892
  }
893
  },
894
  // select methods
895
  select: {
896
- create: function(tp_inst, obj, unit, val, min, max, step){
897
- var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
898
- ul = tp_inst._defaults.timeFormat.indexOf('t') !== -1? 'toLowerCase':'toUpperCase',
899
- m = 0;
900
-
901
- for(var i=min; i<=max; i+=step){
902
- sel += '<option value="'+ i +'"'+ (i==val? ' selected':'') +'>';
903
- if(unit == 'hour' && useAmpm(tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat))
904
- sel += $.datepicker.formatTime("hh TT", {hour:i}, tp_inst._defaults);
905
- else if(unit == 'millisec' || i >= 10) sel += i;
906
- else sel += '0'+ i.toString();
907
  sel += '</option>';
908
  }
909
  sel += '</select>';
910
 
911
  obj.children('select').remove();
912
 
913
- $(sel).appendTo(obj).change(function(e){
914
  tp_inst._onTimeChange();
915
  tp_inst._onSelectHandler();
916
  });
917
 
918
  return obj;
919
  },
920
- options: function(tp_inst, obj, unit, opts, val){
921
  var o = {},
922
  $t = obj.children('select');
923
- if(typeof(opts) == 'string'){
924
- if(val === undefined)
925
  return $t.data(opts);
 
926
  o[opts] = val;
927
  }
928
- else o = opts;
929
  return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
930
  },
931
- value: function(tp_inst, obj, unit, val){
932
  var $t = obj.children('select');
933
- if(val !== undefined)
934
  return $t.val(val);
 
935
  return $t.val();
936
  }
937
  }
@@ -941,19 +1087,19 @@
941
 
942
  $.fn.extend({
943
  /*
944
- * shorthand just to use timepicker..
945
  */
946
- timepicker: function(o) {
947
  o = o || {};
948
  var tmp_args = Array.prototype.slice.call(arguments);
949
 
950
- if (typeof o == 'object') {
951
  tmp_args[0] = $.extend(o, {
952
  timeOnly: true
953
  });
954
  }
955
 
956
- return $(this).each(function() {
957
  $.fn.datetimepicker.apply($(this), tmp_args);
958
  });
959
  },
@@ -961,21 +1107,21 @@
961
  /*
962
  * extend timepicker to datepicker
963
  */
964
- datetimepicker: function(o) {
965
  o = o || {};
966
  var tmp_args = arguments;
967
 
968
- if (typeof(o) == 'string') {
969
- if (o == 'getDate') {
970
  return $.fn.datepicker.apply($(this[0]), tmp_args);
971
  } else {
972
- return this.each(function() {
973
  var $t = $(this);
974
  $t.datepicker.apply($t, tmp_args);
975
  });
976
  }
977
  } else {
978
- return this.each(function() {
979
  var $t = $(this);
980
  $t.datepicker($.timepicker._newInst($t, o)._defaults);
981
  });
@@ -986,11 +1132,12 @@
986
  /*
987
  * Public Utility to parse date and time
988
  */
989
- $.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
990
  var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
991
  if (parseRes.timeObj) {
992
  var t = parseRes.timeObj;
993
  parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
 
994
  }
995
 
996
  return parseRes.date;
@@ -999,14 +1146,15 @@
999
  /*
1000
  * Public utility to parse time
1001
  */
1002
- $.datepicker.parseTime = function(timeFormat, timeString, options) {
1003
- var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {});
 
1004
 
1005
  // Strict parse requires the timeString to match the timeFormat exactly
1006
- var strictParse = function(f, s, o){
1007
 
1008
  // pattern for standard and localized AM/PM markers
1009
- var getPatternAmpm = function(amNames, pmNames) {
1010
  var markers = [];
1011
  if (amNames) {
1012
  $.merge(markers, amNames);
@@ -1014,27 +1162,28 @@
1014
  if (pmNames) {
1015
  $.merge(markers, pmNames);
1016
  }
1017
- markers = $.map(markers, function(val) {
1018
  return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
1019
  });
1020
  return '(' + markers.join('|') + ')?';
1021
  };
1022
 
1023
  // figure out position of time elements.. cause js cant do named captures
1024
- var getFormatPositions = function(timeFormat) {
1025
- var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z|'.*?')/g),
1026
  orders = {
1027
  h: -1,
1028
  m: -1,
1029
  s: -1,
1030
  l: -1,
 
1031
  t: -1,
1032
  z: -1
1033
  };
1034
 
1035
  if (finds) {
1036
  for (var i = 0; i < finds.length; i++) {
1037
- if (orders[finds[i].toString().charAt(0)] == -1) {
1038
  orders[finds[i].toString().charAt(0)] = i + 1;
1039
  }
1040
  }
@@ -1043,17 +1192,25 @@
1043
  };
1044
 
1045
  var regstr = '^' + f.toString()
1046
- .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[lz]|'.*?')/g, function (match) {
1047
  var ml = match.length;
1048
  switch (match.charAt(0).toLowerCase()) {
1049
- case 'h': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1050
- case 'm': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1051
- case 's': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1052
- case 'l': return '(\\d?\\d?\\d)';
1053
- case 'z': return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
1054
- case 't': return getPatternAmpm(o.amNames, o.pmNames);
1055
- default: // literal escaped in quotes
1056
- return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?';
 
 
 
 
 
 
 
 
1057
  }
1058
  })
1059
  .replace(/\s/g, '\\s?') +
@@ -1068,7 +1225,8 @@
1068
  hour: 0,
1069
  minute: 0,
1070
  second: 0,
1071
- millisec: 0
 
1072
  };
1073
 
1074
  if (treg) {
@@ -1078,15 +1236,15 @@
1078
  resTime.ampm = '';
1079
  } else {
1080
  ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
1081
- resTime.ampm = o[ampm == 'AM' ? 'amNames' : 'pmNames'][0];
1082
  }
1083
  }
1084
 
1085
  if (order.h !== -1) {
1086
- if (ampm == 'AM' && treg[order.h] == '12') {
1087
  resTime.hour = 0; // 12am = 0 hour
1088
  } else {
1089
- if (ampm == 'PM' && treg[order.h] != '12') {
1090
  resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
1091
  } else {
1092
  resTime.hour = Number(treg[order.h]);
@@ -1103,31 +1261,11 @@
1103
  if (order.l !== -1) {
1104
  resTime.millisec = Number(treg[order.l]);
1105
  }
 
 
 
1106
  if (order.z !== -1 && treg[order.z] !== undefined) {
1107
- var tz = treg[order.z].toUpperCase();
1108
- switch (tz.length) {
1109
- case 1:
1110
- // Z
1111
- tz = o.timezoneIso8601 ? 'Z' : '+0000';
1112
- break;
1113
- case 5:
1114
- // +hhmm
1115
- if (o.timezoneIso8601) {
1116
- tz = tz.substring(1) == '0000' ? 'Z' : tz.substring(0, 3) + ':' + tz.substring(3);
1117
- }
1118
- break;
1119
- case 6:
1120
- // +hh:mm
1121
- if (!o.timezoneIso8601) {
1122
- tz = tz == 'Z' || tz.substring(1) == '00:00' ? '+0000' : tz.replace(/:/, '');
1123
- } else {
1124
- if (tz.substring(1) == '00:00') {
1125
- tz = 'Z';
1126
- }
1127
- }
1128
- break;
1129
- }
1130
- resTime.timezone = tz;
1131
  }
1132
 
1133
 
@@ -1137,15 +1275,15 @@
1137
  };// end strictParse
1138
 
1139
  // First try JS Date, if that fails, use strictParse
1140
- var looseParse = function(f,s,o){
1141
- try{
1142
- var d = new Date('2012-01-01 '+ s);
1143
- if(isNaN(d.getTime())){
1144
- d = new Date('2012-01-01T'+ s);
1145
- if(isNaN(d.getTime())){
1146
- d = new Date('01/01/2012 '+ s);
1147
- if(isNaN(d.getTime())){
1148
- throw "Unable to parse time with native Date: "+ s;
1149
  }
1150
  }
1151
  }
@@ -1155,36 +1293,38 @@
1155
  minute: d.getMinutes(),
1156
  second: d.getSeconds(),
1157
  millisec: d.getMilliseconds(),
1158
- timezone: $.timepicker.timeZoneOffsetString(d)
 
1159
  };
1160
  }
1161
- catch(err){
1162
- try{
1163
- return strictParse(f,s,o);
1164
  }
1165
- catch(err2){
1166
- $.timepicker.log("Unable to parse \ntimeString: "+ s +"\ntimeFormat: "+ f);
1167
  }
1168
  }
1169
  return false;
1170
  }; // end looseParse
1171
 
1172
- if(typeof o.parse === "function"){
1173
- return o.parse(timeFormat, timeString, o)
1174
  }
1175
- if(o.parse === 'loose'){
1176
  return looseParse(timeFormat, timeString, o);
1177
  }
1178
  return strictParse(timeFormat, timeString, o);
1179
  };
1180
 
1181
- /*
1182
- * Public utility to format the time
1183
- * format = string format of the time
1184
- * time = a {}, not a Date() for timezones
1185
- * options = essentially the regional[].. amNames, pmNames, ampm
1186
- */
1187
- $.datepicker.formatTime = function(format, time, options) {
 
1188
  options = options || {};
1189
  options = $.extend({}, $.timepicker._defaults, options);
1190
  time = $.extend({
@@ -1192,7 +1332,8 @@
1192
  minute: 0,
1193
  second: 0,
1194
  millisec: 0,
1195
- timezone: '+0000'
 
1196
  }, time);
1197
 
1198
  var tmptime = format,
@@ -1203,8 +1344,8 @@
1203
  ampmName = options.pmNames[0];
1204
  }
1205
 
1206
- tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[lz]|('.*?'|".*?"))/g, function(match) {
1207
- switch (match) {
1208
  case 'HH':
1209
  return ('0' + hour).slice(-2);
1210
  case 'H':
@@ -1223,35 +1364,38 @@
1223
  return time.second;
1224
  case 'l':
1225
  return ('00' + time.millisec).slice(-3);
 
 
1226
  case 'z':
1227
- return time.timezone === null? options.defaultTimezone : time.timezone;
1228
- case 'T':
 
 
1229
  return ampmName.charAt(0).toUpperCase();
1230
- case 'TT':
1231
  return ampmName.toUpperCase();
1232
  case 't':
1233
  return ampmName.charAt(0).toLowerCase();
1234
  case 'tt':
1235
  return ampmName.toLowerCase();
1236
  default:
1237
- return match.replace(/\'/g, "") || "'";
1238
  }
1239
  });
1240
 
1241
- tmptime = $.trim(tmptime);
1242
  return tmptime;
1243
  };
1244
 
1245
  /*
1246
- * the bad hack :/ override datepicker so it doesnt close on select
1247
  // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
1248
  */
1249
  $.datepicker._base_selectDate = $.datepicker._selectDate;
1250
- $.datepicker._selectDate = function(id, dateStr) {
1251
  var inst = this._getInst($(id)[0]),
1252
  tp_inst = this._get(inst, 'timepicker');
1253
 
1254
-