Commit b2643ca3 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: use onEvent instead of addEventListener

parent 6f7772db
......@@ -173,9 +173,18 @@
selector.appendChild(el);
}
}
});
})
.push(function () {
selector.addEventListener("change", function (evt) {
.declareMethod('getContent', function () {
var input = this.element.querySelector('.photoInput'),
result = {};
result.field_your_document_scanner_gadget = input.value;
return result;
})
.onEvent("change", function (evt) {
if (evt.target.type == "select-one") {
return this.getElement()
.push(function (root) {
if (video) {
video.pause();
}
......@@ -183,15 +192,9 @@
return startup(root, evt.target.value);
}
});
});
}
}, false, true)
})
.declareMethod('getContent', function () {
var input = this.element.querySelector('.photoInput'),
result = {};
result.field_your_document_scanner_gadget = input.value;
return result;
})
.onEvent("click", function (evt) {
var canvasData;
if (evt.target.className == "startbutton") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment