11/**
2- * This code is mostly from the old Etherpad. Please help us to comment this code.
2+ * This code is mostly from the old Etherpad. Please help us to comment this code.
33 * This helps other people to understand this code better and helps them to improve it.
44 * TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
55 */
@@ -46,7 +46,7 @@ var padimpexp = (function()
4646 $ ( '#importmessagefail' ) . fadeOut ( "fast" ) ;
4747 var ret = window . confirm ( html10n . get ( "pad.impexp.confirmimport" ) ) ;
4848 if ( ret )
49- {
49+ {
5050 currentImportTimer = window . setTimeout ( function ( )
5151 {
5252 if ( ! currentImportTimer )
@@ -61,7 +61,7 @@ var padimpexp = (function()
6161 {
6262 disabled : true
6363 } ) . val ( html10n . get ( "pad.impexp.importing" ) ) ;
64-
64+
6565 window . setTimeout ( function ( )
6666 {
6767 $ ( '#importfileinput' ) . attr (
@@ -104,15 +104,15 @@ var padimpexp = (function()
104104 function importErrorMessage ( status )
105105 {
106106 var msg = "" ;
107-
107+
108108 if ( status === "convertFailed" ) {
109109 msg = html10n . get ( "pad.impexp.convertFailed" ) ;
110110 } else if ( status === "uploadFailed" ) {
111111 msg = html10n . get ( "pad.impexp.uploadFailed" ) ;
112112 } else if ( status === "padHasData" ) {
113113 msg = html10n . get ( "pad.impexp.padHasData" ) ;
114114 }
115-
115+
116116 function showError ( fade )
117117 {
118118 $ ( '#importmessagefail' ) . html ( '<strong style="color: red">' + html10n . get ( 'pad.impexp.importfailed' ) + ':</strong> ' + ( msg || html10n . get ( 'pad.impexp.copypaste' , '' ) ) ) [ ( fade ? "fadeIn" : "show" ) ] ( ) ;
@@ -206,23 +206,23 @@ var padimpexp = (function()
206206
207207 // activate action to import in the form
208208 $ ( "#importform" ) . attr ( 'action' , pad_root_url + "/import" ) ;
209-
210- //hide stuff thats not avaible if abiword is disabled
211- if ( clientVars . abiwordAvailable == "no" )
209+
210+ //hide stuff thats not avaible if abiword/soffice is disabled
211+ if ( clientVars . exportAvailable == "no" )
212212 {
213213 $ ( "#exportworda" ) . remove ( ) ;
214214 $ ( "#exportpdfa" ) . remove ( ) ;
215215 $ ( "#exportopena" ) . remove ( ) ;
216216
217217 $ ( "#importmessageabiword" ) . show ( ) ;
218218 }
219- else if ( clientVars . abiwordAvailable == "withoutPDF" )
219+ else if ( clientVars . exportAvailable == "withoutPDF" )
220220 {
221221 $ ( "#exportpdfa" ) . remove ( ) ;
222-
222+
223223 $ ( "#exportworda" ) . attr ( "href" , pad_root_path + "/export/doc" ) ;
224224 $ ( "#exportopena" ) . attr ( "href" , pad_root_path + "/export/odt" ) ;
225-
225+
226226 $ ( "#importexport" ) . css ( { "height" :"142px" } ) ;
227227 $ ( "#importexportline" ) . css ( { "height" :"142px" } ) ;
228228 }
@@ -232,7 +232,7 @@ var padimpexp = (function()
232232 $ ( "#exportpdfa" ) . attr ( "href" , pad_root_path + "/export/pdf" ) ;
233233 $ ( "#exportopena" ) . attr ( "href" , pad_root_path + "/export/odt" ) ;
234234 }
235-
235+
236236 addImportFrames ( ) ;
237237 $ ( "#importfileinput" ) . change ( fileInputUpdated ) ;
238238 $ ( '#importform' ) . unbind ( "submit" ) . submit ( fileInputSubmit ) ;
0 commit comments