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

View file

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