From d1695fc2bae2255f7870d8ba2df6643c0b7f5da4 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 12 Jul 2013 11:38:53 +0000 Subject: [PATCH] fix embed url formatting --- static/js/pandora/insertEmbedDialog.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/static/js/pandora/insertEmbedDialog.js b/static/js/pandora/insertEmbedDialog.js index 5973d23d..057ae30a 100644 --- a/static/js/pandora/insertEmbedDialog.js +++ b/static/js/pandora/insertEmbedDialog.js @@ -427,13 +427,13 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) { + (data.annotation || '') + '#embed?' + Ox.serialize({ - title: data.title ? JSON.stringify(data.title) : null, + title: data.title, showTimeline: data.showTimeline || null, - timeline: data.timeline ? JSON.stringify(data.timeline) : '', + timeline: data.timeline, 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 - }) + }, true)); $input.url.options({ value: data.protocol + '://' + data.site + '/' @@ -445,13 +445,15 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) { : [] ).join(',') + (data.annotation || '') - + '#?embed=true' - + (data.title ? '&title=' + JSON.stringify(data.title) : '') - + (data.showTimeline ? '&showTimeline=true' : '') - + (data.timeline != 'default' ? '&timeline=' + JSON.stringify(data.timeline) : '') - + (data.showAnnotations ? '&showAnnotations=true' : '') - + (data.showAnnotations && data.showLayers.length ? '&showLayers=' + JSON.stringify(data.showLayers) : '') - + '&matchRatio=true' + + '#embed?' + + Ox.serialize({ + title: data.title, + showTimeline: data.showTimeline || null, + timeline: data.timeline, + showAnnotations: data.showAnnotations || null, + showLayers: data.showAnnotations && data.showLayers ? data.showLayers : null, + matchRatio: true + }, true) }); }