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"); ASPxClientToolbarComboBox = _aspxCreateClass(ASPxClientComboBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.defaultCaption = ""; this.BeforeFocus = new ASPxClientEvent(); this.ItemClick = new ASPxClientEvent(); this.beforeFocusLockCount = 0; this.commandName = ""; }, SetValue: function(value) { var isValueEmpty = !value || value == "null"; if (isValueEmpty && this.defaultCaption) value = this.defaultCaption; ASPxClientComboBox.prototype.SetValue.call(this, value); if (this.GetSelectedIndex() == -1) { ASPxClientComboBox.prototype.SetText.call(this, value); } }, ForceRefocusEditor: function() { this.RaiseBeforeFocus(); }, RaiseBeforeFocus: function() { if(this.beforeFocusLockCount == 0){ this.beforeFocusLockCount ++; var args = new ASPxClientEventArgs(); this.BeforeFocus.FireEvent(this, args); } }, RaiseLostFocus: function(){ ASPxClientComboBox.prototype.RaiseLostFocus.call(this); this.beforeFocusLockCount = 0; }, OnListBoxItemMouseUp: function(evt) { ASPxClientComboBox.prototype.OnListBoxItemMouseUp.call(this, evt); this.RaiseItemClick(); }, RaiseItemClick: function() { var args = new ASPxClientEventArgs(); this.ItemClick.FireEvent(this, args); }, OnTextChanged: function() { ASPxClientComboBox.prototype.OnTextChanged.call(this); this.RaiseItemClick(); }, HideDropDownArea: function(isRaiseEvent) { ASPxClientComboBox.prototype.HideDropDownArea.call(this, isRaiseEvent); this.beforeFocusLockCount = 0; } }); ASPxClientNativeToolbarComboBox = _aspxCreateClass(ASPxClientNativeComboBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.defaultCaption = ""; this.commandName = ""; }, SetValue: function(value){ if (!value && this.defaultCaption) value = this.defaultCaption; ASPxClientNativeComboBox.prototype.SetValue.call(this, value); if(this.GetSelectedIndex() == -1) ASPxClientNativeComboBox.prototype.SetText.call(this, value); }, OnListBoxItemMouseUp: function() { ASPxClientNativeComboBox.prototype.OnListBoxItemMouseUp.call(this); this.RaiseItemClick(); }, RaiseItemClick: function() { var args = new ASPxClientEventArgs(); this.ItemClick.FireEvent(this, args); } }); ASPxClientToolbarCustomCssComboBox = _aspxCreateClass(ASPxClientToolbarComboBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.cssClasses = []; this.tagNames = []; this.cssClassesValueHashTable = {}; this.tagNameCssClassesValueHashTable = {}; }, Initialize: function(){ ASPxClientComboBox.prototype.Initialize.call(this); this.CreateTagNamesAndCssClassesHashTable(); }, GetValue: function() { var ret = ASPxClientToolbarComboBox.prototype.GetValue.call(this); if (ret && this.AreCustomTagsExist()) ret = this.GetExtValueByIndex(ret); return ret; }, SetValue: function(value) { var newValue = value; if (newValue && this.AreCustomTagsExist()) newValue = this.GetIndexByTagNameAndCssClass(value.tagName, value.cssClass); ASPxClientToolbarComboBox.prototype.SetValue.call(this, newValue); } }); ASPxClientNativeToolbarCustomCssComboBox = _aspxCreateClass(ASPxClientNativeToolbarComboBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.cssClasses = []; this.tagNames = []; this.cssClassesValueHashTable = {}; this.tagNameCssClassesValueHashTable = {}; }, Initialize: function(){ ASPxClientNativeToolbarComboBox.prototype.Initialize.call(this); this.CreateTagNamesAndCssClassesHashTable(); }, GetValue: function() { var ret = ASPxClientNativeToolbarComboBox.prototype.GetValue.call(this); if (ret && this.AreCustomTagsExist()) ret = this.GetExtValueByIndex(ret); return ret; }, SetValue: function(value) { var newValue = value; if (newValue && this.AreCustomTagsExist()) newValue = this.GetIndexByTagNameAndCssClass(value.tagName, value.cssClass); ASPxClientNativeToolbarComboBox.prototype.SetValue.call(this, newValue); } }); ASPxClientToolbarCustomCssComboBox.prototype.CreateTagNamesAndCssClassesHashTable= ASPxClientNativeToolbarCustomCssComboBox.prototype.CreateTagNamesAndCssClassesHashTable= function() { for (var i = 0; i < this.tagNames.length; i++) { var tagName = this.tagNames[i]; var cssClass = this.cssClasses[i]; if (tagName) { var key = ASPxClientToolbarCustomCssComboBox.GetKeyByTagNameAndCssClass(tagName, cssClass); if (!_aspxIsExists(this.tagNameCssClassesValueHashTable[key])) this.tagNameCssClassesValueHashTable[key] = this.GetItem(i).value; } else if (cssClass) { if (!_aspxIsExists(this.cssClassesValueHashTable[cssClass])) this.cssClassesValueHashTable[cssClass] = this.GetItem(i).value; } } } ASPxClientToolbarCustomCssComboBox.prototype.GetIndexByTagNameAndCssClass = ASPxClientNativeToolbarCustomCssComboBox.prototype.GetIndexByTagNameAndCssClass = function(tagName, cssClass) { var ret = null; if (tagName) { var key = ASPxClientToolbarCustomCssComboBox.GetKeyByTagNameAndCssClass(tagName, cssClass); ret = _aspxIsExists(this.tagNameCssClassesValueHashTable[key]) ? this.tagNameCssClassesValueHashTable[key] : null; } if (cssClass && (ret == null)) ret = _aspxIsExists(this.cssClassesValueHashTable[cssClass]) ? this.cssClassesValueHashTable[cssClass] : null; return ret; } ASPxClientToolbarCustomCssComboBox.prototype.GetExtValueByIndex = ASPxClientNativeToolbarCustomCssComboBox.prototype.GetExtValueByIndex = function(index) { return { tagName: this.tagNames[index], cssClass: this.cssClasses[index] }; } ASPxClientToolbarCustomCssComboBox.prototype.AreCustomTagsExist = ASPxClientNativeToolbarCustomCssComboBox.prototype.AreCustomTagsExist = function() { return (this.tagNames.length > 0) && (this.cssClasses.length > 0); } ASPxClientToolbarCustomCssComboBox.GetKeyByTagNameAndCssClass = ASPxClientNativeToolbarCustomCssComboBox.GetKeyByTagNameAndCssClass = function(tagName, cssClass) { return tagName + "|" + cssClass; } ASPxClientToolbarParagraphFormattingComboBox = _aspxCreateClass(ASPxClientToolbarComboBox, { SetValue: function(value) { if(this.GetIndexByValue(value) == -1) value = this.TryGetDefaultFormatValue(); ASPxClientToolbarComboBox.prototype.SetValue.call(this, value); } }); ASPxClientNativeToolbarParagraphFormattingComboBox = _aspxCreateClass(ASPxClientNativeToolbarComboBox, { SetValue: function(value) { if(this.GetIndexByValue(value) == -1) value = this.TryGetDefaultFormatValue(); ASPxClientNativeToolbarComboBox.prototype.SetValue.call(this, value); } }); ASPxClientToolbarParagraphFormattingComboBox.prototype.TryGetDefaultFormatValue = ASPxClientNativeToolbarParagraphFormattingComboBox.prototype.TryGetDefaultFormatValue = function() { var newValue = ""; var defaultTags = ["p", "span"]; for(var i = 0; i < defaultTags.length && newValue == ""; i++) if(this.GetIndexByValue(defaultTags[i]) != -1) newValue = defaultTags[i]; return newValue; } ASPxClientToolbarParagraphFormattingComboBox.prototype.GetIndexByValue = ASPxClientNativeToolbarParagraphFormattingComboBox.prototype.GetIndexByValue = function(value) { var lb = this.GetListBoxControl(); for(var i = 0; i < lb.GetItemCount(); i ++){ if(lb.GetItem(i).value == value) return i; } return -1; } ASPxClientToolbarListBox = _aspxCreateClass(ASPxClientListBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); }, GetItem: function(index){ var item = ASPxClientListBox.prototype.GetItem.call(this, index); if(item){ item.text = _aspxTrim(item.text); return item; } return null; } }); ASPxClientNativeToolbarListBox = _aspxCreateClass(ASPxClientNativeListBox, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); }, GetItem: function(index){ var item = ASPxClientNativeListBox.prototype.GetItem.call(this, index); if(item){ item.text = _aspxTrim(item.text); return item; } return null; } }); } /* playback timings (ms): RedisCDXSource: 5.688 exclusion.robots: 0.132 CDXLines.iter: 21.153 (3) exclusion.robots.policy: 0.122 PetaboxLoader3.datanode: 154.933 (4) captures_list: 347.951 LoadShardBlock: 317.165 (3) esindex: 0.011 PetaboxLoader3.resolve: 183.536 load_resource: 224.069 */