fix a bug in the insert embed dialog

This commit is contained in:
rolux 2013-02-28 15:03:05 +00:00
parent c170ee113e
commit 1b68b5725d

View file

@ -415,8 +415,7 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
var data = Ox.map($input, function($element) { var data = Ox.map($input, function($element) {
return $element.options('value'); return $element.options('value');
}); });
$input.url.value( Ox.print('FU', data.protocol + '://'
data.protocol + '://'
+ data.site + '/' + data.site + '/'
+ data.item + '/' + data.item + '/'
+ (data.link == 'default' ? '' : data.link + '/') + (data.link == 'default' ? '' : data.link + '/')
@ -432,8 +431,26 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
+ (data.timeline != 'default' ? '&timeline=' + JSON.stringify(data.timeline) : '') + (data.timeline != 'default' ? '&timeline=' + JSON.stringify(data.timeline) : '')
+ (data.showAnnotations ? '&showAnnotations=true' : '') + (data.showAnnotations ? '&showAnnotations=true' : '')
+ (data.showAnnotations && data.showLayers.length ? '&showLayers=' + JSON.stringify(data.showLayers) : '') + (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' + '&matchRatio=true'
); });
} }
function limitPoint(value, min, max) { function limitPoint(value, min, max) {