inital version of document urls
This commit is contained in:
parent
dada4cbf4c
commit
880aa60945
9 changed files with 76 additions and 24 deletions
|
|
@ -1407,6 +1407,28 @@ pandora.getPart = function(state, str, callback) {
|
|||
} else {
|
||||
callback();
|
||||
}
|
||||
} else if (state.page == 'documents') {
|
||||
var split = str.split('/')[0],
|
||||
id = split[0];
|
||||
if (id) {
|
||||
pandora.api.findDocuments({
|
||||
query: {
|
||||
conditions: [{key: 'id', value: id, operator: '=='}],
|
||||
operator: '&'
|
||||
}
|
||||
}, function(result) {
|
||||
if (result.data.items) {
|
||||
state.part = str;
|
||||
//fixme set page/zoom/center here
|
||||
} else {
|
||||
state.page = '';
|
||||
}
|
||||
callback();
|
||||
});
|
||||
} else {
|
||||
state.page = '';
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue