Enable `forin` and `freeze` rules.

This commit is contained in:
XhmikosR 2014-03-04 09:03:38 +02:00
Родитель 1e88a8ad5c
Коммит df5aa2c722
2 изменённых файлов: 22 добавлений и 12 удалений

Просмотреть файл

@ -7,6 +7,8 @@
"eqeqeq" : true,
"eqnull" : true,
"expr" : true,
"forin" : true,
"freeze" : true,
"indent" : 2,
"laxbreak" : true,
"nonbsp" : true,

Просмотреть файл

@ -177,11 +177,13 @@
if (transitionFromObj.transition) {
activeObj = extendWithDom(activeObj, '.content', activeDom.cloneNode(true));
for (key in bars) {
barElement = document.querySelector(bars[key]);
if (activeObj[key]) {
swapContent(activeObj[key], barElement);
} else if (barElement) {
barElement.parentNode.removeChild(barElement);
if (bars.hasOwnProperty(key)) {
barElement = document.querySelector(bars[key]);
if (activeObj[key]) {
swapContent(activeObj[key], barElement);
} else if (barElement) {
barElement.parentNode.removeChild(barElement);
}
}
}
}
@ -208,7 +210,9 @@
options.container = options.container || options.transition ? document.querySelector('.content') : document.body;
for (key in bars) {
options[key] = options[key] || document.querySelector(bars[key]);
if (bars.hasOwnProperty(key)) {
options[key] = options[key] || document.querySelector(bars[key]);
}
}
if (xhr && xhr.readyState < 4) {
@ -269,11 +273,13 @@
if (options.transition) {
for (key in bars) {
barElement = document.querySelector(bars[key]);
if (data[key]) {
swapContent(data[key], barElement);
} else if (barElement) {
barElement.parentNode.removeChild(barElement);
if (bars.hasOwnProperty(key)) {
barElement = document.querySelector(bars[key]);
if (data[key]) {
swapContent(data[key], barElement);
} else if (barElement) {
barElement.parentNode.removeChild(barElement);
}
}
}
}
@ -408,7 +414,9 @@
var result = {};
for (i in obj) {
result[i] = obj[i];
if (obj.hasOwnProperty(i)) {
result[i] = obj[i];
}
}
Object.keys(bars).forEach(function (key) {