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(){if(this._imageUrl=this._properties.getValue("imageUrl",null)){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!=null){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 h=d.get_text(); lastSeparatorIndex=d._getLastSeparatorIndex(h),textToSet=h.substring(0,lastSeparatorIndex+1)+this.get_text(),selectedItem=d.get_selectedItem(); if(selectedItem){selectedItem.set_selected(false); }d.set_text(textToSet); d.set_originalText(textToSet); 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(); this._replaceCssClass(e,"rcbHovered","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){this._replaceCssClass(e,"rcbItem","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(),f=this.get_element(); if(d&&d.get_simpleRendering()){return; }var i=f.offsetTop,h=f.offsetHeight,e=d.get_childListElementWrapper(); dropDownOffset=e.scrollTop; dropDownVisibleHeight=e.offsetHeight; if(i+h>dropDownOffset+dropDownVisibleHeight){e.scrollTop=i+h-dropDownVisibleHeight; if(e.clientWidth-1&&h==j){return true; }return false; },_childInserted:function(h,i,j){b.RadComboBox.callBaseMethod(this,"_childInserted",[h,i,j]); if(!this._childControlsCreated){return; }if(this._checkBoxes){if(i.get_checked()){this._registerCheckedIndex(h); }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(); }b.RadComboBox.callBaseMethod(this,"_childRemoved",[i,k]); },_childRemoving:function(h){var i=h.get_index(); if(this._itemData){Array.remove(this._itemData,this._itemData[i]); }b.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(); if(h&&!this._getHeaderElement()&&!this._getFooterElement()){for(var 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(); }},_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 k=i.target||i.srcElement; var j=this.get_originalText(); while(k.nodeType!==9){if(k.parentNode==null||k==this.get_element()||k==this.get_dropDownElement()){return; }k=k.parentNode; }if(this._focused){this._raiseClientBlur(i); this._selectItemOnBlur(i); if(this.get_text()!=j&&j!=this._emptyMessage&&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; }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); c(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); c(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!=b.Keys.Down&&l!=b.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()==b.RadComboBoxFilter.None&&this._shouldHighlight()){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); }}},_onInputPropertyChange:function(){if(!event.propertyName){event=event.rawEvent; }if(event.propertyName=="value"){this._onChangeHelper(null); }},_onWindowResize:function(){if(this.get_dropDownVisible()){this._positionDropDown(); }},_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); }},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=this.get_simpleRendering()?this.get_selectElement():this.get_inputDomElement(); j.setAttribute("disabled","disabled"); this.disableEvents(); var k=this.get_items().get_count(); if(this.get_enableAriaSupport()){b.RadComboBox._toggleAttribute(this.get_inputDomElement(),"aria-disabled",true,true); }for(var h=0; h0&&c[0].className=="rcbLoading"){k=k-1; m=1; }}var k=c.length; var m=0; 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); 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(d,c){var d=new b.RadComboBoxCancelEventArgs(c); this.raiseEvent("textChange",d); return d.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&&e==f){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.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(h,false); }}else{if(this.get_isUsingODataSource()&&d==0){this.requestItems("",true); }}this._skipLoadingItems=false; c.style.visibility="hidden"; this.get_dropDownElement().style.visibility="hidden"; if((window.netscape&&!window.opera)||($telerik.isIE8&&$telerik.standardsMode)){this.get_childListElementWrapper().style.overflow="hidden"; }this._slide.show(); this._resetAnimatedElementPosition(); this._slide.set_direction(this.get_slideDirection()); try{this.get_inputDomElement().focus(); }catch(g){}this._onFocus(g); this.set_dropDownVisible(true); this._positionDropDown(); if($telerik.isIE8&&$telerik.standardsMode){this.get_childListElementWrapper().style.overflow="auto"; }var f=this.get_dropDownElement(); f.style.top=-f.offsetHeight+"px"; this._skipDropDownPositioning=true; this._resizeDropDown(); this._slide.updateSize(); this._skipDropDownPositioning=null; c.style.visibility="visible"; this._slide.expand(); this.raise_dropDownOpened(g); }; 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; this.get_dropDownElement().style.display="none"; if(!this._getAnimationContainer()){return; }if(window.netscape&&!window.opera){this.get_childListElementWrapper().scrollTop=0; }this._slide.collapse(); this.set_dropDownVisible(false); 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._positionDropDown=function(){if(this._skipDropDownPositioning){return; }this._detachDropDown(); var c=this.get_element(); var l=this._getAnimationContainer(); l.style.position="absolute"; var p=this._view.get_wrapper(); var q=a(p).offset(); var f=this.get_dropDownElement(); var g=p.offsetWidth; if(this._dropDownWidth){g=this._dropDownWidth; g-=$telerik.getBorderBox(f).horizontal; }f.style.display="block"; if(this._dropDownAutoWidth==b.RadComboBoxDropDownAutoWidth.Disabled){f.style.width=g+"px"; }if(!this._dropDownWidth&&this._dropDownAutoWidth==b.RadComboBoxDropDownAutoWidth.Disabled){var e=f.offsetWidth-g; if(e>0&&e=0){j=true; }}else{if(this.get_expandDirection()==b.RadComboBoxExpandDirection.Up&&!this._elementOverflowsTop(f,c)){j=true; }}if(!this._rightToLeft&&this._elementOverflowsRightScreenBorder(k,f,p)){m=q.left+p.offsetWidth-n.left-f.offsetWidth; }}else{if(this.get_expandDirection()==b.RadComboBoxExpandDirection.Up){j=true; }}if(j){this.set_slideDirection(b.jSlideDirection.Up); o=q.top-this.get_offsetY()-n.top-f.offsetHeight; l.style.height=f.offsetHeight; }if($telerik.isMobileSafari){if(!document.body.scrollTop){o-=window.pageYOffset; }if(!document.body.scrollLeft){m-=window.pageXOffset; }}l.style.top=o+"px"; l.style.left=m+"px"; if(this._rightToLeft){f.dir="rtl"; }this.set_dropDownVisible(true); }; b.RadComboBox.prototype._calculateDropDownHeight=function(){var j=this._view.get_wrapper(); var k=a(j).offset(); var g=this._getAnimationContainer(); var h=this._getOffsetParentOffset(g); var m=$telerik.getViewPortSize(); var i=k.top+this.get_offsetY()+j.offsetHeight-h.top; var e=m.height-i; var l=k.top-this.get_element().offsetHeight; var f=e; if(this._enableScreenBoundaryDetection&&ethis._maxHeight){d=this._maxHeight; }var c=this._getAdditionalElementsHeight(); if(!(f>=0&&(d+c)>=f)){f=d+c; }if(c&&ce.height; }; b.RadComboBox.prototype._elementOverflowsTop=function(c,f){var e=a(window).scrollTop(); var d=f.offsetTop-e; var g=d-c.offsetHeight; return g<=0; }; b.RadComboBox.prototype._elementOverflowsRightScreenBorder=function(e,c,f){var d=$telerik.getLocation(f).x+c.offsetWidth; return d>e.width; }; b.RadComboBox.prototype._removeDropDown=function(){var c=this.get_dropDownElement().parentNode; c.parentNode.removeChild(c); if(this._disposeChildElements){$telerik.disposeElement(c); }if(!$telerik.isSafari&&!$telerik.isIE10Mode){c.outerHTML=null; }if(b.TouchScrollExtender._getNeedsScrollExtender()&&this._dropDownTouchScroll&&this.get_childListElementWrapper()){this._dropDownTouchScroll.dispose(); }this._dropDownElement=null; }; 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._slide.set_direction(c); }; b.RadComboBox.prototype._initializeAnimation=function(){var c=this._getAnimatedElement(); if(c){this._slide=new b.jSlide(c,this.get_expandAnimation(),this.get_collapseAnimation(),this._enableOverlay); this._slide.initialize(); this._slide.set_direction(this.get_slideDirection()); }this._animationEndedDelegate=Function.createDelegate(this,this._onAnimationEnded); this._slide.add_expandAnimationEnded(this._animationEndedDelegate); this._slide.add_collapseAnimationEnded(this._animationEndedDelegate); this._animationStartedDelegate=Function.createDelegate(this,this._onAnimationStarted); this._slide.add_expandAnimationStarted(this._animationStartedDelegate); this._slide.add_collapseAnimationStarted(this._animationStartedDelegate); }; 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._animationEndedDelegate){if(this._slide){this._slide.remove_expandAnimationEnded(this._animationEndedDelegate); this._slide.remove_collapseAnimationEnded(this._animationEndedDelegate); }this._animationEndedDelegate=null; }if(this._animationStartedDelegate){if(this._slide){this._slide.remove_expandAnimationStarted(this._animationStartedDelegate); this._slide.remove_collapseAnimationStarted(this._animationStartedDelegate); }this._animationStartedDelegate=null; }if(this._slide){this._slide.dispose(); this._slide=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(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; loadedItemsCount=n.shouldAppendItem?n.itemsCount+q:q,totalCount=o,newArgs=new b.WebServiceLoaderSuccessEventArgs(p,n.filterText); l.set_endOfItems(loadedItemsCount==totalCount); l._onWebServiceResponse(l,newArgs); if(l._showMoreResultsBox){var r=l._getShowMoreMessage(1,loadedItemsCount,totalCount); l.set_showMoreMessage(r); 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]!=null){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]!=null){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!=null){this._pendingAjaxRequestsCount--; this._addNewItems(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 q=this.get_text(); 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]==null){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 r=document.createElement("ul"); r.innerHTML=p[1]; var d=$telerik.getChildrenByTagName(r,"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._setUpDropDownAfterRequest=function(g,d,f){if(this._virtualScroll){this._setUpScroll(this.get_endOfItems(),d); }if(this.get_appendItems()&&(this.get_items().getItem(f+1)!=null)){this.get_items().getItem(f+1).scrollIntoView(); }this._updateMoreResultsBox(); if(!this._height&&!$telerik.isIE8){$telerik.$(d).parents(".rcbScroll")[0].style.height=""; }this.raise_itemsRequested(g,null); if(this.get_filter()==b.RadComboBoxFilter.None){this.highlightMatches(); }else{var e=this.get_highlightedItem(); this.highlightAllMatches(this._filterText); if(e){e.highlight(); }}if(this.get_dropDownVisible()){this._skipDropDownPositioning=true; if(this._slide){this._slide.updateSize(); }this._skipDropDownPositioning=null; this._positionDropDown(); }this._resizeDropDown(); 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.$; var b=Telerik.Web.UI; b.RadComboBox.prototype.get_selectedIndex=function(){var c=this.get_selectedItem(); if(c){return c.get_index(); }return this._selectedIndex; }; b.RadComboBox.prototype.set_selectedIndex=function(c){this._selectedIndex=c; }; b.RadComboBox.prototype.get_selectedItem=function(){if(!this._setSelectedItem){this._setSelectedItem=true; this._setFirstSelectedItem(); }return this._selectedItem; }; b.RadComboBox.prototype.set_selectedItem=function(c){this._selectedItem=c; }; b.RadComboBox.prototype.clearSelection=function(){this.set_text(""); this.set_value(""); this.set_selectedItem(null); var c=this.get_highlightedItem(); if(c){c.unHighlight(); }this._applyEmptyMessage(); }; b.RadComboBox.prototype._performSelect=function(f,d){if(f&&f!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){f._select(d); return; }if(f&&f==this.get_selectedItem()&&this.getLastWord(this.get_text())!=f.get_text()&&!this.get_readOnly()){this._appendTextAfterLastSeparator(f.get_text()); return; }if(f&&f==this.get_selectedItem()){return; }if(f&&this.get_originalText()!=f.get_text()){f._select(d); return; }if(f&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=f.get_value())){f._select(d); return; }var g=this.get_originalText(); if(g==this.get_emptyMessage()){g=""; }if(g!=this.get_text()){if(this.get_highlightedItem()){this.get_highlightedItem().unHighlight(); }if(this.raise_textChange(this,d)==true){return; }var c={Command:"TextChanged"}; this.postback(c); }}; b.RadComboBox.prototype._selectItemOnBlur=function(d){if(this.get_emptyMessage()&&(this.get_text()==this.get_emptyMessage())){return; }var i,g=null; if(this.get_markFirstMatch()==true&&this.get_filter()==b.RadComboBoxFilter.None&&this.get_allowCustomText()==false&&this.get_enableLoadOnDemand()==false&&this.get_emptyMessage()&&this.get_autoCompleteSeparator()){i=this.get_lastWord(); }if(!this._checkBoxes){g=this._findItemToSelect(i); }if(g==null&&this._defaultItem!=null&&(this.get_text()==""||this.get_text()==this._defaultItem.get_text())){g=this._defaultItem; }var f=!this.get_enableLoadOnDemand()&&!this.get_allowCustomText(); if(!g&&f&&(this.get_items().get_count()>0)&&!this.get_emptyMessage()){if(this.get_filter()!=b.RadComboBoxFilter.None){g=this.get_selectedItem(); if(!g){this.set_text(""); }}else{if(this.get_markFirstMatch()){if(this.get_text()==""){this.set_text(this._originalText); }this.highlightMatches(); this.selectText(0,0); g=this.get_highlightedItem(); }}}if(this.get_filter()!=b.RadComboBoxFilter.None){this.setAllItemsVisible(true); }if(!g){var h=this.get_selectedItem(); if(h&&!f){if(this.raise_selectedIndexChanging(null,d)==true){this.set_text(h.get_text()); return; }h.set_selected(false); this.set_selectedItem(null); this.set_selectedIndex(null); this.raise_selectedIndexChanged(null,d); var c={Command:"Select",Index:-1}; this.postback(c); return; }if(h&&f){g=h; }}this._performSelect(g,d); }; })(); (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==undefined){this._simpleRendering=false; }else{return this._simpleRendering; }if(a(this.get_element()).find("select").length>0&&this.get_inputDomElement()==undefined){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 f=c.get_text(); lastSeparatorIndex=c._getLastSeparatorIndex(f),textToSet=f.substring(0,lastSeparatorIndex+1)+this.get_text(),selectedItem=c.get_selectedItem(); if(selectedItem){selectedItem.set_selected(false); }c.clearSelection(); c.get_inputDomElement().value=textToSet; 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.$);