[FIX] website: media editor: display popup when user click on save button of the view

bzr revid: chm@openerp.com-20140418150831-k7fnd7y6ywrmxv6j
This commit is contained in:
chm@openerp.com 2014-04-18 17:08:31 +02:00
parent c3cf8000e6
commit 02a9df59b7
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,7 @@
return this._super.apply(this, arguments);
},
save: function () {
website.snippet.clean_for_save = true;
this.snippets.clean_for_save();
this._super();
},
@ -1518,6 +1519,9 @@
});
},
onFocus : function () {
// don't open media editor before clean for save
if (website.snippet.clean_for_save) return;
var self = this;
if (this.$target.parent().data("oe-field") === "image") {
this.$overlay.addClass("hidden");