fix javaScript to make the view work in IE7

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1451 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 14 years ago
parent 9216ebb70e
commit 65520c6238
  1. 10
      assets/javascripts/select_list_move_optgroup.js

@ -14,11 +14,11 @@ function addOption(theSel, newOpt, theCategory)
Element.extend(theSel);
if (theCategory && (theSel.childElements().length > 0) && theSel.down(0).tagName == "OPTGROUP") { // add the opt to the given category
opt_groups = theSel.childElements();
for (i in opt_groups)
if (opt_groups[i].getAttribute("data-category") == theCategory) {
opt_groups[i].appendChild(newOpt);
break;
}
for (var i=0; i<opt_groups.length; i++)
if (opt_groups[i].getAttribute("data-category") == theCategory) {
opt_groups[i].appendChild(newOpt);
break;
}
}
else { // no category given, just add the opt to the end of the select list
theSel.appendChild(newOpt);

Loading…
Cancel
Save