diff options
author | Chris Birk <cmbirk@gmail.com> | 2015-12-17 21:54:04 -0600 |
---|---|---|
committer | Chris Birk <cmbirk@gmail.com> | 2015-12-17 21:54:04 -0600 |
commit | 7f517eca0bf87b7b9b666e36aeb8cc219f3d80be (patch) | |
tree | e805e930d6ae8a5b817986d8c7e997a324f17f32 /src/static | |
parent | e98821cef745d1674bcdd72c96b00ab39ed8597c (diff) | |
download | etherpad-lite-7f517eca0bf87b7b9b666e36aeb8cc219f3d80be.zip |
check for soffice before removing export paths
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/js/pad_impexp.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/static/js/pad_impexp.js b/src/static/js/pad_impexp.js index 1648f34c..17886e8e 100644 --- a/src/static/js/pad_impexp.js +++ b/src/static/js/pad_impexp.js @@ -1,5 +1,5 @@ /** - * This code is mostly from the old Etherpad. Please help us to comment this code. + * This code is mostly from the old Etherpad. Please help us to comment this code. * This helps other people to understand this code better and helps them to improve it. * TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED */ @@ -46,7 +46,7 @@ var padimpexp = (function() $('#importmessagefail').fadeOut("fast"); var ret = window.confirm(html10n.get("pad.impexp.confirmimport")); if (ret) - { + { currentImportTimer = window.setTimeout(function() { if (!currentImportTimer) @@ -61,7 +61,7 @@ var padimpexp = (function() { disabled: true }).val(html10n.get("pad.impexp.importing")); - + window.setTimeout(function() { $('#importfileinput').attr( @@ -104,7 +104,7 @@ var padimpexp = (function() function importErrorMessage(status) { var msg=""; - + if(status === "convertFailed"){ msg = html10n.get("pad.impexp.convertFailed"); } else if(status === "uploadFailed"){ @@ -112,7 +112,7 @@ var padimpexp = (function() } else if(status === "padHasData"){ msg = html10n.get("pad.impexp.padHasData"); } - + function showError(fade) { $('#importmessagefail').html('<strong style="color: red">'+html10n.get('pad.impexp.importfailed')+':</strong> ' + (msg || html10n.get('pad.impexp.copypaste','')))[(fade ? "fadeIn" : "show")](); @@ -206,9 +206,11 @@ var padimpexp = (function() // activate action to import in the form $("#importform").attr('action', pad_root_url + "/import"); - - //hide stuff thats not avaible if abiword is disabled - if(clientVars.abiwordAvailable == "no") + + console.log(clientVars); + + //hide stuff thats not avaible if abiword/soffice is disabled + if(clientVars.exportAvailable == "no") { $("#exportworda").remove(); $("#exportpdfa").remove(); @@ -216,13 +218,13 @@ var padimpexp = (function() $("#importmessageabiword").show(); } - else if(clientVars.abiwordAvailable == "withoutPDF") + else if(clientVars.exportAvailable == "withoutPDF") { $("#exportpdfa").remove(); - + $("#exportworda").attr("href", pad_root_path + "/export/doc"); $("#exportopena").attr("href", pad_root_path + "/export/odt"); - + $("#importexport").css({"height":"142px"}); $("#importexportline").css({"height":"142px"}); } @@ -232,7 +234,7 @@ var padimpexp = (function() $("#exportpdfa").attr("href", pad_root_path + "/export/pdf"); $("#exportopena").attr("href", pad_root_path + "/export/odt"); } - + addImportFrames(); $("#importfileinput").change(fileInputUpdated); $('#importform').unbind("submit").submit(fileInputSubmit); |