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
Release Info
Developer | GeorgeJipa |
Plugin | WP Maintenance Mode |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.8.11 to 2.0.0
- assets/css/index.php +2 -0
- assets/css/style-admin.css +133 -0
- assets/css/style.css +403 -0
- assets/images/backgrounds/bg1.jpg +0 -0
- assets/images/backgrounds/bg10.jpg +0 -0
- assets/images/backgrounds/bg10_thumb.jpg +0 -0
- assets/images/backgrounds/bg11.jpg +0 -0
- assets/images/backgrounds/bg11_thumb.jpg +0 -0
- assets/images/backgrounds/bg1_thumb.jpg +0 -0
- assets/images/backgrounds/bg2.jpg +0 -0
- assets/images/backgrounds/bg2_thumb.jpg +0 -0
- assets/images/backgrounds/bg3.jpg +0 -0
- assets/images/backgrounds/bg3_thumb.jpg +0 -0
- assets/images/backgrounds/bg4.jpg +0 -0
- assets/images/backgrounds/bg4_thumb.jpg +0 -0
- assets/images/backgrounds/bg5.jpg +0 -0
- assets/images/backgrounds/bg5_thumb.jpg +0 -0
- assets/images/backgrounds/bg6.jpg +0 -0
- assets/images/backgrounds/bg6_thumb.jpg +0 -0
- assets/images/backgrounds/bg7.jpg +0 -0
- assets/images/backgrounds/bg7_thumb.jpg +0 -0
- assets/images/backgrounds/bg8.jpg +0 -0
- assets/images/backgrounds/bg8_thumb.jpg +0 -0
- assets/images/backgrounds/bg9.jpg +0 -0
- assets/images/backgrounds/bg9_thumb.jpg +0 -0
- assets/images/icn_sprite.png +0 -0
- assets/images/icon-48.png +0 -0
- assets/images/index.php +2 -0
- assets/images/resources/ayoshop.jpg +0 -0
- assets/images/resources/flatui.jpg +0 -0
- assets/images/resources/linecons.jpg +0 -0
- assets/index.php +2 -0
- assets/js/index.php +2 -0
- {js → assets/js}/jquery-ui-timepicker-addon.js +862 -572
- assets/js/jquery.countdown.js +853 -0
- assets/js/jquery.countdown.min.js +6 -0
- assets/js/jquery.plugin.js +344 -0
- assets/js/jquery.plugin.min.js +4 -0
- assets/js/jquery.validate.js +1357 -0
- assets/js/jquery.validate.min.js +4 -0
- assets/js/scripts-admin.js +114 -0
- assets/js/scripts.js +80 -0
- css/jquery.countdown.css +0 -51
- css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_55_c0402a_40x100.png +0 -0
- css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png +0 -0
- css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- css/overcast/images/ui-bg_glass_35_dddddd_1x400.png +0 -0
- css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png +0 -0
- css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png +0 -0
- css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
- css/overcast/images/ui-icons_3383bb_256x240.png +0 -0
- css/overcast/images/ui-icons_454545_256x240.png +0 -0
- css/overcast/images/ui-icons_70b2e1_256x240.png +0 -0
- css/overcast/images/ui-icons_999999_256x240.png +0 -0
- css/overcast/images/ui-icons_fbc856_256x240.png +0 -0
- css/overcast/jquery-ui-1.7.2.custom.css +0 -406
- css/overcast/jquery-ui-1.8.21.custom.css +0 -354
- css/style.css +0 -36
- inc/key-check.php +0 -104
- inc/login-form.php +0 -57
- inc/wp-maintenance-mode-settings.php +0 -471
- includes/classes/index.php +2 -0
- includes/classes/wp-maintenance-mode-admin.php +341 -0
- includes/classes/wp-maintenance-mode.php +689 -0
- includes/functions/helpers.php +55 -0
- includes/functions/index.php +2 -0
- includes/index.php +2 -0
- index.php +2 -30
- js/i18n/jquery-ui-i18n.js +0 -1646
- js/i18n/jquery.ui.datepicker-af.js +0 -23
- js/i18n/jquery.ui.datepicker-ar-DZ.js +0 -23
- js/i18n/jquery.ui.datepicker-ar.js +0 -23
- js/i18n/jquery.ui.datepicker-az.js +0 -23
- js/i18n/jquery.ui.datepicker-bg.js +0 -24
- js/i18n/jquery.ui.datepicker-bs.js +0 -23
- js/i18n/jquery.ui.datepicker-ca.js +0 -23
- js/i18n/jquery.ui.datepicker-cs.js +0 -23
- js/i18n/jquery.ui.datepicker-cy-GB.js +0 -23
- js/i18n/jquery.ui.datepicker-da.js +0 -23
- js/i18n/jquery.ui.datepicker-de.js +0 -23
- js/i18n/jquery.ui.datepicker-el.js +0 -23
- js/i18n/jquery.ui.datepicker-en-AU.js +0 -23
- js/i18n/jquery.ui.datepicker-en-GB.js +0 -23
- js/i18n/jquery.ui.datepicker-en-NZ.js +0 -23
- js/i18n/jquery.ui.datepicker-eo.js +0 -23
- js/i18n/jquery.ui.datepicker-es.js +0 -23
- js/i18n/jquery.ui.datepicker-et.js +0 -23
- js/i18n/jquery.ui.datepicker-eu.js +0 -23
- js/i18n/jquery.ui.datepicker-fa.js +0 -59
- js/i18n/jquery.ui.datepicker-fi.js +0 -23
- js/i18n/jquery.ui.datepicker-fo.js +0 -23
- js/i18n/jquery.ui.datepicker-fr-CH.js +0 -23
- js/i18n/jquery.ui.datepicker-fr.js +0 -25
- js/i18n/jquery.ui.datepicker-gl.js +0 -23
- js/i18n/jquery.ui.datepicker-he.js +0 -23
- js/i18n/jquery.ui.datepicker-hi.js +0 -23
- js/i18n/jquery.ui.datepicker-hr.js +0 -23
- js/i18n/jquery.ui.datepicker-hu.js +0 -23
- js/i18n/jquery.ui.datepicker-hy.js +0 -23
- js/i18n/jquery.ui.datepicker-id.js +0 -23
- js/i18n/jquery.ui.datepicker-is.js +0 -23
- js/i18n/jquery.ui.datepicker-it.js +0 -23
- js/i18n/jquery.ui.datepicker-ja.js +0 -23
- js/i18n/jquery.ui.datepicker-ka.js +0 -21
- js/i18n/jquery.ui.datepicker-kk.js +0 -23
- js/i18n/jquery.ui.datepicker-km.js +0 -23
- js/i18n/jquery.ui.datepicker-ko.js +0 -23
- js/i18n/jquery.ui.datepicker-lb.js +0 -23
- js/i18n/jquery.ui.datepicker-lt.js +0 -23
- js/i18n/jquery.ui.datepicker-lv.js +0 -23
- js/i18n/jquery.ui.datepicker-mk.js +0 -23
- js/i18n/jquery.ui.datepicker-ml.js +0 -23
- js/i18n/jquery.ui.datepicker-ms.js +0 -23
- js/i18n/jquery.ui.datepicker-nl-BE.js +0 -23
- js/i18n/jquery.ui.datepicker-nl.js +0 -23
- js/i18n/jquery.ui.datepicker-no.js +0 -23
- js/i18n/jquery.ui.datepicker-pl.js +0 -23
- js/i18n/jquery.ui.datepicker-pt-BR.js +0 -23
- js/i18n/jquery.ui.datepicker-pt.js +0 -22
- js/i18n/jquery.ui.datepicker-rm.js +0 -21
- js/i18n/jquery.ui.datepicker-ro.js +0 -26
- js/i18n/jquery.ui.datepicker-ru.js +0 -23
- js/i18n/jquery.ui.datepicker-sk.js +0 -23
- js/i18n/jquery.ui.datepicker-sl.js +0 -24
- js/i18n/jquery.ui.datepicker-sq.js +0 -23
- js/i18n/jquery.ui.datepicker-sr-SR.js +0 -23
- js/i18n/jquery.ui.datepicker-sr.js +0 -23
- js/i18n/jquery.ui.datepicker-sv.js +0 -23
- js/i18n/jquery.ui.datepicker-ta.js +0 -23
- js/i18n/jquery.ui.datepicker-th.js +0 -23
- js/i18n/jquery.ui.datepicker-tj.js +0 -23
- js/i18n/jquery.ui.datepicker-tr.js +0 -23
- js/i18n/jquery.ui.datepicker-uk.js +0 -24
- js/i18n/jquery.ui.datepicker-vi.js +0 -23
- js/i18n/jquery.ui.datepicker-zh-CN.js +0 -23
- js/i18n/jquery.ui.datepicker-zh-HK.js +0 -23
- js/i18n/jquery.ui.datepicker-zh-TW.js +0 -23
- js/jquery.countdown-ar.js +0 -12
- js/jquery.countdown-bg.js +0 -12
- js/jquery.countdown-bn.js +0 -0
- js/jquery.countdown-ca.js +0 -12
- js/jquery.countdown-cs.js +0 -15
- js/jquery.countdown-da.js +0 -12
- js/jquery.countdown-de.js +0 -12
- js/jquery.countdown-el.js +0 -12
- js/jquery.countdown-es.js +0 -12
- js/jquery.countdown-et.js +0 -12
- js/jquery.countdown-fa.js +0 -12
- js/jquery.countdown-fi.js +0 -12
- js/jquery.countdown-fr.js +0 -12
- js/jquery.countdown-gl.js +0 -12
- js/jquery.countdown-he.js +0 -12
- js/jquery.countdown-hr.js +0 -15
- js/jquery.countdown-hu.js +0 -12
- js/jquery.countdown-id.js +0 -12
- js/jquery.countdown-it.js +0 -12
- js/jquery.countdown-ja.js +0 -12
- js/jquery.countdown-ko.js +0 -13
- js/jquery.countdown-lt.js +0 -12
- js/jquery.countdown-lv.js +0 -12
- js/jquery.countdown-ms.js +0 -12
- js/jquery.countdown-my.js +0 -12
- js/jquery.countdown-nb.js +0 -12
- js/jquery.countdown-nl.js +0 -12
- js/jquery.countdown-pl.js +0 -17
- js/jquery.countdown-pt-BR.js +0 -12
- js/jquery.countdown-ro.js +0 -12
- js/jquery.countdown-ru.js +0 -18
- js/jquery.countdown-sk.js +0 -15
- js/jquery.countdown-sl.js +0 -12
- js/jquery.countdown-sr-SR.js +0 -15
- js/jquery.countdown-sr.js +0 -15
- js/jquery.countdown-sv.js +0 -12
- js/jquery.countdown-th.js +0 -12
- js/jquery.countdown-tr.js +0 -12
- js/jquery.countdown-uk.js +0 -12
- js/jquery.countdown-vi.js +0 -12
- js/jquery.countdown-zh-CN.js +0 -12
- js/jquery.countdown-zh-TW.js +0 -12
- js/jquery.countdown.js +0 -777
- js/jquery.countdown.min.js +0 -7
- js/jquery.countdown.pack.js +0 -7
- js/wp-maintenance-mode.js +0 -94
- languages/index.php +2 -0
- languages/wp-maintenance-mode-ar_AR.mo +0 -0
- languages/wp-maintenance-mode-ar_AR.po +0 -432
- languages/wp-maintenance-mode-be_BY.mo +0 -0
- languages/wp-maintenance-mode-be_BY.po +0 -268
- languages/wp-maintenance-mode-bn_BD.mo +0 -0
- languages/wp-maintenance-mode-bn_BD.po +0 -276
- languages/wp-maintenance-mode-cs_CZ.mo +0 -0
- languages/wp-maintenance-mode-cs_CZ.po +0 -531
- languages/wp-maintenance-mode-da_DK.mo +0 -0
- languages/wp-maintenance-mode-da_DK.po +0 -323
- languages/wp-maintenance-mode-de_DE.mo +0 -0
- languages/wp-maintenance-mode-de_DE.po +0 -531
- languages/wp-maintenance-mode-en_US.mo +0 -0
- languages/wp-maintenance-mode-en_US.po +390 -0
- languages/wp-maintenance-mode-es_ES.mo +0 -0
- languages/wp-maintenance-mode-es_ES.po +0 -515
- languages/wp-maintenance-mode-fr_FR.mo +0 -0
- languages/wp-maintenance-mode-fr_FR.po +0 -575
- languages/wp-maintenance-mode-hr.mo +0 -0
- languages/wp-maintenance-mode-hr.po +0 -366
- languages/wp-maintenance-mode-it_IT.mo +0 -0
- languages/wp-maintenance-mode-it_IT.po +0 -418
- languages/wp-maintenance-mode-ja.mo +0 -0
- languages/wp-maintenance-mode-ja.po +0 -573
- languages/wp-maintenance-mode-ja_JP.mo +0 -0
- languages/wp-maintenance-mode-ja_JP.po +0 -452
- languages/wp-maintenance-mode-lt_LT.mo +0 -0
- languages/wp-maintenance-mode-lt_LT.po +0 -430
- languages/wp-maintenance-mode-nl_NL.mo +0 -0
- languages/wp-maintenance-mode-nl_NL.po +0 -368
- languages/wp-maintenance-mode-pl_PL.mo +0 -0
- languages/wp-maintenance-mode-pl_PL.po +0 -365
- languages/wp-maintenance-mode-ro_RO.mo +0 -0
- languages/wp-maintenance-mode-ro_RO.po +396 -415
- languages/wp-maintenance-mode-ru_RU.mo +0 -0
- languages/wp-maintenance-mode-ru_RU.po +0 -432
- languages/wp-maintenance-mode-sq_AL.mo +0 -0
- languages/wp-maintenance-mode-sq_AL.po +0 -329
- languages/wp-maintenance-mode-sr_RS.mo +0 -0
- languages/wp-maintenance-mode-sr_RS.po +0 -277
- languages/wp-maintenance-mode-sv_SE.mo +0 -0
- languages/wp-maintenance-mode-sv_SE.po +0 -345
- languages/wp-maintenance-mode-tr_TR.mo +0 -0
- languages/wp-maintenance-mode-tr_TR.po +0 -320
- languages/wp-maintenance-mode-uk.mo +0 -0
- languages/wp-maintenance-mode-uk.po +0 -578
- languages/wp-maintenance-mode-xx_XX.pot +0 -531
- license.txt +0 -674
- readme.md +82 -36
- readme.txt +64 -196
- site.php +0 -141
- styles/af.css +0 -95
- styles/be.css +0 -54
- styles/cm.css +0 -53
- styles/dh.css +0 -108
- styles/es.css +0 -98
- styles/fl.css +0 -138
- styles/fv.css +0 -108
- styles/images/background.jpg +0 -0
- styles/images/bg.gif +0 -0
- styles/images/bg.jpg +0 -0
- styles/images/box-bg.jpg +0 -0
- styles/images/button.png +0 -0
- styles/images/do-not-enter.jpg +0 -0
- styles/images/es/bg-image.png +0 -0
- styles/images/es/bg.jpg +0 -0
- styles/images/es/button.png +0 -0
- styles/images/es/m-mode.png +0 -0
- styles/images/gnome-control_48px.png +0 -0
- styles/images/gnome_key_32px.png +0 -0
- styles/images/headline-af-de_DE.jpg +0 -0
- styles/images/headline-af-en_US.jpg +0 -0
- styles/images/headline-de_DE.jpg +0 -0
- styles/images/headline-en_US.jpg +0 -0
- styles/images/lego-bg.jpg +0 -0
- styles/images/lego-content.jpg +0 -0
- styles/images/leiste.jpg +0 -0
- styles/images/monster.jpg +0 -0
- styles/images/wartungsmodus.jpg +0 -0
- styles/ks.css +0 -64
- styles/ln.css +0 -108
- styles/monster.css +0 -97
- styles/nicki.css +0 -66
- styles/txt.css +0 -65
- styles/wartung-de_DE.swf +0 -0
- styles/wartung-es_ES.swf +0 -0
- styles/wartung.swf +0 -0
- uninstall.php +35 -8
- views/index.php +2 -0
- views/maintenance.php +115 -0
- views/notice.php +5 -0
- views/settings.php +69 -0
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
@@ -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 |
+
}
|
@@ -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 |
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
@@ -1,18 +1,13 @@
|
|
1 |
/*
|
2 |
-
* jQuery
|
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
|
9 |
-
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
|
10 |
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
11 |
*/
|
12 |
|
13 |
-
|
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: "
|
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 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
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,
|
159 |
var tp_inst = new Timepicker(),
|
160 |
inlineSettings = {},
|
161 |
-
|
162 |
-
|
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 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
|
|
208 |
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(
|
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 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
235 |
}
|
236 |
-
tp_inst._defaults.timezoneList = timezoneList;
|
237 |
}
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
248 |
tp_inst.ampm = '';
|
249 |
tp_inst.$input = $input;
|
250 |
|
251 |
-
if (
|
252 |
-
tp_inst.$altInput = $(
|
253 |
-
|
254 |
-
|
255 |
-
|
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(
|
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"' + (
|
361 |
-
'<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + (
|
362 |
|
363 |
-
if (
|
364 |
html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
365 |
|
366 |
-
if(litem
|
367 |
-
for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
|
368 |
gridSize[litem]++;
|
369 |
-
var tmph = $.datepicker.formatTime(
|
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 |
-
|
387 |
-
html += '<
|
|
|
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(
|
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 (
|
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
|
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
|
452 |
}));
|
453 |
-
if (typeof(this.timezone)
|
454 |
-
var
|
455 |
-
|
456 |
-
|
457 |
-
selectLocalTimeZone(tp_inst);
|
458 |
} else {
|
459 |
this.timezone_select.val(this.timezone);
|
460 |
}
|
461 |
} else {
|
462 |
-
if (typeof(this.hour)
|
463 |
-
this.timezone_select.val(o.
|
464 |
} else {
|
465 |
-
|
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()
|
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 |
-
|
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()
|
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 |
-
|
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)
|
666 |
hour = false;
|
667 |
}
|
668 |
-
if (typeof(minute)
|
669 |
minute = false;
|
670 |
}
|
671 |
-
if (typeof(second)
|
672 |
second = false;
|
673 |
}
|
674 |
-
if (typeof(millisec)
|
675 |
millisec = false;
|
676 |
}
|
677 |
-
if (typeof(
|
|
|
|
|
|
|
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 = (
|
699 |
-
|
700 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 (
|
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
|
|
|
|
|
|
|
|
|
|
|
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.
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|
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
|
848 |
-
min: rtl? max
|
849 |
-
max: rtl? min
|
850 |
step: step,
|
851 |
-
slide: function(event, ui) {
|
852 |
-
tp_inst.control.value(tp_inst, $(this), unit, rtl? 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)
|
863 |
-
if(opts
|
864 |
-
if(val !== undefined)
|
865 |
-
return obj.slider(opts, val
|
|
|
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 |
-
|
|
|
876 |
opts.min = max * -1;
|
|
|
877 |
return obj.slider(opts);
|
878 |
}
|
879 |
-
if(typeof(opts)
|
880 |
-
|
|
|
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
|
|
|
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 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
else if(unit
|
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)
|
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
|
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)
|
969 |
-
if (o
|
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)]
|
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}|[
|
1047 |
var ml = match.length;
|
1048 |
switch (match.charAt(0).toLowerCase()) {
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
1082 |
}
|
1083 |
}
|
1084 |
|
1085 |
if (order.h !== -1) {
|
1086 |
-
if (ampm
|
1087 |
resTime.hour = 0; // 12am = 0 hour
|
1088 |
} else {
|
1089 |
-
if (ampm
|
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 |
-
|
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 |
-
|
|
|
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 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
|
|
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 |
-
|
|
|
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}|[
|
1207 |
-
|
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.
|
1228 |
-
case '
|
|
|
|
|
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(
|
1238 |
}
|
1239 |
});
|
1240 |
|
1241 |
-
tmptime = $.trim(tmptime);
|
1242 |
return tmptime;
|
1243 |
};
|
1244 |
|
1245 |
/*
|
1246 |
-
* the bad hack :/ override datepicker so it
|
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 |
-
|