diff options
author | sgiehl <stefan@piwik.org> | 2018-12-03 23:38:52 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2018-12-03 23:38:52 +0300 |
commit | 4da5b745e5f835edaf636170c6791bde5ca58c08 (patch) | |
tree | 5f002448a08018359a7389926159f28c6939ed2c /plugins | |
parent | 168a035b9d76012947bba615b32efe025dcf2263 (diff) |
cs/ws
Diffstat (limited to 'plugins')
12 files changed, 21 insertions, 28 deletions
diff --git a/plugins/CoreAdminHome/angularjs/branding/branding.controller.js b/plugins/CoreAdminHome/angularjs/branding/branding.controller.js index 97377941c0..f705c4ff6f 100644 --- a/plugins/CoreAdminHome/angularjs/branding/branding.controller.js +++ b/plugins/CoreAdminHome/angularjs/branding/branding.controller.js @@ -57,10 +57,10 @@ // Upload succeed, so we update the images availability // according to what have been uploaded if (isSubmittingLogo) { - $('#currentLogo').data("srcExists", true) + $('#currentLogo').data("srcExists", true); } if (isSubmittingFavicon) { - $('#currentFavicon').data("srcExists", true) + $('#currentFavicon').data("srcExists", true); } refreshCustomLogo(); } diff --git a/plugins/CoreAdminHome/angularjs/trackingcode/jstrackingcode.controller.js b/plugins/CoreAdminHome/angularjs/trackingcode/jstrackingcode.controller.js index ba85c3729f..39efbd5856 100644 --- a/plugins/CoreAdminHome/angularjs/trackingcode/jstrackingcode.controller.js +++ b/plugins/CoreAdminHome/angularjs/trackingcode/jstrackingcode.controller.js @@ -17,14 +17,14 @@ result.push([customVar.name, customVar.value]); }); return result; - }; + } // quickly gets the host + port from a url function getHostNameFromUrl(url) { var element = $('<a></a>')[0]; element.href = url; return element.hostname; - }; + } angular.module('piwikApp').controller('JsTrackingCodeController', JsTrackingCodeController); diff --git a/plugins/CoreHome/angularjs/common/directives/field-condition.js b/plugins/CoreHome/angularjs/common/directives/field-condition.js index d3fd46d2a2..8a215716a4 100644 --- a/plugins/CoreHome/angularjs/common/directives/field-condition.js +++ b/plugins/CoreHome/angularjs/common/directives/field-condition.js @@ -28,10 +28,9 @@ function getValueFromElement(element) { if (element.attr('type') === 'checkbox') { - return element.is(':checked') + return element.is(':checked'); } else if (element.attr('type') === 'radio') { - var name = element.attr('name'); - return $('.form-group [name=' + name + ']:checked').val() + return $('.form-group [name=' + element.attr('name') + ']:checked').val(); } else if (element.prop('tagName').toLowerCase() === 'select') { var name = element.val(); if (name.indexOf('string:') === 0) { @@ -64,7 +63,7 @@ actualField.on('change', function () { scope.allValues[name] = getValueFromElement($(this)); evaluate(scope, condition, element); - }) + }); } }); diff --git a/plugins/CoreHome/angularjs/common/directives/show-sensitive-data.js b/plugins/CoreHome/angularjs/common/directives/show-sensitive-data.js index 1744f9e622..59a2062090 100644 --- a/plugins/CoreHome/angularjs/common/directives/show-sensitive-data.js +++ b/plugins/CoreHome/angularjs/common/directives/show-sensitive-data.js @@ -52,7 +52,7 @@ $(clickElement).one('click', onClickHandler); $(clickElement).css({ cursor: 'pointer' - }) + }); } }; } diff --git a/plugins/CoreHome/angularjs/common/directives/string-to-number.js b/plugins/CoreHome/angularjs/common/directives/string-to-number.js index 9637c5b06d..10b6fa3841 100644 --- a/plugins/CoreHome/angularjs/common/directives/string-to-number.js +++ b/plugins/CoreHome/angularjs/common/directives/string-to-number.js @@ -24,5 +24,5 @@ }); } }; - }) + }); })(); diff --git a/plugins/CoreHome/angularjs/common/services/piwik-url.js b/plugins/CoreHome/angularjs/common/services/piwik-url.js index 130500c65d..b7e4e52f14 100644 --- a/plugins/CoreHome/angularjs/common/services/piwik-url.js +++ b/plugins/CoreHome/angularjs/common/services/piwik-url.js @@ -16,7 +16,7 @@ var model = { getSearchParam: getSearchParam - } + }; return model; diff --git a/plugins/CoreHome/angularjs/date-picker/date-picker.directive.js b/plugins/CoreHome/angularjs/date-picker/date-picker.directive.js index 08b20cc44b..baab729434 100644 --- a/plugins/CoreHome/angularjs/date-picker/date-picker.directive.js +++ b/plugins/CoreHome/angularjs/date-picker/date-picker.directive.js @@ -164,9 +164,7 @@ || changesObj.highlightedDateStart || changesObj.highlightedDateEnd; - if (changesObj.viewDate - && viewDateChanged() - ) { + if (changesObj.viewDate && viewDateChanged()) { redraw = true; } @@ -202,9 +200,7 @@ // only change the datepicker date if the date is outside of the current month/year. // this avoids a re-render in other cases. var monthYear = getMonthYearDisplayed(); - if (monthYear[0] !== date.getMonth() - || monthYear[1] !== date.getFullYear() - ) { + if (monthYear[0] !== date.getMonth() || monthYear[1] !== date.getFullYear()) { element.datepicker('setDate', date); return true; } diff --git a/plugins/CoreHome/angularjs/history/history.service.js b/plugins/CoreHome/angularjs/history/history.service.js index 8a1a83aa31..731c9b112a 100644 --- a/plugins/CoreHome/angularjs/history/history.service.js +++ b/plugins/CoreHome/angularjs/history/history.service.js @@ -42,9 +42,7 @@ // this function makes sure URLs like http://piwik.net/?...#/module=Whatever&action=whatever still work. function changePathToSearch() { var path = $location.path(); - if (!path - || path == '/' - ) { + if (!path || path == '/') { return; } diff --git a/plugins/CoreHome/angularjs/multipairfield/multipairfield.controller.js b/plugins/CoreHome/angularjs/multipairfield/multipairfield.controller.js index 55f0b3d312..ea3324be36 100644 --- a/plugins/CoreHome/angularjs/multipairfield/multipairfield.controller.js +++ b/plugins/CoreHome/angularjs/multipairfield/multipairfield.controller.js @@ -24,7 +24,7 @@ } return 'plugins/CorePluginsAdmin/angularjs/form-field/' + file + '.html?cb=' + piwik.cacheBuster; - }; + } if ($scope.field1 && !$scope.field1.templateFile) { $scope.field1.templateFile = getTemplate($scope.field1); diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js b/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js index fbcd5f17ee..b48a38950e 100644 --- a/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js +++ b/plugins/CoreHome/angularjs/quick-access/quick-access.controller.js @@ -17,8 +17,8 @@ this.onKeypress = function (event) { var areSearchResultsDisplayed = $scope.search && $scope.search.term && $scope.view && $scope.view.searchActive; - var isTabKey = 9 == event.which - var isEscKey = 27 == event.which + var isTabKey = 9 == event.which; + var isEscKey = 27 == event.which; if (38 == event.which) { $scope.highlightPreviousItem(); diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js index 47df2e68fe..a9ac612ebf 100644 --- a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js +++ b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js @@ -38,14 +38,14 @@ var translate = $filter('translate'); var searchAreasTitle = ''; - var searchAreas = [translate('CoreHome_MenuEntries')] + var searchAreas = [translate('CoreHome_MenuEntries')]; if (hasSegmentSelector) { - searchAreas.push(translate('CoreHome_Segments')) + searchAreas.push(translate('CoreHome_Segments')); } if (scope.hasSitesSelector) { - searchAreas.push(translate('SitesManager_Sites')) + searchAreas.push(translate('SitesManager_Sites')); } while (searchAreas.length) { @@ -112,7 +112,7 @@ leftMenuItems.push({name: text, category: category, index: ++menuIndex}); $element.attr('quick_access', menuIndex); } - }) + }); }); diff --git a/plugins/CoreHome/angularjs/report-export/reportexport.directive.js b/plugins/CoreHome/angularjs/report-export/reportexport.directive.js index ecbf4cef06..96351a59e4 100644 --- a/plugins/CoreHome/angularjs/report-export/reportexport.directive.js +++ b/plugins/CoreHome/angularjs/report-export/reportexport.directive.js @@ -44,7 +44,7 @@ var params = scope.requestParams; if (params && typeof params == "string") { - params = JSON.parse(params) + params = JSON.parse(params); } else { params = {}; } |