Commit d6db0ad0 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: Add spinner in button to show that we are saving it in background

parent ae0cf30a
......@@ -178,6 +178,7 @@
function buildPreviousThumbnailDom(gadget) {
var i,
img_class,
btn_class = "",
len = gadget.state.page_count,
thumbnail_dom_list = [];
......@@ -198,8 +199,13 @@
} else {
img_class = "show-img";
}
if (gadget.state['blob_state_' + i] === "saving") {
btn_class = "ui-btn-icon-left ui-icon-spinner";
}
thumbnail_dom_list.push(domsugar('button', {
type: "button",
"class": btn_class,
// Do not allow to show again the current image
// or do not allow to show saving image (to simplify button management)
disabled: (i === gadget.state.page) || (gadget.state['blob_state_' + i] === 'saving')
......@@ -477,7 +483,6 @@
// Only refresh the thumbnail list
// if display_step is not modified
// XXX TODO use a more precise selector
return buildPreviousThumbnailDom(gadget)
.push(function (result) {
thumbnail_container = gadget.element.querySelector('.thumbnail-list');
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.42519.52255.48861</string> </value>
<value> <string>981.43882.8130.35481</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1580941317.11</float>
<float>1581025205.74</float>
<string>UTC</string>
</tuple>
</state>
......
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