[IMP] Added draggable support to dialogs

This commit is contained in:
Wolfgang Pichler
2017-09-18 09:58:06 +02:00
committed by Pedro M. Baeza
parent ec4353fa71
commit d38ba72efc
2 changed files with 18 additions and 0 deletions

View File

@@ -22,6 +22,22 @@ Dialog.include({
});
},
open: function() {
var res = this._super.apply(this, arguments);
this.$modal.draggable({
handle: "div.modal-header",
});
return res;
},
close: function() {
var draggable = this.$modal.draggable( "instance" );
if (draggable)
this.$modal.draggable("destroy");
var res = this._super.apply(this, arguments);
return res;
},
_extending: function() {
var dialog = this.$modal.find('.modal-dialog');
dialog.addClass('dialog_full_screen');