diff --git a/Account/AccountManager.js b/Account/AccountManager.js index c156b4b..3cd173a 100644 --- a/Account/AccountManager.js +++ b/Account/AccountManager.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Account'); /** diff --git a/Account/AccountType.enum.js b/Account/AccountType.enum.js index 560a36c..8b0c229 100644 --- a/Account/AccountType.enum.js +++ b/Account/AccountType.enum.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Account'); jsOMS.Account.AccountType = Object.freeze({ diff --git a/Auth/Auth.js b/Auth/Auth.js index 545b4bc..f1964fa 100644 --- a/Auth/Auth.js +++ b/Auth/Auth.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Auth'); /** diff --git a/Chart/Chart.js b/Chart/Chart.js index 1cbe27b..3074766 100644 --- a/Chart/Chart.js +++ b/Chart/Chart.js @@ -1,5 +1,7 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart = function (id) { this.chartId = id; @@ -226,7 +228,7 @@ { return t[id]; }); - }) + }); } }; diff --git a/Chart/ChartLegend.js b/Chart/ChartLegend.js index 8e86af4..686e9e3 100644 --- a/Chart/ChartLegend.js +++ b/Chart/ChartLegend.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart.Legend = function () { this.position = {x: 0, y: 0}; this.relative = true; diff --git a/Chart/ColumnChart.js b/Chart/ColumnChart.js index 28c986d..2c01c05 100644 --- a/Chart/ColumnChart.js +++ b/Chart/ColumnChart.js @@ -1,5 +1,7 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart.ColumnChart = function (id) { this.chart = new jsOMS.Chart(id); diff --git a/Chart/LineChart.js b/Chart/LineChart.js index 2c575a6..321aed0 100644 --- a/Chart/LineChart.js +++ b/Chart/LineChart.js @@ -1,5 +1,7 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart.LineChart = function (id) { this.chart = new jsOMS.Chart(id); diff --git a/Chart/PieChart.js b/Chart/PieChart.js index da51fb0..92beedf 100644 --- a/Chart/PieChart.js +++ b/Chart/PieChart.js @@ -1,5 +1,7 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart.PieChart = function (id) { this.chart = new jsOMS.Chart(id); @@ -71,7 +73,7 @@ .sort(null) .value(function (d) { - return d.value + return d.value; }); dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset, function (c) diff --git a/Chart/TextElement.js b/Chart/TextElement.js index 57b2767..e47a062 100644 --- a/Chart/TextElement.js +++ b/Chart/TextElement.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Chart.TextElement = function() { }; }(window.jsOMS = window.jsOMS || {})); diff --git a/DataStorage/CacheManager.js b/DataStorage/CacheManager.js index 3d17ee1..062f307 100644 --- a/DataStorage/CacheManager.js +++ b/DataStorage/CacheManager.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.DataStorage'); // TODO: create comments diff --git a/DataStorage/CookieJar.js b/DataStorage/CookieJar.js index 7c177da..1a83e88 100644 --- a/DataStorage/CookieJar.js +++ b/DataStorage/CookieJar.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.DataStorage'); /** diff --git a/DataStorage/LocalStorage.js b/DataStorage/LocalStorage.js index 3184e3c..09cb313 100644 --- a/DataStorage/LocalStorage.js +++ b/DataStorage/LocalStorage.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.DataStorage'); /** diff --git a/DataStorage/StorageManager.js b/DataStorage/StorageManager.js index d2fe530..3bd1d69 100644 --- a/DataStorage/StorageManager.js +++ b/DataStorage/StorageManager.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.DataStorage'); jsOMS.DataStorage.StorageManager = function () diff --git a/Dispatcher/Dispatcher.js b/Dispatcher/Dispatcher.js index bd40ad1..5d05eeb 100644 --- a/Dispatcher/Dispatcher.js +++ b/Dispatcher/Dispatcher.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Dispatcher'); jsOMS.Dispatcher.Dispatcher = function () diff --git a/Math/Stochastic/Forecast/LinearRegression.js b/Math/Stochastic/Forecast/LinearRegression.js index 82d3ccc..187b862 100644 --- a/Math/Stochastic/Forecast/LinearRegression.js +++ b/Math/Stochastic/Forecast/LinearRegression.js @@ -24,7 +24,7 @@ for (let i = 0; i < count; i++) { sum1 += (y[i] - meanY) * (x[i] - meanX); - sum2 += (x[i] - meanX) ** 2; + sum2 += Math.pow(x[i] - meanX, 2); } b1 = sum1 / sum2; diff --git a/Message/Response/ResponseManager.js b/Message/Response/ResponseManager.js index f181694..8e8845d 100644 --- a/Message/Response/ResponseManager.js +++ b/Message/Response/ResponseManager.js @@ -74,5 +74,5 @@ } else { console.log('does not exist'); } - } + }; }(window.jsOMS = window.jsOMS || {})); diff --git a/Models/Account.js b/Models/Account.js index c5a913e..3eafb88 100644 --- a/Models/Account.js +++ b/Models/Account.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Account = function () { this.login = ''; this.password = ''; diff --git a/Module/ModuleFactory.js b/Module/ModuleFactory.js index cbbd9f1..7f48ca2 100644 --- a/Module/ModuleFactory.js +++ b/Module/ModuleFactory.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Module'); /** diff --git a/Module/ModuleManager.js b/Module/ModuleManager.js index 726ffdd..a4e37f4 100644 --- a/Module/ModuleManager.js +++ b/Module/ModuleManager.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Module'); /** diff --git a/Route/Route.js b/Route/Route.js index ac55081..2b86a2e 100644 --- a/Route/Route.js +++ b/Route/Route.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.Route'); // TODO: create comments diff --git a/Socket/Client/Client.js b/Socket/Client/Client.js index 2904e5b..c2be6e5 100644 --- a/Socket/Client/Client.js +++ b/Socket/Client/Client.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Client = function (ip, port, protocol) { this.port = port; this.ip = ip; @@ -30,7 +32,7 @@ var msg = JSON.parse(event.data); self.messages[msg.type](msg); - } + }; }; jsOMS.Client.prototype.send = function(msg) { @@ -39,5 +41,5 @@ jsOMS.Client.prototype.close = function() { this.connection.close(); - } + }; }(window.jsOMS = window.jsOMS || {})); diff --git a/UI/TabManager.js b/UI/TabManager.js index 6ef36a0..c65ab99 100644 --- a/UI/TabManager.js +++ b/UI/TabManager.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.UI'); /** diff --git a/UI/TableManager.js b/UI/TableManager.js index c43e824..45a3c42 100644 --- a/UI/TableManager.js +++ b/UI/TableManager.js @@ -9,6 +9,8 @@ */ (function (jsOMS) { + "use strict"; + jsOMS.Autoloader.defineNamespace('jsOMS.UI'); /** diff --git a/Validation/Validation.js b/Validation/Validation.js index 67ff9eb..838ab71 100644 --- a/Validation/Validation.js +++ b/Validation/Validation.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.Validation = function () { }; diff --git a/Views/TableView.js b/Views/TableView.js index fa100c6..d13d154 100644 --- a/Views/TableView.js +++ b/Views/TableView.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.TableView = function () { this.table = null; }; diff --git a/Views/ViewAbstract.js b/Views/ViewAbstract.js index c508914..0f167ee 100644 --- a/Views/ViewAbstract.js +++ b/Views/ViewAbstract.js @@ -1,4 +1,6 @@ (function (jsOMS) { + "use strict"; + jsOMS.ViewAbstract = function () { this.element = null;