3
0
Fork 0

using FieldBinaryImage-signature name

8.0
eLBati 2016-01-26 16:22:44 +01:00
parent f584b8f760
commit 411e10e588
3 changed files with 3 additions and 1228 deletions

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ openerp.web_widget_digitized_signature = function(instance) {
self.$el.find(".signature").hide();
val = self.$el.find(".signature > canvas")[0].toDataURL();
images[self.name] = val.split(',')[1]
var $img = $(QWeb.render("FieldBinaryImage-extend", { widget: self, url: val }));
var $img = $(QWeb.render("FieldBinaryImage-signature", { widget: self, url: val }));
self.$el.find('> img').remove();
self.$el.prepend($img);
self.set('value',val.split(',')[1])
@ -98,7 +98,7 @@ openerp.web_widget_digitized_signature = function(instance) {
field: field,
t: (new Date().getTime()),
});
var $img = $(QWeb.render("FieldBinaryImage-extend", { widget: self, url: url }));
var $img = $(QWeb.render("FieldBinaryImage-signature", { widget: self, url: url }));
self.$el.find('> img').remove();
}
});

View File

@ -7,7 +7,7 @@
<span class="oe_edit_only save_sign"></span>
</div>
</t>
<t t-name="FieldBinaryImage-extend">
<t t-name="FieldBinaryImage-signature">
<img t-att-src='url'
t-att-border="widget.readonly ? 0 : 1"
t-att-name="widget.name"