Fixed JavaScript "comma-spacing" violations.

This commit is contained in:
Tim Graham 2015-07-17 09:04:26 -04:00
parent b647d64408
commit 2d6466c295
4 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{ {
"rules": { "rules": {
"camelcase": [1, {"properties": "always"}], "camelcase": [1, {"properties": "always"}],
"comma-spacing": [1, {"before": false, "after": true}], "comma-spacing": [2, {"before": false, "after": true}],
"dot-notation": [1, {"allowKeywords": true}], "dot-notation": [1, {"allowKeywords": true}],
"curly": [2, "all"], "curly": [2, "all"],
"indent": [ "indent": [

View File

@ -166,7 +166,7 @@ var DateTimeShortcuts = {
// Recalculate the clockbox position // Recalculate the clockbox position
// is it left-to-right or right-to-left layout ? // is it left-to-right or right-to-left layout ?
if (getStyle(document.body,'direction')!=='rtl') { if (getStyle(document.body, 'direction') !== 'rtl') {
clock_box.style.left = findPosX(clock_link) + 17 + 'px'; clock_box.style.left = findPosX(clock_link) + 17 + 'px';
} }
else { else {
@ -304,7 +304,7 @@ var DateTimeShortcuts = {
// Recalculate the clockbox position // Recalculate the clockbox position
// is it left-to-right or right-to-left layout ? // is it left-to-right or right-to-left layout ?
if (getStyle(document.body,'direction')!=='rtl') { if (getStyle(document.body, 'direction') !== 'rtl') {
cal_box.style.left = findPosX(cal_link) + 17 + 'px'; cal_box.style.left = findPosX(cal_link) + 17 + 'px';
} }
else { else {

View File

@ -12,7 +12,7 @@ var CalendarNamespace = {
isLeapYear: function(year) { isLeapYear: function(year) {
return (((year % 4)===0) && ((year % 100)!==0) || ((year % 400)===0)); return (((year % 4)===0) && ((year % 100)!==0) || ((year % 400)===0));
}, },
getDaysInMonth: function(month,year) { getDaysInMonth: function(month, year) {
var days; var days;
if (month===1 || month===3 || month===5 || month===7 || month===8 || month===10 || month===12) { if (month===1 || month===3 || month===5 || month===7 || month===8 || month===10 || month===12) {
days = 31; days = 31;

View File

@ -114,7 +114,7 @@
var wktArray = OpenLayers.String.trim(str).split('|'); var wktArray = OpenLayers.String.trim(str).split('|');
var components = []; var components = [];
for(var i=0, len=wktArray.length; i<len; ++i) { for(var i=0, len=wktArray.length; i<len; ++i) {
components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]])); components.push(OpenLayers.Format.WKT.prototype.read.apply(this, [wktArray[i]]));
} }
return components; return components;
} }