update sequences dialog

This commit is contained in:
rolux 2012-06-15 17:47:36 +00:00
parent 0d71925daa
commit ff2514f882

View file

@ -78,6 +78,10 @@ pandora.ui.sequencesDialog = function() {
$dialog[ $dialog[
data.ids.length ? 'enableButton' : 'disableButton' data.ids.length ? 'enableButton' : 'disableButton'
]('open'); ]('open');
},
pandora_sequencesort: function(data) {
Ox.print('SEQUENCESORT:', data)
$list.options({sort: data.value});
} }
}); });
$splitPanel.replaceElement(0, $sidebar); $splitPanel.replaceElement(0, $sidebar);
@ -86,9 +90,14 @@ pandora.ui.sequencesDialog = function() {
return $splitPanel; return $splitPanel;
}, },
tabs: [ tabs: [
{id: 'shape', title: 'Similar Shapes'}, {id: 'shape', title: 'Similar Shapes', selected: pandora.user.ui.sequenceMode == 'shape'},
{id: 'color', title: 'Similar Colors'} {id: 'color', title: 'Similar Colors', selected: pandora.user.ui.sequenceMode == 'color'}
] ]
})
.bindEvent({
change: function(data) {
pandora.UI.set({sequenceMode: data.selected});
}
}), }),
$dialog = Ox.Dialog({ $dialog = Ox.Dialog({
buttons: [ buttons: [
@ -150,6 +159,7 @@ pandora.ui.sequencesDialog = function() {
key: key, key: key,
operator: pandora.getSortOperator(key) operator: pandora.getSortOperator(key)
}]}); }]});
updateButton();
} }
}) })
.css({float: 'right', margin: '4px 2px'}) .css({float: 'right', margin: '4px 2px'})
@ -163,6 +173,8 @@ pandora.ui.sequencesDialog = function() {
}) })
.appendTo($statusbar); .appendTo($statusbar);
$tabPanel.find('.OxButtonGroup').css({width: '256px'});
function getTitle() { function getTitle() {
return pandora.user.ui.sequenceSort[0].operator == '+' ? 'up' : 'down'; return pandora.user.ui.sequenceSort[0].operator == '+' ? 'up' : 'down';
} }
@ -187,12 +199,11 @@ pandora.ui.sequencesDialog = function() {
out: outPoint, out: outPoint,
position: inPoint position: inPoint
}; };
Ox.print(selected, '???', set);
$dialog.close(); $dialog.close();
pandora.UI.set(set) pandora.UI.set(set)
} }
function updateButton() { function updateButton() {
that.options({ $orderButton.options({
title: getTitle(), title: getTitle(),
tooltip: getTooltip() tooltip: getTooltip()
}); });