fix #1380 (In 'Find Similar Clips' dialog, make select + button a sortElement), rename sequencesDialog to similarClipsDialog
This commit is contained in:
parent
45e6b1706a
commit
c6a0139e1f
2 changed files with 29 additions and 22 deletions
|
@ -389,7 +389,7 @@ pandora.ui.mainMenu = function() {
|
|||
} else if (data.id == 'advancedfind') {
|
||||
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||
} else if (data.id == 'findsimilar') {
|
||||
pandora.$ui.sequencesDialog = pandora.ui.sequencesDialog().open();
|
||||
pandora.$ui.similarClipsDialog = pandora.ui.similarClipsDialog().open();
|
||||
} else if (data.id == 'documents') {
|
||||
pandora.$ui.documentsDialog = pandora.ui.documentsDialog().open();
|
||||
} else if (data.id == 'titles') {
|
||||
|
@ -442,7 +442,7 @@ pandora.ui.mainMenu = function() {
|
|||
},
|
||||
key_alt_control_f: function() {
|
||||
if (!pandora.hasDialogOrScreen() && pandora.getItemIdAndPosition()) {
|
||||
pandora.$ui.sequencesDialog = pandora.ui.sequencesDialog().open();
|
||||
pandora.$ui.similarClipsDialog = pandora.ui.similarClipsDialog().open();
|
||||
}
|
||||
},
|
||||
key_alt_control_shift_a: function() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
pandora.ui.sequencesDialog = function() {
|
||||
pandora.ui.similarClipsDialog = function() {
|
||||
|
||||
var dialogSize = {
|
||||
height: Math.round((window.innerHeight - 48) * 0.9),
|
||||
|
@ -69,24 +69,6 @@ pandora.ui.sequencesDialog = function() {
|
|||
})
|
||||
.appendTo($toolbar),
|
||||
|
||||
$orderButton = Ox.Button({
|
||||
title: getTitle(),
|
||||
tooltip: getTooltip(),
|
||||
type: 'image'
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
pandora.UI.set({sequenceSort: [{
|
||||
key: pandora.user.ui.sequenceSort[0].key,
|
||||
operator: pandora.user.ui.sequenceSort[0].operator == '+' ? '-' : '+'
|
||||
}]});
|
||||
updateOrderButton();
|
||||
$list.options({sort: pandora.user.ui.sequenceSort});
|
||||
}
|
||||
})
|
||||
.css({float: 'right', margin: '4px 4px 4px 2px'})
|
||||
.appendTo($toolbar),
|
||||
|
||||
$sortSelect = Ox.Select({
|
||||
items: ['title', 'director', 'position', 'duration'].map(function(id) {
|
||||
var item = Ox.getObjectById(pandora.site.itemKeys, id)
|
||||
|
@ -110,8 +92,33 @@ pandora.ui.sequencesDialog = function() {
|
|||
updateOrderButton();
|
||||
$list.options({sort: pandora.user.ui.sequenceSort});
|
||||
}
|
||||
}),
|
||||
|
||||
$orderButton = Ox.Button({
|
||||
overlap: 'left',
|
||||
title: getTitle(),
|
||||
tooltip: getTooltip(),
|
||||
type: 'image'
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
pandora.UI.set({sequenceSort: [{
|
||||
key: pandora.user.ui.sequenceSort[0].key,
|
||||
operator: pandora.user.ui.sequenceSort[0].operator == '+' ? '-' : '+'
|
||||
}]});
|
||||
updateOrderButton();
|
||||
$list.options({sort: pandora.user.ui.sequenceSort});
|
||||
}
|
||||
}),
|
||||
|
||||
$sortElement = Ox.FormElementGroup({
|
||||
elements: [$sortSelect, $orderButton],
|
||||
float: 'right'
|
||||
})
|
||||
.css({
|
||||
float: 'right',
|
||||
margin: '4px'
|
||||
})
|
||||
.css({float: 'right', margin: '4px 2px'})
|
||||
.appendTo($toolbar),
|
||||
|
||||
$outerPanel = Ox.SplitPanel({
|
Loading…
Reference in a new issue