diff options
| author | Denis Ledoux <dle@openerp.com> | 2014-04-09 18:31:32 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2014-04-09 18:31:32 +0200 |
| commit | 7715bf1823a93d6efee1bf60d091f194e0ed6a34 (patch) | |
| tree | 924b33411ce44d6399f08a77681a10439831d415 /addons/pad/static | |
| parent | ce83eb09682a1e39e77eefc4291b04f0105c1ada (diff) | |
| parent | c28a5a1021a568fa1a60011f2a5ff7b6c9005829 (diff) | |
[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9969 revid:dle@openerp.com-20140409162932-y5fxd5wbojing2t2
bzr revid: dle@openerp.com-20140409163132-n3apqh6nvfg2qof9
Diffstat (limited to 'addons/pad/static')
| -rw-r--r-- | addons/pad/static/src/js/pad.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index d3a6394ee5d..cf6768e0f1f 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -13,6 +13,7 @@ openerp.pad = function(instance) { event.preventDefault(); self.set("configured", true); }); + this.pad_loading_request = null; }, initialize_content: function() { var self = this; @@ -30,14 +31,14 @@ openerp.pad = function(instance) { }, render_value: function() { var self = this; - this._configured_deferred.always(function() { + $.when(this._configured_deferred, this.pad_loading_request).always(function() { if (! self.get('configured')) { return; }; var value = self.get('value'); if (self.get('effective_readonly')) { if (_.str.startsWith(value, 'http')) { - this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) { + self.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) { self.$('.oe_pad_content').removeClass('oe_pad_loading').html('<div class="oe_pad_readonly"><div>'); self.$('.oe_pad_readonly').html(data); }).fail(function() { |
