forked from 0x2620/pandora
update embed dialog
This commit is contained in:
parent
c23e7e10ab
commit
45c293ebec
1 changed files with 11 additions and 10 deletions
|
@ -193,11 +193,12 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatURL() {
|
function formatURL() {
|
||||||
var data = Ox.map($input, function($element) {
|
var type = $input.type.value(),
|
||||||
return $element.value ? $element.value() : void 0;
|
|
||||||
}),
|
|
||||||
type = data.type,
|
|
||||||
view = $list.options('selected')[0],
|
view = $list.options('selected')[0],
|
||||||
|
data = Ox.map($input, function($element, key) {
|
||||||
|
return Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
||||||
|
&& $element.value ? $element.value() : void 0;
|
||||||
|
}),
|
||||||
options = Ox.serialize({
|
options = Ox.serialize({
|
||||||
title: data.title || void 0,
|
title: data.title || void 0,
|
||||||
showTimeline: data.showTimeline || void 0,
|
showTimeline: data.showTimeline || void 0,
|
||||||
|
@ -211,7 +212,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
).concat(
|
).concat(
|
||||||
data['in'] || data.out ? [data['in'], data.out] : []
|
data['in'] || data.out ? [data['in'], data.out] : []
|
||||||
).join(',')
|
).join(',')
|
||||||
+ data['annotation'] || '';
|
+ (data['annotation'] || '');
|
||||||
return Ox.encodeHTMLEntities(
|
return Ox.encodeHTMLEntities(
|
||||||
(
|
(
|
||||||
type == 'iframe'
|
type == 'iframe'
|
||||||
|
@ -228,8 +229,8 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
: ''
|
: ''
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
Ox.contains(['info', 'grid', 'map', 'calendar'], view)
|
Ox.contains(['info', 'timeline'], view) ? '/' + view
|
||||||
? (view == 'info' ? '/' : '') + view
|
: Ox.contains(['grid', 'map', 'calendar'], view) ? view
|
||||||
: ''
|
: ''
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
|
@ -698,9 +699,9 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
view = $list.options('selected')[0];
|
view = $list.options('selected')[0];
|
||||||
$form.find('.link')[type == 'link' ? 'show' : 'hide']();
|
$form.find('.link')[type == 'link' ? 'show' : 'hide']();
|
||||||
$form.find('.iframe')[type == 'iframe' ? 'show' : 'hide']();
|
$form.find('.iframe')[type == 'iframe' ? 'show' : 'hide']();
|
||||||
viewInputs.forEach(function(id) {
|
viewInputs.forEach(function(key) {
|
||||||
$input[id][
|
$input[key][
|
||||||
Ox.contains(Ox.getObjectById(views, view).inputs, id)
|
Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
||||||
&& (advanced || !$input[id].is('.advanced')) ? 'show' : 'hide'
|
&& (advanced || !$input[id].is('.advanced')) ? 'show' : 'hide'
|
||||||
]();
|
]();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue