summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-07-30 20:30:14 +0200
committerChristophe Simonis <chs@odoo.com>2014-07-30 20:30:14 +0200
commite4cb5202a056ba0ad666af0268861e672a2cdab3 (patch)
tree7ffadb844202eaa8a4e3c6c9460b4a534ea34438 /addons/web/static/src
parent23436ca25943037a01a1ff435e05aaa32a9ffed3 (diff)
parentfa07bc85329d825107f332053cecd2a51771823c (diff)
[MERGE] forward port of branch saas-4 up to fa07bc8
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/chrome.js2
-rw-r--r--addons/web/static/src/js/views.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 3ffa5cf4c84..cd22f10fb02 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -184,12 +184,12 @@ instance.web.Dialog = instance.web.Widget.extend({
close: function(reason) {
if (this.dialog_inited && !this.__tmp_dialog_hiding) {
$('.tooltip').remove(); //remove open tooltip if any to prevent them staying when modal has disappeared
- this.trigger("closing", reason);
if (this.$el.is(":data(bs.modal)")) { // may have been destroyed by closing signal
this.__tmp_dialog_hiding = true;
this.$dialog_box.modal('hide');
this.__tmp_dialog_hiding = undefined;
}
+ this.trigger("closing", reason);
}
},
_closing: function() {
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 64be8a9493c..53addf97e56 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -692,8 +692,8 @@ instance.web.ViewManager = instance.web.Widget.extend({
var container = this.$el.find("> .oe_view_manager_body > .oe_view_manager_view_" + view_type);
var view_promise = controller.appendTo(container);
this.views[view_type].controller = controller;
- this.views[view_type].deferred.resolve(view_type);
return $.when(view_promise).done(function() {
+ self.views[view_type].deferred.resolve(view_type);
if (self.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {
@@ -1120,7 +1120,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
);
}
- $.when(defs).done(function() {
+ $.when(this.views[this.active_view] ? this.views[this.active_view].deferred : $.when(), defs).done(function() {
self.views[self.active_view].controller.do_load_state(state, warm);
});
},