[Libreoffice-commits] online.git: loleaflet/js

Henry Castro hcastro at collabora.com
Thu May 24 14:48:48 UTC 2018


 loleaflet/js/main.js |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit dc1da08afe22e2768f5787d0c5938fe90986efcf
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu May 24 10:46:59 2018 -0400

    loleaflet: fixed js lint errors in js/main.js
    
    Change-Id: Ic45030a3cc6695e379ed21084251991fcbc2ac9f

diff --git a/loleaflet/js/main.js b/loleaflet/js/main.js
index 1d0047c3e..cc1682338 100644
--- a/loleaflet/js/main.js
+++ b/loleaflet/js/main.js
@@ -1,12 +1,16 @@
+/* global errorMessages getParameterByName accessToken accessTokenTTL accessHeader vex host */
+/* global idleTimeoutSecs outOfFocusTimeoutSecs setupToolbar*/
+/*eslint indent: [error, "tab", { "outerIIFEBody": 0 }]*/
 (function (global) {
 
+var wopiParams;
 var wopiSrc = getParameterByName('WOPISrc');
 
-if (wopiSrc !== '' && access_token !== '') {
-	var wopiParams = { 'access_token': access_token, 'access_token_ttl': access_token_ttl };
+if (wopiSrc !== '' && accessToken !== '') {
+	wopiParams = { 'access_token': accessToken, 'access_token_ttl': accessTokenTTL };
 }
-else if (wopiSrc !== '' && access_header !== '') {
-	var wopiParams = { 'access_header': access_header };
+else if (wopiSrc !== '' && accessHeader !== '') {
+	wopiParams = { 'access_header': accessHeader };
 }
 
 var filePath = getParameterByName('file_path');
@@ -21,10 +25,10 @@ var alwaysActive = getParameterByName('alwaysactive');
 // Loleaflet Debug mode
 var debugMode = getParameterByName('debug');
 if (wopiSrc === '' && filePath === '') {
-    vex.dialog.alert(errorMessages.wrongwopisrc);
+	vex.dialog.alert(errorMessages.wrongwopisrc);
 }
 if (host === '') {
-    vex.dialog.alert(errorMessages.emptyhosturl);
+	vex.dialog.alert(errorMessages.emptyhosturl);
 }
 
 // loleaflet.js accesses these globals


More information about the Libreoffice-commits mailing list