getSpan gets type now
This commit is contained in:
parent
d6861f9171
commit
f8830119e0
1 changed files with 39 additions and 32 deletions
|
@ -690,6 +690,9 @@ pandora.getItemByIdOrTitle = function(type, str, callback) {
|
|||
});
|
||||
}
|
||||
});
|
||||
} else if (type == 'text') {
|
||||
// /number is page for pdf or percent for html
|
||||
callback(str.replace(/\/\d+$/, ''));
|
||||
} else {
|
||||
callback(str);
|
||||
}
|
||||
|
@ -793,12 +796,12 @@ pandora.getListData = function(list) {
|
|||
return data;
|
||||
};
|
||||
|
||||
pandora.getMetadataByIdOrName = function(item, view, str, callback) {
|
||||
pandora.getMetadataByIdOrName = function(type, item, view, str, callback) {
|
||||
// For a given item (or none) and a given view (or any), this takes a string
|
||||
// and checks if it's an annotation/event/place id or an event/place name,
|
||||
// and returns the id (or none) and the view (or none)
|
||||
// fixme: "subtitles:23" is still missing
|
||||
Ox.Log('URL', 'getMetadataByIdOrName', item, view, str);
|
||||
if (type == pandora.site.itemName.plural.toLowerCase()) {
|
||||
var isName = str[0] == '@',
|
||||
canBeAnnotation = (
|
||||
!view || Ox.contains(['player', 'editor', 'timeline'], view)
|
||||
|
@ -829,6 +832,10 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
|
|||
});
|
||||
}
|
||||
});
|
||||
} else if (type == 'text') {
|
||||
callback();
|
||||
}
|
||||
|
||||
function getId(type, callback) {
|
||||
if (type) {
|
||||
pandora.api['find' + Ox.toTitleCase(type + 's')](Ox.extend({
|
||||
|
|
Loading…
Reference in a new issue