Add and apply ESLint spacing rules
For now we're only adding rules related to spacing and double quotes, following the same rules we use in Ruby, which are the same rules CoffeeScript followed when compiling these files. We're also using the recommended ESLint rules, which will warn us about many JavaScript common pitfalls, the `strict` rule which enforces using strict mode, and the `no-console` rule, which will prevent us from shipping code meant for debugging. Although it's arguably more common to use the JSON format to define these rules, I've chosen YAML because it's the format we use in all our linters.
This commit is contained in:
67
.eslintrc.yml
Normal file
67
.eslintrc.yml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: false
|
||||||
|
extends: "eslint:recommended"
|
||||||
|
globals:
|
||||||
|
$: readonly
|
||||||
|
App: readonly
|
||||||
|
annotator: readonly
|
||||||
|
c3: readonly
|
||||||
|
CKEDITOR: readonly
|
||||||
|
L: readonly
|
||||||
|
Turbolinks: readonly
|
||||||
|
parserOptions:
|
||||||
|
ecmaVersion: 5
|
||||||
|
rules:
|
||||||
|
array-bracket-spacing: error
|
||||||
|
block-spacing: error
|
||||||
|
brace-style: error
|
||||||
|
comma-spacing: error
|
||||||
|
computed-property-spacing: error
|
||||||
|
curly: error
|
||||||
|
eol-last: error
|
||||||
|
func-call-spacing: error
|
||||||
|
indent:
|
||||||
|
- error
|
||||||
|
- 2
|
||||||
|
key-spacing: error
|
||||||
|
keyword-spacing: error
|
||||||
|
linebreak-style: error
|
||||||
|
lines-between-class-members: error
|
||||||
|
no-console: error
|
||||||
|
no-multi-spaces: error
|
||||||
|
no-multiple-empty-lines:
|
||||||
|
- error
|
||||||
|
- max: 1
|
||||||
|
no-spaced-func: error
|
||||||
|
no-tabs: error
|
||||||
|
no-trailing-spaces: error
|
||||||
|
no-whitespace-before-property: error
|
||||||
|
object-curly-spacing:
|
||||||
|
- error
|
||||||
|
- always
|
||||||
|
- objectsInObjects: false
|
||||||
|
padded-blocks:
|
||||||
|
- error
|
||||||
|
- never
|
||||||
|
quotes:
|
||||||
|
- error
|
||||||
|
- double
|
||||||
|
- avoidEscape: true
|
||||||
|
semi-spacing: error
|
||||||
|
space-before-blocks: error
|
||||||
|
space-before-function-paren:
|
||||||
|
- error
|
||||||
|
- never
|
||||||
|
space-in-parens: error
|
||||||
|
space-infix-ops: error
|
||||||
|
space-unary-ops: error
|
||||||
|
spaced-comment:
|
||||||
|
- error
|
||||||
|
- always
|
||||||
|
- markers:
|
||||||
|
- "="
|
||||||
|
exceptions:
|
||||||
|
- "-"
|
||||||
|
strict: error
|
||||||
|
switch-colon-spacing: error
|
||||||
@@ -5,3 +5,6 @@ scss:
|
|||||||
erblint:
|
erblint:
|
||||||
enabled: true
|
enabled: true
|
||||||
config_file: .erb-lint.yml
|
config_file: .erb-lint.yml
|
||||||
|
eslint:
|
||||||
|
enabled: true
|
||||||
|
config_file: .eslintrc.yml
|
||||||
|
|||||||
@@ -44,5 +44,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -14,5 +14,4 @@
|
|||||||
}, ".js-participation");
|
}, ".js-participation");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -27,5 +27,4 @@
|
|||||||
App.Answers.nestedAnswers();
|
App.Answers.nestedAnswers();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -2,5 +2,4 @@
|
|||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
window.App = {};
|
window.App = {};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -116,8 +116,9 @@ var initialize_modules = function() {
|
|||||||
App.LegislationAdmin.initialize();
|
App.LegislationAdmin.initialize();
|
||||||
App.LegislationAllegations.initialize();
|
App.LegislationAllegations.initialize();
|
||||||
App.Legislation.initialize();
|
App.Legislation.initialize();
|
||||||
if ( $(".legislation-annotatable").length )
|
if ($(".legislation-annotatable").length) {
|
||||||
App.LegislationAnnotatable.initialize();
|
App.LegislationAnnotatable.initialize();
|
||||||
|
}
|
||||||
App.WatchFormChanges.initialize();
|
App.WatchFormChanges.initialize();
|
||||||
App.TreeNavigator.initialize();
|
App.TreeNavigator.initialize();
|
||||||
App.Documentable.initialize();
|
App.Documentable.initialize();
|
||||||
@@ -135,14 +136,16 @@ var initialize_modules = function() {
|
|||||||
App.SendAdminNotificationAlert.initialize();
|
App.SendAdminNotificationAlert.initialize();
|
||||||
App.ModalDownload.initialize();
|
App.ModalDownload.initialize();
|
||||||
App.Settings.initialize();
|
App.Settings.initialize();
|
||||||
if ( $("#js-columns-selector").length )
|
if ($("#js-columns-selector").length) {
|
||||||
App.ColumnsSelector.initialize();
|
App.ColumnsSelector.initialize();
|
||||||
|
}
|
||||||
App.BudgetEditAssociations.initialize();
|
App.BudgetEditAssociations.initialize();
|
||||||
if ( $("#votation_type_enum_type").length )
|
if ($("#votation_type_enum_type").length) {
|
||||||
App.Votations.initialize();
|
App.Votations.initialize();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(function(){
|
$(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Turbolinks.enableProgressBar();
|
Turbolinks.enableProgressBar();
|
||||||
|
|||||||
@@ -25,5 +25,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -38,5 +38,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -14,5 +14,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -14,5 +14,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -84,5 +84,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -69,5 +69,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -30,5 +30,4 @@
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Overrides and adds customized javascripts in this file
|
// Overrides and adds customized javascripts in this file
|
||||||
// Read more on documentation:
|
// Read more on documentation:
|
||||||
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#javascript
|
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#javascript
|
||||||
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#javascript
|
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#javascript
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// TODO: This module is complex enough to require its own tests. Rewrite it using Ecma6 class syntax and
|
// TODO: This module is complex enough to require its own tests. Rewrite it using Ecma6 class syntax and
|
||||||
// write tests for this feature after consul has been migrated to Rails 5.1
|
// write tests for this feature after consul has been migrated to Rails 5.1
|
||||||
(function(){
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var ProposalGraph = function(url) {
|
var ProposalGraph = function(url) {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
.done(this.draw.bind(this));
|
.done(this.draw.bind(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.refreshGoals = function () {
|
ProposalGraph.prototype.refreshGoals = function() {
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: this.resourcesUrl,
|
url: this.resourcesUrl,
|
||||||
cache: false,
|
cache: false,
|
||||||
@@ -52,11 +52,11 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.refreshData = function () {
|
ProposalGraph.prototype.refreshData = function() {
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: this.url,
|
url: this.url,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
this.parseData(data);
|
this.parseData(data);
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
data: {
|
data: {
|
||||||
@@ -68,8 +68,8 @@
|
|||||||
ProposalGraph.prototype.parseData = function(data) {
|
ProposalGraph.prototype.parseData = function(data) {
|
||||||
var key;
|
var key;
|
||||||
|
|
||||||
this.xColumnValues = [ ];
|
this.xColumnValues = [];
|
||||||
this.progressColumnValues = [ this.progressLabel ];
|
this.progressColumnValues = [this.progressLabel];
|
||||||
|
|
||||||
for (key in data) {
|
for (key in data) {
|
||||||
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: this.successfulProposalDataUrl,
|
url: this.successfulProposalDataUrl,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
this.parseSuccessfulProposalData(data);
|
this.parseSuccessfulProposalData(data);
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
data: {
|
data: {
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
ProposalGraph.prototype.parseSuccessfulProposalData = function(data) {
|
ProposalGraph.prototype.parseSuccessfulProposalData = function(data) {
|
||||||
var key;
|
var key;
|
||||||
|
|
||||||
this.successfulColumnValues = [ this.successLabel ];
|
this.successfulColumnValues = [this.successLabel];
|
||||||
|
|
||||||
for (key in data) {
|
for (key in data) {
|
||||||
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: this.proposalAchievementsUrl,
|
url: this.proposalAchievementsUrl,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
this.parseAchievements(data);
|
this.parseAchievements(data);
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
data: {
|
data: {
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.addXColumnValue = function (value) {
|
ProposalGraph.prototype.addXColumnValue = function(value) {
|
||||||
if (this.xColumnValues.indexOf(value) === -1) {
|
if (this.xColumnValues.indexOf(value) === -1) {
|
||||||
this.xColumnValues.push(value);
|
this.xColumnValues.push(value);
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
|
|
||||||
ProposalGraph.prototype.draw = function() {
|
ProposalGraph.prototype.draw = function() {
|
||||||
var colors = {},
|
var colors = {},
|
||||||
maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10);
|
maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10);
|
||||||
|
|
||||||
this.formatXColumnValues();
|
this.formatXColumnValues();
|
||||||
|
|
||||||
@@ -163,14 +163,14 @@
|
|||||||
this.successfulColumnValues
|
this.successfulColumnValues
|
||||||
],
|
],
|
||||||
colors: colors,
|
colors: colors,
|
||||||
color: function (color, d) {
|
color: function(color, d) {
|
||||||
var achievement;
|
var achievement;
|
||||||
|
|
||||||
if (d.id === this.successfulColumnValues[0] || !Object.prototype.hasOwnProperty.call(d, "x")) {
|
if (d.id === this.successfulColumnValues[0] || !Object.prototype.hasOwnProperty.call(d, "x")) {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
achievement = this.achievements.find(function (element) {
|
achievement = this.achievements.find(function(element) {
|
||||||
return element.value === this.xColumnValues[d.index + 1];
|
return element.value === this.xColumnValues[d.index + 1];
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
@@ -211,8 +211,8 @@
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
format: {
|
format: {
|
||||||
title: function (d) {
|
title: function(d) {
|
||||||
var achievement = this.achievements.find(function (element) {
|
var achievement = this.achievements.find(function(element) {
|
||||||
return element.value === this.xColumnValues[d + 1];
|
return element.value === this.xColumnValues[d + 1];
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
@@ -227,11 +227,11 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.tickYValues = function () {
|
ProposalGraph.prototype.tickYValues = function() {
|
||||||
var i,
|
var i,
|
||||||
tick = [0],
|
tick = [0],
|
||||||
maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10),
|
maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10),
|
||||||
step = maximumValue <= 10 ? 1 : Math.round(maximumValue / 10);
|
step = maximumValue <= 10 ? 1 : Math.round(maximumValue / 10);
|
||||||
|
|
||||||
for (i = step; i < maximumValue; i += step) {
|
for (i = step; i < maximumValue; i += step) {
|
||||||
tick.push(i);
|
tick.push(i);
|
||||||
@@ -242,16 +242,16 @@
|
|||||||
return tick;
|
return tick;
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.tickXValues = function () {
|
ProposalGraph.prototype.tickXValues = function() {
|
||||||
var i,
|
var i,
|
||||||
l,
|
l,
|
||||||
tick = [],
|
tick = [],
|
||||||
step = this.xColumnValues.length < 13 ? 1 : Math.round((this.xColumnValues.length - 1) / 12);
|
step = this.xColumnValues.length < 13 ? 1 : Math.round((this.xColumnValues.length - 1) / 12);
|
||||||
|
|
||||||
if (this.xColumnValues.length > 1) {
|
if (this.xColumnValues.length > 1) {
|
||||||
tick.push(0);
|
tick.push(0);
|
||||||
|
|
||||||
for(i = step, l = this.xColumnValues.length - 1; i < l; i += step) {
|
for (i = step, l = this.xColumnValues.length - 1; i < l; i += step) {
|
||||||
tick.push(i);
|
tick.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
return tick;
|
return tick;
|
||||||
};
|
};
|
||||||
|
|
||||||
ProposalGraph.prototype.formatXColumnValues = function () {
|
ProposalGraph.prototype.formatXColumnValues = function() {
|
||||||
var i, l;
|
var i, l;
|
||||||
|
|
||||||
this.xColumnValues = this.xColumnValues.sort();
|
this.xColumnValues = this.xColumnValues.sort();
|
||||||
@@ -286,8 +286,8 @@
|
|||||||
return this.groupBy === undefined || this.groupBy === "" || this.groupBy === null;
|
return this.groupBy === undefined || this.groupBy === "" || this.groupBy === null;
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
$("[data-proposal-graph-url]").each(function () {
|
$("[data-proposal-graph-url]").each(function() {
|
||||||
var graph = new ProposalGraph($(this).data("proposal-graph-url"));
|
var graph = new ProposalGraph($(this).data("proposal-graph-url"));
|
||||||
graph.successfulProposalDataUrl = $(this).data("successful-proposal-graph-url");
|
graph.successfulProposalDataUrl = $(this).data("successful-proposal-graph-url");
|
||||||
graph.proposalAchievementsUrl = $(this).data("proposal-achievements-url");
|
graph.proposalAchievementsUrl = $(this).data("proposal-achievements-url");
|
||||||
|
|||||||
@@ -166,5 +166,4 @@
|
|||||||
$("#" + id).remove();
|
$("#" + id).remove();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -9,5 +9,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -18,5 +18,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -5,5 +5,4 @@
|
|||||||
$("#" + resource_id + " .js-flag-actions").html(button).foundation();
|
$("#" + resource_id + " .js-flag-actions").html(button).foundation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -10,5 +10,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -64,5 +64,4 @@
|
|||||||
App.Forms.hideOrShowFieldsAfterSelection();
|
App.Forms.hideOrShowFieldsAfterSelection();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -26,5 +26,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -37,5 +37,4 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -83,12 +83,12 @@
|
|||||||
},
|
},
|
||||||
language_description: function(count) {
|
language_description: function(count) {
|
||||||
switch (count) {
|
switch (count) {
|
||||||
case 0:
|
case 0:
|
||||||
return $(".globalize-languages").data("zero-languages-description");
|
return $(".globalize-languages").data("zero-languages-description");
|
||||||
case 1:
|
case 1:
|
||||||
return $(".globalize-languages").data("one-languages-description");
|
return $(".globalize-languages").data("one-languages-description");
|
||||||
default:
|
default:
|
||||||
return $(".globalize-languages").data("other-languages-description");
|
return $(".globalize-languages").data("other-languages-description");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
@@ -114,5 +114,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -15,5 +15,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -171,5 +171,4 @@
|
|||||||
$("#new_image_link").removeClass("hide");
|
$("#new_image_link").removeClass("hide");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -11,5 +11,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -16,5 +16,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -22,5 +22,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -33,5 +33,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -229,5 +229,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -7,5 +7,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -29,5 +29,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -128,5 +128,4 @@
|
|||||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -48,5 +48,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -11,5 +11,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -9,5 +9,4 @@
|
|||||||
$("#" + id + " .js-moderator-investment-actions:first").hide();
|
$("#" + id + " .js-moderator-investment-actions:first").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -8,5 +8,4 @@
|
|||||||
$("#" + id + " .js-moderator-comment-actions").hide();
|
$("#" + id + " .js-moderator-comment-actions").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -9,5 +9,4 @@
|
|||||||
$("#" + id + " .js-moderator-debate-actions:first").hide();
|
$("#" + id + " .js-moderator-debate-actions:first").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -8,5 +8,4 @@
|
|||||||
$("#" + id + " .js-moderator-proposal-notifications-actions:first").hide();
|
$("#" + id + " .js-moderator-proposal-notifications-actions:first").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -9,5 +9,4 @@
|
|||||||
$("#" + id + " .js-moderator-proposals-actions:first").hide();
|
$("#" + id + " .js-moderator-proposals-actions:first").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -43,5 +43,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -5,17 +5,16 @@
|
|||||||
$("select[class='js-poll-shifts']").on({
|
$("select[class='js-poll-shifts']").on({
|
||||||
change: function() {
|
change: function() {
|
||||||
switch ($(this).val()) {
|
switch ($(this).val()) {
|
||||||
case "vote_collection":
|
case "vote_collection":
|
||||||
$("select[class='js-shift-vote-collection-dates']").show();
|
$("select[class='js-shift-vote-collection-dates']").show();
|
||||||
$("select[class='js-shift-recount-scrutiny-dates']").hide();
|
$("select[class='js-shift-recount-scrutiny-dates']").hide();
|
||||||
break;
|
break;
|
||||||
case "recount_scrutiny":
|
case "recount_scrutiny":
|
||||||
$("select[class='js-shift-recount-scrutiny-dates']").show();
|
$("select[class='js-shift-recount-scrutiny-dates']").show();
|
||||||
$("select[class='js-shift-vote-collection-dates']").hide();
|
$("select[class='js-shift-vote-collection-dates']").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -45,5 +45,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -10,5 +10,4 @@
|
|||||||
App.Questions.nestedQuestions();
|
App.Questions.nestedQuestions();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -29,5 +29,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -7,5 +7,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -7,5 +7,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -14,5 +14,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -7,5 +7,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -34,5 +34,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ var initialize_stats_modules = function() {
|
|||||||
App.Stats.initialize();
|
App.Stats.initialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
$(function(){
|
$(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
$(document).ready(initialize_stats_modules);
|
$(document).ready(initialize_stats_modules);
|
||||||
|
|||||||
@@ -33,5 +33,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -34,5 +34,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -30,5 +30,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -44,5 +44,4 @@
|
|||||||
App.TagAutocomplete.init_autocomplete();
|
App.TagAutocomplete.init_autocomplete();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -22,5 +22,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -39,5 +39,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -5,5 +5,4 @@
|
|||||||
$(".initialjs-avatar").initial();
|
$(".initialjs-avatar").initial();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -33,5 +33,4 @@
|
|||||||
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange();
|
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -53,5 +53,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -20,5 +20,4 @@
|
|||||||
App.Votes.hoverize("div.comment-footer");
|
App.Votes.hoverize("div.comment-footer");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@@ -29,5 +29,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user