FELIX-975 : Fix for checkboxes in IE6,IE7: They can only be checked after they've been added to the DOM.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@750566 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/res/ui/configmanager.js b/webconsole/src/main/resources/res/ui/configmanager.js
index fd099a5..9f98ca4 100644
--- a/webconsole/src/main/resources/res/ui/configmanager.js
+++ b/webconsole/src/main/resources/res/ui/configmanager.js
@@ -244,6 +244,8 @@
value: propList
})
);
+ // FIX for IE6 and above: checkbox can only be checked after it is in the DOM
+ $(".checked_box").attr("checked", true).removeClass("checked_box");
}
function printConfigurationInfo( /* Element */ parent, obj )
@@ -329,7 +331,7 @@
var inputEl = createElement( "input", "input", {
type: "checkbox",
name: prop,
- value: true
+ value: "true"
});
if (value && typeof(value) != "boolean")
@@ -338,16 +340,14 @@
}
if (value)
{
- inputEl.setAttribute( "checked", true );
+ $(inputEl).addClass("checked_box");
}
-
var hiddenEl = createElement( "input", "input", {
type: "hidden",
name: prop,
- value: false
+ value: "false"
});
-
- var divEl = createElement("div", "div");
+ var divEl = createElement("div");
divEl.appendChild(inputEl);
divEl.appendChild(hiddenEl);
return divEl;
@@ -425,6 +425,8 @@
}
var newSpan = createSpan(prop, '');
span.parentNode.insertBefore(newSpan, span.nextSibling);
+ // FIX for IE6 and above: checkbox can only be checked after it is in the DOM
+ $(".checked_box").attr("checked", true).removeClass("checked_box");
}
function removeValue(vidx)