7 lines
56 KiB
JavaScript
7 lines
56 KiB
JavaScript
|
|
/*
|
||
|
|
jQWidgets v3.9.0 (2015-Oct)
|
||
|
|
Copyright (c) 2011-2015 jQWidgets.
|
||
|
|
License: http://jqwidgets.com/license/
|
||
|
|
*/
|
||
|
|
|
||
|
|
(function(a){a.jqx.jqxWidget("jqxComboBox","",{});a.extend(a.jqx._jqxComboBox.prototype,{defineInstance:function(){var b={disabled:false,width:200,height:25,items:new Array(),selectedIndex:-1,selectedItems:new Array(),_selectedItems:new Array(),source:null,scrollBarSize:a.jqx.utilities.scrollBarSize,arrowSize:18,enableHover:true,enableSelection:true,visualItems:new Array(),groups:new Array(),equalItemsWidth:true,itemHeight:-1,visibleItems:new Array(),emptyGroupText:"Group",emptyString:"",openDelay:250,closeDelay:300,animationType:"default",dropDownWidth:"auto",dropDownHeight:"200px",autoDropDownHeight:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",searchMode:"startswithignorecase",autoComplete:false,remoteAutoComplete:false,remoteAutoCompleteDelay:500,selectionMode:"default",minLength:2,displayMember:"",valueMember:"",groupMember:"",searchMember:"",keyboardSelection:true,renderer:null,autoOpen:false,checkboxes:false,promptText:"",placeHolder:"",rtl:false,listBox:null,validateSelection:null,showCloseButtons:true,renderSelectedItem:null,search:null,popupZIndex:100000,searchString:null,multiSelect:false,showArrow:true,_disabledItems:new Array(),touchMode:"auto",autoBind:true,aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["open","close","select","unselect","change","checkChange","bindingComplete"]};a.extend(true,this,b);return b},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(){var n=this;var p=n.element.nodeName.toLowerCase();if(p=="select"||p=="ul"||p=="ol"){n.field=n.element;if(n.field.className){n._className=n.field.className}var m={title:n.field.title};if(n.field.id.length){m.id=n.field.id.replace(/[^\w]/g,"_")+"_jqxComboBox"}else{m.id=a.jqx.utilities.createId()+"_jqxComboBox"}var c=a("<div></div>",m);if(!n.width){n.width=a(n.field).width()}if(!n.height){n.height=a(n.field).outerHeight()}a(n.field).hide().after(c);var k=n.host.data();n.host=c;n.host.data(k);n.element=c[0];n.element.id=n.field.id;n.field.id=m.id;if(n._className){n.host.addClass(n._className);a(n.field).removeClass(n._className)}if(n.field.tabIndex){var f=n.field.tabIndex;n.field.tabIndex=-1;n.element.tabIndex=f}var s=a.jqx.parseSourceTag(n.field);n.source=s.items;if(n.selectedIndex==-1){n.selectedIndex=s.index}}n.removeHandlers();n.isanimating=false;n.id=a.jqx.utilities.createId();n.element.innerHTML="";var g=a("<div style='background-color: transparent; -webkit-appearance: none; outline: none; width:100%; height: 100%; padding: 0px; margin: 0px; border: 0px; position: relative;'><div id='dropdownlistWrapper' style='padding: 0; margin: 0; border: none; background-color: transparent; float: left; width:100%; height: 100%; position: relative;'><div id='dropdownlistContent' style='padding: 0; margin: 0; border-top: none; border-bottom: none; float: left; position: absolute;'/><div id='dropdownlistArrow' role='button' style='padding: 0; margin: 0; border-left-width: 1px; border-bottom-width: 0px; border-top-width: 0px; border-right-width: 0px; float: right; position: absolute;'/></div></div>");n.comboStructure=g;if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw"jqxComboBox: Missing reference to jqxlistbox.js."}n.touch=a.jqx.mobile.isTouchDevice();if(n.touchMode===true){n.touch=true}n.host.append(g);n.dropdownlistWrapper=n.host.find("#dropdownlistWrapper");n.dropdownlistArrow=n.host.find("#dropdownlistArrow");n.dropdownlistContent=n.host.find("#dropdownlistContent");n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content"));n.dropdownlistContent.addClass(n.toThemeProperty("jqx-widget-content"));n.dropdownlistWrapper[0].id="dropdownlistWrapper"+n.element.id;n.dropdownlistArrow[0].id="dropdownlistArrow"+n.element.id;n.dropdownlistContent[0].id="dropdownlistContent"+n.element.id;n.dropdownlist
|