active_admin_datetimepicker 0.7.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +44 -0
- data/Gemfile +5 -4
- data/README.md +37 -2
- data/active_admin_datetimepicker.gemspec +1 -3
- data/app/assets/javascripts/active_admin_datetimepicker.js +25 -0
- data/app/assets/javascripts/vendor/jquery.datetimepicker.full.js +2911 -0
- data/app/assets/stylesheets/active_admin_datetimepicker.scss +2 -0
- data/app/assets/stylesheets/vendor/jquery.datetimepicker.css +568 -0
- data/config/initializers/active_admin_datetimepicker.rb +0 -4
- data/lib/active_admin_datetimepicker/base.rb +7 -7
- data/lib/active_admin_datetimepicker/version.rb +1 -1
- data/lib/active_admin_datetimepicker.rb +0 -1
- data/package.json +35 -0
- metadata +16 -40
- data/.travis.yml +0 -20
- data/app/assets/javascripts/active_admin_datetimepicker.js.coffee +0 -26
@@ -0,0 +1,568 @@
|
|
1
|
+
.xdsoft_datetimepicker {
|
2
|
+
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
|
3
|
+
background: #fff;
|
4
|
+
border-bottom: 1px solid #bbb;
|
5
|
+
border-left: 1px solid #ccc;
|
6
|
+
border-right: 1px solid #ccc;
|
7
|
+
border-top: 1px solid #ccc;
|
8
|
+
color: #333;
|
9
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
10
|
+
padding: 8px;
|
11
|
+
padding-left: 0;
|
12
|
+
padding-top: 2px;
|
13
|
+
position: absolute;
|
14
|
+
z-index: 9999;
|
15
|
+
-moz-box-sizing: border-box;
|
16
|
+
box-sizing: border-box;
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
.xdsoft_datetimepicker.xdsoft_rtl {
|
20
|
+
padding: 8px 0 8px 8px;
|
21
|
+
}
|
22
|
+
|
23
|
+
.xdsoft_datetimepicker iframe {
|
24
|
+
position: absolute;
|
25
|
+
left: 0;
|
26
|
+
top: 0;
|
27
|
+
width: 75px;
|
28
|
+
height: 210px;
|
29
|
+
background: transparent;
|
30
|
+
border: none;
|
31
|
+
}
|
32
|
+
|
33
|
+
/*For IE8 or lower*/
|
34
|
+
.xdsoft_datetimepicker button {
|
35
|
+
border: none !important;
|
36
|
+
}
|
37
|
+
|
38
|
+
.xdsoft_noselect {
|
39
|
+
-webkit-touch-callout: none;
|
40
|
+
-webkit-user-select: none;
|
41
|
+
-khtml-user-select: none;
|
42
|
+
-moz-user-select: none;
|
43
|
+
-ms-user-select: none;
|
44
|
+
-o-user-select: none;
|
45
|
+
user-select: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
.xdsoft_noselect::selection { background: transparent }
|
49
|
+
.xdsoft_noselect::-moz-selection { background: transparent }
|
50
|
+
|
51
|
+
.xdsoft_datetimepicker.xdsoft_inline {
|
52
|
+
display: inline-block;
|
53
|
+
position: static;
|
54
|
+
box-shadow: none;
|
55
|
+
}
|
56
|
+
|
57
|
+
.xdsoft_datetimepicker * {
|
58
|
+
-moz-box-sizing: border-box;
|
59
|
+
box-sizing: border-box;
|
60
|
+
padding: 0;
|
61
|
+
margin: 0;
|
62
|
+
}
|
63
|
+
|
64
|
+
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
|
65
|
+
display: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
|
69
|
+
display: block;
|
70
|
+
}
|
71
|
+
|
72
|
+
.xdsoft_datetimepicker .xdsoft_datepicker {
|
73
|
+
width: 224px;
|
74
|
+
float: left;
|
75
|
+
margin-left: 8px;
|
76
|
+
}
|
77
|
+
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker {
|
78
|
+
float: right;
|
79
|
+
margin-right: 8px;
|
80
|
+
margin-left: 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
|
84
|
+
width: 256px;
|
85
|
+
}
|
86
|
+
|
87
|
+
.xdsoft_datetimepicker .xdsoft_timepicker {
|
88
|
+
width: 58px;
|
89
|
+
float: left;
|
90
|
+
text-align: center;
|
91
|
+
margin-left: 8px;
|
92
|
+
margin-top: 0;
|
93
|
+
}
|
94
|
+
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker {
|
95
|
+
float: right;
|
96
|
+
margin-right: 8px;
|
97
|
+
margin-left: 0;
|
98
|
+
}
|
99
|
+
|
100
|
+
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
|
101
|
+
margin-top: 8px;
|
102
|
+
margin-bottom: 3px
|
103
|
+
}
|
104
|
+
|
105
|
+
.xdsoft_datetimepicker .xdsoft_monthpicker {
|
106
|
+
position: relative;
|
107
|
+
text-align: center;
|
108
|
+
}
|
109
|
+
|
110
|
+
.xdsoft_datetimepicker .xdsoft_label i,
|
111
|
+
.xdsoft_datetimepicker .xdsoft_prev,
|
112
|
+
.xdsoft_datetimepicker .xdsoft_next,
|
113
|
+
.xdsoft_datetimepicker .xdsoft_today_button {
|
114
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlw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QDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
|
115
|
+
}
|
116
|
+
|
117
|
+
.xdsoft_datetimepicker .xdsoft_label i {
|
118
|
+
opacity: 0.5;
|
119
|
+
background-position: -92px -19px;
|
120
|
+
display: inline-block;
|
121
|
+
width: 9px;
|
122
|
+
height: 20px;
|
123
|
+
vertical-align: middle;
|
124
|
+
}
|
125
|
+
|
126
|
+
.xdsoft_datetimepicker .xdsoft_prev {
|
127
|
+
float: left;
|
128
|
+
background-position: -20px 0;
|
129
|
+
}
|
130
|
+
.xdsoft_datetimepicker .xdsoft_today_button {
|
131
|
+
float: left;
|
132
|
+
background-position: -70px 0;
|
133
|
+
margin-left: 5px;
|
134
|
+
}
|
135
|
+
|
136
|
+
.xdsoft_datetimepicker .xdsoft_next {
|
137
|
+
float: right;
|
138
|
+
background-position: 0 0;
|
139
|
+
}
|
140
|
+
|
141
|
+
.xdsoft_datetimepicker .xdsoft_next,
|
142
|
+
.xdsoft_datetimepicker .xdsoft_prev ,
|
143
|
+
.xdsoft_datetimepicker .xdsoft_today_button {
|
144
|
+
background-color: transparent;
|
145
|
+
background-repeat: no-repeat;
|
146
|
+
border: 0 none;
|
147
|
+
cursor: pointer;
|
148
|
+
display: block;
|
149
|
+
height: 30px;
|
150
|
+
opacity: 0.5;
|
151
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
152
|
+
outline: medium none;
|
153
|
+
overflow: hidden;
|
154
|
+
padding: 0;
|
155
|
+
position: relative;
|
156
|
+
text-indent: 100%;
|
157
|
+
white-space: nowrap;
|
158
|
+
width: 20px;
|
159
|
+
min-width: 0;
|
160
|
+
}
|
161
|
+
|
162
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
|
163
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
|
164
|
+
float: none;
|
165
|
+
background-position: -40px -15px;
|
166
|
+
height: 15px;
|
167
|
+
width: 30px;
|
168
|
+
display: block;
|
169
|
+
margin-left: 14px;
|
170
|
+
margin-top: 7px;
|
171
|
+
}
|
172
|
+
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,
|
173
|
+
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next {
|
174
|
+
float: none;
|
175
|
+
margin-left: 0;
|
176
|
+
margin-right: 14px;
|
177
|
+
}
|
178
|
+
|
179
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
|
180
|
+
background-position: -40px 0;
|
181
|
+
margin-bottom: 7px;
|
182
|
+
margin-top: 0;
|
183
|
+
}
|
184
|
+
|
185
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
|
186
|
+
height: 151px;
|
187
|
+
overflow: hidden;
|
188
|
+
border-bottom: 1px solid #ddd;
|
189
|
+
}
|
190
|
+
|
191
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
|
192
|
+
background: #f5f5f5;
|
193
|
+
border-top: 1px solid #ddd;
|
194
|
+
color: #666;
|
195
|
+
font-size: 12px;
|
196
|
+
text-align: center;
|
197
|
+
border-collapse: collapse;
|
198
|
+
cursor: pointer;
|
199
|
+
border-bottom-width: 0;
|
200
|
+
height: 25px;
|
201
|
+
line-height: 25px;
|
202
|
+
}
|
203
|
+
|
204
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
|
205
|
+
border-top-width: 0;
|
206
|
+
}
|
207
|
+
|
208
|
+
.xdsoft_datetimepicker .xdsoft_today_button:hover,
|
209
|
+
.xdsoft_datetimepicker .xdsoft_next:hover,
|
210
|
+
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
211
|
+
opacity: 1;
|
212
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
213
|
+
}
|
214
|
+
|
215
|
+
.xdsoft_datetimepicker .xdsoft_label {
|
216
|
+
display: inline;
|
217
|
+
position: relative;
|
218
|
+
z-index: 9999;
|
219
|
+
margin: 0;
|
220
|
+
padding: 5px 3px;
|
221
|
+
font-size: 14px;
|
222
|
+
line-height: 20px;
|
223
|
+
font-weight: bold;
|
224
|
+
background-color: #fff;
|
225
|
+
float: left;
|
226
|
+
width: 182px;
|
227
|
+
text-align: center;
|
228
|
+
cursor: pointer;
|
229
|
+
}
|
230
|
+
|
231
|
+
.xdsoft_datetimepicker .xdsoft_label:hover>span {
|
232
|
+
text-decoration: underline;
|
233
|
+
}
|
234
|
+
|
235
|
+
.xdsoft_datetimepicker .xdsoft_label:hover i {
|
236
|
+
opacity: 1.0;
|
237
|
+
}
|
238
|
+
|
239
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
|
240
|
+
border: 1px solid #ccc;
|
241
|
+
position: absolute;
|
242
|
+
right: 0;
|
243
|
+
top: 30px;
|
244
|
+
z-index: 101;
|
245
|
+
display: none;
|
246
|
+
background: #fff;
|
247
|
+
max-height: 160px;
|
248
|
+
overflow-y: hidden;
|
249
|
+
}
|
250
|
+
|
251
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
|
252
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
|
253
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
254
|
+
color: #fff;
|
255
|
+
background: #ff8000;
|
256
|
+
}
|
257
|
+
|
258
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
|
259
|
+
padding: 2px 10px 2px 5px;
|
260
|
+
text-decoration: none !important;
|
261
|
+
}
|
262
|
+
|
263
|
+
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
264
|
+
background: #33aaff;
|
265
|
+
box-shadow: #178fe5 0 1px 3px 0 inset;
|
266
|
+
color: #fff;
|
267
|
+
font-weight: 700;
|
268
|
+
}
|
269
|
+
|
270
|
+
.xdsoft_datetimepicker .xdsoft_month {
|
271
|
+
width: 100px;
|
272
|
+
text-align: right;
|
273
|
+
}
|
274
|
+
|
275
|
+
.xdsoft_datetimepicker .xdsoft_calendar {
|
276
|
+
clear: both;
|
277
|
+
}
|
278
|
+
|
279
|
+
.xdsoft_datetimepicker .xdsoft_year{
|
280
|
+
width: 48px;
|
281
|
+
margin-left: 5px;
|
282
|
+
}
|
283
|
+
|
284
|
+
.xdsoft_datetimepicker .xdsoft_calendar table {
|
285
|
+
border-collapse: collapse;
|
286
|
+
width: 100%;
|
287
|
+
|
288
|
+
}
|
289
|
+
|
290
|
+
.xdsoft_datetimepicker .xdsoft_calendar td > div {
|
291
|
+
padding-right: 5px;
|
292
|
+
}
|
293
|
+
|
294
|
+
.xdsoft_datetimepicker .xdsoft_calendar th {
|
295
|
+
height: 25px;
|
296
|
+
}
|
297
|
+
|
298
|
+
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
|
299
|
+
width: 14.2857142%;
|
300
|
+
background: #f5f5f5;
|
301
|
+
border: 1px solid #ddd;
|
302
|
+
color: #666;
|
303
|
+
font-size: 12px;
|
304
|
+
text-align: right;
|
305
|
+
vertical-align: middle;
|
306
|
+
padding: 0;
|
307
|
+
border-collapse: collapse;
|
308
|
+
cursor: pointer;
|
309
|
+
height: 25px;
|
310
|
+
}
|
311
|
+
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
|
312
|
+
width: 12.5%;
|
313
|
+
}
|
314
|
+
|
315
|
+
.xdsoft_datetimepicker .xdsoft_calendar th {
|
316
|
+
background: #f1f1f1;
|
317
|
+
}
|
318
|
+
|
319
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
|
320
|
+
color: #33aaff;
|
321
|
+
}
|
322
|
+
|
323
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
|
324
|
+
background: #ffe9d2;
|
325
|
+
box-shadow: #ffb871 0 1px 4px 0 inset;
|
326
|
+
color: #000;
|
327
|
+
}
|
328
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
|
329
|
+
background: #c1ffc9;
|
330
|
+
box-shadow: #00dd1c 0 1px 4px 0 inset;
|
331
|
+
color: #000;
|
332
|
+
}
|
333
|
+
|
334
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
|
335
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
|
336
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
337
|
+
background: #33aaff;
|
338
|
+
box-shadow: #178fe5 0 1px 3px 0 inset;
|
339
|
+
color: #fff;
|
340
|
+
font-weight: 700;
|
341
|
+
}
|
342
|
+
|
343
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
|
344
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
|
345
|
+
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
|
346
|
+
opacity: 0.5;
|
347
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
348
|
+
cursor: default;
|
349
|
+
}
|
350
|
+
|
351
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
|
352
|
+
opacity: 0.2;
|
353
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
354
|
+
}
|
355
|
+
|
356
|
+
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
|
357
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
358
|
+
color: #fff !important;
|
359
|
+
background: #ff8000 !important;
|
360
|
+
box-shadow: none !important;
|
361
|
+
}
|
362
|
+
|
363
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
|
364
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
|
365
|
+
background: #33aaff !important;
|
366
|
+
box-shadow: #178fe5 0 1px 3px 0 inset !important;
|
367
|
+
color: #fff !important;
|
368
|
+
}
|
369
|
+
|
370
|
+
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
|
371
|
+
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
|
372
|
+
color: inherit !important;
|
373
|
+
background: inherit !important;
|
374
|
+
box-shadow: inherit !important;
|
375
|
+
}
|
376
|
+
|
377
|
+
.xdsoft_datetimepicker .xdsoft_calendar th {
|
378
|
+
font-weight: 700;
|
379
|
+
text-align: center;
|
380
|
+
color: #999;
|
381
|
+
cursor: default;
|
382
|
+
}
|
383
|
+
|
384
|
+
.xdsoft_datetimepicker .xdsoft_copyright {
|
385
|
+
color: #ccc !important;
|
386
|
+
font-size: 10px;
|
387
|
+
clear: both;
|
388
|
+
float: none;
|
389
|
+
margin-left: 8px;
|
390
|
+
}
|
391
|
+
|
392
|
+
.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
|
393
|
+
.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
|
394
|
+
|
395
|
+
.xdsoft_time_box {
|
396
|
+
position: relative;
|
397
|
+
border: 1px solid #ccc;
|
398
|
+
}
|
399
|
+
.xdsoft_scrollbar >.xdsoft_scroller {
|
400
|
+
background: #ccc !important;
|
401
|
+
height: 20px;
|
402
|
+
border-radius: 3px;
|
403
|
+
}
|
404
|
+
.xdsoft_scrollbar {
|
405
|
+
position: absolute;
|
406
|
+
width: 7px;
|
407
|
+
right: 0;
|
408
|
+
top: 0;
|
409
|
+
bottom: 0;
|
410
|
+
cursor: pointer;
|
411
|
+
}
|
412
|
+
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar {
|
413
|
+
left: 0;
|
414
|
+
right: auto;
|
415
|
+
}
|
416
|
+
.xdsoft_scroller_box {
|
417
|
+
position: relative;
|
418
|
+
}
|
419
|
+
|
420
|
+
.xdsoft_datetimepicker.xdsoft_dark {
|
421
|
+
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
|
422
|
+
background: #000;
|
423
|
+
border-bottom: 1px solid #444;
|
424
|
+
border-left: 1px solid #333;
|
425
|
+
border-right: 1px solid #333;
|
426
|
+
border-top: 1px solid #333;
|
427
|
+
color: #ccc;
|
428
|
+
}
|
429
|
+
|
430
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
|
431
|
+
border-bottom: 1px solid #222;
|
432
|
+
}
|
433
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
|
434
|
+
background: #0a0a0a;
|
435
|
+
border-top: 1px solid #222;
|
436
|
+
color: #999;
|
437
|
+
}
|
438
|
+
|
439
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
|
440
|
+
background-color: #000;
|
441
|
+
}
|
442
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
|
443
|
+
border: 1px solid #333;
|
444
|
+
background: #000;
|
445
|
+
}
|
446
|
+
|
447
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
448
|
+
color: #000;
|
449
|
+
background: #007fff;
|
450
|
+
}
|
451
|
+
|
452
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
453
|
+
background: #cc5500;
|
454
|
+
box-shadow: #b03e00 0 1px 3px 0 inset;
|
455
|
+
color: #000;
|
456
|
+
}
|
457
|
+
|
458
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
|
459
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
|
460
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
|
461
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
|
462
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0ia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QSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
|
463
|
+
}
|
464
|
+
|
465
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
|
466
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
467
|
+
background: #0a0a0a;
|
468
|
+
border: 1px solid #222;
|
469
|
+
color: #999;
|
470
|
+
}
|
471
|
+
|
472
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
473
|
+
background: #0e0e0e;
|
474
|
+
}
|
475
|
+
|
476
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
|
477
|
+
color: #cc5500;
|
478
|
+
}
|
479
|
+
|
480
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
|
481
|
+
background: #ffe9d2;
|
482
|
+
box-shadow: #ffb871 0 1px 4px 0 inset;
|
483
|
+
color:#000;
|
484
|
+
}
|
485
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
|
486
|
+
background: #c1ffc9;
|
487
|
+
box-shadow: #00dd1c 0 1px 4px 0 inset;
|
488
|
+
color:#000;
|
489
|
+
}
|
490
|
+
|
491
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
|
492
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
|
493
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
494
|
+
background: #cc5500;
|
495
|
+
box-shadow: #b03e00 0 1px 3px 0 inset;
|
496
|
+
color: #000;
|
497
|
+
}
|
498
|
+
|
499
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
|
500
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
501
|
+
color: #000 !important;
|
502
|
+
background: #007fff !important;
|
503
|
+
}
|
504
|
+
|
505
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
506
|
+
color: #666;
|
507
|
+
}
|
508
|
+
|
509
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
|
510
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
|
511
|
+
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
|
512
|
+
|
513
|
+
.xdsoft_dark .xdsoft_time_box {
|
514
|
+
border: 1px solid #333;
|
515
|
+
}
|
516
|
+
|
517
|
+
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
|
518
|
+
background: #333 !important;
|
519
|
+
}
|
520
|
+
.xdsoft_datetimepicker .xdsoft_save_selected {
|
521
|
+
display: block;
|
522
|
+
border: 1px solid #dddddd !important;
|
523
|
+
margin-top: 5px;
|
524
|
+
width: 100%;
|
525
|
+
color: #454551;
|
526
|
+
font-size: 13px;
|
527
|
+
}
|
528
|
+
.xdsoft_datetimepicker .blue-gradient-button {
|
529
|
+
font-family: "museo-sans", "Book Antiqua", sans-serif;
|
530
|
+
font-size: 12px;
|
531
|
+
font-weight: 300;
|
532
|
+
color: #82878c;
|
533
|
+
height: 28px;
|
534
|
+
position: relative;
|
535
|
+
padding: 4px 17px 4px 33px;
|
536
|
+
border: 1px solid #d7d8da;
|
537
|
+
background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
538
|
+
/* FF3.6+ */
|
539
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
|
540
|
+
/* Chrome,Safari4+ */
|
541
|
+
background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
542
|
+
/* Chrome10+,Safari5.1+ */
|
543
|
+
background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
544
|
+
/* Opera 11.10+ */
|
545
|
+
background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
546
|
+
/* IE10+ */
|
547
|
+
background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
|
548
|
+
/* W3C */
|
549
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
|
550
|
+
/* IE6-9 */
|
551
|
+
}
|
552
|
+
.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
|
553
|
+
color: #454551;
|
554
|
+
background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
555
|
+
/* FF3.6+ */
|
556
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
|
557
|
+
/* Chrome,Safari4+ */
|
558
|
+
background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
559
|
+
/* Chrome10+,Safari5.1+ */
|
560
|
+
background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
561
|
+
/* Opera 11.10+ */
|
562
|
+
background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
563
|
+
/* IE10+ */
|
564
|
+
background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
|
565
|
+
/* W3C */
|
566
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
|
567
|
+
/* IE6-9 */
|
568
|
+
}
|
@@ -26,13 +26,13 @@ module ActiveAdminDatetimepicker
|
|
26
26
|
|
27
27
|
def input_value(input_name = nil)
|
28
28
|
val = object.public_send(input_name || method)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
val.is_a?(Date) ? val : parse_datetime(val)
|
30
|
+
end
|
31
|
+
|
32
|
+
def parse_datetime(val)
|
33
|
+
DateTime.parse(val.to_s).strftime(format)
|
34
|
+
rescue ArgumentError
|
35
|
+
nil
|
36
36
|
end
|
37
37
|
|
38
38
|
def datetime_picker_options
|
data/package.json
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"name": "@activeadmin-plugins/active_admin_datetimepicker",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Integrate jQuery xdan datetimepicker plugin to ActiveAdmin",
|
5
|
+
"main": "src/active_admin_datetimepicker.js",
|
6
|
+
"style": "src/active_admin_datetimepicker.scss",
|
7
|
+
"author": "Igor Fedoronchuk <fedoronchuk@gmail.com>",
|
8
|
+
"license": "MIT",
|
9
|
+
"private": false,
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git+https://github.com/activeadmin-plugins/active_admin_datetimepicker.git"
|
13
|
+
},
|
14
|
+
"bugs": {
|
15
|
+
"url": "https://github.com/activeadmin-plugins/active_admin_datetimepicker/issues"
|
16
|
+
},
|
17
|
+
"homepage": "https://github.com/activeadmin-plugins/active_admin_datetimepicker#readme",
|
18
|
+
"keywords": [
|
19
|
+
"active",
|
20
|
+
"admin",
|
21
|
+
"datetimepicker"
|
22
|
+
],
|
23
|
+
"files": [
|
24
|
+
"src/**/*",
|
25
|
+
"!src/*.bak"
|
26
|
+
],
|
27
|
+
"scripts": {
|
28
|
+
"prepare_src": "rm -rf src && cp -R app/assets/javascripts/ src && cp -R app/assets/stylesheets/ src",
|
29
|
+
"prepare_import": "sed -i.bak 1s/'\\/\\/\\= require vendor\\/jquery.datetimepicker.full'/\"import '.\\/vendor\\/jquery.datetimepicker.full';\"/ src/active_admin_datetimepicker.js",
|
30
|
+
"prepublishOnly": "npm run prepare_src && npm run prepare_import"
|
31
|
+
},
|
32
|
+
"dependencies": {
|
33
|
+
"jquery-mousewheel": ">= 3.1.13"
|
34
|
+
}
|
35
|
+
}
|