Commit 5d6d2ec7 authored by Roque's avatar Roque

erp5_officejs: control export pdf action submit

- this change relies on erp5_notebook bt changes done in this MR: nexedi/erp5-bin!6
parent e45dd6bd
......@@ -40,6 +40,13 @@
html_data = result.element
.querySelector('[data-gadget-scope="editor"]').firstChild
.contentDocument.body.firstChild.contentDocument.firstChild;
var notebook_execution_done = html_data.querySelector('[id="jsmd_eval_done"]');
if (!notebook_execution_done) {
return_submit_dict.notify = {
message: "Wait until the notebook is fully executed",
status: "error"
};
} else {
pagedjs_style.setAttribute('type', 'text/css');
pagedjs_style.setAttribute('href', 'interface.css');
pagedjs_script.setAttribute('src', 'paged.polyfill.js');
......@@ -50,8 +57,6 @@
print_preview_window.document.head.appendChild(pagedjs_script);
print_preview_window.document.close();
print_preview_window.print();
})
.push(function () {
return_submit_dict.redirect = {
command: 'display',
options: {
......@@ -59,8 +64,10 @@
editable: true
}
};
}
return return_submit_dict;
}, function (error) {
})
.push(undefined, function (error) {
console.log("ERROR:", error);
return_submit_dict.notify = {
message: "Failure exporting document",
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.17537.2534.409</string> </value>
<value> <string>987.17718.49419.27716</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1602602949.99</float>
<float>1602614478.01</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