[FIX] generate absolute urls for images
authorChristophe Simonis <chs@openerp.com>
Wed, 23 Nov 2011 09:20:55 +0000 (10:20 +0100)
committerChristophe Simonis <chs@openerp.com>
Wed, 23 Nov 2011 09:20:55 +0000 (10:20 +0100)
bzr revid: chs@openerp.com-20111123092055-iqwm3uy1sxw4iq5o

addons/web/static/src/js/formats.js
addons/web_kanban/static/src/js/kanban.js

index 3151b34..18b679b 100644 (file)
@@ -253,7 +253,7 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo
     if (column.tag === 'button') {
         return [
             '<button type="button" title="', column.string || '', '">',
-                '<img src="/web/static/src/img/icons/', column.icon, '.png"',
+                '<img src=', openerp.connection.server, '"/web/static/src/img/icons/', column.icon, '.png"',
                     ' alt="', column.string || '', '"/>',
             '</button>'
         ].join('')
index a375554..f8a649e 100644 (file)
@@ -109,7 +109,7 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
                         node.children = [{
                             tag: 'img',
                             attrs: {
-                                src: '/web/static/src/img/icons/' + node.attrs['data-icon'] + '.png',
+                                src: openerp.connection.server + '/web/static/src/img/icons/' + node.attrs['data-icon'] + '.png',
                                 width: '16',
                                 height: '16'
                             }
@@ -509,7 +509,7 @@ openerp.web_kanban.KanbanRecord = openerp.web.Widget.extend({
     },
     kanban_image: function(model, field, id) {
         id = id || '';
-        return '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + id;
+        return openerp.connection.server + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + id;
     },
     kanban_text_ellipsis: function(s, size) {
         size = size || 160;