revert 4769
This commit is contained in:
parent
e8f25a7072
commit
79ebfcc5e3
2 changed files with 2 additions and 13 deletions
|
@ -19,12 +19,7 @@ pandora.URL = (function() {
|
||||||
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page)) {
|
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page)) {
|
||||||
state.part = pandora.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 {
|
} else {
|
||||||
|
|
||||||
state.type = pandora.user.ui.section == 'items'
|
state.type = pandora.user.ui.section == 'items'
|
||||||
|
@ -140,10 +135,6 @@ pandora.URL = (function() {
|
||||||
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page) && state.part) {
|
if (Ox.contains(Object.keys(pandora.site.user.ui.part), state.page) && state.part) {
|
||||||
set['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);
|
pandora.UI.set(set);
|
||||||
callback && callback();
|
callback && callback();
|
||||||
|
|
||||||
|
|
|
@ -1412,7 +1412,7 @@ pandora.getPageTitle = function(stateOrURL) {
|
||||||
: null;
|
: null;
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.getPart = function(state, str, parts, callback) {
|
pandora.getPart = function(state, str, callback) {
|
||||||
if (state.page == 'api') {
|
if (state.page == 'api') {
|
||||||
pandora.api.api(function(result) {
|
pandora.api.api(function(result) {
|
||||||
if (Ox.contains(Object.keys(result.data.actions), str)) {
|
if (Ox.contains(Object.keys(result.data.actions), str)) {
|
||||||
|
@ -1476,8 +1476,6 @@ pandora.getPart = function(state, str, parts, callback) {
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
if (result.data.items) {
|
if (result.data.items) {
|
||||||
state.part = str;
|
state.part = str;
|
||||||
//page/zoom/center get parsed in URL.js
|
|
||||||
state.parts = parts;
|
|
||||||
} else {
|
} else {
|
||||||
state.page = '';
|
state.page = '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue