beautiful_scaffold 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ $('.dropdown-toggle').dropdown();
2
+ $('.dpicker').livequery(function(){
3
+ $(this).datepicker({ format : 'dd/mm/yyyy', language : $('html').attr("lang") }).on('changeDate', function(ev){
4
+ idday = '#' + ev.currentTarget.id + '_3i';
5
+ idmonth = '#' + ev.currentTarget.id + '_2i';
6
+ idyear = '#' + ev.currentTarget.id + '_1i';
7
+ $(idday).val(ev.date.getDate());
8
+ $(idmonth).val(ev.date.getMonth()+1);
9
+ $(idyear).val(ev.date.getFullYear());
10
+ });
11
+ });
12
+ $('.add-on').live('click', function(){
13
+ try{
14
+ dpick = $(this).parent().find('.dpicker');
15
+ dpick.trigger('focus');
16
+ dpick.trigger('select');
17
+ }catch (e){
18
+ }
19
+ });
20
+ $('.tpicker').livequery(function(){
21
+ $(this).timepicker({ template: 'modal', showMeridian: false, minuteStep: 1, defaultTime: false, showInputs: false, disableFocus: true }).on('change', function(ev){
22
+ tpickerdate = new Date("01/01/1970 " + ev.currentTarget.value);
23
+ idhour = '#' + ev.currentTarget.id + '_4i';
24
+ idmin = '#' + ev.currentTarget.id + '_5i';
25
+ $(idhour).val(tpickerdate.getHours());
26
+ $(idmin).val(tpickerdate.getMinutes());
27
+ });
28
+ });