forked from 0x2620/pandora
fix a bug in normalizeHashQuery
This commit is contained in:
parent
8661f96be4
commit
2e3aa03c6b
2 changed files with 7 additions and 3 deletions
|
@ -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.')
|
||||||
|
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue