Feature #16326 » RM_16326_Custom_queries_mode_column_top_and_bottom.diff
| app/views/queries/_columns.html.erb (copie de travail) | ||
|---|---|---|
|
:ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>
|
||
|
</td>
|
||
|
<td class="buttons">
|
||
|
<input type="button" value="⇈" onclick="moveOptionTop(this.form.selected_columns);" /><br />
|
||
|
<input type="button" value="↑" onclick="moveOptionUp(this.form.selected_columns);" /><br />
|
||
|
<input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" />
|
||
|
<input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" /><br />
|
||
|
<input type="button" value="⇊" onclick="moveOptionBottom(this.form.selected_columns);" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
| public/javascripts/select_list_move.js (copie de travail) | ||
|---|---|---|
|
}
|
||
|
}
|
||
|
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) {
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
function moveOptionBottom(theSel) {
|
||
|
var index = theSel.selectedIndex;
|
||
|
var indexTop = theSel.length - 1;
|
||
|
if (index < theSel.length - 1) {
|
||
|
for (i=index; i<indexTop; i++) {
|
||
|
swapOptions(theSel, i+1, i);
|
||
|
}
|
||
|
theSel.selectedIndex = indexTop;
|
||
|
}
|
||
|
}
|
||
|
// OK
|
||
|
function selectAllOptions(id)
|
||
|
{
|
||
- « Previous
- 1
- 2
- Next »