7 lines
37 KiB
JavaScript
7 lines
37 KiB
JavaScript
|
|
/*
|
||
|
|
jQWidgets v3.9.0 (2015-Oct)
|
||
|
|
Copyright (c) 2011-2015 jQWidgets.
|
||
|
|
License: http://jqwidgets.com/license/
|
||
|
|
*/
|
||
|
|
|
||
|
|
(function(a){a.jqx.jqxWidget("jqxDropDownList","",{});a.extend(a.jqx._jqxDropDownList.prototype,{defineInstance:function(){var b={disabled:false,width:null,height:null,items:new Array(),selectedIndex:-1,source:null,scrollBarSize:15,arrowSize:19,enableHover:true,enableSelection:true,visualItems:new Array(),groups:new Array(),equalItemsWidth:true,itemHeight:-1,visibleItems:new Array(),emptyGroupText:"Group",checkboxes:false,openDelay:250,closeDelay:300,animationType:"default",autoOpen:false,dropDownWidth:"auto",dropDownHeight:"200px",autoDropDownHeight:false,keyboardSelection:true,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",displayMember:"",valueMember:"",groupMember:"",searchMember:"",searchMode:"startswithignorecase",incrementalSearch:true,incrementalSearchDelay:700,renderer:null,placeHolder:"Please Choose:",promptText:"Please Choose:",emptyString:"",rtl:false,selectionRenderer:null,listBox:null,popupZIndex:9999999999999,renderMode:"default",touchMode:"auto",_checkForHiddenParent:true,autoBind:true,focusable:true,filterable:false,filterHeight:27,filterPlaceHolder:"Looking for",filterDelay:100,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){this.render()},render:function(){var q=this;if(!q.width){q.width=200}if(!q.height){q.height=25}var o=q.element.nodeName.toLowerCase();if(o=="select"||o=="ul"||o=="ol"){q.field=q.element;if(q.field.className){q._className=q.field.className}var k={title:q.field.title};if(q.field.id.length){k.id=q.field.id.replace(/[^\w]/g,"_")+"_jqxDropDownList"}else{k.id=a.jqx.utilities.createId()+"_jqxDropDownList"}var c=a("<div></div>",k);if(!q.width){q.width=a(q.field).width()}if(!q.height){q.height=a(q.field).outerHeight()}a(q.field).hide().after(c);var i=q.host.data();q.host=c;q.host.data(i);q.element=c[0];q.element.id=q.field.id;q.field.id=k.id;if(q._className){q.host.addClass(q._className);a(q.field).removeClass(q._className)}if(q.field.tabIndex){var f=q.field.tabIndex;q.field.tabIndex=-1;q.element.tabIndex=f}var r=a.jqx.parseSourceTag(q.field);q.source=r.items;if(q.selectedIndex==-1){q.selectedIndex=r.index}}q.element.innerHTML="";q.isanimating=false;q.id=q.element.id||a.jqx.utilities.createId();q.host.attr("role","combobox");a.jqx.aria(q,"aria-autocomplete","both");a.jqx.aria(q,"aria-readonly",false);var g="<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='overflow: hidden; outline: none; background-color: transparent; border: none; float: left; width:100%; height: 100%; position: relative;'><div id='dropdownlistContent' unselectable='on' style='outline: none; background-color: transparent; border: none; float: left; position: relative;'></div><div id='dropdownlistArrow' unselectable='on' style='background-color: transparent; border: none; float: right; position: relative;'><div unselectable='on'></div></div></div></div>";if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw new Error("jqxDropDownList: Missing reference to jqxlistbox.js.")}if(q.host.attr("tabindex")){q.host.attr("tabindex",q.host.attr("tabindex"));q.host.removeAttr("tabindex")}else{q.host.attr("tabindex",0)}var l=q;q.touch=a.jqx.mobile.isTouchDevice();q.comboStructure=g;q.element.innerHTML=g;q.dropdownlistWrapper=a(q.element.firstChild.firstChild);q.dropdownlistArrow=a(q.dropdownlistWrapper[0].firstChild.nextSibling);q.arrow=a(q.dropdownlistArrow[0].firstChild);q.dropdownlistContent=a(q.dropdownlistWrapper[0].firstChild);q.dropdownlistContent.addClass(q.toThemeProperty("jqx-dropdownlist-content jqx-disableselect"));if(q.rtl){q.dropdownlistContent.addClass(q.toThemeProperty("jqx-rtl jqx-dropdownlist-content-rtl"))}q.addHandler(q.dropdownlistWrapper,"selectstart",function(){return false});q.dropdownlistWrapper[0].id="dropdownlistWrapper"+q.element.id;q.dropdownlistArrow[0].id="dropdownlis
|