jquery-datetimepicker-rails 2.2.2.0 → 2.2.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81b1b446f08fcd172ee11acf4dc20ca3c7593084
|
4
|
+
data.tar.gz: a52d33c26c4f904482921c4e4c6283a90f3484c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6486efe1004e0f433ecfc5b5c211d1a1a1f63e4437a444c8e2a9f3f86866c86901cf1edfc4dc65a0bc1859ac5ca9a95ca0787089b4c017cdc423d533957500
|
7
|
+
data.tar.gz: 2cb4e6e163b45c6b5e7f189c05a2677768438acf44f3dec0546fe5bb093ce3261e75bbb572090e67383ba3bc51c0b17507146e24c6dfb1d404489eae7d1bc0f9
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @preserve jQuery DateTimePicker plugin v2.2.
|
2
|
+
* @preserve jQuery DateTimePicker plugin v2.2.3
|
3
3
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
4
4
|
* (c) 2014, Chupurnov Valeriy.
|
5
5
|
*/
|
@@ -183,6 +183,8 @@
|
|
183
183
|
scrollTime:true,
|
184
184
|
scrollInput:true,
|
185
185
|
|
186
|
+
lazyInit:true,
|
187
|
+
|
186
188
|
mask:false,
|
187
189
|
validateOnBlur:true,
|
188
190
|
allowBlank:true,
|
@@ -330,8 +332,32 @@
|
|
330
332
|
YKEY = 89,
|
331
333
|
ctrlDown = false,
|
332
334
|
options = ($.isPlainObject(opt)||!opt)?$.extend(true,{},default_options,opt):$.extend({},default_options),
|
335
|
+
|
336
|
+
lazyInitTimer = 0,
|
337
|
+
|
338
|
+
lazyInit = function( input ){
|
339
|
+
input
|
340
|
+
.on('open.xdsoft focusin.xdsoft mousedown.xdsoft',function initOnActionCallback(event) {
|
341
|
+
if( input.is(':disabled')||input.is(':hidden')||!input.is(':visible')||input.data( 'xdsoft_datetimepicker') )
|
342
|
+
return;
|
343
|
+
|
344
|
+
clearTimeout(lazyInitTimer);
|
345
|
+
|
346
|
+
lazyInitTimer = setTimeout(function() {
|
347
|
+
|
348
|
+
if( !input.data( 'xdsoft_datetimepicker') )
|
349
|
+
createDateTimePicker(input);
|
350
|
+
|
351
|
+
input
|
352
|
+
.off('open.xdsoft focusin.xdsoft mousedown.xdsoft',initOnActionCallback)
|
353
|
+
.trigger('open.xdsoft');
|
354
|
+
},100);
|
355
|
+
|
356
|
+
});
|
357
|
+
},
|
333
358
|
|
334
359
|
createDateTimePicker = function( input ) {
|
360
|
+
|
335
361
|
var datetimepicker = $('<div '+(options.id?'id="'+options.id+'"':'')+' '+(options.style?'style="'+options.style+'"':'')+' class="xdsoft_datetimepicker xdsoft_noselect '+options.className+'"></div>'),
|
336
362
|
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
337
363
|
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
@@ -1194,7 +1220,12 @@
|
|
1194
1220
|
}
|
1195
1221
|
return 0;
|
1196
1222
|
}else
|
1197
|
-
($.type(opt) !== 'string')
|
1223
|
+
if( ($.type(opt) !== 'string') ){
|
1224
|
+
if( !options.lazyInit||options.open||options.inline ){
|
1225
|
+
createDateTimePicker($(this));
|
1226
|
+
}else
|
1227
|
+
lazyInit($(this));
|
1228
|
+
}
|
1198
1229
|
});
|
1199
1230
|
};
|
1200
1231
|
})( jQuery );
|