Type.registerNamespace("Telerik.Web.UI"); (function(){var a=Telerik.Web.UI; a.RadComboBoxItem=function(){a.RadComboBoxItem.initializeBase(this); }; a.RadComboBoxItem._regExEscape=function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"); }; })(); (function(){var a=$telerik.$,c=Telerik.Web.UI,b=c.RadComboBoxItem; c.RadComboBoxItem.prototype={_shouldInitializeChild:function(d){return false; },get_text:function(){var e=this.get_comboBox(); var d=e?e._checkBoxes:false; if(this._text!==null){return this._removeEmTags(this._text); }if((this._text=this._properties.getValue("text",null))!==null){return this._removeEmTags(this._text); }var f=this.get_textElement(); if(!f){return""; }if(typeof(f.innerText)!="undefined"){if(d&&Telerik.Web.Browser.chrome){this._text=a(f).find("label")[0].innerText; }else{this._text=f.innerText; }}else{this._text=f.textContent; }return this._removeEmTags(this._text); },get_baseText:function(){return c.RadComboBoxItem.callBaseMethod(this,"get_text"); },set_text:function(k){var g=this.get_element(),d=a(g),i=this.get_imageElement(),f=this.get_comboBox(),h=f?f._checkBoxes:false; if(g&&!d.hasClass("rcbTemplate")){if(!i&&!h){g.innerHTML=k; }else{var e=d,j; if(h){e=d.find("label"); }j=e.children(":last").get(0); if(j&&j.nextSibling){j.nextSibling.nodeValue=k; }else{e.append(k); }}}this._text=k; this._properties.setValue("text",k,true); if(f){if(this.get_checked()){f._updateComboBoxText(); }f._resizeDropDown(); }},_removeEmTags:function(f){var d=f.indexOf(""); var e=f.indexOf(""); if(d>=0&&e>d){f=String.format("{0}{1}{2}",f.substr(0,d),f.substr(d+4,e-d-4),f.substr(e+5)); }return f; },set_visible:function(e){var f=this.get_visible()!=e,d=this.get_element(); if(!f){return; }c.RadComboBoxItem.callBaseMethod(this,"set_visible",[e]); if(e){d.style.display=""; }else{d.style.display="none"; }},clearEmTags:function(){var d=this; a(this.get_element()).find("em").contents().unwrap().parent().each(function(){if($telerik.isIE||Telerik.Web.Browser.edge){d._normalize(this); }else{this.normalize(); }}); },_normalize:function(f){var d=f.firstChild,e; while(d){if(d.nodeType==3){while((e=d.nextSibling)&&e.nodeType==3){d.appendData(e.data); f.removeChild(e); }}else{this._normalize(d); }d=d.nextSibling; }},_highlight:function(g,d){var e=this,h=function(i){return b.STRING_EM_START+i+b.STRING_EM_END; },f=false; a(d).contents().each(function(){if(this.nodeType!=1){var j=a(this).text(); if(g.test(j)){var i=j.replace(g,h); i=c.RadComboBox.htmlEncode(i); i=i.replace(b.REGEX_EM_START_HTML_ENCODED,b.STRING_EM_START).replace(b.REGEX_EM_END_HTML_ENCODED,b.STRING_EM_END); if(!a(this).siblings()){parent.innerHTML=i; }else{a(this).replaceWith(i); }f=true; }}else{if(e._highlight(g,this)){f=true; }}}); return f; },highlightText:function(e,h){this.clearEmTags(); if(h===""){return true; }var d=b._regExEscape(h),g=null; if(e==c.RadComboBoxFilter.StartsWith){g=new RegExp("^\\s*"+d,"im"); }else{if(e==c.RadComboBoxFilter.Contains){g=new RegExp(d,"gim"); }}var f=this._highlight(g,this.get_element()); return f; },_createDomElement:function(){var e=this.get_comboBox().get_simpleRendering(),f=e?document.createElement("div"):document.createElement("ul"),d=[]; if(e){d[d.length]=""; }f.innerHTML=d.join(""); if(e){return f.firstChild.firstChild; }else{return f.firstChild; }},_render:function(d){if(this.get_comboBox().get_simpleRendering()){this._renderOptionElement(d); }else{this._renderLiElement(d); }},_renderOptionElement:function(d){d[d.length]=""); this._imageElement=d.get(0); if(e){d.insertAfter(e); }else{if(f.firstChild){f.insertBefore(this._imageElement,f.firstChild); }else{f.appendChild(this._imageElement); }}return this._imageElement; },get_checkBoxElement:function(){if(!this._checkBoxElement){this._checkBoxElement=a(this.get_element()).find("label > input[type='checkbox']").get(0)||null; }return this._checkBoxElement; },get_imageElement:function(){if(!this._imageElement){var d=a(this.get_element()); this._imageElement=d.find("img.rcbImage").get(0); }return this._imageElement; },get_disabledImageUrl:function(){return this._properties.getValue("disabledImageUrl",null); },set_disabledImageUrl:function(d){this._properties.setValue("disabledImageUrl",d,true); this._updateImageSrc(); },get_imageUrl:function(){this._imageUrl=this._properties.getValue("imageUrl",null); if(this._imageUrl){return this._imageUrl; }if(!this._imageUrl){var d=this.get_imageElement(); if(d){this._imageUrl=d.src; }}return this._imageUrl; },set_imageUrl:function(d){this._imageUrl=d; this._properties.setValue("imageUrl",d,true); this._updateImageSrc(); },get_value:function(){return this._properties.getValue("value",""); },select:function(){this._select(null); },hide:function(){this.set_visible(false); },show:function(){this.set_visible(true); },check:function(){this.set_checked(true); },uncheck:function(){this.set_checked(false); },get_checked:function(){return this._properties.getValue("checked",false)===true; },set_checked:function(f){if(!this.get_enabled()){return; }this._setChecked(f); var d=this.get_comboBox(),e=this.get_index(); if(d){if(f){d._registerCheckedIndex(e); }else{d._unregisterCheckedIndex(e); }d._updateComboBoxText(); if(d._checkAllElement){d._updateCheckAllState(); }}},_setChecked:function(e){var d=this.get_comboBox(); if(d&&d._checkBoxes){this._element.setAttribute("aria-checked",e); }this._properties.setValue("checked",e); this._updateCheckBoxCheckedState(e); },_updateCheckBoxCheckedState:function(e){var d=a(this.get_checkBoxElement()); if(d[0]){if(e){d.prop("checked",true); }else{d.prop("checked",false); }}},_select:function(g){if(!this.get_isEnabled()||this.get_isSeparator()){return; }var d=this.get_comboBox(); if(!d.get_simpleRendering()&&d.raise_selectedIndexChanging(this,g)===true){return; }var j=d.get_text(); var h=d._getLastSeparatorIndex(j); var k=j.substring(0,h+1)+this.get_text(); var i=d.get_selectedItem(); if(i){i.set_selected(false); }d.set_text(k); d.set_originalText(k); d.set_value(this.get_value()); d.set_selectedItem(this); d.set_selectedIndex(this.get_index()); if(d.get_simpleRendering()){this.get_element().selected="selected"; }this.set_selected(true); this.highlight(); d.raise_selectedIndexChanged(this,g); var f={Command:"Select",Index:this.get_index()}; d.postback(f); },_createChildControls:function(){},unHighlight:function(){var d=this.get_comboBox(),e; if(d){if(!d.get_isTemplated()||d.get_highlightTemplatedItems()){e=this.get_element(); var f=/\brcbHovered\b/; this._replaceCssClass(e,f,"rcbItem"); if(d.get_enableAriaSupport()){c.RadComboBox._toggleActiveDescendantAttributes(e,d.get_id(),false); }}d.set_highlightedItem(null); }},highlight:function(){if(!this.get_isEnabled()||this.get_isSeparator()){return; }var d=this.get_comboBox(); if(!d.get_isTemplated()||d.get_highlightTemplatedItems()){var f=d.get_highlightedItem(); if(f){f.unHighlight(); }var e=this.get_element(); if(e){var g=/\brcbItem\b/; this._replaceCssClass(e,g,"rcbHovered"); if(d.get_enableAriaSupport()){c.RadComboBox._toggleActiveDescendantAttributes(e,d.get_id(),true); }}}d.set_highlightedItem(this); },scrollOnTop:function(){var d=this.get_comboBox(); if(d&&d.get_simpleRendering()){return; }var f=this.get_element().offsetTop,e=d._getHeaderElement(); if(e){f=f-e.offsetHeight; }d.get_childListElementWrapper().scrollTop=f; },scrollIntoView:function(){var e=this.get_comboBox(),i=this.get_element(); if(e&&e.get_simpleRendering()){return; }var l=i.offsetTop; var k=i.offsetHeight; var h=e.get_childListElementWrapper(); var f=h.scrollTop; var g=h.offsetHeight; var d=e.get_checkAllCheckBoxDivElement(); if(d){l+=d.offsetHeight; }if(l+k>f+g){h.scrollTop=l+k-g; if(h.clientWidth-1&&h==j){return true; }return false; },_childInserted:function(h,i,j){c.RadComboBox.callBaseMethod(this,"_childInserted",[h,i,j]); if(!this._childControlsCreated){return; }if(this._checkBoxes){if(i.get_checked()){this._registerCheckedIndex(h); }if(h!=this.get_items().get_count()-1){this._updateCheckedIndices(); }this._updateComboBoxText(); if(this._checkAllElement){this._updateCheckAllState(); }}},_childRemoved:function(i,k){var h=i.get_element(); if(k.get_items().get_count()===0&&!this.get_simpleRendering()&&!this._getHeaderElement()&&!this._getFooterElement()&&!this._loadingDiv){h=k._childListElement; k._childListElement=null; }if(h){h.innerHTML=""; if(h.parentNode){h.parentNode.removeChild(h); }h=null; }if(i==this.get_selectedItem()){this.set_selectedItem(null); this.set_highlightedItem(null); this.set_text(""); if(this.get_simpleRendering()){var j=this.get_selectedOption(); if(j){j._item.select(); }}}else{if(i==this.get_highlightedItem()){this.set_highlightedItem(null); }}if(this._checkBoxes){this._updateCheckedIndices(); this._updateComboBoxText(); }c.RadComboBox.callBaseMethod(this,"_childRemoved",[i,k]); },_childRemoving:function(h){var i=h.get_index(); if(this._itemData){Array.remove(this._itemData,this._itemData[i]); }c.RadComboBox.callBaseMethod(this,"_childRemoving",[h]); },_childrenCleared:function(l){this.set_selectedItem(null); this.set_highlightedItem(null); var h=l.get_childListElement(); var k=l.get_items().get_count(); var j; if(h&&!this._getHeaderElement()&&!this._getFooterElement()){for(j=0; j-1){o=i=l; }else{o=-p.moveStart("character",-l); o+=m.slice(0,o).split("\n").length-1; if(p.compareEndPoints("EndToEnd",j)>-1){i=l; }else{i=-p.moveEnd("character",-l); i+=m.slice(0,i).split("\n").length-1; }}}}catch(k){}}return{selectionStart:o,selectionEnd:i}; },_getInputTargetSelection:function(h){var m=this.get_text(); var l={startIndex:0,length:0}; if(!this.get_autoCompleteSeparator()){l.length=m.length; return l; }if(h===0){return l; }if(h==m.length){l.startIndex=m.length; return l; }var i=this._getSurroundingSeparatorIndices(h); var k=i.before; var j=i.after; if(j==h+1){l.startIndex=j-1; return l; }if(k==h){l.startIndex=h; return l; }l.startIndex=k; l.length=j-k; if(i.last==j){l.length--; }return l; },_getSurroundingSeparatorIndices:function(j){var m=this.get_text(); var h=this.get_autoCompleteSeparator(); var l=new RegExp("\\s*["+h+"]\\s*","gi"); var k=0; var i=0; while(l.exec(m)&&l.lastIndex<=j){k=l.lastIndex; }i=l.lastIndex>0?l.lastIndex:m.length; return{before:k,after:i,last:l.lastIndex}; },_getTrimStartingSpaces:function(){return this._lodIsAutomatic||(this.get_autoCompleteSeparator()!==null&&!this.get_enableLoadOnDemand()); },_getRelatedTarget:function(i){var k=i.toElement||i.relatedTarget||i.fromElement; if(!k){return null; }try{var h=k.tagName; }catch(j){k=null; }return k; },_getLastSeparator:function(i){if(!this.get_autoCompleteSeparator()){return null; }var h=this._getLastSeparatorIndex(i); return i.charAt(h); },_getLastSeparatorIndex:function(n){var l=-1; if(!this.get_autoCompleteSeparator()){return l; }for(var k=0,m=this.get_autoCompleteSeparator().length; kl&&!this._checkIsThisPartOfWord(h,j)){l=h; }}return l; },_highlightFirstMatch:function(){var h=this._findItemToSelect(); if(h&&h.get_enabled()&&!h.get_isSeparator()){h.highlight(); }},_toggleExpandedState:function(i){var h=a(this.get_wrapper()); h.toggleClass("rcbExpanded",i); },_initRightToLeft:function(){var i=this,h=a(i.get_element()); this._rightToLeft=true; if(this._skin){this.get_element().className=String.format("{0} RadComboBox_rtl RadComboBox_{1}_rtl",this.get_element().className,this._skin); this.get_dropDownElement().className=String.format("{0} RadComboBoxDropDown_rtl RadComboBoxDropDown_{1}_rtl",this.get_dropDownElement().className,this._skin); }if(h.find(".rcbInner").length!==0){return; }if(this.get_imageDomElement()){if(Sys.UI.DomElement.containsCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight")){this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight","rcbArrowCellLeft"); this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellRight"; }else{this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellLeft","rcbArrowCellRight"); this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellLeft"; }}},_logInserted:function(h){if(!h.get_parent()._childControlsCreated||!this._enableClientStatePersistence){return; }this._log.logInsert(h); },_onDocumentClick:function(i){if(!i){i=event; }var j=i.target||i.srcElement; while(j.nodeType!==9){if(!j.parentNode||j==this.get_element()||j==this.get_dropDownElement()){return; }j=j.parentNode; }if(this._focused){this._raiseClientBlur(i); this._selectItemOnBlur(i); if(this._shouldPostbackOnChange()&&this._checkBoxes){if(this.raise_textChange(this,i)===true){return; }var h={Command:"TextChanged"}; this.postback(h); }this._applyEmptyMessage(); this._focused=false; }if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){this._hideDropDown(i); }},_onFocus:function(h){if(this._focused){return; }if(this.get_allowCustomText()||this.get_markFirstMatch()&&!this.get_enableLoadOnDemand()){this._ensureChildControls(); }var i=this.get_emptyMessage(),j=this.get_inputDomElement(); if(i&&i==this.get_text()){this._suppressChange=true; if(document.documentMode===8){j.getClientRects(); }j.value=this._text; if(document.documentMode!==8){j.getClientRects(); }g(j,e); d(j,f); this._suppressChange=false; }if(this.get_enableAriaSupport()&&this.get_selectedItem()){j.select(); }this._view.focus(h); if(!h&&typeof(event)!="undefined"){h=event; }this._focused=true; this._clickedAfterFocus=false; this.raise_onClientFocus(h); return true; },_onImageClick:function(h){if(this.get_dropDownVisible()){this.get_inputDomElement().focus(); }if(this._enabled&&$telerik.isIE&&this._lastTextSelectionParams){this.selectText(this._lastTextSelectionParams.startIndex,this._lastTextSelectionParams.length); }if(this._enabled){this._toggleDropDown(h); }},_onInputCellClick:function(i){if(!this._enabled){return; }if(this.get_text()!==this.get_emptyMessage()){var h=this._getInputCursorPosition(); var k=this._getInputTargetSelection(h); var j=false; if(this.get_autoCompleteSeparator()){var l=this._getInputSelectionRange(); if(l.start==l.end){j=true; }}else{if(!this._clickedAfterFocus){j=true; }}if(!this._clickedAfterFocus){this._clickedAfterFocus=true; }if($telerik.isIE&&this._clickedAfterFocus){this._lastTextSelectionParams=null; }if($telerik.isIE&&j){this._lastTextSelectionParams={startIndex:k.startIndex,length:k.length}; }if(j){this.selectText(k.startIndex,k.length); }}if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){this._showDropDown(i); }return true; },_onInputChange:function(h){var j=this.get_inputDomElement(),k=this._text,o,i; if(this._escKeyPressed){if(this.get_enableLoadOnDemand()){var n=this.get_selectedItem(); if(n===null&&this.findItemByText(this._filterText)){k=this._filterText; }}j.value=k; this._escKeyPressed=false; return; }o=this.get_text(),i=this._lodIsAutomatic?this.getLastWord(o,this._getTrimStartingSpaces()):o; if(!$telerik.isIE||this._updateFilterText){this._filterText=i; }if($telerik.isIE){this._updateFilterText=false; }if(!this.get_emptyMessage()||o!=this.get_emptyMessage()){this._ensureChildControls(); this._text=o; }this.set_value(""); if(!this._suppressChange){g(j,e); d(j,f); }this.get_element().value=this._text; this.updateClientState(); if(!this._suppressChange){var m=this; if(this.get_enableLoadOnDemand()&&this._filterText.length>=this._minFilterLength){if(this._requestTimeoutID>0){window.clearTimeout(this._requestTimeoutID); this._requestTimeoutID=0; }if(!this.get_dropDownVisible()){this._skipLoadingItems=true; this.showDropDown(); }if($telerik.isIE&&h){var l=h.keyCode||h.which; if(l!=c.Keys.Down&&l!=c.Keys.Up){this._requestTimeoutID=window.setTimeout(function(){if(m._disposed){return; }m.requestItems(m._filterText,false); },m.get_itemRequestTimeout()); }}else{this._requestTimeoutID=window.setTimeout(function(){if(m._disposed){return; }m.requestItems(m._filterText,false); },m.get_itemRequestTimeout()); }return; }if(this.get_filter()==c.RadComboBoxFilter.None&&(this._shouldHighlight()||m._filterText==="")){if($telerik.isSafari){setTimeout(function(){m.highlightMatches(); },0); }else{this.highlightMatches(); }}else{this.highlightAllMatches(this.get_text()); }}},_onChangeHelper:function(h){if(!this._disposed){var i=this.get_text(); clearTimeout(this._keyUpTimeOutID); if(this._cachedText!=i){this._cachedText=i; this._onInputChange(h); }}},_onWindowUnload:function(){this._disposeChildElements=false; },_appendTextAfterLastSeparator:function(j){var h=this.get_text(); var i=this._getLastSeparatorIndex(h); var k=h.substring(0,i+1)+j; this.set_text(k); },_raiseClientBlur:function(h){if(this._focused){this._view.blur(); this.raise_onClientBlur(h); }},_replaceCssClass:function(h,j,i){h.className=h.className.replace(j,i); },_setFirstSelectedItem:function(){var h=this._findItemToSelect(); if(h&&!h.get_isSeparator()){this.set_selectedItem(h); }},_shouldPostbackOnChange:function(){var h=this.get_originalText(),i; if(h==this.get_emptyMessage()){h=""; }if(this.get_checkBoxes()&&this._checkedItemsTexts==c.RadComboBoxCheckedItemsTexts.FitInInput){i=h!=this._getTextWithCheckBoxes(); }else{i=(h!=this.get_text()); }return i; },add_onClientKeyPressing:function(h){this.get_events().addHandler("keyPressing",h); },clearItems:function(){this.get_items().clear(); this._itemData=null; },disable:function(){this._view.disable(); this.set_enabled(false); var j; if(this.get_simpleRendering()){j=this.get_selectElement(); }else{j=this.get_inputDomElement(); }j.setAttribute("disabled","disabled"); this.disableEvents(); var k=this.get_items().get_count(); if(this.get_enableAriaSupport()){c.RadComboBox._toggleAttribute(this.get_inputDomElement(),"aria-disabled",true,true); }for(var h=0; h0&&c[0].className=="rcbLoading"){k=k-1; m=1; }}for(var f=m,l=c.length; f",""":'"',"&":"&"}); }; b.RadComboBox.htmlEncode=function(c){return b.RadComboBox.replace(c,{"&":"&","<":"<",">":">"}); }; b.RadComboBox.isIEDocumentMode8=function(){return document.documentMode&&document.documentMode==8; }; b.RadComboBox.replace=function(e,d){for(var c in d){e=e.replace(new RegExp(c,"g"),d[c]); }return e; }; b.RadComboBox.ComboBoxes=[]; b.RadComboBox._initializeItemConstants=function(){var c=b.RadComboBoxItem; c.STRING_EM_START="",c.STRING_EM_START_HTML_ENCODED=b.RadComboBox.htmlEncode(c.STRING_EM_START),c.REGEX_EM_START_HTML_ENCODED=new RegExp(c.STRING_EM_START_HTML_ENCODED,"g"),c.STRING_EM_END="",c.STRING_EM_END_HTML_ENCODED=b.RadComboBox.htmlEncode(c.STRING_EM_END),c.STRING_EM_END_HTML_ENCODED_REGEX_ESCAPED=c._regExEscape(c.STRING_EM_END_HTML_ENCODED),c.REGEX_EM_END_HTML_ENCODED=new RegExp(c.STRING_EM_END_HTML_ENCODED_REGEX_ESCAPED,"g"); }; b.RadComboBox._initializeItemConstants(); })(); (function(){var b=Telerik.Web.UI,a=$telerik.$; b.RadComboBox.prototype.raise_itemsRequested=function(f,c){var d=new b.RadComboBoxRequestEventArgs(f,c); this.raiseEvent("itemsRequested",d); }; b.RadComboBox.prototype.raise_itemsRequestFailed=function(g,d,c){var f=new b.RadComboBoxItemsRequestFailedEventArgs(g,d,c); this.raiseEvent("itemsRequestFailed",f); return f.get_cancel(); }; b.RadComboBox.prototype.raise_dropDownClosed=function(c){var d=new b.RadComboBoxEventArgs(c); this.raiseEvent("dropDownClosed",d); }; b.RadComboBox.prototype.raise_dropDownClosing=function(c){var d=new b.RadComboBoxCancelEventArgs(c); this.raiseEvent("dropDownClosing",d); return d.get_cancel(); }; b.RadComboBox.prototype.raise_dropDownOpened=function(c){var d=new b.RadComboBoxEventArgs(c); this.raiseEvent("dropDownOpened",d); }; b.RadComboBox.prototype.raise_dropDownOpening=function(c){var d=new b.RadComboBoxCancelEventArgs(c); this.raiseEvent("dropDownOpening",d); return d.get_cancel(); }; b.RadComboBox.prototype.raise_keyPressing=function(c){this.raiseEvent("keyPressing",c); }; b.RadComboBox.prototype.raise_onClientBlur=function(c){var d=new b.RadComboBoxEventArgs(c); this.raiseEvent("onClientBlur",d); }; b.RadComboBox.prototype.raise_onClientFocus=function(c){var d=new b.RadComboBoxEventArgs(c); this.raiseEvent("onClientFocus",d); }; b.RadComboBox.prototype.raise_onClientKeyPressing=function(c){var d=new b.RadComboBoxEventArgs(c); this.raiseEvent("keyPressing",d); }; b.RadComboBox.prototype.raise_onItemChecking=function(f,c){var d=new b.RadComboBoxItemCancelEventArgs(f,c); this.raiseEvent("itemChecking",d); return d.get_cancel(); }; b.RadComboBox.prototype.raise_onItemChecked=function(f,c){var d=new b.RadComboBoxItemEventArgs(f,c); this.raiseEvent("itemChecked",d); }; b.RadComboBox.prototype.raise_onCheckAllChecking=function(c){var d=a.extendEventArgs(new Sys.CancelEventArgs(),c); return a.raiseCancellableControlEvent(this,"checkAllChecking",d); }; b.RadComboBox.prototype.raise_onCheckAllChecked=function(c){var d=a.extendEventArgs(new Sys.EventArgs(),c); a.raiseControlEvent(this,"checkAllChecked",d); }; b.RadComboBox.prototype.raise_selectedIndexChanged=function(f,c){var d=new b.RadComboBoxItemEventArgs(f,c); if(this.get_enableLoadOnDemand()&&$telerik.isIE&&f){this._cachedText=f.get_text(); }this.raiseEvent("selectedIndexChanged",d); }; b.RadComboBox.prototype.raise_selectedIndexChanging=function(f,c){var d=new b.RadComboBoxItemCancelEventArgs(f,c); this.raiseEvent("selectedIndexChanging",d); return d.get_cancel(); }; b.RadComboBox.prototype.raise_textChange=function(c,d){var f=new b.RadComboBoxCancelEventArgs(d); this.raiseEvent("textChange",f); return f.get_cancel(); }; b.RadComboBox.prototype.remove_onClientKeyPressing=function(c){this.get_events().removeHandler("keyPressing",c); }; })(); (function(){var a=$telerik.$,c=Telerik.Web.UI,b=Sys.Serialization.JavaScriptSerializer; c.RadComboBox.prototype.get_checkedIndices=function(){return this._checkedIndices; }; c.RadComboBox.prototype.get_checkedItems=function(){var h=[],e,f=this.get_items(); for(var d=0,g=f.get_count(); d0&&k){d.prop("checked",true); this._allChecked=true; }else{d.prop("checked",false); this._allChecked=false; }}; c.RadComboBox.prototype._checkedItemsTextsFitInputWidth=function(d){var e=document.createElement("div"),f; e.id="checkedItemTextsDiv"; e.style.position="absolute"; e.style.font="12px Segoe UI,Arial,sans-serif"; e.style.top="-1000px"; e.style.left="-1000px"; e.innerHTML=""; e.innerHTML=d; document.body.appendChild(e); f=this._cachedInputWidth>e.offsetWidth; document.body.removeChild(e); return f; }; c.RadComboBox.prototype._updateComboBoxText=function(){if(!this._checkBoxes){return; }var l="",g=this.get_items(),h=g.get_count(),k=this.get_localization(); for(var e=0,j=this.get_checkedIndices().length; e0&&this._checkedItemsTexts==c.RadComboBoxCheckedItemsTexts.FitInInput){this.set_text(k.AllItemsCheckedString); }else{if(this._checkedItemsTexts==c.RadComboBoxCheckedItemsTexts.FitInInput&&this._checkedIndices.length>1&&!this._checkedItemsTextsFitInputWidth(d)){this._checkedItemsTextOverflows=true; this.set_text(this._checkedIndices.length+" "+k.ItemsCheckedString); }else{if(h===0||this._checkedIndices.length===0){this.set_text(""); this._applyEmptyMessage(); }else{this._checkedItemsTextOverflows=false; this.set_text(d); }}}}; c.RadComboBox.prototype._updateCheckedIndices=function(e){var g=this.get_items(); this._checkedIndices=[]; for(var d=0,h=g.get_count(); d=this._minFilterLength){this.requestItems(i,false); }}else{if(this.get_isUsingODataSource()&&d===0){this.requestItems("",true); }}this._skipLoadingItems=false; try{this.get_inputDomElement().focus(); }catch(g){}this._onFocus(f); this.set_dropDownVisible(true); this._dropDown.set_enableDirectionDetection((this.get_childListElement())?this._enableScreenBoundaryDetection:false); var h; if(this.get_items().get_count()===0){h=new b.RadComboBoxItem(); h.set_text("measuring item"); this.get_items().add(h); }if(j._dropDown.isVisible()){j._dropDown.reflow(); }else{j._setTimeout(function(){j._dropDown.show(); },j.get_expandDelay()); }this._resizeDropDown(); if(h){this.get_items().remove(h); }this.raise_dropDownOpened(f); }; b.RadComboBox.prototype._onOpened=function(){if($telerik.isIE8&&$telerik.standardsMode){a(this.get_childListElement()).css("position","relative"); }this._adjustChildListElementHeight(); if($telerik.isIE8&&$telerik.standardsMode){a(this.get_childListElement()).css("position","absolute"); }this._resizeDropDown(); }; b.RadComboBox.prototype._onClosed=function(){this.set_dropDownVisible(false); }; b.RadComboBox.prototype._onReflowing=function(){this._dropDownScrollTop=a(this.get_childListElementWrapper()).scrollTop(); a(this.get_childListElementWrapper()).height(""); if($telerik.isIE8&&$telerik.standardsMode){a(this.get_childListElement()).css("position","relative"); }}; b.RadComboBox.prototype._onReflowed=function(){var c=a(this._dropDown._animationContainer); this._adjustChildListElementHeight(); if(!this._rightToLeft&&this._enableScreenBoundaryDetection){var d=this._dropDown._getAvailableSpace(); var j=a(this.get_tableElement()).outerWidth(); var e=c.outerWidth(); var h=this.get_offsetX(); var i=e-(j+d.right); if(i>0){var f=parseInt(c.css("left"),10); var g=Math.max(f-i,(f-h)-(e-j)); c.css("left",g); }}if($telerik.isIE8&&$telerik.standardsMode){a(this.get_childListElement()).css("position","absolute"); }a(this.get_childListElementWrapper()).scrollTop(this._dropDownScrollTop); this._resizeDropDown(); }; b.RadComboBox.prototype._adjustChildListElementHeight=function(){var c=a(this._dropDownElement); var d=c.height(),f=c.find(".rcbHeader").outerHeight(true)||0,e=c.find(".rcbFooter").outerHeight(true)||0,g=c.find(".rcbMoreResults").outerHeight(true)||0,h; if(d>0){h=d-(f+e+g); a(this.get_childListElementWrapper()).outerHeight(h); }},b.RadComboBox.prototype._hideDropDown=function(c){var d=this; if(!this.get_dropDownVisible()){return; }if(this.get_enableAriaSupport()){b.RadComboBox._toggleAttribute(this.get_inputDomElement(),"aria-expanded",false,true); b.RadComboBox._toggleAttribute(this.get_childListElement(),"aria-hidden",true,true); }this._toggleExpandedState(false); if(this.raise_dropDownClosing(c)===true){return; }this._collapsing=true; if(!this._getAnimationContainer()){return; }this.set_dropDownVisible(false); this._setTimeout(function(){d._dropDown.hide(); },this.get_collapseDelay()); if(this.get_filter()!=b.RadComboBoxFilter.None){this._removeEmTagsFromAllItems(); }this.raise_dropDownClosed(c); }; b.RadComboBox.prototype._toggleDropDown=function(c){if(this.get_dropDownVisible()){this._hideDropDown(c); }else{this._showDropDown(c); }}; b.RadComboBox.prototype._detachDropDown=function(){var c=$telerik.isIE?document.readyState=="complete"||document.readyState=="interactive":true; if(c&&(!this._isDetached)){var e=this._findParentForm()||document.body,d=this.get_dropDownElement(),f=d.parentNode; f.parentNode.removeChild(f); f.style.marginLeft="0"; e.insertBefore(f,e.firstChild); this._isDetached=true; }}; b.RadComboBox.prototype._findParentForm=function(){var c=this.get_element(); while(c&&c.tagName&&c.tagName.toLowerCase()!="form"){c=c.parentNode; }if(!c.tagName){c=null; }return c; }; b.RadComboBox.prototype._setTimeout=function(c,d){clearTimeout(this._timeoutRef); if(d===0){c(); }else{this._timeoutRef=setTimeout(c,d); }},b.RadComboBox.prototype._skipItemSelection=function(d,f){var h=d.target; if(h.nodeType==3){return false; }var g=h.tagName.toLowerCase(); var c=h.className; if(g=="select"){return true; }if(g=="option"){return true; }if(g=="a"&&(!f||c.indexOf(f)<0)){return true; }if(g=="input"){return true; }if(g=="textarea"){return true; }if(g=="button"){return true; }return false; }; })(); (function(a){var b=Telerik.Web.UI; b.RadComboBox.prototype.get_expandAnimation=function(){return this._expandAnimation; }; b.RadComboBox.prototype.set_expandAnimation=function(d){var c=Sys.Serialization.JavaScriptSerializer.deserialize(d); this._expandAnimation=new b.AnimationSettings(c); }; b.RadComboBox.prototype.get_collapseAnimation=function(){return this._collapseAnimation; }; b.RadComboBox.prototype.set_collapseAnimation=function(d){var c=Sys.Serialization.JavaScriptSerializer.deserialize(d); this._collapseAnimation=new b.AnimationSettings(c); }; b.RadComboBox.prototype.get_slideDirection=function(){return this.get_expandDirection(); }; b.RadComboBox.prototype.set_slideDirection=function(c){this.set_expandDirection(c); }; b.RadComboBox.prototype._initializeAnimation=function(){this._dropDown=new b.DropDown(this._getAnimatedElement().parentNode,{direction:this.get_expandDirection(),expandAnimation:this.get_expandAnimation(),collapseAnimation:this.get_collapseAnimation(),enableOverlay:this._enableOverlay,enableScreenBoundaryDetection:this._enableScreenBoundaryDetection,anchor:this.get_tableElement(),width:this._dropDownWidth||((this._dropDownAutoWidth===b.RadComboBoxDropDownAutoWidth.Enabled)?"":"auto"),height:this._height||"",maxHeight:this._maxHeight,rtl:$telerik.isRightToLeft(this.get_element()),offsetX:this.get_offsetX(),offsetY:this.get_offsetY()}); this._dropDown.on({expandAnimationStarted:this._onAnimationStarted,collapseAnimationStarted:this._onAnimationStarted,expandAnimationEnded:this._onAnimationEnded,collapseAnimationEnded:this._onAnimationEnded,opened:this._onOpened,closed:this._onClosed,reflowing:this._onReflowing,reflowed:this._onReflowed},this); this._dropDown.initialize(); this._dropDown.updateSize(); }; b.RadComboBox.prototype._getAnimatedElement=function(){if(!this._animatedElement){this._animatedElement=this.get_dropDownElement(); }return this._animatedElement; }; b.RadComboBox.prototype._getAnimationContainer=function(){if(!this._animationContainer){if(this.get_dropDownElement()){this._animationContainer=this.get_dropDownElement().parentNode; }}return this._animationContainer; }; b.RadComboBox.prototype._resetAnimatedElementPosition=function(){var c=this._getAnimatedElement(); c.style.top="0px"; c.style.left="0px"; }; b.RadComboBox.prototype._onAnimationEnded=function(d,c){this._collapsing=false; if(window.netscape&&!window.opera){this.get_childListElementWrapper().style.overflow="auto"; }if($telerik.isChrome){a(this.get_dropDownElement()).css("-webkit-transform","translatez(0)").css("-webkit-transform",""); }}; b.RadComboBox.prototype._onAnimationStarted=function(f,c){if(window.netscape&&!window.opera){this.get_childListElementWrapper().style.overflow="hidden"; }if(this.get_dropDownVisible()){var d=this.get_highlightedItem(); if(d){d.scrollOnTop(); }}}; b.RadComboBox.prototype._disposeAnimation=function(){if(this._dropDown){this._dropDown.dispose(); this._dropDown=null; }}; })($telerik.$); (function(){var a=$telerik.$; var b=Telerik.Web.UI; b.RadComboBox.prototype._createFakeInput=function(){var c=a("").css({border:0,padding:0,margin:0,position:"absolute",zIndex:1,backgroundColor:"transparent"})[0]; return c; }; b.RadComboBox.prototype._deployFakeInput=function(){if(this.get_element().currentStyle.position=="static"){this.get_element().style.position="relative"; }this._fakeInput=this._createFakeInput(); var c=this.get_inputDomElement(); a(this._fakeInput).appendTo(c.parentNode); }; b.RadComboBox.prototype._repaintFakeInput=function(){var d=this.get_element(); var g=0; var f=0; var h=0; var e=0; if(d.style.width.indexOf("%")==-1){var m=this.get_inputDomElement(); var n=a(m).position(); if(m.offsetWidth>0){f=m.offsetHeight; h=n.top; e=n.left; g=m.offsetWidth; }else{var o=d.cloneNode(false); o.style.position="absolute"; o.style.top="-1000px"; o.style.left="-1000px"; var c=d.cloneNode(true).childNodes; for(var j=0; j=0&&g=0; g--){var k=a(j.getItem(g).get_element()).position().top; if(k=0){var f=function(n,i,m){return h; }; this.highlightItem(f,true); }}; b.RadComboBox.prototype.highlightFirstVisibleItem=function(){var l=a(this.get_dropDownElement()).find("div.rcbScroll"); var j=this.get_items(); var h=-1; for(var g=0; gl.scrollTop()){h=j.getItem(g).get_index(); break; }}if(h>=0){var f=function(n,i,m){return h-1; }; this.highlightItem(f,true); }}; b.RadComboBox.prototype._needsItemCompletion=function(){var g=this._getInputSelectionRange(); var f=this._getSurroundingSeparatorIndices(g.start).before; var h=f; var i=this.get_text(); var j=i.substring(h,i.length); if(this.findItemByText(j)===null){return false; }return true; }; b.RadComboBox.prototype._isCommandKey=function(f){for(var g in Telerik.Web.UI.Keys){if(g!="Numpad0"&&g!="Numpad9"&&g!="Zero"&&g!="Del"&&g!="Space"){if(f==Telerik.Web.UI.Keys[g]){return true; }}}return false; }; b.RadComboBox.prototype._onKeyUpIE=function(f){var g=f.keyCode||f.which; if(!this._isCommandKey(g)&&!this.get_readOnly()){this._onChangeHelper(f); }}; b.RadComboBox.prototype._onKeyDown=function(h){var j=h.keyCode||h.which,i,k,f=8; if(($telerik.isIE||$telerik.isChrome)&&this.get_readOnly()&&j==f){h.preventDefault(); }if($telerik.isIE&&j!=b.Keys.Down&&j!=b.Keys.Up){this._updateFilterText=true; }if(j==b.Keys.Escape){h.preventDefault(); }if(!this._fireEvents||this._ajaxRequest){return; }this.raise_onClientKeyPressing(h); this._lastKeyCode=j; switch(j){case b.Keys.Left:case b.Keys.Righ:return; case b.Keys.Escape:this._hideDropDown(h); if($telerik.isFirefox){this._escKeyPressed=true; }return; case b.Keys.Enter:this._hideDropDown(h); h.returnValue=true; if(h.preventDefault){h.preventDefault(); }this._onEnterKey(h); return; case b.Keys.Down:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }this.highlightNextItem(null); if(h.preventDefault){h.preventDefault(); }return; case b.Keys.Up:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }this.highlightPreviousItem(); if(h.preventDefault){h.preventDefault(); }return; case b.Keys.Home:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }if(this.get_inputDomElement().readOnly){this.highlightFirstItem(); if(h.preventDefault){h.preventDefault(); }}return; case b.Keys.End:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }if(this.get_inputDomElement().readOnly){this.highlightLastItem(); if(h.preventDefault){h.preventDefault(); }}return; case b.Keys.PageDown:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }var l=a(this.get_dropDownElement()).find("div.rcbScroll"); l.scrollTop(l.scrollTop()+l.height()); this.highlightLastVisibleItem(); if(h.preventDefault){h.preventDefault(); }return; case b.Keys.PageUp:h.returnValue=false; if(h.altKey){this._toggleDropDown(h); return; }var l=a(this.get_dropDownElement()).find("div.rcbScroll"); l.scrollTop(l.scrollTop()-l.height()); this.highlightFirstVisibleItem(); if(h.preventDefault){h.preventDefault(); }return; case b.Keys.Tab:this._hideDropDown(h); this._raiseClientBlur(h); this._selectItemOnBlur(h); this._applyEmptyMessage(); this._focused=false; return; case b.Keys.Space:if(this.get_dropDownVisible()){i=this.get_highlightedItem(); if(this._checkBoxes&&i){if(h.preventDefault){h.preventDefault(); }this._performCheck(i,h); }else{if(this._checkBoxes&&!i&&this._checkAllElement&&a(this._checkAllElement).hasClass(d)){a(this._checkAllElement).click(); }}}return; }if(j>=b.Keys.Numpad0&&j<=b.Keys.Numpad9){j-=(b.Keys.Numpad0-b.Keys.Zero); }k=String.fromCharCode(j); if(k&&(!h.altKey)&&!(this.get_enableLoadOnDemand()||!this.get_readOnly())){if(this.get_readOnly()&&this._dropDown.isVisible()==false){this._inputDomElement.setAttribute("aria-live","polite"); }this.highlightNextItem(k); if(this.get_readOnly()&&this._dropDown.isVisible()==false){var g=this; setTimeout(function(){g._inputDomElement.setAttribute("aria-live","off"); },50); }return; }}; b.RadComboBox.prototype._onEnterKey=function(g){var i=this.findItemByText(this.get_text()),j=this.get_selectedItem(),h=this.get_highlightedItem(); if(!this._checkBoxes){if(this.get_allowCustomText()&&!this.get_markFirstMatch()&&!i){if(this.raise_selectedIndexChanging(null,g)===false){if(j){j.set_selected(false); }if(h){h.unHighlight(); }this.set_selectedItem(null); this.set_selectedIndex(null); this.set_highlightedItem(null); this.raise_selectedIndexChanged(null,g); var f={Command:"Select",Index:-1}; this.postback(f); }}else{this._performSelect(h,g); }if(this.get_markFirstMatch()){var k=this.get_text().length; this.selectText(k,k); }}else{if(h&&!h.get_checked()){this._performCheck(h,g); }}}; b.RadComboBox.prototype._onKeyPressCheckSelection=function(f){var i=this.get_inputDomElement(),l=this._getInputSelection(i),m=this.get_text(),j,h; if(l.selectionStart!=l.selectionEnd&&this.get_highlightedItem()){if(!this.get_isCaseSensitive()){j=(i.value.charAt(l.selectionStart).toLowerCase()==String.fromCharCode(f.keyCode).toLowerCase()); }else{j=(i.value.charAt(l.selectionStart).toString()==String.fromCharCode(f.keyCode).toString()); }if(j){h=this.findFirstMatch(m.substring(0,l.selectionStart)+String.fromCharCode(f.keyCode).toString()); if(h&&h.get_text()===this.get_highlightedItem().get_text()){if(this.get_inputDomElement().setSelectionRange){this.get_inputDomElement().setSelectionRange(l.selectionStart+e,l.selectionEnd); }else{var k=i.createTextRange(); k.moveStart("character",l.selectionStart+e); try{k.select(); }catch(g){}}f.preventDefault(); }}}}; b.RadComboBox.prototype._onKeyPress=function(g){if(!this._fireEvents){return; }var f=g.charCode||g.keyCode; if(this._ajaxRequest){if(f===b.Keys.Enter){g.returnValue=false; if(g.preventDefault){g.preventDefault(); }}return; }var j=[b.Keys.PageUp,b.Keys.PageDown,b.Keys.End,b.Keys.Home,b.Keys.Insert,b.Keys.Delete]; for(var h=0; h=0; f--){if(h[f].get_enabled()&&!h[f].get_isSeparator()){return f; }}return -1; }; })(); (function(){var b=Telerik.Web.UI,a=Sys.Serialization.JavaScriptSerializer,c={0:"contains",1:"contains",2:"startswith"}; b.RadComboBox.prototype.get_itemData=function(){return this._itemData; }; b.RadComboBox.prototype.get_webServiceSettings=function(){return this._webServiceSettings; }; b.RadComboBox.prototype.set_webServiceSettings=function(e){var d=a.deserialize(e); if(d.ODataSettings){this._webServiceSettings=new b.NavigationControlODataSettings(d); }else{this._webServiceSettings=new b.WebServiceSettings(d); }}; b.RadComboBox.prototype.get_enableItemCaching=function(){return this._enableItemCaching; }; b.RadComboBox.prototype.set_enableItemCaching=function(d){this._enableItemCaching=d; }; b.RadComboBox.prototype.get_moreResultsBoxElement=function(){var d=this._getChildElement("MoreResultsBox"); return d; }; b.RadComboBox.prototype.get_moreResultsBoxMessageElement=function(){var d=this.get_moreResultsBoxElement(); var e=$telerik.getFirstChildByTagName(d,"span",0); return e; }; b.RadComboBox.prototype.clearCache=function(){this.lodHashTable={}; },b.RadComboBox.prototype.requestItems=function(g,d){if(this._disposed){return; }var h={},f; if(d){if((this._pendingAjaxRequestsCount>0)||this.get_endOfItems()){return; }}else{this._filterText=g; }this._ensureChildControls(); this._ajaxRequest=true; this.set_appendItems(d); h.Text=g; h.NumberOfItems=0; if(this.get_appendItems()){h.NumberOfItems=this.get_items().get_count(); }f=new b.RadComboBoxRequestCancelEventArgs(g,h); this.raiseEvent("itemsRequesting",f); if(f.get_cancel()){this._ajaxRequest=false; return; }if(this.get_highlightedItem()){this.get_highlightedItem().unHighlight(); }if(!this._loadingDiv){this._loadingDiv=document.createElement("li"); this._loadingDiv.className="rcbLoading"; this._loadingDiv.id=this.get_id()+"_LoadingDiv"; this._loadingDiv.innerHTML=this.get_loadingMessage(); if(!this.get_childListElement()){this._createChildListElement(); }this.get_childListElement().insertBefore(this._loadingDiv,this.get_childListElement().firstChild); }g=encodeURIComponent(g); this._callbackText=g; this._pendingAjaxRequestsCount++; var e=this.get_isUsingODataSource()||this.get_webServiceSettings().get_isOData(); if(this.get_webServiceSettings().get_method()||e){this._doLoadOnDemandFromWebService(g,h); }else{if(this._clientDataSource){this._doLoadOnDemandFromClientDataSource(h); }else{this._doLoadOnDemand(g,h); }}}; b.RadComboBox.prototype._createChildListElement=function(){var d=document.createElement("ul"); d.className="rcbList"; this.get_childListElementWrapper().appendChild(d); this._onDropDownClickDelegate=Function.createDelegate(this,this._onDropDownClick); $telerik.addHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate); this._onDropDownHoverDelegate=Function.createDelegate(this,this._onDropDownHover); $telerik.addHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate); this._cancelDelegate=Function.createDelegate(this,b.RadComboBox._cancelEvent); $telerik.addHandler(this.get_childListElement(),"selectstart",this._cancelDelegate); $telerik.addHandler(this.get_childListElement(),"dragstart",this._cancelDelegate); this._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut); $telerik.addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate); if($telerik.isIE8&&$telerik.standardsMode){d.style.position="absolute"; d.style.width="100%"; }if(this.get_enableAriaSupport()){this._applyChildListElementAttributes(); }return d; }; b.RadComboBox.prototype._initializeVirtualScroll=function(){this._onDropDownScrollDelegate=Function.createDelegate(this,this._onDropDownScroll); $telerik.addHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate); }; b.RadComboBox.prototype._onDropDownScroll=function(f){if(!this._virtualScroll||this._ajaxRequest||this.get_endOfItems()){return; }var d=this.get_childListElement(),g=$telerik.getFirstChildByTagName(d,"div",0); if(g){var h=g.offsetHeight; if(this.get_childListElementWrapper().scrollTop+h>=d.offsetHeight-h){this.requestItems(this._filterText,true); }}}; b.RadComboBox.prototype._detachVirtualScrollEvents=function(){$telerik.removeHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate); }; b.RadComboBox.prototype._initializeMoreResultsBox=function(){var d=this.get_moreResultsBoxElement(); this._onMoreResultsBoxClickDelegate=Function.createDelegate(this,this._onMoreResultsBoxClick); $telerik.addHandler(d,"click",this._onMoreResultsBoxClickDelegate); this._onMoreResultsBoxOverDelegate=Function.createDelegate(this,this._onMoreResultsBoxOver); $telerik.addHandler(d,"mouseover",this._onMoreResultsBoxOverDelegate); this._onMoreResultsBoxOutDelegate=Function.createDelegate(this,this._onMoreResultsBoxOut); $telerik.addHandler(d,"mouseout",this._onMoreResultsBoxOutDelegate); }; b.RadComboBox.prototype._onMoreResultsBoxClick=function(d){this.requestItems(this._filterText,true); }; b.RadComboBox.prototype._onMoreResultsBoxOver=function(d){this.get_moreResultsBoxElement().style.cursor="pointer"; }; b.RadComboBox.prototype._onMoreResultsBoxOut=function(d){this.get_moreResultsBoxElement().style.cursor="default"; }; b.RadComboBox.prototype._detachMoreResultsBoxEvents=function(){var d=this.get_moreResultsBoxElement(); $telerik.removeHandler(d,"click",this._onMoreResultsBoxClickDelegate); $telerik.removeHandler(d,"mouseover",this._onMoreResultsBoxOverDelegate); $telerik.removeHandler(d,"mouseout",this._onMoreResultsBoxOutDelegate); }; b.RadComboBox.prototype._initializeWebServiceLoader=function(){var d=this.get_webServiceSettings(); if(d.get_isOData()){this._webServiceLoader=new b.NavigationControlODataLoader(this.get_webServiceSettings()); }else{this._webServiceLoader=new b.WebServiceLoader(this.get_webServiceSettings()); }this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse)); this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onWebServiceError)); }; b.RadComboBox.prototype._initializeODataSourceBinder=function(){var e=this.get_odataClientSettings().ODataSourceID,d=$find(e); if(!d){var f=String.format("DataSource with id {0} was not found on the page",e); alert(f); }else{this._flatBinder=new b.RadODataDataSource.Binder.Flat(d,this); this._flatBinder.initialize(); }}; b.RadComboBox.prototype._initializeClientDataSource=function(){if(this._clientDataSourceID){var d=$find(this._clientDataSourceID); this._reinitializeClientDataSource(d); }Sys.Application.remove_load(this._cdInitDelegate); }; b.RadComboBox.prototype._reinitializeClientDataSource=function(d){this._clientDataSource=d; }; b.RadComboBox.prototype._disposeODataSourceBinder=function(){if(this._flatBinder){this._flatBinder.dispose(); }}; b.RadComboBox.prototype._onDataNeeded=function(k){var l=this,e=l.get_items().get_count(),h=l.get_filter(),g=l.get_odataClientSettings().DataTextField,f=c[h],i=l._itemsPerRequest,d=l.get_appendItems(),j={events:{requesting:function(m){var n=m.get_options(); n.context={filterText:k,itemsCount:e,shouldAppendItem:d}; if(k){m.set_filterExpressions({field:g,operator:f,value:k}); }if(i!=-1){n.data.take=i; }if(d){n.data.skip=e; }},success:function(m,o,n){var p=m,q=p.length,r=n.shouldAppendItem?n.itemsCount+q:q,u=o,s=new b.WebServiceLoaderSuccessEventArgs(p,n.filterText); l.set_endOfItems(r==u); l._onWebServiceResponse(l,s); if(l._showMoreResultsBox){var t=l._getShowMoreMessage(1,r,u); l.set_showMoreMessage(t); l._updateMoreResultsBox(); }},fail:function(m){var n=new b.WebServiceLoaderErrorEventArgs(m.get_message()); l._onWebServiceError(l,n); }}}; l._flatBinder.fetch(j); }; b.RadComboBox.prototype._getShowMoreMessage=function(d,e,f){return String.format("Items {0}-{1} out of {2}",d,e,f); },b.RadComboBox.prototype.get_flatModel=function(){var d=this.get_odataClientSettings(); return b.RadODataDataSource.Binder.Flat.Model(d); },b.RadComboBox.prototype._doLoadOnDemand=function(j,k){var g=0; if(this.get_appendItems()){g=this.get_items().get_count(); }var f={Command:"LOD",Text:j,ClientState:this._clientState,Context:k,NumberOfItems:g}; var h=Function.createDelegate(this,this._onCallbackResponse); var i=Function.createDelegate(this,this._onErrorReceived); if(this.get_enableItemCaching()&&this.lodHashTable[j+"$"+g]!==undefined){this._onCallbackResponse(this.lodHashTable[j+"$"+g]); }else{var e=new b.CallbackSettings({id:this._uniqueId,arguments:a.serialize(f),onCallbackSuccess:h,context:j,onCallbackError:i,isAsync:true}); var d=new b.CallbackLoader(e); d.invokeCallbackMethod(); }}; b.RadComboBox.prototype._doLoadOnDemandFromWebService=function(g,h){if(!this._webServiceLoader){this._initializeWebServiceLoader(); }var e={context:h},f=this.get_webServiceSettings(); if(f.get_isOData()){e.isRootLevel=true; }if(f.get_isWcf()){e.context=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(e.context); }var d=h.NumberOfItems; if(this.get_enableItemCaching()&&this.lodHashTable[g+"$"+d]!==undefined){this._pendingAjaxRequestsCount--; this._addNewItems(g,this.lodHashTable[g+"$"+d]); }else{if(this.get_isUsingODataSource()){this._onDataNeeded(g); }else{this._webServiceLoader.loadData(e,g); }}}; b.RadComboBox.prototype._doLoadOnDemandFromClientDataSource=function(g){var e=this._clientDataSource,f=this; if(this.get_enableItemCaching()){var d=this.lodHashTable[g.Text+"$"+g.NumberOfItems]; if(d!==undefined){this._pendingAjaxRequestsCount--; this._addNewItems(g.Text,d); return; }}if(e.get_data().length===0){e.fetch(function(h){f._loadItemsFromClientDataSource(g); }); }else{f._loadItemsFromClientDataSource(g); }}; b.RadComboBox.prototype._loadItemsFromClientDataSource=function(l){this._pendingAjaxRequestsCount--; var e=this._clientDataSource,g=this,j=this._itemsPerRequest,i=true,k; if(l.Text){var f,d=Telerik.Web.UI.ClientDataSource.FilterOperator; if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.Contains){f=d.Contains; }else{f=d.StartsWith; }e.get_filterExpressions().clear(); e.get_filterExpressions().add([{fieldName:this._dataTextField,value:l.Text,operator:f}]); }else{e.get_filterExpressions().clear(); }if(j!=-1){e.set_allowPaging(true); e.set_pageSize(j); var h=l.NumberOfItems/j; e.set_currentPageIndex(h); }e.fetch(function(){k=e.view(); i=(e._kendoDataSource.totalPages()==(h+1)); g.set_endOfItems(i); g._addNewItems(l.Text,{Items:k,EndOfItems:i}); }); }; b.RadComboBox.prototype._onCallbackResponse=function(q){if(this._disposed){return; }this._pendingAjaxRequestsCount--; this.set_selectedItem(null); this.set_highlightedItem(null); var m=this._children.get_count(); var l=0; var o=q.split("_$$_")[4]; var g=window.encodeURI(this._callbackText); function p(u,i,t){return u.replace(new RegExp(i,"g"),t); }g=p(g,"'",window.escape("'")); g=p(g,"~",window.escape("~")); o=p(o,"%7e",window.escape("~")); if((this._pendingAjaxRequestsCount===0)&&(o!=g)){this.requestItems(this._callbackText,this.get_appendItems()); return; }if(this.get_appendItems()){l=this.get_items().get_count(); }if(this.get_enableItemCaching()&&this.lodHashTable[o+"$"+l]===undefined){this.lodHashTable[o+"$"+l]=q; }var r=q.split("_$$_"); var n; if(r[0]=="[]"){n=null; }else{n=eval(r[0]); }if(r[3]=="True"){this.set_endOfItems(true); }else{this.set_endOfItems(false); }if(this.get_appendItems()&&this._itemData&&n){Array.addRange(this._itemData,n); }else{this._itemData=n; }if(this._loadingDiv){if(this._loadingDiv.parentNode){this._loadingDiv.parentNode.removeChild(this._loadingDiv); }this._loadingDiv=null; }var e=this.get_childListElement(); if(!e){e=this._createChildListElement(); }this._childControlsCreated=true; var f=$telerik.getFirstChildByTagName(e,"div",0); if(f){f.parentNode.removeChild(f); }if(this.get_appendItems()){var s=document.createElement("ul"); s.innerHTML=r[1]; var d=$telerik.getChildrenByTagName(s,"li"); var k=d.length; for(var h=0; h=h)&&q){var g=k-h; var m=new b.RadComboBoxItemDataBoundEventArgs(l,n[g]); this.raiseEvent("itemDataBound",m); }}this._restoreSelectionAfterRequest(); this._setUpDropDownAfterRequest(s,e,p); }; b.RadComboBox.prototype._scrollToTheNextPortionOfItems=function(d){if(this.get_appendItems()&&(this.get_items().getItem(d+1))){this.get_items().getItem(d+1).scrollIntoView(); }}; b.RadComboBox.prototype._setUpDropDownAfterRequest=function(h,e,g){if(this._virtualScroll){this._setUpScroll(this.get_endOfItems(),e); }this._scrollToTheNextPortionOfItems(g); this._updateMoreResultsBox(); var d=$telerik.$(e); if(!this._height&&!this._maxHeight&&!$telerik.isIE8){d.parents(".rcbScroll")[0].style.height=""; }this.raise_itemsRequested(h,null); if(this.get_filter()==b.RadComboBoxFilter.None){this.highlightMatches(); }else{var f=this.get_highlightedItem(); this.highlightAllMatches(this._filterText); if(f){f.highlight(); }}if(this.get_dropDownVisible()){this._skipDropDownPositioning=true; if(this._slide){this._slide.updateSize(); }this._skipDropDownPositioning=null; this._dropDown.reflow(); this._adjustChildListElementHeight(); }this._resizeDropDown(); if(this._maxHeight){this._scrollToTheNextPortionOfItems(g); }this._ajaxRequest=false; }; b.RadComboBox.prototype._updateMoreResultsBox=function(){if(this._showMoreResultsBox&&this.get_moreResultsBoxMessageElement()){this.get_moreResultsBoxMessageElement().innerHTML=this.get_showMoreMessage(); }},b.RadComboBox.prototype._setUpScroll=function(f,d){var e; if(f){e=$telerik.getFirstChildByTagName(d,"div",0); if(e){e.parentNode.removeChild(e); }}else{e=document.createElement("div"); if(!this._height&&this._maxHeight){e.style.height=this._maxHeight+"px"; }else{e.style.height=this._height+"px"; }d.appendChild(e); }}; b.RadComboBox.prototype._onErrorReceived=function(d,f){if(this._requestTimeoutID>0){window.clearTimeout(this._requestTimeoutID); this._requestTimeoutID=0; }var e=this._extractErrorMessage(d); if(this.raise_itemsRequestFailed(f,e,null)){return; }alert(e); }; b.RadComboBox.prototype._onWebServiceError=function(f,e){var d=e.get_message(),g=e.get_context(); this._onErrorReceived(d,g); }; b.RadComboBox.prototype._restoreSelectionAfterRequest=function(){var d=this.findItemByValue(this.get_value()); if(d&&d.get_enabled()&&(!d.get_isSeparator())){d.set_selected(true); d.highlight(); this.set_selectedItem(d); }}; })(); (function(){var a=Telerik.Web.UI; a.RadComboBox.prototype.get_markFirstMatch=function(){return this._markFirstMatch; }; a.RadComboBox.prototype.set_markFirstMatch=function(b){this._markFirstMatch=b; this.repaint(); }; a.RadComboBox.prototype.findFirstMatch=function(f){if(!f){return null; }var c=this.get_items(),d=c.get_count(); for(var b=0; b0){i=c+this._callbackText.length+1; b=j.length-i; }}if(i&&b){this.selectText(i,b); }}; a.RadComboBox.prototype.highlightFirstVisibleEnabledItem=function(){if(this.get_text().length>0){var d=this.get_visibleItems(); var e=d.length; for(var c=0; c=a.Keys.PageUp)&&(this._lastKeyCode<=a.Keys.Del)){return false; }if((this._lastKeyCode>=a.Keys.F1)&&(this._lastKeyCode<=a.Keys.F12)){return false; }if(this._lastKeyCode==a.Keys.Delete){return false; }return true; }; })(); (function(){var a=Telerik.Web.UI; a.RadComboBox.prototype.get_selectedIndex=function(){var b=this.get_selectedItem(); if(b){return b.get_index(); }return this._selectedIndex; }; a.RadComboBox.prototype.set_selectedIndex=function(b){this._selectedIndex=b; }; a.RadComboBox.prototype.get_selectedItem=function(){if(!this._setSelectedItem){this._setSelectedItem=true; this._setFirstSelectedItem(); }return this._selectedItem; }; a.RadComboBox.prototype.set_selectedItem=function(b){this._selectedItem=b; }; a.RadComboBox.prototype.clearSelection=function(){this.set_text(""); this.set_value(""); this.set_selectedItem(null); var b=this.get_highlightedItem(); if(b){b.unHighlight(); }this._applyEmptyMessage(); }; a.RadComboBox.prototype._performSelect=function(d,c){if(d&&d!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){d._select(c); return; }if(d&&d==this.get_selectedItem()&&this.getLastWord(this.get_text())!=d.get_text()&&!this.get_readOnly()){this._appendTextAfterLastSeparator(d.get_text()); return; }if(d&&d==this.get_selectedItem()){if(this.get_markFirstMatch()){if(d.get_text()!=this.get_text()||d.get_value()!=this.get_value()){d._select(c); }}return; }if(d&&this.get_originalText()!=d.get_text()){d._select(c); return; }if(d&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=d.get_value())){d._select(c); return; }if((this.get_allowCustomText()||this.get_enableLoadOnDemand())&&this._shouldPostbackOnChange()&&!this._checkBoxes){if(this.get_highlightedItem()){this.get_highlightedItem().unHighlight(); }if(this.raise_textChange(this,c)===true){return; }var b={Command:"TextChanged"}; this.postback(b); }}; a.RadComboBox.prototype._selectItemOnBlur=function(c){if(this.get_emptyMessage()&&(this.get_text()==this.get_emptyMessage())){return; }var h,f=null; if(this.get_markFirstMatch()===true&&this.get_filter()==a.RadComboBoxFilter.None&&this.get_allowCustomText()===false&&this.get_enableLoadOnDemand()===false&&this.get_emptyMessage()&&this.get_autoCompleteSeparator()){h=this.get_lastWord(); }if(this._checkBoxes){if(this.get_filter()!=a.RadComboBoxFilter.None){this.setAllItemsVisible(true); }return; }f=this._findItemToSelect(h); if(f===null&&this._defaultItem!==null&&(this.get_text()===""||this.get_text()==this._defaultItem.get_text())){f=this._defaultItem; }var d=!this.get_enableLoadOnDemand()&&!this.get_allowCustomText(); if(!f&&d&&(this.get_items().get_count()>0)){if(this.get_filter()!=a.RadComboBoxFilter.None){f=this.get_selectedItem(); if(!f){this.set_text(""); }else{this.set_text(f.get_text()); this.set_value(f.get_value()); }}else{if(this.get_markFirstMatch()&&!this.get_emptyMessage()){if(this.get_text()===""){this.set_text(this._originalText); }this.highlightMatches(); this.selectText(0,0); f=this.get_highlightedItem(); }}}if(this.get_filter()!=a.RadComboBoxFilter.None){this.setAllItemsVisible(true); }if(!f){var g=this.get_selectedItem(); if(g&&!d){if(this.raise_selectedIndexChanging(null,c)===true){this.set_text(g.get_text()); return; }g.set_selected(false); this.set_selectedItem(null); this.set_selectedIndex(null); this.raise_selectedIndexChanged(null,c); var b={Command:"Select",Index:-1}; this.postback(b); return; }if(g&&d){f=g; }}this._performSelect(f,c); }; })(); (function(){var a=$telerik.$; var b=Telerik.Web.UI; b.RadComboBox.prototype.get_selectElement=function(){return a(this.get_element()).find("select").get(0); }; b.RadComboBox.prototype.get_selectElementText=function(){var c=this.get_selectElement(); var d=""; if(c.options.length&&c.selectedIndex>-1){d=c.options[c.selectedIndex].text; }return d; }; b.RadComboBox.prototype.get_selectedOption=function(){var c=this.get_selectElement(); if(c.options.length&&c.selectedIndex>-1){return c.options[c.selectedIndex]; }return null; }; b.RadComboBox.prototype.get_simpleRendering=function(){if(!this._simpleRendering){this._simpleRendering=false; }else{return this._simpleRendering; }if(a(this.get_element()).find("select").length>0&&this.get_inputDomElement()===null){this._simpleRendering=true; }return this._simpleRendering; }; b.RadComboBox.prototype._initializeSelect=function(){var c=this; a(this.get_selectElement()).bind("change",function(d){c._onSelectChange(d,c); }); }; b.RadComboBox.prototype._onSelectChange=function(c,d){var f=c.target.options[c.target.selectedIndex]; d._ensureChildControls(); d._performSelect(f._item,c); }; b.RadComboBox.prototype._disposeSelect=function(){a(this.get_selectElement()).unbind("change"); }; })(); (function(b,a){b.RadComboBoxDefaultItem=function(){b.RadComboBoxDefaultItem.initializeBase(this); }; b.RadComboBoxDefaultItem.prototype={_select:function(d){if(!this.get_isEnabled()||this.get_isSeparator()){return; }var c=this.get_comboBox(); var h=c.get_text(),f=c._getLastSeparatorIndex(h),i=h.substring(0,f+1)+this.get_text(),g=c.get_selectedItem(); if(g){g.set_selected(false); }c.clearSelection(); c.get_inputDomElement().value=i; c._element.value=this.get_value(); c.set_value(this.get_value()); this.set_selected(true); this.highlight(); }}; b.RadComboBoxDefaultItem.registerClass("Telerik.Web.UI.RadComboBoxDefaultItem",b.RadComboBoxItem); })(Telerik.Web.UI,$telerik.$);