fix embed url formatting

This commit is contained in:
rolux 2013-07-12 11:38:53 +00:00
parent fc97d25d7b
commit d1695fc2ba

View file

@ -427,13 +427,13 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
+ (data.annotation || '') + (data.annotation || '')
+ '#embed?' + '#embed?'
+ Ox.serialize({ + Ox.serialize({
title: data.title ? JSON.stringify(data.title) : null, title: data.title,
showTimeline: data.showTimeline || null, showTimeline: data.showTimeline || null,
timeline: data.timeline ? JSON.stringify(data.timeline) : '', timeline: data.timeline,
showAnnotations: data.showAnnotations || null, showAnnotations: data.showAnnotations || null,
showLayers: data.showAnnotations && data.showLayers.length ? JSON.stringify(data.showLayers) : null, showLayers: data.showAnnotations && data.showLayers ? data.showLayers : null,
matchRatio: true matchRatio: true
}) }, true));
$input.url.options({ $input.url.options({
value: data.protocol + '://' value: data.protocol + '://'
+ data.site + '/' + data.site + '/'
@ -445,13 +445,15 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
: [] : []
).join(',') ).join(',')
+ (data.annotation || '') + (data.annotation || '')
+ '#?embed=true' + '#embed?'
+ (data.title ? '&title=' + JSON.stringify(data.title) : '') + Ox.serialize({
+ (data.showTimeline ? '&showTimeline=true' : '') title: data.title,
+ (data.timeline != 'default' ? '&timeline=' + JSON.stringify(data.timeline) : '') showTimeline: data.showTimeline || null,
+ (data.showAnnotations ? '&showAnnotations=true' : '') timeline: data.timeline,
+ (data.showAnnotations && data.showLayers.length ? '&showLayers=' + JSON.stringify(data.showLayers) : '') showAnnotations: data.showAnnotations || null,
+ '&matchRatio=true' showLayers: data.showAnnotations && data.showLayers ? data.showLayers : null,
matchRatio: true
}, true)
}); });
} }