url controller: add document positions

This commit is contained in:
rolux 2015-02-05 11:45:20 +05:30
parent 79ebfcc5e3
commit 7180f9be19

View file

@ -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();