Completed
Last Updated: 06 Jun 2016 10:03 by ADMIN
ADMIN
Danail Vasilev
Created on: 20 Apr 2016 15:10
Category: FormDecorator
Type: Bug Report
0
Title of decorated checkboxes by RadFormDecorator is lost in FireFox and IE
For the time being you can use the following workaround:
		<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"  RenderMode="Lightweight"/>
		<input id="mycb" type="checkbox" name="name" value="check here" title="some title" />
		<script>
			Telerik.Web.UI.RadFormDecorator.prototype.configureLabel = function (label, input) {
				if (!label.id) label.setAttribute("id", "_rfdSkinned" + input.id);
				input.setAttribute("_rfddecoratedID", label.id);

				input._rfddecoratedID = label.id;
				if (input.id)
					label.setAttribute("for", input.id);

				input.className = "rfdRealInput";

				if (!input.myLabel) input.myLabel = label;
				label.className = this._skin;

				//check if the text attribute is missing a value (i.e. the innerHTML of the <label> is null) and add &nbsp; so as the label becomes clickable
				if (label.innerHTML == "") {
					label.innerHTML = "&nbsp;";
				}

				var type = input.type;
				var inputName = type.charAt(0).toUpperCase() + type.substring(1);

				if (input.checked) {
					//removed the rendering of skin name from the rendered className string
					label.className = " rfd" + inputName + "Checked";
				}
				else {
					//removed the rendering of skin name from the rendered className string
					label.className = " rfd" + inputName + "Unchecked";
				}

				//check if the input is disabled (disabled="disabled")
				if (input.disabled) {
					//append a "disabled" class if the control is disabled
					label.className += " " + INPUT_DISABLED_CSSCLASS;
					label.setAttribute('disabled', 'disabled');
				}
				if (input.title != "") {
					label.setAttribute('title', input.title);
				}
			}
		</script>
0 comments