2013-04-23 04:10:18 +00:00
|
|
|
function moveOptions(theSelFrom, theSelTo) {
|
2014-11-18 21:44:45 +00:00
|
|
|
$(theSelFrom).find('option:selected').detach().prop("selected", false).appendTo($(theSelTo));
|
2012-03-04 18:36:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function moveOptionUp(theSel) {
|
2014-11-18 21:44:45 +00:00
|
|
|
$(theSel).find('option:selected').each(function(){
|
|
|
|
|
$(this).prev(':not(:selected)').detach().insertAfter($(this));
|
|
|
|
|
});
|
2012-03-04 18:36:41 +00:00
|
|
|
}
|
|
|
|
|
|
2014-03-21 02:20:56 +00:00
|
|
|
function moveOptionTop(theSel) {
|
2014-11-18 21:44:45 +00:00
|
|
|
$(theSel).find('option:selected').detach().prependTo($(theSel));
|
2014-03-21 02:20:56 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-04 18:36:41 +00:00
|
|
|
function moveOptionDown(theSel) {
|
2014-11-18 21:44:45 +00:00
|
|
|
$($(theSel).find('option:selected').get().reverse()).each(function(){
|
|
|
|
|
$(this).next(':not(:selected)').detach().insertBefore($(this));
|
|
|
|
|
});
|
2012-03-04 18:36:41 +00:00
|
|
|
}
|
|
|
|
|
|
2014-03-21 02:20:56 +00:00
|
|
|
function moveOptionBottom(theSel) {
|
2014-11-18 21:44:45 +00:00
|
|
|
$(theSel).find('option:selected').detach().appendTo($(theSel));
|
2014-03-21 02:20:56 +00:00
|
|
|
}
|
|
|
|
|
|
2014-11-18 21:53:25 +00:00
|
|
|
$(document).ready(function(){
|
|
|
|
|
$('.query-columns').closest('form').submit(function(){
|
|
|
|
|
$('#selected_columns option').prop('selected', true);
|
|
|
|
|
});
|
|
|
|
|
});
|