Ox.URL: add support for /documents/ID/span
This commit is contained in:
parent
36ffd07203
commit
62ade0f54f
1 changed files with 13 additions and 1 deletions
|
@ -791,7 +791,16 @@ Ox.URL = function(options) {
|
|||
parts.shift();
|
||||
if (parts.length) {
|
||||
// may modify state.part
|
||||
self.options.getPart(state, decodeValue(parts[0]), getHash);
|
||||
self.options.getPart(state, decodeValue(parts[0]), function() {
|
||||
if (state.part) {
|
||||
parts.shift();
|
||||
if (parts.length) {
|
||||
parsePartSpan();
|
||||
} else {
|
||||
getHash();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getHash();
|
||||
}
|
||||
|
@ -966,6 +975,9 @@ Ox.URL = function(options) {
|
|||
}
|
||||
getHash();
|
||||
}
|
||||
function parsePartSpan() {
|
||||
options.getSpan(state, decodeValue(parts.join('/')), getHash);
|
||||
}
|
||||
function getHash() {
|
||||
self.options.getHash(state, function() {
|
||||
// may have modified state.hash
|
||||
|
|
Loading…
Reference in a new issue