From 1b68b5725d4e0b0691041706671ba60f2c983156 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 28 Feb 2013 15:03:05 +0000 Subject: [PATCH] fix a bug in the insert embed dialog --- static/js/pandora/insertEmbedDialog.js | 55 +++++++++++++++++--------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/static/js/pandora/insertEmbedDialog.js b/static/js/pandora/insertEmbedDialog.js index 2326e2dcb..2e6cd078a 100644 --- a/static/js/pandora/insertEmbedDialog.js +++ b/static/js/pandora/insertEmbedDialog.js @@ -415,25 +415,42 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) { var data = Ox.map($input, function($element) { return $element.options('value'); }); - $input.url.value( - data.protocol + '://' - + data.site + '/' - + data.item + '/' - + (data.link == 'default' ? '' : data.link + '/') - + ([data.position] || []).concat( - data['in'] || data.out - ? [data['in'], data.out] - : [] - ).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' - ); + Ox.print('FU', data.protocol + '://' + + data.site + '/' + + data.item + '/' + + (data.link == 'default' ? '' : data.link + '/') + + ([data.position] || []).concat( + data['in'] || data.out + ? [data['in'], data.out] + : [] + ).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'); + $input.url.options({ + value: data.protocol + '://' + + data.site + '/' + + data.item + '/' + + (data.link == 'default' ? '' : data.link + '/') + + ([data.position] || []).concat( + data['in'] || data.out + ? [data['in'], data.out] + : [] + ).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' + }); } function limitPoint(value, min, max) {