reload map when changing group selection

This commit is contained in:
rolux 2011-10-08 18:36:26 +00:00
parent d800c49c8e
commit 39b7f6b08f
4 changed files with 15 additions and 2 deletions

View file

@ -17,6 +17,9 @@ pandora.URL = (function() {
state.type = pandora.site.itemsSection;
if (!keys || keys.indexOf('item') > -1) {
state.item = pandora.user.ui.item;
if (pandora.user.ui.item) {
state.view = pandora.user.ui.itemView;
}
}
if (!keys || keys.indexOf('listView') > -1 || keys.indexOf('itemView') > -1) {
if (!pandora.user.ui.item) {
@ -33,12 +36,14 @@ pandora.URL = (function() {
state.view = 'map';
state.span = pandora.user.ui.mapSelection
? '@' + pandora.user.ui.mapSelection : '';
state.sort = pandora.user.ui.sort;
}
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 : '';
state.sort = pandora.user.ui.sort;
}
if (!keys || keys.filter(function(key) {
return /^videoPoints/.test(key);

View file

@ -21,7 +21,13 @@ pandora.ui.mainPanel = function() {
pandora_find: function() {
var previousUI = pandora.UI.getPrevious();
if (pandora.user.ui._list == previousUI._list) {
pandora.$ui.list.reloadList();
if (['map', 'calendar'].indexOf(pandora.user.ui.listView) > -1) {
pandora.$ui.contentPanel.replaceElement(1,
pandora.ui.navigationView(pandora.user.ui.listView)
);
} else {
pandora.$ui.list.reloadList();
}
pandora.user.ui._groupsState.forEach(function(data, i) {
if (!Ox.isEqual(data.selected, previousUI._groupsState[i].selected)) {
pandora.$ui.groups[i].options({selected: data.selected});

View file

@ -242,15 +242,16 @@ pandora.ui.navigationView = function(type, videoRatio) {
}, data), callback);
}
});
type == 'map' && pandora.UI.set({mapSelection: data.name});
} else {
$list.options({
items: function(data, callback) {
callback({data: {items: data.keys ? [] : 0}});
}
});
type == 'map' && pandora.UI.set({mapSelection: id ? $element.options('find') : ''});
}
Ox.print('MAP SELECTION', id, data)
pandora.UI.set({mapSelection: id ? data.name : ''});
}
function updateStatusbar(items) {

View file

@ -65,6 +65,7 @@ pandora.ui.preferencesDialog = function() {
}).bindEvent({
click: function() {
$dialog.close();
pandora.URL.update();
}
})
],