Commit 3a8a824e authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

[erp5_officejs] cleanup gadget_officejs_page_export.js

Don't change anything, just make it pass the linter.
parent 839aff04
/*globals window, RSVP, rJS, loopEventListener, URL, document /*globals window, RSVP, rJS, jIO, loopEventListener, URL, document */
FileReader, console, navigator */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, navigator, RSVP, rJS, jIO, URL) { (function (window, RSVP, rJS, jIO, URL) {
"use strict"; "use strict";
var origin_url = (window.location.origin + window.location.pathname).replace( var origin_url = (window.location.origin + window.location.pathname)
"officejs_export/", ""), .replace("officejs_export/", ""),
application_dict = { application_dict = {
"Text Editor": { "Text Editor": {
"url": "officejs_text_editor/", "url": "officejs_text_editor/",
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
function exportZip(gadget, event) { function exportZip(gadget, event) {
var j, var j,
zip_name, zip_name,
i = 0,
form_result = {}, form_result = {},
len = event.target.length, len = event.target.length,
app; app;
...@@ -132,7 +131,7 @@ ...@@ -132,7 +131,7 @@
element.appendChild(a); element.appendChild(a);
a.style = "display: none"; a.style = "display: none";
a.href = url; a.href = url;
a.download = zip_name ? zip_name : default_name + ".zip"; a.download = zip_name || default_name + ".zip";
a.click(); a.click();
element.removeChild(a); element.removeChild(a);
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
...@@ -144,8 +143,7 @@ ...@@ -144,8 +143,7 @@
g.props = {}; g.props = {};
}) })
.declareMethod("fillZip", function (cache_file, site_url, no_installer) { .declareMethod("fillZip", function (cache_file, site_url, no_installer) {
var gadget = this, var file_storage = jIO.createJIO({
file_storage = jIO.createJIO({
type: "replicate", type: "replicate",
conflict_handling: 2, conflict_handling: 2,
check_remote_attachment_creation: true, check_remote_attachment_creation: true,
...@@ -199,4 +197,4 @@ ...@@ -199,4 +197,4 @@
}); });
}); });
}(window, navigator, RSVP, rJS, jIO, URL)); }(window, RSVP, rJS, jIO, URL));
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>967.36177.43828.39338</string> </value> <value> <string>970.26865.57530.41659</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1526388949.99</float> <float>1537525773.05</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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