some improvements to handling of @foo map urls
This commit is contained in:
parent
551be76c8b
commit
a4d0ae4067
4 changed files with 22 additions and 6 deletions
|
@ -26,6 +26,18 @@ pandora.URL = (function() {
|
|||
state.view = pandora.user.ui.itemView;
|
||||
}
|
||||
}
|
||||
if (!keys || keys.indexOf('mapSelection') > -1) {
|
||||
state.item = pandora.user.ui.item;
|
||||
state.view = 'map';
|
||||
state.span = pandora.user.ui.mapSelection
|
||||
? '@' + pandora.user.ui.mapSelection : '';
|
||||
}
|
||||
if (!keys || keys.indexOf('mapFind') > -1) {
|
||||
state.item = pandora.user.ui.item;
|
||||
state.view = 'map';
|
||||
state.span = pandora.user.ui.mapFind
|
||||
? '@' + pandora.user.ui.mapFind : '';
|
||||
}
|
||||
if (!keys || keys.filter(function(key) {
|
||||
return /^videoPoints/.test(key);
|
||||
}).length) {
|
||||
|
@ -156,13 +168,13 @@ pandora.URL = (function() {
|
|||
} else if (state.view == 'map') {
|
||||
// fixme: this doesn't handle map coordinates
|
||||
if (state.span[0] != '@') {
|
||||
pandora.user.ui.mapSelection = state.span;
|
||||
//set['mapSelection'] = state.span;
|
||||
//set['mapFind'] = '';
|
||||
//pandora.user.ui.mapSelection = state.span;
|
||||
set['mapSelection'] = state.span;
|
||||
set['mapFind'] = '';
|
||||
} else {
|
||||
pandora.user.ui.mapFind = state.span.substr(1);
|
||||
//set['mapFind'] = state.span.substr(1);
|
||||
//set['mapSelection'] = '';
|
||||
//pandora.user.ui.mapFind = state.span.substr(1);
|
||||
set['mapFind'] = state.span.substr(1);
|
||||
set['mapSelection'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
pandora.ui.clipPlayer = function() {
|
||||
// FIXME: is clipPlayer the best name for this?
|
||||
var that = Ox.VideoPlayer({
|
||||
controlsBottom: ['play', 'previous', 'next', 'volume'],
|
||||
controlsTop: ['fullscreen', 'scale'],
|
||||
|
|
|
@ -249,6 +249,8 @@ pandora.ui.navigationView = function(type, videoRatio) {
|
|||
}
|
||||
});
|
||||
}
|
||||
Ox.print('MAP SELECTION', id, data)
|
||||
pandora.UI.set({mapSelection: id ? data.name : ''});
|
||||
}
|
||||
|
||||
function updateStatusbar(items) {
|
||||
|
|
|
@ -519,6 +519,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
|
|||
} else {
|
||||
getId(canBePlace ? 'place' : '', function(id) {
|
||||
if (id) {
|
||||
Ox.print('found place id', id)
|
||||
callback(id, 'map');
|
||||
} else {
|
||||
getId(canBeEvent ? 'event' : '', function(id) {
|
||||
|
|
Loading…
Reference in a new issue