130 lines
578 KiB
JavaScript
130 lines
578 KiB
JavaScript
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx=a.jqx||{};a.jqx.define=function(b,c,d){b[c]=function(){if(this.baseType){this.base=new b[this.baseType]();this.base.defineInstance()}this.defineInstance()};b[c].prototype.defineInstance=function(){};b[c].prototype.base=null;b[c].prototype.baseType=undefined;if(d&&b[d]){b[c].prototype.baseType=d}};a.jqx.invoke=function(e,d){if(d.length==0){return}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):a({}).toArray();while(e[f]==undefined&&e.base!=null){e=e.base}if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();return e[b].apply(e,c)}return};a.jqx.hasProperty=function(c,b){if(typeof(b)=="object"){for(var e in b){var d=c;while(d){if(d.hasOwnProperty(e)){return true}d=d.base}return false}}else{while(c){if(c.hasOwnProperty(b)){return true}c=c.base}}return false};a.jqx.hasFunction=function(e,d){if(d.length==0){return false}if(e==undefined){return false}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):{};while(e[f]==undefined&&e.base!=null){e=e.base}if(e[f]&&a.isFunction(e[f])){return true}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]&&a.isFunction(e[b])){return true}}return false};a.jqx.isPropertySetter=function(c,b){if(b.length==1&&typeof(b[0])=="object"){return true}if(b.length==2&&typeof(b[0])=="string"&&!a.jqx.hasFunction(c,b)){return true}return false};a.jqx.validatePropertySetter=function(e,c,b){if(!a.jqx.propertySetterValidation){return true}if(c.length==1&&typeof(c[0])=="object"){for(var d in c[0]){var f=e;while(!f.hasOwnProperty(d)&&f.base){f=f.base}if(!f||!f.hasOwnProperty(d)){if(!b){throw"Invalid property: "+d}return false}}return true}if(c.length!=2){if(!b){throw"Invalid property: "+c.length>=0?c[0]:""}return false}while(!e.hasOwnProperty(c[0])&&e.base){e=e.base}if(!e||!e.hasOwnProperty(c[0])){if(!b){throw"Invalid property: "+c[0]}return false}return true};a.jqx.set=function(c,b){if(b.length==1&&typeof(b[0])=="object"){a.each(b[0],function(d,e){var f=c;while(!f.hasOwnProperty(d)&&f.base!=null){f=f.base}if(f.hasOwnProperty(d)){a.jqx.setvalueraiseevent(f,d,e)}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+d+"'"}}})}else{if(b.length==2){while(!c.hasOwnProperty(b[0])&&c.base){c=c.base}if(c.hasOwnProperty(b[0])){a.jqx.setvalueraiseevent(c,b[0],b[1])}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+b[0]+"'"}}}}};a.jqx.setvalueraiseevent=function(c,d,e){var b=c[d];c[d]=e;if(!c.isInitialized){return}if(c.propertyChangedHandler!=undefined){c.propertyChangedHandler(c,d,b,e)}if(c.propertyChangeMap!=undefined&&c.propertyChangeMap[d]!=undefined){c.propertyChangeMap[d](c,d,b,e)}};a.jqx.get=function(e,d){if(d==undefined||d==null){return undefined}if(e.propertyMap){var c=e.propertyMap(d);if(c!=null){return c}}if(e.hasOwnProperty(d)){return e[d]}var b=undefined;if(typeof(d)==Array){if(d.length!=1){return undefined}b=d[0]}else{if(typeof(d)=="string"){b=d}}while(!e.hasOwnProperty(b)&&e.base){e=e.base}if(e){return e[b]}return undefined};a.jqx.serialize=function(e){var b="";if(a.isArray(e)){b="[";for(var d=0;d<e.length;d++){if(d>0){b+=", "}b+=a.jqx.serialize(e[d])}b+="]"}else{if(typeof(e)=="object"){b="{";var c=0;for(var d in e){if(c++>0){b+=", "}b+=d+": "+a.jqx.serialize(e[d])}b+="}"}else{b=e.toString()}}return b};a.jqx.propertySetterValidation=true;a.jqx.jqxWidgetProxy=function(g,c,b){var d=a(c);var f=a.data(c,g);if(f==undefined){return undefined}var e=f.instance;if(a.jqx.hasFunction(e,b)){return a.jqx.invoke(e,b)}if(a.jqx.isPropertySetter(e,b)){if(a.jqx.validatePropertySetter(e,b)){a.jqx.set(e,b);return undefined}}else{if(typeof(b)=="object"&&b.length==0){return}else{if(typeof(b)=="object"&&b.length==1&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b[0])}else{if(typeof(b)=="string"&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b)}}}}throw"jqxCore: Invalid parameter '"+a.jqx.serialize(b)+"' does not exist.";return undefined};a.jqx.jqxWidget=function(b,d,k){var c=false;try{jqxArgs=Arra
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.dataAdapter=function(e,b){this._source=e;this._options=b||{};this.records=new Array();this._downloadComplete=new Array();this._bindingUpdate=new Array();if(e!=undefined&&e.localdata!=null&&typeof e.localdata=="function"){var d=e.localdata();if(d!=null){e._localdata=e.localdata;var c=this;if(e._localdata.subscribe){c._oldlocaldata=[];e._localdata.subscribe(function(f){var g=function(h){if(jQuery.isArray(h)){return jQuery.makeArray(g(a(h)))}return jQuery.extend(true,{},h)};c._oldlocaldata=g(f)},e._localdata,"beforeChange");e._localdata.subscribe(function(g){if(c.suspendKO==false||c.suspendKO==undefined){var f="";c._oldrecords=c.records;if(c._oldlocaldata.length==0){e.localdata=e._localdata()}if(c._oldlocaldata.length==0){f="change"}else{if(c._oldlocaldata.length==g.length){f="update"}if(c._oldlocaldata.length>g.length){f="remove"}if(c._oldlocaldata.length<g.length){f="add"}}c.dataBind(null,f)}},e._localdata,"change");c._knockoutdatasource=true}e.localdata=d}}if(this._options.autoBind==true){this.dataBind()}};a.jqx.dataAdapter.prototype={getrecords:function(){return this.records},beginUpdate:function(){this.isUpdating=true},endUpdate:function(b){this.isUpdating=false;if(b!=false){this.dataBind(null,"")}},formatDate:function(c,e,d){var b=a.jqx.dataFormat.formatdate(c,e,d);return b},formatNumber:function(c,e,d){var b=a.jqx.dataFormat.formatnumber(c,e,d);return b},dataBind:function(n,s){if(this.isUpdating==true){return}var p=this._source;if(!p){return}if(p.dataFields!=null){p.datafields=p.dataFields}if(p.recordstartindex==undefined){p.recordstartindex=0}if(p.recordendindex==undefined){p.recordendindex=0}if(p.loadallrecords==undefined){p.loadallrecords=true}if(p.sort!=undefined){this.sort=p.sort}if(p.filter!=undefined){this.filter=p.filter}else{this.filter=null}if(p.sortcolumn!=undefined){this.sortcolumn=p.sortcolumn}if(p.sortdirection!=undefined){this.sortdirection=p.sortdirection}if(p.sortcomparer!=undefined){this.sortcomparer=p.sortcomparer}this.records=new Array();var f=this._options||{};this.virtualmode=f.virtualmode!=undefined?f.virtualmode:false;this.totalrecords=f.totalrecords!=undefined?f.totalrecords:0;this.pageable=f.pageable!=undefined?f.pageable:false;this.pagesize=f.pagesize!=undefined?f.pagesize:0;this.pagenum=f.pagenum!=undefined?f.pagenum:0;this.cachedrecords=f.cachedrecords!=undefined?f.cachedrecords:new Array();this.originaldata=new Array();this.recordids=new Array();this.updaterow=f.updaterow!=undefined?f.updaterow:null;this.addrow=f.addrow!=undefined?f.addrow:null;this.deleterow=f.deleterow!=undefined?f.deleterow:null;this.cache=f.cache!=undefined?f.cache:false;this.unboundmode=false;if(p.formatdata!=undefined){f.formatData=p.formatdata}if(p.data!=undefined){if(f.data==undefined){f.data={}}a.extend(f.data,p.data)}if(p.mapchar!=undefined){this.mapChar=p.mapchar?p.mapchar:">"}else{this.mapChar=f.mapChar?f.mapChar:">"}if(f.unboundmode||p.unboundmode){this.unboundmode=f.unboundmode||p.unboundmode}if(p.cache!=undefined){this.cache=p.cache}if(this.koSubscriptions){for(var u=0;u<this.koSubscriptions.length;u++){this.koSubscriptions[u].dispose()}}this.koSubscriptions=new Array();if(this.pagenum<0){this.pagenum=0}var z=this;var m=p.datatype;if(p.datatype==="csv"||p.datatype==="tab"||p.datatype=="text"){m="text"}var h=f.async!=undefined?f.async:true;if(p.async!=undefined){h=p.async}switch(m){case"local":case"array":case"observablearray":default:if(p.localdata==undefined&&p.length){p.localdata=new Array();for(var r=0;r<p.length;r++){p.localdata[p.localdata.length]=p[r]}}var g=p.localdata.length;this.totalrecords=this.virtualmode?(p.totalrecords||g):g;if(this.unboundmode){this.totalrecords=this.unboundmode?(p.totalrecords||g):g;var v=p.datafields?p.datafields.length:0;if(v>0){for(var r=0;r<this.totalrecords;r++){var d={};for(var q=0;q<v;q++){d[p.datafields[q].name]=""}p.localdata[p.localdata.length]=d}}}if(this.totalrecords==undefined){this.totalrecords=0}var v=p.datafields?p.datafields.length:0;var c=function(E,G){var F={};for(var C=0;C<G;C++){var B=p.datafields[C];var H="";if(undefined==B||B==null
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.cssroundedcorners=function(b){var c={all:"jqx-rc-all",top:"jqx-rc-t",bottom:"jqx-rc-b",left:"jqx-rc-l",right:"jqx-rc-r","top-right":"jqx-rc-tr","top-left":"jqx-rc-tl","bottom-right":"jqx-rc-br","bottom-left":"jqx-rc-br"};for(prop in c){if(!c.hasOwnProperty(prop)){continue}if(b==prop){return c[prop]}}};a.jqx.jqxWidget("jqxButton","",{});a.extend(a.jqx._jqxButton.prototype,{defineInstance:function(){this.cursor="arrow";this.roundedCorners="all";this.disabled=false;this.height=null;this.width=null;this.overrideTheme=false;this.enableHover=true;this.rtl=false},createInstance:function(d){var b=this;this._setSize();if(!this.overrideTheme){this.host.addClass(this.toThemeProperty(a.jqx.cssroundedcorners(this.roundedCorners)));this.host.addClass(this.toThemeProperty("jqx-button"));this.host.addClass(this.toThemeProperty("jqx-widget"))}this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(this.cursor!="arrow"){this.host.css({cursor:this.cursor})}if(!this.isTouchDevice){this.addHandler(this.host,"mouseenter",function(g){if(!b.disabled&&b.enableHover){b.isMouseOver=true;b.refresh()}});this.addHandler(this.host,"mouseleave",function(g){if(!b.disabled&&b.enableHover){b.isMouseOver=false;b.refresh()}})}this.addHandler(this.host,"mousedown",function(g){if(!b.disabled){b.isPressed=true;b.refresh()}});this.addHandler(this.host,"focus",function(g){if(!b.disabled){b.isFocused=true;b.refresh()}});this.addHandler(this.host,"blur",function(g){if(!b.disabled){b.isFocused=false;b.refresh()}});this.mouseupfunc=function(g){if(!b.disabled){b.isPressed=false;b.refresh()}};this.addHandler(a(document),"mouseup.button"+this.element.id,this.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){var e=function(g){b.isPressed=false;b.refresh()};if(window.top.document){this.addHandler(a(window.top.document),"mouseup",e)}}}}}catch(c){}this.propertyChangeMap.roundedCorners=function(g,i,h,j){g.refresh()};this.propertyChangeMap.width=function(g,i,h,j){g._setSize();g.refresh()};this.propertyChangeMap.height=function(g,i,h,j){g._setSize();g.refresh()};this.propertyChangeMap.disabled=function(g,i,h,j){if(h!=j){b.host[0].disabled=j;g.refresh()}};this.propertyChangeMap.rtl=function(g,i,h,j){if(h!=j){g.refresh()}};this.propertyChangeMap.theme=function(g,i,h,j){g.host.removeClass();g.host.addClass(g.toThemeProperty("jqx-button"));g.host.addClass(g.toThemeProperty("jqx-widget"));if(!g.overrideTheme){g.host.addClass(g.toThemeProperty(a.jqx.cssroundedcorners(g.roundedCorners)))}g._oldCSSCurrent=null;g.refresh()}},val:function(){var b=this.host.find("input");if(b.length>0){if(arguments.length==0||typeof(value)=="object"){return b.val()}b.val(value);this.refresh();return b.val()}if(arguments.length==0||typeof(value)=="object"){return this.element.value}this.element.value=arguments[0];this.refresh()},_setSize:function(){if(this.width!=null&&(this.width.toString().indexOf("px")!=-1||this.width.toString().indexOf("%")!=-1)){this.host.css("width",this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.css("width",this.width)}}if(this.height!=null&&(this.height.toString().indexOf("px")!=-1||this.height.toString().indexOf("%")!=-1)){this.host.css("height",this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.css("height",this.height)}}},_removeHandlers:function(){this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"click");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"mousedown");this.removeHandler(a(document),"mouseup.button"+this.element.id,this.mouseupfunc);this.mouseupfunc=null},focus:function(){this.host.focus()},destroy:function(){this._removeHandlers();this.host.removeClass();this.host.removeData();this.host.remove()},refresh:function(){if(this.overrideTheme){return}var d=this.toThemeProperty(
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.jqxWidget("jqxDropDownList","",{});a.extend(a.jqx._jqxDropDownList.prototype,{defineInstance:function(){this.disabled=false;this.width=null;this.height=null;this.items=new Array();this.selectedIndex=-1;this.source=null;this.scrollBarSize=15;this.arrowSize=19;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.checkboxes=false;if(this.openDelay==undefined){this.openDelay=350}if(this.closeDelay==undefined){this.closeDelay=400}this.animationType="default";this.autoOpen=false;this.dropDownWidth="auto";this.dropDownHeight="200px";this.autoDropDownHeight=false;this.keyboardSelection=true;this.enableBrowserBoundsDetection=false;this.dropDownHorizontalAlignment="left";this.displayMember="";this.valueMember="";this.searchMode="startswithignorecase";this.incrementalSearch=true;this.incrementalSearchDelay=700;this.renderer=null;this.promptText="Please Choose:";this.emptyString="";this.rtl=false;this.selectionRenderer=null;this.listBox=null;this.popupZIndex=9999999999999;this.events=["open","close","select","unselect","change","checkChange","bindingComplete"]},createInstance:function(b){this.render()},render:function(){this.element.innerHTML="";this.isanimating=false;this.id=this.element.id||a.jqx.utilities.createId();var d=a("<div tabIndex=0 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='outline: none; background-color: transparent; border: none; float: left; width:100%; height: 100%; position: relative;'><div id='dropdownlistContent' style='outline: none; background-color: transparent; border: none; float: left; position: relative;'/><div id='dropdownlistArrow' style='background-color: transparent; border: none; float: right; position: relative;'><div></div></div></div></div>");this._addInput();if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw new Error("jqxDropDownList: Missing reference to jqxlistbox.js.")}var h=this;this.touch=a.jqx.mobile.isTouchDevice();this.comboStructure=d;this.host.append(d);this.dropdownlistWrapper=this.host.find("#dropdownlistWrapper");this.dropdownlistArrow=this.host.find("#dropdownlistArrow");this.arrow=a(this.dropdownlistArrow.children()[0]);this.dropdownlistContent=this.host.find("#dropdownlistContent");this.dropdownlistContent.addClass(this.toThemeProperty("jqx-dropdownlist-content"));this.dropdownlistWrapper.addClass(this.toThemeProperty("jqx-disableselect"));if(this.rtl){this.dropdownlistContent.addClass(this.toThemeProperty("jqx-rtl"));this.dropdownlistContent.addClass(this.toThemeProperty("jqx-dropdownlist-content-rtl"))}this.addHandler(this.dropdownlistWrapper,"selectstart",function(){return false});this.dropdownlistWrapper[0].id="dropdownlistWrapper"+this.element.id;this.dropdownlistArrow[0].id="dropdownlistArrow"+this.element.id;this.dropdownlistContent[0].id="dropdownlistContent"+this.element.id;var j=this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content")+" "+this.toThemeProperty("jqx-dropdownlist-state-normal")+" "+this.toThemeProperty("jqx-rc-all")+" "+this.toThemeProperty("jqx-fill-state-normal");this.element.className+=" "+j;this._firstDiv=this.host.find("div:first");try{var k="listBox"+this.id;var f=a(a.find("#"+k));if(f.length>0){f.remove()}var b=a("<div style='overflow: hidden; background-color: transparent; border: none; position: absolute;' id='listBox"+this.id+"'><div id='innerListBox"+this.id+"'></div></div>");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(c==null){c=this.host.width();if(c==0){c=this.dropDownWidth}}if(this.dropDownHeight==null){this.dropDownHeight=200}var h=this;this.container.width(parseInt(c)+25);this.container.height(parseInt(this.dropDownHeight)+25);this.addHand
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.jqxWidget("myWidget","",{});a.extend(a.jqx._myWidget.prototype,{var1:5,var2:10,foo:function(b){this.var1*=b},bar:function(){alert(this.var1)},createInstance:function(b){}});a.jqx.jqxWidget("jqxScrollBar","",{});a.extend(a.jqx._jqxScrollBar.prototype,{defineInstance:function(){this.height=null;this.width=null;this.vertical=false;this.min=0;this.max=1000;this.value=this.min;this.step=10;this.largestep=50;this.thumbMinSize=10;this.thumbSize=0;this.thumbStep="auto";this.roundedCorners="all";this.showButtons=true;this.disabled=false;this.touchMode="auto";this.touchModeStyle="auto";this.thumbTouchSize=8;this._triggervaluechanged=true;this.rtl=false;this.areaDownCapture=false;this.areaUpCapture=false;this._initialLayout=false},createInstance:function(b){this.render()},render:function(){this._mouseup=new Date();var b=this;var c="<div id='jqxScrollOuterWrap' style='width:100%; height: 100%; align:left; border: 0px; valign:top; position: relative;'><div id='jqxScrollWrap' style='width:100%; height: 100%; left: 0px; top: 0px; align:left; valign:top; position: absolute;'><div id='jqxScrollBtnUp' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollAreaUp' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollThumb' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollAreaDown' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollBtnDown' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div></div></div>";if(b.WinJS){MSApp.execUnsafeLocalFunction(function(){WinJS.Utilities.setInnerHTMLUnsafe(this.element,c)})}else{this.element.innerHTML=c}if(this.width!=undefined&&parseInt(this.width)>0){this.host.width(parseInt(this.width))}if(this.height!=undefined&&parseInt(this.height)>0){this.host.height(parseInt(this.height))}this.thumbCapture=false;this.btnUp=this.host.find("#jqxScrollBtnUp");this.btnDown=this.host.find("#jqxScrollBtnDown");this.btnThumb=this.host.find("#jqxScrollThumb");this.areaUp=this.host.find("#jqxScrollAreaUp");this.arrowUp=a("<div></div>");this.arrowUp.appendTo(this.btnUp);this.arrowDown=a("<div></div>");this.arrowDown.appendTo(this.btnDown);this.areaDown=this.host.find("#jqxScrollAreaDown");this.scrollWrap=this.host.find("#jqxScrollWrap");this.scrollOuterWrap=this.host.find("#jqxScrollOuterWrap");this.btnUp[0].id="jqxScrollBtnUp"+this.element.id;this.btnDown[0].id="jqxScrollBtnDown"+this.element.id;this.btnThumb[0].id="jqxScrollThumb"+this.element.id;this.areaUp[0].id="jqxScrollAreaUp"+this.element.id;this.areaDown[0].id="jqxScrollAreaDown"+this.element.id;this.scrollWrap[0].id="jqxScrollWrap"+this.element.id;this.scrollOuterWrap[0].id="jqxScrollOuterWrap"+this.element.id;if(!this.host.jqxRepeatButton){throw new Error("jqxScrollBar: Missing reference to jqxbuttons.js.");return}this.btnUp.jqxRepeatButton({overrideTheme:true,disabled:this.disabled});this.btnDown.jqxRepeatButton({overrideTheme:true,disabled:this.disabled});this.btnDownInstance=a.data(this.btnDown[0],"jqxRepeatButton").instance;this.btnUpInstance=a.data(this.btnUp[0],"jqxRepeatButton").instance;this.areaUp.jqxRepeatButton({overrideTheme:true});this.areaDown.jqxRepeatButton({overrideTheme:true});this.btnThumb.jqxButton({overrideTheme:true,disabled:this.disabled});this.propertyChangeMap.value=function(d,f,e,g){if(!(isNaN(g))){if(e!=g){d.setPosition(parseFloat(g),true)}}};this.propertyChangeMap.width=function(d,f,e,g){if(d.width!=undefined&&parseInt(d.width)>0){d.host.width(parseInt(d.width));d._arrange()}};this.propertyChangeMap.height=function(d,f,e,g){if(d.height!=undefined&&parseInt(d.height)>0){d.host.height(parseInt(d.height));d._arrange()}};this.propertyChangeMap.theme=function(d,f,e,g){d.setTheme()};this.propertyChangeMap.max=function(d,f,e,g){if(!(isNaN(g))){if(e!=g){d.max=parseInt(g);if(d.min>d.max){d.max=d.min+1}d._arrange();d.setPosition(d.value)}}};this.propertyChangeMap.min=function(d,f,e,g){if(!(isNaN(g))){if(e!=g){d.min=parseIn
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.jqxWidget("jqxMenu","",{});a.extend(a.jqx._jqxMenu.prototype,{defineInstance:function(){this.items=new Array();this.mode="horizontal";this.width=null;this.height=null;this.easing="easeInOutSine";this.animationShowDuration=200;this.animationHideDuration=200;this.autoCloseInterval=0;this.animationHideDelay=100;this.animationShowDelay=100;this.menuElements=new Array();this.autoSizeMainItems=false;this.autoCloseOnClick=true;this.autoCloseOnMouseLeave=true;this.enableRoundedCorners=true;this.disabled=false;this.autoOpenPopup=true;this.enableHover=true;this.autoOpen=true;this.autoGenerate=true;this.clickToOpen=false;this.showTopLevelArrows=false;this.touchMode="auto";this.source=null;this.popupZIndex=20000;this.rtl=false;this.events=["shown","closed","itemclick","initialized"]},createInstance:function(d){var c=this;this.host.css("display","block");this.propertyChangeMap.disabled=function(h,k,j,l){if(c.disabled){c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"));c.host.addClass(c.toThemeProperty("jqx-menu-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"));c.host.removeClass(c.toThemeProperty("jqx-menu-disabled"))}};this.setSize();var b=false;var f=this;if(f.width!=null&&f.width.toString().indexOf("%")!=-1){b=true}if(f.height!=null&&f.height.toString().indexOf("%")!=-1){b=true}this.addHandler(a(window),"resize.menu"+this.element.id,function(){if(b){if(f.refreshTimer){clearTimeout(f.refreshTimer)}f.refreshTimer=setTimeout(function(){f.refresh()},1)}});if(b){setInterval(function(){var j=f.host.width();var h=f.host.height();if(f._lastWidth!=j||f._lastHeight!=h){f.refresh()}f._lastWidth=j;f._lastHeight=h},100)}if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-menu-disabled"))}this.host.attr("tabIndex",1);this.host.css("outline","none");if(this.source){if(this.source!=null){var e=this.loadItems(this.source);this.element.innerHTML=e}}if(this.element.innerHTML.indexOf("UL")){var g=this.host.find("ul:first");if(g.length>0){this._createMenu(g[0])}}this.host.data("autoclose",{});this._render();var f=this;if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.host.attr("hideFocus",true)}},focus:function(){try{this.host.focus()}catch(b){}},loadItems:function(c,e){if(c==null){return}if(c.length==0){return""}var b=this;this.items=new Array();var d="<ul>";if(e){d='<ul style="width:'+e+';">'}a.map(c,function(f){if(f==undefined){return null}d+=b._parseItem(f)});d+="</ul>";return d},_parseItem:function(f){var c="";if(f==undefined){return null}var b=f.label;if(!f.label&&f.html){b=f.html}if(!b){b="Item"}if(typeof f==="string"){b=f}var e=false;if(f.selected!=undefined&&f.selected){e=true}var d=false;if(f.disabled!=undefined&&f.disabled){d=true}c+="<li";if(d){c+=' item-disabled="true" '}if(f.label&&!f.html){c+=' item-label="'+b+'" '}if(f.value!=null){c+=' item-value="'+f.value+'" '}if(f.id!=undefined){c+=' id="'+f.id+'" '}c+=">"+b;if(f.items){if(f.subMenuWidth){c+=this.loadItems(f.items,f.subMenuWidth)}else{c+=this.loadItems(f.items)}}c+="</li>";return c},setSize:function(){if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}}},isTouchDevice:function(){if(this._isTouchDevice!=undefined){return this._isTouchDevice}var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b){this.host.addClass(this.toThemeProperty("jqx-touch"));a(".jqx-menu-item").addClass(this.toThemeProperty("jqx-touch"))}this._isTouchDevice=b;return b},refresh:function(b){if(!b){this.setSize()}},_closeAll:function
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.jqxWidget("jqxListBox","",{});a.extend(a.jqx._jqxListBox.prototype,{defineInstance:function(){this.disabled=false;this.width=null;this.height=null;this.items=new Array();this.multiple=false;this.selectedIndex=-1;this.selectedIndexes=new Array();this.source=null;this.scrollBarSize=15;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.checkboxes=false;this.hasThreeStates=false;this.autoHeight=false;this.autoItemsHeight=false;this.roundedcorners=true;this.touchMode="auto";this.displayMember="";this.valueMember="";this.searchMode="startswithignorecase";this.incrementalSearch=true;this.incrementalSearchDelay=700;this.allowDrag=false;this.allowDrop=true;this.dropAction="default";this.touchModeStyle="auto";this.keyboardNavigation=true;this.enableMouseWheel=true;this.multipleextended=false;this.emptyString="null";this.rtl=false;this.rendered=null;this.renderer=null;this.dragStart=null;this.dragEnd=null;this._checkForHiddenParent=true;this.events=["select","unselect","change","checkChange","dragStart","dragEnd","bindingComplete"]},createInstance:function(b){this.render();if(this._checkForHiddenParent){if(a.jqx.isHidden(this.host)){var c=this;this._hiddenParentTimer=setInterval(function(){try{if(!a.jqx.isHidden(c.host)){clearInterval(c._hiddenParentTimer);c._updateSize()}}catch(d){}},10)}}},render:function(){this.element.innerHTML="";var b=this;this.host.addClass(this.toThemeProperty("jqx-listbox"));this.host.addClass(this.toThemeProperty("jqx-reset"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width);g=true}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height);if(this.host.height()==0){this.host.height(200)}g=true}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}var c=a("<div style='-webkit-appearance: none; background: transparent; outline: none; width:100%; height: 100%; align:left; border: 0px; padding: 0px; margin: 0px; left: 0px; top: 0px; valign:top; position: relative;'><div style='-webkit-appearance: none; border: none; background: transparent; outline: none; width:100%; height: 100%; padding: 0px; margin: 0px; align:left; left: 0px; top: 0px; valign:top; position: relative;'><div id='listBoxContent' style='-webkit-appearance: none; border: none; background: transparent; outline: none; border: none; padding: 0px; overflow: hidden; margin: 0px; align:left; valign:top; left: 0px; top: 0px; position: absolute;'/><div id='verticalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'/><div id='horizontalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'/><div id='bottomRight' style='align:left; valign:top; left: 0px; top: 0px; border: none; position: absolute;'/></div></div>");this._addInput();if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",1)}if(this.checkboxes&&!this.host.jqxCheckBox){throw new Error("jqxListBox: Missing reference to jqxcheckbox.js.")}this.host.append(c);var e=this.host.find("#verticalScrollBar"+this.element.id);if(!this.host.jqxButton){throw new Error("jqxListBox: Missing reference to jqxbuttons.js.");return}if(!e.jqxScrollBar){throw new Error("jqxListBox: Missing reference to jqxscrollbar.js.");return}var f=parseInt(this.host.height())/2;if(f==0){f=10}this.vScrollBar=e.jqxScrollBar({_initialLayout:true,vertical:true,rtl:this.rtl,theme:this.theme,touchMode:this.touchMode,l
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function (b) { b.jqx.jqxWidget("jqxGrid", "", {}); b.extend(b.jqx._jqxGrid.prototype, { defineInstance: function () { this.disabled = false; this.width = 600; this.height = 400; this.pagerheight = 28; this.groupsheaderheight = 34; this.pagesize = 10; this.pagesizeoptions = ["5", "10", "20"]; this.rowsheight = 25; this.columnsheight = 25; this.filterrowheight = 30; this.groupindentwidth = 30; this.rowdetails = false; this.enablerowdetailsindent = true; this.enablemousewheel = true; this.initrowdetails = null; this.layoutrowdetails = null; this.editable = false; this.editmode = "selectedcell"; this.pageable = false; this.groupable = false; this.sortable = false; this.filterable = false; this.autoshowfiltericon = true; this.showfiltercolumnbackground = true; this.showpinnedcolumnbackground = true; this.showsortcolumnbackground = true; this.altrows = false; this.altstart = 1; this.altstep = 1; this.showrowdetailscolumn = true; this.showtoolbar = false; this.toolbarheight = 34; this.showstatusbar = false; this.statusbarheight = 34; this.enableellipsis = true; this.groups = []; this.groupsrenderer = null; this.groupcolumnrenderer = null; this.groupsexpandedbydefault = false; this.pagerrenderer = null; this.touchmode = "auto"; this.columns = []; this.selectedrowindex = -1; this.selectedrowindexes = new Array(); this.selectedcells = new Array(); this.selectedcell = null; this.tableZIndex = 799; this.headerZIndex = 499; this.updatefilterconditions = null; this.showaggregates = false; this.showfilterrow = false; this.autorowheight = false; this.autokoupdates = true; this.handlekeyboardnavigation = null; this.showsortmenuitems = true; this.showfiltermenuitems = true; this.showgroupmenuitems = true; this.enablebrowserselection = false; this.clipboard = true; this.ready = null; this.updatefilterpanel = null; this.autogeneratecolumns = false; this.rowdetailstemplate = null; this.scrollfeedback = null; this.rendertoolbar = null; this.renderstatusbar = null; this.rendered = null; this.source = { beforeprocessing: null, beforesend: null, loaderror: null, localdata: null, data: null, datatype: "array", datafields: [], url: "", root: "", record: "", id: "", totalrecords: 0, recordstartindex: 0, recordendindex: 0, loadallrecords: true, sortcolumn: null, sortdirection: null, sort: null, filter: null, sortcomparer: null }; this.dataview = null; this.updatedelay = 0; this.autoheight = false; this.showheader = true; this.showgroupsheader = true; this.closeablegroups = true; this.scrollbarsize = 15; this.virtualmode = false; this.sort = null; this.columnsmenu = true; this.columnsresize = false; this.columnsreorder = false; this.columnsmenuwidth = 15; this.autoshowcolumnsmenubutton = true; this.popupwidth = "auto"; this.sorttogglestates = 2; this.rendergridrows = null; this.enableanimations = true; this.enabletooltips = false; this.selectionmode = "singlerow"; this.enablehover = true; this.loadingerrormessage = "The data is still loading. When the data binding is completed, the Grid raises the 'bindingcomplete' event. Call this function in the 'bindingcomplete' event handler."; this.verticalscrollbarstep = 25; this.verticalscrollbarlargestep = 400; this.horizontalscrollbarstep = 10; this.horizontalscrollbarlargestep = 50; this.keyboardnavigation = true; this.touchModeStyle = "auto"; this.autoshowloadelement = true; this.showdefaultloadelement = true; this.showemptyrow = true; this.autosavestate = false; this.autoloadstate = false; this._updating = false; this._pagescache = new Array(); this._pageviews = new Array(); this._cellscache = new Array(); this._rowdetailscache = new Array(); this._rowdetailselementscache = new Array(); this._requiresupdate = false; this._hasOpenedMenu = false; this.scrollmode = "physical"; this.deferreddatafields = null; this.localization = null; this.rtl = false; this.menuitemsarray = []; this.events = ["initialized", "rowclick", "rowselect", "rowunselect", "groupexpand", "groupcollapse", "sort", "columnclick", "cellclick", "pagechanged", "pagesizechanged", "bindingcomplete", "groupschanged", "filter", "columnresized"
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.extend(a.jqx._jqxGrid.prototype,{autoresizecolumns:function(t){if(t!="cells"&&t!="all"&&t!="column"){t="all"}var u=this;var k=this.getrows();if(this.pageable){k=this.dataview.rows}var e=k.length;if(e==undefined&&k!=undefined){var o=new Array();a.each(k,function(i){o.push(this)});k=o;e=k.length}var q=a("<span></span>");q.addClass("jqx-grid-cell");a(document.body).append(q);var c=[];var f=[];var b=[];var l=u.host.width();if(u.vScrollBar[0].style.visibility!="hidden"){l-=this.scrollbarsize+5}if(l<0){l=0}for(var r=0;r<e;r++){var h=k[r];for(var p=0;p<this.columns.records.length;p++){var d=this.columns.records[p];if(d.hidden){continue}if(f[d.displayfield]==undefined){f[d.displayfield]=0}if(b[d.displayfield]==undefined){b[d.displayfield]=""}var n=h[d.displayfield];if(d.cellsformat!=""){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(n)){n=a.jqx.dataFormat.formatdate(n,d.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(n)){n=a.jqx.dataFormat.formatnumber(n,d.cellsformat,this.gridlocalization)}}}}else{if(d.cellsrenderer){var m=d.cellsrenderer(r,d,n);if(m!=undefined){n=m.toString()}}}if(t==undefined||t=="cells"||t=="all"){if(n!=null){var c=n.toString().length;if(c>f[d.displayfield]){f[d.displayfield]=c;b[d.displayfield]=n}}}if(t=="column"||t=="all"){if(d.text.toString().length>f[d.displayfield]){b[d.displayfield]=d.text}}}}for(var p=0;p<this.columns.records.length;p++){var d=this.columns.records[p];if(b[d.displayfield]==undefined){b[d.displayfield]=d.text}q[0].innerHTML=b[d.displayfield];var s=q.outerWidth()+10;if(q.children().length>0){s=q.children().outerWidth()+10}if(a.jqx.browser.msie&&a.jqx.browser.version<8){s+=10}if(s>d.maxwidth){s=d.maxwidth}if(d._width!=undefined){d.__width=d._width}d._width=null;if(d.maxwidth=="auto"||s<=d.maxwidth){var g=d.width;d.width=s;if(d._percentagewidth!=undefined){d._percentagewidth=(d.width/l)*100}this._raiseEvent(14,{columntext:d.text,column:d.getcolumnproperties(),datafield:d.datafield,displayfield:d.displayfield,oldwidth:g,newwidth:s})}}q.remove();this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);for(var p=0;p<this.columns.records.length;p++){var d=this.columns.records[p];if(d.__width!=undefined){d._width=d.__width}}},autoresizecolumn:function(f,b){if(b!="cells"&&b!="all"&&b!="column"){b="all"}if(f==undefined){return false}var r=this.getrows();if(this.pageable){r=this.dataview.rows}var g=this.getcolumn(f);if(g==undefined){return false}var e=r.length;var m=a("<span></span>");m.addClass("jqx-grid-cell");a(document.body).append(m);var d=0;var l="";var k=this;var c=k.host.width();if(k.vScrollBar[0].style.visibility!="hidden"){c-=this.scrollbarsize+5}if(c<0){c=0}if(b==undefined||b=="cells"||b=="all"){for(var h=0;h<e;h++){var o=r[h][g.displayfield];if(g.cellsformat!=""){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(o)){o=a.jqx.dataFormat.formatdate(o,g.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(o)){o=a.jqx.dataFormat.formatnumber(o,g.cellsformat,this.gridlocalization)}}}}else{if(g.cellsrenderer){var q=g.cellsrenderer(h,g,o);if(q!=undefined){o=q.toString()}}}if(o!=null){var p=o.toString().length;if(p>d){d=p;l=o}}}}if(b=="column"||b=="all"){if(g.text.toString().length>d){l=g.text}}if(l==undefined){l=g.text}m[0].innerHTML=l;var n=m.outerWidth()+10;if(a.jqx.browser.msie&&a.jqx.browser.version<8){n+=5}m.remove();if(n>g.maxwidth){n=g.maxwidth}if(g.maxwidth=="auto"||n<=g.maxwidth){var j=g.width;g.width=n;if(g._width!=undefined){g.__width=g._width}g._width=null;if(g._percentagewidth!=undefined){g._percentagewidth=(g.width/c)*100}this._updatecolumnwidths();this._updatecellwidths();this._raiseEvent(14,{columntext:g.text,column:g.getcolumnproperties(),datafield:f,displayfield:g.displayfield,oldwidth:j,newwidth:n});this._renderrows(this.virtualsizeinfo);if(g._width!=undefined){g._width=g.__width}}},_handlecolumnsresize:function(){var j=this;if(this.columnsresize){var i=false;if(j.isTouchDevice()){i=true}var f="mousemove.resize"+this.element.id;var c="mousedown.resize"+this.element.id;var d="mouseup.resize"
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_updatefilterrowui:function(f){var l=this.columns.records.length;var e=0;for(var h=0;h<l;h++){var g=this.columns.records[h];var c=g.width;if(c<g.minwidth){c=g.minwidth}if(c>g.maxwidth){c=g.maxwidth}var k=a(this.filterrow[0].cells[h]);k.css("left",e);var i=true;if(k.width()==c){i=false}if(f){i=true}k.width(c);k[0].left=e;if(!(g.hidden&&g.hideable)){e+=c}else{k.css("display","none")}if(!i){continue}if(g.createfilterwidget&&g.filtertype=="custom"){g.createfilterwidget(g,k)}else{if(g.filterable){var d=function(m,n){var j=a(n.children()[0]);j.width(c-10)};switch(g.filtertype){case"number":a(k.children()[0]).width(c);k.find("input").width(c-30);break;case"date":if(this.host.jqxDateTimeInput){a(k.children()[0]).jqxDateTimeInput({width:c-10})}else{d(this,k)}break;case"textbox":case"default":d(this,k);break;case"list":case"checkedlist":if(this.host.jqxDropDownList){a(k.children()[0]).jqxDropDownList({width:c-10})}else{d(this,k)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){d(this,k)}break}}}}var b=a(this.filterrow.children()[0]);b.width(parseInt(e)+2);b.height(this.filterrowheight)},clearfilterrow:function(){this._disablefilterrow=true;var b=this.columns.records.length;var f=0;for(var d=0;d<b;d++){var c=this.columns.records[d];var g=a(this.filterrow[0].cells[d]);if(c.filterable){var e=function(i,j){var h=a(j.children()[0]);h.val("");if(h[0]){i["_oldWriteText"+h[0].id]=""}};switch(c.filtertype){case"number":g.find("input").val("");break;case"date":if(this.host.jqxDateTimeInput){a(g.children()[0]).jqxDateTimeInput("setDate",null)}else{e(this,g)}break;case"textbox":case"default":e(this,g);break;case"list":if(this.host.jqxDropDownList){a(g.children()[0]).jqxDropDownList("clearSelection")}else{e(this,g)}break;case"checkedlist":if(this.host.jqxDropDownList){a(g.children()[0]).jqxDropDownList("checkAll",false)}else{e(this,g)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){e(this,g)}else{a(g.children()[0]).jqxCheckBox({checked:null})}break}}}this._disablefilterrow=false},_applyfilterfromfilterrow:function(){if(this._disablefilterrow==true){return}var z=this.columns.records.length;var C=this;for(var t=0;t<z;t++){var k=new a.jqx.filter();var u=this.columns.records[t];if(!u.filterable){continue}var f=C._getcolumntypebydatafield(u);var d=C._getfiltertype(f);var l=1;var D=true;var e=u.filtertype;var A=function(j,K,H){var i=true;if(j._filterwidget){var F=j._filterwidget.val();if(F!=""){var I="equal";if(K=="stringfilter"){var I="contains"}if(K!="stringfilter"){var J=0;if(F.indexOf(">")!=-1){I="greater_than";J=1}if(F.indexOf("<")!=-1){I="less_than";J=1}if(F.indexOf("=")!=-1){if(I=="greater_than"){I="greater_than_or_equal";J=2}else{if(I=="less_than"){I="less_than_or_equal";J=2}else{I="equal";J=1}}}if(J!=0){F=F.substring(J);if(F.length<1){return false}}}if(j.filtercondition!=undefined){I=j.filtercondition}var G=H.createfilter(K,F,I);H.addfilter(l,G)}else{i=false}}return i};switch(u.filtertype){case"date":if(u._filterwidget.jqxDateTimeInput){var p=u._filterwidget.jqxDateTimeInput("getRange");if(p!=null&&p.from!=null&&p.to!=null){var o="GREATER_THAN_OR_EQUAL";var r=new Date(0);r.setHours(0);r.setFullYear(p.from.getFullYear(),p.from.getMonth(),p.from.getDate());var q=new Date(0);q.setHours(0);q.setFullYear(p.to.getFullYear(),p.to.getMonth(),p.to.getDate());q.setHours(p.to.getHours());q.setMinutes(p.to.getMinutes());q.setSeconds(p.to.getSeconds());var y=k.createfilter(d,r,o);k.addfilter(0,y);var c="LESS_THAN_OR_EQUAL";var x=k.createfilter(d,q,c);k.addfilter(0,x)}else{D=false}}else{D=A(u,d,k)}break;case"number":if(u._filterwidget){var p=u._filterwidget.find("input").val();var h=u._filterwidget.find(".filter").jqxDropDownList("selectedIndex");var w=k.getoperatorsbyfiltertype(d)[h];if(C.updatefilterconditions){var E=C.updatefilterconditions(d,k.getoperatorsbyfiltertype(d));if(E!=undefined){k.setoperatorsbyfiltertype(d,E)}var w=k.getoperatorsbyfiltertype(d)[h]}var n=w=="NULL"||w=="NOT_NULL";var s=w=="EMPTY"||w=="NOT_EMPTY";if(p!=undefined&&p.length>0||n||s){y=k.createfilter(d,p,w,null,
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.jqx.dataview.grouping=function(){this.loadgrouprecords=function(z,C,p,A,D,e,M,B,u){var H=z;var h=this;var L=new Array();for(var l=0;l<h.groups.length;l++){L[l]=h.generatekey()}var F=new Array();var b=0;var L=L;var x=new Array();var K=C;var d=C;var y=h.groups.length;this.loadedrecords=new Array();this.bounditems=new Array();this.loadedrecords=new Array();this.loadedrootgroups=new Array();this.loadedgroups=new Array();this.loadedgroupsByKey=new Array();this.sortedgroups=new Array();var J=this.sortdata!=null;var N=J?this.sortdata:this.records;for(var c=C;c<p;c++){var v={};if(!J){v=a.extend({},N[c])}else{v=a.extend({},N[c].value)}id=v[h.uniqueId];if(D>=B||id!=M[D][h.uniqueId]||(e&&e[id])){u[u.length]=D}var G=new Array();var t=0;for(var l=0;l<y;l++){var r=h.groups[l];var E=v[r];if(E==null){E=""}G[t++]={value:E,hash:L[l]}}if(G.length!=y){break}var j=null;var k="";var f=-1;for(var I=0;I<G.length;I++){f++;var n=G[I].value;var s=G[I].hash;k=k+"_"+s+"_"+n;if(x[k]!=undefined&&x[k]!=null){j=x[k];continue}if(j==null){j={group:n,subItems:new Array(),subGroups:new Array(),level:0};F[b++]=j;j.uniqueid=h.generatekey();h.loadedgroupsByKey[n]=j}else{var m={group:n,subItems:new Array(),subGroups:new Array(),parentItem:j,level:j.level+1};h.loadedgroupsByKey[j.uniqueid+"_"+n]=m;m.uniqueid=h.generatekey();j.subGroups[j.subGroups.length++]=m;j=m}x[k]=j}if(j!=null){if(!v.uid){v.uid=this.getid(this.source.id,v,K)}if(!J){v.boundindex=K;this.recordsbyid["id"+v.uid]=N[c]}else{v.boundindex=N[c].index;this.recordsbyid["id"+v.uid]=N[c].value}this.bounditems[v.boundindex]=v;this.sortedgroups[K]=v;v.uniqueid=h.generatekey();v.parentItem=j;v.level=j.level+1;j.subItems[j.subItems.length++]=v}else{if(!v.uid){v.uid=this.getid(this.source.id,v,K)}if(!J){v.boundindex=K;this.recordsbyid["id"+v.uid]=N[c]}else{v.boundindex=N[c].index;this.recordsbyid["id"+v.uid]=N[c].value}this.sortedgroups[K]=v;this.bounditems[v.boundindex]=v;v.uniqueid=h.generatekey()}D++;K++;d++}var g=function(q,O,P){for(var i=0;i<O.subItems.length;i++){O.subItems[i].visibleindex=z+P;q.rows[P]=O.subItems[i];q.loadedrecords[P]=O.subItems[i];P++}return P};var o=function(i,P,Q){var q=function(T){if(i.aggregates==true){var R=T;var S={};if(R!=null){S.level=R.level;S.visibleindex=z+Q;S.uniqueid=i.generatekey();i.rows[Q]=S;i.loadedrecords[Q++]=S;S.totalsrow=true;if(T.subItems.length>0){R=T.subItems[T.subItems.length-1];S.parentItem=R.parentItem;if(S.parentItem.subItems){S.parentItem.subItems[S.parentItem.subItems.length]=S}}else{if(T.subGroups.length>0){R=T.subGroups[T.subGroups.length-1];S.level=R.level;S.parentItem=T;T.subGroups[T.subGroups.length]=S}}}}};for(subGroup in P.subGroups){var O=P.subGroups[subGroup];if(O.subGroups){i.loadedgroups[i.loadedgroups.length]=O;O.visibleindex=z+Q;i.rows[Q]=O;i.loadedrecords[Q]=O;Q++;if(O.subGroups.length>0){Q=o(i,O,Q)}else{if(O.subItems.length>0){Q=g(i,O,Q)}}q(O)}}if(P.subItems.length>0){Q=g(i,P,Q)}q(P);return Q};var w=F.length;this.loadedgroups=new Array();this.rows=new Array();var H=0;for(var K=0;K<w;K++){var r=F[K];this.loadedrootgroups[K]=r;this.loadedgroups[this.loadedgroups.length]=r;r.visibleindex=z+H;this.rows[H]=r;this.loadedrecords[H]=r;H++;H=o(this,r,H)}return H};this._updategroupsinpage=function(C,r,K,d,u,j,f){var p=new Array();var w=[];if(this.groupable&&this.groups.length>0){var B=0;var h=new Array();var g=new Array();for(var m=0;m<C.groups.length;m++){g[m]=C.generatekey()}var F=0;var o=new Array();var k=0;if(f>this.totalrecords){f=this.totalrecords}for(var v=j;v<f;v++){var H=a.extend({},C.sortedgroups[v]);id=H[C.uniqueId];if(!C.pagesize||(K>=C.pagesize*C.pagenum&&K<C.pagesize*(C.pagenum+1))){if(d>=u||id!=p[d][C.uniqueId]||(updated&&updated[id])){w[w.length]=d}var e=new Array();var y=0;for(var m=0;m<C.groups.length;m++){var n=C.groups[m];var D=H[n];if(null==D){D=""}e[y++]={value:D,hash:g[m]}}if(e.length!=C.groups.length){break}var z=null;var s="";var c=-1;for(var A=0;A<e.length;A++){c++;var G=e[A].value;var l=e[A].hash;s=s+"_"+l+"_"+G;if(h[s]!=undefined&&h[s]!=null){z=h[s];continue}if(z==null){z={group:G,subItems:new Array(),subGr
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function(a){a.extend(a.jqx._jqxGrid.prototype,{selectrow:function(b,c){this._applyrowselection(b,true,c)},selectallrows:function(){this.clearselection(false);var c=this.dataview.records.length;if(c>0){for(var b=0;b<c;b++){if(b<c-1){this.selectrow(b,false)}else{this.selectrow(b,true)}}}},unselectrow:function(b,c){this._applyrowselection(b,false,c)},selectcell:function(c,b){this._applycellselection(c,b,true)},unselectcell:function(c,b){this._applycellselection(c,b,false)},clearselection:function(c){this.selectedrowindex=-1;for(var b=0;b<this.selectedrowindexes.length;b++){this._raiseEvent(3,{rowindex:this.selectedrowindexes[b]})}this.selectedrowindexes=new Array();this.selectedcells=new Array();if(!c){return}this._renderrows(this.virtualsizeinfo)},getselectedrowindex:function(){return this.selectedrowindex},getselectedrowindexes:function(){return this.selectedrowindexes},getselectedcell:function(){return this.selectedcell},getselectedcells:function(){var b=new Array();for(obj in this.selectedcells){b[b.length]=this.selectedcells[obj]}return b},_getcellsforcopypaste:function(){var e=new Array();if(this.selectionmode.indexOf("cell")==-1){var h=this.selectedrowindexes;for(var d=0;d<h.length;d++){var c=h[d];for(var f=0;f<this.columns.records.length;f++){var g=c+"_"+this.columns.records[f].datafield;var b={rowindex:c,datafield:this.columns.records[f].datafield};e.push(b)}}}return e},deleteselection:function(){var d=this;var f=d.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){f=this._getcellsforcopypaste()}if(f!=null&&f.length>0){for(var e=0;e<f.length;e++){var b=f[e];var g=d.getcolumn(b.datafield);var h=d.getcellvalue(b.rowindex,b.datafield);if(!g){continue}if(h!==""){var c=null;if(g.columntype=="checkbox"){if(!g.threestatecheckbox){c=false}}d._raiseEvent(17,{rowindex:b.rowindex,datafield:b.datafield,value:h});if(e==f.length-1){d.setcellvalue(b.rowindex,b.datafield,c,true);if(g.displayfield!=g.datafield){d.setcellvalue(b.rowindex,g.displayfield,c,true)}}else{d.setcellvalue(b.rowindex,b.datafield,c,false);if(g.displayfield!=g.datafield){d.setcellvalue(b.rowindex,g.displayfield,c,true)}}d._raiseEvent(18,{rowindex:b.rowindex,datafield:b.datafield,oldvalue:h,value:c})}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}},copyselection:function(){var f="";var l=this;this.clipboardselection={};this._clipboardselection=[];var k=l.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){k=this._getcellsforcopypaste()}if(k!=null&&k.length>0){var m=999999999999999;var j=-1;for(var d=0;d<k.length;d++){var g=k[d];var b=l.getcolumn(g.datafield);if(b!=null){var h=l.getcellvalue(g.rowindex,g.datafield);if(!this.clipboardselection[g.rowindex]){this.clipboardselection[g.rowindex]={}}this.clipboardselection[g.rowindex][g.datafield]=h;m=Math.min(m,g.rowindex);j=Math.max(j,g.rowindex)}}for(var c=m;c<=j;c++){var e=0;this._clipboardselection[this._clipboardselection.length]=new Array();if(this.clipboardselection[c]!=undefined){a.each(this.clipboardselection[c],function(i,n){if(e>0){f+="\t"}var o=n;if(n==null){o=""}l._clipboardselection[l._clipboardselection.length-1][e]=o;e++;f+=o})}if(c<j){f+="\n"}}}this.clipboardselectedtext=f;return f},pasteselection:function(){var k=this.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){k=this._getcellsforcopypaste()}if(k!=null&&k.length>0){var j=k[0].rowindex;var d=k[0].datafield;var h=this._getcolumnindex(d);var g=0;if(!this._clipboardselection){return}for(var l=0;l<this._clipboardselection.length;l++){for(var f=0;f<this._clipboardselection[l].length;f++){var e=this.getcolumnat(h+f);if(!e){continue}var i=this.getcell(j+l,e.datafield);var b=null;b=this._clipboardselection[l][f];if(b!=null){this._raiseEvent(17,{rowindex:j+l,datafield:i.datafield,value:b});this.setcellvalue(i.row,i.column,b,false);this._raiseEvent(18,{rowindex:j+l,datafield:i.datafield,oldvalue:this.getcellvalue(i.rowindex,i.datafield),value:b});this._applycellselection(j+l,i.datafield,true,false)}}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}},_applyrowselection:function(c,b,g
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function (a) { a.extend(a.jqx._jqxGrid.prototype, { _handledblclick: function (t, n) { if (t.target == null) { return } if (n.disabled) { return } if (a(t.target).ischildof(this.columnsheader)) { return } var w; if (t.which) { w = (t.which == 3) } else { if (t.button) { w = (t.button == 2) } } if (w) { return } var B; if (t.which) { B = (t.which == 2) } else { if (t.button) { B = (t.button == 1) } } if (B) { return } var v = this.showheader ? this.columnsheader.height() + 2 : 0; var o = this._groupsheader() ? this.groupsheader.height() : 0; var A = this.showtoolbar ? this.toolbarheight : 0; o += A; var e = this.host.offset(); var m = t.pageX - e.left; var l = t.pageY - v - e.top - o; var b = this._hittestrow(m, l); var h = b.row; var j = b.index; var q = t.target.className; var p = this.table[0].rows[j]; if (p == null) { return } n.mousecaptured = true; n.mousecaptureposition = { left: t.pageX, top: t.pageY - o }; var r = this.hScrollInstance; var s = r.value; var d = 0; var k = this.groupable ? this.groups.length : 0; for (var u = 0; u < p.cells.length; u++) { var f = parseInt(a(this.columnsrow[0].cells[u]).css("left")); var g = f - s; if (n.columns.records[u].pinned) { g = f } var c = this._getcolumnat(u); if (c != null && c.hidden) { continue } var z = g + a(this.columnsrow[0].cells[u]).width(); if (z >= m && m >= g) { d = u; break } } if (h != null) { var c = this._getcolumnat(d); if (!(q.indexOf("jqx-grid-group-expand") != -1 || q.indexOf("jqx-grid-group-collapse") != -1)) { if (h.boundindex != -1) { n.begincelledit(h.boundindex, c.datafield, c.defaulteditorvalue) } } } }, _getpreveditablecolumn: function (c) { var b = this; while (c > 0) { c--; var d = b.getcolumnat(c); if (!d) { return null } if (!d.editable) { continue } if (!d.hidden) { return d } } return null }, _getnexteditablecolumn: function (c) { var b = this; while (c < this.columns.records.length) { c++; var d = b.getcolumnat(c); if (!d) { return null } if (!d.editable) { continue } if (!d.hidden) { return d } } return null }, _handleeditkeydown: function (v, q) { var z = v.charCode ? v.charCode : v.keyCode ? v.keyCode : 0; if (q.showfilterrow && q.filterable) { if (this.filterrow) { if (a(v.target).ischildof(this.filterrow)) { return true } } } if (q.pageable) { if (a(v.target).ischildof(this.pager)) { return true } } if (this.showtoolbar) { if (a(v.target).ischildof(this.toolbar)) { return true } } if (this.showstatusbar) { if (a(v.target).ischildof(this.statusbar)) { return true } } if (this.rowdetails) { if (a(v.target).ischildof(this.content.find("[role='rowgroup']"))) { return true } } if (this.editcell) { if (this.editcell.columntype == null || this.editcell.columntype == "textbox" || this.editcell.columntype == "numberinput" || this.editcell.columntype == "combobox" || this.editcell.columntype == "datetimeinput") { if (z >= 33 && z <= 40 && q.selectionmode == "multiplecellsadvanced") { var g = this.editcell.columntype == "textbox" || this.editcell.columntype == null ? this.editcell.editor : this.editcell.editor.find("input"); var A = q._selection(g); var r = g.val().length; if (A.length > 0 && this.editcell.columntype != "datetimeinput") { q._cancelkeydown = true } if (A.start > 0 && z == 37) { q._cancelkeydown = true } if (A.start < r && z == 39 && this.editcell.columntype != "datetimeinput") { q._cancelkeydown = true } if (this.editcell.columntype == "datetimeinput" && z == 39) { if (A.start + A.length < r) { q._cancelkeydown = true } } } } else { if (this.editcell.columntype == "dropdownlist") { if (z == 37 || z == 39 && q.selectionmode == "multiplecellsadvanced") { q._cancelkeydown = false } } else { if (this.selectionmode == "multiplecellsadvanced" && this.editcell.columntype != "textbox" && this.editcell.columntype != "numberinput") { q._cancelkeydown = true } } } if (z == 32) { if (q.editcell.columntype == "checkbox") { var j = !q.getcellvalue(q.editcell.row, q.editcell.column); q.setcellvalue(q.editcell.row, q.editcell.column, j, true); q._raiseEvent(18, { rowindex: q.editcell.row, datafield: q.editcell.column, oldvalue: !j, value: j, c
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function (a) { a.extend(a.jqx._jqxGrid.prototype, { _initpager: function () { var k = this; var c = this.gridlocalization.pagergotopagestring; var j = this.gridlocalization.pagerrangestring; var n = this.gridlocalization.pagershowrowsstring; var l = (this.pagerheight - 17) / 2; this.pagerdiv = this.pagerdiv || a('<div style="width: 100%; height: 100%; position: relative;"></div>'); if (!this.pageable) { this.pagerdiv.remove(); this.vScrollBar.jqxScrollBar({ thumbSize: 0 }); return } if (!this.pagerrenderer) { this.pagerdiv.css("top", l); this.pagergotoinput = this.pagergotoinput || a('<div style="margin-right: 7px; width: 27px; height: 17px; float: right;"><input style="margin-top: 0px; text-align: right; width: 27px;" type="text"/></div>'); this.pagergoto = this.pagergoto || a('<div style="float: right; margin-right: 7px;"></div>'); this.pagerrightbutton = this.pagerrightbutton || a('<div type="button" style="padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"></div>'); this.pagerleftbutton = this.pagerleftbutton || a('<div type="button" style="padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"></div>'); this.pagerdetails = this.pagerdetails || a('<div style="margin-right: 7px; float: right;"></div>'); this.pagershowrows = this.pagershowrows || a('<div style="margin-right: 7px; float: right;"></div>'); if (this.pagershowrowscombo && this.pagershowrowscombo.jqxDropDownList) { this.pagershowrowscombo.remove(); this.pagershowrowscombo = null } this.pagershowrowscombo = this.pagershowrowscombo || a('<div id="gridpagerlist" style="margin-top: 0px; margin-right: 7px; float: right;"></div>'); this.pagerdiv.children().remove(); this.pagershowrowscombo[0].id = "gridpagerlist" + this.element.id; this.removeHandler(this.pagerrightbutton, "mousedown"); this.removeHandler(this.pagerrightbutton, "mouseup"); this.removeHandler(this.pagerrightbutton, "click"); this.removeHandler(this.pagerleftbutton, "mousedown"); this.removeHandler(this.pagerleftbutton, "mouseup"); this.removeHandler(this.pagerleftbutton, "click"); this.pagerleftbutton.attr("title", this.gridlocalization.pagerpreviousbuttonstring); this.pagerrightbutton.attr("title", this.gridlocalization.pagernextbuttonstring); this.pagerdiv.append(this.pagerrightbutton); this.pagerdiv.append(this.pagerleftbutton); this.pagerrightbutton.jqxButton({ cursor: "pointer", theme: this.theme }); this.pagerleftbutton.jqxButton({ cursor: "pointer", theme: this.theme }); this.pagerleftbutton.find(".jqx-icon-arrow-left").remove(); this.pagerrightbutton.find(".jqx-icon-arrow-right").remove(); var d = a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>"); d.addClass(this.toThemeProperty("jqx-icon-arrow-left")); this.pagerleftbutton.wrapInner(d); var h = a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>"); h.addClass(this.toThemeProperty("jqx-icon-arrow-right")); this.pagerrightbutton.wrapInner(h); this.pagerdiv.append(this.pagerdetails); this.pagerdiv.append(this.pagershowrowscombo); this.pagerdiv.append(this.pagershowrows); this.pagerdiv.append(this.pagergotoinput); this.pagerdiv.append(this.pagergoto); var b = this.pagesizeoptions; if (!this.pagershowrowscombo.jqxDropDownList) { throw new Error("jqxGrid: jqxdropdownlist.js is not loaded."); return } this.pagershowrowscombo.jqxDropDownList({ rtl: this.rtl, source: b, enableBrowserBoundsDetection: true, keyboardSelection: false, autoDropDownHeight: true, width: 44, height: 16, theme: this.theme }); var g = 0; for (var f = 0; f < b.length; f++) { if (this.pagesize >= b[f]) { g = f } } this.pagershowrows[0].innerHTML = n; this.pagergoto[0].innerHTML = c; this.updatepagerdetails(); this.pager.append(this.pagerdiv); this.pagershowrowscombo.jqxDropDownList({ selectedIndex: g }); this.pagerpageinput = this.pagergotoinput.find("input"); this.pagerpageinput.addClass(this.toThemeProperty("jqx-input")); this.pagerpageinput.addClass(this.toThemeProperty("jqx-widget-content")); if (this.rtl) { this.pagerpageinput.css("direction", "rtl") } var k = this; this.removeHandler
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
(function (a) { a.extend(a.jqx._jqxGrid.prototype, { savestate: function (b) { var b = this.getstate(); if (window.localStorage) { window.localStorage["jqxGrid" + this.element.id] = this._stringify(b) } this._savedstate = b; return b }, loadstate: function (d) { var g = ""; if (d != undefined && d.width != undefined) { g = d } else { if (window.localStorage) { var c = window.localStorage["jqxGrid" + this.element.id]; if (c) { var g = a.parseJSON(window.localStorage["jqxGrid" + this.element.id]) } } else { if (this._savedstate) { var g = this._savedstate } } } if (g != null && g !== "") { var f = g; this.width = f.width; this.height = f.height; if (this.pageable) { if (f.pagesize != undefined) { this.pagesize = f.pagesize } if (f.pagenum != undefined) { this.dataview.pagenum = f.pagenum } if (f.pagesizeoptions != undefined) { this.pagesizeoptions = f.pagesizeoptions } var e = 0; for (var b = 0; b < this.pagesizeoptions.length; b++) { if (this.pagesize >= this.pagesizeoptions[b]) { e = b } } if (this.pagershowrowscombo) { this.pagershowrowscombo.jqxDropDownList({ selectedIndex: e }) } } if (this.sortable) { if (f.sortdirection) { if (f.sortdirection.ascending || f.sortdirection.descending) { this.dataview.sortfield = f.sortcolumn; var h = f.sortdirection.ascending ? "asc" : "desc"; this.dataview.sortfielddirection = h; this.source.sortcolumn = f.sortcolumn; this.source.sortdirection = h; if (!this.autoloadstate) { this.sortby(f.sortcolumn, h) } } } else { if (this.dataview.sortfield != null && (this.dataview.sortfielddirection == "asc" || this.dataview.sortfielddirection == "desc")) { this.sortby(this.dataview.sortfield, null) } } } if (this.groupable) { this.dataview.groups = f.groups; this.groups = f.groups } if (this.virtualsizeinfo) { this._loadselectionandcolumnwidths(f) } } }, _loadselectionandcolumnwidths: function (g) { var k = ""; if (g != undefined && g.width != undefined) { k = g } else { if (window.localStorage) { var k = a.parseJSON(window.localStorage["jqxGrid" + this.element.id]) } else { if (this._savedstate) { var k = this._savedstate } } } if (k != null) { var z = k; var y = this; var f = false; var d = []; d.length = 0; var x = []; a.each(this.columns.records, function (A) { var i = z.columns[this.datafield]; if (i != undefined) { if (this.text != i.text) { f = true } if (this.hidden != i.hidden) { f = true } this.width = i.width; this.hidden = i.hidden; this.pinned = i.pinned; this.groupable = i.groupable; this.resizable = i.resizable; this.draggable = i.draggable; this.text = i.text; this.align = i.align; this.cellsalign = i.cellsalign; d[this.datafield] = i.index; d.length++ } }); if (d.length > 0) { if (this.setcolumnindex) { var s = new Array(); for (var v = 0; v < this.columns.records.length; v++) { s.push(this.columns.records[v]) } for (var v = 0; v < s.length; v++) { var h = s[v]; var l = d[h.datafield]; y.setcolumnindex(h.datafield, l, false) } } this.prerenderrequired = true; this.rendergridcontent(true); if (this._updatefilterrowui && this.filterable && this.showfilterrow) { this._updatefilterrowui() } this._renderrows(this.virtualsizeinfo) } if (this.filterable) { if (this.clearfilters) { this.clearfilters(false) } var c = ""; var n = new a.jqx.filter(); for (var v = 0; v < z.filters.filterscount; v++) { var w = z.filters["filtercondition" + v]; var r = z.filters["filterdatafield" + v]; var h = this.getcolumn(r); if (r != c) { n = new a.jqx.filter() } c = r; if (h && h.filterable) { var u = z.filters["filtervalue" + v]; var o = z.filters["filteroperator" + v]; var b = z.filters["filtertype" + v]; var p = n.createfilter(b, u, w); n.addfilter(o, p); if (this.showfilterrow) { var j = h._filterwidget; var e = h._filterwidget.parent(); if (j != null) { switch (h.filtertype) { case "number": e.find("input").val(u); if (this.host.jqxDropDownList) { var m = n.getoperatorsbyfiltertype("numericfilter"); j.find(".filter").jqxDropDownList("selectIndex", m.indexOf(w)) } break; case "date": if (this.host.jqxDateTimeInput) { var q = z.filters["filtervalue" + (v + 1)]; var b = z.filters["filtertype" + v]; v
|
|||
|
|
/*
|
|||
|
|
jQWidgets v2.8.0 (2013-Mar-22)
|
|||
|
|
Copyright (c) 2011-2013 jQWidgets.
|
|||
|
|
License: http://jqwidgets.com/license/
|
|||
|
|
*/
|
|||
|
|
(function (a) { a.jqx.dataview.sort = function () { this.sortby = function (d, f, p) { var m = Object.prototype.toString; if (f == null) { this.sortdata = null; this.refresh(); return } if (f == undefined) { f = true } if (f == "a" || f == "asc" || f == "ascending" || f == true) { f = true } else { f = false } var g = d; this.sortfield = d; this.sortfielddirection = f ? "asc" : "desc"; if (this.sortcache == undefined) { this.sortcache = {} } this.sortdata = []; var b = []; var c = false; if (g == "constructor") { g = "" } if (!this.virtualmode && this.sortcache[g] != null) { var o = this.sortcache[g]; b = o._sortdata; if (o.direction == f) { b.reverse() } else { if (!o.direction && f) { b.reverse() } c = true } if (b.length < this.totalrecords) { this.sortcache = {}; c = false; b = [] } } Object.prototype.toString = (typeof d == "function") ? d : function () { return this[d] }; var r = this.records; var t = this; var n = ""; if (this.source.datafields) { a.each(this.source.datafields, function () { if (this.name == d) { if (this.type) { n = this.type } return false } }) } if (b.length == 0) { if (r.length) { var h = r.length; for (var q = 0; q < h; q++) { var e = r[q]; if (e != null) { var j = e; var s = j.toString(); b.push({ sortkey: s, value: j, index: q }) } } } else { var l = false; for (obj in r) { var e = r[obj]; if (e == undefined) { l = true; break } var j = e; b.push({ sortkey: j.toString(), value: j, index: obj }) } if (l) { a.each(r, function (u, v) { b.push({ sortkey: v.toString(), value: v, index: u }) }) } } } if (!c) { if (p == null) { this._sortcolumntype = n; var k = this; b.sort(function (u, i) { return k._compare(u, i, n) }) } else { b.sort(p) } } if (!f) { b.reverse() } Object.prototype.toString = m; this.sortdata = b; this.sortcache[g] = { _sortdata: b, direction: f }; this.reload(this.records, this.rows, this.filters, this.updated, true) }, this.clearsortdata = function () { this.sortcache = {}; this.sortdata = null }; this._compare = function (c, b, e) { var c = c.sortkey; var b = b.sortkey; if (c === undefined) { c = null } if (b === undefined) { b = null } if (c === null && b === null) { return 0 } if (c === null && b !== null) { return 1 } if (c !== null && b === null) { return -1 } if (a.jqx.dataFormat) { if (e && e != "") { switch (e) { case "number": case "int": case "float": if (c < b) { return -1 } if (c > b) { return 1 } return 0; case "date": case "time": if (c < b) { return -1 } if (c > b) { return 1 } return 0; case "string": case "text": c = String(c).toLowerCase(); b = String(b).toLowerCase(); break } } else { if (a.jqx.dataFormat.isNumber(c) && a.jqx.dataFormat.isNumber(b)) { if (c < b) { return -1 } if (c > b) { return 1 } return 0 } else { if (a.jqx.dataFormat.isDate(c) && a.jqx.dataFormat.isDate(b)) { if (c < b) { return -1 } if (c > b) { return 1 } return 0 } else { if (!a.jqx.dataFormat.isNumber(c) && !a.jqx.dataFormat.isNumber(b)) { c = String(c).toLowerCase(); b = String(b).toLowerCase() } } } } } try { if (c < b) { return -1 } if (c > b) { return 1 } } catch (d) { var f = d } return 0 }; this._equals = function (c, b) { return (this._compare(c, b) === 0) } }; a.extend(a.jqx._jqxGrid.prototype, { _rendersortcolumn: function () { var b = this; var c = this.getsortcolumn(); if (this.sortdirection) { a.each(this.columns.records, function (e, f) { var d = a.data(document.body, "groupsortelements" + this.displayfield); if (c == null || this.displayfield != c) { a(this.sortasc).hide(); a(this.sortdesc).hide(); if (d != null) { d.sortasc.hide(); d.sortdesc.hide() } } else { if (b.sortdirection.ascending) { a(this.sortasc).show(); a(this.sortdesc).hide(); if (d != null) { d.sortasc.show(); d.sortdesc.hide() } } else { a(this.sortasc).hide(); a(this.sortdesc).show(); if (d != null) { d.sortasc.hide(); d.sortdesc.show() } } } }) } }, getsortcolumn: function () { if (this.sortcolumn) { return this.sortcolumn } return null }, removesort: function () { this.sortby(null) }, sortby: function (c, e, d) { if (this._loading) { throw new Error("jqxGrid: " + this.loadingerrormessage); return fa
|