forked from 0x2620/pandora
URL controller: handle part
This commit is contained in:
parent
944411509b
commit
86881202b2
1 changed files with 6 additions and 2 deletions
|
@ -16,6 +16,9 @@ pandora.URL = (function() {
|
||||||
if (pandora.user.ui.page) {
|
if (pandora.user.ui.page) {
|
||||||
|
|
||||||
state.page = pandora.user.ui.page;
|
state.page = pandora.user.ui.page;
|
||||||
|
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page)) {
|
||||||
|
state.part = pandora.user.ui.part[state.page];
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -122,8 +125,8 @@ pandora.URL = (function() {
|
||||||
if (state.page) {
|
if (state.page) {
|
||||||
|
|
||||||
set.page = state.page;
|
set.page = state.page;
|
||||||
if (state.page == 'help') {
|
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page) && state.part) {
|
||||||
set.help = state.hash ? state.hash.anchor : '';
|
set['part.' + state.page] = state.part;
|
||||||
}
|
}
|
||||||
pandora.UI.set(set);
|
pandora.UI.set(set);
|
||||||
callback && callback();
|
callback && callback();
|
||||||
|
@ -336,6 +339,7 @@ pandora.URL = (function() {
|
||||||
findKeys: findKeys,
|
findKeys: findKeys,
|
||||||
getHash: pandora.getHash,
|
getHash: pandora.getHash,
|
||||||
getItem: pandora.getItem,
|
getItem: pandora.getItem,
|
||||||
|
getPart: pandora.getPart,
|
||||||
getSpan: pandora.getSpan,
|
getSpan: pandora.getSpan,
|
||||||
pages: [].concat(
|
pages: [].concat(
|
||||||
['home', 'software', 'api', 'help', 'tv'],
|
['home', 'software', 'api', 'help', 'tv'],
|
||||||
|
|
Loading…
Reference in a new issue