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(){if(this._text!==null){return this._removeEmTags(this._text); }if((this._text=this._properties.getValue("text",null))!==null){return this._removeEmTags(this._text); }var d=this.get_textElement(); if(!d){return""; }if(typeof(d.innerText)!="undefined"){this._text=d.innerText; }else{this._text=d.textContent; }if($telerik.isSafari2){this._text=d.innerHTML; }else{if($telerik.isSafari){this._text=d.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){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(d){this._properties.setValue("checked",d); this._updateCheckBoxCheckedState(d); },_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 d=this.get_comboBox(),h=this.get_element(); if(d&&d.get_simpleRendering()){return; }var k=h.offsetTop; var j=h.offsetHeight; var g=d.get_childListElementWrapper(); var e=g.scrollTop; var f=g.offsetHeight; if(k+j>e+f){g.scrollTop=k+j-f; if(g.clientWidth-1&&g==i){return true; }return false; },_childInserted:function(g,h,i){b.RadComboBox.callBaseMethod(this,"_childInserted",[g,h,i]); if(!this._childControlsCreated){return; }if(this._checkBoxes){if(h.get_checked()){this._registerCheckedIndex(g); }if(g!=this.get_items().get_count()-1){this._updateCheckedIndices(); }this._updateComboBoxText(); if(this._checkAllElement){this._updateCheckAllState(); }}},_childRemoved:function(h,j){var g=h.get_element(); if(j.get_items().get_count()===0&&!this.get_simpleRendering()&&!this._getHeaderElement()&&!this._getFooterElement()&&!this._loadingDiv){g=j._childListElement; j._childListElement=null; }if(g){g.innerHTML=""; if(g.parentNode){g.parentNode.removeChild(g); }g=null; }if(h==this.get_selectedItem()){this.set_selectedItem(null); this.set_highlightedItem(null); this.set_text(""); if(this.get_simpleRendering()){var i=this.get_selectedOption(); if(i){i._item.select(); }}}else{if(h==this.get_highlightedItem()){this.set_highlightedItem(null); }}if(this._checkBoxes){this._updateCheckedIndices(); this._updateComboBoxText(); }b.RadComboBox.callBaseMethod(this,"_childRemoved",[h,j]); },_childRemoving:function(g){var h=g.get_index(); if(this._itemData){Array.remove(this._itemData,this._itemData[h]); }b.RadComboBox.callBaseMethod(this,"_childRemoving",[g]); },_childrenCleared:function(k){this.set_selectedItem(null); this.set_highlightedItem(null); var g=k.get_childListElement(); var j=k.get_items().get_count(); var h; if(g&&!this._getHeaderElement()&&!this._getFooterElement()){for(h=0; h-1){n=h=k; }else{n=-o.moveStart("character",-k); n+=l.slice(0,n).split("\n").length-1; if(o.compareEndPoints("EndToEnd",i)>-1){h=k; }else{h=-o.moveEnd("character",-k); h+=l.slice(0,h).split("\n").length-1; }}}}catch(j){}}return{selectionStart:n,selectionEnd:h}; },_getInputTargetSelection:function(g){var l=this.get_text(); var k={startIndex:0,length:0}; if(!this.get_autoCompleteSeparator()){k.length=l.length; return k; }if(g===0){return k; }if(g==l.length){k.startIndex=l.length; return k; }var h=this._getSurroundingSeparatorIndices(g); var j=h.before; var i=h.after; if(i==g+1){k.startIndex=i-1; return k; }if(j==g){k.startIndex=g; return k; }k.startIndex=j; k.length=i-j; if(h.last==i){k.length--; }return k; },_getSurroundingSeparatorIndices:function(i){var l=this.get_text(); var g=this.get_autoCompleteSeparator(); var k=new RegExp("\\s*["+g+"]\\s*","gi"); var j=0; var h=0; while(k.exec(l)&&k.lastIndex<=i){j=k.lastIndex; }h=k.lastIndex>0?k.lastIndex:l.length; return{before:j,after:h,last:k.lastIndex}; },_getTrimStartingSpaces:function(){return this._lodIsAutomatic||(this.get_autoCompleteSeparator()!==null&&!this.get_enableLoadOnDemand()); },_getRelatedTarget:function(h){var j=h.toElement||h.relatedTarget||h.fromElement; if(!j){return null; }try{var g=j.tagName; }catch(i){j=null; }return j; },_getLastSeparator:function(h){if(!this.get_autoCompleteSeparator()){return null; }var g=this._getLastSeparatorIndex(h); return h.charAt(g); },_getLastSeparatorIndex:function(m){var k=-1; if(!this.get_autoCompleteSeparator()){return k; }for(var j=0,l=this.get_autoCompleteSeparator().length; jk&&!this._checkIsThisPartOfWord(g,h)){k=g; }}return k; },_highlightFirstMatch:function(){var g=this._findItemToSelect(); if(g&&g.get_enabled()&&!g.get_isSeparator()){g.highlight(); }},_initRightToLeft:function(){var h=this,g=a(h.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(g.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(g){if(!g.get_parent()._childControlsCreated||!this._enableClientStatePersistence){return; }this._log.logInsert(g); },_onDocumentClick:function(h){if(!h){h=event; }var i=h.target||h.srcElement; while(i.nodeType!==9){if(!i.parentNode||i==this.get_element()||i==this.get_dropDownElement()){return; }i=i.parentNode; }if(this._focused){this._raiseClientBlur(h); this._selectItemOnBlur(h); if(this._shouldPostbackOnChange()&&this._checkBoxes){if(this.raise_textChange(this,h)===true){return; }var g={Command:"TextChanged"}; this.postback(g); }this._applyEmptyMessage(); this._focused=false; }if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){this._hideDropDown(h); }},_onFocus:function(g){if(this._focused){return; }if(this.get_allowCustomText()||this.get_markFirstMatch()&&!this.get_enableLoadOnDemand()){this._ensureChildControls(); }var h=this.get_emptyMessage(),i=this.get_inputDomElement(); if(h&&h==this.get_text()){this._suppressChange=true; if(document.documentMode===8){i.getClientRects(); }i.value=this._text; if(document.documentMode!==8){i.getClientRects(); }f(i,d); c(i,e); this._suppressChange=false; }if(this.get_enableAriaSupport()&&this.get_selectedItem()){i.select(); }this._view.focus(g); if(!g&&typeof(event)!="undefined"){g=event; }this._focused=true; this._clickedAfterFocus=false; this.raise_onClientFocus(g); return true; },_onImageClick:function(g){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(g); }},_onInputCellClick:function(h){if(!this._enabled){return; }if(this.get_text()!==this.get_emptyMessage()){var g=this._getInputCursorPosition(); var j=this._getInputTargetSelection(g); var i=false; if(this.get_autoCompleteSeparator()){var k=this._getInputSelectionRange(); if(k.start==k.end){i=true; }}else{if(!this._clickedAfterFocus){i=true; }}if(!this._clickedAfterFocus){this._clickedAfterFocus=true; }if($telerik.isIE&&this._clickedAfterFocus){this._lastTextSelectionParams=null; }if($telerik.isIE&&i){this._lastTextSelectionParams={startIndex:j.startIndex,length:j.length}; }if(i){this.selectText(j.startIndex,j.length); }}if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){this._showDropDown(h); }return true; },_onInputChange:function(g){var i=this.get_inputDomElement(),j=this._text,n,h; if(this._escKeyPressed){if(this.get_enableLoadOnDemand()){var m=this.get_selectedItem(); if(m===null&&this.findItemByText(this._filterText)){j=this._filterText; }}i.value=j; this._escKeyPressed=false; return; }n=this.get_text(),h=this._lodIsAutomatic?this.getLastWord(n,this._getTrimStartingSpaces()):n; if(!$telerik.isIE||this._updateFilterText){this._filterText=h; }if($telerik.isIE){this._updateFilterText=false; }if(!this.get_emptyMessage()||n!=this.get_emptyMessage()){this._ensureChildControls(); this._text=n; }this.set_value(""); if(!this._suppressChange){f(i,d); c(i,e); }this.get_element().value=this._text; this.updateClientState(); if(!this._suppressChange){var l=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&&g){var k=g.keyCode||g.which; if(k!=b.Keys.Down&&k!=b.Keys.Up){this._requestTimeoutID=window.setTimeout(function(){if(l._disposed){return; }l.requestItems(l._filterText,false); },l.get_itemRequestTimeout()); }}else{this._requestTimeoutID=window.setTimeout(function(){if(l._disposed){return; }l.requestItems(l._filterText,false); },l.get_itemRequestTimeout()); }return; }if(this.get_filter()==b.RadComboBoxFilter.None&&this._shouldHighlight()){if($telerik.isSafari){setTimeout(function(){l.highlightMatches(); },0); }else{this.highlightMatches(); }}else{this.highlightAllMatches(this.get_text()); }}},_onChangeHelper:function(g){if(!this._disposed){var h=this.get_text(); clearTimeout(this._keyUpTimeOutID); if(this._cachedText!=h){this._cachedText=h; this._onInputChange(g); }}},_onWindowUnload:function(){this._disposeChildElements=false; },_appendTextAfterLastSeparator:function(i){var g=this.get_text(); var h=this._getLastSeparatorIndex(g); var j=g.substring(0,h+1)+i; this.set_text(j); },_raiseClientBlur:function(g){if(this._focused){this._view.blur(); this.raise_onClientBlur(g); }},_replaceCssClass:function(g,i,h){g.className=g.className.replace(i,h); },_setFirstSelectedItem:function(){var g=this._findItemToSelect(); if(g&&!g.get_isSeparator()){this.set_selectedItem(g); }},_shouldPostbackOnChange:function(){var g=this.get_originalText(),h; if(g==this.get_emptyMessage()){g=""; }if(this.get_checkBoxes()&&this._checkedItemsTexts==b.RadComboBoxCheckedItemsTexts.FitInInput){h=g!=this._getTextWithCheckBoxes(); }else{h=(g!=this.get_text()); }return h; },add_onClientKeyPressing:function(g){this.get_events().addHandler("keyPressing",g); },clearItems:function(){this.get_items().clear(); this._itemData=null; },disable:function(){this._view.disable(); this.set_enabled(false); var h=this.get_simpleRendering()?this.get_selectElement():this.get_inputDomElement(); h.setAttribute("disabled","disabled"); this.disableEvents(); var j=this.get_items().get_count(); if(this.get_enableAriaSupport()){b.RadComboBox._toggleAttribute(this.get_inputDomElement(),"aria-disabled",true,true); }for(var g=0; g0&&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(""); }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._dropDown.show(); }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._onReflowing=function(){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); if(this.get_offsetX()){c.css("left",parseInt(c.css("left"),10)+this.get_offsetX()); }if(this.get_offsetY()){c.css("top",parseInt(c.css("top"),10)+this.get_offsetY()); }this._adjustChildListElementHeight(); if(!this._rightToLeft&&this._enableScreenBoundaryDetection){var d=this._dropDown._getAvailableSpace(); var g=a(this.get_tableElement()).outerWidth(); var e=c.outerWidth(); var f=this.get_offsetX(); if((e+f)>(g+d.right)){c.css("left",(parseInt(c.css("left"),10)-f)-(e-g)); }}if($telerik.isIE8&&$telerik.standardsMode){a(this.get_childListElement()).css("position","absolute"); }this._resizeDropDown(); }; b.RadComboBox.prototype._adjustChildListElementHeight=function(){var c=a(this._dropDownElement); var d=c.height(),f=c.find(".rcbHeader").outerHeight(true),e=c.find(".rcbFooter").outerHeight(true),g=c.find(".rcbMoreResults").outerHeight(true),h; if(d>0){h=d-(f+e+g); a(this.get_childListElementWrapper()).outerHeight(h); }},b.RadComboBox.prototype._hideDropDown=function(c){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); }if(this.raise_dropDownClosing(c)===true){return; }this._collapsing=true; if(!this._getAnimationContainer()){return; }this.set_dropDownVisible(false); this._dropDown.hide(); 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._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._slideDirection; }; b.RadComboBox.prototype.set_slideDirection=function(c){this._slideDirection=c; this._dropDown.set_direction(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())}); this._dropDown.on({expandAnimationStarted:this._onAnimationStarted,collapseAnimationStarted:this._onAnimationStarted,expandAnimationEnded:this._onAnimationEnded,collapseAnimationEnded:this._onAnimationEnded,opened:this._onOpened,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&&b=a.Keys.Numpad0&&f<=a.Keys.Numpad9){f-=(a.Keys.Numpad0-a.Keys.Zero); }g=String.fromCharCode(f); if(g&&(!c.altKey)&&!(this.get_enableLoadOnDemand()||!this.get_readOnly())){this.highlightNextItem(g); return; }}; a.RadComboBox.prototype._onEnterKey=function(c){var f=this.findItemByText(this.get_text()),g=this.get_selectedItem(),d=this.get_highlightedItem(); if(!this._checkBoxes){if(this.get_allowCustomText()&&!this.get_markFirstMatch()&&!f){if(this.raise_selectedIndexChanging(null,c)===false){if(g){g.set_selected(false); }if(d){d.unHighlight(); }this.set_selectedItem(null); this.set_selectedIndex(null); this.set_highlightedItem(null); this.raise_selectedIndexChanged(null,c); var b={Command:"Select",Index:-1}; this.postback(b); }}else{this._performSelect(d,c); }if(this.get_markFirstMatch()){var h=this.get_text().length; this.selectText(h,h); }}else{if(d&&!d.get_checked()){this._performCheck(d,c); }}}; a.RadComboBox.prototype._onKeyPressIEHandler=function(b){var d=this.get_inputDomElement(),h=this._getInputSelection(d),f; if(h.selectionStart!=h.selectionEnd){if(!this.get_isCaseSensitive()){f=(d.value.charAt(h.selectionStart).toLowerCase()==String.fromCharCode(b.keyCode).toLowerCase()); }else{f=(d.value.charAt(h.selectionStart).toString()==String.fromCharCode(b.keyCode).toString()); }if(f){var g=d.createTextRange(); g.moveStart("character",h.selectionStart+1); try{g.select(); }catch(c){}b.preventDefault(); }}}; a.RadComboBox.prototype._onKeyPress=function(c){if(!this._fireEvents){return; }var b=c.charCode||c.keyCode; if(this._ajaxRequest){if(b===a.Keys.Enter){c.returnValue=false; if(c.preventDefault){c.preventDefault(); }}return; }var f=[a.Keys.PageUp,a.Keys.PageDown,a.Keys.End,a.Keys.Home,a.Keys.Insert,a.Keys.Delete]; for(var d=0; d=0; b--){if(d[b].get_enabled()&&!d[b].get_isSeparator()){return b; }}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); }}; 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(o){if(this._disposed){return; }this._pendingAjaxRequestsCount--; this.set_selectedItem(null); this.set_highlightedItem(null); var l=this._children.get_count(); var k=0; var n=o.split("_$$_")[4]; if((this._pendingAjaxRequestsCount===0)&&(n!=this._callbackText)){this.requestItems(this._callbackText,this.get_appendItems()); return; }if(this.get_appendItems()){k=this.get_items().get_count(); }if(this.get_enableItemCaching()&&this.lodHashTable[n+"$"+k]===undefined){this.lodHashTable[n+"$"+k]=o; }var p=o.split("_$$_"); var m; if(p[0]=="[]"){m=null; }else{m=eval(p[0]); }if(p[3]=="True"){this.set_endOfItems(true); }else{this.set_endOfItems(false); }if(this.get_appendItems()&&this._itemData&&m){Array.addRange(this._itemData,m); }else{this._itemData=m; }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 q=document.createElement("ul"); q.innerHTML=p[1]; var d=$telerik.getChildrenByTagName(q,"li"); var j=d.length; for(var g=0; g=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&&!$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._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){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)&&!this.get_emptyMessage()){if(this.get_filter()!=a.RadComboBoxFilter.None){f=this.get_selectedItem(); if(!f){this.set_text(""); }}else{if(this.get_markFirstMatch()){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.$);