New version

Update method open
This commit is contained in:
Valeriy 2013-11-07 10:31:36 +06:00
parent 161800fe89
commit fb10237c98
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@
"timepicker", "timepicker",
"datetimepicker" "datetimepicker"
], ],
"version": "1.0.2", "version": "1.0.4",
"author": { "author": {
"name": "Chupurnov Valeriy", "name": "Chupurnov Valeriy",
"url": "http://xdsoft.net/contacts.html" "url": "http://xdsoft.net/contacts.html"

View File

@ -1,5 +1,5 @@
/** /**
* @preserve jQuery DateTimePicker plugin v1.0.3 * @preserve jQuery DateTimePicker plugin v1.0.4
* (c) 2013, Chupurnov Valeriy. * (c) 2013, Chupurnov Valeriy.
*/ */
(function( $ ){ (function( $ ){
@ -356,6 +356,12 @@
left:offset.left, left:offset.left,
top:offset.top+datetimepicker.data('input')[0].offsetHeight, top:offset.top+datetimepicker.data('input')[0].offsetHeight,
}).show(); }).show();
if( options.closeOnWithoutClick ){
$(window).on('mousedown keydown',function(){
datetimepicker.close();
$(this).off('mousedown',arguments.callee);
});
}
datetimepicker.trigger('open.doksoft'); datetimepicker.trigger('open.doksoft');
} }
}; };
@ -382,12 +388,6 @@
return; return;
_xdsoft_datetime.setCurrentTime((input&&input.val&&input.val())?input.val():new Date); _xdsoft_datetime.setCurrentTime((input&&input.val&&input.val())?input.val():new Date);
datetimepicker.open(); datetimepicker.open();
if( options.closeOnWithoutClick ){
$(window).on('mousedown keydown',function(){
datetimepicker.close();
$(this).off('mousedown',arguments.callee);
});
}
},100); },100);
//event.stopPropagation(); //event.stopPropagation();
}); });