From 9e20e8d06a4beb3b3f0d6c5900d8b98e0b7382ce Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 12 Jul 2013 12:31:35 +0200 Subject: [PATCH] update embed url formatting --- static/js/pandora/insertEmbedDialog.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/static/js/pandora/insertEmbedDialog.js b/static/js/pandora/insertEmbedDialog.js index 956b5481..5973d23d 100644 --- a/static/js/pandora/insertEmbedDialog.js +++ b/static/js/pandora/insertEmbedDialog.js @@ -425,13 +425,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 ? JSON.stringify(data.title) : null, + showTimeline: data.showTimeline || null, + timeline: data.timeline ? JSON.stringify(data.timeline) : '', + showAnnotations: data.showAnnotations || null, + showLayers: data.showAnnotations && data.showLayers.length ? JSON.stringify(data.showLayers) : null, + matchRatio: true + }) $input.url.options({ value: data.protocol + '://' + data.site + '/'