Index: app/views/queries/_columns.html.erb =================================================================== --- app/views/queries/_columns.html.erb (révision 3176) +++ app/views/queries/_columns.html.erb (copie de travail) @@ -23,8 +23,10 @@ :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> +

- +
+ Index: public/javascripts/select_list_move.js =================================================================== --- public/javascripts/select_list_move.js (révision 3176) +++ public/javascripts/select_list_move.js (copie de travail) @@ -64,6 +64,17 @@ } } +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) { @@ -72,6 +83,18 @@ } } +function moveOptionBottom(theSel) { + var index = theSel.selectedIndex; + var indexTop = theSel.length - 1; + if (index < theSel.length - 1) { + for (i=index; i