From 8606bea3bc63974dd23f68753f313cea19e86830 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 17 Jul 2015 08:47:28 -0400 Subject: [PATCH] Fixed JavaScript space-before-function-paren violations. --- .eslintrc | 2 +- django/contrib/admin/static/admin/js/core.js | 2 +- django/contrib/admin/static/admin/js/prepopulate.js | 2 +- django/contrib/gis/static/gis/js/OLMapWidget.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc b/.eslintrc index df866ee0c9..a731637d81 100644 --- a/.eslintrc +++ b/.eslintrc @@ -35,7 +35,7 @@ "always" ], "space-before-blocks": [2, "always"], - "space-before-function-paren": [1, {"anonymous": "always", "named": "never"}], + "space-before-function-paren": [2, {"anonymous": "never", "named": "never"}], "space-infix-ops": [ 1, {"int32Hint": false} diff --git a/django/contrib/admin/static/admin/js/core.js b/django/contrib/admin/static/admin/js/core.js index 7e03bf72db..8bf52929ff 100644 --- a/django/contrib/admin/static/admin/js/core.js +++ b/django/contrib/admin/static/admin/js/core.js @@ -244,7 +244,7 @@ function getStyle(oElm, strCssRule) { strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule); } else if(oElm.currentStyle) { - strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1) { + strCssRule = strCssRule.replace(/\-(\w)/g, function(strMatch, p1) { return p1.toUpperCase(); }); strValue = oElm.currentStyle[strCssRule]; diff --git a/django/contrib/admin/static/admin/js/prepopulate.js b/django/contrib/admin/static/admin/js/prepopulate.js index 8ff76ca4a2..e0a13ee9a3 100644 --- a/django/contrib/admin/static/admin/js/prepopulate.js +++ b/django/contrib/admin/static/admin/js/prepopulate.js @@ -12,7 +12,7 @@ return this.each(function() { var prepopulatedField = $(this); - var populate = function () { + var populate = function() { // Bail if the field's value has been changed by the user if (prepopulatedField.data('_changed')) { return; diff --git a/django/contrib/gis/static/gis/js/OLMapWidget.js b/django/contrib/gis/static/gis/js/OLMapWidget.js index 8de5344446..fe799f8640 100644 --- a/django/contrib/gis/static/gis/js/OLMapWidget.js +++ b/django/contrib/gis/static/gis/js/OLMapWidget.js @@ -355,11 +355,11 @@ MapWidget.prototype.addSelectControl = function() { select.activate(); }; -MapWidget.prototype.enableDrawing = function () { +MapWidget.prototype.enableDrawing = function() { this.map.getControlsByClass('OpenLayers.Control.DrawFeature')[0].activate(); }; -MapWidget.prototype.enableEditing = function () { +MapWidget.prototype.enableEditing = function() { this.map.getControlsByClass('OpenLayers.Control.ModifyFeature')[0].activate(); };