diff --git a/app/views/queries/_columns.html.erb b/app/views/queries/_columns.html.erb index 0d624d989..595a96b14 100644 --- a/app/views/queries/_columns.html.erb +++ b/app/views/queries/_columns.html.erb @@ -23,8 +23,10 @@ :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> +

- +
+ diff --git a/public/javascripts/select_list_move.js b/public/javascripts/select_list_move.js index 88496fd26..c3a5d0a2b 100644 --- a/public/javascripts/select_list_move.js +++ b/public/javascripts/select_list_move.js @@ -51,6 +51,17 @@ function moveOptionUp(theSel) { } } +function moveOptionTop(theSel) { + var index = theSel.selectedIndex; + + if (index > 0) { + for (i=index; i>0; i--) { + swapOptions(theSel, i-1, i); + } + theSel.selectedIndex = 0; + } +} + function moveOptionDown(theSel) { var index = theSel.selectedIndex; if (index < theSel.length - 1) { @@ -59,6 +70,17 @@ function moveOptionDown(theSel) { } } +function moveOptionBottom(theSel) { + var index = theSel.selectedIndex; + var indexTop = theSel.length - 1; + if (index < theSel.length - 1) { + for (i=index; i