make 'reset ui' somewhat more functional

This commit is contained in:
rolux 2012-06-30 20:01:43 +00:00
parent 94a80e1818
commit 0fe19ae166

View file

@ -16,8 +16,15 @@ pandora.UI = (function() {
return !key ? self.previousUI : self.previousUI[key]; return !key ? self.previousUI : self.previousUI[key];
}; };
that.reset = function(callback) { that.reset = function() {
pandora.api.resetUI({}, callback); pandora.api.resetUI({}, function() {
pandora.user.ui = pandora.site.user.ui;
pandora.user.ui._list = pandora.getListState(pandora.user.ui.find);
pandora.user.ui._filterState = pandora.getFilterState(pandora.user.ui.find);
pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find);
Ox.Theme(pandora.user.ui.theme);
pandora.$ui.appPanel.reload();
});
}; };
// sets pandora.user.ui.key to val // sets pandora.user.ui.key to val