You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
540 B
16 lines
540 B
/*
|
|
* Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com>
|
|
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
|
*/
|
|
openerp.web_widget_image_download = function(instance) {
|
|
'use strict';
|
|
|
|
instance.web.form.web_widget_image_download = instance.web.form.FieldBinaryImage.include({
|
|
render_value() {
|
|
this._super();
|
|
|
|
// take image URI from preceding <img> tag
|
|
this.$el.find('.oe_form_binary_file_download').attr('href', $('img[name="image"]').attr('src'));
|
|
}
|
|
});
|
|
}
|