diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-07-04 18:14:13 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-07-04 18:14:13 +0200 |
| commit | 780ae8a808697cc156549e532614f8536cef2b1b (patch) | |
| tree | 3a5865d782dab6e03f9e58314f81508bef161c61 /addons/web | |
| parent | 680ab988607967a2503ae5a1abeabf899ff40477 (diff) | |
| parent | 10cb34bcacc0983cdab722e528d413a996df3a7b (diff) | |
[MERGE] forward port branch saas-15 up to 10cb34bcacc
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 2cd2c2ac7da..5c3fc9f9e50 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1012,6 +1012,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 b05de1d0756..fa513372269 100644 --- a/addons/web/static/src/js/apps.js +++ b/addons/web/static/src/js/apps.js @@ -59,7 +59,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; @@ -114,10 +114,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; |
