forked from 0x2620/pandora
fix a bug in the insert embed dialog
This commit is contained in:
parent
c170ee113e
commit
1b68b5725d
1 changed files with 36 additions and 19 deletions
|
@ -415,25 +415,42 @@ 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 + '/')
|
+ ([data.position] || []).concat(
|
||||||
+ ([data.position] || []).concat(
|
data['in'] || data.out
|
||||||
data['in'] || data.out
|
? [data['in'], data.out]
|
||||||
? [data['in'], data.out]
|
: []
|
||||||
: []
|
).join(','),
|
||||||
).join(','),
|
+ (data.annotation || '')
|
||||||
+ (data.annotation || '')
|
+ '#?embed=true'
|
||||||
+ '#?embed=true'
|
+ (data.title ? '&title=' + JSON.stringify(data.title) : '')
|
||||||
+ (data.title ? '&title=' + JSON.stringify(data.title) : '')
|
+ (data.showTimeline ? '&showTimeline=true' : '')
|
||||||
+ (data.showTimeline ? '&showTimeline=true' : '')
|
+ (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');
|
||||||
+ '&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) {
|
function limitPoint(value, min, max) {
|
||||||
|
|
Loading…
Reference in a new issue