forked from 0x2620/pandora
avoid ? if possible
This commit is contained in:
parent
8158e2594c
commit
96c0ccc29b
1 changed files with 14 additions and 13 deletions
|
@ -414,7 +414,17 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
|
||||||
function formatURL() {
|
function formatURL() {
|
||||||
var data = Ox.map($input, function($element) {
|
var data = Ox.map($input, function($element) {
|
||||||
return $element.options('value');
|
return $element.options('value');
|
||||||
});
|
}),
|
||||||
|
options = Ox.serialize({
|
||||||
|
title: data.title || void 0,
|
||||||
|
showTimeline: data.showTimeline || void 0,
|
||||||
|
timeline: data.timeline && data.timeline != 'default' ? data.timeline : void 0,
|
||||||
|
showAnnotations: data.showAnnotations || void 0,
|
||||||
|
showLayers: data.showAnnotations && data.showLayers ? data.showLayers : void 0,
|
||||||
|
//matchRatio: true
|
||||||
|
}, true)
|
||||||
|
.replace(/_/g, '%09').replace(/\s/g, '_')
|
||||||
|
.replace(/"/g, '"');
|
||||||
url = data.protocol + '://'
|
url = data.protocol + '://'
|
||||||
+ data.site + '/'
|
+ data.site + '/'
|
||||||
+ data.item + '/'
|
+ data.item + '/'
|
||||||
|
@ -425,17 +435,8 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
|
||||||
: []
|
: []
|
||||||
).join(',')
|
).join(',')
|
||||||
+ (data.annotation || '')
|
+ (data.annotation || '')
|
||||||
+ '#embed?'
|
+ '#embed'
|
||||||
+ Ox.serialize({
|
+ (options ? '?' + options : '');
|
||||||
title: data.title || void 0,
|
|
||||||
showTimeline: data.showTimeline || void 0,
|
|
||||||
timeline: data.timeline && data.timeline != 'default' ? data.timeline : void 0,
|
|
||||||
showAnnotations: data.showAnnotations || void 0,
|
|
||||||
showLayers: data.showAnnotations && data.showLayers ? data.showLayers : void 0,
|
|
||||||
//matchRatio: true
|
|
||||||
}, true)
|
|
||||||
.replace(/_/g, '%09').replace(/\s/g, '_')
|
|
||||||
.replace(/"/g, '"');
|
|
||||||
Ox.print('FU', url);
|
Ox.print('FU', url);
|
||||||
$input.url.options({value: url});
|
$input.url.options({value: url});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue