url controller: add document positions
This commit is contained in:
parent
79ebfcc5e3
commit
7180f9be19
1 changed files with 10 additions and 0 deletions
|
@ -18,6 +18,13 @@ pandora.URL = (function() {
|
|||
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];
|
||||
if (
|
||||
state.page == 'documents'
|
||||
&& pandora.user.ui.documents[state.part]
|
||||
&& pandora.user.ui.documents[state.part].position
|
||||
) {
|
||||
state.span = pandora.user.ui.documents[state.part].position;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -135,6 +142,9 @@ pandora.URL = (function() {
|
|||
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page) && state.part) {
|
||||
set['part.' + state.page] = state.part;
|
||||
}
|
||||
if (state.span) {
|
||||
set['documents.' + state.part + '.position'] = state.span;
|
||||
}
|
||||
pandora.UI.set(set);
|
||||
callback && callback();
|
||||
|
||||
|
|
Loading…
Reference in a new issue