[FIX] pad: pad in readonly when opening form view in edit mode - opw 606208
bzr revid: acl@openerp.com-20140409114825-t10ps6o7qn7qbd7y
This commit is contained in:
parent
16ce262c33
commit
1e123f5be0
|
@ -36,9 +36,12 @@ openerp.pad = function(instance) {
|
|||
var value = self.get('value');
|
||||
if (self.get('effective_readonly')) {
|
||||
if (_.str.startsWith(value, 'http')) {
|
||||
self.$('.oe_pad_content').addClass('oe_pad_loading')
|
||||
this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
|
||||
if (self.$('.oe_pad_loading').length) {
|
||||
self.$('.oe_pad_content').removeClass('oe_pad_loading').html('<div class="oe_pad_readonly"><div>');
|
||||
self.$('.oe_pad_readonly').html(data);
|
||||
}
|
||||
}).fail(function() {
|
||||
self.$('.oe_pad_content').text(_t('Unable to load pad'));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue