|
|
|
@ -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) { |
|
|
|
|