fix handling of ui.page on load (fixes #512)
This commit is contained in:
parent
c64e16d724
commit
b7d2d2302d
5 changed files with 11 additions and 12 deletions
|
@ -130,12 +130,11 @@ appPanel
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadOxJS(callback) {
|
function loadOxJS(callback) {
|
||||||
var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
|
var script = document.createElement('script');
|
||||||
script = document.createElement('script');
|
|
||||||
script.onload = callback;
|
script.onload = callback;
|
||||||
script.src = '/static/oxjs/dev/Ox.js';
|
script.src = '/static/oxjs/dev/Ox.js';
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadOxUI(callback) {
|
function loadOxUI(callback) {
|
||||||
|
@ -374,7 +373,7 @@ appPanel
|
||||||
.attr({
|
.attr({
|
||||||
src: Ox.PATH + 'Ox.UI/png/browser' + browser.name.replace(' ', '') + '128.png'
|
src: Ox.PATH + 'Ox.UI/png/browser' + browser.name.replace(' ', '') + '128.png'
|
||||||
})
|
})
|
||||||
.css({border: 0, width: '32px', height: '32px', margin: '4px'})
|
.css({width: '32px', height: '32px', margin: '4px'})
|
||||||
)
|
)
|
||||||
.appendTo($images);
|
.appendTo($images);
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,7 +79,8 @@ pandora.URL = (function() {
|
||||||
|
|
||||||
var set = {
|
var set = {
|
||||||
section: state.type == pandora.site.itemsSection ? 'items' : state.type,
|
section: state.type == pandora.site.itemsSection ? 'items' : state.type,
|
||||||
item: state.item
|
item: state.item,
|
||||||
|
page: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (state.view) {
|
if (state.view) {
|
||||||
|
@ -132,6 +133,7 @@ pandora.URL = (function() {
|
||||||
$(this).trigger('stop');
|
$(this).trigger('stop');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Ox.Log('URL', 'UI.set', set)
|
||||||
if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) {
|
if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) {
|
||||||
// on page load, if item is set and there was a query,
|
// on page load, if item is set and there was a query,
|
||||||
// we have to check if the item actually matches the query,
|
// we have to check if the item actually matches the query,
|
||||||
|
|
|
@ -37,11 +37,9 @@ pandora.ui.appPanel = function() {
|
||||||
});
|
});
|
||||||
function setPage(page) {
|
function setPage(page) {
|
||||||
if (page === '') {
|
if (page === '') {
|
||||||
/*
|
['site', 'account', 'preferences', 'help'].forEach(function(dialog) {
|
||||||
if (pandora.$ui.home) {
|
pandora.$ui[dialog + 'Dialog'] && pandora.$ui[dialog + 'Dialog'].close();
|
||||||
pandora.$ui.home.fadeOutScreen();
|
});
|
||||||
} else
|
|
||||||
*/
|
|
||||||
if (pandora.$ui.tv) {
|
if (pandora.$ui.tv) {
|
||||||
pandora.$ui.tv.fadeOutScreen();
|
pandora.$ui.tv.fadeOutScreen();
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ pandora.ui.home = function() {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: pandora.user.ui.page});
|
||||||
that.fadeOutScreen();
|
that.fadeOutScreen();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -145,7 +145,7 @@ pandora.ui.home = function() {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: pandora.user.ui.page});
|
||||||
that.fadeOutScreen();
|
that.fadeOutScreen();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue