From 262c92558e8f56408dec5bf407baf903c8605113 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 20 Jan 2015 18:32:51 +0000 Subject: [PATCH] Fix error apply is not available from the this._super in expose view --- etemplate/js/expose.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/etemplate/js/expose.js b/etemplate/js/expose.js index 8899ce2e4d..1e32154bbc 100644 --- a/etemplate/js/expose.js +++ b/etemplate/js/expose.js @@ -183,7 +183,15 @@ function expose (widget) set_value:function (_value) { - this._super.apply(this,arguments) + // Do not run set value of expose if expose_view is not set + // it causes a wired error on nested image widgets which + // seems the expose is not its child widget + if (!this.options.expose_view ) + { + return; + } + this._super.apply(this,arguments); + var self=this; // If the media type is not supported do not bind the click handler if (_value && typeof _value.mime != 'undefined' && !_value.mime.match(/^(video|image|audio|media)\//,'ig'))