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