|
@ -57,6 +57,10 @@ var PreviewDialog = Widget.extend({ |
|
|
open: function() { |
|
|
open: function() { |
|
|
var self = this; |
|
|
var self = this; |
|
|
$('.tooltip').remove(); |
|
|
$('.tooltip').remove(); |
|
|
|
|
|
this.$modal.draggable({ |
|
|
|
|
|
handle: '.modal-header', |
|
|
|
|
|
helper: false |
|
|
|
|
|
}); |
|
|
this.replace(this.$modal.find(".modal-body")).then(function() { |
|
|
this.replace(this.$modal.find(".modal-body")).then(function() { |
|
|
self.$modal.modal('show'); |
|
|
self.$modal.modal('show'); |
|
|
self._opened.resolve(); |
|
|
self._opened.resolve(); |
|
@ -97,6 +101,10 @@ var PreviewDialog = Widget.extend({ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
close: function() { |
|
|
close: function() { |
|
|
|
|
|
var draggable = this.$modal.draggable( "instance" ); |
|
|
|
|
|
if (draggable) { |
|
|
|
|
|
this.$modal.draggable("destroy"); |
|
|
|
|
|
} |
|
|
this.$modal.modal('hide'); |
|
|
this.$modal.modal('hide'); |
|
|
}, |
|
|
}, |
|
|
destroy: function(reason) { |
|
|
destroy: function(reason) { |
|
|