Commit 009ba429 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

lint issues

parent c1397e96
......@@ -786,7 +786,7 @@ ServerConnector.setToken = function(token) {
ServerConnector.getApiBaseUrl = function() {
return this.getServerBaseUrl()+"/api/";
}
};
ServerConnector.getServerBaseUrl = function() {
if (this._serverBaseUrl === undefined) {
......@@ -812,7 +812,7 @@ ServerConnector.createGetParams = function(params) {
result+= sorted[i] + "="+params[sorted[i]]+"&";
}
return result;
}
};
ServerConnector.getApiUrl = function(paramObj) {
var type = paramObj.type;
......@@ -821,7 +821,7 @@ ServerConnector.getApiUrl = function(paramObj) {
var result = this.getApiBaseUrl() + "/"+type+"/"+method+"?"+params;
return result;
}
};
ServerConnector.getProjectUrl = function(projectId, token) {
......@@ -914,7 +914,7 @@ ServerConnector.getAliasesUrl = function(params) {
id: id,
token: token},
});
}
};
ServerConnector.getConfigurationUrl = function(token) {
var result = this.getApiUrl({type:"configuration",
......@@ -925,6 +925,7 @@ ServerConnector.getConfigurationUrl = function(token) {
});
return result;
};
ServerConnector.getConfigurationParam = function(paramId) {
var self = this;
return new Promise(function(resolve, reject) {
......
......@@ -1352,7 +1352,7 @@ CustomMap.prototype.renderOverlayCollection = function(overlayCollection, fitBou
var bounds;
var promise = Promise.each(
Promise.each(
elements,
function(element) {
var model = self.getSubmodelById(element.modelId);
......
......@@ -200,18 +200,18 @@ MapModel.prototype.getMissingElements = function(elements) {
return new Promise(function(resolve, reject) {
Promise.all([reactionPromise, aliasPromise]).then(function(values) {
var result = [];
var result = [], i;
var reactions = values[0];
var aliases = values[1];
if (reactions!==null) {
for (var i=0;i<reactions.length;i++) {
for (i=0;i<reactions.length;i++) {
var reaction = reactions[i];
self.addReaction(reaction);
result.push(reaction);
}
}
if (aliases!==null) {
for (var i=0;i<aliases.length;i++) {
for (i=0;i<aliases.length;i++) {
var alias= aliases[i];
self.addAlias(alias);
result.push(alias);
......
......@@ -21,7 +21,7 @@ var AbstractOverlayElement = require('./AbstractOverlayElement');
* visualized (there is no simple way to visualize few layouts at the
* same time)
*/
function ReactionOverlay(layoutReaction, reactionData, map, customized, id) {
function ReactionOverlay(layoutReaction, reactionData, map, customized) {
// call super constructor
AbstractOverlayElement.call();
......
"use strict";
var logger = require('../../logger');
var AbstractInfoWindow = require('./AbstractInfoWindow');
var Reaction = require('../data/Reaction');
var ReactionMarker = require('../marker/ReactionMarker');
......
......@@ -218,7 +218,7 @@ ServerConnectorMock.readFile = function(url) {
ServerConnectorMock.getApiBaseUrl = function() {
return "./testFiles/apiCalls/";
}
};
var originalGetApiUrl = OriginalServerConnector.getApiUrl;
......@@ -226,6 +226,6 @@ ServerConnectorMock.getApiUrl = function(paramObj) {
//replace '?' with '/'
//the call is done on ServerConnectorObject (so 'this' is set properly)
return originalGetApiUrl.call(this, paramObj).replace(/\?/g, '/');
}
};
module.exports = ServerConnectorMock;
......@@ -7,7 +7,7 @@ var Project = require('../../main/js/map/data/Project');
var Reaction = require('../../main/js/map/data/Reaction');
var ServerConnector = require('../../main/js/ServerConnector');
var logger = require('./logger')
var logger = require('./logger');
var chai = require('chai');
var assert = chai.assert;
......@@ -16,6 +16,7 @@ describe('ServerConnector', function() {
return ServerConnector.getProject().then(function(result) {
assert.ok(result instanceof Project);
assert.equal(result.getProjectId(), "sample");
assert.equal(logger.getWarnings().length, 0);
});
});
......@@ -49,5 +50,4 @@ describe('ServerConnector', function() {
});
});
});
......@@ -2,7 +2,6 @@
var Helper = require('../../Helper');
var Alias = require('../../../../main/js/map/data/Alias');
var LayoutData = require('../../../../main/js/map/data/LayoutData');
var MapModel = require('../../../../main/js/map/data/MapModel');
var assert = require('chai').assert;
......
......@@ -2,7 +2,6 @@
var Helper = require('../../Helper');
var Reaction = require('../../../../main/js/map/data/Reaction');
var ReactionOverlay = require('../../../../main/js/map/overlay/ReactionOverlay');
var assert = require('assert');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment