support urls like '0xdb.org/Inception/1::'
This commit is contained in:
parent
f4d99bdcb3
commit
7f426d42c1
2 changed files with 21 additions and 6 deletions
|
@ -90,12 +90,13 @@ pandora.URL = (function() {
|
||||||
view = view ? view[0]
|
view = view ? view[0]
|
||||||
: position ? pandora.user.ui.videoView
|
: position ? pandora.user.ui.videoView
|
||||||
: pandora.user.ui.itemView;
|
: pandora.user.ui.itemView;
|
||||||
pandora.UI.set({
|
pandora.UI.set(Ox.extend({
|
||||||
section: 'items',
|
section: 'items',
|
||||||
item: item,
|
item: item,
|
||||||
itemView: view
|
itemView: view
|
||||||
});
|
}, ['player', 'timeline'].indexOf(view) > -1 ? {
|
||||||
Ox.print('POSITION', position)
|
videoView: view
|
||||||
|
} : {}));
|
||||||
if (position) {
|
if (position) {
|
||||||
split[length - 1] = position[0].split('-').map(function(point, i) {
|
split[length - 1] = position[0].split('-').map(function(point, i) {
|
||||||
// fixme: this is duplicated, see Ox.VideoPlayer() parsePositionInput()
|
// fixme: this is duplicated, see Ox.VideoPlayer() parsePositionInput()
|
||||||
|
|
|
@ -6,9 +6,23 @@ pandora.ui.item = function() {
|
||||||
keys: []
|
keys: []
|
||||||
}, pandora.user.level == 'admin' && pandora.user.ui.itemView == 'info' ? 0 : -1, function(result) {
|
}, pandora.user.level == 'admin' && pandora.user.ui.itemView == 'info' ? 0 : -1, function(result) {
|
||||||
if (result.status.code != 200) {
|
if (result.status.code != 200) {
|
||||||
pandora.$ui.contentPanel.replaceElement(1,
|
// fixme: this is quite a hack
|
||||||
Ox.Element().html(
|
pandora.api.find({
|
||||||
'The '+pandora.site.itemName.singular+' you are looking for does not exist.'));
|
query: {
|
||||||
|
conditions: [{key: 'title', value: decodeURI(pandora.user.ui.item), operator: '='}],
|
||||||
|
operator: ''
|
||||||
|
},
|
||||||
|
keys: ['id']
|
||||||
|
}, function(result) {
|
||||||
|
if (result.data.items.length) {
|
||||||
|
pandora.user.ui.item = '';
|
||||||
|
pandora.URL.set(result.data.items[0].id);
|
||||||
|
} else {
|
||||||
|
pandora.$ui.contentPanel.replaceElement(1,
|
||||||
|
Ox.Element().html(
|
||||||
|
'Sorry, we can\'t find the ' + pandora.site.itemName.singular + ' you\'re looking for.' + '<br/>' + JSON.stringify(result.data)));
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (!result.data.rendered &&
|
} else if (!result.data.rendered &&
|
||||||
['clips', 'map',
|
['clips', 'map',
|
||||||
'player', 'timeline'].indexOf(pandora.user.ui.itemView)>-1) {
|
'player', 'timeline'].indexOf(pandora.user.ui.itemView)>-1) {
|
||||||
|
|
Loading…
Reference in a new issue