[Libreoffice-commits] online.git: cypress_test/integration_tests loleaflet/admin loleaflet/.eslintrc loleaflet/js loleaflet/src

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 21 17:32:52 UTC 2020


 cypress_test/integration_tests/desktop/example_desktop_test_spec.js  |   24 +-
 cypress_test/integration_tests/desktop/example_desktop_test_spec2.js |   24 +-
 cypress_test/integration_tests/mobile/focus_spec.js                  |   34 +--
 cypress_test/integration_tests/mobile/toolbar_spec.js                |   96 +++++-----
 loleaflet/.eslintrc                                                  |    3 
 loleaflet/admin/src/AdminSocketOverview.js                           |    4 
 loleaflet/js/global.js                                               |   18 -
 loleaflet/src/control/Control.DownloadProgress.js                    |    2 
 loleaflet/src/control/Control.Header.js                              |    4 
 loleaflet/src/control/Control.Infobar.js                             |    2 
 loleaflet/src/control/Control.JSDialogBuilder.js                     |   16 -
 loleaflet/src/control/Control.LokDialog.js                           |    2 
 loleaflet/src/control/Control.Menubar.js                             |   10 -
 loleaflet/src/control/Control.MobileWizard.js                        |    6 
 loleaflet/src/control/Control.PartsPreview.js                        |    2 
 loleaflet/src/control/Control.RowHeader.js                           |    2 
 loleaflet/src/control/Control.Tabs.js                                |    2 
 loleaflet/src/control/Control.Toolbar.js                             |   12 -
 loleaflet/src/control/Signing.js                                     |    4 
 loleaflet/src/control/Toolbar.js                                     |    2 
 loleaflet/src/dom/Draggable.js                                       |    4 
 loleaflet/src/layer/CalcGridLines.js                                 |    2 
 loleaflet/src/layer/marker/TextInput.js                              |    2 
 loleaflet/src/layer/tile/GridLayer.js                                |    4 
 loleaflet/src/layer/tile/TileLayer.TableOverlay.js                   |    4 
 loleaflet/src/layer/tile/TileLayer.js                                |    4 
 loleaflet/src/layer/vector/Path.Drag.js                              |    2 
 loleaflet/src/map/Clipboard.js                                       |   10 -
 loleaflet/src/map/Map.js                                             |    2 
 29 files changed, 152 insertions(+), 151 deletions(-)

New commits:
commit 8081afc8e0e20a34f7d9b4086ded2e585929fc22
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Jan 16 15:44:23 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Jan 21 18:32:33 2020 +0100

    eslint: Enable "semi" rule as an error.
    
    This checks whether all statements end with a semicolon.
    We already use this rule in the code, so I enable to check
    this rule by eslint to keep the code consistent.
    
    Change-Id: I5ea46376d2b6fb488224d4d69e4d117139763a8c
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87154
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/integration_tests/desktop/example_desktop_test_spec.js b/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
index 8a39b455f..e6762e746 100644
--- a/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
+++ b/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
@@ -11,29 +11,29 @@ describe('Example test suit 1', function() {
 
 		// Open test document
 		cy.visit('http://localhost:9980/loleaflet/fc04ba550/loleaflet.html?file_path=file://' +
-		Cypress.env('WORKDIR') + 'simple.odt')
+			Cypress.env('WORKDIR') + 'simple.odt');
 
 		// Wait for the document to fully load
-		cy.get('.leaflet-tile-loaded')
+		cy.get('.leaflet-tile-loaded');
 
 		// Select a text
-		cy.get('#document-container').dblclick()
-		cy.get('.leaflet-marker-icon')
+		cy.get('#document-container').dblclick();
+		cy.get('.leaflet-marker-icon');
 
 		// Click on bold toolbar button
-		cy.get('#tb_editbar_item_bold').click()
+		cy.get('#tb_editbar_item_bold').click();
 
 		// Remove selection and do a reselection
-		cy.get('#document-container').click()
+		cy.get('#document-container').click();
 		cy.get('.leaflet-marker-icon').should('not.be.visible');
 
-		cy.get('#document-container').dblclick()
-		cy.get('.leaflet-marker-icon')
+		cy.get('#document-container').dblclick();
+		cy.get('.leaflet-marker-icon');
 
 		// Bold toolbar button is checked
-		cy.get('#tb_editbar_item_bold table.w2ui-button.checked')
+		cy.get('#tb_editbar_item_bold table.w2ui-button.checked');
 
 		// Click on bold toolbar button
-		cy.get('#tb_editbar_item_bold').click()
-	})
-})
+		cy.get('#tb_editbar_item_bold').click();
+	});
+});
diff --git a/cypress_test/integration_tests/desktop/example_desktop_test_spec2.js b/cypress_test/integration_tests/desktop/example_desktop_test_spec2.js
index 163a28c84..8eb72e561 100644
--- a/cypress_test/integration_tests/desktop/example_desktop_test_spec2.js
+++ b/cypress_test/integration_tests/desktop/example_desktop_test_spec2.js
@@ -11,29 +11,29 @@ describe('Example test suit 2', function() {
 
 		// Open test document
 		cy.visit('http://localhost:9980/loleaflet/fc04ba550/loleaflet.html?file_path=file://' +
-			Cypress.env('WORKDIR') + 'simple.odt')
+			Cypress.env('WORKDIR') + 'simple.odt');
 
 		// Wait for the document to fully load
-		cy.get('.leaflet-tile-loaded')
+		cy.get('.leaflet-tile-loaded');
 
 		// Select a text
-		cy.get('#document-container').dblclick()
-		cy.get('.leaflet-marker-icon')
+		cy.get('#document-container').dblclick();
+		cy.get('.leaflet-marker-icon');
 
 		// Click on bold toolbar button
-		cy.get('#tb_editbar_item_italic').click()
+		cy.get('#tb_editbar_item_italic').click();
 
 		// Remove selection and do a reselection
-		cy.get('#document-container').click()
+		cy.get('#document-container').click();
 		cy.get('.leaflet-marker-icon').should('not.be.visible');
 
-		cy.get('#document-container').dblclick()
-		cy.get('.leaflet-marker-icon')
+		cy.get('#document-container').dblclick();
+		cy.get('.leaflet-marker-icon');
 
 		// Bold toolbar button is checked
-		cy.get('#tb_editbar_item_italic table.w2ui-button.checked')
+		cy.get('#tb_editbar_item_italic table.w2ui-button.checked');
 
 		// Click on bold toolbar button
-		cy.get('#tb_editbar_item_italic').click()
-	})
-})
+		cy.get('#tb_editbar_item_italic').click();
+	});
+});
diff --git a/cypress_test/integration_tests/mobile/focus_spec.js b/cypress_test/integration_tests/mobile/focus_spec.js
index e960099f9..a02d4fa9a 100644
--- a/cypress_test/integration_tests/mobile/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/focus_spec.js
@@ -16,18 +16,18 @@ describe('Focus tests', function() {
 
 		// Wait for the document to fully load
 		cy.get('.leaflet-tile-loaded');
-	})
+	});
 
 	it('Focus after document fully loaded.', function() {
 		// The document body should have the focus
 		cy.document().its('activeElement.tagName')
-			.should('be.eq', 'BODY')
-	})
+			.should('be.eq', 'BODY');
+	});
 
 	it('Focus after closing a dialog.', function() {
 		// The document body has the focus first
 		cy.document().its('activeElement.tagName')
-			.should('be.eq', 'BODY')
+			.should('be.eq', 'BODY');
 
 		// Click on edit button
 		cy.get('#mobile-edit-button').click();
@@ -41,7 +41,7 @@ describe('Focus tests', function() {
 
 		// The dialog grabs the focus
 		cy.document().its('activeElement.className')
-			.should('be.eq', 'loleaflet-annotation-textarea')
+			.should('be.eq', 'loleaflet-annotation-textarea');
 
 		// Close the dialog
 		cy.contains('Cancel').click();
@@ -49,13 +49,13 @@ describe('Focus tests', function() {
 
 		// The document should have the focus again
 		cy.document().its('activeElement.tagName')
-			.should('be.eq', 'BODY')
-	})
+			.should('be.eq', 'BODY');
+	});
 
 	it('Focus when using insertion mobile wizard.', function() {
 		// The document body has the focus first
 		cy.document().its('activeElement.tagName')
-			.should('be.eq', 'BODY')
+			.should('be.eq', 'BODY');
 
 		// Click on edit button
 		cy.get('#mobile-edit-button').click();
@@ -71,22 +71,22 @@ describe('Focus tests', function() {
 		// This fails here: the document still has the focus
 		// The wizard changes the focus
 		//cy.document().its('activeElement.className')
-		//	.should('be.eq', 'clipboard')
+		//	.should('be.eq', 'clipboard');
 
 		// Close the mobile wizard
-		cy.get('#tb_actionbar_item_insertion_mobile_wizard').click()
+		cy.get('#tb_actionbar_item_insertion_mobile_wizard').click();
 		cy.get('#mobile-wizard').should('not.be.visible');
 
 		// This fails here: the focus is not on the document body
 		// The document should have the focus again
 		//cy.document().its('activeElement.tagName')
-		//	.should('be.eq', 'BODY')
-	})
+		//	.should('be.eq', 'BODY');
+	});
 
 	it('Focus after insertion.', function() {
 		// The document body has the focus first
 		cy.document().its('activeElement.tagName')
-			.should('be.eq', 'BODY')
+			.should('be.eq', 'BODY');
 
 		// Click on edit button
 		cy.get('#mobile-edit-button').click();
@@ -97,7 +97,7 @@ describe('Focus tests', function() {
 			.click();
 
 		cy.get('#mobile-wizard-content')
-			.should('not.be.empty')
+			.should('not.be.empty');
 
 		// Select More Fields
 		cy.get('.ui-header.level-0.mobile-wizard.ui-widget .sub-menu-title')
@@ -112,6 +112,6 @@ describe('Focus tests', function() {
 		// This fails here: the focus is not on the document body
 		// The document should have the focus again
 		//cy.document().its('activeElement.tagName')
-		//	.should('be.eq', 'BODY')
-	})
-})
+		//	.should('be.eq', 'BODY');
+	});
+});
diff --git a/cypress_test/integration_tests/mobile/toolbar_spec.js b/cypress_test/integration_tests/mobile/toolbar_spec.js
index 3b976c035..d284ee720 100644
--- a/cypress_test/integration_tests/mobile/toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/toolbar_spec.js
@@ -10,110 +10,110 @@ describe('Toolbar tests', function() {
 		});
 
 		// Open test document
-		cy.viewport('iphone-3')
+		cy.viewport('iphone-3');
 		cy.visit('http://localhost:9980/loleaflet/fc04ba550/loleaflet.html?file_path=file://' +
-			Cypress.env('WORKDIR') + 'empty.odt')
+			Cypress.env('WORKDIR') + 'empty.odt');
 
 		// Wait for the document to fully load
-		cy.get('.leaflet-tile-loaded')
+		cy.get('.leaflet-tile-loaded');
 	});
 
 	it('State of mobile wizard toolbar item.', function() {
 		// Mobile wizard toolbar button is disabled by default
 		cy.get('#tb_actionbar_item_mobile_wizard')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Button should be enabled now
 		cy.get('#tb_actionbar_item_mobile_wizard')
-			.should('not.have.class', 'disabled')
-	})
+			.should('not.have.class', 'disabled');
+	});
 
 	it('State of insertion mobile wizard toolbar item.', function() {
 		// Insertion mobile wizard toolbar button is disabled by default
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Button should be enabled now
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard')
-			.should('not.have.class', 'disabled')
-	})
+			.should('not.have.class', 'disabled');
+	});
 
 	it('State of insert comment toolbar item.', function() {
 		// Insertion mobile wizard toolbar button is disabled by default
 		cy.get('#tb_actionbar_item_insertcomment')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Button should be enabled now
 		cy.get('#tb_actionbar_item_insertcomment')
-			.should('not.have.class', 'disabled')
-	})
+			.should('not.have.class', 'disabled');
+	});
 
 	it('State of undo toolbar item.', function() {
 		// Insertion mobile wizard toolbar button is disabled by default
 		cy.get('#tb_actionbar_item_undo')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Button should be still disabled
 		cy.get('#tb_actionbar_item_undo')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Type somthing in the document
-		cy.get('#document-container').type('x')
+		cy.get('#document-container').type('x');
 
 		// Button should become enabled
 		cy.get('#tb_actionbar_item_undo')
-			.should('not.have.class', 'disabled')
-	})
+			.should('not.have.class', 'disabled');
+	});
 
 	it('State of redo toolbar item.', function() {
 		// Insertion mobile wizard toolbar button is disabled by default
 		cy.get('#tb_actionbar_item_redo')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Button should be still disabled
 		cy.get('#tb_actionbar_item_redo')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Type somthing in the document
-		cy.get('#document-container').type('x')
+		cy.get('#document-container').type('x');
 
 		// Button should be still disabled
 		cy.get('#tb_actionbar_item_redo')
-			.should('have.class', 'disabled')
+			.should('have.class', 'disabled');
 
 		// Do an undo
 		cy.get('#tb_actionbar_item_undo')
-			.should('not.have.class', 'disabled')
-		cy.get('#tb_actionbar_item_undo').click()
+			.should('not.have.class', 'disabled');
+		cy.get('#tb_actionbar_item_undo').click();
 
 		// Button should become enabled
 		cy.get('#tb_actionbar_item_redo')
-			.should('not.have.class', 'disabled')
-	})
+			.should('not.have.class', 'disabled');
+	});
 
 	it('Open and close mobile wizard by toolbar item.', function() {
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Click on mobile wizard toolbar item
 		cy.get('#tb_actionbar_item_mobile_wizard')
 			.should('not.have.class', 'disabled')
-			.click()
+			.click();
 
 		// Mobile wizard is opened and it has any content
 		cy.get('#mobile-wizard-content')
@@ -121,26 +121,26 @@ describe('Toolbar tests', function() {
 
 		// Toolbar button is checked
 		cy.get('#tb_actionbar_item_mobile_wizard table')
-			.should('have.class', 'checked')
+			.should('have.class', 'checked');
 
 		cy.get('#tb_actionbar_item_mobile_wizard')
-			.click()
+			.click();
 
 		// Mobile wizard is closed
 		cy.get('#mobile-wizard').should('not.be.visible');
 
 		cy.get('#tb_actionbar_item_mobile_wizard table')
-			.should('not.have.class', 'checked')
-	})
+			.should('not.have.class', 'checked');
+	});
 
 	it('Open and close insertion mobile wizard by toolbar item.', function() {
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Click on toolbar item
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard')
 			.should('not.have.class', 'disabled')
-			.click()
+			.click();
 
 		// Mobile wizard is opened and it has any content
 		cy.get('#mobile-wizard-content')
@@ -148,35 +148,35 @@ describe('Toolbar tests', function() {
 
 		// Toolbar button is checked
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard table')
-			.should('have.class', 'checked')
+			.should('have.class', 'checked');
 
 		// Click on toolbar item again
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard')
-			.click()
+			.click();
 
 		// Mobile wizard is closed
 		cy.get('#mobile-wizard').should('not.be.visible');
 
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard table')
-			.should('not.have.class', 'checked')
+			.should('not.have.class', 'checked');
 
 		// Open mobile wizard again
 		cy.get('#tb_actionbar_item_insertion_mobile_wizard')
-			.click()
+			.click();
 
 		// Mobile wizard is opened and it has any content
 		cy.get('#mobile-wizard-content')
 			.should('not.be.empty');
-	})
+	});
 
 	it('Open insert comment dialog by toolbar item.', function() {
 		// Click on edit button
-		cy.get('#mobile-edit-button').click()
+		cy.get('#mobile-edit-button').click();
 
 		// Click on toolbar item
 		cy.get('#tb_actionbar_item_insertcomment')
 			.should('not.have.class', 'disabled')
-			.click()
+			.click();
 
 		// Comment insertion dialog is opened
 		cy.get('.loleaflet-annotation-table')
@@ -184,9 +184,9 @@ describe('Toolbar tests', function() {
 
 		// Close the dialog
 		cy.contains('Cancel')
-			.click()
+			.click();
 
 		cy.get('.loleaflet-annotation-table')
 			.should('be.not.visible');
-	})
-})
+	});
+});
diff --git a/loleaflet/.eslintrc b/loleaflet/.eslintrc
index 48a6d2ad5..a5a054eef 100644
--- a/loleaflet/.eslintrc
+++ b/loleaflet/.eslintrc
@@ -16,7 +16,8 @@
     "strict": 0,
     "key-spacing": 0,
     "no-shadow": 0,
-    "no-console": 0
+    "no-console": 0,
+    "semi": 2
   },
   "globals": {
     "L": true,
diff --git a/loleaflet/admin/src/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js
index 029b36997..14784aaa0 100644
--- a/loleaflet/admin/src/AdminSocketOverview.js
+++ b/loleaflet/admin/src/AdminSocketOverview.js
@@ -51,7 +51,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
 		this.socket.send('active_users_count');
 		this.socket.send('sent_bytes');
 		this.socket.send('recv_bytes');
-		this.socket.send('uptime')
+		this.socket.send('uptime');
 	},
 
 	onSocketOpen: function() {
@@ -328,7 +328,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
 				nData = Util.humanizeMem(nData);
 			}
 			else if (sCommand === 'uptime') {
-				nData = Util.humanizeSecs(nData)
+				nData = Util.humanizeSecs(nData);
 			}
 			$(document.getElementById(sCommand)).text(nData);
 		}
diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 8445ecb4f..9e5578163 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -26,15 +26,15 @@
 		};
 		this.onopen = function() {
 		};
-	}
+	};
 
 	global.FakeWebSocket.prototype.close = function() {
-	}
+	};
 
 	global.FakeWebSocket.prototype.send = function(data) {
 		this.sendCounter++;
 		window.postMobileMessage(data);
-	}
+	};
 
 	// If not debug, don't print anything on the console
 	// except in tile debug mode (Ctrl-Shift-Alt-d)
@@ -71,7 +71,7 @@
 			}
 
 			return false;
-		}
+		};
 	}
 
 	// fix jquery-ui
@@ -122,7 +122,7 @@
 			wopiParams = { 'access_header': global.accessHeader };
 		}
 		docParams = Object.keys(wopiParams).map(function(key) {
-			return encodeURIComponent(key) + '=' + encodeURIComponent(wopiParams[key])
+			return encodeURIComponent(key) + '=' + encodeURIComponent(wopiParams[key]);
 		}).join('&');
 	} else {
 		global.docURL = filePath;
@@ -168,15 +168,15 @@
 				}
 				global.socket.send(msg);
 			}
-		}
+		};
 
 		global.socket.onerror = function (event) {
 			console.log(event);
-		}
+		};
 
 		global.socket.onclose = function (event) {
 			console.log(event);
-		}
+		};
 
 		global.socket.onmessage = function (event) {
 			if (typeof global.socket._onMessage === 'function') {
@@ -184,7 +184,7 @@
 			} else {
 				global.queueMsg.push(event.data);
 			}
-		}
+		};
 
 		global.socket.binaryType = 'arraybuffer';
 
diff --git a/loleaflet/src/control/Control.DownloadProgress.js b/loleaflet/src/control/Control.DownloadProgress.js
index 2fce6a714..7ad98d053 100644
--- a/loleaflet/src/control/Control.DownloadProgress.js
+++ b/loleaflet/src/control/Control.DownloadProgress.js
@@ -155,7 +155,7 @@ L.Control.DownloadProgress = L.Control.extend({
 				var reader = new FileReader();
 				reader.onload = function() {
 					var text = reader.result;
-					console.log('async clipboard parse done: ' + text.substring(0, 256))
+					console.log('async clipboard parse done: ' + text.substring(0, 256));
 					var idx = text.indexOf('<!DOCTYPE HTML');
 					if (idx > 0)
 						text = text.substring(idx, text.length);
diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js
index 7f77a1990..76eea58ee 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -222,7 +222,7 @@ L.Control.Header = L.Control.extend({
 	// Called whenever the cell cursor is in a cell corresponding to the cursorPos-th
 	// column/row.
 	updateCurrent: function (cursorPos, slim) {
-		if (!this._tickMap) {return}
+		if (!this._tickMap) {return;}
 
 		if (cursorPos < 0) {
 			this.unselect(this._tickMap.getGap(this._current));
@@ -845,7 +845,7 @@ L.Control.Header.GapTickMap = L.Class.extend({
 			end: end,
 			size: end - start,
 			pos: end,
-		}
+		};
 	},
 
 	// Returns true when the i-th gap has zero size.
diff --git a/loleaflet/src/control/Control.Infobar.js b/loleaflet/src/control/Control.Infobar.js
index ae1443177..b00d0cdb2 100644
--- a/loleaflet/src/control/Control.Infobar.js
+++ b/loleaflet/src/control/Control.Infobar.js
@@ -25,7 +25,7 @@ L.Control.Infobar = L.Control.extend({
 					var win = window.open(e.action, '_blank');
 					win.focus();
 				}
-			}
+			};
 		}
 
 		vex.dialog.open({
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index dcf9517e6..4308b1651 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -123,7 +123,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 						$(controlElement).click(
 							// avoid to access mutable variable (that is `i` dependent) in closure
 							(function (lhandler, leventData) {
-								return function() { lhandler(leventData) };
+								return function() { lhandler(leventData); };
 							})(handler, eventData)
 						);
 					}
@@ -246,7 +246,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 			var icon = L.DomUtil.create('img', 'menu-entry-icon', leftDiv);
 			icon.src = iconPath;
 			icon.alt = '';
-			titleClass = 'menu-entry-with-icon'
+			titleClass = 'menu-entry-with-icon';
 		}
 		var titleSpan = L.DomUtil.create('span', titleClass, leftDiv);
 
@@ -269,7 +269,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 			} else {
 				titleSpan.innerHTML = data.text;
 			}
-		}
+		};
 
 		updateCallback ? updateCallback(titleSpan) : updateFunction(titleSpan);
 
@@ -528,7 +528,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 				$(checkbox).attr('checked', 'checked');
 			else if (state)
 				$(checkbox).removeAttr('checked', 'checked');
-		}
+		};
 
 		updateFunction();
 
@@ -942,7 +942,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 				value = data.children[0].text;
 
 			$(spinfield).attr('value', builder._cleanValueFromUnits(value));
-		}
+		};
 
 		updateFunction();
 
@@ -1187,7 +1187,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 					$(button).addClass('selected');
 				else
 					$(button).removeClass('selected');
-			}
+			};
 
 			updateFunction();
 
@@ -1444,7 +1444,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 				if (window.insertionMobileWizard)
 					window.onClick(null, 'insertion_mobile_wizard');
 				else if (window.mobileMenuWizard)
-					$('#main-menu-state').click()
+					$('#main-menu-state').click();
 				else if (window.contextMenuWizard) {
 					window.contextMenuWizard = false;
 					builder.map.fire('closemobilewizard');
@@ -1462,7 +1462,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 					    data.checked && data.checked === true) {
 						return;
 					}
-					builder.map.sendUnoCommand(data.command)
+					builder.map.sendUnoCommand(data.command);
 				}
 			});
 		} else {
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index a0e9ff9b8..fecc36240 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -790,7 +790,7 @@ L.Control.LokDialog = L.Control.extend({
 			startX: offsetX,
 			startY: offsetY,
 			initScale: ratio
-		}
+		};
 		var transformation = {
 			translate: { x: offsetX, y: offsetY },
 			scale: ratio,
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index d55079042..9f90ab902 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -848,11 +848,11 @@ L.Control.Menubar = L.Control.extend({
 						return item.name === _(style);
 					};
 
-					var foundMenu = this._findSubMenuByName(target, _UNO('.uno:InsertPageHeader', 'text'))
+					var foundMenu = this._findSubMenuByName(target, _UNO('.uno:InsertPageHeader', 'text'));
 					if (foundMenu && foundMenu.menu.find(findFunction) === undefined)
 						foundMenu.menu.push({name: _(style), tag: style, uno: constHeader + encodeURIComponent(style) + constArg});
 
-					foundMenu = this._findSubMenuByName(target, _UNO('.uno:InsertPageFooter', 'text'))
+					foundMenu = this._findSubMenuByName(target, _UNO('.uno:InsertPageFooter', 'text'));
 					if (foundMenu && foundMenu.menu.find(findFunction) === undefined)
 						foundMenu.menu.push({name: _(style), tag: style, uno: constFooter + encodeURIComponent(style) + constArg});
 				}
@@ -1429,7 +1429,7 @@ L.Control.Menubar = L.Control.extend({
 			if (id && id == 'menu-' + targetId) {
 				return true;
 			}
-			return false
+			return false;
 		});
 		return found.length ? found : null;
 	},
@@ -1487,8 +1487,8 @@ L.Control.Menubar = L.Control.extend({
 		var docType = this._map.getDocType();
 		var target = this.options['mobileInsertMenu'][docType];
 
-		var menuStructure = this._generateMenuStructure(target, docType, true)
-		return menuStructure
+		var menuStructure = this._generateMenuStructure(target, docType, true);
+		return menuStructure;
 	},
 
 	_generateMenuStructure: function(item, docType, mainMenu) {
diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index 382838dc6..5e44b6154 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -185,11 +185,11 @@ L.Control.MobileWizard = L.Control.extend({
 			this._hideWizard();
 			this._currentDepth = 0;
 			if (window.mobileWizard === true) {
-				w2ui['actionbar'].click('mobile_wizard')
+				w2ui['actionbar'].click('mobile_wizard');
 			} else if (window.insertionMobileWizard === true) {
-				w2ui['actionbar'].click('insertion_mobile_wizard')
+				w2ui['actionbar'].click('insertion_mobile_wizard');
 			} else if (window.mobileMenuWizard === true) {
-				$('#main-menu-state').click()
+				$('#main-menu-state').click();
 			} else if (window.contextMenuWizard) {
 				window.contextMenuWizard = false;
 				this.map.fire('closemobilewizard');
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index abaf996ec..95710df06 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -438,7 +438,7 @@ L.Control.PartsPreview = L.Control.extend({
 		if (elem) {
 			elem.setAttribute('draggable', true);
 			elem.addEventListener('dragstart', this._handleDragStart, false);
-			elem.addEventListener('dragenter', this._handleDragEnter, false)
+			elem.addEventListener('dragenter', this._handleDragEnter, false);
 			elem.addEventListener('dragover', this._handleDragOver, false);
 			elem.addEventListener('dragleave', this._handleDragLeave, false);
 			elem.addEventListener('drop', this._handleDrop, false);
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index c29d64000..8709a72c5 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -243,7 +243,7 @@ L.Control.RowHeader = L.Control.Header.extend({
 			var w = width - 4;
 			var size = 2;
 			var offset = 1;
-			ctx.fillStyle = '#BBBBBB'
+			ctx.fillStyle = '#BBBBBB';
 			ctx.fillRect(x + 2, center - size - offset, w - 4, size);
 			ctx.fillRect(x + 2, center + offset, w - 4, size);
 		}
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index ac4b0f40b..14546117c 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -126,7 +126,7 @@ L.Control.Tabs = L.Control.extend({
 							} else {
 								$('spreadsheet-tab' + j).contextMenu();
 							}
-						}
+						};
 					}(i).bind(this));
 
 					tab.textContent = e.partNames[i];
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index f09b4dea7..24c416e96 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -264,10 +264,10 @@ function onClick(e, id, item, subItem) {
 		onColorPick(id, e.color);
 	}
 	else if (id === 'backcolor' && typeof e.color !== 'undefined') {
-		onColorPick(id, e.color)
+		onColorPick(id, e.color);
 	}
 	else if (id === 'backgroundcolor' && typeof e.color !== 'undefined') {
-		onColorPick(id, e.color)
+		onColorPick(id, e.color);
 	}
 	else if (id === 'sum') {
 		map.sendUnoCommand('.uno:AutoSum');
@@ -501,7 +501,7 @@ function insertTable() {
 
 			map._socket.sendMessage(msg);
 
-			closePopup()
+			closePopup();
 		}
 	}, '.col');
 }
@@ -1072,7 +1072,7 @@ function initNormalToolbar() {
 		});
 	}
 
-	toolbar = $('#spreadsheet-toolbar')
+	toolbar = $('#spreadsheet-toolbar');
 	toolbar.w2toolbar({
 		name: 'spreadsheet-toolbar',
 		tooltip: 'bottom',
@@ -1744,7 +1744,7 @@ function onDocLayerInit() {
 		tags: true,
 		sorter: function(data) { return data.sort(function(a, b) {
 			return parseFloat(a.text) - parseFloat(b.text);
-		})}
+		});}
 	});
 	$('.fontsizes-select').off('select2:select', onFontSizeSelect).on('select2:select', onFontSizeSelect);
 }
@@ -2205,7 +2205,7 @@ function onUpdatePermission(e) {
 		// copy the first array
 		var items = toolbar.items.slice();
 		for (var idx in items) {
-			var found = enabledButtons.filter(function(id) { return id === items[idx].id });
+			var found = enabledButtons.filter(function(id) { return id === items[idx].id; });
 			var alwaysEnable = found.length !== 0;
 
 			if (e.perm === 'edit') {
diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js
index 4489f325f..7a253ddf0 100644
--- a/loleaflet/src/control/Signing.js
+++ b/loleaflet/src/control/Signing.js
@@ -12,7 +12,7 @@ var passportCertificates = [];
 
 var oldtoolbarSize = null;
 var _map = null;
-var currentDocumentSigningStatus = 'N/A'
+var currentDocumentSigningStatus = 'N/A';
 
 var awaitForDocumentStatusToUpload = false;
 var currentDocumentType = null;
@@ -389,7 +389,7 @@ function vereignExportSignAndUploadToVereign(documentType) {
 						wopiUrl: getVereignWopiURL() + 'files',
 						token: resultArray[i].AccessToken,
 						type: documentType
-					}
+					};
 					var blob = new Blob(['exportsignanduploaddocument\n', JSON.stringify(parameters)]);
 					_map._socket.sendMessage(blob);
 				}
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index cd912777e..2d9e007f2 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -231,7 +231,7 @@ L.Map.include({
 				buttons: {},
 				afterOpen: function() {
 					var $vexContent = $(this.contentEl);
-					this.contentEl.style.width = w + 'px'
+					this.contentEl.style.width = w + 'px';
 					map.enable(false);
 					var i;
 					// Display keyboard shortcut or online help
diff --git a/loleaflet/src/dom/Draggable.js b/loleaflet/src/dom/Draggable.js
index d3183704a..5ed23ed73 100644
--- a/loleaflet/src/dom/Draggable.js
+++ b/loleaflet/src/dom/Draggable.js
@@ -151,9 +151,9 @@ L.Draggable = L.Evented.extend({
 		this._newPos = this._startPos.add(offset);
 
 		if (this._freezeY)
-			this._newPos.y = this._startPos.y
+			this._newPos.y = this._startPos.y;
 		if (this._freezeX)
-			this._newPos.x = this._startPos.x
+			this._newPos.x = this._startPos.x;
 
 		this._moving = true;
 
diff --git a/loleaflet/src/layer/CalcGridLines.js b/loleaflet/src/layer/CalcGridLines.js
index 8d745999d..4b4e58d3a 100644
--- a/loleaflet/src/layer/CalcGridLines.js
+++ b/loleaflet/src/layer/CalcGridLines.js
@@ -51,7 +51,7 @@ L.CalcGridLines = L.LayerGroup.extend({
 					str = 'M0 0';
 				}
 
-				this._setPath(layer, str, closed)
+				this._setPath(layer, str, closed);
 			}.bind(this.options.renderer);
 		}
 
diff --git a/loleaflet/src/layer/marker/TextInput.js b/loleaflet/src/layer/marker/TextInput.js
index bc6d047a7..6a404298e 100644
--- a/loleaflet/src/layer/marker/TextInput.js
+++ b/loleaflet/src/layer/marker/TextInput.js
@@ -56,7 +56,7 @@ L.TextInput = L.Layer.extend({
 		}).on('dragend', this._onCursorHandlerDragEnd, this);
 
 		var that = this;
-		this._selectionHandler = function(ev) { that._onEvent(ev); }
+		this._selectionHandler = function(ev) { that._onEvent(ev); };
 
 		// Auto-correct characters can trigger auto-correction, but
 		// must be sent as key-up/down if we want correction.
diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index ee8b4c9de..4ff2d4877 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -25,7 +25,7 @@ L.GridLayer = L.Layer.extend({
 	initialize: function (options) {
 		L.setOptions(this, options);
 
-		this._resetClientVisArea()
+		this._resetClientVisArea();
 	},
 
 	onAdd: function () {
@@ -747,7 +747,7 @@ L.GridLayer = L.Layer.extend({
 			// Visible area is dirty, update it on the server
 			this._map._socket.sendMessage(newClientVisibleArea);
 			if (!this._map._fatal && this._map._active && this._map._socket.connected())
-				this._clientVisibleArea = newClientVisibleArea
+				this._clientVisibleArea = newClientVisibleArea;
 			if (this._debug) {
 				this._debugInfo.clearLayers();
 				for (var key in this._tiles) {
diff --git a/loleaflet/src/layer/tile/TileLayer.TableOverlay.js b/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
index 96c27ecb5..98a188dfd 100644
--- a/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
+++ b/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
@@ -19,7 +19,7 @@ L.TileLayer.include({
 		return point.x;
 	},
 	_convertTwipsToPixels: function(twips) {
-		var point = this._twipsToLatLng(twips)
+		var point = this._twipsToLatLng(twips);
 		point = this._map.project(point);
 		return point;
 	},
@@ -349,7 +349,7 @@ L.TileLayer.include({
 					type : 'int32',
 					value : offset
 				}
-			}
+			};
 
 			this._map.sendUnoCommand('.uno:TableChangeCurrentBorderPosition', params);
 		}
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index f031a2050..a00acab4f 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -773,7 +773,7 @@ L.TileLayer = L.GridLayer.extend({
 				index: idx,
 				enabled: true,
 				children: []
-			}
+			};
 			entries.push(entry);
 			entries[entries.length-1].children[0] = {
 				id: '',
@@ -1147,7 +1147,7 @@ L.TileLayer = L.GridLayer.extend({
 		}
 
 		if (this._map._viewInfo[editorId])
-			this._map.fire('updateEditorName', {username: this._map._viewInfo[editorId].username})
+			this._map.fire('updateEditorName', {username: this._map._viewInfo[editorId].username});
 	},
 
 	_onInvalidateViewCursorMsg: function (textMsg) {
diff --git a/loleaflet/src/layer/vector/Path.Drag.js b/loleaflet/src/layer/vector/Path.Drag.js
index 0b8193247..47fd8e0e2 100644
--- a/loleaflet/src/layer/vector/Path.Drag.js
+++ b/loleaflet/src/layer/vector/Path.Drag.js
@@ -271,7 +271,7 @@ L.Handler.PathDrag = L.Handler.extend(/** @lends  L.Path.Drag.prototype */ {
 
 		if (!this._path.options.manualDrag && !moved) {
 			this._path._map._handleDOMEvent(this._mouseDown);
-			this._path._map._handleDOMEvent(evt)
+			this._path._map._handleDOMEvent(evt);
 		}
 	},
 
diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js
index a3a4c3add..b4d76884a 100644
--- a/loleaflet/src/map/Clipboard.js
+++ b/loleaflet/src/map/Clipboard.js
@@ -39,7 +39,7 @@ L.Clipboard = L.Class.extend({
 		this._resetDiv();
 
 		var that = this;
-		var beforeSelect = function(ev) { return that._beforeSelect(ev); }
+		var beforeSelect = function(ev) { return that._beforeSelect(ev); };
 		if (L.Browser.isInternetExplorer)
 		{
 			document.addEventListener('cut',   function(ev)   { return that.cut(ev); });
@@ -261,7 +261,7 @@ L.Clipboard = L.Class.extend({
 					'POST', dest, formData,
 					function() {
 						console.log('up-load done, now paste');
-						that._map._socket.sendMessage('uno .uno:Paste')
+						that._map._socket.sendMessage('uno .uno:Paste');
 					},
 					function(progress) { return 50 + progress/2; }
 				);
@@ -289,7 +289,7 @@ L.Clipboard = L.Class.extend({
 					'POST', dest, formData,
 					function() {
 						console.log('up-load of fallback done, now paste');
-						that._map._socket.sendMessage('uno .uno:Paste')
+						that._map._socket.sendMessage('uno .uno:Paste');
 					},
 					function(progress) { return 50 + progress/2; },
 					function() {
@@ -381,7 +381,7 @@ L.Clipboard = L.Class.extend({
 					if (files !== null)
 					{
 						for (var f = 0; f < files.length; ++f)
-							this._asyncReadPasteImage(files[f])
+							this._asyncReadPasteImage(files[f]);
 					}
 					else // IE / Edge
 						this._asyncReadPasteImage(dataTransfer.items[t].getAsFile());
@@ -612,7 +612,7 @@ L.Clipboard = L.Class.extend({
 				console.log('help did not arive for ' + operation);
 				that._warnCopyPaste();
 			}
-		}, 150 /* ms */)
+		}, 150 /* ms */);
 	},
 
 	// Pull UNO clipboard commands out from menus and normal user input.
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 99d555b08..19ff81155 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1761,7 +1761,7 @@ L.Map = L.Evented.extend({
 		if (itemCommand.includes('sep'))
 			return null;
 
-		var itemText = ''
+		var itemText = '';
 		if (menu.name)
 			itemText = menu.name;
 


More information about the Libreoffice-commits mailing list