use user.ui._hash to store hash state

This commit is contained in:
rolux 2013-07-12 11:39:45 +00:00
parent d1695fc2ba
commit 41f654569c
2 changed files with 20 additions and 5 deletions

View file

@ -63,6 +63,20 @@ pandora.URL = (function() {
}
if (
pandora.user.ui._hash && (
pandora.user.ui._hash.anchor || !Ox.isEmpty(pandora.user.ui._hash.query)
)
) {
state.hash = {};
if (pandora.user.ui._hash.anchor) {
state.hash.anchor = pandora.user.ui._hash.anchor;
}
if (!Ox.isEmpty(pandora.user.ui._hash.query)) {
state.hash.query = pandora.user.ui._hash.query;
}
}
Ox.Log('URL', 'GOT STATE ...', state)
return state;
@ -86,6 +100,7 @@ pandora.URL = (function() {
} else {
pandora.user.ui._hash = state.hash;
if (
state.hash
&& !Ox.contains(['embed', 'print'], state.hash.anchor)

View file

@ -259,11 +259,11 @@ pandora.ui.embedPlayer = function() {
function getOptions() {
var options = {};
ui.hash.query.forEach(function(condition) {
if (condition.key != 'embed') {
options[condition.key] = condition.value;
}
});
if (ui._hash.query) {
ui._hash.query.forEach(function(condition) {
options[condition.key] = condition.value;
});
}
options = Ox.extend(
{item: ui.item},
ui.videoPoints[ui.item] || {},