Browse Source

using FieldBinaryImage-signature name

pull/267/head
eLBati 9 years ago
parent
commit
411e10e588
  1. 1225
      web_widget_digitized_signature/static/src/css/jquery-ui.css
  2. 4
      web_widget_digitized_signature/static/src/js/digital_sign.js
  3. 2
      web_widget_digitized_signature/static/src/xml/digital_sign.xml

1225
web_widget_digitized_signature/static/src/css/jquery-ui.css
File diff suppressed because it is too large
View File

4
web_widget_digitized_signature/static/src/js/digital_sign.js

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

2
web_widget_digitized_signature/static/src/xml/digital_sign.xml

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

Loading…
Cancel
Save