[IMP] made kanban view support images indicated in the result from read()

bzr revid: nicolas.vanhoren@openerp.com-20120711124108-c8zh33bbz2wvfpbk
This commit is contained in:
niv-openerp 2012-07-11 14:41:08 +02:00
commit 7cf43beab7
1 changed files with 3 additions and 0 deletions

View File

@ -750,6 +750,9 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
// Set the cache duration in seconds.
url += '&cache=' + parseInt(cache, 10);
}
if (this.record[field].value && ! /^\d+(\.\d*)? \w+$/.test(this.record[field].value)) {
url = 'data:image/png;base64,' + this.record[field].value;
}
return url;
},
kanban_text_ellipsis: function(s, size) {