loleaflet/src/control/Control.Buttons.js  |    2 +-
 loleaflet/src/control/Control.Parts.js    |   20 ++++++++++----------
 loleaflet/src/control/Parts.js            |    4 ++--
 loleaflet/src/control/Permission.js       |    1 -
 loleaflet/src/core/Log.js                 |    2 +-
 loleaflet/src/layer/tile/GridLayer.js     |   12 ++++++------
 loleaflet/src/layer/tile/TileLayer.js     |    8 ++++----
 loleaflet/src/map/handler/Map.Keyboard.js |    2 +-
 loleaflet/src/map/handler/Map.Mouse.js    |    2 +-
 9 files changed, 26 insertions(+), 27 deletions(-)

New commits:
commit 4ceab5f09525eabca4f2f90b6adaf752580e6c98
Author: Mihai Varga <mihai.va...@collabora.com>
Date:   Thu Jul 16 18:18:30 2015 +0300

    loleaflet: fixed js errors detected by lint

diff --git a/loleaflet/src/control/Control.Buttons.js 
b/loleaflet/src/control/Control.Buttons.js
index 432dfa0..7297f86 100644
--- a/loleaflet/src/control/Control.Buttons.js
+++ b/loleaflet/src/control/Control.Buttons.js
@@ -21,7 +21,7 @@ L.Control.Buttons = L.Control.extend({
                        'alignright':    {title: 'Align right',        uno: 
'AlignRight',  iconName: 'alignright.png'},
                        'alignblock':    {title: 'Justified',          uno: 
'AlignBlock',  iconName: 'alignblock.png'},
                        'save':          {title: 'Save',               uno: 
'Save',        iconName: 'save.png'},
-                       'saveas':        {title: 'Save As',            uno: '', 
           iconName: 'saveas.png'},
+                       'saveas':        {title: 'Save As',            uno: '', 
           iconName: 'saveas.png'}
                };
                for (var key in this._buttons) {
                        var button = this._buttons[key];
diff --git a/loleaflet/src/control/Control.Parts.js 
b/loleaflet/src/control/Control.Parts.js
index 9a566f6..ca8d5e2 100644
--- a/loleaflet/src/control/Control.Parts.js
+++ b/loleaflet/src/control/Control.Parts.js
@@ -74,7 +74,7 @@ L.Control.Parts = L.Control.extend({
                        L.DomUtil.setStyle(docContainer, 'left', '200px');
                        setTimeout(L.bind(function () {
                                this._map.invalidateSize();
-                               
$("#scroll-container").mCustomScrollbar('update');
+                               
$('#scroll-container').mCustomScrollbar('update');
                        }, this), 500);
                        var container = L.DomUtil.get('parts-preview');
                        for (var i = 0; i < parts; i++) {
@@ -96,15 +96,15 @@ L.Control.Parts = L.Control.extend({
                if (docType === 'spreadsheet') {
                        if (!this._tabsInitialized) {
                                // make room for the preview
-                               var docContainer = 
L.DomUtil.get('document-container');
+                               docContainer = 
L.DomUtil.get('document-container');
                                L.DomUtil.setStyle(docContainer, 'bottom', 
'20px');
                                setTimeout(L.bind(function () {
                                        this._map.invalidateSize();
-                                       
$("#scroll-container").mCustomScrollbar('update');
+                                       
$('#scroll-container').mCustomScrollbar('update');
                                }, this), 500);
-                               var container = 
L.DomUtil.get('spreadsheet-tab');
-                               for (var i = 0; i < parts; i++) {
-                                       var id = 'spreadsheet-tab' + i;
+                               container = L.DomUtil.get('spreadsheet-tab');
+                               for (i = 0; i < parts; i++) {
+                                       id = 'spreadsheet-tab' + i;
                                        var tab = L.DomUtil.create('li', '', 
container);
                                        tab.innerHTML = 'Sheet ' + (i + 1);
                                        tab.id = id;
@@ -117,11 +117,11 @@ L.Control.Parts = L.Control.extend({
                                }
                                this._tabsInitialized = true;
                        }
-                       for (key in this._spreadsheetTabs) {
+                       for (var key in this._spreadsheetTabs) {
                                var part =  parseInt(key.match(/\d+/g)[0]);
-                               
L.DomUtil.removeClass(this._spreadsheetTabs[key], "selected");
+                               
L.DomUtil.removeClass(this._spreadsheetTabs[key], 'selected');
                                if (part === currentPart) {
-                                       
L.DomUtil.addClass(this._spreadsheetTabs[key], "selected");
+                                       
L.DomUtil.addClass(this._spreadsheetTabs[key], 'selected');
                                }
                        }
                }
@@ -144,7 +144,7 @@ L.Control.Parts = L.Control.extend({
                                theme: 'dark-thick',
                                scrollInertia: 0,
                                alwaysShowScrollbar: 1});
-               }
+               };
 
                this._previewTiles[id].src = e.tile;
        }
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index 9ee871b..30eddd9 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -3,7 +3,7 @@
  */
 L.Map.include({
        setPart: function (part) {
-               var docLayer = this._docLayer
+               var docLayer = this._docLayer;
                if (part === 'prev') {
                        if (docLayer._currentPart > 0) {
                                docLayer._currentPart -= 1;
@@ -14,7 +14,7 @@ L.Map.include({
                                docLayer._currentPart += 1;
                        }
                }
-               else if (typeof(part) === 'number' && part >= 0 && part < 
docLayer._parts) {
+               else if (typeof (part) === 'number' && part >= 0 && part < 
docLayer._parts) {
                        docLayer._currentPart = part;
                }
                else {
diff --git a/loleaflet/src/control/Permission.js 
b/loleaflet/src/control/Permission.js
index f48d2e4..9950612 100644
--- a/loleaflet/src/control/Permission.js
+++ b/loleaflet/src/control/Permission.js
@@ -38,4 +38,3 @@ L.Map.include({
                L.DomUtil.removeClass(this._container, className);
        }
 });
-
diff --git a/loleaflet/src/core/Log.js b/loleaflet/src/core/Log.js
index e2a1355..dcb9045 100644
--- a/loleaflet/src/core/Log.js
+++ b/loleaflet/src/core/Log.js
@@ -8,7 +8,7 @@ L.Log = {
                if (!this._logs) {
                        this._logs = [];
                }
-               msg = msg.replace(/(\r\n|\n|\r)/gm,' ');
+               msg = msg.replace(/(\r\n|\n|\r)/gm, ' ');
                this._logs.push({msg : msg, direction : direction,
                        coords : tileCoords, time : time});
        },
diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index f59a15d..b8f6f5c 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -793,17 +793,17 @@ L.GridLayer = L.Layer.extend({
                if (this._pendingTilesCount > 0) {
                        return;
                }
-               var center = map.getCenter();
-               var zoom = map.getZoom();
+               var center = this._map.getCenter();
+               var zoom = this._map.getZoom();
                var tilesToFetch = 10;
                var maxBorderWidth = 5;
-               if (this._premission === 'edit') {
+               if (this._permission === 'edit') {
                        tilesToFetch = 2;
                        maxBorderWidth = 2;
                }
 
                if (!this._preFetchBorder) {
-                       var pixelBounds = map.getPixelBounds(center, zoom),
+                       var pixelBounds = this._map.getPixelBounds(center, 
zoom),
                                tileBorder = 
this._pxBoundsToTileRange(pixelBounds);
                        this._preFetchBorder = tileBorder;
                }
@@ -846,8 +846,8 @@ L.GridLayer = L.Layer.extend({
                        for (i = 0; i < queue.length && tilesToFetch > 0; i++) {
                                coords = queue[i];
                                coords.z = zoom;
-                               coords.part = this._currentPart,
-                               key = this._tileCoordsToKey(coords);
+                               coords.part = this._currentPart;
+                               var key = this._tileCoordsToKey(coords);
 
                                if (!this._isValidTile(coords) ||
                                                this._tiles[key] ||
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 42a59f4..7efd7ce 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -276,7 +276,7 @@ L.TileLayer = L.GridLayer.extend({
                                                                        
'tileheight=' + this._tileHeightTwips, key);
                                }
                        }
-                       for (var key in this._tileCache) {
+                       for (key in this._tileCache) {
                                // compute the rectangle that each tile covers 
in the document based
                                // on the zoom level
                                coords = this._keyToTileCoords(key);
@@ -298,7 +298,7 @@ L.TileLayer = L.GridLayer.extend({
                        var unoCmd = unoMsg.match('.uno:(.*)=')[1];
                        var state = unoMsg.match('.*=(.*)')[1];
                        if (unoCmd && state) {
-                               map.fire('statechanged', {unoCmd : unoCmd, 
state : state});
+                               this._map.fire('statechanged', {unoCmd : 
unoCmd, state : state});
                        }
                }
                else if (textMsg.startsWith('status:')) {
@@ -352,7 +352,7 @@ L.TileLayer = L.GridLayer.extend({
                        var tile = this._tiles[key];
                        var img = 'data:image/png;base64,' + 
window.btoa(strBytes);
                        if (command.id !== undefined) {
-                               map.fire('tilepreview', {
+                               this._map.fire('tilepreview', {
                                        tile: img,
                                        id: command.id,
                                        width: command.width,
@@ -436,7 +436,7 @@ L.TileLayer = L.GridLayer.extend({
                else if (textMsg.startsWith('searchnotfound:')) {
                        this._map.fire('searchnotfound');
                }
-        else if (textMsg.startsWith('error:')) {
+               else if (textMsg.startsWith('error:')) {
                        vex.dialog.alert(textMsg);
                }
        },
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 084fc03..6078829 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -3,7 +3,7 @@
  */
 
 L.Map.mergeOptions({
-       keyboard: true,
+       keyboard: true
 });
 
 L.Map.Keyboard = L.Handler.extend({
diff --git a/loleaflet/src/map/handler/Map.Mouse.js 
b/loleaflet/src/map/handler/Map.Mouse.js
index 270bdb2..ddd4d8d 100644
--- a/loleaflet/src/map/handler/Map.Mouse.js
+++ b/loleaflet/src/map/handler/Map.Mouse.js
@@ -3,7 +3,7 @@
  */
 
 L.Map.mergeOptions({
-       mouse: true,
+       mouse: true
 });
 
 L.Map.Mouse = L.Handler.extend({
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to