forked from 0x2620/pandora
include page in url of pdf documents
This commit is contained in:
parent
fad6788638
commit
8a2408ff7e
2 changed files with 13 additions and 3 deletions
|
|
@ -19,7 +19,12 @@ pandora.URL = (function() {
|
|||
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page)) {
|
||||
state.part = pandora.user.ui.part[state.page];
|
||||
}
|
||||
|
||||
//fixme: pass zoom/center for images too
|
||||
if (state.page == 'documents'
|
||||
&& pandora.user.ui.documents[state.part]
|
||||
&& pandora.user.ui.documents[state.part].page) {
|
||||
state.parts = [pandora.user.ui.documents[state.part].page];
|
||||
}
|
||||
} else {
|
||||
|
||||
state.type = pandora.user.ui.section == 'items'
|
||||
|
|
@ -135,6 +140,10 @@ pandora.URL = (function() {
|
|||
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page) && state.part) {
|
||||
set['part.' + state.page] = state.part;
|
||||
}
|
||||
//fixme: parse zoom/center for images too
|
||||
if (state.page == 'documents' && state.parts && state.parts.length == 1) {
|
||||
set['documents.' + state.part + '.page'] = state.parts[0];
|
||||
}
|
||||
pandora.UI.set(set);
|
||||
callback && callback();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue