Feature #16326 » RM_16326_Custom_queries_mode_column_top_and_bottom.diff
| app/views/queries/_columns.html.erb (copie de travail) | ||
|---|---|---|
| 23 | 23 |
:ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> |
| 24 | 24 |
</td> |
| 25 | 25 |
<td class="buttons"> |
| 26 |
<input type="button" value="⇈" onclick="moveOptionTop(this.form.selected_columns);" /><br /> |
|
| 26 | 27 |
<input type="button" value="↑" onclick="moveOptionUp(this.form.selected_columns);" /><br /> |
| 27 |
<input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" /> |
|
| 28 |
<input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" /><br /> |
|
| 29 |
<input type="button" value="⇊" onclick="moveOptionBottom(this.form.selected_columns);" /> |
|
| 28 | 30 |
</td> |
| 29 | 31 |
</tr> |
| 30 | 32 |
</table> |
| public/javascripts/select_list_move.js (copie de travail) | ||
|---|---|---|
| 64 | 64 |
} |
| 65 | 65 |
} |
| 66 | 66 | |
| 67 |
function moveOptionTop(theSel) {
|
|
| 68 |
var index = theSel.selectedIndex; |
|
| 69 | ||
| 70 |
if (index > 0) {
|
|
| 71 |
for (i=index; i>0; i--) {
|
|
| 72 |
swapOptions(theSel, i-1, i); |
|
| 73 |
} |
|
| 74 |
theSel.selectedIndex = 0; |
|
| 75 |
} |
|
| 76 |
} |
|
| 77 | ||
| 67 | 78 |
function moveOptionDown(theSel) {
|
| 68 | 79 |
var index = theSel.selectedIndex; |
| 69 | 80 |
if (index < theSel.length - 1) {
|
| ... | ... | |
| 72 | 83 |
} |
| 73 | 84 |
} |
| 74 | 85 | |
| 86 |
function moveOptionBottom(theSel) {
|
|
| 87 |
var index = theSel.selectedIndex; |
|
| 88 |
var indexTop = theSel.length - 1; |
|
| 89 |
if (index < theSel.length - 1) {
|
|
| 90 |
for (i=index; i<indexTop; i++) {
|
|
| 91 |
swapOptions(theSel, i+1, i); |
|
| 92 |
} |
|
| 93 |
theSel.selectedIndex = indexTop; |
|
| 94 |
} |
|
| 95 |
} |
|
| 96 | ||
| 75 | 97 |
// OK |
| 76 | 98 |
function selectAllOptions(id) |
| 77 | 99 |
{
|
- « Previous
- 1
- 2
- Next »