update embed dialog

This commit is contained in:
rolux 2014-02-15 10:57:04 +00:00
parent d18e483fb7
commit 36f94c15b2

View file

@ -72,13 +72,16 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
id: 'document', id: 'document',
title: 'Document', title: 'Document',
description: 'Embed a document', description: 'Embed a document',
inputs: ['document', 'title'] inputs: ['document']
}, },
{ {
id: 'edit', id: 'edit',
title: 'Edit', title: 'Edit',
description: 'Embed an edited video', description: 'Embed an edited video',
inputs: ['edit', 'position', 'matchRatio'] inputs: [
'edit', 'position',
'showTimeline', 'showAnnotations', 'matchRatio'
]
}, },
{ {
id: 'text', id: 'text',
@ -695,21 +698,20 @@ 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']();
$form.find('.advanced')[advanced ? 'show' : 'hide']();
viewInputs.forEach(function(id) { viewInputs.forEach(function(id) {
Ox.print('$$$', id)
$input[id][ $input[id][
Ox.contains(Ox.getObjectById(views, view).inputs, id) ? 'show' : 'hide' Ox.contains(Ox.getObjectById(views, view).inputs, id)
&& (advanced || !$input[id].is('.advanced')) ? 'show' : 'hide'
](); ]();
}); });
$input.timeline[ $input.timeline[
advanced && $input.showTimeline.options('value') ? 'show' : 'hide' advanced && view == 'video' && $input.showTimeline.options('value') ? 'show' : 'hide'
](); ]();
$input.showLayersLabel[ $input.showLayersLabel[
advanced && $input.showAnnotations.options('value') ? 'show' : 'hide' advanced && view == 'video' && $input.showAnnotations.options('value') ? 'show' : 'hide'
](); ]();
$input.showLayers[ $input.showLayers[
advanced && $input.showAnnotations.options('value') ? 'show' : 'hide' advanced && view == 'video' && $input.showAnnotations.options('value') ? 'show' : 'hide'
](); ]();
} }