date_time_picker 0.5.4 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +21 -21
- data/README.rdoc +72 -72
- data/lib/date_time_picker/date_time_picker_helpers.rb +78 -78
- data/lib/date_time_picker.rb +37 -37
- data/lib/generators/date_time_picker/USAGE +2 -2
- data/lib/generators/date_time_picker/date_time_picker_generator.rb +11 -11
- data/lib/generators/date_time_picker/templates/date_time_picker.rb +2 -2
- data/lib/simple_form/inputs/ui_date_input.rb +4 -4
- data/lib/simple_form/inputs/ui_date_time_input.rb +4 -4
- data/lib/simple_form/inputs/ui_time_input.rb +4 -4
- data/lib/simple_form/inputs_ext.rb +3 -3
- data/test/Rakefile +7 -7
- data/test/app/controllers/application_controller.rb +5 -5
- data/test/app/views/layouts/application.html.erb +12 -12
- data/test/config/application.rb +12 -12
- data/test/config/boot.rb +3 -3
- data/test/config/date_time_picker.yml +1 -1
- data/test/config/environment.rb +5 -5
- data/test/config/environments/test.rb +7 -7
- data/test/config/routes.rb +3 -3
- data/test/config.ru +4 -4
- data/test/script/rails +6 -6
- data/test/spec/application_spec.rb +13 -13
- data/test/spec/spec_helper.rb +4 -4
- data/vendor/assets/i18n/date_time_picker_ca.js +43 -43
- data/vendor/assets/i18n/date_time_picker_cs.js +43 -43
- data/vendor/assets/i18n/date_time_picker_de.js +43 -43
- data/vendor/assets/i18n/date_time_picker_el.js +42 -42
- data/vendor/assets/i18n/date_time_picker_es.js +42 -42
- data/vendor/assets/i18n/date_time_picker_et.js +42 -42
- data/vendor/assets/i18n/date_time_picker_fi.js +43 -43
- data/vendor/assets/i18n/date_time_picker_fr.js +45 -45
- data/vendor/assets/i18n/date_time_picker_gl.js +42 -42
- data/vendor/assets/i18n/date_time_picker_he.js +43 -43
- data/vendor/assets/i18n/date_time_picker_hu.js +43 -43
- data/vendor/assets/i18n/date_time_picker_id.js +42 -42
- data/vendor/assets/i18n/date_time_picker_it.js +43 -43
- data/vendor/assets/i18n/date_time_picker_ja.js +42 -42
- data/vendor/assets/i18n/date_time_picker_ko.js +42 -42
- data/vendor/assets/i18n/date_time_picker_lt.js +42 -42
- data/vendor/assets/i18n/date_time_picker_nl.js +42 -42
- data/vendor/assets/i18n/date_time_picker_no.js +43 -43
- data/vendor/assets/i18n/date_time_picker_pl.js +43 -43
- data/vendor/assets/i18n/date_time_picker_pt-BR.js +42 -42
- data/vendor/assets/i18n/date_time_picker_pt.js +41 -41
- data/vendor/assets/i18n/date_time_picker_ro.js +46 -46
- data/vendor/assets/i18n/date_time_picker_ru.js +42 -42
- data/vendor/assets/i18n/date_time_picker_sk.js +43 -43
- data/vendor/assets/i18n/date_time_picker_sv.js +43 -43
- data/vendor/assets/i18n/date_time_picker_tr.js +42 -42
- data/vendor/assets/i18n/date_time_picker_vi.js +43 -43
- data/vendor/assets/i18n/date_time_picker_zh-CN.js +43 -43
- data/vendor/assets/i18n/date_time_picker_zh-TW.js +43 -43
- data/vendor/assets/javascripts/date_time_picker.js +19 -19
- data/vendor/assets/javascripts/date_time_picker_all.js +1 -1
- data/vendor/assets/timepicker/jquery-ui-timepicker-addon.css +6 -6
- data/vendor/assets/timepicker/jquery-ui-timepicker-addon.js +1326 -1326
- metadata +35 -45
@@ -1,43 +1,43 @@
|
|
1
|
-
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2
|
-
/* Written by Cloudream (cloudream@gmail.com). */
|
3
|
-
jQuery(function($){
|
4
|
-
$.datepicker.regional['zh-CN'] = {
|
5
|
-
closeText: '关闭',
|
6
|
-
prevText: '<上月',
|
7
|
-
nextText: '下月>',
|
8
|
-
currentText: '今天',
|
9
|
-
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10
|
-
'七月','八月','九月','十月','十一月','十二月'],
|
11
|
-
monthNamesShort: ['一','二','三','四','五','六',
|
12
|
-
'七','八','九','十','十一','十二'],
|
13
|
-
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14
|
-
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15
|
-
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16
|
-
weekHeader: '周',
|
17
|
-
dateFormat: 'yy-mm-dd',
|
18
|
-
firstDay: 1,
|
19
|
-
isRTL: false,
|
20
|
-
showMonthAfterYear: true,
|
21
|
-
yearSuffix: '年'};
|
22
|
-
|
23
|
-
});
|
24
|
-
/* Simplified Chinese translation for the jQuery Timepicker Addon /
|
25
|
-
/ Written by Will Lu */
|
26
|
-
jQuery(function($) {
|
27
|
-
$.timepicker.regional['zh-CN'] = {
|
28
|
-
timeOnlyTitle: '选择时间',
|
29
|
-
timeText: '时间',
|
30
|
-
hourText: '小时',
|
31
|
-
minuteText: '分钟',
|
32
|
-
secondText: '秒钟',
|
33
|
-
millisecText: '微秒',
|
34
|
-
timezoneText: '时区',
|
35
|
-
currentText: '现在时间',
|
36
|
-
closeText: '关闭',
|
37
|
-
timeFormat: 'hh:mm',
|
38
|
-
amNames: ['AM', 'A'],
|
39
|
-
pmNames: ['PM', 'P'],
|
40
|
-
ampm: false
|
41
|
-
};
|
42
|
-
|
43
|
-
});
|
1
|
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2
|
+
/* Written by Cloudream (cloudream@gmail.com). */
|
3
|
+
jQuery(function($){
|
4
|
+
$.datepicker.regional['zh-CN'] = {
|
5
|
+
closeText: '关闭',
|
6
|
+
prevText: '<上月',
|
7
|
+
nextText: '下月>',
|
8
|
+
currentText: '今天',
|
9
|
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10
|
+
'七月','八月','九月','十月','十一月','十二月'],
|
11
|
+
monthNamesShort: ['一','二','三','四','五','六',
|
12
|
+
'七','八','九','十','十一','十二'],
|
13
|
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14
|
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15
|
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16
|
+
weekHeader: '周',
|
17
|
+
dateFormat: 'yy-mm-dd',
|
18
|
+
firstDay: 1,
|
19
|
+
isRTL: false,
|
20
|
+
showMonthAfterYear: true,
|
21
|
+
yearSuffix: '年'};
|
22
|
+
|
23
|
+
});
|
24
|
+
/* Simplified Chinese translation for the jQuery Timepicker Addon /
|
25
|
+
/ Written by Will Lu */
|
26
|
+
jQuery(function($) {
|
27
|
+
$.timepicker.regional['zh-CN'] = {
|
28
|
+
timeOnlyTitle: '选择时间',
|
29
|
+
timeText: '时间',
|
30
|
+
hourText: '小时',
|
31
|
+
minuteText: '分钟',
|
32
|
+
secondText: '秒钟',
|
33
|
+
millisecText: '微秒',
|
34
|
+
timezoneText: '时区',
|
35
|
+
currentText: '现在时间',
|
36
|
+
closeText: '关闭',
|
37
|
+
timeFormat: 'hh:mm',
|
38
|
+
amNames: ['AM', 'A'],
|
39
|
+
pmNames: ['PM', 'P'],
|
40
|
+
ampm: false
|
41
|
+
};
|
42
|
+
|
43
|
+
});
|
@@ -1,43 +1,43 @@
|
|
1
|
-
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2
|
-
/* Written by Ressol (ressol@gmail.com). */
|
3
|
-
jQuery(function($){
|
4
|
-
$.datepicker.regional['zh-TW'] = {
|
5
|
-
closeText: '關閉',
|
6
|
-
prevText: '<上月',
|
7
|
-
nextText: '下月>',
|
8
|
-
currentText: '今天',
|
9
|
-
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10
|
-
'七月','八月','九月','十月','十一月','十二月'],
|
11
|
-
monthNamesShort: ['一','二','三','四','五','六',
|
12
|
-
'七','八','九','十','十一','十二'],
|
13
|
-
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14
|
-
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15
|
-
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16
|
-
weekHeader: '周',
|
17
|
-
dateFormat: 'yy/mm/dd',
|
18
|
-
firstDay: 1,
|
19
|
-
isRTL: false,
|
20
|
-
showMonthAfterYear: true,
|
21
|
-
yearSuffix: '年'};
|
22
|
-
|
23
|
-
});
|
24
|
-
/* Chinese translation for the jQuery Timepicker Addon */
|
25
|
-
/* Written by Alang.lin */
|
26
|
-
jQuery(function($) {
|
27
|
-
$.timepicker.regional['zh-TW'] = {
|
28
|
-
timeOnlyTitle: '選擇時分秒',
|
29
|
-
timeText: '時間',
|
30
|
-
hourText: '時',
|
31
|
-
minuteText: '分',
|
32
|
-
secondText: '秒',
|
33
|
-
millisecText: '毫秒',
|
34
|
-
timezoneText: '時區',
|
35
|
-
currentText: '現在時間',
|
36
|
-
closeText: '確定',
|
37
|
-
timeFormat: 'hh:mm tt',
|
38
|
-
amNames: ['上午', 'AM', 'A'],
|
39
|
-
pmNames: ['下午', 'PM', 'P'],
|
40
|
-
ampm: false
|
41
|
-
};
|
42
|
-
|
43
|
-
});
|
1
|
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2
|
+
/* Written by Ressol (ressol@gmail.com). */
|
3
|
+
jQuery(function($){
|
4
|
+
$.datepicker.regional['zh-TW'] = {
|
5
|
+
closeText: '關閉',
|
6
|
+
prevText: '<上月',
|
7
|
+
nextText: '下月>',
|
8
|
+
currentText: '今天',
|
9
|
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10
|
+
'七月','八月','九月','十月','十一月','十二月'],
|
11
|
+
monthNamesShort: ['一','二','三','四','五','六',
|
12
|
+
'七','八','九','十','十一','十二'],
|
13
|
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14
|
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15
|
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16
|
+
weekHeader: '周',
|
17
|
+
dateFormat: 'yy/mm/dd',
|
18
|
+
firstDay: 1,
|
19
|
+
isRTL: false,
|
20
|
+
showMonthAfterYear: true,
|
21
|
+
yearSuffix: '年'};
|
22
|
+
|
23
|
+
});
|
24
|
+
/* Chinese translation for the jQuery Timepicker Addon */
|
25
|
+
/* Written by Alang.lin */
|
26
|
+
jQuery(function($) {
|
27
|
+
$.timepicker.regional['zh-TW'] = {
|
28
|
+
timeOnlyTitle: '選擇時分秒',
|
29
|
+
timeText: '時間',
|
30
|
+
hourText: '時',
|
31
|
+
minuteText: '分',
|
32
|
+
secondText: '秒',
|
33
|
+
millisecText: '毫秒',
|
34
|
+
timezoneText: '時區',
|
35
|
+
currentText: '現在時間',
|
36
|
+
closeText: '確定',
|
37
|
+
timeFormat: 'hh:mm tt',
|
38
|
+
amNames: ['上午', 'AM', 'A'],
|
39
|
+
pmNames: ['下午', 'PM', 'P'],
|
40
|
+
ampm: false
|
41
|
+
};
|
42
|
+
|
43
|
+
});
|
@@ -1,19 +1,19 @@
|
|
1
|
-
//= require jquery-ui-timepicker-addon
|
2
|
-
//= require jquery-ui-sliderAccess
|
3
|
-
|
4
|
-
$(function() {
|
5
|
-
var fns = ["datetimepicker", "datepicker", "timepicker"];
|
6
|
-
for (i=0; i<fns.length; i++) {
|
7
|
-
var fn = fns[i];
|
8
|
-
$("." + fn).each(function() {
|
9
|
-
var picker = $(this);
|
10
|
-
var options = $.parseJSON(picker.attr("data-options"));
|
11
|
-
var locale = picker.attr("data-locale");
|
12
|
-
if (locale != "en") {
|
13
|
-
$.datepicker.setDefaults($.datepicker.regional[locale]);
|
14
|
-
$.timepicker.setDefaults($.timepicker.regional[locale]);
|
15
|
-
}
|
16
|
-
picker[fn](options);
|
17
|
-
});
|
18
|
-
}
|
19
|
-
});
|
1
|
+
//= require jquery-ui-timepicker-addon
|
2
|
+
//= require jquery-ui-sliderAccess
|
3
|
+
|
4
|
+
$(function() {
|
5
|
+
var fns = ["datetimepicker", "datepicker", "timepicker"];
|
6
|
+
for (i=0; i<fns.length; i++) {
|
7
|
+
var fn = fns[i];
|
8
|
+
$("." + fn).each(function() {
|
9
|
+
var picker = $(this);
|
10
|
+
var options = $.parseJSON(picker.attr("data-options"));
|
11
|
+
var locale = picker.attr("data-locale");
|
12
|
+
if (locale != "en") {
|
13
|
+
$.datepicker.setDefaults($.datepicker.regional[locale]);
|
14
|
+
$.timepicker.setDefaults($.timepicker.regional[locale]);
|
15
|
+
}
|
16
|
+
picker[fn](options);
|
17
|
+
});
|
18
|
+
}
|
19
|
+
});
|
@@ -1 +1 @@
|
|
1
|
-
//= require_tree ../i18n
|
1
|
+
//= require_tree ../i18n
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
2
|
-
.ui-timepicker-div dl { text-align: left; }
|
3
|
-
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
4
|
-
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
5
|
-
.ui-timepicker-div td { font-size: 90%; }
|
6
|
-
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
1
|
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
2
|
+
.ui-timepicker-div dl { text-align: left; }
|
3
|
+
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
4
|
+
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
5
|
+
.ui-timepicker-div td { font-size: 90%; }
|
6
|
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|