var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); ASPxClientCheckBox = _aspxCreateClass(ASPxClientEdit, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.valueChecked = true; this.valueUnchecked = false; this.valueGrayed = null; this.allowGrayed = false; this.isNative = false; this.stateController = null; this.imageProperties = null; this.allowGrayedByClick = true; this.internalCheckBox = null; this.icbFocusedStyle = []; this.sizingConfig.allowSetWidth = false; this.sizingConfig.allowSetHeight = false; this.CheckedChanged = new ASPxClientEvent(); }, InlineInitialize: function() { this.isNative = !this.imageProperties; this.allowGrayed = this.IsGrayedAllowed(); this.stateController = ASPxCheckableElementStateController.Create(this.imageProperties, this.valueChecked, this.valueUnchecked, this.valueGrayed, this.allowGrayed); if(!this.isNative) this.CreateInternalCheckBox(); ASPxClientEditBase.prototype.InlineInitialize.call(this); }, Initialize: function() { ASPxClientEdit.prototype.Initialize.call(this); if(!_aspxIsExistsElement(this.GetMainElement())) return; if(!this.isNative) { this.previousValue = this.GetStateInput().value; this.SetValue(this.GetValue()); } else this.previousValue = this.GetInputElement().checked; }, GetInputElement: function() { if(this.isNative) return ASPxClientEdit.prototype.GetInputElement.call(this); else return this.GetStateInput(); }, CreateInternalCheckBox: function() { var instance = this; this.internalCheckBox = new ASPxClientCheckBoxInternal(this.GetStateInput(), this.stateController, this.allowGrayed, this.allowGrayedByClick, ASPxCheckEditElementHelper.Instance, this.GetMainElement(), true); this.internalCheckBox.CreateFocusDecoration(this.icbFocusedStyle); this.internalCheckBox.SetEnabled(this.GetEnabled()); this.internalCheckBox.readOnly = this.readOnly; this.internalCheckBox.CheckedChanged.AddHandler(function(s, e) { instance.OnClick(e); }); this.internalCheckBox.Focus.AddHandler(function() { instance.OnFocus(); }); this.internalCheckBox.LostFocus.AddHandler(function() { instance.OnLostFocus(); }); if(__aspxWebKitFamily) _aspxAttachEventToElement(this.internalCheckBox.mainElement.parentNode, "selectstart", _aspxPreventEventAndBubble); }, FindInputElement: function() { var element = this.GetMainElement(); if(_aspxIsExistsElement(element) && element.tagName != "INPUT") element = this.GetChild("_I"); return element; }, IsGrayedAllowed: function() { for(var propertyKey in this.imageProperties) if(this.imageProperties[propertyKey].length === 3) return true; return false; }, RaiseValueChangedEvent: function() { var processOnServer = ASPxClientEdit.prototype.RaiseValueChangedEvent.call(this); processOnServer = this.RaiseCheckedChanged(processOnServer); return processOnServer; }, OnClick: function() { if(this.GetEnabled() && !this.readOnly) { var value = this.GetCorrectValue(this.previousValue); value = this.stateController.GetNextCheckBoxValue(value, this.allowGrayedByClick && this.allowGrayed); this.SetValue(value); this.OnValueChanged(); if(!this.focused) this.SetFocus(); } }, IsElementBelongToInputElement: function(element) { return false; }, ForceRefocusEditor: function() { if(this.isNative) ASPxClientEdit.prototype.ForceRefocusEditor.call(this); }, GetValue: function() { var value = this.stateController.GetValueByInputKey(this.GetStateInput().value); if(value === "" && this.convertEmptyStringToNull) value = null; return value; }, SetValue: function(value) { this.previousValue = value; value = this.GetCorrectValue(value); if(this.isNative) this.GetInputElement().checked = this.previousValue; else this.internalCheckBox.SetValue(value); this.GetStateInput().value = this.stateController.GetInputKeyByValue(value); this.OnValueSet(); }, GetICBMainElement: function() { return ASPxCheckableElementHelper.Instance.GetICBMainElementByInput(this.GetStateInput()); }, GetLabelElement: function() { return ASPxCheckEditElementHelper.Instance.GetLabelElement(this.GetMainElement()); }, GetStateInput: function() { return this.GetChild("_S"); }, GetCorrectValue: function(value) { var stateIsExist = typeof(this.stateController.GetInputKeyByValue(value)) != "undefined"; if(!stateIsExist) return this.allowGrayed ? this.valueGrayed : this.valueUnchecked; return value; }, OnValueSet: function() {}, RaiseCheckedChanged: function(processOnServer) { if(!this.CheckedChanged.IsEmpty()) { var args = new ASPxClientProcessingModeEventArgs(processOnServer); this.CheckedChanged.FireEvent(this, args); processOnServer = args.processOnServer; } return processOnServer; }, SetEnabled: function(enabled) { ASPxClientEdit.prototype.SetEnabled.call(this, enabled); if(!this.isNative) this.internalCheckBox.SetEnabled(enabled); }, GetChecked: function() { return this.stateController.GetCheckStateByInputKey(this.GetStateInput().value) == ASPxClientCheckBoxCheckState.Checked; }, SetChecked: function(isChecked) { this.SetCheckState(isChecked ? ASPxClientCheckBoxCheckState.Checked : ASPxClientCheckBoxCheckState.Unchecked); }, GetText: function() { var labelElement = this.GetLabelElement(); return (labelElement != null) ? labelElement.innerHTML : ""; }, GetCheckState: function() { var internalCheckeState = this.stateController.GetCheckStateByInputKey(this.GetStateInput().value); if(internalCheckeState != ASPxClientCheckBoxCheckState.Indeterminate || this.allowGrayed) return internalCheckeState; else return ASPxClientCheckBoxCheckState.Unchecked; }, SetCheckState: function(checkState) { if(checkState != ASPxClientCheckBoxCheckState.Indeterminate || this.allowGrayed) { var value = this.stateController.GetValueByCheckState(checkState); this.SetValue(value); } }, SetText: function(text) { var labelElement = this.GetLabelElement(); if(labelElement != null) _aspxSetInnerHtml(labelElement, text); }, ChangeEnabledAttributes: function(enabled){ if(this.isNative) { this.ChangeInputEnabledAttributes(this.GetInputElement(), _aspxChangeAttributesMethod(enabled)); this.GetInputElement().disabled = !enabled; } else this.internalCheckBox.SetEnabled(enabled); }, ChangeEnabledStateItems: function(enabled){ aspxGetStateController().SetElementEnabled(this.GetMainElement(), enabled); }, ChangeInputEnabledAttributes: function(element, method){ method(element, "onclick"); } }); ASPxClientCheckBox.Cast = ASPxClientControl.Cast; ASPxClientRadioButton = _aspxCreateClass(ASPxClientCheckBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.isASPxClientRadioButton = true; this.groupName = ""; }, OnValueSet: function() { if(this.previousValue === true) this.UncheckOtherGroupMembers(true ); }, OnClick: function() { if(!this.previousValue) { this.UncheckOtherGroupMembers(); ASPxClientCheckBox.prototype.OnClick.call(this); } else { if(!this.focused) this.SetFocus(); } }, CreateInternalCheckBox: function() { ASPxClientCheckBox.prototype.CreateInternalCheckBox.call(this); this.internalCheckBox.autoSwitchEnabled = false; }, UncheckOtherGroupMembers: function(suppressEvents) { var members = this.GetGroupMembers(); for(var i = 0; i < members.length; i++) { var radioButton = members[i]; if(!_aspxIsExistsElement(radioButton.GetMainElement())) members[i] = null; else { if(radioButton != this && radioButton.GetValue()){ radioButton.SetValue(false); if(!suppressEvents) radioButton.RaiseValueChangedEvent(); } } } }, OnReadonlyClick: function() { if(!this.previousValue) { var members = this.GetGroupMembers(); for(var i = 0; i < members.length; i++) { var radioButton = members[i]; radioButton.SetValue(radioButton.GetValue()); } } }, GetGroupName: function() { if(!this.isNative) return this.groupName; var inputElement = this.GetInputElement(); if (!_aspxIsExistsElement(inputElement)) return null; var name = inputElement.name; if(!name.length) name = ""; return name; }, GetGroupMembers: function() { var result = [ ]; var groupName = this.GetGroupName(); if(groupName.length > 0) { aspxGetControlCollection().ForEachControl(function(control) { if(ASPxIdent.IsASPxClientRadioButton(control)) { var controlGroupName = control.GetGroupName(); if (controlGroupName != null && controlGroupName == groupName) result.push(control); } }); } else { result.push(this); } return result; }, GetChecked: function() { return this.GetValue() == true; }, SetChecked: function(isChecked) { this.SetValue(isChecked); } }); ASPxClientRadioButton.Cast = ASPxClientControl.Cast; ASPxIdent.IsASPxClientRadioButton = function(obj) { return !!obj.isASPxClientRadioButton; }; function aspxChkOnClick(name) { var edit = aspxGetControlCollection().Get(name); if(edit) edit.OnClick(); } function aspxERBOnReadonlyClick(name) { var rb = aspxGetControlCollection().Get(name); if(rb) rb.OnReadonlyClick(); } } /* playback timings (ms): exclusion.robots: 0.214 load_resource: 2983.553 PetaboxLoader3.resolve: 6174.828 (4) LoadShardBlock: 10383.625 (3) PetaboxLoader3.datanode: 6882.47 (4) exclusion.robots.policy: 0.199 esindex: 0.016 RedisCDXSource: 0.747 captures_list: 10404.914 CDXLines.iter: 16.868 (3) */