diff options
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/controllers/main.py | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/apps.js | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 85bd770bacc..54bb061ad06 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1003,6 +1003,8 @@ class Binary(http.Controller): elif status != 200 and download: return request.not_found() + height = int(height) + width = int(width) if content and (width or height): # resize maximum 500*500 if width > 500: diff --git a/addons/web/static/src/js/apps.js b/addons/web/static/src/js/apps.js index 7250674272c..bb642ed57e7 100644 --- a/addons/web/static/src/js/apps.js +++ b/addons/web/static/src/js/apps.js @@ -61,7 +61,7 @@ var Apps = Widget.extend({ }, destroy: function() { - $(window).off("message.apps"); + $(window).off("message." + this.uniq); if (this.$ifr) { this.$ifr.remove(); this.$ifr = null; @@ -116,10 +116,11 @@ var Apps = Widget.extend({ qs.debug = session.debug; } var u = $.param.querystring(client.origin + "/apps/embed/client", qs); - var css = {width: '100%', height: '400px'}; + var css = {width: '100%', height: '750px'}; self.$ifr = $('<iframe>').attr('src', u); - $(window).on("message.apps", self.proxy('_on_message')); + self.uniq = _.uniqueId('apps'); + $(window).on("message." + self.uniq, self.proxy('_on_message')); self.on('message:ready', self, function(m) { var w = this.$ifr[0].contentWindow; |
