Merged r12990 and r12991 (#16326).
git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13023 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
65c9223fe5
commit
33a7f6bc11
|
@ -23,8 +23,10 @@
|
|||
: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>
|
||||
|
|
|
@ -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<indexTop; i++) {
|
||||
swapOptions(theSel, i+1, i);
|
||||
}
|
||||
theSel.selectedIndex = indexTop;
|
||||
}
|
||||
}
|
||||
|
||||
// OK
|
||||
function selectAllOptions(id) {
|
||||
var select = $('#'+id);
|
||||
|
|
|
@ -263,6 +263,7 @@ table.query-columns td.buttons {
|
|||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
table.query-columns td.buttons input[type=button] {width:35px;}
|
||||
|
||||
td.center {text-align:center;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue