mirror of https://github.com/OCA/web.git
[IMP] Added draggable support to dialogs
parent
ec4353fa71
commit
d38ba72efc
|
@ -3,6 +3,7 @@ Expand Dialog
|
||||||
|
|
||||||
A module that lets the user expand/restore the dialog box size through a button
|
A module that lets the user expand/restore the dialog box size through a button
|
||||||
in the upper right corner (mimicking most windows managers).
|
in the upper right corner (mimicking most windows managers).
|
||||||
|
It does also add draggable support to the dialogs.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
@ -22,6 +23,7 @@ Contributors
|
||||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||||
* Holger Brunn <hbrunn@therp.nl>
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
* Siddharth Bhalgami <siddharth.bhalgami@gmail.com>
|
* Siddharth Bhalgami <siddharth.bhalgami@gmail.com>
|
||||||
|
* Wolfgang Pichler <wpichler@callino.at>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -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() {
|
_extending: function() {
|
||||||
var dialog = this.$modal.find('.modal-dialog');
|
var dialog = this.$modal.find('.modal-dialog');
|
||||||
dialog.addClass('dialog_full_screen');
|
dialog.addClass('dialog_full_screen');
|
||||||
|
|
Loading…
Reference in New Issue