Bug 68921 - Debug change-columns
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@949 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
8e30de0833
commit
ad6c3e520c
|
@ -28,17 +28,24 @@ function initChangeColumns() {
|
||||||
updateView();
|
updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
function switch_options(from_box, to_box, selected) {
|
function switch_options(from_box, to_box, selected)
|
||||||
for (var i = 0; i<from_box.options.length; i++) {
|
{
|
||||||
|
var sel = [];
|
||||||
|
for (var i = 0; i < from_box.options.length; i++)
|
||||||
|
sel[i] = from_box.options[i].selected;
|
||||||
|
var newlist = [];
|
||||||
|
for (var i = from_box.options.length-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (sel[i] == selected)
|
||||||
|
{
|
||||||
var opt = from_box.options[i];
|
var opt = from_box.options[i];
|
||||||
if (opt.selected == selected) {
|
var newopt = new Option(opt.text, opt.value, opt.defaultselected, sel[i]);
|
||||||
var newopt = new Option(opt.text, opt.value, opt.defaultselected, opt.selected);
|
newlist.unshift(newopt);
|
||||||
to_box.options[to_box.options.length] = newopt;
|
from_box.options.remove(i);
|
||||||
from_box.options[i] = null;
|
|
||||||
i = i - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
for (var i in newlist)
|
||||||
|
to_box.options.add(newlist[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function move_select() {
|
function move_select() {
|
||||||
|
|
Loading…
Reference in New Issue