fix a bug in normalizeHashQuery

This commit is contained in:
rolux 2013-02-20 10:52:37 +05:30
parent 8661f96be4
commit 2e3aa03c6b
2 changed files with 7 additions and 3 deletions

View file

@ -17,6 +17,7 @@ pandora.ui.embedPanel = function() {
right: 0, right: 0,
bottom: 0, bottom: 0,
}); });
$errorBox = $('<div>') $errorBox = $('<div>')
.css({ .css({
position: 'absolute', position: 'absolute',
@ -30,6 +31,7 @@ pandora.ui.embedPanel = function() {
margin: 'auto' margin: 'auto'
}) })
.appendTo(that); .appendTo(that);
$errorLogo = $('<img>') $errorLogo = $('<img>')
.css({width: '96px', opacity: 0}) .css({width: '96px', opacity: 0})
.one({ .one({
@ -39,6 +41,7 @@ pandora.ui.embedPanel = function() {
}) })
.attr({src: '/static/png/logo.png'}) .attr({src: '/static/png/logo.png'})
.appendTo($errorBox); .appendTo($errorBox);
$errorText = $('<div>') $errorText = $('<div>')
.css({marginTop: '4px', fontSize: '9px', textAlign: 'center'}) .css({marginTop: '4px', fontSize: '9px', textAlign: 'center'})
.html('This view cannot<br>be embedded.') .html('This view cannot<br>be embedded.')

View file

@ -1057,7 +1057,8 @@ pandora.normalizeHashQuery = function(state) {
'showAnnotations', 'showCloseButton', 'showLayers', 'showTimeline', 'showAnnotations', 'showCloseButton', 'showLayers', 'showTimeline',
'title', 'width' 'title', 'width'
], ],
isEmbed = Ox.indexOf(state.hash.query, function(condition) { isEmbed = state.hash && state.hash.query
&& Ox.indexOf(state.hash.query, function(condition) {
return Ox.isEqual(condition, {key: 'embed', value: true}); return Ox.isEqual(condition, {key: 'embed', value: true});
}) > -1, }) > -1,
newState = Ox.clone(state, true), newState = Ox.clone(state, true),