avoid ? if possible

This commit is contained in:
j 2014-02-14 09:17:53 +00:00
parent 8158e2594c
commit 96c0ccc29b

View file

@ -413,8 +413,18 @@ 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});
} }