diff -r 065a242ed7ec -r 7119ea8a5225 www-thermferm/jqwidgets/jqxcombobox.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www-thermferm/jqwidgets/jqxcombobox.js Sun Jul 20 23:09:50 2014 +0200
@@ -0,0 +1,7 @@
+/*
+jQWidgets v3.4.0 (2014-June-23)
+Copyright (c) 2011-2014 jQWidgets.
+License: http://jqwidgets.com/license/
+*/
+
+(function(a){a.jqx.jqxWidget("jqxComboBox","",{});a.extend(a.jqx._jqxComboBox.prototype,{defineInstance:function(){this.disabled=false;this.width=200;this.height=25;this.items=new Array();this.selectedIndex=-1;this.selectedItems=new Array();this._selectedItems=new Array();this.source=null;this.scrollBarSize=a.jqx.utilities.scrollBarSize;this.arrowSize=18;this.enableHover=true;this.enableSelection=true;this.visualItems=new Array();this.groups=new Array();this.equalItemsWidth=true;this.itemHeight=-1;this.visibleItems=new Array();this.emptyGroupText="Group";this.emptyString="";if(this.openDelay==undefined){this.openDelay=250}if(this.closeDelay==undefined){this.closeDelay=300}this.animationType="default";this.dropDownWidth="auto";this.dropDownHeight="200px";this.autoDropDownHeight=false;this.enableBrowserBoundsDetection=false;this.dropDownHorizontalAlignment="left";this.searchMode="startswithignorecase";this.autoComplete=false;this.remoteAutoComplete=false;this.remoteAutoCompleteDelay=500;this.selectionMode="default";this.minLength=2;this.displayMember="";this.valueMember="";this.keyboardSelection=true;this.renderer=null;this.autoOpen=false;this.checkboxes=false;this.promptText="";this.placeHolder="";this.rtl=false;this.listBox=null;this.renderSelectedItem=null;this.search=null;this.popupZIndex=100000;this.searchString=null;this.multiSelect=false;this.showArrow=true;this._disabledItems=new Array();this.touchMode="auto";this.autoBind=true;this.aria={"aria-disabled":{name:"disabled",type:"boolean"}};this.events=["open","close","select","unselect","change","checkChange","bindingComplete"]},createInstance:function(b){var c=this;this.host.attr("role","combobox");a.jqx.aria(this,"aria-autocomplete","both");if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw new Error("jqxComboBox: Missing reference to jqxlistbox.js.")}a.jqx.aria(this);if(this.promptText!=""){this.placeHolder=this.promptText}this.render()},render:function(){this.removeHandlers();this.isanimating=false;this.id=a.jqx.utilities.createId();this.element.innerHTML="";var d=a("
");this.comboStructure=d;if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw"jqxComboBox: Missing reference to jqxlistbox.js."}this.touch=a.jqx.mobile.isTouchDevice();if(this.touchMode===true){this.touch=true}this.host.append(d);this.dropdownlistWrapper=this.host.find("#dropdownlistWrapper");this.dropdownlistArrow=this.host.find("#dropdownlistArrow");this.dropdownlistContent=this.host.find("#dropdownlistContent");this.dropdownlistContent.addClass(this.toThemeProperty("jqx-combobox-content"));this.dropdownlistContent.addClass(this.toThemeProperty("jqx-widget-content"));this.dropdownlistWrapper[0].id="dropdownlistWrapper"+this.element.id;this.dropdownlistArrow[0].id="dropdownlistArrow"+this.element.id;this.dropdownlistContent[0].id="dropdownlistContent"+this.element.id;this.dropdownlistContent.append(a(''));this.input=this.dropdownlistContent.find("input");this.input.addClass(this.toThemeProperty("jqx-combobox-input"));this.input.addClass(this.toThemeProperty("jqx-widget-content"));if(this.host.attr("tabindex")){this.input.attr("tabindex",this.host.attr("tabindex"));this.host.removeAttr("tabindex")}this._addInput();if(this.rtl){this.input.css({direction:"rtl"});this.dropdownlistContent.addClass(this.toThemeProperty("jqx-combobox-content-rtl"))}try{var l="listBox"+this.id;var g=a(a.find("#"+l));if(g.length>0){g.remove()}a.jqx.aria(this,"aria-owns",l);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-multiline",false);if(this.listBoxContainer){this.listBoxContainer.jqxListBox("destroy")}if(this.container){this.container.remove()}var b=a("");b.hide();b.appendTo(document.body);this.container=b;this.listBoxContainer=a(a.find("#innerListBox"+this.id));var c=this.width;if(this.dropDownWidth!="auto"){c=this.dropDownWidth}if(this.dropDownHeight==null){this.dropDownHeight=200}var j=this;this.container.width(parseInt(c)+25);this.container.height(parseInt(this.dropDownHeight)+25);this.addHandler(this.listBoxContainer,"bindingComplete",function(e){j._raiseEvent("6")});var h=true;this.listBoxContainer.jqxListBox({_checkForHiddenParent:false,checkboxes:this.checkboxes,emptyString:this.emptyString,autoBind:!this.remoteAutoComplete&&this.autoBind,renderer:this.renderer,rtl:this.rtl,itemHeight:this.itemHeight,selectedIndex:this.selectedIndex,incrementalSearch:false,width:c,scrollBarSize:this.scrollBarSize,autoHeight:this.autoDropDownHeight,height:this.dropDownHeight,displayMember:this.displayMember,valueMember:this.valueMember,source:this.source,theme:this.theme,rendered:function(){j.listBox=a.data(j.listBoxContainer[0],"jqxListBox").instance;if(j.remoteAutoComplete){if(j.autoDropDownHeight){j.container.height(j.listBox.virtualSize.height+25);j.listBoxContainer.height(j.listBox.virtualSize.height);j.listBox._arrange()}else{j.listBox._arrange();j.listBox.ensureVisible(0);j.listBox._renderItems();j.container.height(j.listBoxContainer.height()+25)}if(j.searchString!=undefined&&j.searchString.length>=j.minLength){var e=j.listBoxContainer.jqxListBox("items");if(e){if(e.length>0){if(!j.isOpened()){j.open()}}else{j.close()}}else{j.close()}}else{j.close()}}else{j.renderSelection("mouse");if(j.multiSelect){j.doMultiSelect(false)}}if(j.rendered){j.rendered()}}});this.listBoxContainer.css({position:"absolute",zIndex:this.popupZIndex,top:0,left:0});this.listBoxContainer.css("border-top-width","1px");this.listBoxContainer.addClass(this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.listBoxContainer.addClass(this.toThemeProperty("jqx-noshadow"))}this.listBox=a.data(this.listBoxContainer[0],"jqxListBox").instance;this.listBox.enableSelection=this.enableSelection;this.listBox.enableHover=this.enableHover;this.listBox.equalItemsWidth=this.equalItemsWidth;this.listBox._arrange();this.addHandler(this.listBoxContainer,"unselect",function(e){if(!j.multiSelect){j._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})}});this.addHandler(this.listBoxContainer,"change",function(e){if(!j.multiSelect){j._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}});if(this.animationType=="none"){this.container.css("display","none")}else{this.container.hide()}h=false}catch(i){throw i}var m=this;m.input.attr("disabled",m.disabled);var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(!f){m.input.attr("placeholder",m.placeHolder)}this.propertyChangeMap.disabled=function(e,o,n,p){if(p){e.host.addClass(m.toThemeProperty("jqx-combobox-state-disabled"));e.host.addClass(m.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(m.toThemeProperty("jqx-combobox-content-disabled"))}else{e.host.removeClass(m.toThemeProperty("jqx-combobox-state-disabled"));e.host.removeClass(m.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(m.toThemeProperty("jqx-combobox-content-disabled"))}e.input.attr("disabled",e.disabled);a.jqx.aria(e,"aria-disabled",e.disabled);e.input.attr("disabled",e.disabled)};if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-combobox-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.dropdownlistContent.addClass(this.toThemeProperty("jqx-combobox-content-disabled"))}this.host.addClass(this.toThemeProperty("jqx-combobox-state-normal"));this.host.addClass(this.toThemeProperty("jqx-combobox"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.dropdownlistArrowIcon=a("");this.dropdownlistArrowIcon.addClass(this.toThemeProperty("jqx-icon-arrow-down"));this.dropdownlistArrowIcon.addClass(this.toThemeProperty("jqx-icon"));this.dropdownlistArrow.append(this.dropdownlistArrowIcon);this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-combobox-arrow-normal"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-fill-state-normal"));if(!this.rtl){this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-r"))}else{this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-l"))}this._setSize();this._updateHandlers();this.addHandler(this.input,"keyup.textchange",function(e){var n=j._search(e);if(j.cinput&&j.input){j.cinput[0].value=j.input[0].value}});if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(this.host.parents(".jqx-window").length>0){var k=this.host.parents(".jqx-window").css("z-index");b.css("z-index",k+10);this.listBoxContainer.css("z-index",k+10)}}if(this.checkboxes){this.input.attr("readonly",true);a.jqx.aria(this,"aria-readonly",true)}else{a.jqx.aria(this,"aria-readonly",false)}if(!this.remoteAutoComplete){this.searchString=""}},_addInput:function(){var b=this.host.attr("name");this.cinput=a("");this.host.append(this.cinput);if(b){this.cinput.attr("name",b)}},_updateInputSelection:function(){if(this.cinput){if(this.selectedIndex==-1){this.cinput.val("")}else{var d=this.getSelectedItem();if(d!=null){this.cinput.val(d.value)}else{this.cinput.val(this.dropdownlistContent.text())}}if(this.checkboxes||this.multiSelect){if(!this.multiSelect){var b=this.getCheckedItems()}else{var b=this.getSelectedItems()}var e="";if(b!=null){for(var c=0;c"+this.input.val()+"");n.addClass(this.toThemeProperty("jqx-widget"));a(document.body).append(n);var j=n.width()+15;n.remove();if(j>this.host.width()){j=this.host.width()}if(j<25){j=25}this.input.css("width",j+"px");if(this.selectedItems.length==0){this.input.css("width","100%");this.input.attr("placeholder",this.placeHolder)}else{this.input.attr("placeholder","")}var f=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();var c=a.jqx.utilities.hasTransform(this.host);if(c||(o!=null&&o)){f=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){f=parseInt(f)-this._getBodyOffset().top+"px"}}this.container.css("top",f);var i=parseInt(this.host.height());this.dropdownlistArrow.height(i)}if(!this.isanimating){if(m.altKey&&m.keyCode==38){this.hideListBox("altKey");return false}if(m.altKey&&m.keyCode==40){if(!this.isOpened()){this.showListBox("altKey")}return false}}if(m.keyCode==37||m.keyCode==39){return false}if(m.altKey||m.keyCode==18){return}if(m.keyCode>=33&&m.keyCode<=40){return}if(m.ctrlKey||this.ctrlKey){if(m.keyCode!=88&&m.keyCode!=86){return}}var l=this.input.val();if(l.length==0&&!this.autoComplete){this.listBox.searchString=this.input.val();this.listBox.clearSelection();this.hideListBox("search");this.searchString=this.input.val();return}if(this.remoteAutoComplete){var s=this;var p=function(){s.listBox.vScrollInstance.value=0};if(l.length>=s.minLength){if(!m.ctrlKey&&!m.altKey){if(s.searchString!=l){var k=s.listBoxContainer.jqxListBox("source");if(k==null){s.listBoxContainer.jqxListBox({source:s.source})}if(this._searchTimer){clearTimeout(this._searchTimer)}if(m.keyCode!=13&&m.keyCode!=27){this._searchTimer=setTimeout(function(){p();if(s.autoDropDownHeight){s.listBox.autoHeight=true}s.searchString=s.input.val();if(s.search!=null){s.search(s.input.val())}else{throw"'search' function is not defined"}},this.remoteAutoCompleteDelay)}}s.searchString=l}}else{if(this._searchTimer){clearTimeout(this._searchTimer)}p();s.searchString="";s.listBoxContainer.jqxListBox({source:null})}return}var s=this;if(l===s.searchString){return}if(!(m.keyCode=="27"||m.keyCode=="13")){var b=this._updateItemsVisibility(l);var e=b.matchItems;var d=b.index;if(!this.autoComplete&&!this.removeAutoComplete){if(!this.multiSelect||(this.multiSelect&&d>=0)){this.listBox.selectIndex(d);var r=this.listBox.isIndexInView(d);if(!r){this.listBox.ensureVisible(d)}else{this.listBox._renderItems()}}}if(this.autoComplete&&e.length===0){this.hideListBox("search")}}if(m.keyCode=="13"){var g=this.container.css("display")=="block";if(g&&!this.isanimating){this.hideListBox("keyboard");this._oldvalue=this.listBox.selectedValue;return}}else{if(m.keyCode=="27"){var g=this.container.css("display")=="block";if(g&&!this.isanimating){if(!h.multiSelect){var q=this.listBox.getVisibleItem(this._oldvalue);if(q){var h=this;setTimeout(function(){if(h.autoComplete){h._updateItemsVisibility("")}h.listBox.selectIndex(q.index);h.renderSelection("api")},h.closeDelay)}else{this.clearSelection()}}else{h.input.val("");h.listBox.selectedValue=null}this.hideListBox("keyboard");this.renderSelection("api");m.preventDefault();return false}}else{if(!this.isOpened()&&!this.opening&&!m.ctrlKey){if(this.listBox.visibleItems&&this.listBox.visibleItems.length>0){if(this.input.val()!=this.searchString&&this.searchString!=undefined&&d!=-1){this.showListBox("search")}}}this.searchString=this.input.val();if(this.searchString==""){if(!this.listBox.itemsByValue[""]){d=-1}}var q=this.listBox.getVisibleItem(d);if(q!=undefined){this._updateInputSelection()}}}},val:function(c){if(!this.input){return""}if(typeof c==="object"||arguments.length==0){var b=this.getSelectedItem();if(b){return b.value}return this.input.val()}else{var b=this.getItemByValue(c);if(b!=null){this.selectItem(b)}else{this.input.val(c)}return this.input.val()}},focus:function(){var c=this;var b=function(){c.input.focus();var d=c.input.val();c._setSelection(0,d.length)};b();setTimeout(function(){b()},10)},_setSelection:function(e,b){try{if("selectionStart" in this.input[0]){this.input[0].focus();this.input[0].setSelectionRange(e,b)}else{var c=this.input[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",e);c.select()}}catch(d){}},setContent:function(b){this.input.val(b)},_updateItemsVisibility:function(l){var i=this.getItems();if(i==undefined){return{index:-1,matchItem:new Array()}}var j=this;var g=-1;var m=new Array();var k=0;a.each(i,function(p){var r="";if(!this.isGroup){if(this.label){r=this.label}else{if(this.value){r=this.value}else{if(this.title){r=this.title}else{r="jqxItem"}}}r=r.toString();var q=false;switch(j.searchMode){case"containsignorecase":q=a.jqx.string.containsIgnoreCase(r,l);break;case"contains":q=a.jqx.string.contains(r,l);break;case"equals":q=a.jqx.string.equals(r,l);break;case"equalsignorecase":q=a.jqx.string.equalsIgnoreCase(r,l);break;case"startswith":q=a.jqx.string.startsWith(r,l);break;case"startswithignorecase":q=a.jqx.string.startsWithIgnoreCase(r,l);break;case"endswith":q=a.jqx.string.endsWith(r,l);break;case"endswithignorecase":q=a.jqx.string.endsWithIgnoreCase(r,l);break}if(j.autoComplete&&!q){this.visible=false}if(q&&j.autoComplete){m[k++]=this;this.visible=true;g=this.visibleIndex}if(l==""&&j.autoComplete){this.visible=true;q=false}if(j.multiSelect){this.disabled=false;if(j.selectedItems.indexOf(this.value)>=0||j._disabledItems.indexOf(this.value)>=0){this.disabled=true;q=false}}if(!j.multiSelect){if(q&&!j.autoComplete){g=this.visibleIndex;return false}}else{if(q&&!j.autoComplete){if(g===-1){g=this.visibleIndex}return true}}}});this.listBox.searchString=l;var f=this;var h=function(){if(!f.multiSelect){return}var p=0;var s=false;var r=null;for(var q=0;q0){if(r){f.listBox.selectedValue=r.value}else{f.listBox.selectedValue=null}}else{f.listBox.selectedValue=null}f.listBox.ensureVisible(0)};if(!this.autoComplete){h();return{index:g,matchItems:m}}this.listBox.renderedVisibleItems=new Array();var b=this.listBox.vScrollInstance.value;this.listBox.vScrollInstance.value=0;this.listBox.visibleItems=new Array();this.listBox._renderItems();var e=this.listBox.selectedValue;var o=this.listBox.getItemByValue(e);if(!this.multiSelect){if(o){if(o.visible){this.listBox.selectedIndex=o.visibleIndex;for(var d=0;d=l&&i.pageY<=l+d.host.height()+2){if(i.pageX>=k&&i.pageX=g&&i.pageY<=g+d.container.height()-20){if(i.pageX>=f&&i.pageX=0){return true}}d.renderSelection("mouse");d._oldvalue=d.listBox.selectedValue;if(!d.touch&&!d.ishiding){if(!d.checkboxes){d.hideListBox("mouse");d.input.focus()}}if(d.touch===true){if(!d.checkboxes){d.hideListBox("mouse")}}}})}},_selectOldValue:function(){var b=this;if(b.listBox.selectedIndex==-1){if(!b.multiSelect){var c=b.listBox.getItemByValue(b._oldvalue);if(c){setTimeout(function(){if(b.autoComplete){b._updateItemsVisibility("")}b.listBox.selectIndex(c.index);b.renderSelection("api")},b.closeDelay)}else{b.clearSelection();b.listBox.selectIndex(0);b.renderSelection("api")}}else{b.listBox.selectedValue=null;b.input.val("")}}else{b.renderSelection("api")}},removeHandlers:function(){var c=this;if(this.dropdownlistWrapper!=null){this.removeHandler(this.dropdownlistWrapper,"mousedown")}if(this.dropdownlistContent){this.removeHandler(this.dropdownlistContent,"click");this.removeHandler(this.dropdownlistContent,"focus")}this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");if(this.input!=null){this.removeHandler(this.input,"focus");this.removeHandler(this.input,"blur")}this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(a(document),"mousemove."+c.id);if(this.listBoxContainer){this.removeHandler(this.listBoxContainer,"checkChange");this.removeHandler(this.listBoxContainer,"select")}if(this.host.parents()){this.removeHandler(this.host.parents(),"scroll.combobox"+this.element.id)}if(this.dropdownlistArrowIcon&&this.dropdownlistArrow){var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(this.dropdownlistArrowIcon,b);this.removeHandler(this.dropdownlistArrow,b)}},getItem:function(b){var c=this.listBox.getItem(b);return c},getItemByValue:function(c){var b=this.listBox.getItemByValue(c);return b},getVisibleItem:function(b){var c=this.listBox.getVisibleItem(b);return c},renderSelection:function(j){if(j==undefined||j=="none"){return}if(this._disableSelection===true){return}if(this.listBox==null){return}if(this.multiSelect){return}var k=this.listBox.visibleItems[this.listBox.selectedIndex];if(this.autoComplete&&!this.checkboxes){if(this.listBox.selectedValue!==undefined){var k=this.getItemByValue(this.listBox.selectedValue)}}if(this.checkboxes){var f=this.getCheckedItems();if(f!=null&&f.length>0){k=f[0]}else{k=null}}if(k==null){var d=a.jqx.browser.msie&&a.jqx.browser.version<8;this.input.val("");if(!d){this.input.attr("placeholder",this.placeHolder)}this._updateInputSelection();return}this.selectedIndex=this.listBox.selectedIndex;var c=a("");if(k.label!=undefined&&k.label!=null&&k.label.toString().length>0){a.jqx.utilities.html(c,k.label)}else{if(k.value!=undefined&&k.value!=null&&k.value.toString().length>0){a.jqx.utilities.html(c,k.value)}else{if(k.title!=undefined&&k.title!=null&&k.title.toString().length>0){a.jqx.utilities.html(c,k.title)}else{a.jqx.utilities.html(c,this.emptyString)}}}var b=c.outerHeight();if(this.checkboxes){var g=this.getCheckedItems();var h="";for(var e=0;e=0){var b=this.getItem(c);var e=this.selectedItems.indexOf(b.value);if(e>=0){if(b.value===this.listBox.selectedValue){this.listBox.selectedValue=null}this.selectedItems.splice(e,1);this._selectedItems.splice(e,1)}}this.doMultiSelect(false)}},selectIndex:function(b,d,e,c){if(this.autoComplete){this._updateItemsVisibility("")}this.listBox.selectIndex(b,d,e,c);this.renderSelection("mouse");this.selectedIndex=b;if(this.multiSelect){this.doMultiSelect()}},selectItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.selectedIndex=-1;this.listBox.selectItem(b);this.selectedIndex=this.listBox.selectedIndex;this.renderSelection("mouse");if(this.multiSelect){this.doMultiSelect(false)}}},unselectItem:function(d){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.unselectItem(d);this.renderSelection("mouse");if(this.multiSelect){var b=this.getItemByValue(d);if(b){var c=this.selectedItems.indexOf(b.value);if(c>=0){if(b.value===this.listBox.selectedValue){this.listBox.selectedValue=null}this.selectedItems.splice(c,1);this._selectedItems.splice(c,1)}}this.doMultiSelect(false)}}},checkItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.checkItem(b)}},uncheckItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.uncheckItem(b)}},indeterminateItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.indeterminateItem(b)}},getSelectedValue:function(){return this.listBox.selectedValue},getSelectedIndex:function(){return this.listBox.selectedIndex},getSelectedItem:function(){return this.getVisibleItem(this.listBox.selectedIndex)},getSelectedItems:function(){var c=new Array();var b=this;a.each(this.selectedItems,function(){var d=b.getItemByValue(this);if(d){c.push(d)}else{var d=b._selectedItems[this];if(d){c.push(d)}}});return c},getCheckedItems:function(){return this.listBox.getCheckedItems()},checkIndex:function(b){this.listBox.checkIndex(b)},uncheckIndex:function(b){this.listBox.uncheckIndex(b)},indeterminateIndex:function(b){this.listBox.indeterminateIndex(b)},checkAll:function(){this.listBox.checkAll();this.renderSelection("mouse")},uncheckAll:function(){this.listBox.uncheckAll();this.renderSelection("mouse")},insertAt:function(c,b){if(c==null){return false}return this.listBox.insertAt(c,b)},addItem:function(b){return this.listBox.addItem(b)},removeAt:function(c){var b=this.listBox.removeAt(c);this.renderSelection("mouse");return b},removeItem:function(c){var b=this.listBox.removeItem(c);this.renderSelection("mouse");return b},updateItem:function(c,d){var b=this.listBox.updateItem(c,d);this.renderSelection("mouse");return b},updateAt:function(d,c){var b=this.listBox.updateAt(d,c);this.renderSelection("mouse");return b},ensureVisible:function(b){return this.listBox.ensureVisible(b)},disableAt:function(b){var c=this.getVisibleItem(b);if(c){this._disabledItems.push(c.value)}return this.listBox.disableAt(b)},enableAt:function(b){var c=this.getVisibleItem(b);if(c){this._disabledItems.splice(this._disabledItems.indexOf(c.value),1)}return this.listBox.enableAt(b)},disableItem:function(b){var b=this.getVisibleItem(b);if(b){this._disabledItems.push(b.value)}return this.listBox.disableItem(b)},enableItem:function(b){var b=this.getVisibleItem(b);if(b){this._disabledItems.splice(this._disabledItems.indexOf(b.value),1)}return this.listBox.enableItem(b)},_findPos:function(c){while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}if(c){var b=a(c).coord(true);return[b.left,b.top]}},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(){if(!this.isOpened()&&!this.opening){this.showListBox("api")}},close:function(){if(this.isOpened()){this.hideListBox("api")}},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},showListBox:function(l){if(this.listBox.items&&this.listBox.items.length==0){return}if(l=="search"&&!this.autoComplete&&!this.remoteAutoComplete){if(this.autoDropDownHeight){this.container.height(this.listBoxContainer.height()+25)}}if(this.autoComplete||this.multiSelect&&!this.remoteAutoComplete){if(l!="search"){this._updateItemsVisibility("");if(this.multiSelect){var p=this.getVisibleItems();for(var t=0;tthis.host.width()){this.container.css("left",25+parseInt(Math.round(q))-s+"px")}else{this.container.css("left",25+parseInt(Math.round(q))+s+"px")}}if(this.enableBrowserBoundsDetection){var j=this.testOffset(h,{left:parseInt(this.container.css("left")),top:parseInt(m)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){b=true;h.css("top",23);h.addClass(this.toThemeProperty("jqx-popup-up"))}else{h.css("top",0)}this.container.css("top",j.top);this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}if(this.animationType=="none"){this.container.css("display","block");a.data(document.body,"openedComboJQXListBoxParent",o);a.data(document.body,"openedComboJQXListBox"+o.element.id,h);h.css("margin-top",0);h.css("opacity",1)}else{this.container.css("display","block");var n=h.outerHeight();h.stop();if(this.animationType=="fade"){h.css("margin-top",0);h.css("opacity",0);h.animate({opacity:1},this.openDelay,function(){o.isanimating=false;o.opening=false;a.data(document.body,"openedComboJQXListBoxParent",o);a.data(document.body,"openedComboJQXListBox"+o.element.id,h)})}else{h.css("opacity",1);if(b){h.css("margin-top",n)}else{h.css("margin-top",-n)}this.isanimating=true;this.opening=true;h.animate({"margin-top":0},this.openDelay,function(){o.isanimating=false;o.opening=false;a.data(document.body,"openedComboJQXListBoxParent",o);a.data(document.body,"openedComboJQXListBox"+o.element.id,h)})}}v._renderItems();if(!b){this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded"));h.addClass(this.toThemeProperty("jqx-rc-t-expanded"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-b-expanded"))}else{this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded"));h.addClass(this.toThemeProperty("jqx-rc-b-expanded"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-t-expanded"))}h.addClass(this.toThemeProperty("jqx-fill-state-focus"));this._raiseEvent("0",v)},doMultiSelect:function(c){if(this.checkboxes){this.multiSelect=false}var e=this;if(!this.multiSelect){var g=e.dropdownlistContent.find(".jqx-button");var d="mousedown";if(this.touch){d=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(g,d);this.removeHandler(g.find(".jqx-icon-close"),d);g.remove();this.selectedItems=new Array();this._selectedItems=new Array();return}if(this.validateSelection){var k=this.validateSelection(this.listBox.selectedValue);if(!k){return}}var h=this.selectedItems;if(this.listBox.selectedValue){if(this.selectedItems.indexOf(this.listBox.selectedValue)===-1){var j=this.getItemByValue(this.listBox.selectedValue);if(j&&j.visible){this.selectedItems.push(this.listBox.selectedValue);this._selectedItems.push(j);this._raiseEvent("2",{index:j.index,item:j});this._raiseEvent("4",{index:j.index,item:j})}}this.listBox.selectedIndex=0}var f=this.listBox.items;if(!f){return}for(var b=0;b=0||this._disabledItems.indexOf(this.value)>=0){f[b].disabled=true}}this.listBox._renderItems();this.searchString="";this.input.val("");var f="";var d="mousedown";var g=e.dropdownlistContent.find(".jqx-button");if(this.touch){d=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(g,d);this.removeHandler(g.find(".jqx-icon-close"),d);g.remove();e.input.detach();if(this.selectedItems.length>0){e.input.css("width","25px");e.input.attr("placeholder","")}else{e.input.css("width","100%");e.input.attr("placeholder",this.placeHolder)}a.each(this.selectedItems,function(i){var m=e.getItemByValue(this);if(!m||e.remoteAutoComplete){m=e._selectedItems[i]}var o=a('');o.addClass(e.toThemeProperty("jqx-button"));o.addClass(e.toThemeProperty("jqx-combobox-multi-item"));o.addClass(e.toThemeProperty("jqx-fill-state-normal"));o.addClass(e.toThemeProperty("jqx-rc-all"));if(m){var p=m.label;if(o[0].innerHTML==""){o[0].innerHTML=''+p+""}if(e.rtl){o[0].innerHTML=''+p+""}var n=!e.rtl?"right":"left";var l='';if(a.jqx.browser.msie&&a.jqx.browser.version<8){l=''}if(e.rtl){var l='';if(a.jqx.browser.msie&&a.jqx.browser.version<8){l=''}}o[0].innerHTML+=l}else{if(o[0].innerHTML==""){o[0].innerHTML=''}}e.dropdownlistContent.append(o)});e.dropdownlistContent.append(e.input);e.input.val("");if(c!==false){e.input.focus();setTimeout(function(){e.input.focus()},10)}var g=e.dropdownlistContent.find(".jqx-button");if(this.touchMode===true){d="mousedown"}this.addHandler(g,d,function(l){if(l.target.className.indexOf("jqx-icon-close")>=0){return true}if(e.disabled){return true}var m=a(l.target).attr("data-value");var i=e.getItemByValue(m);if(i){e.listBox.selectedValue=null;e.listBox.clearSelection()}e.listBox.scrollTo(0,0);e.open();if(l.preventDefault){l.preventDefault()}if(l.stopPropagation){l.stopPropagation()}return false});this.addHandler(g.find(".jqx-icon-close"),d,function(o){if(e.disabled){return}var q=a(o.target).parent().parent().find("a").attr("data-value");var n=e.getItemByValue(q);if(n){e.listBox.selectedValue=null;var l=e.selectedItems.indexOf(q);if(l>=0){e.selectedItems.splice(l,1);e._selectedItems.splice(l,1);e._raiseEvent("3",{index:n.index,type:"mouse",item:n});e._raiseEvent("4",{index:n.index,type:"mouse",item:n});e.doMultiSelect()}else{for(var m=0;m0){this.dropdownlistContent[0].style.width=b+"px"}if(this.rtl){this.dropdownlistContent[0].style.width=(-1+b+"px")}this.dropdownlistContent[0].style.height=j+"px";this.dropdownlistContent[0].style.left="0px";this.dropdownlistContent[0].style.top="0px";this.dropdownlistArrow[0].style.width=f+1+"px";this.dropdownlistArrow[0].style.height=j+"px";this.dropdownlistArrow[0].style.left=1+b+"px";this.input[0].style.width="100%";var c=this.input.height();if(c==0){c=parseInt(this.input.css("font-size"))+3}if(this.input[0].className.indexOf("jqx-rc-all")==-1){this.input.addClass(this.toThemeProperty("jqx-rc-all"))}var i=parseInt(j)/2-parseInt(c)/2;if(i>0){this.input[0].style.marginTop=parseInt(i)+"px"}if(this.rtl){this.dropdownlistArrow.css("left","0px");this.dropdownlistContent.css("left",this.dropdownlistArrow.width());if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dropdownlistContent.css("left",1+this.dropdownlistArrow.width())}}if(this.multiSelect){this.input.css("float","left");this.dropdownlistWrapper.parent().css("height","auto");this.dropdownlistContent.css("height","auto");this.dropdownlistWrapper.css("height","auto");this.dropdownlistContent.css("position","relative");this.dropdownlistContent.css("cursor","text");this.host.css("height","auto");this.host.css("min-height",this.height);this.dropdownlistContent.css("min-height",this.height);var j=parseInt(this.host.height());this.dropdownlistArrow.height(j);var g=parseInt(this.host.css("min-height"));var i=parseInt(g)/2-parseInt(c)/2;if(i>0){this.input.css("margin-top",i)}}},destroy:function(){if(this.source&&this.source.unbindBindingUpdate){this.source.unbindBindingUpdate(this.element.id);this.source.unbindBindingUpdate(this.listBoxContainer[0].id);this.source.unbindDownloadComplete(this.element.id);this.source.unbindDownloadComplete(this.listBoxContainer[0].id)}a.jqx.utilities.resize(this.host,null,true);this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBoxContainer,"unselect");this.removeHandler(this.listBoxContainer,"change");this.removeHandler(this.listBoxContainer,"bindingComplete");this.removeHandler(this.dropdownlistWrapper,"selectstart");this.removeHandler(this.dropdownlistWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBox.content,"click");this.removeHandlers();this.removeHandler(this.input,"keyup.textchange");this.listBoxContainer.jqxListBox("destroy");this.listBoxContainer.remove();this.host.removeClass();this.removeHandler(a(document),"mousedown."+this.id,this.closeOpenedListBox);if(this.touch){this.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id)}this.cinput.remove();delete this.cinput;this.dropdownlistArrow.remove();delete this.dropdownlistArrow;this.dropdownlistArrowIcon.remove();delete this.dropdownlistArrowIcon;delete this.dropdownlistWrapper;delete this.listBoxContainer;delete this.input;delete this.dropdownlistContent;delete this.comboStructure;this.container.remove();delete this.listBox;delete this.container;var b=a.data(this.element,"jqxComboBox");if(b){delete b.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_raiseEvent:function(f,c){if(c==undefined){c={owner:null}}var d=this.events[f];args=c;args.owner=this;var e=new jQuery.Event(d);e.owner=this;if(f==2||f==3||f==4||f==5){e.args=c}var b=this.host.trigger(e);return b},propertyChangedHandler:function(b,c,f,e){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="itemHeight"){b.listBoxContainer.jqxListBox({itemHeight:e})}if(c=="renderSelectedItem"){b.renderSelection("mouse")}if(c=="renderer"){b.listBoxContainer.jqxListBox({renderer:e})}if(c=="enableSelection"){b.listBoxContainer.jqxListBox({enableSelection:e})}if(c=="enableHover"){b.listBoxContainer.jqxListBox({enableHover:e})}if(c==="touchMode"){b.listBoxContainer.jqxListBox({touchMode:e});b.touch=a.jqx.mobile.isTouchDevice();if(b.touchMode===true){b.touch=true}b._updateHandlers()}if(c=="multiSelect"){if(e){b.doMultiSelect(false)}else{b.doMultiSelect(false);b.dropdownlistWrapper.parent().css("height","100%");b.dropdownlistContent.css("height","100");b.dropdownlistWrapper.css("height","100");b.dropdownlistContent.css("position","relative");b.host.css("min-height",null);b._setSize();b._arrange()}}if(c=="showArrow"){b._arrange();if(b.multiSelect){b.doMultiSelect(false)}}if(c=="popupZIndex"){b.listBoxContainer.css({zIndex:b.popupZIndex})}if(c=="promptText"){b.placeHolder=e}if(c=="autoOpen"){b._updateHandlers()}if(c=="renderer"){b.listBox.renderer=b.renderer}if(c=="itemHeight"){b.listBox.itemHeight=e}if(c=="source"){b.input.val("");b.listBoxContainer.jqxListBox({source:b.source});b.renderSelection("mouse");if(b.source==null){b.clearSelection()}if(b.multiSelect){b.selectedItems=new Array();b._selectedItems=new Array();b.doMultiSelect(false)}}if(c=="rtl"){if(e){b.dropdownlistArrow.css("float","left");b.dropdownlistContent.css("float","right")}else{b.dropdownlistArrow.css("float","right");b.dropdownlistContent.css("float","left")}b.listBoxContainer.jqxListBox({rtl:b.rtl})}if(c=="displayMember"||c=="valueMember"){b.listBoxContainer.jqxListBox({displayMember:b.displayMember,valueMember:b.valueMember});b.renderSelection("mouse")}if(c=="autoDropDownHeight"){b.listBoxContainer.jqxListBox({autoHeight:b.autoDropDownHeight});if(b.autoDropDownHeight){b.container.height(b.listBoxContainer.height()+25)}else{b.listBoxContainer.jqxListBox({height:b.dropDownHeight});b.container.height(parseInt(b.dropDownHeight)+25)}b.listBox._arrange();b.listBox._updatescrollbars()}if(c=="dropDownHeight"){if(!b.autoDropDownHeight){b.listBoxContainer.jqxListBox({height:b.dropDownHeight});b.container.height(parseInt(b.dropDownHeight)+25)}}if(c=="dropDownWidth"||c=="scrollBarSize"){var d=b.width;if(b.dropDownWidth!="auto"){d=b.dropDownWidth}b.listBoxContainer.jqxListBox({width:d,scrollBarSize:b.scrollBarSize});b.container.width(parseInt(d)+25)}if(c=="autoComplete"){b._resetautocomplete()}if(c=="checkboxes"){b.listBoxContainer.jqxListBox({checkboxes:b.checkboxes});if(b.checkboxes){b.input.attr("readonly",true);a.jqx.aria(b,"aria-readonly",true)}else{a.jqx.aria(b,"aria-readonly",false)}}if(c=="theme"&&e!=null){b.listBoxContainer.jqxListBox({theme:e});b.listBoxContainer.addClass(b.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){b.listBoxContainer.addClass(b.toThemeProperty("jqx-noshadow"))}b.dropdownlistContent.removeClass();b.dropdownlistContent.addClass(b.toThemeProperty("jqx-combobox-content"));b.dropdownlistContent.addClass(b.toThemeProperty("jqx-widget-content"));b.input.removeClass();b.input.addClass(b.toThemeProperty("jqx-combobox-input"));b.input.addClass(this.toThemeProperty("jqx-widget-content"));b.host.removeClass();b.host.addClass(b.toThemeProperty("jqx-combobox-state-normal"));b.host.addClass(b.toThemeProperty("jqx-rc-all"));b.host.addClass(b.toThemeProperty("jqx-widget"));b.host.addClass(b.toThemeProperty("jqx-widget-content"));b.dropdownlistArrow.removeClass();b.dropdownlistArrowIcon.addClass(b.toThemeProperty("jqx-icon-arrow-down"));b.dropdownlistArrow.addClass(b.toThemeProperty("jqx-combobox-arrow-normal"));b.dropdownlistArrow.addClass(b.toThemeProperty("jqx-fill-state-normal"))}if(c=="rtl"){b.render();b.refresh()}if(c=="width"||c=="height"){b._setSize();if(c=="width"){if(b.dropDownWidth=="auto"){var d=b.host.width();b.listBoxContainer.jqxListBox({width:d});b.container.width(parseInt(d)+25)}}b._arrange()}if(c=="selectedIndex"){b.listBox.selectIndex(e);b.renderSelection("mouse")}}})})(jQuery);
\ No newline at end of file