update embed dialog
This commit is contained in:
parent
6ef4c47515
commit
7f4d4886a1
1 changed files with 29 additions and 25 deletions
|
@ -26,14 +26,14 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
views = [
|
views = [
|
||||||
{
|
{
|
||||||
id: 'info',
|
id: 'info',
|
||||||
title: 'Info',
|
title: Ox._('Info'),
|
||||||
description: 'Embed poster and basic metadata',
|
description: Ox._('Embed poster and basic metadata'),
|
||||||
inputs: ['item']
|
inputs: ['item']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'video',
|
id: 'video',
|
||||||
title: 'Video',
|
title: Ox._('Video'),
|
||||||
description: 'Embed a clip or a full video',
|
description: Ox._('Embed a clip or a full video'),
|
||||||
inputs: [
|
inputs: [
|
||||||
'item', 'position', 'in', 'out', 'annotation', 'title',
|
'item', 'position', 'in', 'out', 'annotation', 'title',
|
||||||
'showTimeline', 'showAnnotations', 'matchRatio'
|
'showTimeline', 'showAnnotations', 'matchRatio'
|
||||||
|
@ -41,44 +41,44 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'timeline',
|
id: 'timeline',
|
||||||
title: 'Timeline',
|
title: Ox._('Timeline'),
|
||||||
description: 'Embed a timeline',
|
description: Ox._('Embed a timeline'),
|
||||||
inputs: ['item', 'position', 'title']
|
inputs: ['item', 'position', 'title']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'list',
|
id: 'list',
|
||||||
title: 'List',
|
title: Ox._('List'),
|
||||||
description: 'Embed list icon and description',
|
description: Ox._('Embed list icon and description'),
|
||||||
inputs: ['list']
|
inputs: ['list']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'grid',
|
id: 'grid',
|
||||||
title: 'Grid',
|
title: Ox._('Grid'),
|
||||||
description: 'Embed movies as a grid',
|
description: Ox._('Embed movies as a grid'),
|
||||||
inputs: ['find', 'sort', 'title']
|
inputs: ['find', 'sort', 'title']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'map',
|
id: 'map',
|
||||||
title: 'Map',
|
title: Ox._('Map'),
|
||||||
description: 'Embed a map view',
|
description: Ox._('Embed a map view'),
|
||||||
inputs: ['switch', 'item', 'find', 'sort', 'title']
|
inputs: ['switch', 'item', 'find', 'sort', 'title']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'calendar',
|
id: 'calendar',
|
||||||
title: 'Calendar',
|
title: Ox._('Calendar'),
|
||||||
description: 'Embed a calendar view',
|
description: Ox._('Embed a calendar view'),
|
||||||
inputs: ['switch', 'item', 'find', 'sort', 'title']
|
inputs: ['switch', 'item', 'find', 'sort', 'title']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'document',
|
id: 'document',
|
||||||
title: 'Document',
|
title: Ox._('Document'),
|
||||||
description: 'Embed a document',
|
description: Ox._('Embed a document'),
|
||||||
inputs: ['document']
|
inputs: ['document']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'edit',
|
id: 'edit',
|
||||||
title: 'Edit',
|
title: Ox._('Edit'),
|
||||||
description: 'Embed an edited video',
|
description: Ox._('Embed an edited video'),
|
||||||
inputs: [
|
inputs: [
|
||||||
'edit', 'position',
|
'edit', 'position',
|
||||||
'showTimeline', 'showAnnotations', 'matchRatio'
|
'showTimeline', 'showAnnotations', 'matchRatio'
|
||||||
|
@ -86,8 +86,8 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'text',
|
id: 'text',
|
||||||
title: 'Text',
|
title: Ox._('Text'),
|
||||||
description: 'Embed text icon and description',
|
description: Ox._('Embed text icon and description'),
|
||||||
inputs: ['text']
|
inputs: ['text']
|
||||||
}
|
}
|
||||||
].map(function(item, index) {
|
].map(function(item, index) {
|
||||||
|
@ -319,8 +319,8 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
|
|
||||||
$input.type = Ox.ButtonGroup({
|
$input.type = Ox.ButtonGroup({
|
||||||
buttons: [
|
buttons: [
|
||||||
{id: 'link', title: 'Embed in Text Section', width: formWidth / 2, selected: true},
|
{id: 'link', title: Ox._('Embed in Texts Section'), width: formWidth / 2, selected: true},
|
||||||
{id: 'iframe', title: 'Embed in External Site', width: formWidth / 2}
|
{id: 'iframe', title: Ox._('Embed in External Site'), width: formWidth / 2}
|
||||||
],
|
],
|
||||||
selectable: true
|
selectable: true
|
||||||
})
|
})
|
||||||
|
@ -432,9 +432,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
{id: 'item', title: Ox._(pandora.site.itemName.singular)},
|
{id: 'item', title: Ox._(pandora.site.itemName.singular)},
|
||||||
{id: 'find', title: Ox._('Query')}
|
{id: 'find', title: Ox._('Query')}
|
||||||
],
|
],
|
||||||
label: Ox._('{0} for', [
|
label: ' ',
|
||||||
Ox.getObjectById(views, $list.options('selected')[0]).title
|
|
||||||
]),
|
|
||||||
labelWidth: labelWidth,
|
labelWidth: labelWidth,
|
||||||
width: formWidth
|
width: formWidth
|
||||||
})
|
})
|
||||||
|
@ -779,6 +777,7 @@ 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']();
|
||||||
|
$input.site[advanced ? 'show' : 'hide']();
|
||||||
viewInputs.forEach(function(key) {
|
viewInputs.forEach(function(key) {
|
||||||
$input[key][
|
$input[key][
|
||||||
Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
||||||
|
@ -795,6 +794,11 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
advanced && view == 'video' && $input.showAnnotations.options('value') ? 'show' : 'hide'
|
advanced && view == 'video' && $input.showAnnotations.options('value') ? 'show' : 'hide'
|
||||||
]();
|
]();
|
||||||
if (Ox.contains(['map', 'calendar'], view)) {
|
if (Ox.contains(['map', 'calendar'], view)) {
|
||||||
|
$input.switch.options({
|
||||||
|
label: Ox._('{0} for', [
|
||||||
|
Ox.getObjectById(views, $list.options('selected')[0]).title
|
||||||
|
])
|
||||||
|
});
|
||||||
$input.item[$input.switch.value() == 'item' ? 'show' : 'hide']();
|
$input.item[$input.switch.value() == 'item' ? 'show' : 'hide']();
|
||||||
$input.find[$input.switch.value() == 'find' ? 'show' : 'hide']();
|
$input.find[$input.switch.value() == 'find' ? 'show' : 'hide']();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue