summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-08-08 11:15:32 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-08-08 11:15:32 +0200
commit5d416152174d740aaa4b4e86a98f4dbd421ac541 (patch)
tree0c6728886ee7f5abdf8924cdcd67f749087d3c44 /addons/web/static
parent71cd55490ab73e16811c960f0f45bc9f4aa4aaf0 (diff)
[FIX] fixed problems with images in kanban o2m
bzr revid: nicolas.vanhoren@openerp.com-20120808091532-zjnvgpx33nkwj1z8
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/view_form.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index c3f941305d5..8276a1b219c 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4606,7 +4606,7 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
},
render_value: function() {
var url;
- if (this.get('value') && this.get('value').substr(0, 10).indexOf(' ') == -1) {
+ if (this.get('value') && ! /^\d+(\.\d*)? \w+$/.test(this.get('value'))) {
url = 'data:image/png;base64,' + this.get('value');
} else if (this.get('value')) {
url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' +