jqwidgets-framework
Advanced tools
Comparing version 3.8.0 to 3.8.1
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
if(!jqxBaseFramework){var jqxBaseFramework=window.minQuery||window.jQuery}(function(h,q,i){if(!q){return}h.jqx=h.jqx||{};h.jqx.AMD=false;var b=q.module("jqwidgets",[]);var u=q.module("jqwidgets-amd",[],function(){h.jqx.AMD=true});var f=null;var C=null;var v=null;var z=null;var s=null;var c=new Array();var D=new Array();var p=new Array();var r=new Array();var g=new Array();var d=new Array();var e={};var x=false;var l=function(){var E=document.getElementsByTagName("script");var G,F,H;for(G=0;F=E[G];G++){H=F.src;if(H.indexOf("jqxcore.js")>=0){var I=H.substring(0,H.indexOf("jqxcore.js"));break}}return I}();function y(I,J,E,G,F){if(G&&F){switch(I){case"jqxGrid":case"jqxDataTable":case"jqxTreeGrid":if(E.columns){var L=G.columns||G;var H=F.columns||F;if(L.length!=H.length){return false}var K={};h.each(L,function(M,O){var N=this;for(var P in this){if(N[P]!=H[M][P]){var Q=N.datafield||N.dataField;if(!K[Q]){K[Q]={}}K[Q][P]=N[P]}}});if(!h.isEmptyObject(K)){h.each(K,function(N,P){for(var O in P){var M=h(J).jqxProxy("getcolumnproperty",N,O);if(M!==P[O]){h(J).jqxProxy("setcolumnproperty",N,O,P[O])}}});return true}}break}}return false}function a(R,J,Q,I,N,M,E){var F=function(W){if(M==="jqxTree"||M==="jqxMenu"){return W}if(typeof W=="object"){if(W&&W._bindingUpdate!=null){return W}}var V={};var T=false;if(h.isArray(W)||(W instanceof Object&&!W.url&&!(W.localdata||W.localData))){if(M==="jqxChart"){return W}T=true;V.localData=W;V.type="array";if(W[0]){var U=new Array();if(h.type(W[0])=="object"){h.each(W[0],function(Y,Z){var aa={name:Y,type:h.type(Z)};U.push(aa)});V.datafields=U}}}else{if(W&&W.url){V=W}else{if(W&&(W.localdata||W.localData)){V=W}}}if(h.jqx.dataAdapter){var X=new h.jqx.dataAdapter(V);return X}else{if(T){return W}}return null};if(Q.jqxSource!=i){var O=R.$watchCollection(Q.jqxSource,function(V,U){if(V!=U){if(q.equals(V,U)){return}if(V&&U&&V._source&&U._source&&q.equals(V._source,U._source)){return}var T=F(V);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U,V)}}});E.push(O)}else{if(Q.jqxSettings!=i){var L={};var H=null;var P=f(Q.jqxSettings)(R);var K=J.controller();for(var G in K){if(P&&K[G]==P.source){H=G;break}}if(!H){for(var G in R){if(P&&R[G]==P.source){H=G;break}}}if(H){var S="";for(var G in R){if(R[G]==K){S=G;break}}if(S!=""){H=S+"."+H}var O=N.$watchCollection(H,function(W,V){if(W!=V){if(q.equals(W,V)){return}if(W&&V&&W._source&&V._source&&q.equals(W._source,V._source)){return}var U=h.isArray(W)||h.type(W)==="array";if(new Date()-L["jqxSettings.source"]>1000||L=={}||!L["jqxSettings.source"]||U){var T=F(W);h(J).jqxProxy({source:T});var X=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&X&&X.propertyChanged){X.propertyChanged("source",V,W)}L.property=new Date()}}});E.push(O)}var O=R.$watchCollection(Q.jqxSettings+".source",function(V,U){if(V!=U){if(q.equals(V,U)){return}if(V&&U&&V._source&&U._source&&q.equals(V._source,U._source)){return}if(new Date()-L.property>1000||!L["jqxSettings.property"]||L=={}){var T=F(V);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U,V)}L["jqxSettings.source"]=new Date()}}});E.push(O);var O=R.$watchCollection(Q.jqxSettings,function(V,U){if(!V){return}if(!U){var T=F(V.source);h(J).jqxProxy({source:T});return}if(V.source!=U.source){if(q.equals(V.source,U.source)){return}if(V&&U&&V.source&&U.source&&V.source._source&&U.source._source&&q.equals(V.source._source,U.source._source)){return}if(V.source&&U.source&&h.isArray(V.source)&&h.isArray(U.source)){if(A(V.source)==A(U.source)){return}}if(new Date()-L.property>1000||!L["jqxSettings.source"]||L=={}){var T=F(V.source);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U.source,V.source)}L["jqxSettings.source"]=new Date()}}});E.push(O)}}return F(I)}function A(E){if(E==null){return""}var F="";h.each(E,function(H){var J=this;if(H>0){F+=", "}F+="[";var G=0;if(h.type(J)=="object"){for(var I in J){if(G>0){F+=", "}F+="{"+I+":"+J[I]+"}";G++}}else{if(G>0){F+=", "}F+="{"+H+":"+J+"}";G++}F+="]"});return F}function k(I,G,F,E,H,J){h.extend(h.jqx["_"+E+""].prototype,{definedInstance:function(){if(this.element&&this.element!==G[0]){return true}if(this.base&&this.base.element!==G[0]){return true}var K=this;h.each(J,function(N,O){K.addHandler(h(G),N,function(P){I.$parent?h.proxy(O,H)(P):O(P);if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}})});var L=F.$attr;h.each(F,function(Q,R){if(Q.indexOf("jqxOn")>=0){var N=L[Q].substring(7);var P=h.camelCase(N);var O=R;K.addHandler(h(G),P,function(T){T.data=F.data||F.jqxData;if(O.indexOf("(")>=0){var S=O.indexOf("(");var U=f(O.substring(0,S))(I);if(U){U(T)}else{I.$emit(P,T)}}else{I.$emit(O,T)}if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}})}});if(F.jqxInstance){var M=f(F.jqxInstance).assign;if(M){M(I,K)}if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}}}})}function j(J,H,F,E,I,K){if(!F.jqxSettings){return}var G=f(F.jqxSettings)(J);if(!G){return}if(!G.apply){G.apply=G[E]=function(){var L=arguments;var M=new Array();if(L.length==0){return true}h.each(D[I.$id+E+F.jqxSettings],function(N,O){var P=this;M.push({widgetName:E,element:P,result:h.jqx.jqxWidgetProxy(E,P,L)})});if(M.length==1){return M[0].result}return M};G.digest=function(){if(!/^\$(digest|apply)$/.test(J.$root.$$phase)){J.$digest()}};G.refresh=function(P,O){var M={};var L=h(H)[E]("getInstance");h.each(G,function(Q,S){if(Q==="created"||Q==="propertyChanged"||Q=="data"||Q=="refresh"||Q==E||Q=="apply"){return true}var R=L.events||L._events;if((R&&R.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(P!=i&&P.indexOf(Q)===-1){return true}M[Q]=S});if(M!=={}){if(O){h.each(M,function(Q,R){G[Q]=L[Q]});if(J.$root.$$phase!="$apply"&&J.$root.$$phase!="$digest"){J.$apply()}}else{h.each(D[I.$id+E+F.jqxSettings],function(Q,R){h(this).jqxProxy(M)});if(F.jqxWatchSettings!=i){if(I){var N=f(F.jqxSettings)(I);h.each(N,function(Q,U){if(Q.match(/(source|propertyChanged|created|data|apply|refresh)/g)){return true}var S=L.events||L._events;if((S&&S.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(Q===E){return true}if(!p[F.jqxSettings+"."+Q]){var T=Q;var R=I.$watch(F.jqxSettings+"."+Q,function(X,W){if(X!=W){if(q.equals(X,W)){return}var V={};V[T]=X;h.each(D[I.$id+E+F.jqxSettings],function(aa,ab){var Z=y(E,h(this),V,X,W);if(!Z){h(this).jqxProxy(V)}});var Y=q.extend({},J.$eval(F.jqxSettings));if(F.jqxSettings&&Y&&Y.propertyChanged){Y.propertyChanged(T,W,X)}}},true);p[F.jqxSettings+"."+Q]=R}})}}}}if(e[H[0].id]){M={};h.each(e[H[0].id],function(){if(P!=i&&P.indexOf(h.camelCase(this.value.substring(4)))===-1){return true}M[h.camelCase(this.value.substring(4))]=J.$eval(this.label);if(O){var Q=h.parse(this.label)(J).assign;if(Q){Q(J,L[h.camelCase(this.value.substring(4))])}}});if(!O){h.each(D[I.$id+E+F.jqxSettings],function(Q,R){h(this).jqxProxy(M)})}else{if(J.$root.$$phase!="$apply"&&J.$root.$$phase!="$digest"){J.$apply()}}}};D[I.$id+E+F.jqxSettings]=new Array();D[I.$id+E+F.jqxSettings].push(K)}else{if(!D[I.$id+E+F.jqxSettings]){D[I.$id+E+F.jqxSettings]=new Array()}D[I.$id+E+F.jqxSettings].push(K)}}function m(O,J,N,F,K,H,I){var L=/(jqxGrid|jqxTree|jqxMenu|jqxDataTable|jqxTreeGrid|jqxListBox|jqxTreeMap|jqxComboBox|jqxDropDownList|jqxChart)/ig;if(N.jqxSettings&&H&&H.source===i&&N.jqxSource===i&&F.match(L)){if(F.match(/(jqxTree|jqxMenu)/ig)){if(J[0].innerHTML.toLowerCase().indexOf("ul")===-1){H.source=[]}}else{H.source=[]}}if(H.source!==i&&N.jqxSettings){H.source=a(O,J,N,H.source,K,F,I)}else{if(N.jqxSource!==i){var E=q.extend({},O.$eval(N.jqxSource));var G=N.jqxSource&&N.jqxSource.dataBind?true:false;if(G){H.source=a(O,J,N,N.jqxSource,K,F,I)}else{H.source=a(O,J,N,E,K,F,I)}}}var M=O.$watch(N.ngDisabled,function(R,Q){if(R!=i){if(R!=Q||h(J).jqxProxy("disabled")!==R){var P={};P.disabled=R;h(J).jqxProxy(P)}}});I.push(M)}function n(Q,J,P,E,N){var H=new Array();var G=q.extend({},Q.$eval(P.jqxSettings));m(Q,J,P,E,N,G,H);var L={};var K={};if(e[J[0].id]){h.each(e[J[0].id],function(){var Y=this.label;var aa=this.value;var V=h.camelCase(aa.substring("4"));if(typeof P[Y]!=="undefined"){var T=Q.$eval(P[Y]);if(T===i&&h.type(P[Y])==="string"){T=P[Y]}if(V=="instance"){return true}if(h.type(T)==="array"&&E!=="source"){T=T.slice(0)}else{if(h.type(T)==="object"&&E!=="source"){T=h.extend({},T)}}var U=/(aggregatesrenderer|tooltipFormatFunction|labelsFormatFunction|rendergridrows|draw|renderFiles|initTools|initFeedBack|onTargetDrop|drawBefore|dragStart|dragEnd|onDropTargetEnter|onDropTargetLeave|onDrag|createCommand|ready|render|initrowdetails|initTabContent|initContent|renderer|renderToolbar|renderStatusBar|groupsrenderer|pagerrenderer|groupcolumnrenderer|updatefilterconditions|handlekeyboardnavigation|updatefilterpanel|rendered|virtualModeCreateRecords|virtualModeRecordCreating|search|selectionRenderer)/ig;var S=/(searchMode)/ig;var W=/(ready|aggregatesrenderer|initrowdetails|initTabContent|initContent|renderToolbar|renderStatusBar|pagerRenderer)/ig;if(h.isFunction(T)&&!V.match(U)){K[index]=T}else{if(V.match(U)&&!V.match(S)){var X=function(){var ab=T.apply(this,arguments);if(V.match(W)&&!/^\$(digest|apply)$/.test(Q.$root.$$phase)){Q.$digest()}return ab};L[V]=X;return true}L[V]=T}var Z=function(af,ad){if(af!=ad){if(q.equals(af,ad)){return}var ae=h.camelCase(aa.substring("4"));if(ae=="watch"){if(P.jqxWatch.indexOf(",")>=0||P.jqxWatch.indexOf("[")>=0){var ah=P.jqxWatch;ah=ah.replace("[","");ah=ah.replace("]","");ah=ah.trim();ah=ah.split(",");h.each(ah,function(al,ao){var ap=this.split(".");for(var am=0;am<ap.length;am++){if(ap[am] in h(J).data().jqxWidget){ae=ap[am];break}else{if(ap[am].toLowerCase() in h(J).data().jqxWidget){ae=ap[am].toLowerCase();break}}}var aj={};aj[ae]=af[al];var ak=y(E,h(J),aj,af,ad);if(!ak){h(J).jqxProxy(aj);var an=q.extend({},Q.$eval(P.jqxSettings));if(P.jqxSettings&&an&&an.propertyChanged){an.propertyChanged(ae,ad,af)}}});return}var ah=P.jqxWatch.split(".");for(var ag=0;ag<ah.length;ag++){if(ah[ag] in h(J).data().jqxWidget){ae=ah[ag];break}else{if(ah[ag].toLowerCase() in h(J).data().jqxWidget){ae=ah[ag].toLowerCase();break}}}}var ab={};ab[ae]=af;var ac=y(E,h(J),ab,af,ad);if(!ac){h(J).jqxProxy(ab);var ai=q.extend({},Q.$eval(P.jqxSettings));if(P.jqxSettings&&ai&&ai.propertyChanged){ai.propertyChanged(ae,ad,af)}}}};if(V=="watch"){delete L[V];var Z=Q.$watch(P[Y],Z,true);H.push(Z)}else{var Z=Q.$watch(P[Y],Z);H.push(Z)}}})}if(J[0].id==""){if(i==c[E]){c[E]=0}J[0].id=E+c[E]++}var F=h(J)[E];if(!F){throw new Error("Missing required JavaScript references for: "+E);return null}h.each(G,function(V,W){if(V==="data"||V==="created"||V==="propertyChanged"){return true}var T=/(aggregatesrenderer|tooltipFormatFunction|labelsFormatFunction|rendergridrows|renderFiles|initTools|draw|drawBefore|dragStart|dragEnd|initFeedBack|onTargetDrop|onDropTargetEnter|onDropTargetLeave|onDrag|createCommand|ready|render|initrowdetails|initTabContent|initContent|renderer|renderToolbar|renderStatusBar|groupsrenderer|pagerrenderer|groupcolumnrenderer|updatefilterconditions|handlekeyboardnavigation|updatefilterpanel|rendered|virtualModeCreateRecords|virtualModeRecordCreating|search|selectionRenderer)/ig;var U=/(searchMode)/ig;var S=/(ready|aggregatesrenderer|initrowdetails|initTabContent|initContent|renderToolbar|renderStatusBar|pagerRenderer)/ig;if(h.isFunction(W)&&!V.match(T)){K[V]=W}else{if(V.match(T)&&!V.match(U)){var X=function(){var Y=W.apply(this,arguments);if(V.match(S)&&!/^\$(digest|apply)$/.test(Q.$root.$$phase)){Q.$digest()}return Y};L[V]=X;return true}if(h.type(W)==="array"&&V!=="source"){W=W.slice(0)}else{if(h.type(W)==="object"&&V!=="source"){W=h.extend({},W)}}L[V]=W}});k(Q,J,P,E,N,K);var M=J[0];j(Q,J,P,E,N,M);var I=h(J)[E](L);var R=h(J)[E]("getInstance");B(Q,J,P,E,N,G,M,R,L,H);var O=Q.$on("$destroy",function(){if(R&&R.destroy&&!R.isDestroyed){R.isDestroyed=true;if(h(J).parents().length>0){h(J)[E]("destroy")}R=null}else{h(J).remove();R=null}for(var S=0;S<H.length;S++){H[S]()}L=[];K=[];O()});return R}function B(O,H,N,E,K,G,J,P,I,F){if(N.jqxSettings){if(N.jqxWatchSettings!=i){if(K){var M=f(N.jqxSettings)(K);h.each(M,function(Q,U){if(Q.match(/(source|created|propertyChanged|data|apply|refresh)/g)){return true}var S=P.events||P._events;if((S&&S.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(Q===E){return true}if(I.hasOwnProperty(Q)){var T=Q;var R=K.$watch(N.jqxSettings+"."+Q,function(Y,X){if(Y!=X){if(q.equals(Y,X)){return}var V={};V[T]=Y;var W=y(E,h(H),V,Y,X);if(!W){h(H).jqxProxy(V);var Z=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&Z&&Z.propertyChanged){Z.propertyChanged(T,X,Y)}}}},true);p[N.jqxSettings+"."+Q]=R;F.push(R)}})}}var L=O.$watch(N.jqxSettings,function(U,T){var R={};var Q=false;if(U!=T){if(q.equals(U,T)){return}h.each(U,function(X,aa){if(X==="source"){if(T.source!=null){return true}else{var W=a(O,H,N,aa,K,F);R[X]=W}}if(X==="created"){return true}if(X==="propertyChanged"){return true}if(X==="data"){O.$apply();return true}var Y=P.events||P._events;if((Y&&Y.indexOf(X)>=0)||X.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}var Z=function(ac){if(N.jqxWatchSettings!=i){if(K){if(!p[N.jqxSettings+"."+ac]){var ac=X;var ab=K.$watch(N.jqxSettings+"."+ac,function(ag,af){if(ag!=af){if(q.equals(ag,af)){return}var ad={};ad[ac]=ag;var ae=y(E,h(H),ad,ag,af);if(!ae){h(H).jqxProxy(ad);var ah=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&ah&&ah.propertyChanged){ah.propertyChanged(ac,af,ag)}}}},true);p[N.jqxSettings+"."+ac]=ab;F.push(ab)}}}};if(!(aa instanceof Object)&&(T==null||aa!==T[X])){R[X]=aa;Z(X);Q=true}else{if(X!==E&&X!=="apply"&&X!=="created"&&X!=="propertyChanged"&&(aa instanceof Object)&&(T==null||(A(aa)!==A(T[X]))||(A(aa)==""&&A(T[X])==""))){R[X]=aa;Z(X);Q=true}}});if(R!=={}&&Q){var S=y(E,h(H),R,U,T);if(!S){h(H).jqxProxy(R);var V=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&V&&V.propertyChanged){V.propertyChanged(index,T,U)}}}}});F.push(L)}}function w(K,G,S,E){var P=K[0].nodeName.toLowerCase();var Q=h(K).parent();var H=h(K).html();var R=Q&&Q[0]&&Q[0].nodeName.toLowerCase()=="ng-include"?true:false;if(h(K).parents("[ui-view]").length>0){R=true}if(R&&!G){h(K).attr("data-jqx-ng-include",true);return}var L='<div id="jqx-ngwidget">'+H+"</div>";if(P.indexOf("jqx")>=0){var I=K[0].attributes;var M=K;if(P.indexOf("input")>=0){if(P.indexOf("date")>=0||P.indexOf("number")>=0){h(K).replaceWith('<div id="jqx-ngwidget"></div>')}else{if(P.indexOf("password")>=0){h(K).replaceWith('<input id="jqx-ngwidget" type="password"/>')}else{h(K).replaceWith('<input id="jqx-ngwidget"/>')}}}else{if(P.indexOf("jqx-button")>=0&&P.indexOf("jqx-button-group")==-1){h(K).replaceWith('<button id="jqx-ngwidget">'+H+"</button>")}else{if(P.indexOf("jqx-toggle-button")>=0){h(K).replaceWith('<button id="jqx-ngwidget">'+H+"</button>")}else{if(P.indexOf("jqx-link-button")>=0){if(h(K).find("a").length>0){var J=h(K).find("a");J.attr("id","jqx-ngwidget");h(K).replaceWith(J)}else{h(K).replaceWith('<a id="jqx-ngwidget">'+H+"</a>")}}else{if(P.indexOf("jqx-data-table")>=0||P.indexOf("jqx-grid")>=0){if(h(K).find("tr").length>0){h(K).replaceWith('<div id="jqx-ngwidget">'+H+"</div>")}else{h(K).replaceWith('<div id="jqx-ngwidget"></div>')}}else{if(P.indexOf("jqx-list-box")>=0||P.indexOf("jqx-drop-down-list")>=0||P.indexOf("jqx-combo-box")>=0){if(h(K).find("option").length>0){h(K).replaceWith('<select id="jqx-ngwidget">'+H+"</select>")}else{if(h(K).find("li").length>0){h(K).replaceWith('<ul id="jqx-ngwidget">'+H+"</ul>")}else{h(K).replaceWith('<div id="jqx-ngwidget"></div>')}}}else{if(P.indexOf("jqx-list-menu")>=0){h(K).replaceWith('<ul id="jqx-ngwidget" data-role="listmenu">'+H+"</ul>")}else{if(P.indexOf("jqx-tooltip")>=0){var F=h(K).children();F.detach();h(F).insertAfter(h(K));h.each(I,function(){if(h(F)[0]){h(F)[0].setAttribute(this.name,this.value)}});h(K).remove();K=F}else{h(K).replaceWith(L)}}}}}}}}M=Q.find("#jqx-ngwidget").removeAttr("id");h.each(I,function(){if(h(M)[0]){h(M)[0].setAttribute(this.name,this.value)}})}var O=K[0];if(M&&M.length){O=M[0]}var N=this;if(O.id==""){if(i==c[E]){c[E]=0}O.id=E+c[E]++}h.each(S,function(T,U){if(T!==E&&T!="jqxNgModel"&&T.indexOf("jqxOn")==-1&&T!="jqxData"&&T!="jqxWatchSettings"&&T!="jqxCreated"&&T!="jqxSource"&&T!="jqxCreate"&&T!="jqxSettings"&&T.indexOf("jqx")>=0){if(!e[O.id]){e[O.id]=new Array()}e[O.id].push({label:T,value:S.$attr[T]})}});return h(O)}function t(G,H){function F(L){H.filesCount=0;var I=L.length;if(L.scripts){var K=L.scripts.length;for(var N in L.deps){K++;var M=L.deps[N];K+=M.length}I=K}var J=function(S,P){var R=0;var O=0;var Q=function(){var Y=S[R];var T=h('script[src*="'+Y+'"]').length;if(T===0){var V=document.getElementsByTagName("head")[0];var U=document.createElement("script");U.type="text/javascript";var X=function(){H.filesCount++;O++;g[Y]=false;if(r[Y]!=i){h.each(r[Y],function(){this.documentReady=true;if(this.scriptsLoaded){this.scriptsLoaded()}})}r[Y]=true;if(H.filesCount==I){H.documentReady=true;if(H.scriptsLoaded){H.scriptsLoaded()}return}if(O===S.length&&P){P()}};if(U.addEventListener){U.addEventListener("load",X,false)}else{if(window.attachEvent){U.attachEvent("onreadystatechange",function(){if(U.readyState=="complete"||U.readyState=="loaded"){X()}})}}g[Y]=true;var W=l;if(Y=="globalize.js"){W=l+"globalization/"}U.src=W+Y;V.appendChild(U);R++;if(R<S.length){Q()}}else{H.filesCount++;if(H.filesCount==I){if(r[Y]===true||g[Y]===i){H.documentReady=true;if(H.scriptsLoaded){H.scriptsLoaded()}return}else{if(r[Y]==i){r[Y]=new Array()}r[Y].push(H);return}}R++;if(R<S.length){Q()}O++;if(O===S.length&&P){P()}}};Q()};if(!L.scripts){J(L)}else{J(L.scripts);h.each(L.deps,function(Q,P){var O=new Array();O.push(Q);J(O,function(){J(P)})})}}var E={jqxCalendar:["jqxdatetimeinput.js","jqxcalendar.js","jqxtooltip.js","globalize.js","jqxbuttons.js"],jqxDateTimeInput:["jqxdatetimeinput.js","jqxcalendar.js","jqxtooltip.js","globalize.js","jqxbuttons.js"],jqxListBox:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js"],jqxComboBox:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js","jqxcombobox.js"],jqxDropDownList:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js","jqxdropdownlist.js"],jqxGrid:{scripts:["jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js"],deps:{"jqxgrid.js":["jqxgrid.selection.js","jqxgrid.filter.js","jqxgrid.sort.js","jqxgrid.storage.js","jqxgrid.grouping.js","jqxgrid.pager.js","jqxgrid.columnsresize.js","jqxgrid.columnsreorder.js","jqxgrid.edit.js","jqxgrid.export.js","jqxgrid.aggregates.js"],"jqxdata.js":["jqxdata.export.js"]}},jqxDataTable:{scripts:["jqxdatatable.js","jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js","jqxinput.js"],deps:{"jqxdata.js":["jqxdata.export.js"]}},jqxTreeGrid:{scripts:["jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js","jqxinput.js"],deps:{"jqxdatatable.js":["jqxtreegrid.js"],"jqxdata.js":["jqxdata.export.js"]}},jqxCheckBox:["jqxcheckbox.js"],jqxRadioButton:["jqxradiobutton.js"],jqxBulletChart:["jqxbulletchart.js","jqxtooltip.js"],jqxRangeSelector:["jqxrangeselector.js"],jqxScrollView:["jqxbuttons.js","jqxscrollview.js"],jqxSwitchButton:["jqxswitchbutton.js"],jqxTouch:["jqxtouch.js"],jqxColorPicker:["jqxcolorpicker.js"],jqxInput:["jqxinput.js"],jqxEditor:["jqxeditor.js"],jqxNumberInput:["jqxbuttons.js","jqxnumberinput.js"],jqxMaskedInput:["jqxmaskedinput.js"],jqxSlider:["jqxbuttons.js","jqxslider.js"],jqxPanel:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js"],jqxButton:["jqxbuttons.js"],jqxLinkButton:["jqxbuttons.js"],jqxToggleButton:["jqxbuttons.js"],jqxRepeatButton:["jqxbuttons.js"],jqxDropDownButton:["jqxdropdownbutton.js"],jqxNotification:["jqxnotification.js"],jqxDockPanel:["jqxdockpanel.js"],jqxProgressBar:["jqxprogressbar.js"],jqxListMenu:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js","jqxlistmenu.js"],jqxTree:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js","jqxtree.js","jqxdata.js"],jqxMenu:["jqxmenu.js","jqxdata.js"],jqxTabs:["jqxtabs.js","jqxbuttons.js"],jqxDragDrop:["jqxdragdrop.js"],jqxDraw:["jqxdraw.js"],jqxWindow:["jqxwindow.js"],jqxDocking:["jqxwindow.js","jqxdocking.js"],jqxButtonGroup:["jqxbuttons.js","jqxbuttongroup.js"],jqxChart:["jqxdata.js","jqxchart.js"],jqxNavigationBar:["jqxnavigationbar.js"],jqxExpander:["jqxexpander.js"],jqxResponse:["jqxresponse.js"],jqxPasswordInput:["jqxpasswordinput.js"],jqxRating:["jqxrating.js"],jqxSplitter:["jqxbuttons.js","jqxsplitter.js"],jqxValidator:["jqxvalidator.js"],jqxTooltip:["jqxtooltip.js"],jqxGauge:["jqxdraw.js","jqxgauge.js"],jqxLinearGauge:["jqxdraw.js","jqxgauge.js"],jqxTreeMap:["jqxtreemap.js"],jqxRibbon:["jqxbuttons.js","jqxribbon.js"],jqxFormattedInput:["jqxbuttons.js","jqxformattedinput.js"],jqxComplexInput:["jqxbuttons.js","jqxcomplexinput.js"],jqxToolBar:["jqxtoolbar.js"],jqxFileUpload:["jqxfileupload.js"],jqxNavBar:["jqxnavbar.js"]};F(E[G])}h.jqx.angularCompile=function(F,E){if(F.length>0){F=F[0]}var H=q.element(F);var G=H.injector();if(E==i){E=F.innerHTML}G.invoke(["$compile","$rootScope",function(K,I){var J=H.html(E).scope();K(H)(J||I);if(!/^\$(digest|apply)$/.test(I.$$phase)){I.$digest()}else{if(!/^\$(digest|apply)$/.test(J.$$phase)){J.$digest()}}}])};function o(E){var F={};var G=function(R,L,Q,J,H){if(h(L).attr("data-jqx-ng-include")){h(L).removeAttr("data-jqx-ng-include");var K=h(L.children()).detach();L=w(L,true,Q,E);L.append(K);z(L)(R);R=R.$parent}if(h.jqx.AMD){var N={};d[E]=false;N.documentReady=false;t(E,N)}var I=L[0].style.visibility;var M=L[0].style.display;L[0].style.visibility="hidden";L[0].style.display="none";var P=R;var O=v(function(){v.cancel(O);O=i;var V=function(){var ab=J[0];L[0].style.visibility=I;L[0].style.display=M;var ac=n(R,L,Q,E,P);var af=E.toLowerCase();var ae=E.match(/(input|list|radio|checkbox|combobox|rating|slider|scrollbar|progress|range|editor|picker|range|gauge|calendar|switch|button)/ig);var ad={element:L[0],name:E,instance:h(L).data().jqxWidget,id:L[0].id,scope:R};var X=function(){R.$emit(E+"Created",ad);if(Q.jqxSettings&&f(Q.jqxSettings)(R).created){C(function(){var ag=f(Q.jqxSettings)(R).created;ag(ad)})}if(Q.jqxCreated){C(function(){var ag=f(Q.jqxCreated)(R);ag(ad)})}};if(E==="jqxGrid"||E==="jqxDataTable"){var Y=0;var Z=v(function(){if(h(L).data().jqxWidget.initializedcall||Y==25){v.cancel(Z);Z=i;X()}Y++},100)}else{X()}C(function aa(){if(ab){ab.$render=function(){var aj=ab.$viewValue;if(aj===i){aj=ab.$modelValue}if(E==="jqxRadioButton"){if(R.$eval(h(L).attr("value"))==ab.$viewValue){h(L).val(true)}else{if(R.$eval(h(L).attr("value"))=="true"&&ab.$viewValue==true){h(L).val(true)}else{h(L).val(false)}}return}else{if(E==="jqxCheckBox"){if(R.$eval(h(L).attr("ng-true-value"))==ab.$viewValue){h(L).val(true)}if(R.$eval(h(L).attr("ng-false-value"))==ab.$viewValue){h(L).val(false)}else{h(L).val(ab.$viewValue)}return}}if(aj!=h(L).val()){C(function(){h(L).val(aj)})}};if(E==="jqxRadioButton"){if(R.$eval(h(L).attr("value"))==ab.$viewValue){h(L).val(true)}else{if(R.$eval(h(L).attr("value"))=="true"&&ab.$viewValue==true){h(L).val(true)}else{h(L).val(false)}}}else{if(E==="jqxCheckBox"){if(R.$eval(h(L).attr("ng-true-value"))==ab.$viewValue){h(L).val(true)}if(R.$eval(h(L).attr("ng-false-value"))==ab.$viewValue){h(L).val(false)}else{h(L).val(ab.$viewValue)}}else{if(E==="jqxDropDownList"||E==="jqxComboBox"||E==="jqxListBox"||E==="jqxInput"){if(Q.jqxNgModel!=i){var ag=h(L).data().jqxWidget;if(E!="jqxInput"){if(ag.valueMember){ag.selectItem(ab.$viewValue[ag.valueMember])}else{if(ag.displayMember){ag.selectItem(ab.$viewValue[ag.displayMember])}else{h(L).val(ab.$viewValue)}}}else{h(L).val(ab.$viewValue)}}else{h(L).val(ab.$viewValue)}}else{if(E==="jqxDateTimeInput"||E==="jqxCalendar"){if(Q.jqxNgModel!=i){var ag=h(L).data().jqxWidget;if(ag.selectionMode=="range"){ag.setRange(ab.$viewValue)}else{ag.setDate(ab.$viewValue)}}else{h(L).val(ab.$viewValue)}}else{if(E=="jqxToggleButton"){var ag=h(L).data().jqxWidget;ag.toggled=true;ag.refresh()}else{h(L).val(ab.$viewValue)}}}}}if(ae){var ah="keyup change";if(E=="jqxScrollBar"){ah="valueChanged"}if(E=="jqxToggleButton"){ah="keyup click"}if(E=="jqxInput"){ah="keyup change select"}var ai;h(L).on(ah,function(ak){var aj=ak.args;if(ai){C.cancel(ai)}ai=C(function(){if(E==="jqxRadioButton"){if(aj.type!="api"){ab.$setViewValue(R.$eval(h(L).attr("value")))}}else{if(E==="jqxCheckBox"){if(h(L).attr("ng-true-value")!=i&&aj.checked){ab.$setViewValue(h(L).attr("ng-true-value"))}else{if(h(L).attr("ng-false-value")!=i&&!aj.checked){ab.$setViewValue(h(L).attr("ng-false-value"))}else{ab.$setViewValue(h(L).val())}}}else{if(E==="jqxDropDownList"||E==="jqxComboBox"||E==="jqxListBox"||E==="jqxInput"){var am=h(L).val();if(Q.jqxNgModel!=i){var al=h(L).data().jqxWidget;if(al.getSelectedItem){am=al.getSelectedItem();if(am.originalItem){am=am.originalItem}}if(E==="jqxInput"){am=al.selectedItem}ab.$setViewValue(am)}else{ab.$setViewValue(am)}}else{if(E==="jqxDateTimeInput"||E==="jqxCalendar"){if(Q.jqxNgModel!=i){var al=h(L).data().jqxWidget;if(al.selectionMode=="range"){ab.$setViewValue(al.getRange())}else{ab.$setViewValue(al.getDate())}}else{if(h.type(ab.$viewValue)==="date"){var al=h(L).data().jqxWidget;if(al.selectionMode=="range"){ab.$setViewValue(al.getRange())}else{ab.$setViewValue(al.getDate())}}else{ab.$setViewValue(h(L).val())}}}else{if(E=="jqxToggleButton"){var al=h(L).data().jqxWidget;ab.$setViewValue(al.toggled)}else{ab.$setViewValue(h(L).val())}}}}}R.$emit(E+"ModelChange",ab.$viewValue)})})}}})};if(Q.ngShow!==i&&Q.jqxCreate===i){var U=R.$watch(Q.ngShow,function(Y,X){if(Y){V();U()}});return}var W=function(){if(Q.jqxCreate!=null||Q.jqxCreate!=null){if(Q.jqxCreate===true||(Q.jqxCreate!==null&&h.type(Q.jqxCreate)=="object")){V()}else{var X=R.$watch(Q.jqxCreate,function(Z,Y){if(typeof Z=="number"){C(V,Z);X()}else{if(Z){V();X()}}})}}else{V()}};if(h.jqx.AMD){var T=function(){var X=true;for(var Y in d){if(!d[Y]){X=false;break}}if(X){if(!x){R.$emit("jQWidgetsScriptsLoaded");x=true}for(var Y in d){h.each(d[Y],function(){this()});d[Y]=new Array()}}};if(N.documentReady){var S={element:L[0],name:E,scope:R};R.$emit(E+"ScriptsLoaded",S);if(!d[E]){d[E]=new Array()}d[E].push(W);T()}else{N.scriptsLoaded=function(){var X={element:L[0],name:E,scope:R};R.$emit(E+"ScriptsLoaded",X);if(!d[E]){d[E]=new Array()}d[E].push(W);T()}}}else{W()}})};b.directive(E,["$timeout","$interval","$parse","$compile","$log",function(M,I,N,L,K){C=M;v=I;f=N;z=L;s=K;var J={};var H;return{restrict:"ACE",require:["?ngModel"],scope:false,template:function(P,O){w(P,false,O,E);H=this.scope},controller:["$scope","$attrs","$element","$transclude",function(R,O,Q,P){}],compile:function(P,O,Q){return{pre:function(V,T,R,U,S){},post:function(V,T,R,U,S){G(V,T,R,U,S)}}},link:G}}])}o("jqxBulletChart");o("jqxButtonGroup");o("jqxButton");o("jqxRepeatButton");o("jqxToggleButton");o("jqxLinkButton");o("jqxCalendar");o("jqxChart");o("jqxCheckBox");o("jqxComplexInput");o("jqxColorPicker");o("jqxComboBox");o("jqxDataTable");o("jqxDateTimeInput");o("jqxDocking");o("jqxDockPanel");o("jqxDragDrop");o("jqxDraw");o("jqxDropDownButton");o("jqxDropDownList");o("jqxEditor");o("jqxExpander");o("jqxFormattedInput");o("jqxFileUpload");o("jqxGauge");o("jqxLinearGauge");o("jqxGrid");o("jqxInput");o("jqxListBox");o("jqxListMenu");o("jqxMaskedInput");o("jqxMenu");o("jqxNavigationBar");o("jqxNavBar");o("jqxNotification");o("jqxNumberInput");o("jqxPanel");o("jqxPasswordInput");o("jqxProgressBar");o("jqxRadioButton");o("jqxRangeSelector");o("jqxRating");o("jqxRibbon");o("jqxScrollBar");o("jqxScrollView");o("jqxSlider");o("jqxSplitter");o("jqxSwitchButton");o("jqxTabs");o("jqxToolBar");o("jqxTooltip");o("jqxTouch");o("jqxTree");o("jqxTreeGrid");o("jqxTreeMap");o("jqxValidator");o("jqxWindow")})(jqxBaseFramework,window.angular); | ||
if(!jqxBaseFramework){var jqxBaseFramework=window.minQuery||window.jQuery}(function(h,q,i){if(!q){return}h.jqx=h.jqx||{};h.jqx.AMD=false;var b=q.module("jqwidgets",[]);var u=q.module("jqwidgets-amd",[],function(){h.jqx.AMD=true});var f=null;var C=null;var v=null;var z=null;var s=null;var c=new Array();var D=new Array();var p=new Array();var r=new Array();var g=new Array();var d=new Array();var e={};var x=false;var l=function(){var E=document.getElementsByTagName("script");var G,F,H;for(G=0;F=E[G];G++){H=F.src;if(H.indexOf("jqxcore.js")>=0){var I=H.substring(0,H.indexOf("jqxcore.js"));break}}return I}();function y(I,J,E,G,F){if(G&&F){switch(I){case"jqxGrid":case"jqxDataTable":case"jqxTreeGrid":if(E.columns){var L=G.columns||G;var H=F.columns||F;if(L.length!=H.length){return false}var K={};h.each(L,function(M,O){var N=this;for(var P in this){if(N[P]!=H[M][P]){var Q=N.datafield||N.dataField;if(!K[Q]){K[Q]={}}K[Q][P]=N[P]}}});if(!h.isEmptyObject(K)){h.each(K,function(N,P){for(var O in P){var M=h(J).jqxProxy("getcolumnproperty",N,O);if(M!==P[O]){h(J).jqxProxy("setcolumnproperty",N,O,P[O])}}});return true}}break}}return false}function a(R,J,Q,I,N,M,E){var F=function(W){if(M==="jqxTree"||M==="jqxMenu"){return W}if(typeof W=="object"){if(W&&W._bindingUpdate!=null){return W}}var V={};var T=false;if(h.isArray(W)||(W instanceof Object&&!W.url&&!(W.localdata||W.localData))){if(M==="jqxChart"){return W}T=true;V.localData=W;V.type="array";if(W[0]){var U=new Array();if(h.type(W[0])=="object"){h.each(W[0],function(Y,Z){var aa={name:Y,type:h.type(Z)};U.push(aa)});V.datafields=U}}}else{if(W&&W.url){V=W}else{if(W&&(W.localdata||W.localData)){V=W}}}if(h.jqx.dataAdapter){var X=new h.jqx.dataAdapter(V);return X}else{if(T){return W}}return null};if(Q.jqxSource!=i){var O=R.$watchCollection(Q.jqxSource,function(V,U){if(V!=U){if(q.equals(V,U)){return}if(V&&U&&V._source&&U._source&&q.equals(V._source,U._source)){return}var T=F(V);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U,V)}}});E.push(O)}else{if(Q.jqxSettings!=i){var L={};var H=null;var P=f(Q.jqxSettings)(R);var K=J.controller();for(var G in K){if(P&&K[G]==P.source){H=G;break}}if(!H){for(var G in R){if(P&&R[G]==P.source){H=G;break}}}if(H){var S="";for(var G in R){if(R[G]==K){S=G;break}}if(S!=""){H=S+"."+H}var O=N.$watchCollection(H,function(W,V){if(W!=V){if(q.equals(W,V)){return}if(W&&V&&W._source&&V._source&&q.equals(W._source,V._source)){return}var U=h.isArray(W)||h.type(W)==="array";if(new Date()-L["jqxSettings.source"]>1000||L=={}||!L["jqxSettings.source"]||U){var T=F(W);h(J).jqxProxy({source:T});var X=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&X&&X.propertyChanged){X.propertyChanged("source",V,W)}L.property=new Date()}}});E.push(O)}var O=R.$watchCollection(Q.jqxSettings+".source",function(V,U){if(V!=U){if(q.equals(V,U)){return}if(V&&U&&V._source&&U._source&&q.equals(V._source,U._source)){return}if(new Date()-L.property>1000||!L["jqxSettings.property"]||L=={}){var T=F(V);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U,V)}L["jqxSettings.source"]=new Date()}}});E.push(O);var O=R.$watchCollection(Q.jqxSettings,function(V,U){if(!V){return}if(!U){var T=F(V.source);h(J).jqxProxy({source:T});return}if(V.source!=U.source){if(q.equals(V.source,U.source)){return}if(V&&U&&V.source&&U.source&&V.source._source&&U.source._source&&q.equals(V.source._source,U.source._source)){return}if(V.source&&U.source&&h.isArray(V.source)&&h.isArray(U.source)){if(A(V.source)==A(U.source)){return}}if(new Date()-L.property>1000||!L["jqxSettings.source"]||L=={}){var T=F(V.source);h(J).jqxProxy({source:T});var W=q.extend({},R.$eval(Q.jqxSettings));if(Q.jqxSettings&&W&&W.propertyChanged){W.propertyChanged("source",U.source,V.source)}L["jqxSettings.source"]=new Date()}}});E.push(O)}}return F(I)}function A(E){if(E==null){return""}var F="";h.each(E,function(H){var J=this;if(H>0){F+=", "}F+="[";var G=0;if(h.type(J)=="object"){for(var I in J){if(G>0){F+=", "}F+="{"+I+":"+J[I]+"}";G++}}else{if(G>0){F+=", "}F+="{"+H+":"+J+"}";G++}F+="]"});return F}function k(I,G,F,E,H,J){h.extend(h.jqx["_"+E+""].prototype,{definedInstance:function(){if(this.element&&this.element!==G[0]){return true}if(this.base&&this.base.element!==G[0]){return true}var K=this;h.each(J,function(N,O){K.addHandler(h(G),N,function(P){I.$parent?h.proxy(O,H)(P):O(P);if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}})});var L=F.$attr;h.each(F,function(Q,R){if(Q.indexOf("jqxOn")>=0){var N=L[Q].substring(7);var P=h.camelCase(N);var O=R;K.addHandler(h(G),P,function(T){T.data=F.data||F.jqxData;if(O.indexOf("(")>=0){var S=O.indexOf("(");var U=f(O.substring(0,S))(I);if(U){U(T)}else{I.$emit(P,T)}}else{I.$emit(O,T)}if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}})}});if(F.jqxInstance){var M=f(F.jqxInstance).assign;if(M){M(I,K)}if(I.$root.$$phase!="$apply"&&I.$root.$$phase!="$digest"){I.$apply()}}}})}function j(J,H,F,E,I,K){if(!F.jqxSettings){return}var G=f(F.jqxSettings)(J);if(!G){return}if(!G.apply){G.apply=G[E]=function(){var L=arguments;var M=new Array();if(L.length==0){return true}h.each(D[I.$id+E+F.jqxSettings],function(N,O){var P=this;M.push({widgetName:E,element:P,result:h.jqx.jqxWidgetProxy(E,P,L)})});if(M.length==1){return M[0].result}return M};G.digest=function(){if(!/^\$(digest|apply)$/.test(J.$root.$$phase)){J.$digest()}};G.refresh=function(P,O){var M={};var L=h(H)[E]("getInstance");h.each(G,function(Q,S){if(Q==="created"||Q==="propertyChanged"||Q=="data"||Q=="refresh"||Q==E||Q=="apply"){return true}var R=L.events||L._events;if((R&&R.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(P!=i&&P.indexOf(Q)===-1){return true}M[Q]=S});if(M!=={}){if(O){h.each(M,function(Q,R){G[Q]=L[Q]});if(J.$root.$$phase!="$apply"&&J.$root.$$phase!="$digest"){J.$apply()}}else{h.each(D[I.$id+E+F.jqxSettings],function(Q,R){h(this).jqxProxy(M)});if(F.jqxWatchSettings!=i){if(I){var N=f(F.jqxSettings)(I);h.each(N,function(Q,U){if(Q.match(/(source|propertyChanged|created|data|apply|refresh)/g)){return true}var S=L.events||L._events;if((S&&S.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(Q===E){return true}if(!p[F.jqxSettings+"."+Q]){var T=Q;var R=I.$watch(F.jqxSettings+"."+Q,function(X,W){if(X!=W){if(q.equals(X,W)){return}var V={};V[T]=X;h.each(D[I.$id+E+F.jqxSettings],function(aa,ab){var Z=y(E,h(this),V,X,W);if(!Z){h(this).jqxProxy(V)}});var Y=q.extend({},J.$eval(F.jqxSettings));if(F.jqxSettings&&Y&&Y.propertyChanged){Y.propertyChanged(T,W,X)}}},true);p[F.jqxSettings+"."+Q]=R}})}}}}if(e[H[0].id]){M={};h.each(e[H[0].id],function(){if(P!=i&&P.indexOf(h.camelCase(this.value.substring(4)))===-1){return true}M[h.camelCase(this.value.substring(4))]=J.$eval(this.label);if(O){var Q=h.parse(this.label)(J).assign;if(Q){Q(J,L[h.camelCase(this.value.substring(4))])}}});if(!O){h.each(D[I.$id+E+F.jqxSettings],function(Q,R){h(this).jqxProxy(M)})}else{if(J.$root.$$phase!="$apply"&&J.$root.$$phase!="$digest"){J.$apply()}}}};D[I.$id+E+F.jqxSettings]=new Array();D[I.$id+E+F.jqxSettings].push(K)}else{if(!D[I.$id+E+F.jqxSettings]){D[I.$id+E+F.jqxSettings]=new Array()}D[I.$id+E+F.jqxSettings].push(K)}}function m(O,J,N,F,K,H,I){var L=/(jqxGrid|jqxTree|jqxMenu|jqxDataTable|jqxTreeGrid|jqxListBox|jqxTreeMap|jqxComboBox|jqxDropDownList|jqxChart)/ig;if(N.jqxSettings&&H&&H.source===i&&N.jqxSource===i&&F.match(L)){if(F.match(/(jqxTree|jqxMenu)/ig)){if(J[0].innerHTML.toLowerCase().indexOf("ul")===-1){H.source=[]}}else{H.source=[]}}if(H.source!==i&&N.jqxSettings){H.source=a(O,J,N,H.source,K,F,I)}else{if(N.jqxSource!==i){var E=q.extend({},O.$eval(N.jqxSource));var G=N.jqxSource&&N.jqxSource.dataBind?true:false;if(G){H.source=a(O,J,N,N.jqxSource,K,F,I)}else{H.source=a(O,J,N,E,K,F,I)}}}var M=O.$watch(N.ngDisabled,function(R,Q){if(R!=i){if(R!=Q||h(J).jqxProxy("disabled")!==R){var P={};P.disabled=R;h(J).jqxProxy(P)}}});I.push(M)}function n(Q,J,P,E,N){var H=new Array();var G=q.extend({},Q.$eval(P.jqxSettings));m(Q,J,P,E,N,G,H);var L={};var K={};if(e[J[0].id]){h.each(e[J[0].id],function(){var Y=this.label;var aa=this.value;var V=h.camelCase(aa.substring("4"));if(typeof P[Y]!=="undefined"){var T=Q.$eval(P[Y]);if(T===i&&h.type(P[Y])==="string"){T=P[Y]}if(V=="instance"){return true}if(h.type(T)==="array"&&E!=="source"){T=T.slice(0)}else{if(h.type(T)==="object"&&E!=="source"){T=h.extend({},T)}}var U=/(columnmenuopening|columnmenuclosing|aggregatesrenderer|tooltipFormatFunction|labelsFormatFunction|rendergridrows|draw|renderFiles|initTools|initFeedBack|onTargetDrop|drawBefore|dragStart|dragEnd|onDropTargetEnter|onDropTargetLeave|onDrag|createCommand|ready|render|initrowdetails|initTabContent|initContent|renderer|renderToolbar|renderStatusBar|groupsrenderer|pagerrenderer|groupcolumnrenderer|updatefilterconditions|handlekeyboardnavigation|updatefilterpanel|rendered|virtualModeCreateRecords|virtualModeRecordCreating|search|selectionRenderer)/ig;var S=/(searchMode)/ig;var W=/(ready|aggregatesrenderer|initrowdetails|initTabContent|initContent|renderToolbar|renderStatusBar|pagerRenderer)/ig;if(h.isFunction(T)&&!V.match(U)){K[index]=T}else{if(V.match(U)&&!V.match(S)){var X=function(){var ab=T.apply(this,arguments);if(V.match(W)&&!/^\$(digest|apply)$/.test(Q.$root.$$phase)){Q.$digest()}return ab};L[V]=X;return true}L[V]=T}var Z=function(af,ad){if(af!=ad){if(q.equals(af,ad)){return}var ae=h.camelCase(aa.substring("4"));if(ae=="watch"){if(P.jqxWatch.indexOf(",")>=0||P.jqxWatch.indexOf("[")>=0){var ah=P.jqxWatch;ah=ah.replace("[","");ah=ah.replace("]","");ah=ah.trim();ah=ah.split(",");h.each(ah,function(al,ao){var ap=this.split(".");for(var am=0;am<ap.length;am++){if(ap[am] in h(J).data().jqxWidget){ae=ap[am];break}else{if(ap[am].toLowerCase() in h(J).data().jqxWidget){ae=ap[am].toLowerCase();break}}}var aj={};aj[ae]=af[al];var ak=y(E,h(J),aj,af,ad);if(!ak){h(J).jqxProxy(aj);var an=q.extend({},Q.$eval(P.jqxSettings));if(P.jqxSettings&&an&&an.propertyChanged){an.propertyChanged(ae,ad,af)}}});return}var ah=P.jqxWatch.split(".");for(var ag=0;ag<ah.length;ag++){if(ah[ag] in h(J).data().jqxWidget){ae=ah[ag];break}else{if(ah[ag].toLowerCase() in h(J).data().jqxWidget){ae=ah[ag].toLowerCase();break}}}}var ab={};ab[ae]=af;var ac=y(E,h(J),ab,af,ad);if(!ac){h(J).jqxProxy(ab);var ai=q.extend({},Q.$eval(P.jqxSettings));if(P.jqxSettings&&ai&&ai.propertyChanged){ai.propertyChanged(ae,ad,af)}}}};if(V=="watch"){delete L[V];var Z=Q.$watch(P[Y],Z,true);H.push(Z)}else{var Z=Q.$watch(P[Y],Z);H.push(Z)}}})}if(J[0].id==""){if(i==c[E]){c[E]=0}J[0].id=E+c[E]++}var F=h(J)[E];if(!F){throw new Error("Missing required JavaScript references for: "+E);return null}h.each(G,function(V,W){if(V==="data"||V==="created"||V==="propertyChanged"){return true}var T=/(columnmenuopening|columnmenuclosing|aggregatesrenderer|tooltipFormatFunction|labelsFormatFunction|rendergridrows|renderFiles|initTools|draw|drawBefore|dragStart|dragEnd|initFeedBack|onTargetDrop|onDropTargetEnter|onDropTargetLeave|onDrag|createCommand|ready|render|initrowdetails|initTabContent|initContent|renderer|renderToolbar|renderStatusBar|groupsrenderer|pagerrenderer|groupcolumnrenderer|updatefilterconditions|handlekeyboardnavigation|updatefilterpanel|rendered|virtualModeCreateRecords|virtualModeRecordCreating|search|selectionRenderer)/ig;var U=/(searchMode)/ig;var S=/(ready|aggregatesrenderer|initrowdetails|initTabContent|initContent|renderToolbar|renderStatusBar|pagerRenderer)/ig;if(h.isFunction(W)&&!V.match(T)){K[V]=W}else{if(V.match(T)&&!V.match(U)){var X=function(){var Y=W.apply(this,arguments);if(V.match(S)&&!/^\$(digest|apply)$/.test(Q.$root.$$phase)){Q.$digest()}return Y};L[V]=X;return true}if(h.type(W)==="array"&&V!=="source"){W=W.slice(0)}else{if(h.type(W)==="object"&&V!=="source"){W=h.extend({},W)}}L[V]=W}});k(Q,J,P,E,N,K);var M=J[0];j(Q,J,P,E,N,M);var I=h(J)[E](L);var R=h(J)[E]("getInstance");B(Q,J,P,E,N,G,M,R,L,H);var O=Q.$on("$destroy",function(){if(R&&R.destroy&&!R.isDestroyed){R.isDestroyed=true;if(h(J).parents().length>0){h(J)[E]("destroy")}R=null}else{h(J).remove();R=null}for(var S=0;S<H.length;S++){H[S]()}L=[];K=[];O()});return R}function B(O,H,N,E,K,G,J,P,I,F){if(N.jqxSettings){if(N.jqxWatchSettings!=i){if(K){var M=f(N.jqxSettings)(K);h.each(M,function(Q,U){if(Q.match(/(source|created|propertyChanged|data|apply|refresh)/g)){return true}var S=P.events||P._events;if((S&&S.indexOf(Q)>=0)||Q.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}if(Q===E){return true}if(I.hasOwnProperty(Q)){var T=Q;var R=K.$watch(N.jqxSettings+"."+Q,function(Y,X){if(Y!=X){if(q.equals(Y,X)){return}var V={};V[T]=Y;var W=y(E,h(H),V,Y,X);if(!W){h(H).jqxProxy(V);var Z=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&Z&&Z.propertyChanged){Z.propertyChanged(T,X,Y)}}}},true);p[N.jqxSettings+"."+Q]=R;F.push(R)}})}}var L=O.$watch(N.jqxSettings,function(U,T){var R={};var Q=false;if(U!=T){if(q.equals(U,T)){return}h.each(U,function(X,aa){if(X==="source"){if(T.source!=null){return true}else{var W=a(O,H,N,aa,K,F);R[X]=W}}if(X==="created"){return true}if(X==="propertyChanged"){return true}if(X==="data"){O.$apply();return true}var Y=P.events||P._events;if((Y&&Y.indexOf(X)>=0)||X.match(/(mousedown|click|mouseenter|mouseleave|mouseup|keydown|keyup|focus|blur|keypress)/g)){return true}var Z=function(ac){if(N.jqxWatchSettings!=i){if(K){if(!p[N.jqxSettings+"."+ac]){var ac=X;var ab=K.$watch(N.jqxSettings+"."+ac,function(ag,af){if(ag!=af){if(q.equals(ag,af)){return}var ad={};ad[ac]=ag;var ae=y(E,h(H),ad,ag,af);if(!ae){h(H).jqxProxy(ad);var ah=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&ah&&ah.propertyChanged){ah.propertyChanged(ac,af,ag)}}}},true);p[N.jqxSettings+"."+ac]=ab;F.push(ab)}}}};if(!(aa instanceof Object)&&(T==null||aa!==T[X])){R[X]=aa;Z(X);Q=true}else{if(X!==E&&X!=="apply"&&X!=="created"&&X!=="propertyChanged"&&(aa instanceof Object)&&(T==null||(A(aa)!==A(T[X]))||(A(aa)==""&&A(T[X])==""))){R[X]=aa;Z(X);Q=true}}});if(R!=={}&&Q){var S=y(E,h(H),R,U,T);if(!S){h(H).jqxProxy(R);var V=q.extend({},O.$eval(N.jqxSettings));if(N.jqxSettings&&V&&V.propertyChanged){V.propertyChanged(index,T,U)}}}}});F.push(L)}}function w(K,G,S,E){var P=K[0].nodeName.toLowerCase();var Q=h(K).parent();var H=h(K).html();var R=Q&&Q[0]&&Q[0].nodeName.toLowerCase()=="ng-include"?true:false;if(h(K).parents("[ui-view]").length>0){R=true}if(R&&!G){h(K).attr("data-jqx-ng-include",true);return}var L='<div id="jqx-ngwidget">'+H+"</div>";if(P.indexOf("jqx")>=0){var I=K[0].attributes;var M=K;if(P.indexOf("input")>=0){if(P.indexOf("date")>=0||P.indexOf("number")>=0){h(K).replaceWith('<div id="jqx-ngwidget"></div>')}else{if(P.indexOf("password")>=0){h(K).replaceWith('<input id="jqx-ngwidget" type="password"/>')}else{h(K).replaceWith('<input id="jqx-ngwidget"/>')}}}else{if(P.indexOf("jqx-button")>=0&&P.indexOf("jqx-button-group")==-1){h(K).replaceWith('<button id="jqx-ngwidget">'+H+"</button>")}else{if(P.indexOf("jqx-toggle-button")>=0){h(K).replaceWith('<button id="jqx-ngwidget">'+H+"</button>")}else{if(P.indexOf("jqx-link-button")>=0){if(h(K).find("a").length>0){var J=h(K).find("a");J.attr("id","jqx-ngwidget");h(K).replaceWith(J)}else{h(K).replaceWith('<a id="jqx-ngwidget">'+H+"</a>")}}else{if(P.indexOf("jqx-data-table")>=0||P.indexOf("jqx-grid")>=0){if(h(K).find("tr").length>0){h(K).replaceWith('<div id="jqx-ngwidget">'+H+"</div>")}else{h(K).replaceWith('<div id="jqx-ngwidget"></div>')}}else{if(P.indexOf("jqx-list-box")>=0||P.indexOf("jqx-drop-down-list")>=0||P.indexOf("jqx-combo-box")>=0){if(h(K).find("option").length>0){h(K).replaceWith('<select id="jqx-ngwidget">'+H+"</select>")}else{if(h(K).find("li").length>0){h(K).replaceWith('<ul id="jqx-ngwidget">'+H+"</ul>")}else{h(K).replaceWith('<div id="jqx-ngwidget"></div>')}}}else{if(P.indexOf("jqx-list-menu")>=0){h(K).replaceWith('<ul id="jqx-ngwidget" data-role="listmenu">'+H+"</ul>")}else{if(P.indexOf("jqx-tooltip")>=0){var F=h(K).children();F.detach();h(F).insertAfter(h(K));h.each(I,function(){if(h(F)[0]){h(F)[0].setAttribute(this.name,this.value)}});h(K).remove();K=F}else{h(K).replaceWith(L)}}}}}}}}M=Q.find("#jqx-ngwidget").removeAttr("id");h.each(I,function(){if(h(M)[0]){h(M)[0].setAttribute(this.name,this.value)}})}var O=K[0];if(M&&M.length){O=M[0]}var N=this;if(O.id==""){if(i==c[E]){c[E]=0}O.id=E+c[E]++}h.each(S,function(T,U){if(T!==E&&T!="jqxNgModel"&&T.indexOf("jqxOn")==-1&&T!="jqxData"&&T!="jqxWatchSettings"&&T!="jqxCreated"&&T!="jqxSource"&&T!="jqxCreate"&&T!="jqxSettings"&&T.indexOf("jqx")>=0){if(!e[O.id]){e[O.id]=new Array()}e[O.id].push({label:T,value:S.$attr[T]})}});return h(O)}function t(G,H){function F(L){H.filesCount=0;var I=L.length;if(L.scripts){var K=L.scripts.length;for(var N in L.deps){K++;var M=L.deps[N];K+=M.length}I=K}var J=function(S,P){var R=0;var O=0;var Q=function(){var Y=S[R];var T=h('script[src*="'+Y+'"]').length;if(T===0){var V=document.getElementsByTagName("head")[0];var U=document.createElement("script");U.type="text/javascript";var X=function(){H.filesCount++;O++;g[Y]=false;if(r[Y]!=i){h.each(r[Y],function(){this.documentReady=true;if(this.scriptsLoaded){this.scriptsLoaded()}})}r[Y]=true;if(H.filesCount==I){H.documentReady=true;if(H.scriptsLoaded){H.scriptsLoaded()}return}if(O===S.length&&P){P()}};if(U.addEventListener){U.addEventListener("load",X,false)}else{if(window.attachEvent){U.attachEvent("onreadystatechange",function(){if(U.readyState=="complete"||U.readyState=="loaded"){X()}})}}g[Y]=true;var W=l;if(Y=="globalize.js"){W=l+"globalization/"}U.src=W+Y;V.appendChild(U);R++;if(R<S.length){Q()}}else{H.filesCount++;if(H.filesCount==I){if(r[Y]===true||g[Y]===i){H.documentReady=true;if(H.scriptsLoaded){H.scriptsLoaded()}return}else{if(r[Y]==i){r[Y]=new Array()}r[Y].push(H);return}}R++;if(R<S.length){Q()}O++;if(O===S.length&&P){P()}}};Q()};if(!L.scripts){J(L)}else{J(L.scripts);h.each(L.deps,function(Q,P){var O=new Array();O.push(Q);J(O,function(){J(P)})})}}var E={jqxCalendar:["jqxdatetimeinput.js","jqxcalendar.js","jqxtooltip.js","globalize.js","jqxbuttons.js"],jqxDateTimeInput:["jqxdatetimeinput.js","jqxcalendar.js","jqxtooltip.js","globalize.js","jqxbuttons.js"],jqxListBox:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js"],jqxComboBox:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js","jqxcombobox.js"],jqxDropDownList:["jqxlistbox.js","jqxdata.js","jqxbuttons.js","jqxscrollbar.js","jqxdropdownlist.js"],jqxGrid:{scripts:["jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js"],deps:{"jqxgrid.js":["jqxgrid.selection.js","jqxgrid.filter.js","jqxgrid.sort.js","jqxgrid.storage.js","jqxgrid.grouping.js","jqxgrid.pager.js","jqxgrid.columnsresize.js","jqxgrid.columnsreorder.js","jqxgrid.edit.js","jqxgrid.export.js","jqxgrid.aggregates.js"],"jqxdata.js":["jqxdata.export.js"]}},jqxDataTable:{scripts:["jqxdatatable.js","jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js","jqxinput.js"],deps:{"jqxdata.js":["jqxdata.export.js"]}},jqxTreeGrid:{scripts:["jqxdatetimeinput.js","jqxcalendar.js","jqxmenu.js","jqxtooltip.js","jqxscrollbar.js","jqxbuttons.js","jqxlistbox.js","jqxdropdownlist.js","jqxcombobox.js","jqxcheckbox.js","globalize.js","jqxinput.js"],deps:{"jqxdatatable.js":["jqxtreegrid.js"],"jqxdata.js":["jqxdata.export.js"]}},jqxCheckBox:["jqxcheckbox.js"],jqxRadioButton:["jqxradiobutton.js"],jqxBulletChart:["jqxbulletchart.js","jqxtooltip.js"],jqxRangeSelector:["jqxrangeselector.js"],jqxScrollView:["jqxbuttons.js","jqxscrollview.js"],jqxSwitchButton:["jqxswitchbutton.js"],jqxTouch:["jqxtouch.js"],jqxColorPicker:["jqxcolorpicker.js"],jqxInput:["jqxinput.js"],jqxEditor:["jqxeditor.js"],jqxNumberInput:["jqxbuttons.js","jqxnumberinput.js"],jqxMaskedInput:["jqxmaskedinput.js"],jqxSlider:["jqxbuttons.js","jqxslider.js"],jqxPanel:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js"],jqxButton:["jqxbuttons.js"],jqxLinkButton:["jqxbuttons.js"],jqxToggleButton:["jqxbuttons.js"],jqxRepeatButton:["jqxbuttons.js"],jqxDropDownButton:["jqxdropdownbutton.js"],jqxNotification:["jqxnotification.js"],jqxDockPanel:["jqxdockpanel.js"],jqxProgressBar:["jqxprogressbar.js"],jqxListMenu:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js","jqxlistmenu.js"],jqxTree:["jqxbuttons.js","jqxscrollbar.js","jqxpanel.js","jqxtree.js","jqxdata.js"],jqxMenu:["jqxmenu.js","jqxdata.js"],jqxTabs:["jqxtabs.js","jqxbuttons.js"],jqxDragDrop:["jqxdragdrop.js"],jqxDraw:["jqxdraw.js"],jqxWindow:["jqxwindow.js"],jqxDocking:["jqxwindow.js","jqxdocking.js"],jqxButtonGroup:["jqxbuttons.js","jqxbuttongroup.js"],jqxChart:["jqxdata.js","jqxchart.js"],jqxNavigationBar:["jqxnavigationbar.js"],jqxExpander:["jqxexpander.js"],jqxResponse:["jqxresponse.js"],jqxPasswordInput:["jqxpasswordinput.js"],jqxRating:["jqxrating.js"],jqxSplitter:["jqxbuttons.js","jqxsplitter.js"],jqxValidator:["jqxvalidator.js"],jqxTooltip:["jqxtooltip.js"],jqxGauge:["jqxdraw.js","jqxgauge.js"],jqxLinearGauge:["jqxdraw.js","jqxgauge.js"],jqxTreeMap:["jqxtreemap.js"],jqxRibbon:["jqxbuttons.js","jqxribbon.js"],jqxFormattedInput:["jqxbuttons.js","jqxformattedinput.js"],jqxComplexInput:["jqxbuttons.js","jqxcomplexinput.js"],jqxToolBar:["jqxtoolbar.js"],jqxFileUpload:["jqxfileupload.js"],jqxNavBar:["jqxnavbar.js"]};F(E[G])}h.jqx.angularCompile=function(F,E){if(F.length>0){F=F[0]}var H=q.element(F);var G=H.injector();if(E==i){E=F.innerHTML}G.invoke(["$compile","$rootScope",function(K,I){var J=H.html(E).scope();K(H)(J||I);if(!/^\$(digest|apply)$/.test(I.$$phase)){I.$digest()}else{if(!/^\$(digest|apply)$/.test(J.$$phase)){J.$digest()}}}])};function o(E){var F={};var G=function(T,M,S,J,I){if(h(M).attr("data-jqx-ng-include")){h(M).removeAttr("data-jqx-ng-include");var K=h(M.children()).detach();M=w(M,true,S,E);M.append(K);z(M)(T);var R=true;for(var L in S){if(L.toString().indexOf("jqx")==-1){continue}if(T[S[L]]!=i){R=false}}if(R){T=T.$parent}}if(h.jqx.AMD){var O={};d[E]=false;O.documentReady=false;t(E,O)}var H=M[0].style.visibility;var N=M[0].style.display;M[0].style.visibility="hidden";M[0].style.display="none";var Q=T;var P=v(function(){v.cancel(P);P=i;var X=function(){var ad=J[0];M[0].style.visibility=H;M[0].style.display=N;var ae=n(T,M,S,E,Q);var ah=E.toLowerCase();var ag=E.match(/(input|list|radio|checkbox|combobox|rating|slider|scrollbar|progress|range|editor|picker|range|gauge|calendar|switch|button)/ig);var af={element:M[0],name:E,instance:h(M).data().jqxWidget,id:M[0].id,scope:T};var Z=function(){T.$emit(E+"Created",af);if(S.jqxSettings&&f(S.jqxSettings)(T).created){C(function(){var ai=f(S.jqxSettings)(T).created;ai(af)})}if(S.jqxCreated){C(function(){var ai=f(S.jqxCreated)(T);ai(af)})}};if(E==="jqxGrid"||E==="jqxDataTable"){var aa=0;var ab=v(function(){if(!h(M).data().jqxWidget){v.cancel(ab);ab=i}else{if(h(M).data().jqxWidget.initializedcall||aa==25){v.cancel(ab);ab=i;Z()}}aa++},100)}else{Z()}C(function ac(){if(ad){ad.$render=function(){var al=ad.$viewValue;if(al===i){al=ad.$modelValue}if(E==="jqxRadioButton"){if(T.$eval(h(M).attr("value"))==ad.$viewValue){h(M).val(true)}else{if(T.$eval(h(M).attr("value"))=="true"&&ad.$viewValue==true){h(M).val(true)}else{h(M).val(false)}}return}else{if(E==="jqxCheckBox"){if(T.$eval(h(M).attr("ng-true-value"))==ad.$viewValue){h(M).val(true)}if(T.$eval(h(M).attr("ng-false-value"))==ad.$viewValue){h(M).val(false)}else{h(M).val(ad.$viewValue)}return}}if(al!=h(M).val()){C(function(){h(M).val(al)})}};if(E==="jqxRadioButton"){if(T.$eval(h(M).attr("value"))==ad.$viewValue){h(M).val(true)}else{if(T.$eval(h(M).attr("value"))=="true"&&ad.$viewValue==true){h(M).val(true)}else{h(M).val(false)}}}else{if(E==="jqxCheckBox"){if(T.$eval(h(M).attr("ng-true-value"))==ad.$viewValue){h(M).val(true)}if(T.$eval(h(M).attr("ng-false-value"))==ad.$viewValue){h(M).val(false)}else{h(M).val(ad.$viewValue)}}else{if(E==="jqxDropDownList"||E==="jqxComboBox"||E==="jqxListBox"||E==="jqxInput"){if(S.jqxNgModel!=i){var ai=h(M).data().jqxWidget;if(E!="jqxInput"){if(ai.valueMember){ai.selectItem(ad.$viewValue[ai.valueMember])}else{if(ai.displayMember){ai.selectItem(ad.$viewValue[ai.displayMember])}else{h(M).val(ad.$viewValue)}}}else{h(M).val(ad.$viewValue)}}else{h(M).val(ad.$viewValue)}}else{if(E==="jqxDateTimeInput"||E==="jqxCalendar"){if(S.jqxNgModel!=i){var ai=h(M).data().jqxWidget;if(ai.selectionMode=="range"){ai.setRange(ad.$viewValue)}else{ai.setDate(ad.$viewValue)}}else{h(M).val(ad.$viewValue)}}else{if(E=="jqxToggleButton"){var ai=h(M).data().jqxWidget;ai.toggled=true;ai.refresh()}else{h(M).val(ad.$viewValue)}}}}}if(ag){var aj="keyup change";if(E=="jqxScrollBar"){aj="valueChanged"}if(E=="jqxToggleButton"){aj="keyup click"}if(E=="jqxInput"){aj="keyup change select"}var ak;h(ae.host).on(aj,function(am){var al=am.args;if(ak){C.cancel(ak)}ak=C(function(){if(E==="jqxRadioButton"){if(al&&al.type!="api"){ad.$setViewValue(T.$eval(h(M).attr("value")))}}else{if(E==="jqxCheckBox"){if(h(M).attr("ng-true-value")!=i&&al.checked){ad.$setViewValue(h(M).attr("ng-true-value"))}else{if(h(M).attr("ng-false-value")!=i&&!al.checked){ad.$setViewValue(h(M).attr("ng-false-value"))}else{ad.$setViewValue(h(M).val())}}}else{if(E==="jqxDropDownList"||E==="jqxComboBox"||E==="jqxListBox"||E==="jqxInput"){var ao=h(M).val();if(S.jqxNgModel!=i){var an=h(M).data().jqxWidget;if(an.getSelectedItem){ao=an.getSelectedItem();if(ao.originalItem){ao=ao.originalItem}}if(E==="jqxInput"){ao=an.selectedItem}ad.$setViewValue(ao)}else{ad.$setViewValue(ao)}}else{if(E==="jqxDateTimeInput"||E==="jqxCalendar"){if(S.jqxNgModel!=i){var an=h(M).data().jqxWidget;if(an.selectionMode=="range"){ad.$setViewValue(an.getRange())}else{ad.$setViewValue(an.getDate())}}else{if(h.type(ad.$viewValue)==="date"){var an=h(M).data().jqxWidget;if(an.selectionMode=="range"){ad.$setViewValue(an.getRange())}else{ad.$setViewValue(an.getDate())}}else{ad.$setViewValue(h(M).val())}}}else{if(E=="jqxToggleButton"){var an=h(M).data().jqxWidget;ad.$setViewValue(an.toggled)}else{ad.$setViewValue(h(M).val())}}}}}T.$emit(E+"ModelChange",ad.$viewValue)})})}}})};if(S.ngShow!==i&&S.jqxCreate===i){var W=T.$watch(S.ngShow,function(aa,Z){if(aa){X();W()}});return}var Y=function(){if(S.jqxCreate!=null||S.jqxCreate!=null){if(S.jqxCreate===true||(S.jqxCreate!==null&&h.type(S.jqxCreate)=="object")){X()}else{var Z=T.$watch(S.jqxCreate,function(ab,aa){if(typeof ab=="number"){C(X,ab);Z()}else{if(ab){X();Z()}}})}}else{X()}};if(h.jqx.AMD){var V=function(){var Z=true;for(var aa in d){if(!d[aa]){Z=false;break}}if(Z){if(!x){T.$emit("jQWidgetsScriptsLoaded");x=true}for(var aa in d){h.each(d[aa],function(){this()});d[aa]=new Array()}}};if(O.documentReady){var U={element:M[0],name:E,scope:T};T.$emit(E+"ScriptsLoaded",U);if(!d[E]){d[E]=new Array()}d[E].push(Y);V()}else{O.scriptsLoaded=function(){var Z={element:M[0],name:E,scope:T};T.$emit(E+"ScriptsLoaded",Z);if(!d[E]){d[E]=new Array()}d[E].push(Y);V()}}}else{Y()}})};b.directive(E,["$timeout","$interval","$parse","$compile","$log",function(M,I,N,L,K){C=M;v=I;f=N;z=L;s=K;var J={};var H;return{restrict:"ACE",require:["?ngModel"],scope:false,template:function(P,O){w(P,false,O,E);H=this.scope},controller:["$scope","$attrs","$element","$transclude",function(R,O,Q,P){}],compile:function(P,O,Q){return{pre:function(V,T,R,U,S){},post:function(V,T,R,U,S){G(V,T,R,U,S)}}},link:G}}])}o("jqxBulletChart");o("jqxButtonGroup");o("jqxButton");o("jqxRepeatButton");o("jqxToggleButton");o("jqxLinkButton");o("jqxCalendar");o("jqxChart");o("jqxCheckBox");o("jqxComplexInput");o("jqxColorPicker");o("jqxComboBox");o("jqxDataTable");o("jqxDateTimeInput");o("jqxDocking");o("jqxDockPanel");o("jqxDragDrop");o("jqxDraw");o("jqxDropDownButton");o("jqxDropDownList");o("jqxEditor");o("jqxExpander");o("jqxFormattedInput");o("jqxFileUpload");o("jqxGauge");o("jqxLinearGauge");o("jqxGrid");o("jqxInput");o("jqxListBox");o("jqxListMenu");o("jqxMaskedInput");o("jqxMenu");o("jqxNavigationBar");o("jqxNavBar");o("jqxNotification");o("jqxNumberInput");o("jqxPanel");o("jqxPasswordInput");o("jqxProgressBar");o("jqxRadioButton");o("jqxRangeSelector");o("jqxRating");o("jqxRibbon");o("jqxScrollBar");o("jqxScrollView");o("jqxSlider");o("jqxSplitter");o("jqxSwitchButton");o("jqxTabs");o("jqxToolBar");o("jqxTooltip");o("jqxTouch");o("jqxTree");o("jqxTreeGrid");o("jqxTreeMap");o("jqxValidator");o("jqxWindow")})(jqxBaseFramework,window.angular); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxCheckBox","",{});a.extend(a.jqx._jqxCheckBox.prototype,{defineInstance:function(){var b={animationShowDelay:300,animationHideDelay:300,width:null,height:null,boxSize:"13px",checked:false,hasThreeStates:false,disabled:false,enableContainerClick:true,locked:false,groupName:"",keyboardCheck:true,enableHover:true,hasInput:true,rtl:false,updated:null,disabledContainer:false,_canFocus:true,aria:{"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}},events:["checked","unchecked","indeterminate","change"]};a.extend(true,this,b);return b},createInstance:function(b){this.render()},_addInput:function(){if(this.hasInput){if(this.input){this.input.remove()}var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.checked);this.host.attr("role","checkbox");a.jqx.aria(this)}},render:function(){this.init=true;var d=this;this.setSize();this.propertyChangeMap.width=function(h,j,i,k){d.setSize()};this.propertyChangeMap.height=function(h,j,i,k){d.setSize()};this._removeHandlers();if(this.checkbox){this.checkbox.remove();this.checkbox=null}if(this.checkMark){this.checkMark.remove();this.checkMark=null}if(this.box){this.box.remove();this.box=null}if(this.clear){this.clear.remove();this.clear=null}if(this.boxSize==null){this.boxSize=13}var g=parseInt(this.boxSize)+"px";var f="13px";var e=Math.floor((parseInt(this.boxSize)-13)/2);var b=e;e+="px";b+="px";if(this.boxSize!="13px"){this.checkbox=a('<div><div style="width: '+g+"; height: "+g+';"><span style="position: relative; left: '+e+"; top: "+b+"; width: "+f+"; height: "+f+';"></span></div></div>')}else{this.checkbox=a('<div><div style="width: '+g+"; height: "+g+';"><span style="width: '+g+"; height: "+g+';"></span></div></div>')}this.host.prepend(this.checkbox);if(!this.disabledContainer){if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.clear=a('<div style="clear: both;"></div>');this.host.append(this.clear)}this.checkMark=a(this.checkbox[0].firstChild.firstChild);this.box=this.checkbox;this.box.addClass(this.toThemeProperty("jqx-checkbox-default")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-rc-all"));if(this.disabled){this.disable()}if(!this.disabledContainer){this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-checkbox"))}if(this.locked&&!this.disabledContainer){this.host.css("cursor","auto")}var c=this.element.getAttribute("checked");if(c=="checked"||c=="true"||c==true){this.checked=true}this._addInput();this._render();this._addHandlers();this.init=false},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},setSize:function(){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)}}},_addHandlers:function(){var d=this;var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.box,b,function(e){if(!d.disabled&&!d.enableContainerClick&&!d.locked){d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}});if(!this.disabledContainer){this.addHandler(this.host,"keydown",function(e){if(!d.disabled&&!d.locked&&d.keyboardCheck){if(e.keyCode==32){if(!d._canFocus){return true}d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}}});this.addHandler(this.host,b,function(e){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.toggle();if(e.preventDefault){e.preventDefault()}if(d._canFocus){d.focus()}return false}});this.addHandler(this.host,"selectstart",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}return false}});this.addHandler(this.host,"mouseup",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}}});this.addHandler(this.host,"focus",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}});this.addHandler(this.host,"blur",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}});this.addHandler(this.host,"mouseenter",function(e){if(d.locked){d.host.css("cursor","arrow")}if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}}});this.addHandler(this.host,"mouseleave",function(e){if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}}});this.addHandler(this.box,"mouseenter",function(){if(d.locked){return}if(!d.disabled&&!d.enableContainerClick){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!d.disabled&&!d.enableContainerClick){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}})}},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b="touchend"}if(this.box){this.removeHandler(this.box,b);this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave")}this.removeHandler(this.host,b);this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus")},_render:function(){if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{if(!this.init){this.host.css("cursor","auto")}}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-checkbox-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates()},_setState:function(b){if(this.checked!=b){this.checked=b;if(this.checked){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-checked")}else{if(this.checked==null){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-indeterminate")}else{this.checkMark[0].className=""}}}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},check:function(){this.checked=true;var b=this;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(this.groupName!=null&&this.groupName.length>0){var c=a.find(this.toThemeProperty(".jqx-checkbox",true));a.each(c,function(){var d=a(this).jqxCheckBox("groupName");if(d==b.groupName&&this!=b.element){a(this).jqxCheckBox("uncheck")}})}this._raiseEvent("0",true);this._raiseEvent("3",{checked:true});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)}},uncheck:function(){this.checked=false;var b=this;if(a.jqx.browser.msie||this.animationHideDelay==0){if(b.checkMark[0].className!=""){b.checkMark[0].className=""}}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){if(b.checkMark[0].className!=""){b.checkMark[0].className=""}})}this._raiseEvent("1");this._raiseEvent("3",{checked:false});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)}},indeterminate:function(){this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}this._raiseEvent("2");this._raiseEvent("3",{checked:null});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined")}},toggle:function(){if(this.disabled){return}if(this.locked){return}if(this.groupName!=null&&this.groupName.length>0){if(this.checked!=true){this.checked=true;this.updateStates()}return}this.oldChecked=this.checked;if(this.checked==true){this.checked=this.hasThreeStates?null:false}else{this.checked=this.checked!=null}this.updateStates();if(this.input!=undefined){this.input.val(this.checked)}},updateStates:function(){if(this.checked){this.check()}else{if(this.checked==false){this.uncheck()}else{if(this.checked==null){this.indeterminate()}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.addClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this.host.remove()},_raiseEvent:function(g,e){if(this.init){return}var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c==b.enableContainerClick&&!b.disabled&&!b.locked){if(d){b.host.css("cursor","pointer")}else{b.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="boxSize"){b.render()}if(c=="theme"){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="checked"){if(d!=e){switch(d){case true:b.check();break;case false:b.uncheck();break;case null:b.indeterminate();break}}}if(c=="disabled"){if(d!=e){if(d){b.disable()}else{b.enable()}}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxCheckBox","",{});a.extend(a.jqx._jqxCheckBox.prototype,{defineInstance:function(){var b={animationShowDelay:300,animationHideDelay:300,width:null,height:null,boxSize:"13px",checked:false,hasThreeStates:false,disabled:false,enableContainerClick:true,locked:false,groupName:"",keyboardCheck:true,enableHover:true,hasInput:true,rtl:false,updated:null,disabledContainer:false,_canFocus:true,aria:{"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}},events:["checked","unchecked","indeterminate","change"]};a.extend(true,this,b);return b},createInstance:function(b){this.render()},_addInput:function(){if(this.hasInput){if(this.input){this.input.remove()}var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.checked);this.host.attr("role","checkbox");a.jqx.aria(this)}},render:function(){this.init=true;var d=this;this.setSize();this.propertyChangeMap.width=function(h,j,i,k){d.setSize()};this.propertyChangeMap.height=function(h,j,i,k){d.setSize()};this._removeHandlers();if(this.checkbox){this.checkbox.remove();this.checkbox=null}if(this.checkMark){this.checkMark.remove();this.checkMark=null}if(this.box){this.box.remove();this.box=null}if(this.clear){this.clear.remove();this.clear=null}if(this.boxSize==null){this.boxSize=13}var g=parseInt(this.boxSize)+"px";var f="13px";var e=Math.floor((parseInt(this.boxSize)-13)/2);var b=e;e+="px";b+="px";if(this.boxSize!="13px"){this.checkbox=a('<div><div style="width: '+g+"; height: "+g+';"><span style="position: relative; left: '+e+"; top: "+b+"; width: "+f+"; height: "+f+';"></span></div></div>')}else{this.checkbox=a('<div><div style="width: '+g+"; height: "+g+';"><span style="width: '+g+"; height: "+g+';"></span></div></div>')}this.host.prepend(this.checkbox);if(!this.disabledContainer){if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.clear=a('<div style="clear: both;"></div>');this.host.append(this.clear)}this.checkMark=a(this.checkbox[0].firstChild.firstChild);this.box=this.checkbox;this.box.addClass(this.toThemeProperty("jqx-checkbox-default")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-rc-all"));if(this.disabled){this.disable()}if(!this.disabledContainer){this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-checkbox"))}if(this.locked&&!this.disabledContainer){this.host.css("cursor","auto")}var c=this.element.getAttribute("checked");if(c=="checked"||c=="true"||c==true){this.checked=true}this._addInput();this._render();this._addHandlers();this.init=false},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},setSize:function(){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)}}},_addHandlers:function(){var d=this;var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.box,b,function(e){if(!d.disabled&&!d.enableContainerClick&&!d.locked){d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}});if(!this.disabledContainer){this.addHandler(this.host,"keydown",function(e){if(!d.disabled&&!d.locked&&d.keyboardCheck){if(e.keyCode==32){if(!d._canFocus){return true}d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}}});this.addHandler(this.host,b,function(e){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.toggle();if(e.preventDefault){e.preventDefault()}if(d._canFocus){d.focus()}return false}});this.addHandler(this.host,"selectstart",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}return false}});this.addHandler(this.host,"mouseup",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}}});this.addHandler(this.host,"focus",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}});this.addHandler(this.host,"blur",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}});this.addHandler(this.host,"mouseenter",function(e){if(d.locked){d.host.css("cursor","arrow")}if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}}});this.addHandler(this.host,"mouseleave",function(e){if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}}});this.addHandler(this.box,"mouseenter",function(){if(d.locked){return}if(!d.disabled&&!d.enableContainerClick){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!d.disabled&&!d.enableContainerClick){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}})}},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b="touchend"}if(this.box){this.removeHandler(this.box,b);this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave")}this.removeHandler(this.host,b);this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus")},_render:function(){if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{if(!this.init){this.host.css("cursor","auto")}}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-checkbox-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates()},_setState:function(c,b){if(this.checked!=c){this.checked=c;if(this.checked){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-checked")}else{if(this.checked==null){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-indeterminate")}else{this.checkMark[0].className=""}}}if(b===false||b===true){this.locked=b}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},check:function(){this.checked=true;var b=this;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(this.groupName!=null&&this.groupName.length>0){var c=a.find(this.toThemeProperty(".jqx-checkbox",true));a.each(c,function(){var d=a(this).jqxCheckBox("groupName");if(d==b.groupName&&this!=b.element){a(this).jqxCheckBox("uncheck")}})}this._raiseEvent("0",true);this._raiseEvent("3",{checked:true});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)}},uncheck:function(){this.checked=false;var b=this;if(a.jqx.browser.msie||this.animationHideDelay==0){if(b.checkMark[0].className!=""){b.checkMark[0].className=""}}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){if(b.checkMark[0].className!=""){b.checkMark[0].className=""}})}this._raiseEvent("1");this._raiseEvent("3",{checked:false});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)}},indeterminate:function(){this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}this._raiseEvent("2");this._raiseEvent("3",{checked:null});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined")}},toggle:function(){if(this.disabled){return}if(this.locked){return}if(this.groupName!=null&&this.groupName.length>0){if(this.checked!=true){this.checked=true;this.updateStates()}return}this.oldChecked=this.checked;if(this.checked==true){this.checked=this.hasThreeStates?null:false}else{this.checked=this.checked!=null}this.updateStates();if(this.input!=undefined){this.input.val(this.checked)}},updateStates:function(){if(this.checked){this.check()}else{if(this.checked==false){this.uncheck()}else{if(this.checked==null){this.indeterminate()}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.addClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this.host.remove()},_raiseEvent:function(g,e){if(this.init){return}var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c==b.enableContainerClick&&!b.disabled&&!b.locked){if(d){b.host.css("cursor","pointer")}else{b.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="boxSize"){b.render()}if(c=="theme"){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="checked"){if(d!=e){switch(d){case true:b.check();break;case false:b.uncheck();break;case null:b.indeterminate();break}}}if(c=="disabled"){if(d!=e){if(d){b.disable()}else{b.enable()}}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ 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.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.dropdownlistContent.append(a('<input autocomplete="off" style="margin: 0; padding: 0; border: 0;" type="textarea"/>'));n.input=n.dropdownlistContent.find("input");n.input.addClass(n.toThemeProperty("jqx-combobox-input"));n.input.addClass(n.toThemeProperty("jqx-widget-content"));if(n.host.attr("tabindex")){n.input.attr("tabindex",n.host.attr("tabindex"));n.host.removeAttr("tabindex")}n._addInput();if(n.rtl){n.input.css({direction:"rtl"});n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content-rtl"))}try{var q="listBox"+n.id;var i=a(a.find("#"+q));if(i.length>0){i.remove()}a.jqx.aria(this,"aria-owns",q);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-multiline",false);if(n.listBoxContainer){n.listBoxContainer.jqxListBox("destroy")}if(n.container){n.container.remove()}var b=a("<div style='overflow: hidden; border: none; background-color: transparent; position: absolute;' id='listBox"+n.id+"'><div id='innerListBox"+n.id+"'></div></div>");b.hide();b.appendTo(document.body);n.container=b;n.listBoxContainer=a(a.find("#innerListBox"+n.id));var d=n.width;if(n.dropDownWidth!="auto"){d=n.dropDownWidth}if(n.dropDownHeight==null){n.dropDownHeight=200}n.container.width(parseInt(d)+25);n.container.height(parseInt(n.dropDownHeight)+25);n.addHandler(n.listBoxContainer,"bindingComplete",function(e){if(!n.listBox){n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance}n._raiseEvent("6")});var j=true;n.listBoxContainer.jqxListBox({_checkForHiddenParent:false,allowDrop:false,allowDrag:false,checkboxes:n.checkboxes,emptyString:n.emptyString,autoBind:!n.remoteAutoComplete&&n.autoBind,renderer:n.renderer,rtl:n.rtl,itemHeight:n.itemHeight,selectedIndex:n.selectedIndex,incrementalSearch:false,width:d,scrollBarSize:n.scrollBarSize,autoHeight:n.autoDropDownHeight,height:n.dropDownHeight,groupMember:n.groupMember,searchMember:n.searchMember,displayMember:n.displayMember,valueMember:n.valueMember,source:n.source,theme:n.theme,rendered:function(){n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance;if(n.remoteAutoComplete){if(n.autoDropDownHeight){n.container.height(n.listBox.virtualSize.height+25);n.listBoxContainer.height(n.listBox.virtualSize.height);n.listBox._arrange()}else{n.listBox._arrange();n.listBox.ensureVisible(0);n.listBox._renderItems();n.container.height(n.listBoxContainer.height()+25)}if(n.searchString!=undefined&&n.searchString.length>=n.minLength){var e=n.listBoxContainer.jqxListBox("items");if(e){if(e.length>0){if(!n.isOpened()){n.open()}}else{n.close()}}else{n.close()}}else{n.close()}}else{n.renderSelection("mouse");if(n.multiSelect){n.doMultiSelect(false)}}if(n.rendered){n.rendered()}}});n.listBoxContainer.css({position:"absolute",zIndex:n.popupZIndex,top:0,left:0});n.listBoxContainer.css("border-top-width","1px");n.listBoxContainer.addClass(n.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){n.listBoxContainer.addClass(n.toThemeProperty("jqx-noshadow"))}n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance;n.listBox.enableSelection=n.enableSelection;n.listBox.enableHover=n.enableHover;n.listBox.equalItemsWidth=n.equalItemsWidth;n.listBox._arrange();n.addHandler(n.listBoxContainer,"unselect",function(e){if(!n.multiSelect){n._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})}});n.addHandler(n.listBoxContainer,"change",function(e){if(!n.multiSelect){n.selectedIndex=n.listBox.selectedIndex;n._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}});if(n.animationType=="none"){n.container.css("display","none")}else{n.container.hide()}j=false}catch(l){throw l}var r=this;r.input.attr("disabled",r.disabled);var h=a.jqx.browser.msie&&a.jqx.browser.version<8;if(!h){r.input.attr("placeholder",r.placeHolder)}n.propertyChangeMap.disabled=function(e,u,t,v){if(v){e.host.addClass(r.toThemeProperty("jqx-combobox-state-disabled"));e.host.addClass(r.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(r.toThemeProperty("jqx-combobox-content-disabled"))}else{e.host.removeClass(r.toThemeProperty("jqx-combobox-state-disabled"));e.host.removeClass(r.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(r.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(n.disabled){n.host.addClass(n.toThemeProperty("jqx-combobox-state-disabled"));n.host.addClass(n.toThemeProperty("jqx-fill-state-disabled"));n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content-disabled"))}n.host.addClass(n.toThemeProperty("jqx-combobox-state-normal"));n.host.addClass(n.toThemeProperty("jqx-combobox"));n.host.addClass(n.toThemeProperty("jqx-rc-all"));n.host.addClass(n.toThemeProperty("jqx-widget"));n.host.addClass(n.toThemeProperty("jqx-widget-content"));n.dropdownlistArrowIcon=a("<div></div>");n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon-arrow-down"));n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon"));n.dropdownlistArrow.append(n.dropdownlistArrowIcon);n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-combobox-arrow-normal"));n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-fill-state-normal"));if(!n.rtl){n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-r"))}else{n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-l"))}n._setSize();n._updateHandlers();n.addHandler(n.input,"keyup.textchange",function(e){var t=n._search(e);if(n.cinput&&n.input){if(!n.displayMember){n.cinput[0].value=n.input[0].value}else{n._updateInputSelection()}}});if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(n.host.parents(".jqx-window").length>0){var o=n.host.parents(".jqx-window").css("z-index");b.css("z-index",o+10);n.listBoxContainer.css("z-index",o+10)}}if(n.checkboxes){n.input.attr("readonly",true);a.jqx.aria(this,"aria-readonly",true)}else{a.jqx.aria(this,"aria-readonly",false)}if(!n.remoteAutoComplete){n.searchString=""}},_addInput:function(){var b=this.host.attr("name");this.cinput=a("<input type='hidden'/>");this.host.append(this.cinput);if(b){this.cinput.attr("name",b)}},_updateInputSelection:function(){if(this.cinput){var c=new Array();if(this.selectedIndex==-1){this.cinput.val("")}else{var e=this.getSelectedItem();if(e!=null){this.cinput.val(e.value);c.push(e.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 f="";if(b!=null){for(var d=0;d<b.length;d++){if(d==b.length-1){f+=b[d].value}else{f+=b[d].value+","}c.push(b[d].value)}}this.cinput.val(f)}if(this.field&&this.cinput){if(this.field.nodeName.toLowerCase()=="select"){a.each(this.field,function(g,h){a(this).removeAttr("selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(g,h){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}}},_search:function(m){var d=this;if(m.keyCode==9){return}if(d.searchMode=="none"||d.searchMode==null||d.searchMode=="undefined"){return}if(m.keyCode==16||m.keyCode==17||m.keyCode==20){return}if(d.checkboxes){return}if(d.multiSelect){var n=a("<span style='visibility: hidden; white-space: nowrap;'>"+d.input.val()+"</span>");n.addClass(d.toThemeProperty("jqx-widget"));a(document.body).append(n);var j=n.width()+15;n.remove();if(j>d.host.width()){j=d.host.width()}if(j<25){j=25}d.input.css("width",j+"px");if(d.selectedItems.length==0){d.input.css("width","100%");d.input.attr("placeholder",d.placeHolder)}else{d.input.attr("placeholder","")}var f=parseInt(this._findPos(d.host[0])[1])+parseInt(d.host.outerHeight())-1+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();if((o!=null&&o)){f=a.jqx.mobile.getTopPos(this.element)+parseInt(d.host.outerHeight());if(a("body").css("border-top-width")!="0px"){f=parseInt(f)-this._getBodyOffset().top+"px"}}d.container.css("top",f);var i=parseInt(d.host.height());d.dropdownlistArrow.height(i)}if(!d.isanimating){if(m.altKey&&m.keyCode==38){d.hideListBox("altKey");return false}if(m.altKey&&m.keyCode==40){if(!d.isOpened()){d.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||d.ctrlKey){if(m.keyCode!=88&&m.keyCode!=86){return}}var l=d.input.val();if(l.length==0&&!d.autoComplete){d.listBox.searchString=d.input.val();d.listBox.clearSelection();d.hideListBox("search");d.searchString=d.input.val();return}if(d.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(d._searchTimer){clearTimeout(d._searchTimer)}if(m.keyCode!=13&&m.keyCode!=27){d._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"}},d.remoteAutoCompleteDelay)}}s.searchString=l}}else{if(d._searchTimer){clearTimeout(d._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=d._updateItemsVisibility(l);var e=b.matchItems;var c=b.index;if(!d.autoComplete&&!d.removeAutoComplete){if(!d.multiSelect||(d.multiSelect&&c>=0)){d.listBox.selectIndex(c);var r=d.listBox.isIndexInView(c);if(!r){d.listBox.ensureVisible(c)}else{d.listBox._renderItems()}}}if(d.autoComplete&&e.length===0){d.hideListBox("search")}}if(m.keyCode=="13"){var g=d.container.css("display")=="block";if(g&&!d.isanimating){d.hideListBox("keyboard");d._oldvalue=d.listBox.selectedValue;return}}else{if(m.keyCode=="27"){var g=d.container.css("display")=="block";if(g&&!d.isanimating){if(!h.multiSelect){var q=d.listBox.getVisibleItem(d._oldvalue);if(q){var h=this;setTimeout(function(){if(h.autoComplete){h._updateItemsVisibility("")}h.listBox.selectIndex(q.index);h.renderSelection("api")},h.closeDelay)}else{d.clearSelection()}}else{h.input.val("");h.listBox.selectedValue=null}d.hideListBox("keyboard");d.renderSelection("api");m.preventDefault();return false}}else{if(!d.isOpened()&&!d.opening&&!m.ctrlKey){if(d.listBox.visibleItems&&d.listBox.visibleItems.length>0){if(d.input.val()!=d.searchString&&d.searchString!=undefined&&c!=-1){d.showListBox("search")}}}d.searchString=d.input.val();if(d.searchString==""){if(!d.listBox.itemsByValue[""]){c=-1;if(!d.multiSelect){d.clearSelection()}}}var q=d.listBox.getVisibleItem(c);if(q!=undefined){d._updateInputSelection()}}}},val:function(c){if(!this.input){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(d(c)||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.searchLabel){r=this.searchLabel}else{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;q<f.listBox.items.length;q++){f.listBox.selectedIndexes[q]=-1;if(!f.listBox.items[q].disabled){if(s==false){r=f.listBox.items[q];p=r.visibleIndex;s=true}}}f.listBox.selectedIndex=-1;f.listBox.selectedIndex=p;f.listBox.selectedIndexes[p]=p;if(f.listBox.visibleItems.length>0){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<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndexes[o.visibleIndex]=o.visibleIndex}else{for(var d=0;d<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndex=-1}}}else{h()}this.listBox._renderItems();var n=this.listBox._calculateVirtualSize().height;if(n<b){b=0;this.listBox.vScrollInstance.refresh()}if(this.autoDropDownHeight){this._disableSelection=true;if(this.listBox.autoHeight!=this.autoDropDownHeight){this.listBoxContainer.jqxListBox({autoHeight:this.autoDropDownHeight})}this.container.height(n+25);this.listBox.invalidate();this._disableSelection=false}else{if(n<parseInt(this.dropDownHeight)){var c=this.listBox.hScrollBar[0].style.visibility=="hidden"?0:20;this.listBox.height=c+n;this.container.height(n+25+c);this.listBox.invalidate()}else{this.listBox.height=parseInt(this.dropDownHeight);this.container.height(parseInt(this.dropDownHeight)+25);this.listBox.invalidate()}}this.listBox.vScrollInstance.setPosition(b);return{index:g,matchItems:m}},findItems:function(e){var b=this.getItems();var d=this;var c=0;var f=new Array();a.each(b,function(g){var j="";if(!this.isGroup){if(this.label){j=this.label}else{if(this.value){j=this.value}else{if(this.title){j=this.title}else{j="jqxItem"}}}var h=false;switch(d.searchMode){case"containsignorecase":h=a.jqx.string.containsIgnoreCase(j,e);break;case"contains":h=a.jqx.string.contains(j,e);break;case"equals":h=a.jqx.string.equals(j,e);break;case"equalsignorecase":h=a.jqx.string.equalsIgnoreCase(j,e);break;case"startswith":h=a.jqx.string.startsWith(j,e);break;case"startswithignorecase":h=a.jqx.string.startsWithIgnoreCase(j,e);break;case"endswith":h=a.jqx.string.endsWith(j,e);break;case"endswithignorecase":h=a.jqx.string.endsWithIgnoreCase(j,e);break}if(h){f[c++]=this}}});return f},_resetautocomplete:function(){a.each(this.listBox.items,function(b){this.visible=true});this.listBox.vScrollInstance.value=0;this.listBox._addItems();this.listBox.autoHeight=false;this.listBox.height=this.dropDownHeight;this.container.height(parseInt(this.dropDownHeight)+25);this.listBoxContainer.height(parseInt(this.dropDownHeight));this.listBox._arrange();this.listBox._addItems();this.listBox._renderItems()},getItems:function(){var b=this.listBox.items;return b},getVisibleItems:function(){return this.listBox.getVisibleItems()},_setSize:function(){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 e=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){e=true;this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){e=true;this.host.height(this.height)}if(e){var c=this;var b=this.host.width();if(this.dropDownWidth!="auto"){b=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:b});this.container.width(parseInt(b)+25);this._arrange()}var c=this;var d=function(){if(c.multiSelect){c.host.height(c.height)}c._arrange();if(c.multiSelect){c.host.height("auto")}};c.oldWidth=c.host.width();c.oldHeight=c.host.height();a.jqx.utilities.resize(this.host,function(){var f=c.host.width();var g=c.host.height();if(f!=c.oldWidth||g!=c.oldHeight){d();c.hideListBox("api")}c.oldWidth=f;c.oldHeight=g})},isOpened:function(){var c=this;var b=a.data(document.body,"openedCombojqxListBox"+this.element.id);if(this.container.css("display")!="block"){return false}if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var d=this;var e=false;this.removeHandlers();if(this.multiSelect){this.addHandler(this.dropdownlistContent,"click",function(f){if(f.target.href){return false}d.input.focus();setTimeout(function(){d.input.focus()},10)});this.addHandler(this.dropdownlistContent,"focus",function(f){if(f.target.href){return false}d.input.focus();setTimeout(function(){d.input.focus()},10)})}if(!this.touch){if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.combobox"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){e=true;d.host.addClass(d.toThemeProperty("jqx-combobox-state-hover"));d.dropdownlistArrowIcon.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"));d.dropdownlistArrow.addClass(d.toThemeProperty("jqx-combobox-arrow-hover"));d.dropdownlistArrow.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.host.removeClass(d.toThemeProperty("jqx-combobox-state-hover"));d.dropdownlistArrowIcon.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"));d.dropdownlistArrow.removeClass(d.toThemeProperty("jqx-combobox-arrow-hover"));d.dropdownlistArrow.removeClass(d.toThemeProperty("jqx-fill-state-hover"));e=false}})}if(d.autoOpen){this.addHandler(this.host,"mouseenter",function(){var f=d.isOpened();if(!f&&d.autoOpen){d.open();d.host.focus()}});this.addHandler(a(document),"mousemove."+d.id,function(i){var h=d.isOpened();if(h&&d.autoOpen){var m=d.host.coord();var l=m.top;var k=m.left;var j=d.container.coord();var f=j.left;var g=j.top;canClose=true;if(i.pageY>=l&&i.pageY<=l+d.host.height()+2){if(i.pageX>=k&&i.pageX<k+d.host.width()){canClose=false}}if(i.pageY>=g&&i.pageY<=g+d.container.height()-20){if(i.pageX>=f&&i.pageX<f+d.container.width()){canClose=false}}if(canClose){d.close()}}})}var c="mousedown";if(this.touch){c=a.jqx.mobile.getTouchEventName("touchstart")}var b=function(h){if(!d.disabled){var f=d.container.css("display")=="block";if(!d.isanimating){if(f){d.hideListBox("api");if(!a.jqx.mobile.isTouchDevice()){d.input.focus();setTimeout(function(){d.input.focus()},10)}return true}else{if(d.autoDropDownHeight){d.container.height(d.listBoxContainer.height()+25);var g=d.listBoxContainer.jqxListBox("autoHeight");if(!g){d.listBoxContainer.jqxListBox({autoHeight:d.autoDropDownHeight});d.listBox._arrange();d.listBox.ensureVisible(0);d.listBox._renderItems();d.container.height(d.listBoxContainer.height()+25)}}d.showListBox("api");if(!a.jqx.mobile.isTouchDevice()){setTimeout(function(){d.input.focus()},10)}else{return true}}}}};this.addHandler(this.dropdownlistArrow,c,function(f){b(f)});this.addHandler(this.dropdownlistArrowIcon,c,function(f){});this.addHandler(this.host,"focus",function(){d.focus()});this.addHandler(this.input,"focus",function(f){d.focused=true;d.host.addClass(d.toThemeProperty("jqx-combobox-state-focus"));d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"));d.dropdownlistContent.addClass(d.toThemeProperty("jqx-combobox-content-focus"));if(f.stopPropagation){f.stopPropagation()}if(f.preventDefault){f.preventDefault()}return false});this.addHandler(this.input,"blur",function(){d.focused=false;if(!d.isOpened()&&!d.opening){if(d.selectionMode=="dropDownList"){d._selectOldValue()}d.host.removeClass(d.toThemeProperty("jqx-combobox-state-focus"));d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"));d.dropdownlistContent.removeClass(d.toThemeProperty("jqx-combobox-content-focus"))}if(d._searchTimer){clearTimeout(d._searchTimer)}});this.addHandler(a(document),"mousedown."+this.id,d.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id});if(this.touch){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,d.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}this.addHandler(this.host,"keydown",function(k){var h=d.container.css("display")=="block";d.ctrlKey=k.ctrlKey;if(d.host.css("display")=="none"){return true}if(k.keyCode=="13"||k.keyCode=="9"){if(h&&!d.isanimating){if(d.listBox.selectedIndex!=-1){d.renderSelection("mouse");var f=d.listBox.selectedIndex;var j=d.listBox.getVisibleItem(f);if(j){d.listBox.selectedValue=j.value}d._setSelection(d.input.val().length,d.input.val().length);d.hideListBox("keyboard")}if(k.keyCode=="13"){d._oldvalue=d.listBox.selectedValue}if(!d.keyboardSelection){d._raiseEvent("2",{index:d.selectedIndex,type:"keyboard",item:d.getItem(d.selectedIndex)})}if(k.keyCode=="9"){return true}return false}}if(k.keyCode==115){if(!d.isanimating){if(!d.isOpened()){d.showListBox("keyboard")}else{if(d.isOpened()){d.hideListBox("keyboard")}}}return false}if(k.altKey){if(d.host.css("display")=="block"){if(!d.isanimating){if(k.keyCode==38){if(d.isOpened()){d.hideListBox("altKey")}}else{if(k.keyCode==40){if(!d.isOpened()){d.showListBox("altKey")}}}}}}if(k.keyCode=="27"||k.keyCode=="9"){if(d.isOpened()&&!d.isanimating){if(k.keyCode=="27"){if(!d.multiSelect){var j=d.listBox.getItemByValue(d._oldvalue);if(j){setTimeout(function(){if(d.autoComplete){d._updateItemsVisibility("")}d.listBox.selectIndex(j.index);d.renderSelection("api")},d.closeDelay)}else{d.clearSelection()}}else{d.listBox.selectedValue=null;d.input.val("")}}d.hideListBox("keyboard");if(k.keyCode=="9"){return true}d.renderSelection("api");k.preventDefault();return false}}var g=k.keyCode;if(h&&!d.disabled&&g!=8){return d.listBox._handleKeyDown(k)}else{if(!d.disabled&&!h){var g=k.keyCode;if(g==33||g==34||g==35||g==36||g==38||g==40){return d.listBox._handleKeyDown(k)}}}if(g===8&&d.multiSelect){if(d.input.val().length===0){var i=d.selectedItems[d.selectedItems.length-1];d.selectedItems.pop();d._selectedItems.pop();if(i){d._raiseEvent("3",{index:i.index,type:"keyboard",item:i});d._raiseEvent("4",{index:i.index,type:"keyboard",item:i})}d.listBox.selectedValue=null;d.doMultiSelect();return false}}});this.addHandler(this.listBoxContainer,"checkChange",function(f){d.renderSelection("mouse");d._updateInputSelection();d._raiseEvent(5,{label:f.args.label,value:f.args.value,checked:f.args.checked,item:f.args.item})});this.addHandler(this.listBoxContainer,"select",function(f){if(!d.disabled){if(f.args.type!="keyboard"||d.keyboardSelection){d.renderSelection(f.args.type);if(!d.multiSelect){d._raiseEvent("2",{index:f.args.index,type:f.args.type,item:f.args.item})}if(f.args.type=="mouse"){d._oldvalue=d.listBox.selectedValue;if(!d.checkboxes){d.hideListBox("mouse");if(!d.touch){d.input.focus()}else{return false}}}}}});if(this.listBox!=null&&this.listBox.content!=null){this.addHandler(this.listBox.content,"click",function(f){if(!d.disabled){if(d.listBox.itemswrapper){if(f.target===d.listBox.itemswrapper[0]){return true}}if(f.target&&f.target.className){if(f.target.className.indexOf("jqx-fill-state-disabled")>=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("");this.input.attr("value","");if(!d){this.input.attr("placeholder",this.placeHolder)}this._updateInputSelection();return}this.selectedIndex=this.listBox.selectedIndex;var c=a("<span></span>");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<g.length;e++){if(e==g.length-1){h+=g[e].label}else{h+=g[e].label+", "}}this.input.val(h)}else{this.input.val(c.text())}c.remove();this._updateInputSelection();if(this.renderSelectedItem){var l=this.renderSelectedItem(this.listBox.selectedIndex,k);if(l!=undefined){this.input[0].value=l}}this.input.attr("value",this.input.val());if(this.listBox&&this.listBox._activeElement){a.jqx.aria(this,"aria-activedescendant",this.listBox._activeElement.id)}},dataBind:function(){this.listBoxContainer.jqxListBox({source:this.source});this.renderSelection("mouse");if(this.source==null){this.clearSelection()}},clear:function(){this.listBoxContainer.jqxListBox({source:null});this.clearSelection()},clearSelection:function(b){this.selectedIndex=-1;this.listBox.clearSelection();this.input.val("");if(this.multiSelect){this.listBox.selectedValue="";this.selectedItems=new Array();this._selectedItems=new Array();this.doMultiSelect(false)}},unselectIndex:function(c,d){if(isNaN(c)){return}if(this.autoComplete){this._updateItemsVisibility("")}this.listBox.unselectIndex(c,d);this.renderSelection("mouse");if(this.multiSelect){if(c>=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(){if(!this.multiSelect){return this.listBox.selectedIndex}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}}},getSelectedItem:function(){if(!this.multiSelect){return this.getVisibleItem(this.listBox.selectedIndex)}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0]}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0]}return null}},getSelectedItems:function(){if(this.remoteAutoComplete&&this.multiSelect){return this._selectedItems}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;t<p.length;t++){if(!p[t].disabled){this.ensureVisible(t);break}}}}}if(this.remoteAutoComplete){this.listBox.clearSelection()}if(l!="search"){this._oldvalue=this.listBox.selectedValue}a.jqx.aria(this,"aria-expanded",true);if(this.dropDownWidth=="auto"&&this.width!=null&&this.width.indexOf&&this.width.indexOf("%")!=-1){if(this.listBox.host.width()!=this.host.width()){var r=this.host.width();this.listBoxContainer.jqxListBox({width:r});this.container.width(parseInt(r)+25)}}var o=this;var h=this.listBoxContainer;var v=this.listBox;var e=a(window).scrollTop();var f=a(window).scrollLeft();var m=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var d,q=parseInt(Math.round(this.host.coord(true).left));d=q+"px";var u=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();this.ishiding=false;var g=a.jqx.utilities.hasTransform(this.host);if(g||(u!=null&&u)){d=a.jqx.mobile.getLeftPos(this.element);m=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){m=parseInt(m)-this._getBodyOffset().top+"px"}if(a("body").css("border-left-width")!="0px"){d=parseInt(d)-this._getBodyOffset().left+"px"}}this.host.addClass(this.toThemeProperty("jqx-combobox-state-selected"));this.dropdownlistArrowIcon.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-combobox-arrow-selected"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.host.addClass(this.toThemeProperty("jqx-combobox-state-focus"));this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistContent.addClass(this.toThemeProperty("jqx-combobox-content-focus"));this.container.css("left",d);this.container.css("top",m);v._arrange();var c=true;var b=false;if(this.dropDownHorizontalAlignment=="right"||this.rtl){var k=this.container.outerWidth();var s=Math.abs(k-this.host.width());if(k>this.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<f.length;b++){f[b].disabled=false;if(this.selectedItems.indexOf(f[b].value)>=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(l){var n=e.getItemByValue(this);if(!n||e.remoteAutoComplete){n=e._selectedItems[l]}var p=a('<div style="overflow: hidden; float: left;"></div>');p.addClass(e.toThemeProperty("jqx-button"));p.addClass(e.toThemeProperty("jqx-combobox-multi-item"));p.addClass(e.toThemeProperty("jqx-fill-state-normal"));p.addClass(e.toThemeProperty("jqx-rc-all"));if(n){var q=n.label;if(e.renderSelectedItem){var i=e.renderSelectedItem(l,n);if(i){q=i}}if(p[0].innerHTML==""){p[0].innerHTML='<a data-value="'+n.value+'" style="float: left;" href="#">'+q+"</a>"}if(e.rtl){p[0].innerHTML='<a data-value="'+n.value+'" style="float: right;" href="#">'+q+"</a>"}var o=!e.rtl?"right":"left";if(e.showCloseButtons){var m='<div style="position: relative; overflow: hidden; float: '+o+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='<div style="position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>'}if(e.rtl){var m='<div style="position: relative; overflow: hidden; float: '+o+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='<div style="position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>'}}p[0].innerHTML+=m}}else{if(p[0].innerHTML==""){p[0].innerHTML='<a href="#"></a>'}}e.dropdownlistContent.append(p)});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(p){if(e.disabled){return}var r=a(p.target).parent().parent().find("a").attr("data-value");var o=e.getItemByValue(r);if(o||(e.remoteAutoComplete&&!o&&e.selectedItems.indexOf(r)>=0)){e.listBox.selectedValue=null;var l=e.selectedItems.indexOf(r);var n=o&&o.index>=0?o.index:l;if(l>=0){e.selectedItems.splice(l,1);var q=e._selectedItems[l];if(!q){q=o}e._selectedItems.splice(l,1);e._raiseEvent("3",{index:n,type:"mouse",item:q});e._raiseEvent("4",{index:n,type:"mouse",item:q});e.doMultiSelect()}else{for(var m=0;m<e.selectedItems.length;m++){var q=e.selectedItems[m];if(q==r){e.selectedItems.splice(m,1);e._selectedItems.splice(m,1);e._raiseEvent("3",{index:n,type:"mouse",item:o});e._raiseEvent("4",{index:n,type:"mouse",item:o});e.doMultiSelect();break}}}}});e.dropdownlistArrow.height(this.host.height());e._updateInputSelection()},hideListBox:function(h){var f=this.listBoxContainer;var g=this.listBox;var c=this.container;if(this.container[0].style.display=="none"){return}a.jqx.aria(this,"aria-expanded",false);if(h=="keyboard"||h=="mouse"){this.listBox.searchString=""}if(h=="keyboard"||h=="mouse"&&this.multiSelect){this.doMultiSelect()}var d=this;a.data(document.body,"openedCombojqxListBox"+this.element.id,null);if(this.animationType=="none"){this.opening=false;this.container.css("display","none")}else{if(!this.ishiding){var b=f.outerHeight();f.css("margin-top",0);f.stop();this.opening=false;this.isanimating=true;var e=-b;if(parseInt(this.container.coord().top)<parseInt(this.host.coord().top)){e=b}if(this.animationType=="fade"){f.css({opacity:1});f.animate({opacity:0},this.closeDelay,function(){d.isanimating=false;c.css("display","none");d.ishiding=false})}else{f.animate({"margin-top":e},this.closeDelay,function(){d.isanimating=false;c.css("display","none");d.ishiding=false})}}}this.ishiding=true;this.host.removeClass(this.toThemeProperty("jqx-combobox-state-selected"));this.dropdownlistArrowIcon.removeClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-combobox-arrow-selected"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));if(!this.focused){this.host.removeClass(this.toThemeProperty("jqx-combobox-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistContent.removeClass(this.toThemeProperty("jqx-combobox-content-focus"))}this.host.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.host.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));this._raiseEvent("1",g)},closeOpenedListBox:function(e){var d=e.data.me;var b=a(e.target);var c=e.data.listbox;if(c==null){return true}if(a(e.target).ischildof(e.data.me.host)){return}var f=d;var g=false;a.each(b.parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-listbox")!=-1){g=true;return false}if(this.className.indexOf("jqx-combobox")!=-1){if(d.element.id==this.id){g=true}return false}}}});if(c!=null&&!g){if(d.isOpened()){d.hideListBox("api");d.input.blur()}}return true},loadFromSelect:function(b){this.listBox.loadFromSelect(b);this.clearSelection()},refresh:function(b){this._setSize();this._arrange();if(this.listBox){this.renderSelection()}},resize:function(){this._setSize();this._arrange()},_arrange:function(){var d=parseInt(this.host.width());var j=parseInt(this.host.height());var e=this.arrowSize;var f=this.arrowSize;var h=1;if(!this.showArrow){f=0;e=0;this.dropdownlistArrow.hide();h=0;this.host.css("cursor","arrow")}var b=d-f-1*h;if(b>0){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%";if(!this.multiSelect){this.input.height(j)}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){}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 a.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=="placeHolder"){b.input.attr("placeholder",b.placeHolder)}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"))}a.jqx.utilities.setTheme(f,e,b.host)}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")}}})})(jqxBaseFramework); | ||
(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.dropdownlistContent.append(a('<input autocomplete="off" style="margin: 0; padding: 0; border: 0;" type="textarea"/>'));n.input=n.dropdownlistContent.find("input");n.input.addClass(n.toThemeProperty("jqx-combobox-input"));n.input.addClass(n.toThemeProperty("jqx-widget-content"));if(n.host.attr("tabindex")){n.input.attr("tabindex",n.host.attr("tabindex"));n.host.removeAttr("tabindex")}n._addInput();if(n.rtl){n.input.css({direction:"rtl"});n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content-rtl"))}try{var q="listBox"+n.id;var i=a(a.find("#"+q));if(i.length>0){i.remove()}a.jqx.aria(this,"aria-owns",q);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-multiline",false);if(n.listBoxContainer){n.listBoxContainer.jqxListBox("destroy")}if(n.container){n.container.remove()}var b=a("<div style='overflow: hidden; border: none; background-color: transparent; position: absolute;' id='listBox"+n.id+"'><div id='innerListBox"+n.id+"'></div></div>");b.hide();b.appendTo(document.body);n.container=b;n.listBoxContainer=a(a.find("#innerListBox"+n.id));var d=n.width;if(n.dropDownWidth!="auto"){d=n.dropDownWidth}if(n.dropDownHeight==null){n.dropDownHeight=200}n.container.width(parseInt(d)+25);n.container.height(parseInt(n.dropDownHeight)+25);n.addHandler(n.listBoxContainer,"bindingComplete",function(e){if(!n.listBox){n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance}n._raiseEvent("6")});var j=true;n.listBoxContainer.jqxListBox({_checkForHiddenParent:false,allowDrop:false,allowDrag:false,checkboxes:n.checkboxes,emptyString:n.emptyString,autoBind:!n.remoteAutoComplete&&n.autoBind,renderer:n.renderer,rtl:n.rtl,itemHeight:n.itemHeight,selectedIndex:n.selectedIndex,incrementalSearch:false,width:d,scrollBarSize:n.scrollBarSize,autoHeight:n.autoDropDownHeight,height:n.dropDownHeight,groupMember:n.groupMember,searchMember:n.searchMember,displayMember:n.displayMember,valueMember:n.valueMember,source:n.source,theme:n.theme,rendered:function(){n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance;if(n.remoteAutoComplete){if(n.autoDropDownHeight){n.container.height(n.listBox.virtualSize.height+25);n.listBoxContainer.height(n.listBox.virtualSize.height);n.listBox._arrange()}else{n.listBox._arrange();n.listBox.ensureVisible(0);n.listBox._renderItems();n.container.height(n.listBoxContainer.height()+25)}if(n.searchString!=undefined&&n.searchString.length>=n.minLength){var e=n.listBoxContainer.jqxListBox("items");if(e){if(e.length>0){if(!n.isOpened()){n.open()}}else{n.close()}}else{n.close()}}else{n.close()}}else{n.renderSelection("mouse");if(n.multiSelect){n.doMultiSelect(false)}}if(n.rendered){n.rendered()}}});n.listBoxContainer.css({position:"absolute",zIndex:n.popupZIndex,top:0,left:0});n.listBoxContainer.css("border-top-width","1px");n.listBoxContainer.addClass(n.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){n.listBoxContainer.addClass(n.toThemeProperty("jqx-noshadow"))}n.listBox=a.data(n.listBoxContainer[0],"jqxListBox").instance;n.listBox.enableSelection=n.enableSelection;n.listBox.enableHover=n.enableHover;n.listBox.equalItemsWidth=n.equalItemsWidth;n.listBox._arrange();n.addHandler(n.listBoxContainer,"unselect",function(e){if(!n.multiSelect){n._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})}});n.addHandler(n.listBoxContainer,"change",function(e){if(!n.multiSelect){n.selectedIndex=n.listBox.selectedIndex;n._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}});if(n.animationType=="none"){n.container.css("display","none")}else{n.container.hide()}j=false}catch(l){throw l}var r=this;r.input.attr("disabled",r.disabled);var h=a.jqx.browser.msie&&a.jqx.browser.version<8;if(!h){r.input.attr("placeholder",r.placeHolder)}n.propertyChangeMap.disabled=function(e,u,t,v){if(v){e.host.addClass(r.toThemeProperty("jqx-combobox-state-disabled"));e.host.addClass(r.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(r.toThemeProperty("jqx-combobox-content-disabled"))}else{e.host.removeClass(r.toThemeProperty("jqx-combobox-state-disabled"));e.host.removeClass(r.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(r.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(n.disabled){n.host.addClass(n.toThemeProperty("jqx-combobox-state-disabled"));n.host.addClass(n.toThemeProperty("jqx-fill-state-disabled"));n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content-disabled"))}n.host.addClass(n.toThemeProperty("jqx-combobox-state-normal"));n.host.addClass(n.toThemeProperty("jqx-combobox"));n.host.addClass(n.toThemeProperty("jqx-rc-all"));n.host.addClass(n.toThemeProperty("jqx-widget"));n.host.addClass(n.toThemeProperty("jqx-widget-content"));n.dropdownlistArrowIcon=a("<div></div>");n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon-arrow-down"));n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon"));n.dropdownlistArrow.append(n.dropdownlistArrowIcon);n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-combobox-arrow-normal"));n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-fill-state-normal"));if(!n.rtl){n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-r"))}else{n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-l"))}n._setSize();n._updateHandlers();n.addHandler(n.input,"keyup.textchange",function(e){var t=n._search(e);if(n.cinput&&n.input){if(!n.displayMember){n.cinput[0].value=n.input[0].value}else{n._updateInputSelection()}}});if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(n.host.parents(".jqx-window").length>0){var o=n.host.parents(".jqx-window").css("z-index");b.css("z-index",o+10);n.listBoxContainer.css("z-index",o+10)}}if(n.checkboxes){n.input.attr("readonly",true);a.jqx.aria(this,"aria-readonly",true)}else{a.jqx.aria(this,"aria-readonly",false)}if(!n.remoteAutoComplete){n.searchString=""}},_addInput:function(){var b=this.host.attr("name");this.cinput=a("<input type='hidden'/>");this.host.append(this.cinput);if(b){this.cinput.attr("name",b)}},_updateInputSelection:function(){if(this.cinput){var c=new Array();if(this.selectedIndex==-1){this.cinput.val("")}else{var e=this.getSelectedItem();if(e!=null){this.cinput.val(e.value);c.push(e.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 f="";if(b!=null){for(var d=0;d<b.length;d++){if(d==b.length-1){f+=b[d].value}else{f+=b[d].value+","}c.push(b[d].value)}}this.cinput.val(f)}if(this.field&&this.cinput){if(this.field.nodeName.toLowerCase()=="select"){a.each(this.field,function(g,h){a(this).removeAttr("selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(g,h){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}}},_search:function(m){var d=this;if(m.keyCode==9){return}if(d.searchMode=="none"||d.searchMode==null||d.searchMode=="undefined"){return}if(m.keyCode==16||m.keyCode==17||m.keyCode==20){return}if(d.checkboxes){return}if(d.multiSelect){var n=a("<span style='visibility: hidden; white-space: nowrap;'>"+d.input.val()+"</span>");n.addClass(d.toThemeProperty("jqx-widget"));a(document.body).append(n);var j=n.width()+15;n.remove();if(j>d.host.width()){j=d.host.width()}if(j<25){j=25}d.input.css("width",j+"px");if(d.selectedItems.length==0){d.input.css("width","100%");d.input.attr("placeholder",d.placeHolder)}else{d.input.attr("placeholder","")}var f=parseInt(this._findPos(d.host[0])[1])+parseInt(d.host.outerHeight())-1+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();if((o!=null&&o)){f=a.jqx.mobile.getTopPos(this.element)+parseInt(d.host.outerHeight());if(a("body").css("border-top-width")!="0px"){f=parseInt(f)-this._getBodyOffset().top+"px"}}d.container.css("top",f);var i=parseInt(d.host.height());d.dropdownlistArrow.height(i)}if(!d.isanimating){if(m.altKey&&m.keyCode==38){d.hideListBox("altKey");return false}if(m.altKey&&m.keyCode==40){if(!d.isOpened()){d.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||d.ctrlKey){if(m.keyCode!=88&&m.keyCode!=86){return}}var l=d.input.val();if(l.length==0&&!d.autoComplete){d.listBox.searchString=d.input.val();d.listBox.clearSelection();d.hideListBox("search");d.searchString=d.input.val();return}if(d.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(d._searchTimer){clearTimeout(d._searchTimer)}if(m.keyCode!=13&&m.keyCode!=27){d._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"}},d.remoteAutoCompleteDelay)}}s.searchString=l}}else{if(d._searchTimer){clearTimeout(d._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=d._updateItemsVisibility(l);var e=b.matchItems;var c=b.index;if(!d.autoComplete&&!d.removeAutoComplete){if(!d.multiSelect||(d.multiSelect&&c>=0)){d.listBox.selectIndex(c);var r=d.listBox.isIndexInView(c);if(!r){d.listBox.ensureVisible(c)}else{d.listBox._renderItems()}}}if(d.autoComplete&&e.length===0){d.hideListBox("search")}}if(m.keyCode=="13"){var g=d.container.css("display")=="block";if(g&&!d.isanimating){d.hideListBox("keyboard");d._oldvalue=d.listBox.selectedValue;return}}else{if(m.keyCode=="27"){var g=d.container.css("display")=="block";if(g&&!d.isanimating){if(!h.multiSelect){var q=d.listBox.getVisibleItem(d._oldvalue);if(q){var h=this;setTimeout(function(){if(h.autoComplete){h._updateItemsVisibility("")}h.listBox.selectIndex(q.index);h.renderSelection("api")},h.closeDelay)}else{d.clearSelection()}}else{h.input.val("");h.listBox.selectedValue=null}d.hideListBox("keyboard");d.renderSelection("api");m.preventDefault();return false}}else{if(!d.isOpened()&&!d.opening&&!m.ctrlKey){if(d.listBox.visibleItems&&d.listBox.visibleItems.length>0){if(d.input.val()!=d.searchString&&d.searchString!=undefined&&c!=-1){d.showListBox("search")}}}d.searchString=d.input.val();if(d.searchString==""){if(!d.listBox.itemsByValue[""]){c=-1;if(!d.multiSelect){d.clearSelection()}}}var q=d.listBox.getVisibleItem(c);if(q!=undefined){d._updateInputSelection()}}}},val:function(c){if(!this.input){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(d(c)||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.searchLabel){r=this.searchLabel}else{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;q<f.listBox.items.length;q++){f.listBox.selectedIndexes[q]=-1;if(!f.listBox.items[q].disabled){if(s==false){r=f.listBox.items[q];p=r.visibleIndex;s=true}}}f.listBox.selectedIndex=-1;f.listBox.selectedIndex=p;f.listBox.selectedIndexes[p]=p;if(f.listBox.visibleItems.length>0){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<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndexes[o.visibleIndex]=o.visibleIndex}else{for(var d=0;d<this.listBox.items.length;d++){this.listBox.selectedIndexes[d]=-1}this.listBox.selectedIndex=-1}}}else{h()}this.listBox._renderItems();var n=this.listBox._calculateVirtualSize().height;if(n<b){b=0;this.listBox.vScrollInstance.refresh()}if(this.autoDropDownHeight){this._disableSelection=true;if(this.listBox.autoHeight!=this.autoDropDownHeight){this.listBoxContainer.jqxListBox({autoHeight:this.autoDropDownHeight})}this.container.height(n+25);this.listBox.invalidate();this._disableSelection=false}else{if(n<parseInt(this.dropDownHeight)){var c=this.listBox.hScrollBar[0].style.visibility=="hidden"?0:20;this.listBox.height=c+n;this.container.height(n+25+c);this.listBox.invalidate()}else{this.listBox.height=parseInt(this.dropDownHeight);this.container.height(parseInt(this.dropDownHeight)+25);this.listBox.invalidate()}}this.listBox.vScrollInstance.setPosition(b);return{index:g,matchItems:m}},findItems:function(e){var b=this.getItems();var d=this;var c=0;var f=new Array();a.each(b,function(g){var j="";if(!this.isGroup){if(this.label){j=this.label}else{if(this.value){j=this.value}else{if(this.title){j=this.title}else{j="jqxItem"}}}var h=false;switch(d.searchMode){case"containsignorecase":h=a.jqx.string.containsIgnoreCase(j,e);break;case"contains":h=a.jqx.string.contains(j,e);break;case"equals":h=a.jqx.string.equals(j,e);break;case"equalsignorecase":h=a.jqx.string.equalsIgnoreCase(j,e);break;case"startswith":h=a.jqx.string.startsWith(j,e);break;case"startswithignorecase":h=a.jqx.string.startsWithIgnoreCase(j,e);break;case"endswith":h=a.jqx.string.endsWith(j,e);break;case"endswithignorecase":h=a.jqx.string.endsWithIgnoreCase(j,e);break}if(h){f[c++]=this}}});return f},_resetautocomplete:function(){a.each(this.listBox.items,function(b){this.visible=true});this.listBox.vScrollInstance.value=0;this.listBox._addItems();this.listBox.autoHeight=false;this.listBox.height=this.dropDownHeight;this.container.height(parseInt(this.dropDownHeight)+25);this.listBoxContainer.height(parseInt(this.dropDownHeight));this.listBox._arrange();this.listBox._addItems();this.listBox._renderItems()},getItems:function(){var b=this.listBox.items;return b},getVisibleItems:function(){return this.listBox.getVisibleItems()},_setSize:function(){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 e=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){e=true;this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){e=true;this.host.height(this.height)}if(e){var c=this;var b=this.host.width();if(this.dropDownWidth!="auto"){b=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:b});this.container.width(parseInt(b)+25);this._arrange()}var c=this;var d=function(){if(c.multiSelect){c.host.height(c.height)}c._arrange();if(c.multiSelect){c.host.height("auto")}};c.oldWidth=c.host.width();c.oldHeight=c.host.height();a.jqx.utilities.resize(this.host,function(){var f=c.host.width();var g=c.host.height();if(f!=c.oldWidth||g!=c.oldHeight){d();c.hideListBox("api")}c.oldWidth=f;c.oldHeight=g})},isOpened:function(){var c=this;var b=a.data(document.body,"openedCombojqxListBox"+this.element.id);if(this.container.css("display")!="block"){return false}if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var d=this;var e=false;this.removeHandlers();if(this.multiSelect){this.addHandler(this.dropdownlistContent,"click",function(f){if(f.target.href){return false}d.input.focus();setTimeout(function(){d.input.focus()},10)});this.addHandler(this.dropdownlistContent,"focus",function(f){if(f.target.href){return false}d.input.focus();setTimeout(function(){d.input.focus()},10)})}if(!this.touch){if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.combobox"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){e=true;d.host.addClass(d.toThemeProperty("jqx-combobox-state-hover"));d.dropdownlistArrowIcon.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"));d.dropdownlistArrow.addClass(d.toThemeProperty("jqx-combobox-arrow-hover"));d.dropdownlistArrow.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.host.removeClass(d.toThemeProperty("jqx-combobox-state-hover"));d.dropdownlistArrowIcon.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"));d.dropdownlistArrow.removeClass(d.toThemeProperty("jqx-combobox-arrow-hover"));d.dropdownlistArrow.removeClass(d.toThemeProperty("jqx-fill-state-hover"));e=false}})}if(d.autoOpen){this.addHandler(this.host,"mouseenter",function(){var f=d.isOpened();if(!f&&d.autoOpen){d.open();d.host.focus()}});this.addHandler(a(document),"mousemove."+d.id,function(i){var h=d.isOpened();if(h&&d.autoOpen){var m=d.host.coord();var l=m.top;var k=m.left;var j=d.container.coord();var f=j.left;var g=j.top;canClose=true;if(i.pageY>=l&&i.pageY<=l+d.host.height()+2){if(i.pageX>=k&&i.pageX<k+d.host.width()){canClose=false}}if(i.pageY>=g&&i.pageY<=g+d.container.height()-20){if(i.pageX>=f&&i.pageX<f+d.container.width()){canClose=false}}if(canClose){d.close()}}})}var c="mousedown";if(this.touch){c=a.jqx.mobile.getTouchEventName("touchstart")}var b=function(h){if(!d.disabled){var f=d.container.css("display")=="block";if(!d.isanimating){if(f){d.hideListBox("api");if(!a.jqx.mobile.isTouchDevice()){d.input.focus();setTimeout(function(){d.input.focus()},10)}return true}else{if(d.autoDropDownHeight){d.container.height(d.listBoxContainer.height()+25);var g=d.listBoxContainer.jqxListBox("autoHeight");if(!g){d.listBoxContainer.jqxListBox({autoHeight:d.autoDropDownHeight});d.listBox._arrange();d.listBox.ensureVisible(0);d.listBox._renderItems();d.container.height(d.listBoxContainer.height()+25)}}d.showListBox("api");if(!a.jqx.mobile.isTouchDevice()){setTimeout(function(){d.input.focus()},10)}else{return true}}}}};this.addHandler(this.dropdownlistArrow,c,function(f){b(f)});this.addHandler(this.dropdownlistArrowIcon,c,function(f){});this.addHandler(this.host,"focus",function(){d.focus()});this.addHandler(this.input,"focus",function(f){d.focused=true;d.host.addClass(d.toThemeProperty("jqx-combobox-state-focus"));d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"));d.dropdownlistContent.addClass(d.toThemeProperty("jqx-combobox-content-focus"));if(f.stopPropagation){f.stopPropagation()}});this.addHandler(this.input,"blur",function(){d.focused=false;if(!d.isOpened()&&!d.opening){if(d.selectionMode=="dropDownList"){d._selectOldValue()}d.host.removeClass(d.toThemeProperty("jqx-combobox-state-focus"));d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"));d.dropdownlistContent.removeClass(d.toThemeProperty("jqx-combobox-content-focus"))}if(d._searchTimer){clearTimeout(d._searchTimer)}});this.addHandler(a(document),"mousedown."+this.id,d.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id});if(this.touch){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,d.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}this.addHandler(this.host,"keydown",function(k){var h=d.container.css("display")=="block";d.ctrlKey=k.ctrlKey;if(d.host.css("display")=="none"){return true}if(k.keyCode=="13"||k.keyCode=="9"){if(h&&!d.isanimating){if(d.listBox.selectedIndex!=-1){d.renderSelection("mouse");var f=d.listBox.selectedIndex;var j=d.listBox.getVisibleItem(f);if(j){d.listBox.selectedValue=j.value}d._setSelection(d.input.val().length,d.input.val().length);d.hideListBox("keyboard")}if(k.keyCode=="13"){d._oldvalue=d.listBox.selectedValue}if(!d.keyboardSelection){d._raiseEvent("2",{index:d.selectedIndex,type:"keyboard",item:d.getItem(d.selectedIndex)})}if(k.keyCode=="9"){return true}return false}}if(k.keyCode==115){if(!d.isanimating){if(!d.isOpened()){d.showListBox("keyboard")}else{if(d.isOpened()){d.hideListBox("keyboard")}}}return false}if(k.altKey){if(d.host.css("display")=="block"){if(!d.isanimating){if(k.keyCode==38){if(d.isOpened()){d.hideListBox("altKey")}}else{if(k.keyCode==40){if(!d.isOpened()){d.showListBox("altKey")}}}}}}if(k.keyCode=="27"||k.keyCode=="9"){if(d.isOpened()&&!d.isanimating){if(k.keyCode=="27"){if(!d.multiSelect){var j=d.listBox.getItemByValue(d._oldvalue);if(j){setTimeout(function(){if(d.autoComplete){d._updateItemsVisibility("")}d.listBox.selectIndex(j.index);d.renderSelection("api")},d.closeDelay)}else{d.clearSelection()}}else{d.listBox.selectedValue=null;d.input.val("")}}d.hideListBox("keyboard");if(k.keyCode=="9"){return true}d.renderSelection("api");k.preventDefault();return false}}var g=k.keyCode;if(h&&!d.disabled&&g!=8){return d.listBox._handleKeyDown(k)}else{if(!d.disabled&&!h){var g=k.keyCode;if(g==33||g==34||g==35||g==36||g==38||g==40){return d.listBox._handleKeyDown(k)}}}if(g===8&&d.multiSelect){if(d.input.val().length===0){var i=d.selectedItems[d.selectedItems.length-1];d.selectedItems.pop();d._selectedItems.pop();if(i){d._raiseEvent("3",{index:i.index,type:"keyboard",item:i});d._raiseEvent("4",{index:i.index,type:"keyboard",item:i})}d.listBox.selectedValue=null;d.doMultiSelect();return false}}});this.addHandler(this.listBoxContainer,"checkChange",function(f){d.renderSelection("mouse");d._updateInputSelection();d._raiseEvent(5,{label:f.args.label,value:f.args.value,checked:f.args.checked,item:f.args.item})});this.addHandler(this.listBoxContainer,"select",function(f){if(!d.disabled){if(f.args.type!="keyboard"||d.keyboardSelection){d.renderSelection(f.args.type);if(!d.multiSelect){d._raiseEvent("2",{index:f.args.index,type:f.args.type,item:f.args.item})}if(f.args.type=="mouse"){d._oldvalue=d.listBox.selectedValue;if(!d.checkboxes){d.hideListBox("mouse");if(!d.touch){d.input.focus()}else{return false}}}}}});if(this.listBox!=null&&this.listBox.content!=null){this.addHandler(this.listBox.content,"click",function(f){if(!d.disabled){if(d.listBox.itemswrapper){if(f.target===d.listBox.itemswrapper[0]){return true}}if(f.target&&f.target.className){if(f.target.className.indexOf("jqx-fill-state-disabled")>=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("");this.input.attr("value","");if(!d){this.input.attr("placeholder",this.placeHolder)}this._updateInputSelection();return}this.selectedIndex=this.listBox.selectedIndex;var c=a("<span></span>");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<g.length;e++){if(e==g.length-1){h+=g[e].label}else{h+=g[e].label+", "}}this.input.val(h)}else{this.input.val(c.text())}c.remove();this._updateInputSelection();if(this.renderSelectedItem){var l=this.renderSelectedItem(this.listBox.selectedIndex,k);if(l!=undefined){this.input[0].value=l}}this.input.attr("value",this.input.val());if(this.listBox&&this.listBox._activeElement){a.jqx.aria(this,"aria-activedescendant",this.listBox._activeElement.id)}},dataBind:function(){this.listBoxContainer.jqxListBox({source:this.source});this.renderSelection("mouse");if(this.source==null){this.clearSelection()}},clear:function(){this.listBoxContainer.jqxListBox({source:null});this.clearSelection()},clearSelection:function(b){this.selectedIndex=-1;this.listBox.clearSelection();this.input.val("");if(this.multiSelect){this.listBox.selectedValue="";this.selectedItems=new Array();this._selectedItems=new Array();this.doMultiSelect(false)}},unselectIndex:function(c,d){if(isNaN(c)){return}if(this.autoComplete){this._updateItemsVisibility("")}this.listBox.unselectIndex(c,d);this.renderSelection("mouse");if(this.multiSelect){if(c>=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(){if(!this.multiSelect){return this.listBox.selectedIndex}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}}},getSelectedItem:function(){if(!this.multiSelect){return this.getVisibleItem(this.listBox.selectedIndex)}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0]}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0]}return null}},getSelectedItems:function(){if(this.remoteAutoComplete&&this.multiSelect){return this._selectedItems}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;t<p.length;t++){if(!p[t].disabled){this.ensureVisible(t);break}}}}}if(this.remoteAutoComplete){this.listBox.clearSelection()}if(l!="search"){this._oldvalue=this.listBox.selectedValue}a.jqx.aria(this,"aria-expanded",true);if(this.dropDownWidth=="auto"&&this.width!=null&&this.width.indexOf&&this.width.indexOf("%")!=-1){if(this.listBox.host.width()!=this.host.width()){var r=this.host.width();this.listBoxContainer.jqxListBox({width:r});this.container.width(parseInt(r)+25)}}var o=this;var h=this.listBoxContainer;var v=this.listBox;var e=a(window).scrollTop();var f=a(window).scrollLeft();var m=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var d,q=parseInt(Math.round(this.host.coord(true).left));d=q+"px";var u=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();this.ishiding=false;var g=a.jqx.utilities.hasTransform(this.host);if(g||(u!=null&&u)){d=a.jqx.mobile.getLeftPos(this.element);m=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){m=parseInt(m)-this._getBodyOffset().top+"px"}if(a("body").css("border-left-width")!="0px"){d=parseInt(d)-this._getBodyOffset().left+"px"}}this.host.addClass(this.toThemeProperty("jqx-combobox-state-selected"));this.dropdownlistArrowIcon.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-combobox-arrow-selected"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.host.addClass(this.toThemeProperty("jqx-combobox-state-focus"));this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistContent.addClass(this.toThemeProperty("jqx-combobox-content-focus"));this.container.css("left",d);this.container.css("top",m);v._arrange();var c=true;var b=false;if(this.dropDownHorizontalAlignment=="right"||this.rtl){var k=this.container.outerWidth();var s=Math.abs(k-this.host.width());if(k>this.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<f.length;b++){f[b].disabled=false;if(this.selectedItems.indexOf(f[b].value)>=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(l){var n=e.getItemByValue(this);if(!n||e.remoteAutoComplete){n=e._selectedItems[l]}var p=a('<div style="overflow: hidden; float: left;"></div>');p.addClass(e.toThemeProperty("jqx-button"));p.addClass(e.toThemeProperty("jqx-combobox-multi-item"));p.addClass(e.toThemeProperty("jqx-fill-state-normal"));p.addClass(e.toThemeProperty("jqx-rc-all"));if(n){var q=n.label;if(e.renderSelectedItem){var i=e.renderSelectedItem(l,n);if(i){q=i}}if(p[0].innerHTML==""){p[0].innerHTML='<a data-value="'+n.value+'" style="float: left;" href="#">'+q+"</a>"}if(e.rtl){p[0].innerHTML='<a data-value="'+n.value+'" style="float: right;" href="#">'+q+"</a>"}var o=!e.rtl?"right":"left";if(e.showCloseButtons){var m='<div style="position: relative; overflow: hidden; float: '+o+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='<div style="position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>'}if(e.rtl){var m='<div style="position: relative; overflow: hidden; float: '+o+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='<div style="position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class="'+e.toThemeProperty("jqx-icon-close")+'"></div></div>'}}p[0].innerHTML+=m}}else{if(p[0].innerHTML==""){p[0].innerHTML='<a href="#"></a>'}}e.dropdownlistContent.append(p)});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(p){if(e.disabled){return}var r=a(p.target).parent().parent().find("a").attr("data-value");var o=e.getItemByValue(r);if(o||(e.remoteAutoComplete&&!o&&e.selectedItems.indexOf(r)>=0)){e.listBox.selectedValue=null;var l=e.selectedItems.indexOf(r);var n=o&&o.index>=0?o.index:l;if(l>=0){e.selectedItems.splice(l,1);var q=e._selectedItems[l];if(!q){q=o}e._selectedItems.splice(l,1);e._raiseEvent("3",{index:n,type:"mouse",item:q});e._raiseEvent("4",{index:n,type:"mouse",item:q});e.doMultiSelect()}else{for(var m=0;m<e.selectedItems.length;m++){var q=e.selectedItems[m];if(q==r){e.selectedItems.splice(m,1);e._selectedItems.splice(m,1);e._raiseEvent("3",{index:n,type:"mouse",item:o});e._raiseEvent("4",{index:n,type:"mouse",item:o});e.doMultiSelect();break}}}}});e.dropdownlistArrow.height(this.host.height());e._updateInputSelection()},hideListBox:function(h){var f=this.listBoxContainer;var g=this.listBox;var c=this.container;if(this.container[0].style.display=="none"){return}a.jqx.aria(this,"aria-expanded",false);if(h=="keyboard"||h=="mouse"){this.listBox.searchString=""}if(h=="keyboard"||h=="mouse"&&this.multiSelect){this.doMultiSelect()}var d=this;a.data(document.body,"openedCombojqxListBox"+this.element.id,null);if(this.animationType=="none"){this.opening=false;this.container.css("display","none")}else{if(!this.ishiding){var b=f.outerHeight();f.css("margin-top",0);f.stop();this.opening=false;this.isanimating=true;var e=-b;if(parseInt(this.container.coord().top)<parseInt(this.host.coord().top)){e=b}if(this.animationType=="fade"){f.css({opacity:1});f.animate({opacity:0},this.closeDelay,function(){d.isanimating=false;c.css("display","none");d.ishiding=false})}else{f.animate({"margin-top":e},this.closeDelay,function(){d.isanimating=false;c.css("display","none");d.ishiding=false})}}}this.ishiding=true;this.host.removeClass(this.toThemeProperty("jqx-combobox-state-selected"));this.dropdownlistArrowIcon.removeClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-combobox-arrow-selected"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));if(!this.focused){this.host.removeClass(this.toThemeProperty("jqx-combobox-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistContent.removeClass(this.toThemeProperty("jqx-combobox-content-focus"))}this.host.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.host.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.dropdownlistArrow.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));this._raiseEvent("1",g)},closeOpenedListBox:function(e){var d=e.data.me;var b=a(e.target);var c=e.data.listbox;if(c==null){return true}if(a(e.target).ischildof(e.data.me.host)){return}var f=d;var g=false;a.each(b.parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-listbox")!=-1){g=true;return false}if(this.className.indexOf("jqx-combobox")!=-1){if(d.element.id==this.id){g=true}return false}}}});if(c!=null&&!g){if(d.isOpened()){d.hideListBox("api");d.input.blur()}}return true},loadFromSelect:function(b){this.listBox.loadFromSelect(b);this.clearSelection()},refresh:function(b){this._setSize();this._arrange();if(this.listBox){this.renderSelection()}},resize:function(){this._setSize();this._arrange()},_arrange:function(){var d=parseInt(this.host.width());var j=parseInt(this.host.height());var e=this.arrowSize;var f=this.arrowSize;var h=1;if(!this.showArrow){f=0;e=0;this.dropdownlistArrow.hide();h=0;this.host.css("cursor","arrow")}var b=d-f-1*h;if(b>0){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%";if(!this.multiSelect){this.input.height(j)}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){}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 a.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=="placeHolder"){b.input.attr("placeholder",b.placeHolder)}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"))}a.jqx.utilities.setTheme(f,e,b.host)}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")}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
var jqxBaseFramework=window.minQuery||window.jQuery;(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){if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]!=undefined&&a.isFunction(e[b])){return e[b].apply(e,c)}}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();if(e[b]!=undefined&&a.isFunction(e[b])){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}if(d.hasOwnProperty(e.toLowerCase())){return true}d=d.base}return false}}else{while(c){if(c.hasOwnProperty(b)){return true}if(c.hasOwnProperty(b.toLowerCase())){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){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}}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(f,d,b){if(!a.jqx.propertySetterValidation){return true}if(d.length==1&&typeof(d[0])=="object"){for(var e in d[0]){var g=f;while(!g.hasOwnProperty(e)&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e)){if(!b){var c=g.hasOwnProperty(e.toString().toLowerCase());if(!c){throw"Invalid property: "+e}else{return true}}return false}}return true}if(d.length!=2){if(!b){throw"Invalid property: "+d.length>=0?d[0]:""}return false}while(!f.hasOwnProperty(d[0])&&f.base){f=f.base}if(!f||!f.hasOwnProperty(d[0])){if(!b){throw"Invalid property: "+d[0]}return false}return true};a.jqx.set=function(f,e){var d=0;if(e.length==1&&typeof(e[0])=="object"){if(f.isInitialized&&Object.keys&&Object.keys(e[0]).length>1){var g=!f.base?f.element:f.base.element;var j=a.data(g,f.widgetName).initArgs;if(JSON&&JSON.stringify&&e[0]&&j[0]){try{if(JSON.stringify(e[0])==JSON.stringify(j[0])){return}}catch(h){}}f.batchUpdate=e[0];var b={};var c={};a.each(e[0],function(k,l){var m=f;while(!m.hasOwnProperty(k)&&m.base!=null){m=m.base}if(m.hasOwnProperty(k)){if(f[k]!=l){b[k]=f[k];c[k]=l;d++}}else{if(m.hasOwnProperty(k.toLowerCase())){if(f[k.toLowerCase()]!=l){b[k.toLowerCase()]=f[k.toLowerCase()];c[k.toLowerCase()]=l;d++}}}});if(d<2){f.batchUpdate=null}}a.each(e[0],function(k,l){var m=f;while(!m.hasOwnProperty(k)&&m.base!=null){m=m.base}if(m.hasOwnProperty(k)){a.jqx.setvalueraiseevent(m,k,l)}else{if(m.hasOwnProperty(k.toLowerCase())){a.jqx.setvalueraiseevent(m,k.toLowerCase(),l)}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+k+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,b,c)}}}else{if(e.length==2){while(!f.hasOwnProperty(e[0])&&f.base){f=f.base}if(f.hasOwnProperty(e[0])){a.jqx.setvalueraiseevent(f,e[0],e[1])}else{if(f.hasOwnProperty(e[0].toLowerCase())){a.jqx.setvalueraiseevent(f,e[0].toLowerCase(),e[1])}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+e[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]}if(e.hasOwnProperty(d.toLowerCase())){return e[d.toLowerCase()]}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.applyWidget=function(c,d,k,l){var g=false;try{g=window.MSApp!=undefined}catch(f){}var m=a(c);if(!l){l=new a.jqx["_"+d]()}else{l.host=m;l.element=c}if(c.id==""){c.id=a.jqx.utilities.createId()}var j={host:m,element:c,instance:l,initArgs:k};l.widgetName=d;a.data(c,d,j);a.data(c,"jqxWidget",j.instance);var h=new Array();var l=j.instance;while(l){l.isInitialized=false;h.push(l);l=l.base}h.reverse();h[0].theme=a.jqx.theme||"";a.jqx.jqxWidgetProxy(d,c,k);for(var b in h){l=h[b];if(b==0){l.host=m;l.element=c;l.WinJS=g}if(l!=undefined){if(l.definedInstance){l.definedInstance()}if(l.createInstance!=null){if(g){MSApp.execUnsafeLocalFunction(function(){l.createInstance(k)})}else{l.createInstance(k)}}}}for(var b in h){if(h[b]!=undefined){h[b].isInitialized=true}}if(g){MSApp.execUnsafeLocalFunction(function(){j.instance.refresh(true)})}else{j.instance.refresh(true)}};a.jqx.jqxWidget=function(b,c,f){var j=false;try{jqxArgs=Array.prototype.slice.call(f,0)}catch(h){jqxArgs=""}try{j=window.MSApp!=undefined}catch(h){}var g=b;var l="";if(c){l="_"+c}a.jqx.define(a.jqx,"_"+g,l);var k=new Array();if(!window[g]){var d=function(m){if(m==null){return""}var e=a.type(m);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(m===null){return""}return m.toString()}var n="";a.each(m,function(p){var r=this;if(p>0){n+=", "}n+="[";var o=0;if(a.type(r)=="object"){for(var q in r){if(o>0){n+=", "}n+="{"+q+":"+r[q]+"}";o++}}else{if(o>0){n+=", "}n+="{"+p+":"+r+"}";o++}n+="]"});return n};window[g]=function(e,r){var m=[];if(!r){r={}}m.push(r);var n=e;if(a.type(n)==="object"&&e[0]){n=e[0].id;if(n===""){n=e[0].id=a.jqx.utilities.createId()}}if(window.jqxWidgets&&window.jqxWidgets[n]){if(r){a.each(window.jqxWidgets[n],function(s){var t=a(this.element).data();if(t&&t.jqxWidget){a(this.element)[g](r)}})}if(window.jqxWidgets[n].length==1){var p=a(window.jqxWidgets[n][0].widgetInstance.element).data();if(p&&p.jqxWidget){return window.jqxWidgets[n][0]}}var p=a(window.jqxWidgets[n][0].widgetInstance.element).data();if(p&&p.jqxWidget){return window.jqxWidgets[n]}}var o=a(e);if(o.length===0){throw new Error("Invalid Selector - "+e+"! Please, check whether the used ID or CSS Class name is correct.")}var q=[];a.each(o,function(v){var x=o[v];var u=null;if(!k[g]){var y=x.id;x.id="";u=a(x).clone();x.id=y}a.jqx.applyWidget(x,g,m,undefined);if(!k[g]){var t=a.data(x,"jqxWidget");var w=u[g]().data().jqxWidget.defineInstance();var s=function(A){var z=a.data(A,"jqxWidget");this.widgetInstance=z;var B=a.extend(this,z);B.on=function(C,D){B.addHandler(B.host,C,D)};B.off=function(C){B.removeHandler(B.host,C)};return B};k[g]=s;a.each(w,function(A,z){Object.defineProperty(s.prototype,A,{get:function(){if(this.widgetInstance){return this.widgetInstance[A]}return z},set:function(C){if(this.widgetInstance&&this.widgetInstance[A]!=C){if(this.widgetInstance[A]!=C&&d(this.widgetInstance[A])!=d(C)){var B={};B[A]=C;this.widgetInstance.host[g](B);this.widgetInstance[A]=C}}}})})}var t=new k[g](x);q.push(t);if(!window.jqxWidgets){window.jqxWidgets=new Array()}if(!window.jqxWidgets[n]){window.jqxWidgets[n]=new Array()}window.jqxWidgets[n].push(t)});if(q.length===1){return q[0]}return q}}a.fn[g]=function(){var e=Array.prototype.slice.call(arguments,0);if(e.length==0||(e.length==1&&typeof(e[0])=="object")){if(this.length==0){if(this.selector){throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.")}}return this.each(function(){var p=a(this);var o=this;var q=a.data(o,g);if(q==null){a.jqx.applyWidget(o,g,e,undefined)}else{a.jqx.jqxWidgetProxy(g,this,e)}})}else{if(this.length==0){if(this.selector){throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.")}}var n=null;var m=0;this.each(function(){var o=a.jqx.jqxWidgetProxy(g,this,e);if(m==0){n=o;m++}else{if(m==1){var p=[];p.push(n);n=p}n.push(o)}})}return n};try{a.extend(a.jqx["_"+g].prototype,Array.prototype.slice.call(f,0)[0])}catch(h){}a.extend(a.jqx["_"+g].prototype,{toThemeProperty:function(e,m){return a.jqx.toThemeProperty(this,e,m)}});a.jqx["_"+g].prototype.refresh=function(){if(this.base){this.base.refresh(true)}};a.jqx["_"+g].prototype.createInstance=function(){};a.jqx["_"+g].prototype.applyTo=function(n,m){if(!(m instanceof Array)){var e=[];e.push(m);m=e}a.jqx.applyWidget(n,g,m,this)};a.jqx["_"+g].prototype.getInstance=function(){return this};a.jqx["_"+g].prototype.propertyChangeMap={};a.jqx["_"+g].prototype.addHandler=function(o,e,m,n){a.jqx.addHandler(o,e,m,n)};a.jqx["_"+g].prototype.removeHandler=function(n,e,m){a.jqx.removeHandler(n,e,m)}};a.jqx.toThemeProperty=function(c,d,h){if(c.theme==""){return d}var g=d.split(" ");var b="";for(var f=0;f<g.length;f++){if(f>0){b+=" "}var e=g[f];if(h!=null&&h){b+=e+"-"+c.theme}else{b+=e+" "+e+"-"+c.theme}}return b};a.jqx.addHandler=function(g,h,e,f){var c=h.split(" ");for(var b=0;b<c.length;b++){var d=c[b];if(window.addEventListener){switch(d){case"mousewheel":if(a.jqx.browser.mozilla){g[0].addEventListener("DOMMouseScroll",e,false)}else{g[0].addEventListener("mousewheel",e,false)}continue;case"mousemove":if(!f){g[0].addEventListener("mousemove",e,false);continue}break}}if(f==undefined||f==null){if(g.on){g.on(d,e)}else{g.bind(d,e)}}else{if(g.on){g.on(d,f,e)}else{g.bind(d,f,e)}}}};a.jqx.removeHandler=function(f,g,e){if(!g){return}var c=g.split(" ");for(var b=0;b<c.length;b++){var d=c[b];if(window.removeEventListener){switch(d){case"mousewheel":if(a.jqx.browser.mozilla){f[0].removeEventListener("DOMMouseScroll",e,false)}else{f[0].removeEventListener("mousewheel",e,false)}continue;case"mousemove":if(e){f[0].removeEventListener("mousemove",e,false);continue}break}}if(d==undefined){if(f.off){f.off()}else{f.unbind()}continue}if(e==undefined){if(f.off){f.off(d)}else{f.unbind(d)}}else{if(f.off){f.off(d,e)}else{f.unbind(d,e)}}}};a.jqx.theme=a.jqx.theme||"";a.jqx.resizeDelay=a.jqx.resizeDelay||10;a.jqx.ready=function(){a(window).trigger("jqxReady")};a.jqx.init=function(){a.each(arguments[0],function(b,c){if(b=="theme"){a.jqx.theme=c}if(b=="scrollBarSize"){a.jqx.utilities.scrollBarSize=c}if(b=="touchScrollBarSize"){a.jqx.utilities.touchScrollBarSize=c}if(b=="scrollBarButtonsVisibility"){a.jqx.utilities.scrollBarButtonsVisibility=c}})};a.jqx.utilities=a.jqx.utilities||{};a.extend(a.jqx.utilities,{scrollBarSize:15,touchScrollBarSize:10,scrollBarButtonsVisibility:"visible",createId:function(){var b=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return"jqxWidget"+b()+b()},setTheme:function(f,g,e){if(typeof e==="undefined"){return}var h=e[0].className.split(" "),b=[],j=[],d=e.children();for(var c=0;c<h.length;c+=1){if(h[c].indexOf(f)>=0){if(f.length>0){b.push(h[c]);j.push(h[c].replace(f,g))}else{j.push(h[c].replace("-"+g,"")+"-"+g)}}}this._removeOldClasses(b,e);this._addNewClasses(j,e);for(var c=0;c<d.length;c+=1){this.setTheme(f,g,a(d[c]))}},_removeOldClasses:function(d,c){for(var b=0;b<d.length;b+=1){c.removeClass(d[b])}},_addNewClasses:function(d,c){for(var b=0;b<d.length;b+=1){c.addClass(d[b])}},getOffset:function(b){var d=a.jqx.mobile.getLeftPos(b[0]);var c=a.jqx.mobile.getTopPos(b[0]);return{top:c,left:d}},resize:function(d,m,l,k){if(k===undefined){k=true}var g=-1;var f=this;var c=function(o){if(!f.hiddenWidgets){return -1}var p=-1;for(var n=0;n<f.hiddenWidgets.length;n++){if(o.id){if(f.hiddenWidgets[n].id==o.id){p=n;break}}else{if(f.hiddenWidgets[n].id==o[0].id){p=n;break}}}return p};if(this.resizeHandlers){for(var e=0;e<this.resizeHandlers.length;e++){if(d.id){if(this.resizeHandlers[e].id==d.id){g=e;break}}else{if(this.resizeHandlers[e].id==d[0].id){g=e;break}}}if(l===true){if(g!=-1){this.resizeHandlers.splice(g,1)}if(this.resizeHandlers.length==0){var j=a(window);if(j.off){j.off("resize.jqx");j.off("orientationchange.jqx");j.off("orientationchanged.jqx")}else{j.unbind("resize.jqx");j.unbind("orientationchange.jqx");j.unbind("orientationchanged.jqx")}this.resizeHandlers=null}var b=c(d);if(b!=-1&&this.hiddenWidgets){this.hiddenWidgets.splice(b,1)}return}}else{if(l===true){var b=c(d);if(b!=-1&&this.hiddenWidgets){this.hiddenWidgets.splice(b,1)}return}}var f=this;var h=function(p,x){if(!f.resizeHandlers){return}var y=function(C){var B=-1;var D=C.parentNode;while(D){B++;D=D.parentNode}return B};var o=function(E,C){if(!E.widget||!C.widget){return 0}var D=y(E.widget[0]);var B=y(C.widget[0]);try{if(D<B){return -1}if(D>B){return 1}}catch(F){var G=F}return 0};var q=function(C){if(f.hiddenWidgets.length>0){f.hiddenWidgets.sort(o);var B=function(){var E=false;var G=new Array();for(var F=0;F<f.hiddenWidgets.length;F++){var D=f.hiddenWidgets[F];if(a.jqx.isHidden(D.widget)){E=true;G.push(D)}else{if(D.callback){D.callback(x)}}}f.hiddenWidgets=G;if(!E){clearInterval(f.__resizeInterval)}};if(C==false){B();if(f.__resizeInterval){clearInterval(f.__resizeInterval)}return}if(f.__resizeInterval){clearInterval(f.__resizeInterval)}f.__resizeInterval=setInterval(function(){B()},100)}};if(f.hiddenWidgets&&f.hiddenWidgets.length>0){q(false)}f.hiddenWidgets=new Array();f.resizeHandlers.sort(o);for(var u=0;u<f.resizeHandlers.length;u++){var A=f.resizeHandlers[u];var w=A.widget;var t=A.data;if(!t){continue}if(!t.jqxWidget){continue}var n=t.jqxWidget.width;var z=t.jqxWidget.height;if(t.jqxWidget.base){if(n==undefined){n=t.jqxWidget.base.width}if(z==undefined){z=t.jqxWidget.base.height}}if(n===undefined&&z===undefined){n=t.jqxWidget.element.style.width;z=t.jqxWidget.element.style.height}var v=false;if(n!=null&&n.toString().indexOf("%")!=-1){v=true}if(z!=null&&z.toString().indexOf("%")!=-1){v=true}if(a.jqx.isHidden(w)){if(c(w)===-1){if(v||p===true){if(A.data.nestedWidget!==true){f.hiddenWidgets.push(A)}}}}else{if(p===undefined||p!==true){if(v){A.callback(x);if(f.hiddenWidgets.indexOf(A)>=0){f.hiddenWidgets.splice(f.hiddenWidgets.indexOf(A),1)}}if(t.jqxWidget.element){var r=t.jqxWidget.element.className;if(r.indexOf("dropdownlist")>=0||r.indexOf("datetimeinput")>=0||r.indexOf("combobox")>=0||r.indexOf("menu")>=0){if(t.jqxWidget.isOpened){var s=t.jqxWidget.isOpened();if(s){t.jqxWidget.close()}}}}}}}q()};if(!this.resizeHandlers){this.resizeHandlers=new Array();var j=a(window);if(j.on){this._resizeTimer=null;j.on("resize.jqx",function(n){if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer)}f._resizeTimer=setTimeout(function(){h(null,"resize")},a.jqx.resizeDelay)});j.on("orientationchange.jqx",function(n){h(null,"orientationchange")});j.on("orientationchanged.jqx",function(n){h(null,"orientationchange")})}else{j.bind("resize.jqx",function(n){h(null,"orientationchange")});j.bind("orientationchange.jqx",function(n){h(null,"orientationchange")});j.bind("orientationchanged.jqx",function(n){h(null,"orientationchange")})}}if(k){if(g===-1){this.resizeHandlers.push({id:d[0].id,widget:d,callback:m,data:d.data()})}}if(a.jqx.isHidden(d)&&k===true){h(true)}a.jqx.resize=function(){h(null,"resize")}},html:function(c,d){if(!a(c).on){return a(c).html(d)}try{return a.access(c,function(s){var f=c[0]||{},m=0,j=c.length;if(s===undefined){return f.nodeType===1?f.innerHTML.replace(rinlinejQuery,""):undefined}var r=/<(?:script|style|link)/i,n="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",h=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,p=/<([\w:]+)/,g=/<(?:script|object|embed|option|style)/i,k=new RegExp("<(?:"+n+")[\\s/>]","i"),q=/^\s+/,t={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(a.support.htmlSerialize||!k.test(s))&&(a.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1></$2>");try{for(;m<j;m++){f=this[m]||{};if(f.nodeType===1){a.cleanData(f.getElementsByTagName("*"));f.innerHTML=s}}f=0}catch(o){}}if(f){c.empty().append(s)}},null,d,arguments.length)}catch(b){return a(c).html(d)}},hasTransform:function(d){var c="";c=d.css("transform");if(c==""||c=="none"){c=d.parents().css("transform");if(c==""||c=="none"){var b=a.jqx.utilities.getBrowser();if(b.browser=="msie"){c=d.css("-ms-transform");if(c==""||c=="none"){c=d.parents().css("-ms-transform")}}else{if(b.browser=="chrome"){c=d.css("-webkit-transform");if(c==""||c=="none"){c=d.parents().css("-webkit-transform")}}else{if(b.browser=="opera"){c=d.css("-o-transform");if(c==""||c=="none"){c=d.parents().css("-o-transform")}}else{if(b.browser=="mozilla"){c=d.css("-moz-transform");if(c==""||c=="none"){c=d.parents().css("-moz-transform")}}}}}}else{return c!=""&&c!="none"}}if(c==""||c=="none"){c=a(document.body).css("transform")}return c!=""&&c!="none"&&c!=null},getBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(c)||/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||c.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(c)||[];var d={browser:b[1]||"",version:b[2]||"0"};if(c.indexOf("rv:11.0")>=0&&c.indexOf(".net4.0c")>=0){d.browser="msie";d.version="11";b[1]="msie"}d[b[1]]=b[1];return d}});a.jqx.browser=a.jqx.utilities.getBrowser();a.jqx.isHidden=function(d){try{var b=d[0].offsetWidth,e=d[0].offsetHeight;if(b===0||e===0){return true}else{return false}}catch(c){return false}};a.jqx.ariaEnabled=true;a.jqx.aria=function(c,e,d){if(!a.jqx.ariaEnabled){return}if(e==undefined){a.each(c.aria,function(g,h){var k=!c.base?c.host.attr(g):c.base.host.attr(g);if(k!=undefined&&!a.isFunction(k)){var j=k;switch(h.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}c[h.name]=j}else{var k=c[h.name];if(a.isFunction(k)){k=c[h.name]()}if(k==undefined){k=""}try{!c.base?c.host.attr(g,k.toString()):c.base.host.attr(g,k.toString())}catch(f){}}})}else{try{if(c.host){if(!c.base){if(c.host){if(c.element.setAttribute){c.element.setAttribute(e,d.toString())}else{c.host.attr(e,d.toString())}}else{c.attr(e,d.toString())}}else{if(c.base.host){c.base.host.attr(e,d.toString())}else{c.attr(e,d.toString())}}}else{if(c.setAttribute){c.setAttribute(e,d.toString())}}}catch(b){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){var b=this.length;var d=Number(arguments[1])||0;d=(d<0)?Math.ceil(d):Math.floor(d);if(d<0){d+=b}for(;d<b;d++){if(d in this&&this[d]===c){return d}}return -1}}a.jqx.mobile=a.jqx.mobile||{};a.jqx.position=function(b){var e=parseInt(b.pageX);var d=parseInt(b.pageY);if(a.jqx.mobile.isTouchDevice()){var c=a.jqx.mobile.getTouches(b);var f=c[0];e=parseInt(f.pageX);d=parseInt(f.pageY)}return{left:e,top:d}};a.extend(a.jqx.mobile,{_touchListener:function(h,f){var b=function(j,l){var k=document.createEvent("MouseEvents");k.initMouseEvent(j,l.bubbles,l.cancelable,l.view,l.detail,l.screenX,l.screenY,l.clientX,l.clientY,l.ctrlKey,l.altKey,l.shiftKey,l.metaKey,l.button,l.relatedTarget);k._pageX=l.pageX;k._pageY=l.pageY;return k};var g={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"};var d=b(g[h.type],h);h.target.dispatchEvent(d);var c=h.target["on"+g[h.type]];if(typeof c==="function"){c(h)}},setMobileSimulator:function(c,e){if(this.isTouchDevice()){return}this.simulatetouches=true;if(e==false){this.simulatetouches=false}var d={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"};var b=this;if(window.addEventListener){var f=function(){for(var g in d){if(c.addEventListener){c.removeEventListener(g,b._touchListener);c.addEventListener(g,b._touchListener,false)}}};if(a.jqx.browser.msie){f()}else{f()}}},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c="Browser CodeName: "+navigator.appCodeName+"";c+="Browser Name: "+navigator.appName+"";c+="Browser Version: "+navigator.appVersion+"";c+="Platform: "+navigator.platform+"";c+="User-agent header: "+navigator.userAgent+"";if(c.indexOf("Android")!=-1){return true}if(c.indexOf("IEMobile")!=-1){return true}if(c.indexOf("Windows Phone")!=-1){return true}if(c.indexOf("WPDesktop")!=-1){return true}if(c.indexOf("ZuneWP7")!=-1){return true}if(c.indexOf("BlackBerry")!=-1&&c.indexOf("Mobile Safari")!=-1){return true}if(c.indexOf("ipod")!=-1){return true}if(c.indexOf("nokia")!=-1||c.indexOf("Nokia")!=-1){return true}if(c.indexOf("Chrome/17")!=-1){return false}if(c.indexOf("CrOS")!=-1){return false}if(c.indexOf("Opera")!=-1&&c.indexOf("Mobi")==-1&&c.indexOf("Mini")==-1&&c.indexOf("Platform: Win")!=-1){return false}if(c.indexOf("Opera")!=-1&&c.indexOf("Mobi")!=-1&&c.indexOf("Opera Mobi")!=-1){return true}var d={ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"};try{if(this.touchDevice!=undefined){return this.touchDevice}this.touchDevice=false;for(i in d){if(d.hasOwnProperty(i)){prefix=d[i];match=c.match(new RegExp("(?:"+prefix+")([^\\s;]+)"));if(match){if(i.toString()=="blackberry"){this.touchDevice=false;return false}this.touchDevice=true;return true}}}var f=navigator.userAgent;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(f.indexOf("Windows Phone")>=0||f.indexOf("WPDesktop")>=0||f.indexOf("IEMobile")>=0||f.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(f.indexOf("Touch")>=0){var b=("MSPointerDown" in window)||("pointerdown" in window);if(b){this.touchDevice=true;return true}if(f.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(g){this.touchDevice=false;return false}},getLeftPos:function(b){var c=b.offsetLeft;while((b=b.offsetParent)!=null){if(b.tagName!="HTML"){c+=b.offsetLeft;if(document.all){c+=b.clientLeft}}}return c},getTopPos:function(c){var e=c.offsetTop;var b=a(c).coord();while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){e+=(c.offsetTop-c.scrollTop);if(document.all){e+=c.clientTop}}}var d=navigator.userAgent.toLowerCase();var f=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1)&&d.indexOf("touch")!=-1;if(f){return b.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return e}if(d.indexOf("version/7")!=-1){return b.top}if(d.indexOf("version/6")!=-1||d.indexOf("version/5")!=-1){e=e+a(window).scrollTop()}return b.top}return e},isChromeMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("android")!=-1;return b},isOperaMiniMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1||c.indexOf("opera mobi")!=-1;return b},isOperaMiniBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1;return b},isNewSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/5")!=-1);return b},isSafari4MobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/4")!=-1);return b},isWindowsPhone:function(){var c=navigator.userAgent.toLowerCase();var b=(c.indexOf("windows phone")!=-1||c.indexOf("WPDesktop")!=-1||c.indexOf("ZuneWP7")!=-1||c.indexOf("msie 9")!=-1||c.indexOf("msie 11")!=-1||c.indexOf("msie 10")!=-1&&c.indexOf("touch")!=-1);return b},isSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;return b},isIPadSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1;return b},isMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("android")!=-1;return b},getTouches:function(b){if(b.originalEvent){if(b.originalEvent.touches&&b.originalEvent.touches.length){return b.originalEvent.touches}else{if(b.originalEvent.changedTouches&&b.originalEvent.changedTouches.length){return b.originalEvent.changedTouches}}}if(!b.touches){b.touches=new Array();b.touches[0]=b.originalEvent!=undefined?b.originalEvent:b;if(b.originalEvent!=undefined&&b.pageX){b.touches[0]=b}if(b.type=="mousemove"){b.touches[0]=b}}return b.touches},getTouchEventName:function(b){if(this.isWindowsPhone()){var c=navigator.userAgent.toLowerCase();if(c.indexOf("windows phone 8.1")!=-1){if(b.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(b.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(b.toLowerCase().indexOf("end")!=-1){return"pointerup"}}if(b.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(b.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(b.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}else{return b}},dispatchMouseEvent:function(b,f,d){if(this.simulatetouches){return}var c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,f.view,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,0,null);if(d!=null){d.dispatchEvent(c)}},getRootNode:function(b){while(b.nodeType!==1){b=b.parentNode}return b},setTouchScroll:function(b,c){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[c]=b},touchScroll:function(d,y,g,D,b,k){if(d==null){return}var B=this;var t=0;var j=0;var l=0;var u=0;var m=0;var n=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[D]=false;var h=false;var q=a(d);var v=["select","input","textarea"];var c=0;var e=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[D]=true;var D=D;var C=this.getTouchEventName("touchstart")+".touchScroll";var p=this.getTouchEventName("touchend")+".touchScroll";var A=this.getTouchEventName("touchmove")+".touchScroll";var c=function(E){if(!B.enableScrolling[D]){return true}if(a.inArray(E.target.tagName.toLowerCase(),v)!==-1){return}var F=B.getTouches(E);var G=F[0];if(F.length==1){B.dispatchMouseEvent("mousedown",G,B.getRootNode(G.target))}h=false;j=G.pageY;m=G.pageX;if(B.simulatetouches){if(G._pageY!=undefined){j=G._pageY;m=G._pageX}}B.scrolling[D]=true;t=0;u=0;return true};if(q.on){q.on(C,c)}else{q.bind(C,c)}var x=function(J){if(!B.enableScrolling[D]){return true}if(!B.scrolling[D]){return true}var L=B.getTouches(J);if(L.length>1){return true}var H=L[0].pageY;var I=L[0].pageX;if(B.simulatetouches){if(L[0]._pageY!=undefined){H=L[0]._pageY;I=L[0]._pageX}}var E=H-j;var F=I-m;e=H;touchHorizontalEnd=I;l=E-t;n=F-u;h=true;t=E;u=F;var G=b!=null?b[0].style.visibility!="hidden":true;var K=k!=null?k[0].style.visibility!="hidden":true;if(G||K){if((n!==0&&G)||(l!==0&&K)){g(-n*1,-l*1,F,E,J);J.preventDefault();J.stopPropagation();if(J.preventManipulation){J.preventManipulation()}return false}}};if(q.on){q.on(A,x)}else{q.bind(A,x)}if(this.simulatetouches){var o=a(window).on!=undefined||a(window).bind;var z=function(E){B.scrolling[D]=false};a(window).on!=undefined?a(document).on("mouseup.touchScroll",z):a(document).bind("mouseup.touchScroll",z);if(window.frameElement){if(window.top!=null){var r=function(E){B.scrolling[D]=false};if(window.top.document){a(window.top.document).on?a(window.top.document).on("mouseup",r):a(window.top.document).bind("mouseup",r)}}}var s=a(document).on!=undefined||a(document).bind;var w=function(E){if(!B.scrolling[D]){return true}B.scrolling[D]=false;var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F)};a(document).on!=undefined?a(document).on("touchend",w):a(document).bind("touchend",w)}var f=function(E){if(!B.enableScrolling[D]){return true}var G=B.getTouches(E)[0];if(!B.scrolling[D]){return true}B.scrolling[D]=false;if(h){B.dispatchMouseEvent("mouseup",G,F)}else{var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F);return true}};if(q.on){q.on("dragstart",function(E){E.preventDefault()});q.on("selectstart",function(E){E.preventDefault()})}q.on?q.on(p+" touchcancel.touchScroll",f):q.bind(p+" touchcancel.touchScroll",f)}});a.jqx.cookie=a.jqx.cookie||{};a.extend(a.jqx.cookie,{cookie:function(e,f,c){if(arguments.length>1&&String(f)!=="[object Object]"){c=a.extend({},c);if(f===null||f===undefined){c.expires=-1}if(typeof c.expires==="number"){var h=c.expires,d=c.expires=new Date();d.setDate(d.getDate()+h)}f=String(f);return(document.cookie=[encodeURIComponent(e),"=",c.raw?f:encodeURIComponent(f),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join(""))}c=f||{};var b,g=c.raw?function(j){return j}:decodeURIComponent;return(b=new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?g(b[1]):null}});a.jqx.string=a.jqx.string||{};a.extend(a.jqx.string,{replace:function(f,d,e){if(d===e){return this}var b=f;var c=b.indexOf(d);while(c!=-1){b=b.replace(d,e);c=b.indexOf(d)}return b},contains:function(b,c){if(b==null||c==null){return false}return b.indexOf(c)!=-1},containsIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toString().toUpperCase().indexOf(c.toString().toUpperCase())!=-1},equals:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.slice(0,c.length)==c}return false},equalsIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.toUpperCase().slice(0,c.length)==c.toUpperCase()}return false},startsWith:function(b,c){if(b==null||c==null){return false}return b.slice(0,c.length)==c},startsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().slice(0,c.length)==c.toUpperCase()},normalize:function(b){if(b.charCodeAt(b.length-1)==65279){b=b.substring(0,b.length-1)}return b},endsWith:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.slice(-c.length)==c},endsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.toUpperCase().slice(-c.length)==c.toUpperCase()}});a.extend(a.easing,{easeOutBack:function(f,g,e,k,j,h){if(h==undefined){h=1.70158}return k*((g=g/j-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,j,h){return j*(g/=h)*g+e},easeInOutCirc:function(f,g,e,j,h){if((g/=h/2)<1){return -j/2*(Math.sqrt(1-g*g)-1)+e}return j/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,j,h){return j*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,j,h){return j*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,j,h){if((g/=h/2)<1){return j/2*g*g*g+e}return j/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,j,h){return -j*Math.cos(g/h*(Math.PI/2))+j+e},easeOutSine:function(f,g,e,j,h){return j*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}});b.fn.extend({ischildof:function(f){var d=b(this).parents().get();for(var c=0;c<d.length;c++){if(typeof f!="string"){var e=d[c];if(f!==undefined){if(e==f[0]){return true}}}else{if(f!==undefined){if(b(d[c]).is(f)){return true}}}}return false}});b.fn.jqxProxy=function(){var e=b(this).data().jqxWidget;var c=Array.prototype.slice.call(arguments,0);var d=e.element;if(!d){d=e.base.element}return b.jqx.jqxWidgetProxy(e.widgetName,d,c)};var a=this.originalVal=b.fn.val;b.fn.val=function(d){if(typeof d=="undefined"){if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(o){var e,k,j={top:0,left:0},f=this[0],m=f&&f.ownerDocument;if(!m){return}e=m.documentElement;if(!b.contains(e,f)){return j}if(typeof f.getBoundingClientRect!==undefined){j=f.getBoundingClientRect()}var d=function(p){return b.isWindow(p)?p:p.nodeType===9?p.defaultView||p.parentWindow:false};k=d(m);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var n=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(n){h=2}if(true==o){if(b(document.body).css("position")!="static"){var l=b(document.body).coord();h=-l.left;c=-l.top}}return{top:c+j.top+(k.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+j.left+(k.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}}})(jqxBaseFramework); | ||
var jqxBaseFramework=window.minQuery||window.jQuery;(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){if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]!=undefined&&a.isFunction(e[b])){return e[b].apply(e,c)}}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();if(e[b]!=undefined&&a.isFunction(e[b])){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}if(d.hasOwnProperty(e.toLowerCase())){return true}d=d.base}return false}}else{while(c){if(c.hasOwnProperty(b)){return true}if(c.hasOwnProperty(b.toLowerCase())){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){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}}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(f,d,b){if(!a.jqx.propertySetterValidation){return true}if(d.length==1&&typeof(d[0])=="object"){for(var e in d[0]){var g=f;while(!g.hasOwnProperty(e)&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e)){if(!b){var c=g.hasOwnProperty(e.toString().toLowerCase());if(!c){throw"Invalid property: "+e}else{return true}}return false}}return true}if(d.length!=2){if(!b){throw"Invalid property: "+d.length>=0?d[0]:""}return false}while(!f.hasOwnProperty(d[0])&&f.base){f=f.base}if(!f||!f.hasOwnProperty(d[0])){if(!b){throw"Invalid property: "+d[0]}return false}return true};a.jqx.set=function(f,e){var d=0;if(e.length==1&&typeof(e[0])=="object"){if(f.isInitialized&&Object.keys&&Object.keys(e[0]).length>1){var g=!f.base?f.element:f.base.element;var j=a.data(g,f.widgetName).initArgs;if(JSON&&JSON.stringify&&e[0]&&j[0]){try{if(JSON.stringify(e[0])==JSON.stringify(j[0])){return}}catch(h){}}f.batchUpdate=e[0];var b={};var c={};a.each(e[0],function(k,l){var m=f;while(!m.hasOwnProperty(k)&&m.base!=null){m=m.base}if(m.hasOwnProperty(k)){if(f[k]!=l){b[k]=f[k];c[k]=l;d++}}else{if(m.hasOwnProperty(k.toLowerCase())){if(f[k.toLowerCase()]!=l){b[k.toLowerCase()]=f[k.toLowerCase()];c[k.toLowerCase()]=l;d++}}}});if(d<2){f.batchUpdate=null}}a.each(e[0],function(k,l){var m=f;while(!m.hasOwnProperty(k)&&m.base!=null){m=m.base}if(m.hasOwnProperty(k)){a.jqx.setvalueraiseevent(m,k,l)}else{if(m.hasOwnProperty(k.toLowerCase())){a.jqx.setvalueraiseevent(m,k.toLowerCase(),l)}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+k+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,b,c)}}}else{if(e.length==2){while(!f.hasOwnProperty(e[0])&&f.base){f=f.base}if(f.hasOwnProperty(e[0])){a.jqx.setvalueraiseevent(f,e[0],e[1])}else{if(f.hasOwnProperty(e[0].toLowerCase())){a.jqx.setvalueraiseevent(f,e[0].toLowerCase(),e[1])}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+e[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]}if(e.hasOwnProperty(d.toLowerCase())){return e[d.toLowerCase()]}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.applyWidget=function(c,d,k,l){var g=false;try{g=window.MSApp!=undefined}catch(f){}var m=a(c);if(!l){l=new a.jqx["_"+d]()}else{l.host=m;l.element=c}if(c.id==""){c.id=a.jqx.utilities.createId()}var j={host:m,element:c,instance:l,initArgs:k};l.widgetName=d;a.data(c,d,j);a.data(c,"jqxWidget",j.instance);var h=new Array();var l=j.instance;while(l){l.isInitialized=false;h.push(l);l=l.base}h.reverse();h[0].theme=a.jqx.theme||"";a.jqx.jqxWidgetProxy(d,c,k);for(var b in h){l=h[b];if(b==0){l.host=m;l.element=c;l.WinJS=g}if(l!=undefined){if(l.definedInstance){l.definedInstance()}if(l.createInstance!=null){if(g){MSApp.execUnsafeLocalFunction(function(){l.createInstance(k)})}else{l.createInstance(k)}}}}for(var b in h){if(h[b]!=undefined){h[b].isInitialized=true}}if(g){MSApp.execUnsafeLocalFunction(function(){j.instance.refresh(true)})}else{j.instance.refresh(true)}};a.jqx.jqxWidget=function(b,c,f){var j=false;try{jqxArgs=Array.prototype.slice.call(f,0)}catch(h){jqxArgs=""}try{j=window.MSApp!=undefined}catch(h){}var g=b;var l="";if(c){l="_"+c}a.jqx.define(a.jqx,"_"+g,l);var k=new Array();if(!window[g]){var d=function(m){if(m==null){return""}var e=a.type(m);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(m===null){return""}return m.toString()}var n="";a.each(m,function(p){var r=this;if(p>0){n+=", "}n+="[";var o=0;if(a.type(r)=="object"){for(var q in r){if(o>0){n+=", "}n+="{"+q+":"+r[q]+"}";o++}}else{if(o>0){n+=", "}n+="{"+p+":"+r+"}";o++}n+="]"});return n};window[g]=function(e,r){var m=[];if(!r){r={}}m.push(r);var n=e;if(a.type(n)==="object"&&e[0]){n=e[0].id;if(n===""){n=e[0].id=a.jqx.utilities.createId()}}if(window.jqxWidgets&&window.jqxWidgets[n]){if(r){a.each(window.jqxWidgets[n],function(s){var t=a(this.element).data();if(t&&t.jqxWidget){a(this.element)[g](r)}})}if(window.jqxWidgets[n].length==1){var p=a(window.jqxWidgets[n][0].widgetInstance.element).data();if(p&&p.jqxWidget){return window.jqxWidgets[n][0]}}var p=a(window.jqxWidgets[n][0].widgetInstance.element).data();if(p&&p.jqxWidget){return window.jqxWidgets[n]}}var o=a(e);if(o.length===0){throw new Error("Invalid Selector - "+e+"! Please, check whether the used ID or CSS Class name is correct.")}var q=[];a.each(o,function(v){var x=o[v];var u=null;if(!k[g]){var y=x.id;x.id="";u=a(x).clone();x.id=y}a.jqx.applyWidget(x,g,m,undefined);if(!k[g]){var t=a.data(x,"jqxWidget");var w=u[g]().data().jqxWidget.defineInstance();var s=function(A){var z=a.data(A,"jqxWidget");this.widgetInstance=z;var B=a.extend(this,z);B.on=function(C,D){B.addHandler(B.host,C,D)};B.off=function(C){B.removeHandler(B.host,C)};return B};k[g]=s;a.each(w,function(A,z){Object.defineProperty(s.prototype,A,{get:function(){if(this.widgetInstance){return this.widgetInstance[A]}return z},set:function(C){if(this.widgetInstance&&this.widgetInstance[A]!=C){if(this.widgetInstance[A]!=C&&d(this.widgetInstance[A])!=d(C)){var B={};B[A]=C;this.widgetInstance.host[g](B);this.widgetInstance[A]=C}}}})})}var t=new k[g](x);q.push(t);if(!window.jqxWidgets){window.jqxWidgets=new Array()}if(!window.jqxWidgets[n]){window.jqxWidgets[n]=new Array()}window.jqxWidgets[n].push(t)});if(q.length===1){return q[0]}return q}}a.fn[g]=function(){var e=Array.prototype.slice.call(arguments,0);if(e.length==0||(e.length==1&&typeof(e[0])=="object")){if(this.length==0){if(this.selector){throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.")}}return this.each(function(){var p=a(this);var o=this;var q=a.data(o,g);if(q==null){a.jqx.applyWidget(o,g,e,undefined)}else{a.jqx.jqxWidgetProxy(g,this,e)}})}else{if(this.length==0){if(this.selector){throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.")}}var n=null;var m=0;this.each(function(){var o=a.jqx.jqxWidgetProxy(g,this,e);if(m==0){n=o;m++}else{if(m==1){var p=[];p.push(n);n=p}n.push(o)}})}return n};try{a.extend(a.jqx["_"+g].prototype,Array.prototype.slice.call(f,0)[0])}catch(h){}a.extend(a.jqx["_"+g].prototype,{toThemeProperty:function(e,m){return a.jqx.toThemeProperty(this,e,m)}});a.jqx["_"+g].prototype.refresh=function(){if(this.base){this.base.refresh(true)}};a.jqx["_"+g].prototype.createInstance=function(){};a.jqx["_"+g].prototype.applyTo=function(n,m){if(!(m instanceof Array)){var e=[];e.push(m);m=e}a.jqx.applyWidget(n,g,m,this)};a.jqx["_"+g].prototype.getInstance=function(){return this};a.jqx["_"+g].prototype.propertyChangeMap={};a.jqx["_"+g].prototype.addHandler=function(o,e,m,n){a.jqx.addHandler(o,e,m,n)};a.jqx["_"+g].prototype.removeHandler=function(n,e,m){a.jqx.removeHandler(n,e,m)}};a.jqx.toThemeProperty=function(c,d,h){if(c.theme==""){return d}var g=d.split(" ");var b="";for(var f=0;f<g.length;f++){if(f>0){b+=" "}var e=g[f];if(h!=null&&h){b+=e+"-"+c.theme}else{b+=e+" "+e+"-"+c.theme}}return b};a.jqx.addHandler=function(g,h,e,f){var c=h.split(" ");for(var b=0;b<c.length;b++){var d=c[b];if(window.addEventListener){switch(d){case"mousewheel":if(a.jqx.browser.mozilla){g[0].addEventListener("DOMMouseScroll",e,false)}else{g[0].addEventListener("mousewheel",e,false)}continue;case"mousemove":if(!f){g[0].addEventListener("mousemove",e,false);continue}break}}if(f==undefined||f==null){if(g.on){g.on(d,e)}else{g.bind(d,e)}}else{if(g.on){g.on(d,f,e)}else{g.bind(d,f,e)}}}};a.jqx.removeHandler=function(f,g,e){if(!g){return}var c=g.split(" ");for(var b=0;b<c.length;b++){var d=c[b];if(window.removeEventListener){switch(d){case"mousewheel":if(a.jqx.browser.mozilla){f[0].removeEventListener("DOMMouseScroll",e,false)}else{f[0].removeEventListener("mousewheel",e,false)}continue;case"mousemove":if(e){f[0].removeEventListener("mousemove",e,false);continue}break}}if(d==undefined){if(f.off){f.off()}else{f.unbind()}continue}if(e==undefined){if(f.off){f.off(d)}else{f.unbind(d)}}else{if(f.off){f.off(d,e)}else{f.unbind(d,e)}}}};a.jqx.theme=a.jqx.theme||"";a.jqx.resizeDelay=a.jqx.resizeDelay||10;a.jqx.ready=function(){a(window).trigger("jqxReady")};a.jqx.init=function(){a.each(arguments[0],function(b,c){if(b=="theme"){a.jqx.theme=c}if(b=="scrollBarSize"){a.jqx.utilities.scrollBarSize=c}if(b=="touchScrollBarSize"){a.jqx.utilities.touchScrollBarSize=c}if(b=="scrollBarButtonsVisibility"){a.jqx.utilities.scrollBarButtonsVisibility=c}})};a.jqx.utilities=a.jqx.utilities||{};a.extend(a.jqx.utilities,{scrollBarSize:15,touchScrollBarSize:10,scrollBarButtonsVisibility:"visible",createId:function(){var b=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return"jqxWidget"+b()+b()},setTheme:function(f,g,e){if(typeof e==="undefined"){return}var h=e[0].className.split(" "),b=[],j=[],d=e.children();for(var c=0;c<h.length;c+=1){if(h[c].indexOf(f)>=0){if(f.length>0){b.push(h[c]);j.push(h[c].replace(f,g))}else{j.push(h[c].replace("-"+g,"")+"-"+g)}}}this._removeOldClasses(b,e);this._addNewClasses(j,e);for(var c=0;c<d.length;c+=1){this.setTheme(f,g,a(d[c]))}},_removeOldClasses:function(d,c){for(var b=0;b<d.length;b+=1){c.removeClass(d[b])}},_addNewClasses:function(d,c){for(var b=0;b<d.length;b+=1){c.addClass(d[b])}},getOffset:function(b){var d=a.jqx.mobile.getLeftPos(b[0]);var c=a.jqx.mobile.getTopPos(b[0]);return{top:c,left:d}},resize:function(d,m,l,k){if(k===undefined){k=true}var g=-1;var f=this;var c=function(o){if(!f.hiddenWidgets){return -1}var p=-1;for(var n=0;n<f.hiddenWidgets.length;n++){if(o.id){if(f.hiddenWidgets[n].id==o.id){p=n;break}}else{if(f.hiddenWidgets[n].id==o[0].id){p=n;break}}}return p};if(this.resizeHandlers){for(var e=0;e<this.resizeHandlers.length;e++){if(d.id){if(this.resizeHandlers[e].id==d.id){g=e;break}}else{if(this.resizeHandlers[e].id==d[0].id){g=e;break}}}if(l===true){if(g!=-1){this.resizeHandlers.splice(g,1)}if(this.resizeHandlers.length==0){var j=a(window);if(j.off){j.off("resize.jqx");j.off("orientationchange.jqx");j.off("orientationchanged.jqx")}else{j.unbind("resize.jqx");j.unbind("orientationchange.jqx");j.unbind("orientationchanged.jqx")}this.resizeHandlers=null}var b=c(d);if(b!=-1&&this.hiddenWidgets){this.hiddenWidgets.splice(b,1)}return}}else{if(l===true){var b=c(d);if(b!=-1&&this.hiddenWidgets){this.hiddenWidgets.splice(b,1)}return}}var f=this;var h=function(p,x){if(!f.resizeHandlers){return}var y=function(C){var B=-1;var D=C.parentNode;while(D){B++;D=D.parentNode}return B};var o=function(E,C){if(!E.widget||!C.widget){return 0}var D=y(E.widget[0]);var B=y(C.widget[0]);try{if(D<B){return -1}if(D>B){return 1}}catch(F){var G=F}return 0};var q=function(C){if(f.hiddenWidgets.length>0){f.hiddenWidgets.sort(o);var B=function(){var E=false;var G=new Array();for(var F=0;F<f.hiddenWidgets.length;F++){var D=f.hiddenWidgets[F];if(a.jqx.isHidden(D.widget)){E=true;G.push(D)}else{if(D.callback){D.callback(x)}}}f.hiddenWidgets=G;if(!E){clearInterval(f.__resizeInterval)}};if(C==false){B();if(f.__resizeInterval){clearInterval(f.__resizeInterval)}return}if(f.__resizeInterval){clearInterval(f.__resizeInterval)}f.__resizeInterval=setInterval(function(){B()},100)}};if(f.hiddenWidgets&&f.hiddenWidgets.length>0){q(false)}f.hiddenWidgets=new Array();f.resizeHandlers.sort(o);for(var u=0;u<f.resizeHandlers.length;u++){var A=f.resizeHandlers[u];var w=A.widget;var t=A.data;if(!t){continue}if(!t.jqxWidget){continue}var n=t.jqxWidget.width;var z=t.jqxWidget.height;if(t.jqxWidget.base){if(n==undefined){n=t.jqxWidget.base.width}if(z==undefined){z=t.jqxWidget.base.height}}if(n===undefined&&z===undefined){n=t.jqxWidget.element.style.width;z=t.jqxWidget.element.style.height}var v=false;if(n!=null&&n.toString().indexOf("%")!=-1){v=true}if(z!=null&&z.toString().indexOf("%")!=-1){v=true}if(a.jqx.isHidden(w)){if(c(w)===-1){if(v||p===true){if(A.data.nestedWidget!==true){f.hiddenWidgets.push(A)}}}}else{if(p===undefined||p!==true){if(v){A.callback(x);if(f.hiddenWidgets.indexOf(A)>=0){f.hiddenWidgets.splice(f.hiddenWidgets.indexOf(A),1)}}if(t.jqxWidget.element){var r=t.jqxWidget.element.className;if(r.indexOf("dropdownlist")>=0||r.indexOf("datetimeinput")>=0||r.indexOf("combobox")>=0||r.indexOf("menu")>=0){if(t.jqxWidget.isOpened){var s=t.jqxWidget.isOpened();if(s){t.jqxWidget.close()}}}}}}}q()};if(!this.resizeHandlers){this.resizeHandlers=new Array();var j=a(window);if(j.on){this._resizeTimer=null;this._initResize=null;j.on("resize.jqx",function(n){if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer)}if(!f._initResize){f._initResize=true;h(null,"resize")}else{f._resizeTimer=setTimeout(function(){h(null,"resize")},a.jqx.resizeDelay)}});j.on("orientationchange.jqx",function(n){h(null,"orientationchange")});j.on("orientationchanged.jqx",function(n){h(null,"orientationchange")})}else{j.bind("resize.jqx",function(n){h(null,"orientationchange")});j.bind("orientationchange.jqx",function(n){h(null,"orientationchange")});j.bind("orientationchanged.jqx",function(n){h(null,"orientationchange")})}}if(k){if(g===-1){this.resizeHandlers.push({id:d[0].id,widget:d,callback:m,data:d.data()})}}if(a.jqx.isHidden(d)&&k===true){h(true)}a.jqx.resize=function(){h(null,"resize")}},html:function(c,d){if(!a(c).on){return a(c).html(d)}try{return a.access(c,function(s){var f=c[0]||{},m=0,j=c.length;if(s===undefined){return f.nodeType===1?f.innerHTML.replace(rinlinejQuery,""):undefined}var r=/<(?:script|style|link)/i,n="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",h=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,p=/<([\w:]+)/,g=/<(?:script|object|embed|option|style)/i,k=new RegExp("<(?:"+n+")[\\s/>]","i"),q=/^\s+/,t={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(a.support.htmlSerialize||!k.test(s))&&(a.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1></$2>");try{for(;m<j;m++){f=this[m]||{};if(f.nodeType===1){a.cleanData(f.getElementsByTagName("*"));f.innerHTML=s}}f=0}catch(o){}}if(f){c.empty().append(s)}},null,d,arguments.length)}catch(b){return a(c).html(d)}},hasTransform:function(d){var c="";c=d.css("transform");if(c==""||c=="none"){c=d.parents().css("transform");if(c==""||c=="none"){var b=a.jqx.utilities.getBrowser();if(b.browser=="msie"){c=d.css("-ms-transform");if(c==""||c=="none"){c=d.parents().css("-ms-transform")}}else{if(b.browser=="chrome"){c=d.css("-webkit-transform");if(c==""||c=="none"){c=d.parents().css("-webkit-transform")}}else{if(b.browser=="opera"){c=d.css("-o-transform");if(c==""||c=="none"){c=d.parents().css("-o-transform")}}else{if(b.browser=="mozilla"){c=d.css("-moz-transform");if(c==""||c=="none"){c=d.parents().css("-moz-transform")}}}}}}else{return c!=""&&c!="none"}}if(c==""||c=="none"){c=a(document.body).css("transform")}return c!=""&&c!="none"&&c!=null},getBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(c)||/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||c.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(c)||[];var d={browser:b[1]||"",version:b[2]||"0"};if(c.indexOf("rv:11.0")>=0&&c.indexOf(".net4.0c")>=0){d.browser="msie";d.version="11";b[1]="msie"}d[b[1]]=b[1];return d}});a.jqx.browser=a.jqx.utilities.getBrowser();a.jqx.isHidden=function(d){try{var b=d[0].offsetWidth,e=d[0].offsetHeight;if(b===0||e===0){return true}else{return false}}catch(c){return false}};a.jqx.ariaEnabled=true;a.jqx.aria=function(c,e,d){if(!a.jqx.ariaEnabled){return}if(e==undefined){a.each(c.aria,function(g,h){var k=!c.base?c.host.attr(g):c.base.host.attr(g);if(k!=undefined&&!a.isFunction(k)){var j=k;switch(h.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}c[h.name]=j}else{var k=c[h.name];if(a.isFunction(k)){k=c[h.name]()}if(k==undefined){k=""}try{!c.base?c.host.attr(g,k.toString()):c.base.host.attr(g,k.toString())}catch(f){}}})}else{try{if(c.host){if(!c.base){if(c.host){if(c.element.setAttribute){c.element.setAttribute(e,d.toString())}else{c.host.attr(e,d.toString())}}else{c.attr(e,d.toString())}}else{if(c.base.host){c.base.host.attr(e,d.toString())}else{c.attr(e,d.toString())}}}else{if(c.setAttribute){c.setAttribute(e,d.toString())}}}catch(b){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){var b=this.length;var d=Number(arguments[1])||0;d=(d<0)?Math.ceil(d):Math.floor(d);if(d<0){d+=b}for(;d<b;d++){if(d in this&&this[d]===c){return d}}return -1}}a.jqx.mobile=a.jqx.mobile||{};a.jqx.position=function(b){var e=parseInt(b.pageX);var d=parseInt(b.pageY);if(a.jqx.mobile.isTouchDevice()){var c=a.jqx.mobile.getTouches(b);var f=c[0];e=parseInt(f.pageX);d=parseInt(f.pageY)}return{left:e,top:d}};a.extend(a.jqx.mobile,{_touchListener:function(h,f){var b=function(j,l){var k=document.createEvent("MouseEvents");k.initMouseEvent(j,l.bubbles,l.cancelable,l.view,l.detail,l.screenX,l.screenY,l.clientX,l.clientY,l.ctrlKey,l.altKey,l.shiftKey,l.metaKey,l.button,l.relatedTarget);k._pageX=l.pageX;k._pageY=l.pageY;return k};var g={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"};var d=b(g[h.type],h);h.target.dispatchEvent(d);var c=h.target["on"+g[h.type]];if(typeof c==="function"){c(h)}},setMobileSimulator:function(c,e){if(this.isTouchDevice()){return}this.simulatetouches=true;if(e==false){this.simulatetouches=false}var d={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"};var b=this;if(window.addEventListener){var f=function(){for(var g in d){if(c.addEventListener){c.removeEventListener(g,b._touchListener);c.addEventListener(g,b._touchListener,false)}}};if(a.jqx.browser.msie){f()}else{f()}}},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c="Browser CodeName: "+navigator.appCodeName+"";c+="Browser Name: "+navigator.appName+"";c+="Browser Version: "+navigator.appVersion+"";c+="Platform: "+navigator.platform+"";c+="User-agent header: "+navigator.userAgent+"";if(c.indexOf("Android")!=-1){return true}if(c.indexOf("IEMobile")!=-1){return true}if(c.indexOf("Windows Phone")!=-1){return true}if(c.indexOf("WPDesktop")!=-1){return true}if(c.indexOf("ZuneWP7")!=-1){return true}if(c.indexOf("BlackBerry")!=-1&&c.indexOf("Mobile Safari")!=-1){return true}if(c.indexOf("ipod")!=-1){return true}if(c.indexOf("nokia")!=-1||c.indexOf("Nokia")!=-1){return true}if(c.indexOf("Chrome/17")!=-1){return false}if(c.indexOf("CrOS")!=-1){return false}if(c.indexOf("Opera")!=-1&&c.indexOf("Mobi")==-1&&c.indexOf("Mini")==-1&&c.indexOf("Platform: Win")!=-1){return false}if(c.indexOf("Opera")!=-1&&c.indexOf("Mobi")!=-1&&c.indexOf("Opera Mobi")!=-1){return true}var d={ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"};try{if(this.touchDevice!=undefined){return this.touchDevice}this.touchDevice=false;for(i in d){if(d.hasOwnProperty(i)){prefix=d[i];match=c.match(new RegExp("(?:"+prefix+")([^\\s;]+)"));if(match){if(i.toString()=="blackberry"){this.touchDevice=false;return false}this.touchDevice=true;return true}}}var f=navigator.userAgent;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(f.indexOf("Windows Phone")>=0||f.indexOf("WPDesktop")>=0||f.indexOf("IEMobile")>=0||f.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(f.indexOf("Touch")>=0){var b=("MSPointerDown" in window)||("pointerdown" in window);if(b){this.touchDevice=true;return true}if(f.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(g){this.touchDevice=false;return false}},getLeftPos:function(b){var c=b.offsetLeft;while((b=b.offsetParent)!=null){if(b.tagName!="HTML"){c+=b.offsetLeft;if(document.all){c+=b.clientLeft}}}return c},getTopPos:function(c){var e=c.offsetTop;var b=a(c).coord();while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){e+=(c.offsetTop-c.scrollTop);if(document.all){e+=c.clientTop}}}var d=navigator.userAgent.toLowerCase();var f=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1)&&d.indexOf("touch")!=-1;if(f){return b.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return e}if(d.indexOf("version/7")!=-1){return b.top}if(d.indexOf("version/6")!=-1||d.indexOf("version/5")!=-1){e=e+a(window).scrollTop()}return b.top}return e},isChromeMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("android")!=-1;return b},isOperaMiniMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1||c.indexOf("opera mobi")!=-1;return b},isOperaMiniBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1;return b},isNewSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/5")!=-1);return b},isSafari4MobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/4")!=-1);return b},isWindowsPhone:function(){var c=navigator.userAgent.toLowerCase();var b=(c.indexOf("windows phone")!=-1||c.indexOf("WPDesktop")!=-1||c.indexOf("ZuneWP7")!=-1||c.indexOf("msie 9")!=-1||c.indexOf("msie 11")!=-1||c.indexOf("msie 10")!=-1&&c.indexOf("touch")!=-1);return b},isSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;return b},isIPadSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1;return b},isMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("android")!=-1;return b},getTouches:function(b){if(b.originalEvent){if(b.originalEvent.touches&&b.originalEvent.touches.length){return b.originalEvent.touches}else{if(b.originalEvent.changedTouches&&b.originalEvent.changedTouches.length){return b.originalEvent.changedTouches}}}if(!b.touches){b.touches=new Array();b.touches[0]=b.originalEvent!=undefined?b.originalEvent:b;if(b.originalEvent!=undefined&&b.pageX){b.touches[0]=b}if(b.type=="mousemove"){b.touches[0]=b}}return b.touches},getTouchEventName:function(b){if(this.isWindowsPhone()){var c=navigator.userAgent.toLowerCase();if(c.indexOf("windows phone 8.1")!=-1){if(b.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(b.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(b.toLowerCase().indexOf("end")!=-1){return"pointerup"}}if(b.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(b.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(b.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}else{return b}},dispatchMouseEvent:function(b,f,d){if(this.simulatetouches){return}var c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,f.view,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,0,null);if(d!=null){d.dispatchEvent(c)}},getRootNode:function(b){while(b.nodeType!==1){b=b.parentNode}return b},setTouchScroll:function(b,c){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[c]=b},touchScroll:function(d,y,g,D,b,k){if(d==null){return}var B=this;var t=0;var j=0;var l=0;var u=0;var m=0;var n=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[D]=false;var h=false;var q=a(d);var v=["select","input","textarea"];var c=0;var e=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[D]=true;var D=D;var C=this.getTouchEventName("touchstart")+".touchScroll";var p=this.getTouchEventName("touchend")+".touchScroll";var A=this.getTouchEventName("touchmove")+".touchScroll";var c=function(E){if(!B.enableScrolling[D]){return true}if(a.inArray(E.target.tagName.toLowerCase(),v)!==-1){return}var F=B.getTouches(E);var G=F[0];if(F.length==1){B.dispatchMouseEvent("mousedown",G,B.getRootNode(G.target))}h=false;j=G.pageY;m=G.pageX;if(B.simulatetouches){if(G._pageY!=undefined){j=G._pageY;m=G._pageX}}B.scrolling[D]=true;t=0;u=0;return true};if(q.on){q.on(C,c)}else{q.bind(C,c)}var x=function(J){if(!B.enableScrolling[D]){return true}if(!B.scrolling[D]){return true}var L=B.getTouches(J);if(L.length>1){return true}var H=L[0].pageY;var I=L[0].pageX;if(B.simulatetouches){if(L[0]._pageY!=undefined){H=L[0]._pageY;I=L[0]._pageX}}var E=H-j;var F=I-m;e=H;touchHorizontalEnd=I;l=E-t;n=F-u;h=true;t=E;u=F;var G=b!=null?b[0].style.visibility!="hidden":true;var K=k!=null?k[0].style.visibility!="hidden":true;if(G||K){if((n!==0&&G)||(l!==0&&K)){g(-n*1,-l*1,F,E,J);J.preventDefault();J.stopPropagation();if(J.preventManipulation){J.preventManipulation()}return false}}};if(q.on){q.on(A,x)}else{q.bind(A,x)}if(this.simulatetouches){var o=a(window).on!=undefined||a(window).bind;var z=function(E){B.scrolling[D]=false};a(window).on!=undefined?a(document).on("mouseup.touchScroll",z):a(document).bind("mouseup.touchScroll",z);if(window.frameElement){if(window.top!=null){var r=function(E){B.scrolling[D]=false};if(window.top.document){a(window.top.document).on?a(window.top.document).on("mouseup",r):a(window.top.document).bind("mouseup",r)}}}var s=a(document).on!=undefined||a(document).bind;var w=function(E){if(!B.scrolling[D]){return true}B.scrolling[D]=false;var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F)};a(document).on!=undefined?a(document).on("touchend",w):a(document).bind("touchend",w)}var f=function(E){if(!B.enableScrolling[D]){return true}var G=B.getTouches(E)[0];if(!B.scrolling[D]){return true}B.scrolling[D]=false;if(h){B.dispatchMouseEvent("mouseup",G,F)}else{var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F);return true}};if(q.on){q.on("dragstart",function(E){E.preventDefault()});q.on("selectstart",function(E){E.preventDefault()})}q.on?q.on(p+" touchcancel.touchScroll",f):q.bind(p+" touchcancel.touchScroll",f)}});a.jqx.cookie=a.jqx.cookie||{};a.extend(a.jqx.cookie,{cookie:function(e,f,c){if(arguments.length>1&&String(f)!=="[object Object]"){c=a.extend({},c);if(f===null||f===undefined){c.expires=-1}if(typeof c.expires==="number"){var h=c.expires,d=c.expires=new Date();d.setDate(d.getDate()+h)}f=String(f);return(document.cookie=[encodeURIComponent(e),"=",c.raw?f:encodeURIComponent(f),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join(""))}c=f||{};var b,g=c.raw?function(j){return j}:decodeURIComponent;return(b=new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?g(b[1]):null}});a.jqx.string=a.jqx.string||{};a.extend(a.jqx.string,{replace:function(f,d,e){if(d===e){return this}var b=f;var c=b.indexOf(d);while(c!=-1){b=b.replace(d,e);c=b.indexOf(d)}return b},contains:function(b,c){if(b==null||c==null){return false}return b.indexOf(c)!=-1},containsIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toString().toUpperCase().indexOf(c.toString().toUpperCase())!=-1},equals:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.slice(0,c.length)==c}return false},equalsIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.toUpperCase().slice(0,c.length)==c.toUpperCase()}return false},startsWith:function(b,c){if(b==null||c==null){return false}return b.slice(0,c.length)==c},startsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().slice(0,c.length)==c.toUpperCase()},normalize:function(b){if(b.charCodeAt(b.length-1)==65279){b=b.substring(0,b.length-1)}return b},endsWith:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.slice(-c.length)==c},endsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.toUpperCase().slice(-c.length)==c.toUpperCase()}});a.extend(a.easing,{easeOutBack:function(f,g,e,k,j,h){if(h==undefined){h=1.70158}return k*((g=g/j-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,j,h){return j*(g/=h)*g+e},easeInOutCirc:function(f,g,e,j,h){if((g/=h/2)<1){return -j/2*(Math.sqrt(1-g*g)-1)+e}return j/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,j,h){return j*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,j,h){return j*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,j,h){if((g/=h/2)<1){return j/2*g*g*g+e}return j/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,j,h){return -j*Math.cos(g/h*(Math.PI/2))+j+e},easeOutSine:function(f,g,e,j,h){return j*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}});b.fn.extend({ischildof:function(f){var d=b(this).parents().get();for(var c=0;c<d.length;c++){if(typeof f!="string"){var e=d[c];if(f!==undefined){if(e==f[0]){return true}}}else{if(f!==undefined){if(b(d[c]).is(f)){return true}}}}return false}});b.fn.jqxProxy=function(){var e=b(this).data().jqxWidget;var c=Array.prototype.slice.call(arguments,0);var d=e.element;if(!d){d=e.base.element}return b.jqx.jqxWidgetProxy(e.widgetName,d,c)};var a=this.originalVal=b.fn.val;b.fn.val=function(d){if(typeof d=="undefined"){if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(o){var e,k,j={top:0,left:0},f=this[0],m=f&&f.ownerDocument;if(!m){return}e=m.documentElement;if(!b.contains(e,f)){return j}if(typeof f.getBoundingClientRect!==undefined){j=f.getBoundingClientRect()}var d=function(p){return b.isWindow(p)?p:p.nodeType===9?p.defaultView||p.parentWindow:false};k=d(m);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var n=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(n){h=2}if(true==o){if(b(document.body).css("position")!="static"){var l=b(document.body).coord();h=-l.left;c=-l.top}}return{top:c+j.top+(k.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+j.left+(k.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}}})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(B,A,x,z,y,v,w){this.hierarchy=y;this.exportFormat=v;this.filename=w;B.beginFile(w);n(B);k(B);B.endFile(w);return B.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(x){x.beginBody();if(this.hierarchy){var w=function(z){for(var y=0;y<z.length;y+=1){if(z[y]!==undefined){x.beginRow(z[y].level);e(x,z[y],y,true);if(z[y].records){x.beginRows(z[y].level);w(z[y].records);x.endRows(z[y].level)}x.endRow(z[y].level)}}};w(u);x.endBody();return}for(var v=0;v<u.length;v+=1){if(u[v]!==undefined){e(x,u[v],v)}}x.endBody()}function e(A,z,B,v){var x;if(v!=true){A.beginRow()}var y=0;for(var w in q){if(q[w].columnsDataFields){w=q[w].columnsDataFields[y].displayfield}x=s(B,w);if(x){if(x.level!=undefined){if(x.index-1>z.level&&x.index-1<x.maxLevel){y++;continue}}if(x.maxLevel!=undefined){if(x.index-1==x.maxLevel){x=b.extend({},x);x.merge=x.maxLevel-z.level-1}}}if(z.level!=undefined&&z.label!=undefined){if(this.exportFormat==="xml"||this.exportFormat==="json"){var C={};C.text="group";A.appendBodyCell(z.label,C,x,z,y,"group");break}}if(z.hasOwnProperty(w)){A.appendBodyCell(z[w],q[w],x,z,y)}else{A.appendBodyCell("",q[w],x,z,y)}y++}if(v!=true){A.endRow()}}function m(w,x){if(x.style){return j[x.style]}var v=t();if(v.length>0){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="http://jqwidgets.com/export_server/save-file.php"}else{v="http://jquerygrid.net/export_server/save-file.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(F,D,B,C){F=F.toString().toLowerCase();var E=c[F];if(typeof E==="undefined"){throw"You can't export to "+F+" format."}return d(E,u,q,j,D,B,C)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;T<R.length;T++){var X=T-aa;var Z=C[X];var W=25*72/96;var ab=b(R[T]).html();var V=M.getTextDimensions(b(R[T]).html());if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});M.save(B);return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if(d.toString()=="NaN"||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n<p.maxLevel){return}else{if(n===p.maxLevel){if(m){k(q.text)}for(var o=0;o<p.maxLevel;o++){k("")}return}}}}g=m;if(m){k(q.text)}};this.endHeader=function(){this.endRow()};this.beginBody=function(){l=0};this.beginRow=function(){if((l>0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o<p.maxLevel-r.level-1;o++){k("",m)}return}}}k(q,m)};this.endRow=function(){e=e.substring(0,e.length-1)};this.endBody=function(){};this.endFile=function(){};this.getFile=function(){return e};function f(m,o){if(o){var n=i.getFormat(o);m=i.formatData(m,n.type,n.formatString,n.localization)}m='"'+m+'"';return m}function k(m,n){m=f(m,n);e+=m+j}};c.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var a=function(){};a.prototype=new c(",");var b=function(){};b.prototype=new c("\t");d.jqx.dataAdapter.ArrayExporter.extend("csv",new a());d.jqx.dataAdapter.ArrayExporter.extend("tsv",new b())})(jqxBaseFramework);(function(d){var a=function(){var i=false;var g;var h;var j=0;this.setPDF=function(){i=true};this.beginFile=function(k){if(i||k==undefined){g='<table style="empty-cells: show;" cellspacing="0" cellpadding="2">'}else{g='<html>\n\t<head>\n\t\t<title></title>\n\t\t<meta http-equiv=Content-type content="text/html; charset=UTF-8">\n\t</head>\n\t<body>\n\t\t<table style="empty-cells: show;" cellspacing="0" cellpadding="2">'}};this.beginHeader=function(){if(i){g+="\n\t<thead><tr>"}else{g+="\n\t\t\t<thead>"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t<th style="'+f(l)+'">'+m.text+"</th>"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t<th colspan="+(1+l.merge)+' style="width: '+m.width+"px; "+f(l)+'">'+m.text+"</th>"}else{g+="\n\t\t\t\t<th colspan="+(1+l.merge)+' style="'+f(l)+'">'+m.text+"</th>"}}else{if(m.width){g+='\n\t\t\t\t<th style="width: '+m.width+"px; "+f(l)+'">'+m.text+"</th>"}else{g+='\n\t\t\t\t<th style="'+f(l)+'">'+m.text+"</th>"}}}};this.endHeader=function(){if(i){g+="\n\t</tr></thead>"}else{g+="\n\t\t\t</thead>"}};this.beginBody=function(){if(i){g+="\n\t<tbody>"}else{g+="\n\t\t\t<tbody>"}j=0};this.beginRow=function(){if(i){g+="\n\t<tr>"}else{g+="\n\t\t\t\t<tr>"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t<td style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+='\n\t\t\t\t\t<td style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t<td colspan="+(1+k.merge)+' style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+="\n\t\t\t\t\t<td colspan="+(1+k.merge)+' style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t<td style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+='\n\t\t\t\t\t<td style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}}};this.endRow=function(){if(i){g+="\n\t</tr>"}else{g+="\n\t\t\t\t</tr>"}};this.endBody=function(){if(i){g+="\n\t</tbody>"}else{g+="\n\t\t\t</tbody>"}};this.endFile=function(k){if(i||k==undefined){g+="\n</table>"}else{g+="\n\t\t</table>\n\t</body>\n</html>\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t<Style ss:ID="'+p+'" ss:Name="'+p+'">'},buildAlignment:function(q){if(q["text-align"]){var r=this.stylesMap.alignment[q["text-align"]];if(!r){r="Left"}var p='\n\t\t\t<Alignment ss:Vertical="Bottom" ss:Horizontal="'+r+'"/>';this.style+=p}},buildBorder:function(s){if(s["border-color"]){var r="\n\t\t\t<Borders>";var u='\n\t\t\t\t<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var p='\n\t\t\t\t<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var q='\n\t\t\t\t<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var t='\n\t\t\t\t<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';r+=u;r+=p;r+=q;r+=t;r+="\n\t\t\t</Borders>";this.style+=r}},buildFont:function(q){var r=this.stylesMap.font,p="\n\t\t\t<Font ";for(var s in r){if(typeof q[s]!=="undefined"){if(s==="font-style"&&q[s].toString().toLowerCase()==="italic"){p+='ss:Italic="1" '}else{if(s==="font-weight"&&q[s].toString().toLowerCase()==="bold"){p+='ss:Bold="1" '}else{if(s==="color"){p+="ss:"+r[s]+'="'+q[s]+'" '}}}}}p+="/>";this.style+=p},buildInterior:function(q){var r=this.stylesMap.interior,t="\n\t\t\t<Interior ";var p=false;for(var s in r){if(typeof q[s]!=="undefined"){t+="ss:"+r[s]+'="'+q[s]+'" ';p=true}}if(p){t+='ss:Pattern="Solid"'}t+="/>";this.style+=t},buildFormat:function(q){if(q.dataType=="number"||q.dataType=="float"||q.dataType=="int"||q.dataType=="integer"){var p=q.formatString;if(p==""||p.indexOf("n")!=-1||p.indexOf("N")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="0"/>'}else{if(p=="f"||p=="F"||p=="D"||p.indexOf("d")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="#,##0.00_);[Red](#,##0.00)"/>'}else{if(p.indexOf("p")!=-1||p.indexOf("P")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="Percent"/>'}else{if(p.indexOf("c")!=-1||p.indexOf("C")!=-1){if(parseInt(q.currencysymbol.charCodeAt(0))==8364){this.style+='\n\t\t\t<NumberFormat ss:Format="Euro Currency"/>'}else{this.style+='\n\t\t\t<NumberFormat ss:Format="Currency"/>'}}}}}}else{if(q.dataType=="date"){this.style+='\n\t\t\t<NumberFormat ss:Format="Short Date"/>'}}},closeStyle:function(){this.style+="\n\t\t</Style>"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='<?xml version="1.0"?>\n\t<?mso-application progid="Excel.Sheet"?> \n\t<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" \n\txmlns:o="urn:schemas-microsoft-com:office:office" \n\txmlns:x="urn:schemas-microsoft-com:office:excel" \n\txmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \n\txmlns:html="http://www.w3.org/TR/REC-html40"> \n\t<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> \n\t<Version>12.00</Version> \n\t</DocumentProperties> \n\t<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> \n\t<WindowHeight>8130</WindowHeight> \n\t<WindowWidth>15135</WindowWidth> \n\t<WindowTopX>120</WindowTopX> \n\t<WindowTopY>45</WindowTopY> \n\t<ProtectStructure>False</ProtectStructure> \n\t<ProtectWindows>False</ProtectWindows> \n\t</ExcelWorkbook> \n\t<Styles>'};this.beginHeader=function(){l='\n\t<Worksheet ss:Name="Sheet1">\n\t\t<Table>';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t<Column ss:Width="'+p+'"/>';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q<d.length;q+=1){if(i[q].disabled){continue}g.call(this,d[q]["text"],null,i[q])}this.endRow()}};this.beginBody=function(){};this.beginRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="<Row>";return}l+="\n\t\t\t<Row>"};this.beginRows=function(p){l+="\n\t\t\t\t<Rows>"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="</Row>";return}l+="\n\t\t\t</Row>"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="</Rows>";return}};this.endBody=function(){l+="\n\t\t</Table>"};this.endFile=function(){l+="\n\t</Worksheet>\n</Workbook>";h+="\n\t</Styles>"};this.getFile=function(){return h+l};function g(s,v,r,u){var q="String";var t=this.getFormat(v);if(s!=null&&s.toString().substring(0,3)=="_AG"){s=s.toString().substring(3);q="String"}else{if(t.type=="date"){s=this.formatData(s,t.type,t.formatString,t.localization);if(s===null||s===""){s="";q="String"}}if(t.type=="string"){if(s===null||s===undefined){s=""}else{if(s.toString().indexOf("&")>=0){s=s.toString().replace(/&/g,"&")}if(s.toString().indexOf(">")>=0){s=s.toString().replace(/>/g,">")}if(s.toString().indexOf("<")>=0){s=s.toString().replace(/</g,"<")}if(s.toString().indexOf('"')>=0){s=s.toString().replace(/"/g,""")}if(s.toString().indexOf("'")>=0){s=s.toString().replace(/'/g,"'")}}}if(r.dataType=="number"||r.dataType=="float"||r.dataType=="int"||r.dataType=="integer"){q="Number";s=parseFloat(s);if(s===null||isNaN(s)||s===""){s="";q="String"}if(s&&q!="String"&&s!=""){if(v&&v.formatString&&v.formatString.indexOf("p")>=0){s=s/100}}r.currencysymbol=v.localization.currencysymbol}}var p=f(r);if(r.merge){l+='\n\t\t\t\t<Cell ss:MergeAcross="'+r.merge+'" ss:StyleID="'+p+'"><Data ss:Type="'+q+'">'+s+"</Data></Cell>"}else{l+='\n\t\t\t\t<Cell ss:StyleID="'+p+'"><Data ss:Type="'+q+'">'+s+"</Data></Cell>"}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='<?xml version="1.0" encoding="UTF-8" ?>';e+="\n<table>"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f<g;f++){e+="\t\t"}e+="<row>";d=0;return}}e+="\n\t<row>";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f<g;f++){e+="\t\t"}e+="<rows>";d=0;return}e+="\n\t\t<rows>"};this.appendBodyCell=function(j,n,g,m,h,l){var k=this.getFormat(n);j=this.formatData(j,k.type,k.formatString,k.localization);if(k.type=="string"){if(j.toString().indexOf("&")>=0){j=j.toString().replace(/&/g,"&")}if(j.toString().indexOf(">")>=0){j=j.toString().replace(/>/g,">")}if(j.toString().indexOf("<")>=0){j=j.toString().replace(/</g,"<")}if(j.toString().indexOf('"')>=0){j=j.toString().replace(/"/g,""")}if(j.toString().indexOf("'")>=0){j=j.toString().replace(/'/g,"'")}}if(m.level!=undefined){if(this.hierarchy){e+="\n\t\t";for(var f=0;f<m.level;f++){e+="\t\t"}if(l===undefined){e+="<"+c[d]+">"+j+"</"+c[d]+">"}else{e+="<"+l+">"+j+"</"+l+">"}}else{if(l!=undefined){e+="\n\t\t<"+l+">"+j+"</"+l+">"}else{e+="\n\t\t<"+c[d]+">"+j+"</"+c[d]+">"}}}else{e+="\n\t\t<"+c[d]+">"+j+"</"+c[d]+">"}d++};this.endRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f<g;f++){e+="\t\t"}e+="</row>";d=0;return}}e+="\n\t</row>";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f<g;f++){e+="\t\t"}e+="</rows>";d=0;return}e+="\n\t\t</rows>"};this.endBody=function(){};this.endFile=function(){e+="\n</table>"};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p<n;p++){o.push(h(p,q)||"null")}return"["+o.join(",")+"]"}function m(q){var o=[],p,n;for(p in q){if(Object.prototype.hasOwnProperty.call(q,p)){n=h(p,q);if(n){o.push(a(p)+":"+n)}}}return"{"+o.join(",")+"}"}function i(n){switch(Object.prototype.toString.call(n)){case"[object Date]":return e(n);case"[object Array]":return g(n)}return m(n)}function k(o,n){switch(n){case"string":return a(o);case"number":case"float":case"integer":case"int":return isFinite(o)?o:"null";case"boolean":return o}return"null"}function h(o,n){var q=n[o],p=typeof q;if(q&&typeof q==="object"&&typeof q.toJSON==="function"){q=q.toJSON(o);p=typeof q}if(/(number|float|int|integer|string|boolean)/.test(p)||(!q&&p==="object")){return k(q,p)}else{return i(q)}}function f(n){if(window.JSON&&typeof window.JSON.stringify==="function"){return window.JSON.stringify(n)}return h("",{"":n})}var c=function(){var q=this;this.prepareData=function(t,v){if(v){var u=q.getFormat(v);t=q.formatData(t,u.type,u.formatString,u.localization)}return t};var n,p,r,o=[],s=0;this.beginFile=function(){p=[]};this.beginHeader=function(){};this.appendHeaderCell=function(t){};this.endHeader=function(){};this.beginBody=function(u,t){};this.beginRow=function(){if(hierarchy){o[s]={}}else{r={}}};this.beginRows=function(){o[s].rows=[];s++;o[s]={}};this.endRows=function(){s--};this.appendBodyCell=function(u,t){var v=this.prepareData(u,t);if(hierarchy){o[s][t.text]=v}else{r[t.text]=v}};this.endRow=function(){if(hierarchy){if(s==0){p.push(o[s])}else{o[s-1].rows.push(o[s])}}else{p.push(r)}};this.endBody=function(){};this.endFile=function(){n=f(p)};this.getFile=function(){return n}};c.prototype=new d.jqx.dataAdapter.DataExportModuleBase();d.jqx.dataAdapter.ArrayExporter.extend("json",new c())})(jqxBaseFramework);var pdfDataExport=(function(){if(typeof btoa==="undefined"){window.btoa=function(m){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=h.split(""),g,f,e,q,p,o,n,t,l=0,u=0,k="",j=[],d;do{g=m.charCodeAt(l++);f=m.charCodeAt(l++);e=m.charCodeAt(l++);t=g<<16|f<<8|e;q=t>>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l<m.length);k=j.join("");d=m.length%3;return(d?k.slice(0,d-3):k)+"===".slice(d||3)}}if(typeof atob==="undefined"){window.atob=function(l){var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f,e,d,p,o,n,m,q,k=0,r=0,h="",j=[];if(!l){return l}l+="";do{p=g.indexOf(l.charAt(k++));o=g.indexOf(l.charAt(k++));n=g.indexOf(l.charAt(k++));m=g.indexOf(l.charAt(k++));q=p<<18|o<<12|n<<6|m;f=q>>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k<l.length);h=j.join("");return h}}var c=typeof Object.keys==="function"?function(d){return Object.keys(d).length}:function(d){var f=0,g;for(g in d){if(d.hasOwnProperty(g)){f++}}return f},a=function(d){this.topics={};this.context=d;this.publish=function(h,m){if(this.topics[h]){var j=this.topics[h],o=[],n,g,e,f,k=function(){};m=Array.prototype.slice.call(arguments,1);for(g=0,e=j.length;g<e;g++){f=j[g];n=f[0];if(f[1]){f[0]=k;o.push(g)}n.apply(this.context,m)}for(g=0,e=o.length;g<e;g++){j.splice(o[g],1)}}};this.subscribe=function(e,g,f){if(!this.topics[e]){this.topics[e]=[[g,f]]}else{this.topics[e].push([g,f])}return{topic:e,callback:g}};this.unsubscribe=function(h){if(this.topics[h.topic]){var f=this.topics[h.topic],g,e;for(g=0,e=f.length;g<e;g++){if(f[g][0]===h.callback){f.splice(g,1)}}}}};function b(D,ad,L,U){if(typeof D==="undefined"){D="p"}else{D=D.toString().toLowerCase()}if(typeof ad==="undefined"){ad="mm"}if(typeof L==="undefined"){L="a4"}if(typeof U==="undefined"&&typeof zpipe==="undefined"){U=false}var aq=L.toString().toLowerCase(),am="0.9.0rc2",s=[],E=0,at=U,T="1.3",M={a3:[841.89,1190.55],a4:[595.28,841.89],a5:[420.94,595.28],letter:[612,792],legal:[612,1008]},ac="0 g",G="0 G",g=0,f=[],m=2,u=false,C=[],ag={},P={},ah=16,d,y=0.200025,A,B,ai,N={title:"",subject:"",author:"",keywords:"",creator:""},Q=0,S=0,O={},F=new a(O),ae,ao,o=function(i){return i.toFixed(2)},n=function(i){return i.toFixed(3)},z=function(i){var k=(i).toFixed(0);if(i<10){return"0"+k}else{return k}},q=function(i){var k=(i).toFixed(0);if(k.length<10){return new Array(11-k.length).join("0")+k}else{return k}},aa=function(i){if(u){f[g].push(i)}else{s.push(i);E+=i.length+1}},v=function(){m++;C[m]=E;aa(m+" 0 obj");return m},J=function(i){aa("stream");aa(i);aa("endstream")},ak,R,an,aj,Z=function(){ak=B*ai;R=A*ai;var az,ay,k,au,av,ax,aw;for(az=1;az<=g;az++){v();aa("<</Type /Page");aa("/Parent 1 0 R");aa("/Resources 2 0 R");aa("/Contents "+(m+1)+" 0 R>>");aa("endobj");ay=f[az].join("\n");v();if(at){k=[];for(av=0;av<ay.length;++av){k[av]=ay.charCodeAt(av)}aw=adler32cs.from(ay);ax=new Deflater(6);ax.append(new Uint8Array(k));ay=ax.flush();k=[new Uint8Array([120,156]),new Uint8Array(ay),new Uint8Array([aw&255,(aw>>8)&255,(aw>>16)&255,(aw>>24)&255])];ay="";for(av in k){if(k.hasOwnProperty(av)){ay+=String.fromCharCode.apply(null,k[av])}}aa("<</Length "+ay.length+" /Filter [/FlateDecode]>>")}else{aa("<</Length "+ay.length+">>")}J(ay);aa("endobj")}C[1]=E;aa("1 0 obj");aa("<</Type /Pages");an="/Kids [";for(av=0;av<g;av++){an+=(3+2*av)+" 0 R "}aa(an+"]");aa("/Count "+g);aa("/MediaBox [0 0 "+o(ak)+" "+o(R)+"]");aa(">>");aa("endobj")},W=function(i){i.objectNumber=v();aa("<</BaseFont/"+i.PostScriptName+"/Type/Font");if(typeof i.encoding==="string"){aa("/Encoding/"+i.encoding)}aa("/Subtype/Type1>>");aa("endobj")},I=function(){var i;for(i in ag){if(ag.hasOwnProperty(i)){W(ag[i])}}},K=function(){F.publish("putXobjectDict")},w=function(){aa("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");aa("/Font <<");var i;for(i in ag){if(ag.hasOwnProperty(i)){aa("/"+i+" "+ag[i].objectNumber+" 0 R")}}aa(">>");aa("/XObject <<");K();aa(">>")},h=function(){I();F.publish("putResources");C[2]=E;aa("2 0 obj");aa("<<");w();aa(">>");aa("endobj");F.publish("postPutResources")},l=function(au,k,av){var i;if(P[k]===i){P[k]={}}P[k][av]=au},ar={},t=function(i,av,ax,au){var aw="F"+(c(ag)+1).toString(10),k=ag[aw]={id:aw,PostScriptName:i,fontName:av,fontStyle:ax,encoding:au,metadata:{}};l(aw,av,ax);F.publish("addFont",k);return aw},e=function(){var k="helvetica",aD="times",aF="courier",aC="normal",aB="bold",aA="italic",aE="bolditalic",au="StandardEncoding",ax=[["Helvetica",k,aC],["Helvetica-Bold",k,aB],["Helvetica-Oblique",k,aA],["Helvetica-BoldOblique",k,aE],["Courier",aF,aC],["Courier-Bold",aF,aB],["Courier-Oblique",aF,aA],["Courier-BoldOblique",aF,aE],["Times-Roman",aD,aC],["Times-Bold",aD,aB],["Times-Italic",aD,aA],["Times-BoldItalic",aD,aE]],az,av,ay,aw;for(az=0,av=ax.length;az<av;az++){ay=t(ax[az][0],ax[az][1],ax[az][2],au);aw=ax[az][0].split("-");l(ay,aw[0],aw[1]||"")}F.publish("addFonts",{fonts:ag,dictionary:P})},r=function(aE,av){var aA,ay,ax,aw,aC,aB,au,aD,k,az;if(av===ax){av={}}aw=av.sourceEncoding?aw:"Unicode";aB=av.outputEncoding;if((av.autoencode||aB)&&ag[d].metadata&&ag[d].metadata[aw]&&ag[d].metadata[aw].encoding){aC=ag[d].metadata[aw].encoding;if(!aB&&ag[d].encoding){aB=ag[d].encoding}if(!aB&&aC.codePages){aB=aC.codePages[0]}if(typeof aB==="string"){aB=aC[aB]}if(aB){aD=false;au=[];for(aA=0,ay=aE.length;aA<ay;aA++){k=aB[aE.charCodeAt(aA)];if(k){au.push(String.fromCharCode(k))}else{au.push(aE[aA])}if(au[aA].charCodeAt(0)>>8){aD=true}}aE=au.join("")}}aA=aE.length;while(aD===ax&&aA!==0){if(aE.charCodeAt(aA-1)>>8){aD=true}aA--}if(!aD){return aE}else{au=av.noBOM?[]:[254,255];for(aA=0,ay=aE.length;aA<ay;aA++){k=aE.charCodeAt(aA);az=k>>8;if(az>>8){throw new Error("Character at position "+aA.toString(10)+" of string '"+aE+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}au.push(az);au.push(k-(az<<8))}return String.fromCharCode.apply(ax,au)}},Y=function(k,i){return r(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},X=function(){aa("/Producer (pdfDataExport "+am+")");if(N.title){aa("/Title ("+Y(N.title)+")")}if(N.subject){aa("/Subject ("+Y(N.subject)+")")}if(N.author){aa("/Author ("+Y(N.author)+")")}if(N.keywords){aa("/Keywords ("+Y(N.keywords)+")")}if(N.creator){aa("/Creator ("+Y(N.creator)+")")}var i=new Date();aa("/CreationDate (D:"+[i.getFullYear(),z(i.getMonth()+1),z(i.getDate()),z(i.getHours()),z(i.getMinutes()),z(i.getSeconds())].join("")+")")},V=function(){aa("/Type /Catalog");aa("/Pages 1 0 R");aa("/OpenAction [3 0 R /FitH null]");aa("/PageLayout /OneColumn");F.publish("putCatalog")},j=function(){aa("/Size "+(m+1));aa("/Root "+m+" 0 R");aa("/Info "+(m-1)+" 0 R")},ap=function(){g++;u=true;f[g]=[]},af=function(){ap();aa(o(y*ai)+" w");aa(G);if(Q!==0){aa(Q.toString(10)+" J")}if(S!==0){aa(S.toString(10)+" j")}F.publish("addPage",{pageNumber:g})},x=function(au,aw){var i,k;if(au===k){au=ag[d].fontName}if(aw===k){aw=ag[d].fontStyle}try{i=P[au][aw]}catch(av){i=k}if(!i){throw new Error("Unable to look up font label for font '"+au+"', '"+aw+"'. Refer to getFontList() for available fonts.")}return i},p=function(){u=false;s=[];C=[];aa("%PDF-"+T);Z();h();v();aa("<<");X();aa(">>");aa("endobj");v();aa("<<");V();aa(">>");aa("endobj");var au=E,k;aa("xref");aa("0 "+(m+1));aa("0000000000 65535 f ");for(k=1;k<=m;k++){aa(q(C[k])+" 00000 n ")}aa("trailer");aa("<<");j();aa(">>");aa("startxref");aa(au);aa("%%EOF");u=true;return s.join("\n")},ab=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},H=function(ax,au){var aw,az,ay,aA,av,k;switch(ax){case aw:return p();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return O.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return O.output("dataurlnewwindow")}}}az=p();ay=az.length;aA=new Uint8Array(new ArrayBuffer(ay));for(av=0;av<ay;av++){aA[av]=az.charCodeAt(av)}k=new Blob([aA],{type:"application/pdf"});saveAs(k,au);break;case"datauristring":case"dataurlstring":return"data:application/pdf;base64,"+btoa(p());case"datauri":case"dataurl":document.location.href="data:application/pdf;base64,"+btoa(p());break;case"dataurlnewwindow":window.open("data:application/pdf;base64,"+btoa(p()));break;default:throw new Error('Output type "'+ax+'" is not supported.')}};if(ad==="pt"){ai=1}else{if(ad==="mm"){ai=72/25.4}else{if(ad==="cm"){ai=72/2.54}else{if(ad==="in"){ai=72}else{throw ("Invalid unit: "+ad)}}}}if(M.hasOwnProperty(aq)){A=M[aq][1]/ai;B=M[aq][0]/ai}else{try{A=L[1];B=L[0]}catch(al){throw ("Invalid format: "+L)}}if(D==="p"||D==="portrait"){D="p";if(B>A){ae=B;B=A;A=ae}}else{if(D==="l"||D==="landscape"){D="l";if(A>B){ae=B;B=A;A=ae}}else{throw ("Invalid orientation: "+D)}}O.internal={pdfEscape:Y,getStyle:ab,getFont:function(){return ag[x.apply(O,arguments)]},getFontSize:function(){return ah},btoa:btoa,write:function(i,av,au,k){aa(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return o(i*ai)},getVerticalCoordinateString:function(i){return o((A-i)*ai)},collections:{},newObject:v,putStream:J,events:F,scaleFactor:ai,pageSize:{width:B,height:A},output:function(k,i){return H(k,i)}};O.addPage=function(){af();return this};O.text=function(aD,aC,aA,au){var av,ay,ax,aB,k,az,aw;if(typeof aD==="number"){ay=aA;ax=aD;aB=aC;aD=ay;aC=ax;aA=aB}if(typeof aD==="string"&&aD.match(/[\n\r]/)){aD=aD.split(/\r\n|\r|\n/g)}if(typeof au==="undefined"){au={noBOM:true,autoencode:true}}else{if(au.noBOM===av){au.noBOM=true}if(au.autoencode===av){au.autoencode=true}}if(typeof aD==="string"){az=Y(aD,au)}else{if(aD instanceof Array){k=aD.concat();for(aw=k.length-1;aw!==-1;aw--){k[aw]=Y(k[aw],au)}az=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aD+'" is not recognized.')}}aa("BT\n/"+d+" "+ah+" Tf\n"+ah+" TL\n"+ac+"\n"+o(aC*ai)+" "+o((A-aA)*ai)+" Td\n("+az+") Tj\nET");return this};O.line=function(k,av,i,au){aa(o(k*ai)+" "+o((A-av)*ai)+" m "+o(i*ai)+" "+o((A-au)*ai)+" l S");return this};O.lines=function(k,aD,aC,aM,aI){var aw,aK,aA,aB,az,ay,aG,aE,aL,aJ,ax,aH,av,aF,au;if(typeof k==="number"){aK=aC;aA=k;aB=aD;k=aK;aD=aA;aC=aB}aI=ab(aI);aM=aM===aw?[1,1]:aM;aa(n(aD*ai)+" "+n((A-aC)*ai)+" m ");az=aM[0];ay=aM[1];aE=k.length;aF=aD;au=aC;for(aG=0;aG<aE;aG++){aL=k[aG];if(aL.length===2){aF=aL[0]*az+aF;au=aL[1]*ay+au;aa(n(aF*ai)+" "+n((A-au)*ai)+" l")}else{aJ=aL[0]*az+aF;ax=aL[1]*ay+au;aH=aL[2]*az+aF;av=aL[3]*ay+au;aF=aL[4]*az+aF;au=aL[5]*ay+au;aa(n(aJ*ai)+" "+n((A-ax)*ai)+" "+n(aH*ai)+" "+n((A-av)*ai)+" "+n(aF*ai)+" "+n((A-au)*ai)+" c")}}aa(aI);return this};O.rect=function(i,ax,k,av,au){var aw=ab(au);aa([o(i*ai),o((A-ax)*ai),o(k*ai),o(-av*ai),"re",aw].join(" "));return this};O.triangle=function(av,ay,k,aw,i,au,ax){this.lines([[k-av,aw-ay],[i-k,au-aw],[av-i,ay-au]],av,ay,[1,1],ax);return this};O.roundedRect=function(k,az,au,aw,ay,ax,av){var i=4/3*(Math.SQRT2-1);this.lines([[(au-2*ay),0],[(ay*i),0,ay,ax-(ax*i),ay,ax],[0,(aw-2*ax)],[0,(ax*i),-(ay*i),ax,-ay,ax],[(-au+2*ay),0],[-(ay*i),0,-ay,-(ax*i),-ay,-ax],[0,(-aw+2*ax)],[0,-(ax*i),(ay*i),-ax,ay,-ax]],k+ay,az,[1,1],av);return this};O.ellipse=function(i,az,ax,aw,k){var ay=ab(k),av=4/3*(Math.SQRT2-1)*ax,au=4/3*(Math.SQRT2-1)*aw;aa([o((i+ax)*ai),o((A-az)*ai),"m",o((i+ax)*ai),o((A-(az-au))*ai),o((i+av)*ai),o((A-(az-aw))*ai),o(i*ai),o((A-(az-aw))*ai),"c"].join(" "));aa([o((i-av)*ai),o((A-(az-aw))*ai),o((i-ax)*ai),o((A-(az-au))*ai),o((i-ax)*ai),o((A-az)*ai),"c"].join(" "));aa([o((i-ax)*ai),o((A-(az+au))*ai),o((i-av)*ai),o((A-(az+aw))*ai),o(i*ai),o((A-(az+aw))*ai),"c"].join(" "));aa([o((i+av)*ai),o((A-(az+aw))*ai),o((i+ax)*ai),o((A-(az+au))*ai),o((i+ax)*ai),o((A-az)*ai),"c",ay].join(" "));return this};O.circle=function(i,av,au,k){return this.ellipse(i,av,au,au,k)};O.setProperties=function(i){var k;for(k in N){if(N.hasOwnProperty(k)&&i[k]){N[k]=i[k]}}return this};O.setFontSize=function(i){ah=i;return this};O.setFont=function(i,k){d=x(i,k);return this};O.setFontStyle=O.setFontType=function(k){var i;d=x(i,k);return this};O.getFontList=function(){var au={},k,av,i;for(k in P){if(P.hasOwnProperty(k)){au[k]=i=[];for(av in P[k]){if(P[k].hasOwnProperty(av)){i.push(av)}}}}return au};O.setLineWidth=function(i){aa((i*ai).toFixed(2)+" w");return this};O.setDrawColor=function(aw,av,au,i){var k;if(av===undefined||(i===undefined&&aw===av===au)){if(typeof aw==="string"){k=aw+" G"}else{k=o(aw/255)+" G"}}else{if(i===undefined){if(typeof aw==="string"){k=[aw,av,au,"RG"].join(" ")}else{k=[o(aw/255),o(av/255),o(au/255),"RG"].join(" ")}}else{if(typeof aw==="string"){k=[aw,av,au,i,"K"].join(" ")}else{k=[o(aw),o(av),o(au),o(i),"K"].join(" ")}}}aa(k);return this};O.setFillColor=function(aw,av,au,i){var k;if(av===undefined||(i===undefined&&aw===av===au)){if(typeof aw==="string"){k=aw+" g"}else{k=o(aw/255)+" g"}}else{if(i===undefined){if(typeof aw==="string"){k=[aw,av,au,"rg"].join(" ")}else{k=[o(aw/255),o(av/255),o(au/255),"rg"].join(" ")}}else{if(typeof aw==="string"){k=[aw,av,au,i,"k"].join(" ")}else{k=[o(aw),o(av),o(au),o(i),"k"].join(" ")}}}aa(k);return this};O.setTextColor=function(au,k,i){if((au===0&&k===0&&i===0)||(typeof k==="undefined")){ac=n(au/255)+" g"}else{ac=[n(au/255),n(k/255),n(i/255),"rg"].join(" ")}return this};O.CapJoinStyles={0:0,butt:0,but:0,bevel:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,milter:2};O.setLineCap=function(i){var k=this.CapJoinStyles[i];if(k===undefined){throw new Error("Line cap style of '"+i+"' is not recognized. See or extend .CapJoinStyles property for valid styles")}Q=k;aa(k.toString(10)+" J");return this};O.setLineJoin=function(i){var k=this.CapJoinStyles[i];if(k===undefined){throw new Error("Line join style of '"+i+"' is not recognized. See or extend .CapJoinStyles property for valid styles")}S=k;aa(k.toString(10)+" j");return this};O.output=H;O.save=function(i){O.output("save",i)};for(ao in b.API){if(b.API.hasOwnProperty(ao)){if(ao==="events"&&b.API.events.length){(function(av,ax){var aw,au,k;for(k=ax.length-1;k!==-1;k--){aw=ax[k][0];au=ax[k][1];av.subscribe.apply(av,[aw].concat(typeof au==="function"?[au]:au))}}(F,b.API.events))}else{O[ao]=b.API[ao]}}}e();d="F1";af();F.publish("initialized");return O}b.API={events:[]};return b}());(function(i){var b=0,m=0,a,o,h,c={x:undefined,y:undefined,w:undefined,h:undefined,ln:undefined},f=1,e=false,d=function(p,t,q,r,s){c={x:p,y:t,w:q,h:r,ln:s}},k=function(){return c},j=function(p){b=p},l=function(){return b},n=function(p){m=p},g=function(p){return m};i.getTextDimensions=function(p){a=this.internal.getFont().fontName;o=this.internal.getFontSize();h=this.internal.getFont().fontStyle;var s=0.264583*72/25.4,q,r;r=document.createElement("font");r.id="pdfDataExportCell";r.style.fontStyle=h;r.style.fontName=a;r.style.fontSize=o+"pt";r.innerText=p;document.body.appendChild(r);q={w:(r.offsetWidth+1)*s,h:(r.offsetHeight+1)*s};document.body.removeChild(r);return q};i.cellAddPage=function(){this.addPage();d(undefined,undefined,undefined,undefined,undefined);e=true;f+=1;n(1)};i.cellInitialize=function(){b=0;c={x:undefined,y:undefined,w:undefined,h:undefined,ln:undefined};f=1;e=false;n(0)};i.cell=function(v,u,z,r,p,t){this.lnMod=this.lnMod===undefined?0:this.lnMod;if(this.printingHeaderRow!==true&&this.lnMod!==0){t=t+this.lnMod}if((((t*r)+u+(r*2))/f)>=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(t);this.lnMod+=1;t+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(r*2))/r))}}else{if(e&&k().ln!==t&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(t);this.lnMod+=1;t+=1}}}var A=k(),q=this.getTextDimensions(p),s=1;if(A.x!==undefined&&A.ln===t){v=A.x+A.w}if(A.y!==undefined&&A.y===u){u=A.y}if(A.h!==undefined&&A.h===r){r=A.h}if(A.ln!==undefined&&A.ln===t){t=A.ln;s=0}if(e){u=r*(g()+s)}else{u=(u+(r*Math.abs(l()*f-t-l())))}this.rect(v,u,z,r);this.text(p,v+3,u+r-3);n(g()+s);d(v,u,z,r,t);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;q<s;q+=1){r=u[q];if(t){if(t(p,r)===-1){p=r}}else{if(r>p){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;E<y;E+=1){D=r[E];v.push(D.name);p.push(D.prompt)}}else{v=r}}if(I.autoSize){w=function(K){return K[D]};for(E=0,y=v.length;E<y;E+=1){D=v[E];G[D]=J.map(w);H.push(this.getTextDimensions(p[E]||D).w);s=G[D];for(C=0,y=s.length;C<y;C+=1){u=s[C];H.push(this.getTextDimensions(u).w)}A[D]=i.arrayMax(H)}}if(I.printHeaders){for(E=0,y=v.length;E<y;E+=1){D=v[E];F.push([10,10,A[D],25,String(p.length?p[E]:D)])}this.setTableHeaderRow(F);this.printHeaderRow(1)}for(E=0,y=J.length;E<y;E+=1){t=J[E];for(C=0,q=v.length;C<q;C+=1){D=v[C];this.cell(10,10,A[D],25,String(t[D]),E+2)}}return this};i.setTableHeaderRow=function(p){this.tableHeaderRow=p};i.printHeaderRow=function(p){if(!this.tableHeaderRow){throw"Property tableHeaderRow does not exist."}var q,s,r,t;this.printingHeaderRow=true;for(r=0,t=this.tableHeaderRow.length;r<t;r+=1){q=this.tableHeaderRow[r];s=[].concat(q);this.cell.apply(this,s.concat(p))}this.printingHeaderRow=false}}(pdfDataExport.API));(function(c){var b=c.getCharWidthsArray=function(s,u){if(!u){u={}}var h=u.widths?u.widths:this.internal.getFont().metadata.Unicode.widths,r=h.fof?h.fof:1,n=u.kerning?u.kerning:this.internal.getFont().metadata.Unicode.kerning,p=n.fof?n.fof:1;var m,j,o,k,q=0,t=h[0]||r,g=[];for(m=0,j=s.length;m<j;m++){o=s.charCodeAt(m);g.push((h[o]||t)/r+(n[o]&&n[o][q]||0)/p);q=o}return g};var e=function(j){var h=j.length,g=0;while(h){h--;g+=j[h]}return g};var a=c.getStringUnitWidth=function(h,g){return e(b.call(this,h,g))};var d=function(g,n,h,j){var q=[];var m=0,k=g.length,p=0;while(m!==k&&p+n[m]<h){p+=n[m];m++}q.push(g.slice(0,m));var o=m;p=0;while(m!==k){if(p+n[m]>j){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;o<m;o++){g=r[o];q=b(g,v);p=e(q);if(h+u+p>k){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o<m;o++){j.push(x[o].join(" "))}return j};c.splitTextToSize=function(q,m,r){if(!r){r={}}var h=r.fontSize||this.internal.getFontSize(),g=(function(l){var t={0:1},i={};if(!l.widths||!l.kerning){var u=this.internal.getFont(l.fontName,l.fontStyle),s="Unicode";if(u.metadata[s]){return{widths:u.metadata[s].widths||t,kerning:u.metadata[s].kerning||i}}}else{return{widths:l.widths,kerning:l.kerning}}return{widths:t,kerning:i}}).call(this,r);var p;if(q.match(/[\n\r]/)){p=q.split(/\r\n|\r|\n/g)}else{p=[q]}var j=1*this.internal.scaleFactor*m/h;g.textIndent=r.textIndent?r.textIndent*1*this.internal.scaleFactor/h:0;var o,n,k=[];for(o=0,n=p.length;o<n;o++){k=k.concat(f(p[o],j,g))}return k}})(pdfDataExport.API);(function(c){var d="addImage_";var f=function(m){var l,h;if(!m.charCodeAt(0)===255||!m.charCodeAt(1)===216||!m.charCodeAt(2)===255||!m.charCodeAt(3)===224||!m.charCodeAt(6)==="J".charCodeAt(0)||!m.charCodeAt(7)==="F".charCodeAt(0)||!m.charCodeAt(8)==="I".charCodeAt(0)||!m.charCodeAt(9)==="F".charCodeAt(0)||!m.charCodeAt(10)===0){throw new Error("getJpegSize requires a binary jpeg file")}var j=m.charCodeAt(4)*256+m.charCodeAt(5);var k=4,g=m.length;while(k<g){k+=j;if(m.charCodeAt(k)!==255){throw new Error("getJpegSize could not find the size of the image")}if(m.charCodeAt(k+1)===192){h=m.charCodeAt(k+5)*256+m.charCodeAt(k+6);l=m.charCodeAt(k+7)*256+m.charCodeAt(k+8);return[l,h]}else{k+=2;j=m.charCodeAt(k)*256+m.charCodeAt(k+1)}}},b=function(g){var m=this.internal.newObject(),h=this.internal.write,l=this.internal.putStream;g.n=m;h("<</Type /XObject");h("/Subtype /Image");h("/Width "+g.w);h("/Height "+g.h);if(g.cs==="Indexed"){h("/ColorSpace [/Indexed /DeviceRGB "+(g.pal.length/3-1)+" "+(m+1)+" 0 R]")}else{h("/ColorSpace /"+g.cs);if(g.cs==="DeviceCMYK"){h("/Decode [1 0 1 0 1 0 1 0]")}}h("/BitsPerComponent "+g.bpc);if("f" in g){h("/Filter /"+g.f)}if("dp" in g){h("/DecodeParms <<"+g.dp+">>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j<g.trns.length;j++){k+=(g[k][j]+" "+g.trns[j]+" ");h("/Mask ["+k+"]")}}if("smask" in g){h("/SMask "+(m+1)+" 0 R")}h("/Length "+g.data.length+">>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r<o.length;r++){h[o[r]]=w[r]}var p,m={},n=1,t,k=m,g=[],s,l="",u="",v,j=q.length-1,f;r=1;while(r!=j){f=q[r];r+=1;if(f=="'"){if(t){v=t.join("");t=p}else{t=[]}}else{if(t){t.push(f)}else{if(f=="{"){g.push([k,v]);k={};v=p}else{if(f=="}"){s=g.pop();s[0][s[1]]=k;v=p;k=s[0]}else{if(f=="-"){n=-1}else{if(v===p){if(h.hasOwnProperty(f)){l+=h[f];v=parseInt(l,16)*n;n=+1;l=""}else{l+=f}}else{if(h.hasOwnProperty(f)){u+=h[f];k[v]=parseInt(u,16)*n;n=+1;v=p;u=""}else{u+=f}}}}}}}}return m};var d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:e("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},b={Unicode:{"Courier-Oblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":e("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":e("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Helvetica:e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),"Courier-Bold":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":e("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":e("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};a.events.push(["addFonts",function(i){var f,g,h,k,j="Unicode",l;for(g in i.fonts){if(i.fonts.hasOwnProperty(g)){f=i.fonts[g];h=b[j][f.PostScriptName];if(h){if(f.metadata[j]){k=f.metadata[j]}else{k=f.metadata[j]={}}k.widths=h.widths;k.kerning=h.kerning}l=c[j][f.PostScriptName];if(l){if(f.metadata[j]){k=f.metadata[j]}else{k=f.metadata[j]={}}k.encoding=l;if(l.codePages&&l.codePages.length){f.encoding=l.codePages[0]}}}}}])})(pdfDataExport.API);var saveAs=saveAs||(navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator))||(function(h){var r=h.document,l=function(){return h.URL||h.webkitURL||h},e=h.URL||h.webkitURL||h,n=r.createElementNS("http://www.w3.org/1999/xhtml","a"),g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;h.addEventListener("unload",i,false);return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":console.log(b+": Data URIs are not supported on IE6-9.");break;case"save":c=d;break}}})(pdfDataExport.API); | ||
(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(B,A,x,z,y,v,w){this.hierarchy=y;this.exportFormat=v;this.filename=w;B.beginFile(w);n(B);k(B);B.endFile(w);return B.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(x){x.beginBody();if(this.hierarchy){var w=function(z){for(var y=0;y<z.length;y+=1){if(z[y]!==undefined){x.beginRow(z[y].level);e(x,z[y],y,true);if(z[y].records){x.beginRows(z[y].level);w(z[y].records);x.endRows(z[y].level)}x.endRow(z[y].level)}}};w(u);x.endBody();return}for(var v=0;v<u.length;v+=1){if(u[v]!==undefined){e(x,u[v],v)}}x.endBody()}function e(A,z,B,v){var x;if(v!=true){A.beginRow()}var y=0;for(var w in q){if(q[w].columnsDataFields){w=q[w].columnsDataFields[y].displayfield}x=s(B,w);if(x){if(x.level!=undefined){if(x.index-1>z.level&&x.index-1<x.maxLevel){y++;continue}}if(x.maxLevel!=undefined){if(x.index-1==x.maxLevel){x=b.extend({},x);x.merge=x.maxLevel-z.level-1}}}if(z.level!=undefined&&z.label!=undefined){if(this.exportFormat==="xml"||this.exportFormat==="json"){var C={};C.text="group";A.appendBodyCell(z.label,C,x,z,y,"group");break}}if(z.hasOwnProperty(w)){A.appendBodyCell(z[w],q[w],x,z,y)}else{A.appendBodyCell("",q[w],x,z,y)}y++}if(v!=true){A.endRow()}}function m(w,x){if(x.style){return j[x.style]}var v=t();if(v.length>0){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="http://jqwidgets.com/export_server/save-file.php"}else{v="http://jquerygrid.net/export_server/save-file.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(F,D,B,C){F=F.toString().toLowerCase();var E=c[F];if(typeof E==="undefined"){throw"You can't export to "+F+" format."}return d(E,u,q,j,D,B,C)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;T<R.length;T++){var X=T-aa;var Z=C[X];var W=25*72/96;var ab=b(R[T]).html();var V=M.getTextDimensions(b(R[T]).html());if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B);return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if(d.toString()=="NaN"||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n<p.maxLevel){return}else{if(n===p.maxLevel){if(m){k(q.text)}for(var o=0;o<p.maxLevel;o++){k("")}return}}}}g=m;if(m){k(q.text)}};this.endHeader=function(){this.endRow()};this.beginBody=function(){l=0};this.beginRow=function(){if((l>0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o<p.maxLevel-r.level-1;o++){k("",m)}return}}}k(q,m)};this.endRow=function(){e=e.substring(0,e.length-1)};this.endBody=function(){};this.endFile=function(){};this.getFile=function(){return e};function f(m,o){if(o){var n=i.getFormat(o);m=i.formatData(m,n.type,n.formatString,n.localization)}m='"'+m+'"';return m}function k(m,n){m=f(m,n);e+=m+j}};c.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var a=function(){};a.prototype=new c(",");var b=function(){};b.prototype=new c("\t");d.jqx.dataAdapter.ArrayExporter.extend("csv",new a());d.jqx.dataAdapter.ArrayExporter.extend("tsv",new b())})(jqxBaseFramework);(function(d){var a=function(){var i=false;var g;var h;var j=0;this.setPDF=function(){i=true};this.beginFile=function(k){if(i||k==undefined){g='<table style="empty-cells: show;" cellspacing="0" cellpadding="2">'}else{g='<html>\n\t<head>\n\t\t<title></title>\n\t\t<meta http-equiv=Content-type content="text/html; charset=UTF-8">\n\t</head>\n\t<body>\n\t\t<table style="empty-cells: show;" cellspacing="0" cellpadding="2">'}};this.beginHeader=function(){if(i){g+="\n\t<thead><tr>"}else{g+="\n\t\t\t<thead>"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t<th style="'+f(l)+'">'+m.text+"</th>"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t<th colspan="+(1+l.merge)+' style="width: '+m.width+"px; "+f(l)+'">'+m.text+"</th>"}else{g+="\n\t\t\t\t<th colspan="+(1+l.merge)+' style="'+f(l)+'">'+m.text+"</th>"}}else{if(m.width){g+='\n\t\t\t\t<th style="width: '+m.width+"px; "+f(l)+'">'+m.text+"</th>"}else{g+='\n\t\t\t\t<th style="'+f(l)+'">'+m.text+"</th>"}}}};this.endHeader=function(){if(i){g+="\n\t</tr></thead>"}else{g+="\n\t\t\t</thead>"}};this.beginBody=function(){if(i){g+="\n\t<tbody>"}else{g+="\n\t\t\t<tbody>"}j=0};this.beginRow=function(){if(i){g+="\n\t<tr>"}else{g+="\n\t\t\t\t<tr>"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t<td style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+='\n\t\t\t\t\t<td style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t<td colspan="+(1+k.merge)+' style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+="\n\t\t\t\t\t<td colspan="+(1+k.merge)+' style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t<td style="'+f(k)+' border-top-width: 1px;">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}else{g+='\n\t\t\t\t\t<td style="'+f(k)+'">'+this.formatData(l,m.type,m.formatString,m.localization)+"</td>"}}}};this.endRow=function(){if(i){g+="\n\t</tr>"}else{g+="\n\t\t\t\t</tr>"}};this.endBody=function(){if(i){g+="\n\t</tbody>"}else{g+="\n\t\t\t</tbody>"}};this.endFile=function(k){if(i||k==undefined){g+="\n</table>"}else{g+="\n\t\t</table>\n\t</body>\n</html>\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t<Style ss:ID="'+p+'" ss:Name="'+p+'">'},buildAlignment:function(q){if(q["text-align"]){var r=this.stylesMap.alignment[q["text-align"]];if(!r){r="Left"}var p='\n\t\t\t<Alignment ss:Vertical="Bottom" ss:Horizontal="'+r+'"/>';this.style+=p}},buildBorder:function(s){if(s["border-color"]){var r="\n\t\t\t<Borders>";var u='\n\t\t\t\t<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var p='\n\t\t\t\t<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var q='\n\t\t\t\t<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';var t='\n\t\t\t\t<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="'+s["border-color"]+'"/>';r+=u;r+=p;r+=q;r+=t;r+="\n\t\t\t</Borders>";this.style+=r}},buildFont:function(q){var r=this.stylesMap.font,p="\n\t\t\t<Font ";for(var s in r){if(typeof q[s]!=="undefined"){if(s==="font-style"&&q[s].toString().toLowerCase()==="italic"){p+='ss:Italic="1" '}else{if(s==="font-weight"&&q[s].toString().toLowerCase()==="bold"){p+='ss:Bold="1" '}else{if(s==="color"){p+="ss:"+r[s]+'="'+q[s]+'" '}}}}}p+="/>";this.style+=p},buildInterior:function(q){var r=this.stylesMap.interior,t="\n\t\t\t<Interior ";var p=false;for(var s in r){if(typeof q[s]!=="undefined"){t+="ss:"+r[s]+'="'+q[s]+'" ';p=true}}if(p){t+='ss:Pattern="Solid"'}t+="/>";this.style+=t},buildFormat:function(q){if(q.dataType=="number"||q.dataType=="float"||q.dataType=="int"||q.dataType=="integer"){var p=q.formatString;if(p==""||p.indexOf("n")!=-1||p.indexOf("N")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="0"/>'}else{if(p=="f"||p=="F"||p=="D"||p.indexOf("d")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="#,##0.00_);[Red](#,##0.00)"/>'}else{if(p.indexOf("p")!=-1||p.indexOf("P")!=-1){this.style+='\n\t\t\t<NumberFormat ss:Format="Percent"/>'}else{if(p.indexOf("c")!=-1||p.indexOf("C")!=-1){if(parseInt(q.currencysymbol.charCodeAt(0))==8364){this.style+='\n\t\t\t<NumberFormat ss:Format="Euro Currency"/>'}else{this.style+='\n\t\t\t<NumberFormat ss:Format="Currency"/>'}}}}}}else{if(q.dataType=="date"){this.style+='\n\t\t\t<NumberFormat ss:Format="Short Date"/>'}}},closeStyle:function(){this.style+="\n\t\t</Style>"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='<?xml version="1.0"?>\n\t<?mso-application progid="Excel.Sheet"?> \n\t<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" \n\txmlns:o="urn:schemas-microsoft-com:office:office" \n\txmlns:x="urn:schemas-microsoft-com:office:excel" \n\txmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \n\txmlns:html="http://www.w3.org/TR/REC-html40"> \n\t<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> \n\t<Version>12.00</Version> \n\t</DocumentProperties> \n\t<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> \n\t<WindowHeight>8130</WindowHeight> \n\t<WindowWidth>15135</WindowWidth> \n\t<WindowTopX>120</WindowTopX> \n\t<WindowTopY>45</WindowTopY> \n\t<ProtectStructure>False</ProtectStructure> \n\t<ProtectWindows>False</ProtectWindows> \n\t</ExcelWorkbook> \n\t<Styles>'};this.beginHeader=function(){l='\n\t<Worksheet ss:Name="Sheet1">\n\t\t<Table>';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t<Column ss:Width="'+p+'"/>';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q<d.length;q+=1){if(i[q].disabled){continue}g.call(this,d[q]["text"],null,i[q])}this.endRow()}};this.beginBody=function(){};this.beginRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="<Row>";return}l+="\n\t\t\t<Row>"};this.beginRows=function(p){l+="\n\t\t\t\t<Rows>"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="</Row>";return}l+="\n\t\t\t</Row>"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p<q;p++){l+="\t"}l+="</Rows>";return}};this.endBody=function(){l+="\n\t\t</Table>"};this.endFile=function(){l+="\n\t</Worksheet>\n</Workbook>";h+="\n\t</Styles>"};this.getFile=function(){return h+l};function g(s,v,r,u){var q="String";var t=this.getFormat(v);if(s!=null&&s.toString().substring(0,3)=="_AG"){s=s.toString().substring(3);q="String"}else{if(t.type=="date"){s=this.formatData(s,t.type,t.formatString,t.localization);if(s===null||s===""){s="";q="String"}}if(t.type=="string"){if(s===null||s===undefined){s=""}else{if(s.toString().indexOf("&")>=0){s=s.toString().replace(/&/g,"&")}if(s.toString().indexOf(">")>=0){s=s.toString().replace(/>/g,">")}if(s.toString().indexOf("<")>=0){s=s.toString().replace(/</g,"<")}if(s.toString().indexOf('"')>=0){s=s.toString().replace(/"/g,""")}if(s.toString().indexOf("'")>=0){s=s.toString().replace(/'/g,"'")}}}if(r.dataType=="number"||r.dataType=="float"||r.dataType=="int"||r.dataType=="integer"){q="Number";s=parseFloat(s);if(s===null||isNaN(s)||s===""){s="";q="String"}if(s&&q!="String"&&s!=""){if(v&&v.formatString&&v.formatString.indexOf("p")>=0){s=s/100}}r.currencysymbol=v.localization.currencysymbol}}var p=f(r);if(r.merge){l+='\n\t\t\t\t<Cell ss:MergeAcross="'+r.merge+'" ss:StyleID="'+p+'"><Data ss:Type="'+q+'">'+s+"</Data></Cell>"}else{l+='\n\t\t\t\t<Cell ss:StyleID="'+p+'"><Data ss:Type="'+q+'">'+s+"</Data></Cell>"}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='<?xml version="1.0" encoding="UTF-8" ?>';e+="\n<table>"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f<g;f++){e+="\t\t"}e+="<row>";d=0;return}}e+="\n\t<row>";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f<g;f++){e+="\t\t"}e+="<rows>";d=0;return}e+="\n\t\t<rows>"};this.appendBodyCell=function(j,n,g,m,h,l){var k=this.getFormat(n);j=this.formatData(j,k.type,k.formatString,k.localization);if(k.type=="string"){if(j.toString().indexOf("&")>=0){j=j.toString().replace(/&/g,"&")}if(j.toString().indexOf(">")>=0){j=j.toString().replace(/>/g,">")}if(j.toString().indexOf("<")>=0){j=j.toString().replace(/</g,"<")}if(j.toString().indexOf('"')>=0){j=j.toString().replace(/"/g,""")}if(j.toString().indexOf("'")>=0){j=j.toString().replace(/'/g,"'")}}if(m.level!=undefined){if(this.hierarchy){e+="\n\t\t";for(var f=0;f<m.level;f++){e+="\t\t"}if(l===undefined){e+="<"+c[d]+">"+j+"</"+c[d]+">"}else{e+="<"+l+">"+j+"</"+l+">"}}else{if(l!=undefined){e+="\n\t\t<"+l+">"+j+"</"+l+">"}else{e+="\n\t\t<"+c[d]+">"+j+"</"+c[d]+">"}}}else{e+="\n\t\t<"+c[d]+">"+j+"</"+c[d]+">"}d++};this.endRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f<g;f++){e+="\t\t"}e+="</row>";d=0;return}}e+="\n\t</row>";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f<g;f++){e+="\t\t"}e+="</rows>";d=0;return}e+="\n\t\t</rows>"};this.endBody=function(){};this.endFile=function(){e+="\n</table>"};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p<n;p++){o.push(h(p,q)||"null")}return"["+o.join(",")+"]"}function m(q){var o=[],p,n;for(p in q){if(Object.prototype.hasOwnProperty.call(q,p)){n=h(p,q);if(n){o.push(a(p)+":"+n)}}}return"{"+o.join(",")+"}"}function i(n){switch(Object.prototype.toString.call(n)){case"[object Date]":return e(n);case"[object Array]":return g(n)}return m(n)}function k(o,n){switch(n){case"string":return a(o);case"number":case"float":case"integer":case"int":return isFinite(o)?o:"null";case"boolean":return o}return"null"}function h(o,n){var q=n[o],p=typeof q;if(q&&typeof q==="object"&&typeof q.toJSON==="function"){q=q.toJSON(o);p=typeof q}if(/(number|float|int|integer|string|boolean)/.test(p)||(!q&&p==="object")){return k(q,p)}else{return i(q)}}function f(n){if(window.JSON&&typeof window.JSON.stringify==="function"){return window.JSON.stringify(n)}return h("",{"":n})}var c=function(){var q=this;this.prepareData=function(t,v){if(v){var u=q.getFormat(v);t=q.formatData(t,u.type,u.formatString,u.localization)}return t};var n,p,r,o=[],s=0;this.beginFile=function(){p=[]};this.beginHeader=function(){};this.appendHeaderCell=function(t){};this.endHeader=function(){};this.beginBody=function(u,t){};this.beginRow=function(){if(hierarchy){o[s]={}}else{r={}}};this.beginRows=function(){o[s].rows=[];s++;o[s]={}};this.endRows=function(){s--};this.appendBodyCell=function(u,t){var v=this.prepareData(u,t);if(hierarchy){o[s][t.text]=v}else{r[t.text]=v}};this.endRow=function(){if(hierarchy){if(s==0){p.push(o[s])}else{o[s-1].rows.push(o[s])}}else{p.push(r)}};this.endBody=function(){};this.endFile=function(){n=f(p)};this.getFile=function(){return n}};c.prototype=new d.jqx.dataAdapter.DataExportModuleBase();d.jqx.dataAdapter.ArrayExporter.extend("json",new c())})(jqxBaseFramework);var pdfDataExport=(function(){if(typeof btoa==="undefined"){window.btoa=function(m){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=h.split(""),g,f,e,q,p,o,n,t,l=0,u=0,k="",j=[],d;do{g=m.charCodeAt(l++);f=m.charCodeAt(l++);e=m.charCodeAt(l++);t=g<<16|f<<8|e;q=t>>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l<m.length);k=j.join("");d=m.length%3;return(d?k.slice(0,d-3):k)+"===".slice(d||3)}}if(typeof atob==="undefined"){window.atob=function(l){var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f,e,d,p,o,n,m,q,k=0,r=0,h="",j=[];if(!l){return l}l+="";do{p=g.indexOf(l.charAt(k++));o=g.indexOf(l.charAt(k++));n=g.indexOf(l.charAt(k++));m=g.indexOf(l.charAt(k++));q=p<<18|o<<12|n<<6|m;f=q>>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k<l.length);h=j.join("");return h}}var c=typeof Object.keys==="function"?function(d){return Object.keys(d).length}:function(d){var f=0,g;for(g in d){if(d.hasOwnProperty(g)){f++}}return f},a=function(d){this.topics={};this.context=d;this.publish=function(h,m){if(this.topics[h]){var j=this.topics[h],o=[],n,g,e,f,k=function(){};m=Array.prototype.slice.call(arguments,1);for(g=0,e=j.length;g<e;g++){f=j[g];n=f[0];if(f[1]){f[0]=k;o.push(g)}n.apply(this.context,m)}for(g=0,e=o.length;g<e;g++){j.splice(o[g],1)}}};this.subscribe=function(e,g,f){if(!this.topics[e]){this.topics[e]=[[g,f]]}else{this.topics[e].push([g,f])}return{topic:e,callback:g}};this.unsubscribe=function(h){if(this.topics[h.topic]){var f=this.topics[h.topic],g,e;for(g=0,e=f.length;g<e;g++){if(f[g][0]===h.callback){f.splice(g,1)}}}}};function b(D,ad,L,U){if(typeof D==="undefined"){D="p"}else{D=D.toString().toLowerCase()}if(typeof ad==="undefined"){ad="mm"}if(typeof L==="undefined"){L="a4"}if(typeof U==="undefined"&&typeof zpipe==="undefined"){U=false}var aq=L.toString().toLowerCase(),am="0.9.0rc2",s=[],E=0,at=U,T="1.3",M={a3:[841.89,1190.55],a4:[595.28,841.89],a5:[420.94,595.28],letter:[612,792],legal:[612,1008]},ac="0 g",G="0 G",g=0,f=[],m=2,u=false,C=[],ag={},P={},ah=16,d,y=0.200025,A,B,ai,N={title:"",subject:"",author:"",keywords:"",creator:""},Q=0,S=0,O={},F=new a(O),ae,ao,o=function(i){return i.toFixed(2)},n=function(i){return i.toFixed(3)},z=function(i){var k=(i).toFixed(0);if(i<10){return"0"+k}else{return k}},q=function(i){var k=(i).toFixed(0);if(k.length<10){return new Array(11-k.length).join("0")+k}else{return k}},aa=function(i){if(u){f[g].push(i)}else{s.push(i);E+=i.length+1}},v=function(){m++;C[m]=E;aa(m+" 0 obj");return m},J=function(i){aa("stream");aa(i);aa("endstream")},ak,R,an,aj,Z=function(){ak=B*ai;R=A*ai;var az,ay,k,au,av,ax,aw;for(az=1;az<=g;az++){v();aa("<</Type /Page");aa("/Parent 1 0 R");aa("/Resources 2 0 R");aa("/Contents "+(m+1)+" 0 R>>");aa("endobj");ay=f[az].join("\n");v();if(at){k=[];for(av=0;av<ay.length;++av){k[av]=ay.charCodeAt(av)}aw=adler32cs.from(ay);ax=new Deflater(6);ax.append(new Uint8Array(k));ay=ax.flush();k=[new Uint8Array([120,156]),new Uint8Array(ay),new Uint8Array([aw&255,(aw>>8)&255,(aw>>16)&255,(aw>>24)&255])];ay="";for(av in k){if(k.hasOwnProperty(av)){ay+=String.fromCharCode.apply(null,k[av])}}aa("<</Length "+ay.length+" /Filter [/FlateDecode]>>")}else{aa("<</Length "+ay.length+">>")}J(ay);aa("endobj")}C[1]=E;aa("1 0 obj");aa("<</Type /Pages");an="/Kids [";for(av=0;av<g;av++){an+=(3+2*av)+" 0 R "}aa(an+"]");aa("/Count "+g);aa("/MediaBox [0 0 "+o(ak)+" "+o(R)+"]");aa(">>");aa("endobj")},W=function(i){i.objectNumber=v();aa("<</BaseFont/"+i.PostScriptName+"/Type/Font");if(typeof i.encoding==="string"){aa("/Encoding/"+i.encoding)}aa("/Subtype/Type1>>");aa("endobj")},I=function(){var i;for(i in ag){if(ag.hasOwnProperty(i)){W(ag[i])}}},K=function(){F.publish("putXobjectDict")},w=function(){aa("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");aa("/Font <<");var i;for(i in ag){if(ag.hasOwnProperty(i)){aa("/"+i+" "+ag[i].objectNumber+" 0 R")}}aa(">>");aa("/XObject <<");K();aa(">>")},h=function(){I();F.publish("putResources");C[2]=E;aa("2 0 obj");aa("<<");w();aa(">>");aa("endobj");F.publish("postPutResources")},l=function(au,k,av){var i;if(P[k]===i){P[k]={}}P[k][av]=au},ar={},t=function(i,av,ax,au){var aw="F"+(c(ag)+1).toString(10),k=ag[aw]={id:aw,PostScriptName:i,fontName:av,fontStyle:ax,encoding:au,metadata:{}};l(aw,av,ax);F.publish("addFont",k);return aw},e=function(){var k="helvetica",aD="times",aF="courier",aC="normal",aB="bold",aA="italic",aE="bolditalic",au="StandardEncoding",ax=[["Helvetica",k,aC],["Helvetica-Bold",k,aB],["Helvetica-Oblique",k,aA],["Helvetica-BoldOblique",k,aE],["Courier",aF,aC],["Courier-Bold",aF,aB],["Courier-Oblique",aF,aA],["Courier-BoldOblique",aF,aE],["Times-Roman",aD,aC],["Times-Bold",aD,aB],["Times-Italic",aD,aA],["Times-BoldItalic",aD,aE]],az,av,ay,aw;for(az=0,av=ax.length;az<av;az++){ay=t(ax[az][0],ax[az][1],ax[az][2],au);aw=ax[az][0].split("-");l(ay,aw[0],aw[1]||"")}F.publish("addFonts",{fonts:ag,dictionary:P})},r=function(aE,av){var aA,ay,ax,aw,aC,aB,au,aD,k,az;if(av===ax){av={}}aw=av.sourceEncoding?aw:"Unicode";aB=av.outputEncoding;if((av.autoencode||aB)&&ag[d].metadata&&ag[d].metadata[aw]&&ag[d].metadata[aw].encoding){aC=ag[d].metadata[aw].encoding;if(!aB&&ag[d].encoding){aB=ag[d].encoding}if(!aB&&aC.codePages){aB=aC.codePages[0]}if(typeof aB==="string"){aB=aC[aB]}if(aB){aD=false;au=[];for(aA=0,ay=aE.length;aA<ay;aA++){k=aB[aE.charCodeAt(aA)];if(k){au.push(String.fromCharCode(k))}else{au.push(aE[aA])}if(au[aA].charCodeAt(0)>>8){aD=true}}aE=au.join("")}}aA=aE.length;while(aD===ax&&aA!==0){if(aE.charCodeAt(aA-1)>>8){aD=true}aA--}if(!aD){return aE}else{au=av.noBOM?[]:[254,255];for(aA=0,ay=aE.length;aA<ay;aA++){k=aE.charCodeAt(aA);az=k>>8;if(az>>8){throw new Error("Character at position "+aA.toString(10)+" of string '"+aE+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}au.push(az);au.push(k-(az<<8))}return String.fromCharCode.apply(ax,au)}},Y=function(k,i){return r(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},X=function(){aa("/Producer (pdfDataExport "+am+")");if(N.title){aa("/Title ("+Y(N.title)+")")}if(N.subject){aa("/Subject ("+Y(N.subject)+")")}if(N.author){aa("/Author ("+Y(N.author)+")")}if(N.keywords){aa("/Keywords ("+Y(N.keywords)+")")}if(N.creator){aa("/Creator ("+Y(N.creator)+")")}var i=new Date();aa("/CreationDate (D:"+[i.getFullYear(),z(i.getMonth()+1),z(i.getDate()),z(i.getHours()),z(i.getMinutes()),z(i.getSeconds())].join("")+")")},V=function(){aa("/Type /Catalog");aa("/Pages 1 0 R");aa("/OpenAction [3 0 R /FitH null]");aa("/PageLayout /OneColumn");F.publish("putCatalog")},j=function(){aa("/Size "+(m+1));aa("/Root "+m+" 0 R");aa("/Info "+(m-1)+" 0 R")},ap=function(){g++;u=true;f[g]=[]},af=function(){ap();aa(o(y*ai)+" w");aa(G);if(Q!==0){aa(Q.toString(10)+" J")}if(S!==0){aa(S.toString(10)+" j")}F.publish("addPage",{pageNumber:g})},x=function(au,aw){var i,k;if(au===k){au=ag[d].fontName}if(aw===k){aw=ag[d].fontStyle}try{i=P[au][aw]}catch(av){i=k}if(!i){throw new Error("Unable to look up font label for font '"+au+"', '"+aw+"'. Refer to getFontList() for available fonts.")}return i},p=function(){u=false;s=[];C=[];aa("%PDF-"+T);Z();h();v();aa("<<");X();aa(">>");aa("endobj");v();aa("<<");V();aa(">>");aa("endobj");var au=E,k;aa("xref");aa("0 "+(m+1));aa("0000000000 65535 f ");for(k=1;k<=m;k++){aa(q(C[k])+" 00000 n ")}aa("trailer");aa("<<");j();aa(">>");aa("startxref");aa(au);aa("%%EOF");u=true;return s.join("\n")},ab=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},H=function(ax,au){var aw,az,ay,aA,av,k;switch(ax){case aw:return p();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return O.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return O.output("dataurlnewwindow")}}}az=p();ay=az.length;aA=new Uint8Array(new ArrayBuffer(ay));for(av=0;av<ay;av++){aA[av]=az.charCodeAt(av)}k=new Blob([aA],{type:"application/pdf"});saveAs(k,au);break;case"datauristring":case"dataurlstring":return"data:application/pdf;base64,"+btoa(p());case"datauri":case"dataurl":document.location.href="data:application/pdf;base64,"+btoa(p());break;case"dataurlnewwindow":window.open("data:application/pdf;base64,"+btoa(p()));break;default:throw new Error('Output type "'+ax+'" is not supported.')}};if(ad==="pt"){ai=1}else{if(ad==="mm"){ai=72/25.4}else{if(ad==="cm"){ai=72/2.54}else{if(ad==="in"){ai=72}else{throw ("Invalid unit: "+ad)}}}}if(M.hasOwnProperty(aq)){A=M[aq][1]/ai;B=M[aq][0]/ai}else{try{A=L[1];B=L[0]}catch(al){throw ("Invalid format: "+L)}}if(D==="p"||D==="portrait"){D="p";if(B>A){ae=B;B=A;A=ae}}else{if(D==="l"||D==="landscape"){D="l";if(A>B){ae=B;B=A;A=ae}}else{throw ("Invalid orientation: "+D)}}O.internal={pdfEscape:Y,getStyle:ab,getFont:function(){return ag[x.apply(O,arguments)]},getFontSize:function(){return ah},btoa:btoa,write:function(i,av,au,k){aa(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return o(i*ai)},getVerticalCoordinateString:function(i){return o((A-i)*ai)},collections:{},newObject:v,putStream:J,events:F,scaleFactor:ai,pageSize:{width:B,height:A},output:function(k,i){return H(k,i)}};O.addPage=function(){af();return this};O.text=function(aD,aC,aA,au){var av,ay,ax,aB,k,az,aw;if(typeof aD==="number"){ay=aA;ax=aD;aB=aC;aD=ay;aC=ax;aA=aB}if(typeof aD==="string"&&aD.match(/[\n\r]/)){aD=aD.split(/\r\n|\r|\n/g)}if(typeof au==="undefined"){au={noBOM:true,autoencode:true}}else{if(au.noBOM===av){au.noBOM=true}if(au.autoencode===av){au.autoencode=true}}if(typeof aD==="string"){az=Y(aD,au)}else{if(aD instanceof Array){k=aD.concat();for(aw=k.length-1;aw!==-1;aw--){k[aw]=Y(k[aw],au)}az=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aD+'" is not recognized.')}}aa("BT\n/"+d+" "+ah+" Tf\n"+ah+" TL\n"+ac+"\n"+o(aC*ai)+" "+o((A-aA)*ai)+" Td\n("+az+") Tj\nET");return this};O.line=function(k,av,i,au){aa(o(k*ai)+" "+o((A-av)*ai)+" m "+o(i*ai)+" "+o((A-au)*ai)+" l S");return this};O.lines=function(k,aD,aC,aM,aI){var aw,aK,aA,aB,az,ay,aG,aE,aL,aJ,ax,aH,av,aF,au;if(typeof k==="number"){aK=aC;aA=k;aB=aD;k=aK;aD=aA;aC=aB}aI=ab(aI);aM=aM===aw?[1,1]:aM;aa(n(aD*ai)+" "+n((A-aC)*ai)+" m ");az=aM[0];ay=aM[1];aE=k.length;aF=aD;au=aC;for(aG=0;aG<aE;aG++){aL=k[aG];if(aL.length===2){aF=aL[0]*az+aF;au=aL[1]*ay+au;aa(n(aF*ai)+" "+n((A-au)*ai)+" l")}else{aJ=aL[0]*az+aF;ax=aL[1]*ay+au;aH=aL[2]*az+aF;av=aL[3]*ay+au;aF=aL[4]*az+aF;au=aL[5]*ay+au;aa(n(aJ*ai)+" "+n((A-ax)*ai)+" "+n(aH*ai)+" "+n((A-av)*ai)+" "+n(aF*ai)+" "+n((A-au)*ai)+" c")}}aa(aI);return this};O.rect=function(i,ax,k,av,au){var aw=ab(au);aa([o(i*ai),o((A-ax)*ai),o(k*ai),o(-av*ai),"re",aw].join(" "));return this};O.triangle=function(av,ay,k,aw,i,au,ax){this.lines([[k-av,aw-ay],[i-k,au-aw],[av-i,ay-au]],av,ay,[1,1],ax);return this};O.roundedRect=function(k,az,au,aw,ay,ax,av){var i=4/3*(Math.SQRT2-1);this.lines([[(au-2*ay),0],[(ay*i),0,ay,ax-(ax*i),ay,ax],[0,(aw-2*ax)],[0,(ax*i),-(ay*i),ax,-ay,ax],[(-au+2*ay),0],[-(ay*i),0,-ay,-(ax*i),-ay,-ax],[0,(-aw+2*ax)],[0,-(ax*i),(ay*i),-ax,ay,-ax]],k+ay,az,[1,1],av);return this};O.ellipse=function(i,az,ax,aw,k){var ay=ab(k),av=4/3*(Math.SQRT2-1)*ax,au=4/3*(Math.SQRT2-1)*aw;aa([o((i+ax)*ai),o((A-az)*ai),"m",o((i+ax)*ai),o((A-(az-au))*ai),o((i+av)*ai),o((A-(az-aw))*ai),o(i*ai),o((A-(az-aw))*ai),"c"].join(" "));aa([o((i-av)*ai),o((A-(az-aw))*ai),o((i-ax)*ai),o((A-(az-au))*ai),o((i-ax)*ai),o((A-az)*ai),"c"].join(" "));aa([o((i-ax)*ai),o((A-(az+au))*ai),o((i-av)*ai),o((A-(az+aw))*ai),o(i*ai),o((A-(az+aw))*ai),"c"].join(" "));aa([o((i+av)*ai),o((A-(az+aw))*ai),o((i+ax)*ai),o((A-(az+au))*ai),o((i+ax)*ai),o((A-az)*ai),"c",ay].join(" "));return this};O.circle=function(i,av,au,k){return this.ellipse(i,av,au,au,k)};O.setProperties=function(i){var k;for(k in N){if(N.hasOwnProperty(k)&&i[k]){N[k]=i[k]}}return this};O.setFontSize=function(i){ah=i;return this};O.setFont=function(i,k){d=x(i,k);return this};O.setFontStyle=O.setFontType=function(k){var i;d=x(i,k);return this};O.getFontList=function(){var au={},k,av,i;for(k in P){if(P.hasOwnProperty(k)){au[k]=i=[];for(av in P[k]){if(P[k].hasOwnProperty(av)){i.push(av)}}}}return au};O.setLineWidth=function(i){aa((i*ai).toFixed(2)+" w");return this};O.setDrawColor=function(aw,av,au,i){var k;if(av===undefined||(i===undefined&&aw===av===au)){if(typeof aw==="string"){k=aw+" G"}else{k=o(aw/255)+" G"}}else{if(i===undefined){if(typeof aw==="string"){k=[aw,av,au,"RG"].join(" ")}else{k=[o(aw/255),o(av/255),o(au/255),"RG"].join(" ")}}else{if(typeof aw==="string"){k=[aw,av,au,i,"K"].join(" ")}else{k=[o(aw),o(av),o(au),o(i),"K"].join(" ")}}}aa(k);return this};O.setFillColor=function(aw,av,au,i){var k;if(av===undefined||(i===undefined&&aw===av===au)){if(typeof aw==="string"){k=aw+" g"}else{k=o(aw/255)+" g"}}else{if(i===undefined){if(typeof aw==="string"){k=[aw,av,au,"rg"].join(" ")}else{k=[o(aw/255),o(av/255),o(au/255),"rg"].join(" ")}}else{if(typeof aw==="string"){k=[aw,av,au,i,"k"].join(" ")}else{k=[o(aw),o(av),o(au),o(i),"k"].join(" ")}}}aa(k);return this};O.setTextColor=function(au,k,i){if((au===0&&k===0&&i===0)||(typeof k==="undefined")){ac=n(au/255)+" g"}else{ac=[n(au/255),n(k/255),n(i/255),"rg"].join(" ")}return this};O.CapJoinStyles={0:0,butt:0,but:0,bevel:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,milter:2};O.setLineCap=function(i){var k=this.CapJoinStyles[i];if(k===undefined){throw new Error("Line cap style of '"+i+"' is not recognized. See or extend .CapJoinStyles property for valid styles")}Q=k;aa(k.toString(10)+" J");return this};O.setLineJoin=function(i){var k=this.CapJoinStyles[i];if(k===undefined){throw new Error("Line join style of '"+i+"' is not recognized. See or extend .CapJoinStyles property for valid styles")}S=k;aa(k.toString(10)+" j");return this};O.output=H;O.save=function(i){O.output("save",i)};for(ao in b.API){if(b.API.hasOwnProperty(ao)){if(ao==="events"&&b.API.events.length){(function(av,ax){var aw,au,k;for(k=ax.length-1;k!==-1;k--){aw=ax[k][0];au=ax[k][1];av.subscribe.apply(av,[aw].concat(typeof au==="function"?[au]:au))}}(F,b.API.events))}else{O[ao]=b.API[ao]}}}e();d="F1";af();F.publish("initialized");return O}b.API={events:[]};return b}());(function(i){var b=0,m=0,a,o,h,c={x:undefined,y:undefined,w:undefined,h:undefined,ln:undefined},f=1,e=false,d=function(p,t,q,r,s){c={x:p,y:t,w:q,h:r,ln:s}},k=function(){return c},j=function(p){b=p},l=function(){return b},n=function(p){m=p},g=function(p){return m};i.getTextDimensions=function(p){a=this.internal.getFont().fontName;o=this.internal.getFontSize();h=this.internal.getFont().fontStyle;var s=0.264583*72/25.4,q,r;r=document.createElement("font");r.id="pdfDataExportCell";r.style.fontStyle=h;r.style.fontName=a;r.style.fontSize=o+"pt";r.innerText=p;document.body.appendChild(r);q={w:(r.offsetWidth+1)*s,h:(r.offsetHeight+1)*s};document.body.removeChild(r);return q};i.cellAddPage=function(){this.addPage();d(undefined,undefined,undefined,undefined,undefined);e=true;f+=1;n(1)};i.cellInitialize=function(){b=0;c={x:undefined,y:undefined,w:undefined,h:undefined,ln:undefined};f=1;e=false;n(0)};i.cell=function(v,u,z,r,p,t){this.lnMod=this.lnMod===undefined?0:this.lnMod;if(this.printingHeaderRow!==true&&this.lnMod!==0){t=t+this.lnMod}if((((t*r)+u+(r*2))/f)>=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(t);this.lnMod+=1;t+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(r*2))/r))}}else{if(e&&k().ln!==t&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(t);this.lnMod+=1;t+=1}}}var A=k(),q=this.getTextDimensions(p),s=1;if(A.x!==undefined&&A.ln===t){v=A.x+A.w}if(A.y!==undefined&&A.y===u){u=A.y}if(A.h!==undefined&&A.h===r){r=A.h}if(A.ln!==undefined&&A.ln===t){t=A.ln;s=0}if(e){u=r*(g()+s)}else{u=(u+(r*Math.abs(l()*f-t-l())))}this.rect(v,u,z,r);this.text(p,v+3,u+r-3);n(g()+s);d(v,u,z,r,t);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;q<s;q+=1){r=u[q];if(t){if(t(p,r)===-1){p=r}}else{if(r>p){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;E<y;E+=1){D=r[E];v.push(D.name);p.push(D.prompt)}}else{v=r}}if(I.autoSize){w=function(K){return K[D]};for(E=0,y=v.length;E<y;E+=1){D=v[E];G[D]=J.map(w);H.push(this.getTextDimensions(p[E]||D).w);s=G[D];for(C=0,y=s.length;C<y;C+=1){u=s[C];H.push(this.getTextDimensions(u).w)}A[D]=i.arrayMax(H)}}if(I.printHeaders){for(E=0,y=v.length;E<y;E+=1){D=v[E];F.push([10,10,A[D],25,String(p.length?p[E]:D)])}this.setTableHeaderRow(F);this.printHeaderRow(1)}for(E=0,y=J.length;E<y;E+=1){t=J[E];for(C=0,q=v.length;C<q;C+=1){D=v[C];this.cell(10,10,A[D],25,String(t[D]),E+2)}}return this};i.setTableHeaderRow=function(p){this.tableHeaderRow=p};i.printHeaderRow=function(p){if(!this.tableHeaderRow){throw"Property tableHeaderRow does not exist."}var q,s,r,t;this.printingHeaderRow=true;for(r=0,t=this.tableHeaderRow.length;r<t;r+=1){q=this.tableHeaderRow[r];s=[].concat(q);this.cell.apply(this,s.concat(p))}this.printingHeaderRow=false}}(pdfDataExport.API));(function(c){var b=c.getCharWidthsArray=function(s,u){if(!u){u={}}var h=u.widths?u.widths:this.internal.getFont().metadata.Unicode.widths,r=h.fof?h.fof:1,n=u.kerning?u.kerning:this.internal.getFont().metadata.Unicode.kerning,p=n.fof?n.fof:1;var m,j,o,k,q=0,t=h[0]||r,g=[];for(m=0,j=s.length;m<j;m++){o=s.charCodeAt(m);g.push((h[o]||t)/r+(n[o]&&n[o][q]||0)/p);q=o}return g};var e=function(j){var h=j.length,g=0;while(h){h--;g+=j[h]}return g};var a=c.getStringUnitWidth=function(h,g){return e(b.call(this,h,g))};var d=function(g,n,h,j){var q=[];var m=0,k=g.length,p=0;while(m!==k&&p+n[m]<h){p+=n[m];m++}q.push(g.slice(0,m));var o=m;p=0;while(m!==k){if(p+n[m]>j){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;o<m;o++){g=r[o];q=b(g,v);p=e(q);if(h+u+p>k){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o<m;o++){j.push(x[o].join(" "))}return j};c.splitTextToSize=function(q,m,r){if(!r){r={}}var h=r.fontSize||this.internal.getFontSize(),g=(function(l){var t={0:1},i={};if(!l.widths||!l.kerning){var u=this.internal.getFont(l.fontName,l.fontStyle),s="Unicode";if(u.metadata[s]){return{widths:u.metadata[s].widths||t,kerning:u.metadata[s].kerning||i}}}else{return{widths:l.widths,kerning:l.kerning}}return{widths:t,kerning:i}}).call(this,r);var p;if(q.match(/[\n\r]/)){p=q.split(/\r\n|\r|\n/g)}else{p=[q]}var j=1*this.internal.scaleFactor*m/h;g.textIndent=r.textIndent?r.textIndent*1*this.internal.scaleFactor/h:0;var o,n,k=[];for(o=0,n=p.length;o<n;o++){k=k.concat(f(p[o],j,g))}return k}})(pdfDataExport.API);(function(c){var d="addImage_";var f=function(m){var l,h;if(!m.charCodeAt(0)===255||!m.charCodeAt(1)===216||!m.charCodeAt(2)===255||!m.charCodeAt(3)===224||!m.charCodeAt(6)==="J".charCodeAt(0)||!m.charCodeAt(7)==="F".charCodeAt(0)||!m.charCodeAt(8)==="I".charCodeAt(0)||!m.charCodeAt(9)==="F".charCodeAt(0)||!m.charCodeAt(10)===0){throw new Error("getJpegSize requires a binary jpeg file")}var j=m.charCodeAt(4)*256+m.charCodeAt(5);var k=4,g=m.length;while(k<g){k+=j;if(m.charCodeAt(k)!==255){throw new Error("getJpegSize could not find the size of the image")}if(m.charCodeAt(k+1)===192){h=m.charCodeAt(k+5)*256+m.charCodeAt(k+6);l=m.charCodeAt(k+7)*256+m.charCodeAt(k+8);return[l,h]}else{k+=2;j=m.charCodeAt(k)*256+m.charCodeAt(k+1)}}},b=function(g){var m=this.internal.newObject(),h=this.internal.write,l=this.internal.putStream;g.n=m;h("<</Type /XObject");h("/Subtype /Image");h("/Width "+g.w);h("/Height "+g.h);if(g.cs==="Indexed"){h("/ColorSpace [/Indexed /DeviceRGB "+(g.pal.length/3-1)+" "+(m+1)+" 0 R]")}else{h("/ColorSpace /"+g.cs);if(g.cs==="DeviceCMYK"){h("/Decode [1 0 1 0 1 0 1 0]")}}h("/BitsPerComponent "+g.bpc);if("f" in g){h("/Filter /"+g.f)}if("dp" in g){h("/DecodeParms <<"+g.dp+">>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j<g.trns.length;j++){k+=(g[k][j]+" "+g.trns[j]+" ");h("/Mask ["+k+"]")}}if("smask" in g){h("/SMask "+(m+1)+" 0 R")}h("/Length "+g.data.length+">>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r<o.length;r++){h[o[r]]=w[r]}var p,m={},n=1,t,k=m,g=[],s,l="",u="",v,j=q.length-1,f;r=1;while(r!=j){f=q[r];r+=1;if(f=="'"){if(t){v=t.join("");t=p}else{t=[]}}else{if(t){t.push(f)}else{if(f=="{"){g.push([k,v]);k={};v=p}else{if(f=="}"){s=g.pop();s[0][s[1]]=k;v=p;k=s[0]}else{if(f=="-"){n=-1}else{if(v===p){if(h.hasOwnProperty(f)){l+=h[f];v=parseInt(l,16)*n;n=+1;l=""}else{l+=f}}else{if(h.hasOwnProperty(f)){u+=h[f];k[v]=parseInt(u,16)*n;n=+1;v=p;u=""}else{u+=f}}}}}}}}return m};var d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:e("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},b={Unicode:{"Courier-Oblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":e("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":e("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Helvetica:e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),"Courier-Bold":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":e("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":e("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};a.events.push(["addFonts",function(i){var f,g,h,k,j="Unicode",l;for(g in i.fonts){if(i.fonts.hasOwnProperty(g)){f=i.fonts[g];h=b[j][f.PostScriptName];if(h){if(f.metadata[j]){k=f.metadata[j]}else{k=f.metadata[j]={}}k.widths=h.widths;k.kerning=h.kerning}l=c[j][f.PostScriptName];if(l){if(f.metadata[j]){k=f.metadata[j]}else{k=f.metadata[j]={}}k.encoding=l;if(l.codePages&&l.codePages.length){f.encoding=l.codePages[0]}}}}}])})(pdfDataExport.API);var saveAs=saveAs||(navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator))||(function(h){var r=h.document,l=function(){return h.URL||h.webkitURL||h},e=h.URL||h.webkitURL||h,n=$("<a></a>")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":console.log(b+": Data URIs are not supported on IE6-9.");break;case"save":c=d;break}}})(pdfDataExport.API); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ 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.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="dropdownlistArrow"+q.element.id;q.dropdownlistContent[0].id="dropdownlistContent"+q.element.id;q._addInput();if(q.promptText!="Please Choose:"){q.placeHolder=q.promptText}var n=q.toThemeProperty("jqx-widget")+" "+q.toThemeProperty("jqx-dropdownlist-state-normal")+" "+q.toThemeProperty("jqx-rc-all")+" "+q.toThemeProperty("jqx-fill-state-normal");q.element.className+=" "+n;q._firstDiv=a(q.element.firstChild);try{var p="listBox"+q.id;var h=a(a.find("#"+p));if(h.length>0){h.remove()}a.jqx.aria(q,"aria-owns",p);a.jqx.aria(q,"aria-haspopup",true);var b=a("<div style='overflow: hidden; background-color: transparent; border: none; position: absolute;' id='listBox"+q.id+"'><div id='innerListBox"+q.id+"'></div></div>");b.hide();b.appendTo(document.body);q.container=b;q.listBoxContainer=a(a.find("#innerListBox"+q.id));var d=q.width;if(q.dropDownWidth!="auto"){d=q.dropDownWidth}if(d==null){d=q.host.width();if(d==0){d=q.dropDownWidth}}if(q.dropDownHeight==null){q.dropDownHeight=200}var l=q;q.container.width(parseInt(d)+25);q.container.height(parseInt(q.dropDownHeight)+25);q.addHandler(q.listBoxContainer,"bindingComplete",function(e){if(!q.listBox){q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance}q._raiseEvent("6")});q.listBoxContainer.jqxListBox({filterHeight:q.filterHeight,filterPlaceHolder:q.filterPlaceHolder,filterDelay:q.filterDelay,filterable:q.filterable,allowDrop:false,allowDrag:false,autoBind:q.autoBind,_checkForHiddenParent:false,focusable:q.focusable,touchMode:q.touchMode,checkboxes:q.checkboxes,rtl:q.rtl,emptyString:q.emptyString,itemHeight:q.itemHeight,width:d,searchMode:q.searchMode,incrementalSearch:q.incrementalSearch,incrementalSearchDelay:q.incrementalSearchDelay,groupMember:q.groupMember,searchMember:q.searchMember,displayMember:q.displayMember,valueMember:q.valueMember,height:q.dropDownHeight,autoHeight:q.autoDropDownHeight,scrollBarSize:q.scrollBarSize,selectedIndex:q.selectedIndex,source:q.source,theme:q.theme,rendered:function(){if(q.selectedIndex!=q.listBoxContainer.jqxListBox("selectedIndex")){q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance;q.listBoxContainer.jqxListBox({selectedIndex:q.selectedIndex});q.renderSelection("mouse")}else{q.renderSelection("mouse")}},renderer:q.renderer});q.listBoxContainer.css({position:"absolute",zIndex:q.popupZIndex,top:0,left:0});q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance;q.listBox.enableSelection=q.enableSelection;q.listBox.enableHover=q.enableHover;q.listBox.equalItemsWidth=q.equalItemsWidth;q.listBox.selectIndex(q.selectedIndex);q.listBox._arrange();q.listBoxContainer.addClass(q.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){q.listBoxContainer.addClass(q.toThemeProperty("jqx-noshadow"))}q.addHandler(q.listBoxContainer,"unselect",function(e){q._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})});q.addHandler(q.listBoxContainer,"change",function(e){if(e.args){if(e.args.type!="keyboard"){q._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}else{if(e.args.type=="keyboard"){if(!q.isOpened()){q._raiseEvent("4",{index:q.selectedIndex,type:"keyboard",item:q.getItem(q.selectedIndex)})}}}}});if(q.animationType=="none"){q.container.css("display","none")}else{q.container.hide()}}catch(j){}var q=q;q.propertyChangeMap.disabled=function(e,t,s,u){if(u){e.host.addClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.addClass(q.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}else{e.host.removeClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.removeClass(q.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}a.jqx.aria(e,"aria-disabled",e.disabled)};if(q.disabled){q.host.addClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));q.host.addClass(q.toThemeProperty("jqx-fill-state-disabled"));q.dropdownlistContent.addClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}q.arrow.addClass(q.toThemeProperty("jqx-icon-arrow-down"));q.arrow.addClass(q.toThemeProperty("jqx-icon"));if(q.renderMode==="simple"){q.arrow.remove();q.host.removeClass(q.toThemeProperty("jqx-fill-state-normal"));q.host.removeClass(q.toThemeProperty("jqx-rc-all"))}q._updateHandlers();q._setSize();q._arrange();if(q.listBox){q.renderSelection()}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(q.host.parents(".jqx-window").length>0){var m=q.host.parents(".jqx-window").css("z-index");b.css("z-index",m+10);q.listBoxContainer.css("z-index",m+10)}}},resize:function(c,b){this.width=c;this.height=b;this._setSize();this._arrange()},val:function(c){if(!this.dropdownlistContent){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(this.input&&(d(c)||arguments.length==0)){return this.input.val()}var b=this.getItemByValue(c);if(b!=null){this.selectItem(b)}if(this.input){return this.input.val()}},focus:function(){try{var d=this;var c=function(){d.host.focus();if(d._firstDiv){d._firstDiv.focus()}};c();setTimeout(function(){c()},10)}catch(b){}},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}},getItems:function(){if(!this.listBox){return new Array()}return this.listBox.items},getVisibleItems:function(){return this.listBox.getVisibleItems()},_setSize:function(){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 e=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){e=true;this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){e=true;this.host.height(this.height)}var c=this;var d=function(){c._arrange();if(c.dropDownWidth=="auto"){var f=c.host.width();c.listBoxContainer.jqxListBox({width:f});c.container.width(parseInt(f)+25)}};if(e){var b=this.host.width();if(this.dropDownWidth!="auto"){b=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:b});this.container.width(parseInt(b)+25)}a.jqx.utilities.resize(this.host,function(){d()},false,this._checkForHiddenParent)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXListBox"+this.id);if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var c=this;var d=false;this.removeHandlers();if(!this.touch){this.addHandler(this.host,"mouseenter",function(){if(!c.disabled&&c.enableHover&&c.renderMode!=="simple"){d=true;c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-hover"));c.arrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"));c.host.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!c.disabled&&c.enableHover&&c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-hover"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c.arrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"));d=false}})}if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.dropdownlist"+this.element.id,function(e){var f=c.isOpened();if(f){c.close()}})}var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.dropdownlistWrapper,b,function(f){if(!c.disabled){var e=c.container.css("display")=="block";if(!c.isanimating){if(e){c.hideListBox();return false}else{c.showListBox();if(!c.focusable){if(f.preventDefault){f.preventDefault()}}else{c.focus()}}}}});if(c.autoOpen){this.addHandler(this.host,"mouseenter",function(){var e=c.isOpened();if(!e&&c.autoOpen){c.open();c.host.focus()}});a(document).on("mousemove."+c.id,function(h){var g=c.isOpened();if(g&&c.autoOpen){var l=c.host.coord();var k=l.top;var j=l.left;var i=c.container.coord();var e=i.left;var f=i.top;canClose=true;if(h.pageY>=k&&h.pageY<=k+c.host.height()){if(h.pageX>=j&&h.pageX<j+c.host.width()){canClose=false}}if(h.pageY>=f&&h.pageY<=f+c.container.height()){if(h.pageX>=e&&h.pageX<e+c.container.width()){canClose=false}}if(canClose){c.close()}}})}if(this.touch){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,c.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}else{this.addHandler(a(document),"mousedown."+this.id,c.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}this.addHandler(this.host,"keydown",function(f){var e=c.container.css("display")=="block";if(c.host.css("display")=="none"){return true}if(f.keyCode=="13"||f.keyCode=="9"){if(!c.isanimating){if(e){c.renderSelection();if(f.keyCode=="13"&&c.focusable){c._firstDiv.focus()}c.hideListBox();if(!c.keyboardSelection){c._raiseEvent("2",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)})}if(f.keyCode=="13"){c._raiseEvent("4",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)})}}if(e&&f.keyCode!="9"){return false}return true}}if(f.keyCode==115){if(!c.isanimating){if(!c.isOpened()){c.showListBox()}else{if(c.isOpened()){c.hideListBox()}}}return false}if(f.altKey){if(c.host.css("display")=="block"){if(f.keyCode==38){if(c.isOpened()){c.hideListBox();return true}}else{if(f.keyCode==40){if(!c.isOpened()){c.showListBox();return true}}}}}if(f.keyCode=="27"){if(!c.ishiding){if(c.isOpened()){c.hideListBox();if(c.tempSelectedIndex!=undefined){c.selectIndex(c.tempSelectedIndex)}}return true}}if(!c.disabled){c._kbnavigated=c.listBox._handleKeyDown(f);return c._kbnavigated}});this.addHandler(this.listBoxContainer,"checkChange",function(e){c.renderSelection();c._updateInputSelection();c._raiseEvent(5,{label:e.args.label,value:e.args.value,checked:e.args.checked,item:e.args.item})});this.addHandler(this.listBoxContainer,"select",function(e){if(!c.disabled){if(!e.args){return}if(e.args.type=="keyboard"&&!c.isOpened()){c.renderSelection()}if(e.args.type!="keyboard"||c.keyboardSelection){c.renderSelection();c._raiseEvent("2",{index:e.args.index,type:e.args.type,item:e.args.item,originalEvent:e.args.originalEvent});if(e.args.type=="mouse"){if(!c.checkboxes){c.hideListBox();if(c._firstDiv&&c.focusable){c._firstDiv.focus()}}}}}});if(this.listBox){if(this.listBox.content){this.addHandler(this.listBox.content,"click",function(e){if(!c.disabled){if(c.listBox.itemswrapper&&e.target===c.listBox.itemswrapper[0]){return true}c.renderSelection("mouse");if(!c.touch){if(!c.ishiding){if(!c.checkboxes){c.hideListBox();if(c._firstDiv&&c.focusable){c._firstDiv.focus()}}}}if(!c.keyboardSelection){if(c._kbnavigated===false){if(c.tempSelectedIndex!=c.selectedIndex){c._raiseEvent("4",{index:c.selectedIndex,type:"mouse",item:c.getItem(c.selectedIndex)})}c._kbnavigated=true}if(c._oldSelectedInd==undefined){c._oldSelectedIndx=c.selectedIndex}if(c.selectedIndex!=c._oldSelectedIndx){c._raiseEvent("2",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)});c._oldSelectedIndx=c.selectedIndex}}}})}}this.addHandler(this.host,"focus",function(e){if(c.renderMode!=="simple"){c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.addClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"blur",function(){if(c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this._firstDiv,"focus",function(e){if(c.renderMode!=="simple"){c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.addClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this._firstDiv,"blur",function(){if(c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-focus"))}})},removeHandlers:function(){var c=this;var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(this.dropdownlistWrapper,b);if(this.listBox){if(this.listBox.content){this.removeHandler(this.listBox.content,"click")}}this.removeHandler(this.host,"loadContent");this.removeHandler(this.listBoxContainer,"checkChange");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this._firstDiv,"focus");this.removeHandler(this._firstDiv,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(a(document),"mousemove."+c.id)},getItem:function(b){var c=this.listBox.getItem(b);return c},getItemByValue:function(c){var b=this.listBox.getItemByValue(c);return b},selectItem:function(b){if(this.listBox!=undefined){this.listBox.selectItem(b);this.selectedIndex=this.listBox.selectedIndex;this.renderSelection("mouse")}},unselectItem:function(b){if(this.listBox!=undefined){this.listBox.unselectItem(b);this.renderSelection("mouse")}},checkItem:function(b){if(this.listBox!=undefined){this.listBox.checkItem(b)}},uncheckItem:function(b){if(this.listBox!=undefined){this.listBox.uncheckItem(b)}},indeterminateItem:function(b){if(this.listBox!=undefined){this.listBox.indeterminateItem(b)}},renderSelection:function(){if(this.listBox==null){return}if(this.height&&this.height.toString().indexOf("%")!=-1){this._arrange()}var r=this.listBox.visibleItems[this.listBox.selectedIndex];if(this.filterable){if(this.listBox.selectedIndex==-1){for(var e in this.listBox.selectedValues){var l=this.listBox.selectedValues[e];var b=this.listBox.getItemByValue(l);if(b){r=b}}}}var t=this;if(this.checkboxes){var u=this.getCheckedItems();if(u!=null&&u.length>0){r=u[0]}else{r=null}}if(r==null){var j=a('<span unselectable="on" style="color: inherit; border: none; background-color: transparent;"></span>');j.appendTo(a(document.body));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-listitem-state-normal"));j.addClass(this.toThemeProperty("jqx-item"));a.jqx.utilities.html(j,this.placeHolder);var s=this.dropdownlistContent.css("padding-top");var v=this.dropdownlistContent.css("padding-bottom");j.css("padding-top",s);j.css("padding-bottom",v);var q=j.outerHeight();j.remove();j.removeClass();a.jqx.utilities.html(this.dropdownlistContent,j);var g=this.host.height();if(this.height!=null&&this.height!=undefined){if(this.height.toString().indexOf("%")===-1){g=parseInt(this.height)}}var f=parseInt((parseInt(g)-parseInt(q))/2);if(f>0){this.dropdownlistContent.css("margin-top",f+"px");this.dropdownlistContent.css("margin-bottom",f+"px")}if(this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.selectionRenderer(j,-1,"",""));this.dropdownlistContent.css("margin-top","0px");this.dropdownlistContent.css("margin-bottom","0px");this._updateInputSelection()}else{this._updateInputSelection()}this.selectedIndex=this.listBox.selectedIndex;if(this.width==="auto"){this._arrange()}if(this.focusable&&this.isOpened()){this.focus()}return}this.selectedIndex=this.listBox.selectedIndex;var j=a(document.createElement("span"));j[0].setAttribute("unselectable","on");j[0].style.color="inherit";j[0].style.borderWidth="0px";j[0].style.backgroundColor="transparent";j.appendTo(a(document.body));j.addClass(this.toThemeProperty("jqx-widget jqx-listitem-state-normal jqx-item"));var p=false;try{if(r.html!=undefined&&r.html!=null&&r.html.toString().length>0){a.jqx.utilities.html(j,r.html)}else{if(r.label!=undefined&&r.label!=null&&r.label.toString().length>0){a.jqx.utilities.html(j,r.label)}else{if(r.label===null||r.label===""){p=true;a.jqx.utilities.html(j,"")}else{if(r.value!=undefined&&r.value!=null&&r.value.toString().length>0){a.jqx.utilities.html(j,r.value)}else{if(r.title!=undefined&&r.title!=null&&r.title.toString().length>0){a.jqx.utilities.html(j,r.title)}else{if(r.label==""||r.label==null){p=true;a.jqx.utilities.html(j,"")}}}}}}}catch(n){var m=n}var s=this.dropdownlistContent[0].style.paddingTop;var v=this.dropdownlistContent[0].style.paddingBottom;if(s===""){s="0px"}if(v===""){v="0px"}j[0].style.paddingTop=s;j[0].style.paddingBottom=v;var q=j.outerHeight();if(q===0){q=16}if((r.label==""||r.label==null)&&p){a.jqx.utilities.html(j,"")}var c=this.width&&this.width.toString().indexOf("%")<=0;j.remove();j.removeClass();if(this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.selectionRenderer(j,r.index,r.label,r.value));if(this.focusable&&this.isOpened()){this.focus()}}else{if(this.checkboxes){var h=this.getCheckedItems();var k="";for(var o=0;o<h.length;o++){if(o==h.length-1){k+=h[o].label}else{k+=h[o].label+","}}j.text(k);if(c){j.css("max-width",this.host.width()-30)}j.css("overflow","hidden");j.css("display","block");if(!this.rtl){if(c){j.css("width",this.host.width()-30)}}j.css("text-overflow","ellipsis");j.css("padding-bottom",1+parseInt(v));this.dropdownlistContent.html(j);if(this.focusable&&this.isOpened()){this.focus()}}else{var d=this.host.width()-this.arrowSize-3;if(this.width&&this.width!=="auto"){if(c){if(!this.rtl){j.css("max-width",d+"px")}}j[0].style.overflow="hidden";j[0].style.display="block";j[0].style.paddingTop=(1+parseInt(v))+"px";if(!this.rtl){if(c){j[0].style.width=d+"px"}}j[0].style.textOverflow="ellipsis"}this.dropdownlistContent[0].innerHTML=j[0].innerHTML;if(this.focusable&&this.isOpened()){this.focus()}}}var g=this.host.height();if(this.height!=null&&this.height!=undefined){if(this.height.toString().indexOf("%")===-1){g=parseInt(this.height)}}var f=parseInt((parseInt(g)-parseInt(q))/2);if(f>0){this.dropdownlistContent[0].style.marginTop=f+"px";this.dropdownlistContent[0].style.marginBottom=f+"px"}if(this.selectionRenderer){this.dropdownlistContent[0].style.marginTop="0px";this.dropdownlistContent[0].style.marginBottom="0px"}if(this.dropdownlistContent&&this.input){this._updateInputSelection()}if(this.listBox&&this.listBox._activeElement){a.jqx.aria(this,"aria-activedescendant",this.listBox._activeElement.id)}if(this.width==="auto"){this._arrange()}},_updateInputSelection:function(){if(this.input){var c=new Array();if(this.selectedIndex==-1){this.input.val("")}else{var f=this.getSelectedItem();if(f!=null){this.input.val(f.value);c.push(f.value)}else{this.input.val(this.dropdownlistContent.text())}}if(this.checkboxes){var b=this.getCheckedItems();var g="";if(b!=null){for(var d=0;d<b.length;d++){var e=b[d].value;if(e==undefined){continue}if(d==b.length-1){g+=e}else{g+=e+","}c.push(e)}}this.input.val(g)}}if(this.field&&this.input){if(this.field.nodeName.toLowerCase()=="select"){a.each(this.field,function(h,i){a(this).removeAttr("selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(h,i){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}},setContent:function(b){a.jqx.utilities.html(this.dropdownlistContent,b);this._updateInputSelection()},dataBind:function(){this.listBoxContainer.jqxListBox({source:this.source});this.renderSelection("mouse");if(this.source==null){this.clearSelection()}},clear:function(){this.listBoxContainer.jqxListBox({source:null});this.clearSelection()},clearSelection:function(b){this.selectedIndex=-1;this._updateInputSelection();this.listBox.clearSelection();this.renderSelection();if(!this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.placeHolder)}},unselectIndex:function(b,c){if(isNaN(b)){return}this.listBox.unselectIndex(b,c);this.renderSelection()},selectIndex:function(b,d,e,c){this.listBox.selectIndex(b,d,e,c,"api")},getSelectedIndex:function(){return this.selectedIndex},getSelectedItem:function(){return this.listBox.getVisibleItem(this.selectedIndex)},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")},addItem:function(b){return this.listBox.addItem(b)},insertAt:function(c,b){if(c==null){return false}return this.listBox.insertAt(c,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){return this.listBox.disableAt(b)},enableAt:function(b){return this.listBox.enableAt(b)},disableItem:function(b){return this.listBox.disableItem(b)},enableItem:function(b){return this.listBox.enableItem(b)},_findPos:function(c){while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}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+22):0);return f},open:function(){this.showListBox()},close:function(){this.hideListBox()},_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(){a.jqx.aria(this,"aria-expanded",true);if(this.dropDownWidth=="auto"&&this.width!=null&&this.width.indexOf&&(this.width.indexOf("%")!=-1||this.width.indexOf("auto")!=-1)){if(this.listBox.host.width()!=this.host.width()){var c=this.host.width();this.listBoxContainer.jqxListBox({width:c});this.container.width(parseInt(c)+25)}}var p=this;var d=this.listBoxContainer;var j=this.listBox;var m=a(window).scrollTop();var h=a(window).scrollLeft();var k=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var f,g=parseInt(Math.round(this.host.coord(true).left));f=g+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();if(this.listBox==null){return}this.ishiding=false;if(!this.keyboardSelection){this.listBox.selectIndex(this.selectedIndex);this.listBox.ensureVisible(this.selectedIndex)}this.tempSelectedIndex=this.selectedIndex;if(this.autoDropDownHeight){this.container.height(this.listBoxContainer.height()+25)}if((o!=null&&o)){f=a.jqx.mobile.getLeftPos(this.element);k=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){k=parseInt(k)-this._getBodyOffset().top+"px"}if(a("body").css("border-left-width")!="0px"){f=parseInt(f)-this._getBodyOffset().left+"px"}}d.stop();if(this.renderMode!=="simple"){this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-selected"));this.host.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected"))}this.container.css("left",f);this.container.css("top",k);j._arrange();var e=true;var q=false;if(this.dropDownHorizontalAlignment=="right"||this.rtl){var l=this.container.outerWidth();var b=Math.abs(l-this.host.width());if(l>this.host.width()){this.container.css("left",25+parseInt(Math.round(g))-b+"px")}else{this.container.css("left",25+parseInt(Math.round(g))+b+"px")}}if(this.enableBrowserBoundsDetection){var i=this.testOffset(d,{left:parseInt(this.container.css("left")),top:parseInt(k)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=i.top){q=true;d.css("top",23);d.addClass(this.toThemeProperty("jqx-popup-up"))}else{d.css("top",0)}this.container.css("top",i.top);if(parseInt(this.container.css("left"))!=i.left){this.container.css("left",i.left)}}if(this.animationType=="none"){this.container.css("display","block");a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+this.id,d);d.css("margin-top",0);d.css("opacity",1);j._renderItems();p._raiseEvent("0",j)}else{this.container.css("display","block");p.isanimating=true;if(this.animationType=="fade"){d.css("margin-top",0);d.css("opacity",0);d.animate({opacity:1},this.openDelay,function(){a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+p.id,d);p.ishiding=false;p.isanimating=false;j._renderItems();p._raiseEvent("0",j)})}else{d.css("opacity",1);var n=d.outerHeight();if(q){d.css("margin-top",n)}else{d.css("margin-top",-n)}d.animate({"margin-top":0},this.openDelay,function(){a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+p.id,d);p.ishiding=false;p.isanimating=false;j._renderItems();p._raiseEvent("0",j)})}}if(!q){this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded"));d.addClass(this.toThemeProperty("jqx-rc-t-expanded"))}else{this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded"));d.addClass(this.toThemeProperty("jqx-rc-b-expanded"))}if(this.renderMode!=="simple"){d.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-focus"));this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"))}},hideListBox:function(){a.jqx.aria(this,"aria-expanded",false);var f=this.listBoxContainer;var g=this.listBox;var c=this.container;var d=this;a.data(document.body,"openedJQXListBox"+this.id,null);if(this.animationType=="none"){this.container.css("display","none")}else{if(!d.ishiding){f.stop();var b=f.outerHeight();f.css("margin-top",0);d.isanimating=true;var e=-b;if(parseInt(this.container.coord().top)<parseInt(this.host.coord().top)){e=b}if(this.animationType=="fade"){f.css({opacity:1});f.animate({opacity:0},this.closeDelay,function(){c.css("display","none");d.isanimating=false;d.ishiding=false})}else{f.animate({"margin-top":e},this.closeDelay,function(){c.css("display","none");d.isanimating=false;d.ishiding=false})}}}this.ishiding=true;this.host.removeClass(this.toThemeProperty("jqx-dropdownlist-state-selected"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this.arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.host.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.host.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-dropdownlist-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this._raiseEvent("1",g)},closeOpenedListBox:function(e){var d=e.data.me;var b=a(e.target);var c=e.data.listbox;if(c==null){return true}if(a(e.target).ischildof(e.data.me.host)){return true}if(!d.isOpened()){return true}var f=d;var g=false;a.each(b.parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-listbox")!=-1){g=true;return false}if(this.className.indexOf("jqx-dropdownlist")!=-1){if(d.element.id==this.id){g=true}return false}}}});if(c!=null&&!g&&d.isOpened()){d.hideListBox()}return true},clearFilter:function(){this.listBox.clearFilter()},loadFromSelect:function(b){this.listBox.loadFromSelect(b)},refresh:function(b){if(b!==true){this._setSize();this._arrange();if(this.listBox){this.renderSelection()}}},_arrange:function(){var h=this;var d=parseInt(h.host.width());var j=parseInt(h.host.height());var f=h.arrowSize;var g=h.arrowSize;var i=3;var b=d-g-2*i;if(b>0&&h.width!=="auto"){h.dropdownlistContent[0].style.width=b+"px"}else{if(b<=0){h.dropdownlistContent[0].style.width="0px"}}if(h.width==="auto"){h.dropdownlistContent.css("width","auto");d=h.dropdownlistContent.width()+g+2*i;h.host.width(d)}h.dropdownlistContent[0].style.height=j+"px";h.dropdownlistContent[0].style.left="0px";h.dropdownlistContent[0].style.top="0px";h.dropdownlistArrow[0].style.width=g+"px";if(h.width&&h.width.toString().indexOf("%")>=0){var e=(g*100)/d;var c=(b*100)/d;h.dropdownlistArrow[0].style.width=e+"%";h.dropdownlistContent[0].style.width=c+"%"}h.dropdownlistArrow[0].style.height=j+"px";if(h.rtl){h.dropdownlistArrow.css("float","left");h.dropdownlistContent.css("float","right")}},destroy:function(){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.dropdownlistWrapper,"selectstart");this.removeHandler(this.dropdownlistWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBox.content,"click");this.removeHandler(this.listBoxContainer,"bindingComplete");if(this.host.parents()){this.removeHandler(this.host.parents(),"scroll.dropdownlist"+this.element.id)}this.removeHandlers();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.dropdownlistArrow.remove();delete this.dropdownlistArrow;delete this.dropdownlistWrapper;delete this.listBoxContainer;delete this.input;delete this.arrow;delete this.dropdownlistContent;delete this.listBox;delete this._firstDiv;this.container.remove();delete this.container;var b=a.data(this.element,"jqxDropDownList");if(b){delete b.instance}this.host.removeData();this.host.remove();delete this.comboStructure;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 a.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=="filterable"){b.listBoxContainer.jqxListBox({filterable:e})}if(c=="filterHeight"){b.listBoxContainer.jqxListBox({filterHeight:e})}if(c=="filterPlaceHolder"){b.listBoxContainer.jqxListBox({filterPlaceHolder:e})}if(c=="filterDelay"){b.listBoxContainer.jqxListBox({filterDelay:e})}if(c=="enableSelection"){b.listBoxContainer.jqxListBox({enableSelection:e})}if(c=="enableHover"){b.listBoxContainer.jqxListBox({enableHover:e})}if(c=="autoOpen"){b._updateHandlers()}if(c=="emptyString"){b.listBox.emptyString=b.emptyString}if(c=="itemHeight"){b.listBoxContainer.jqxListBox({itemHeight:e})}if(c=="renderer"){b.listBoxContainer.jqxListBox({renderer:e})}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=="source"){b.listBoxContainer.jqxListBox({source:b.source});b.listBox.selectedIndex=-1;b.listBox.selectIndex(this.selectedIndex);b.renderSelection();if(e==null){b.clear()}}if(c=="displayMember"||c=="valueMember"){b.listBoxContainer.jqxListBox({displayMember:b.displayMember,valueMember:b.valueMember});b.renderSelection()}if(c=="placeHolder"){b.renderSelection()}if(c=="theme"&&e!=null){b.listBoxContainer.jqxListBox({theme:e});b.listBoxContainer.addClass(b.toThemeProperty("jqx-popup"));a.jqx.utilities.setTheme(f,e,b.host)}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=="searchMode"){b.listBoxContainer.jqxListBox({searchMode:b.searchMode})}if(c=="incrementalSearch"){b.listBoxContainer.jqxListBox({incrementalSearch:b.incrementalSearch})}if(c=="incrementalSearchDelay"){b.listBoxContainer.jqxListBox({incrementalSearchDelay:b.incrementalSearchDelay})}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=="width"||c=="height"){if(e!=f){this.refresh();if(c=="width"){if(b.dropDownWidth=="auto"){var d=b.host.width();b.listBoxContainer.jqxListBox({width:d});b.container.width(parseInt(d)+25)}}}}if(c=="checkboxes"){b.listBoxContainer.jqxListBox({checkboxes:b.checkboxes})}if(c=="selectedIndex"){if(b.listBox!=null){b.listBox.selectIndex(parseInt(e));b.renderSelection()}}}})})(jqxBaseFramework); | ||
(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="dropdownlistArrow"+q.element.id;q.dropdownlistContent[0].id="dropdownlistContent"+q.element.id;q._addInput();if(q.promptText!="Please Choose:"){q.placeHolder=q.promptText}var n=q.toThemeProperty("jqx-widget")+" "+q.toThemeProperty("jqx-dropdownlist-state-normal")+" "+q.toThemeProperty("jqx-rc-all")+" "+q.toThemeProperty("jqx-fill-state-normal");q.element.className+=" "+n;q._firstDiv=a(q.element.firstChild);try{var p="listBox"+q.id;var h=a(a.find("#"+p));if(h.length>0){h.remove()}a.jqx.aria(q,"aria-owns",p);a.jqx.aria(q,"aria-haspopup",true);var b=a("<div style='overflow: hidden; background-color: transparent; border: none; position: absolute;' id='listBox"+q.id+"'><div id='innerListBox"+q.id+"'></div></div>");b.hide();b.appendTo(document.body);q.container=b;q.listBoxContainer=a(a.find("#innerListBox"+q.id));var d=q.width;if(q.dropDownWidth!="auto"){d=q.dropDownWidth}if(d==null){d=q.host.width();if(d==0){d=q.dropDownWidth}}if(q.dropDownHeight==null){q.dropDownHeight=200}var l=q;q.container.width(parseInt(d)+25);q.container.height(parseInt(q.dropDownHeight)+25);q.addHandler(q.listBoxContainer,"bindingComplete",function(e){if(!q.listBox){q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance}q._raiseEvent("6")});q.listBoxContainer.jqxListBox({filterHeight:q.filterHeight,filterPlaceHolder:q.filterPlaceHolder,filterDelay:q.filterDelay,filterable:q.filterable,allowDrop:false,allowDrag:false,autoBind:q.autoBind,_checkForHiddenParent:false,focusable:q.focusable,touchMode:q.touchMode,checkboxes:q.checkboxes,rtl:q.rtl,emptyString:q.emptyString,itemHeight:q.itemHeight,width:d,searchMode:q.searchMode,incrementalSearch:q.incrementalSearch,incrementalSearchDelay:q.incrementalSearchDelay,groupMember:q.groupMember,searchMember:q.searchMember,displayMember:q.displayMember,valueMember:q.valueMember,height:q.dropDownHeight,autoHeight:q.autoDropDownHeight,scrollBarSize:q.scrollBarSize,selectedIndex:q.selectedIndex,source:q.source,theme:q.theme,rendered:function(){if(q.selectedIndex!=q.listBoxContainer.jqxListBox("selectedIndex")){q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance;q.listBoxContainer.jqxListBox({selectedIndex:q.selectedIndex});q.renderSelection("mouse")}else{q.renderSelection("mouse")}},renderer:q.renderer});q.listBoxContainer.css({position:"absolute",zIndex:q.popupZIndex,top:0,left:0});q.listBox=a.data(q.listBoxContainer[0],"jqxListBox").instance;q.listBox.enableSelection=q.enableSelection;q.listBox.enableHover=q.enableHover;q.listBox.equalItemsWidth=q.equalItemsWidth;q.listBox.selectIndex(q.selectedIndex);q.listBox._arrange();q.listBoxContainer.addClass(q.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){q.listBoxContainer.addClass(q.toThemeProperty("jqx-noshadow"))}q.addHandler(q.listBoxContainer,"unselect",function(e){q._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})});q.addHandler(q.listBoxContainer,"change",function(e){if(e.args){if(e.args.type!="keyboard"){q._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}else{if(e.args.type=="keyboard"){if(!q.isOpened()){q._raiseEvent("4",{index:q.selectedIndex,type:"keyboard",item:q.getItem(q.selectedIndex)})}}}}});if(q.animationType=="none"){q.container.css("display","none")}else{q.container.hide()}}catch(j){}var q=q;q.propertyChangeMap.disabled=function(e,t,s,u){if(u){e.host.addClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.addClass(q.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}else{e.host.removeClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.removeClass(q.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}a.jqx.aria(e,"aria-disabled",e.disabled)};if(q.disabled){q.host.addClass(q.toThemeProperty("jqx-dropdownlist-state-disabled"));q.host.addClass(q.toThemeProperty("jqx-fill-state-disabled"));q.dropdownlistContent.addClass(q.toThemeProperty("jqx-dropdownlist-content-disabled"))}q.arrow.addClass(q.toThemeProperty("jqx-icon-arrow-down"));q.arrow.addClass(q.toThemeProperty("jqx-icon"));if(q.renderMode==="simple"){q.arrow.remove();q.host.removeClass(q.toThemeProperty("jqx-fill-state-normal"));q.host.removeClass(q.toThemeProperty("jqx-rc-all"))}q._updateHandlers();q._setSize();q._arrange();if(q.listBox){q.renderSelection()}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(q.host.parents(".jqx-window").length>0){var m=q.host.parents(".jqx-window").css("z-index");b.css("z-index",m+10);q.listBoxContainer.css("z-index",m+10)}}},resize:function(c,b){this.width=c;this.height=b;this._setSize();this._arrange()},val:function(c){if(!this.dropdownlistContent){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(this.input&&(d(c)||arguments.length==0)){return this.input.val()}var b=this.getItemByValue(c);if(b!=null){this.selectItem(b)}if(this.input){return this.input.val()}},focus:function(){try{var d=this;var c=function(){d.host.focus();if(d._firstDiv){d._firstDiv.focus()}};c();setTimeout(function(){c()},10)}catch(b){}},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}},getItems:function(){if(!this.listBox){return new Array()}return this.listBox.items},getVisibleItems:function(){return this.listBox.getVisibleItems()},_setSize:function(){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 e=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){e=true;this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){e=true;this.host.height(this.height)}var c=this;var d=function(){c._arrange();if(c.dropDownWidth=="auto"){var f=c.host.width();c.listBoxContainer.jqxListBox({width:f});c.container.width(parseInt(f)+25)}};if(e){var b=this.host.width();if(this.dropDownWidth!="auto"){b=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:b});this.container.width(parseInt(b)+25)}a.jqx.utilities.resize(this.host,function(){d()},false,this._checkForHiddenParent)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXListBox"+this.id);if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var c=this;var d=false;this.removeHandlers();if(!this.touch){this.addHandler(this.host,"mouseenter",function(){if(!c.disabled&&c.enableHover&&c.renderMode!=="simple"){d=true;c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-hover"));c.arrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"));c.host.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!c.disabled&&c.enableHover&&c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-hover"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c.arrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"));d=false}})}if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.dropdownlist"+this.element.id,function(e){var f=c.isOpened();if(f){c.close()}})}var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.dropdownlistWrapper,b,function(f){if(!c.disabled){var e=c.container.css("display")=="block";if(!c.isanimating){if(e){c.hideListBox();return false}else{c.showListBox();if(!c.focusable){if(f.preventDefault){f.preventDefault()}}else{c.focus()}}}}});if(c.autoOpen){this.addHandler(this.host,"mouseenter",function(){var e=c.isOpened();if(!e&&c.autoOpen){c.open();c.host.focus()}});a(document).on("mousemove."+c.id,function(h){var g=c.isOpened();if(g&&c.autoOpen){var l=c.host.coord();var k=l.top;var j=l.left;var i=c.container.coord();var e=i.left;var f=i.top;canClose=true;if(h.pageY>=k&&h.pageY<=k+c.host.height()){if(h.pageX>=j&&h.pageX<j+c.host.width()){canClose=false}}if(h.pageY>=f&&h.pageY<=f+c.container.height()){if(h.pageX>=e&&h.pageX<e+c.container.width()){canClose=false}}if(canClose){c.close()}}})}if(this.touch){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,c.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}else{this.addHandler(a(document),"mousedown."+this.id,c.closeOpenedListBox,{me:this,listbox:this.listBox,id:this.id})}this.addHandler(this.host,"keydown",function(f){var e=c.container.css("display")=="block";if(c.host.css("display")=="none"){return true}if(f.keyCode=="13"||f.keyCode=="9"){if(!c.isanimating){if(e){c.renderSelection();if(f.keyCode=="13"&&c.focusable){c._firstDiv.focus()}c.hideListBox();if(!c.keyboardSelection){c._raiseEvent("2",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)})}if(f.keyCode=="13"){c._raiseEvent("4",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)})}}if(e&&f.keyCode!="9"){return false}return true}}if(f.keyCode==115){if(!c.isanimating){if(!c.isOpened()){c.showListBox()}else{if(c.isOpened()){c.hideListBox()}}}return false}if(f.altKey){if(c.host.css("display")=="block"){if(f.keyCode==38){if(c.isOpened()){c.hideListBox();return true}}else{if(f.keyCode==40){if(!c.isOpened()){c.showListBox();return true}}}}}if(f.keyCode=="27"){if(!c.ishiding){if(c.isOpened()){c.hideListBox();if(c.tempSelectedIndex!=undefined){c.selectIndex(c.tempSelectedIndex)}}return true}}if(!c.disabled){c._kbnavigated=c.listBox._handleKeyDown(f);return c._kbnavigated}});this.addHandler(this.listBoxContainer,"checkChange",function(e){c.renderSelection();c._updateInputSelection();c._raiseEvent(5,{label:e.args.label,value:e.args.value,checked:e.args.checked,item:e.args.item})});this.addHandler(this.listBoxContainer,"select",function(e){if(!c.disabled){if(!e.args){return}if(e.args.type=="keyboard"&&!c.isOpened()){c.renderSelection()}if(e.args.type!="keyboard"||c.keyboardSelection){c.renderSelection();c._raiseEvent("2",{index:e.args.index,type:e.args.type,item:e.args.item,originalEvent:e.args.originalEvent});if(e.args.type=="mouse"){if(!c.checkboxes){c.hideListBox();if(c._firstDiv&&c.focusable){c._firstDiv.focus()}}}}}});if(this.listBox){if(this.listBox.content){this.addHandler(this.listBox.content,"click",function(e){if(!c.disabled){if(c.listBox.itemswrapper&&e.target===c.listBox.itemswrapper[0]){return true}c.renderSelection("mouse");if(!c.touch){if(!c.ishiding){if(!c.checkboxes){c.hideListBox();if(c._firstDiv&&c.focusable){c._firstDiv.focus()}}}}if(!c.keyboardSelection){if(c._kbnavigated===false){if(c.tempSelectedIndex!=c.selectedIndex){c._raiseEvent("4",{index:c.selectedIndex,type:"mouse",item:c.getItem(c.selectedIndex)})}c._kbnavigated=true}if(c._oldSelectedInd==undefined){c._oldSelectedIndx=c.selectedIndex}if(c.selectedIndex!=c._oldSelectedIndx){c._raiseEvent("2",{index:c.selectedIndex,type:"keyboard",item:c.getItem(c.selectedIndex)});c._oldSelectedIndx=c.selectedIndex}}}})}}this.addHandler(this.host,"focus",function(e){if(c.renderMode!=="simple"){c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.addClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"blur",function(){if(c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this._firstDiv,"focus",function(e){if(c.renderMode!=="simple"){c.host.addClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.addClass(c.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this._firstDiv,"blur",function(){if(c.renderMode!=="simple"){c.host.removeClass(c.toThemeProperty("jqx-dropdownlist-state-focus"));c.host.removeClass(c.toThemeProperty("jqx-fill-state-focus"))}})},removeHandlers:function(){var c=this;var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(this.dropdownlistWrapper,b);if(this.listBox){if(this.listBox.content){this.removeHandler(this.listBox.content,"click")}}this.removeHandler(this.host,"loadContent");this.removeHandler(this.listBoxContainer,"checkChange");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this._firstDiv,"focus");this.removeHandler(this._firstDiv,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(a(document),"mousemove."+c.id)},getItem:function(b){var c=this.listBox.getItem(b);return c},getItemByValue:function(c){var b=this.listBox.getItemByValue(c);return b},selectItem:function(b){if(this.listBox!=undefined){this.listBox.selectItem(b);this.selectedIndex=this.listBox.selectedIndex;this.renderSelection("mouse")}},unselectItem:function(b){if(this.listBox!=undefined){this.listBox.unselectItem(b);this.renderSelection("mouse")}},checkItem:function(b){if(this.listBox!=undefined){this.listBox.checkItem(b)}},uncheckItem:function(b){if(this.listBox!=undefined){this.listBox.uncheckItem(b)}},indeterminateItem:function(b){if(this.listBox!=undefined){this.listBox.indeterminateItem(b)}},renderSelection:function(){if(this.listBox==null){return}if(this.height&&this.height.toString().indexOf("%")!=-1){this._arrange()}var r=this.listBox.visibleItems[this.listBox.selectedIndex];if(this.filterable){if(this.listBox.selectedIndex==-1){for(var e in this.listBox.selectedValues){var l=this.listBox.selectedValues[e];var b=this.listBox.getItemByValue(l);if(b){r=b}}}}var u=this;if(this.checkboxes){var v=this.getCheckedItems();if(v!=null&&v.length>0){r=v[0]}else{r=null}}if(r==null){var j=a('<span unselectable="on" style="color: inherit; border: none; background-color: transparent;"></span>');j.appendTo(a(document.body));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-listitem-state-normal"));j.addClass(this.toThemeProperty("jqx-item"));a.jqx.utilities.html(j,this.placeHolder);var s=this.dropdownlistContent.css("padding-top");var x=this.dropdownlistContent.css("padding-bottom");j.css("padding-top",s);j.css("padding-bottom",x);var q=j.outerHeight();j.remove();j.removeClass();a.jqx.utilities.html(this.dropdownlistContent,j);var h=this.host.height();if(this.height!=null&&this.height!=undefined){if(this.height.toString().indexOf("%")===-1){h=parseInt(this.height)}}var f=parseInt((parseInt(h)-parseInt(q))/2);if(f>0){this.dropdownlistContent.css("margin-top",f+"px");this.dropdownlistContent.css("margin-bottom",f+"px")}if(this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.selectionRenderer(j,-1,"",""));this.dropdownlistContent.css("margin-top","0px");this.dropdownlistContent.css("margin-bottom","0px");this._updateInputSelection()}else{this._updateInputSelection()}this.selectedIndex=this.listBox.selectedIndex;if(this.width==="auto"){this._arrange()}if(this.focusable&&this.isOpened()){this.focus()}return}this.selectedIndex=this.listBox.selectedIndex;var j=a(document.createElement("span"));j[0].setAttribute("unselectable","on");try{j[0].style.color="inherit"}catch(t){}j[0].style.borderWidth="0px";j[0].style.backgroundColor="transparent";j.appendTo(a(document.body));j.addClass(this.toThemeProperty("jqx-widget jqx-listitem-state-normal jqx-item"));var p=false;try{if(r.html!=undefined&&r.html!=null&&r.html.toString().length>0){a.jqx.utilities.html(j,r.html)}else{if(r.label!=undefined&&r.label!=null&&r.label.toString().length>0){a.jqx.utilities.html(j,r.label)}else{if(r.label===null||r.label===""){p=true;a.jqx.utilities.html(j,"")}else{if(r.value!=undefined&&r.value!=null&&r.value.toString().length>0){a.jqx.utilities.html(j,r.value)}else{if(r.title!=undefined&&r.title!=null&&r.title.toString().length>0){a.jqx.utilities.html(j,r.title)}else{if(r.label==""||r.label==null){p=true;a.jqx.utilities.html(j,"")}}}}}}}catch(n){var m=n}var s=this.dropdownlistContent[0].style.paddingTop;var x=this.dropdownlistContent[0].style.paddingBottom;if(s===""){s="0px"}if(x===""){x="0px"}j[0].style.paddingTop=s;j[0].style.paddingBottom=x;var q=j.outerHeight();if(q===0){q=16}if((r.label==""||r.label==null)&&p){a.jqx.utilities.html(j,"")}var c=this.width&&this.width.toString().indexOf("%")<=0;j.remove();j.removeClass();if(this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.selectionRenderer(j,r.index,r.label,r.value));if(this.focusable&&this.isOpened()){this.focus()}}else{if(this.checkboxes){var g=this.getCheckedItems();var k="";for(var o=0;o<g.length;o++){if(o==g.length-1){k+=g[o].label}else{k+=g[o].label+","}}j.text(k);if(c){j.css("max-width",this.host.width()-30)}j.css("overflow","hidden");j.css("display","block");if(!this.rtl){if(c){j.css("width",this.host.width()-30)}}j.css("text-overflow","ellipsis");j.css("padding-bottom",1+parseInt(x));this.dropdownlistContent.html(j);if(this.focusable&&this.isOpened()){this.focus()}}else{var d=this.host.width()-this.arrowSize-3;if(this.width&&this.width!=="auto"){if(c){if(!this.rtl){j.css("max-width",d+"px")}}j[0].style.overflow="hidden";j[0].style.display="block";j[0].style.paddingTop=(1+parseInt(x))+"px";if(!this.rtl){if(c){j[0].style.width=d+"px"}}j[0].style.textOverflow="ellipsis"}this.dropdownlistContent[0].innerHTML=j[0].innerHTML;if(this.focusable&&this.isOpened()){this.focus()}}}var h=this.host.height();if(this.height!=null&&this.height!=undefined){if(this.height.toString().indexOf("%")===-1){h=parseInt(this.height)}}var f=parseInt((parseInt(h)-parseInt(q))/2);if(f>0){this.dropdownlistContent[0].style.marginTop=f+"px";this.dropdownlistContent[0].style.marginBottom=f+"px"}if(this.selectionRenderer){this.dropdownlistContent[0].style.marginTop="0px";this.dropdownlistContent[0].style.marginBottom="0px"}if(this.dropdownlistContent&&this.input){this._updateInputSelection()}if(this.listBox&&this.listBox._activeElement){a.jqx.aria(this,"aria-activedescendant",this.listBox._activeElement.id)}if(this.width==="auto"){this._arrange()}},_updateInputSelection:function(){if(this.input){var c=new Array();if(this.selectedIndex==-1){this.input.val("")}else{var f=this.getSelectedItem();if(f!=null){this.input.val(f.value);c.push(f.value)}else{this.input.val(this.dropdownlistContent.text())}}if(this.checkboxes){var b=this.getCheckedItems();var g="";if(b!=null){for(var d=0;d<b.length;d++){var e=b[d].value;if(e==undefined){continue}if(d==b.length-1){g+=e}else{g+=e+","}c.push(e)}}this.input.val(g)}}if(this.field&&this.input){if(this.field.nodeName.toLowerCase()=="select"){a.each(this.field,function(h,i){a(this).removeAttr("selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(h,i){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}},setContent:function(b){a.jqx.utilities.html(this.dropdownlistContent,b);this._updateInputSelection()},dataBind:function(){this.listBoxContainer.jqxListBox({source:this.source});this.renderSelection("mouse");if(this.source==null){this.clearSelection()}},clear:function(){this.listBoxContainer.jqxListBox({source:null});this.clearSelection()},clearSelection:function(b){this.selectedIndex=-1;this._updateInputSelection();this.listBox.clearSelection();this.renderSelection();if(!this.selectionRenderer){a.jqx.utilities.html(this.dropdownlistContent,this.placeHolder)}},unselectIndex:function(b,c){if(isNaN(b)){return}this.listBox.unselectIndex(b,c);this.renderSelection()},selectIndex:function(b,d,e,c){this.listBox.selectIndex(b,d,e,c,"api")},getSelectedIndex:function(){return this.selectedIndex},getSelectedItem:function(){return this.listBox.getVisibleItem(this.selectedIndex)},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")},addItem:function(b){return this.listBox.addItem(b)},insertAt:function(c,b){if(c==null){return false}return this.listBox.insertAt(c,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){return this.listBox.disableAt(b)},enableAt:function(b){return this.listBox.enableAt(b)},disableItem:function(b){return this.listBox.disableItem(b)},enableItem:function(b){return this.listBox.enableItem(b)},_findPos:function(c){while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}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+22):0);return f},open:function(){this.showListBox()},close:function(){this.hideListBox()},_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(){a.jqx.aria(this,"aria-expanded",true);if(this.dropDownWidth=="auto"&&this.width!=null&&this.width.indexOf&&(this.width.indexOf("%")!=-1||this.width.indexOf("auto")!=-1)){if(this.listBox.host.width()!=this.host.width()){var c=this.host.width();this.listBoxContainer.jqxListBox({width:c});this.container.width(parseInt(c)+25)}}var p=this;var d=this.listBoxContainer;var j=this.listBox;var m=a(window).scrollTop();var h=a(window).scrollLeft();var k=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var f,g=parseInt(Math.round(this.host.coord(true).left));f=g+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();if(this.listBox==null){return}this.ishiding=false;if(!this.keyboardSelection){this.listBox.selectIndex(this.selectedIndex);this.listBox.ensureVisible(this.selectedIndex)}this.tempSelectedIndex=this.selectedIndex;if(this.autoDropDownHeight){this.container.height(this.listBoxContainer.height()+25)}if((o!=null&&o)){f=a.jqx.mobile.getLeftPos(this.element);k=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){k=parseInt(k)-this._getBodyOffset().top+"px"}if(a("body").css("border-left-width")!="0px"){f=parseInt(f)-this._getBodyOffset().left+"px"}}d.stop();if(this.renderMode!=="simple"){this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-selected"));this.host.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected"))}this.container.css("left",f);this.container.css("top",k);j._arrange();var e=true;var q=false;if(this.dropDownHorizontalAlignment=="right"||this.rtl){var l=this.container.outerWidth();var b=Math.abs(l-this.host.width());if(l>this.host.width()){this.container.css("left",25+parseInt(Math.round(g))-b+"px")}else{this.container.css("left",25+parseInt(Math.round(g))+b+"px")}}if(this.enableBrowserBoundsDetection){var i=this.testOffset(d,{left:parseInt(this.container.css("left")),top:parseInt(k)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=i.top){q=true;d.css("top",23);d.addClass(this.toThemeProperty("jqx-popup-up"))}else{d.css("top",0)}this.container.css("top",i.top);if(parseInt(this.container.css("left"))!=i.left){this.container.css("left",i.left)}}if(this.animationType=="none"){this.container.css("display","block");a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+this.id,d);d.css("margin-top",0);d.css("opacity",1);j._renderItems();p._raiseEvent("0",j)}else{this.container.css("display","block");p.isanimating=true;if(this.animationType=="fade"){d.css("margin-top",0);d.css("opacity",0);d.animate({opacity:1},this.openDelay,function(){a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+p.id,d);p.ishiding=false;p.isanimating=false;j._renderItems();p._raiseEvent("0",j)})}else{d.css("opacity",1);var n=d.outerHeight();if(q){d.css("margin-top",n)}else{d.css("margin-top",-n)}d.animate({"margin-top":0},this.openDelay,function(){a.data(document.body,"openedJQXListBoxParent",p);a.data(document.body,"openedJQXListBox"+p.id,d);p.ishiding=false;p.isanimating=false;j._renderItems();p._raiseEvent("0",j)})}}if(!q){this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded"));d.addClass(this.toThemeProperty("jqx-rc-t-expanded"))}else{this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded"));d.addClass(this.toThemeProperty("jqx-rc-b-expanded"))}if(this.renderMode!=="simple"){d.addClass(this.toThemeProperty("jqx-fill-state-focus"));this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-focus"));this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"))}},hideListBox:function(){a.jqx.aria(this,"aria-expanded",false);var f=this.listBoxContainer;var g=this.listBox;var c=this.container;var d=this;a.data(document.body,"openedJQXListBox"+this.id,null);if(this.animationType=="none"){this.container.css("display","none")}else{if(!d.ishiding){f.stop();var b=f.outerHeight();f.css("margin-top",0);d.isanimating=true;var e=-b;if(parseInt(this.container.coord().top)<parseInt(this.host.coord().top)){e=b}if(this.animationType=="fade"){f.css({opacity:1});f.animate({opacity:0},this.closeDelay,function(){c.css("display","none");d.isanimating=false;d.ishiding=false})}else{f.animate({"margin-top":e},this.closeDelay,function(){c.css("display","none");d.isanimating=false;d.ishiding=false})}}}this.ishiding=true;this.host.removeClass(this.toThemeProperty("jqx-dropdownlist-state-selected"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this.arrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));this.host.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));this.host.removeClass(this.toThemeProperty("jqx-rc-t-expanded"));f.removeClass(this.toThemeProperty("jqx-rc-b-expanded"));f.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-dropdownlist-state-focus"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-focus"));this._raiseEvent("1",g)},closeOpenedListBox:function(e){var d=e.data.me;var b=a(e.target);var c=e.data.listbox;if(c==null){return true}if(a(e.target).ischildof(e.data.me.host)){return true}if(!d.isOpened()){return true}var f=d;var g=false;a.each(b.parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-listbox")!=-1){g=true;return false}if(this.className.indexOf("jqx-dropdownlist")!=-1){if(d.element.id==this.id){g=true}return false}}}});if(c!=null&&!g&&d.isOpened()){d.hideListBox()}return true},clearFilter:function(){this.listBox.clearFilter()},loadFromSelect:function(b){this.listBox.loadFromSelect(b)},refresh:function(b){if(b!==true){this._setSize();this._arrange();if(this.listBox){this.renderSelection()}}},_arrange:function(){var h=this;var d=parseInt(h.host.width());var j=parseInt(h.host.height());var f=h.arrowSize;var g=h.arrowSize;var i=3;var b=d-g-2*i;if(b>0&&h.width!=="auto"){h.dropdownlistContent[0].style.width=b+"px"}else{if(b<=0){h.dropdownlistContent[0].style.width="0px"}}if(h.width==="auto"){h.dropdownlistContent.css("width","auto");d=h.dropdownlistContent.width()+g+2*i;h.host.width(d)}h.dropdownlistContent[0].style.height=j+"px";h.dropdownlistContent[0].style.left="0px";h.dropdownlistContent[0].style.top="0px";h.dropdownlistArrow[0].style.width=g+"px";if(h.width&&h.width.toString().indexOf("%")>=0){var e=(g*100)/d;var c=(b*100)/d;h.dropdownlistArrow[0].style.width=e+"%";h.dropdownlistContent[0].style.width=c+"%"}h.dropdownlistArrow[0].style.height=j+"px";if(h.rtl){h.dropdownlistArrow.css("float","left");h.dropdownlistContent.css("float","right")}},destroy:function(){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.dropdownlistWrapper,"selectstart");this.removeHandler(this.dropdownlistWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBox.content,"click");this.removeHandler(this.listBoxContainer,"bindingComplete");if(this.host.parents()){this.removeHandler(this.host.parents(),"scroll.dropdownlist"+this.element.id)}this.removeHandlers();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.dropdownlistArrow.remove();delete this.dropdownlistArrow;delete this.dropdownlistWrapper;delete this.listBoxContainer;delete this.input;delete this.arrow;delete this.dropdownlistContent;delete this.listBox;delete this._firstDiv;this.container.remove();delete this.container;var b=a.data(this.element,"jqxDropDownList");if(b){delete b.instance}this.host.removeData();this.host.remove();delete this.comboStructure;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 a.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=="filterable"){b.listBoxContainer.jqxListBox({filterable:e})}if(c=="filterHeight"){b.listBoxContainer.jqxListBox({filterHeight:e})}if(c=="filterPlaceHolder"){b.listBoxContainer.jqxListBox({filterPlaceHolder:e})}if(c=="filterDelay"){b.listBoxContainer.jqxListBox({filterDelay:e})}if(c=="enableSelection"){b.listBoxContainer.jqxListBox({enableSelection:e})}if(c=="enableHover"){b.listBoxContainer.jqxListBox({enableHover:e})}if(c=="autoOpen"){b._updateHandlers()}if(c=="emptyString"){b.listBox.emptyString=b.emptyString}if(c=="itemHeight"){b.listBoxContainer.jqxListBox({itemHeight:e})}if(c=="renderer"){b.listBoxContainer.jqxListBox({renderer:e})}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=="source"){b.listBoxContainer.jqxListBox({source:b.source});b.listBox.selectedIndex=-1;b.listBox.selectIndex(this.selectedIndex);b.renderSelection();if(e==null){b.clear()}}if(c=="displayMember"||c=="valueMember"){b.listBoxContainer.jqxListBox({displayMember:b.displayMember,valueMember:b.valueMember});b.renderSelection()}if(c=="placeHolder"){b.renderSelection()}if(c=="theme"&&e!=null){b.listBoxContainer.jqxListBox({theme:e});b.listBoxContainer.addClass(b.toThemeProperty("jqx-popup"));a.jqx.utilities.setTheme(f,e,b.host)}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=="searchMode"){b.listBoxContainer.jqxListBox({searchMode:b.searchMode})}if(c=="incrementalSearch"){b.listBoxContainer.jqxListBox({incrementalSearch:b.incrementalSearch})}if(c=="incrementalSearchDelay"){b.listBoxContainer.jqxListBox({incrementalSearchDelay:b.incrementalSearchDelay})}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=="width"||c=="height"){if(e!=f){this.refresh();if(c=="width"){if(b.dropDownWidth=="auto"){var d=b.host.width();b.listBoxContainer.jqxListBox({width:d});b.container.width(parseInt(d)+25)}}}}if(c=="checkboxes"){b.listBoxContainer.jqxListBox({checkboxes:b.checkboxes})}if(c=="selectedIndex"){if(b.listBox!=null){b.listBox.selectIndex(parseInt(e));b.renderSelection()}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxFileUpload","",{});a.extend(a.jqx._jqxFileUpload.prototype,{defineInstance:function(){var b={width:null,height:"auto",uploadUrl:"",fileInputName:"",autoUpload:false,multipleFilesUpload:true,accept:null,browseTemplate:"",uploadTemplate:"",cancelTemplate:"",localization:null,renderFiles:null,disabled:false,rtl:false,events:["select","remove","uploadStart","uploadEnd"]};a.extend(true,this,b)},createInstance:function(){var b=this;if(b.host.jqxButton===undefined){throw new Error("jqxFileUpload: Missing reference to jqxbuttons.js")}if(a.jqx.browser.msie){if(a.jqx.browser.version<10){b._ieOldWebkit=true;if(a.jqx.browser.version<8){b._ie7=true}}}else{if(a.jqx.browser.webkit){b._ieOldWebkit=true}}b._fluidWidth=typeof b.width==="string"&&b.width.charAt(b.width.length-1)==="%";b._fluidHeight=typeof b.height==="string"&&b.height.charAt(b.height.length-1)==="%";b._render(true)},_render:function(b){var c=this;c._setSize();c._addClasses();if(b===true){c._appendElements()}else{c._removeHandlers()}c._addHandlers();if(c._ie7){c._borderAndPadding("width",c.host);if(c.height!=="auto"){c._borderAndPadding("height",c.host)}}a.jqx.utilities.resize(c.host,null,true);a.jqx.utilities.resize(c.host,function(){if(c._fluidWidth){if(c._ie7){c.host.css("width",c.width);c._borderAndPadding("width",c.host)}for(var f=0;f<c._fileRows.length;f++){var d=c._fileRows[f];var h=d.fileRow;if(c._ie7){h.css("width","100%");c._borderAndPadding("width",h)}if(!c.renderFiles){c._setMaxWidth(d)}}if(c.rtl&&c._ieOldWebkit){for(var e=0;e<c._forms.length;e++){var g=c._browseButton.position();c._forms[e].form.css({left:g.left,top:g.top})}}}if(c._ie7&&c._fluidHeight){c.host.css("height",c.height);c._borderAndPadding("height",c.host)}})},render:function(){this._render(false)},refresh:function(b){if(b!==true){this._render(false)}},destroy:function(){var b=this;b.cancelAll();b._removeHandlers(true);b.host.remove()},browse:function(){if(a.jqx.browser.msie&&a.jqx.browser.version<10){return}var b=this;if(b.multipleFilesUpload===true||(b.multipleFilesUpload===false&&b._fileRows.length===0)){b._forms[b._forms.length-1].fileInput.click()}},_uploadFile:function(b){var c=this;if(c._uploadQueue.length===0){c._uploadQueue.push(b)}if(!c.renderFiles){b.uploadFile.add(b.cancelFile).hide();b.loadingElement.show()}b.fileInput.attr("name",c.fileInputName);c._raiseEvent("2",{file:b.fileName});b.form[0].submit();c._fileObjectToRemove=b},uploadFile:function(b){var c=this;c._uploadFile(c._fileRows[b])},uploadAll:function(){var c=this;if(c._fileRows.length>0){for(var b=c._fileRows.length-1;b>=0;b--){c._uploadQueue.push(c._fileRows[b])}c._uploadFile(c._fileRows[0])}},cancelFile:function(b){var c=this;c._removeSingleFileRow(c._fileRows[b])},cancelAll:function(){var c=this;if(c._fileRows.length>0){for(var b=0;b<c._fileRows.length;b++){c._removeFileRow(c._fileRows[b])}setTimeout(function(){c._browseButton.css("margin-bottom",0)},400);c._fileRows.length=0;c._hideButtons(true)}},propertyChangedHandler:function(e,m,c,k){var b=e.element.id;if(m==="localization"){if(k.browseButton&&(!c||k.browseButton!==c.browseButton)){e._browseButton.text(k.browseButton);e._browseButton.jqxButton({width:"auto"})}if(k.uploadButton&&(!c||k.uploadButton!==c.uploadButton)){e._uploadButton.text(k.uploadButton);e._uploadButton.jqxButton({width:"auto"})}if(k.cancelButton&&(!c||k.cancelButton!==c.cancelButton)){e._cancelButton.text(k.cancelButton);e._cancelButton.jqxButton({width:"auto"})}if(!e.renderFiles){if(k.uploadFileTooltip&&(!c||k.uploadFileTooltip!==c.uploadFileTooltip)){a("#"+b+" .jqx-file-upload-file-upload").attr("title",k.uploadFileTooltip)}if(k.uploadFileTooltip&&(!c||k.cancelFileTooltip!==c.cancelFileTooltip)){a("#"+b+" .jqx-file-upload-file-cancel").attr("title",k.cancelFileTooltip)}}return}if(k!==c){switch(m){case"width":e.host.css("width",k);if(e._ie7){e._borderAndPadding("width",e.host);for(var d=0;d<e._fileRows.length;d++){var n=e._fileRows[d].fileRow;n.css("width","100%");e._borderAndPadding("width",n)}}e._fluidWidth=typeof k==="string"&&k.charAt(k.length-1)==="%";return;case"height":e.host.css("height",k);if(e._ie7){e._borderAndPadding("height",e.host)}e._fluidHeight=typeof k==="string"&&k.charAt(k-1)==="%";return;case"uploadUrl":for(var g=0;g<e._forms.length;g++){e._forms[g].form.attr("action",k)}return;case"accept":for(var f=0;f<e._forms.length;f++){e._forms[f].fileInput.attr("accept",k)}return;case"theme":a.jqx.utilities.setTheme(c,k,e.host);e._browseButton.jqxButton({theme:k});e._uploadButton.jqxButton({theme:k});e._cancelButton.jqxButton({theme:k});return;case"browseTemplate":e._browseButton.jqxButton({template:k});return;case"uploadTemplate":e._uploadButton.jqxButton({template:k});return;case"cancelTemplate":e._cancelButton.jqxButton({template:k});return;case"disabled":e._browseButton.jqxButton({disabled:k});e._uploadButton.jqxButton({disabled:k});e._cancelButton.jqxButton({disabled:k});if(k===true){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}return;case"rtl":var h=function(l){var o=l?"addClass":"removeClass";e._browseButton[o](e.toThemeProperty("jqx-file-upload-button-browse-rtl"));e._cancelButton[o](e.toThemeProperty("jqx-file-upload-button-cancel-rtl"));e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}for(var i=0;i<e._fileRows.length;i++){var j=e._fileRows[i];j.fileNameContainer[o](e.toThemeProperty("jqx-file-upload-file-name-rtl"));j.cancelFile[o](e.toThemeProperty("jqx-file-upload-file-cancel-rtl"));j.uploadFile[o](e.toThemeProperty("jqx-file-upload-file-upload-rtl"));j.loadingElement[o](e.toThemeProperty("jqx-file-upload-loading-element-rtl"))}};h(k);return}}},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b=this.host.trigger(e);return b},_setSize:function(){var b=this;b.host.css("width",b.width);b.host.css("height",b.height)},_borderAndPadding:function(d,c){var b;if(d==="width"){b=parseInt(c.css("border-left-width"),10)+parseInt(c.css("border-right-width"),10)+parseInt(c.css("padding-left"),10)+parseInt(c.css("padding-right"),10)}else{b=parseInt(c.css("border-top-width"),10)+parseInt(c.css("border-bottom-width"),10)+parseInt(c.css("padding-top"),10)+parseInt(c.css("padding-bottom"),10)}c.css(d,c[d]()-b)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-widget jqx-widget-content jqx-rc-all jqx-file-upload"));if(b.disabled===true){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}},_appendElements:function(){var g=this,c="Browse",b=90,h="Upload All",e=90,d="Cancel All",f=90;var i=g.element.id;if(g.localization){if(g.localization.browseButton){c=g.localization.browseButton;b="auto"}if(g.localization.uploadButton){h=g.localization.uploadButton;e="auto"}if(g.localization.cancelButton){d=g.localization.cancelButton;f="auto"}}g._browseButton=a('<button id="'+i+'BrowseButton" class="'+g.toThemeProperty("jqx-file-upload-button-browse")+'">'+c+"</button>");g.host.append(g._browseButton);g._browseButton.jqxButton({theme:g.theme,width:b,template:g.browseTemplate,disabled:g.disabled});g._browseButton.after('<div style="clear: both;"></div>');g._bottomButtonsContainer=a('<div class="'+g.toThemeProperty("jqx-file-upload-buttons-container")+'"></div>');g.host.append(g._bottomButtonsContainer);g._uploadButton=a('<button id="'+i+'UploadButton" class="'+g.toThemeProperty("jqx-file-upload-button-upload")+'">'+h+"</button>");g._bottomButtonsContainer.append(g._uploadButton);g._uploadButton.jqxButton({theme:g.theme,width:e,template:g.uploadTemplate,disabled:g.disabled});g._cancelButton=a('<button id="'+i+'CancelButton" class="'+g.toThemeProperty("jqx-file-upload-button-cancel")+'">'+d+"</button>");g._bottomButtonsContainer.append(g._cancelButton);g._cancelButton.jqxButton({theme:g.theme,width:f,template:g.cancelTemplate,disabled:g.disabled});g._bottomButtonsContainer.after('<div style="clear: both;"></div>');if(g.rtl){g._browseButton.addClass(g.toThemeProperty("jqx-file-upload-button-browse-rtl"));g._cancelButton.addClass(g.toThemeProperty("jqx-file-upload-button-cancel-rtl"));g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}}g._uploadIframe=a('<iframe name="'+i+'Iframe" class="'+g.toThemeProperty("jqx-file-upload-iframe")+'" src=""></iframe>');g.host.append(g._uploadIframe);g._iframeInitialized=false;g._uploadQueue=[];g._forms=[];g._addFormAndFileInput();g._fileRows=[]},_addFormAndFileInput:function(){var f=this;var i=f.element.id;var e=a('<form class="'+f.toThemeProperty("jqx-file-upload-form")+'" action="'+f.uploadUrl+'" target="'+i+'Iframe" method="post" enctype="multipart/form-data"></form>');f.host.append(e);var d=a('<input type="file" class="'+f.toThemeProperty("jqx-file-upload-file-input")+'" />');if(f.accept){d.attr("accept",f.accept)}e.append(d);if(f._ieOldWebkit){var c=f._browseButton.position();var g=f._browseButton.outerWidth();var h=f._browseButton.outerHeight();var b=f.rtl&&f._ie7?12:0;e.css({left:c.left-b,top:c.top,width:g,height:h});e.addClass(f.toThemeProperty("jqx-file-upload-form-ie9"));d.addClass(f.toThemeProperty("jqx-file-upload-file-input-ie9"));f.addHandler(e,"mouseenter.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mouseleave.jqxFileUpload"+i,function(){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mousedown.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-pressed"))});f.addHandler(a(document),"mouseup.jqxFileUpload"+i,function(){if(f._browseButton.hasClass("jqx-fill-state-pressed")){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-pressed"))}})}f.addHandler(d,"change.jqxFileUpload"+i,function(){var k=this.value;if(!a.jqx.browser.mozilla){if(k.indexOf("fakepath")!==-1){k=k.slice(12)}else{k=k.slice(k.lastIndexOf("\\")+1)}}var j=f._addFileRow(k,e,d);if(f._fileRows.length===1){f._browseButton.css("margin-bottom","10px");f._hideButtons(false)}if(f._ieOldWebkit){f.removeHandler(e,"mouseenter.jqxFileUpload"+i);f.removeHandler(e,"mouseleave.jqxFileUpload"+i);f.removeHandler(e,"mousedown.jqxFileUpload"+i)}f._addFormAndFileInput();f.removeHandler(d,"change.jqxFileUpload"+i);if(f.autoUpload===true){f._uploadFile(j)}});f._forms.push({form:e,fileInput:d})},_addFileRow:function(e,b,d){var g=this,k,f,l,i,m,h="Cancel",j="Upload File";k=a('<div class="'+g.toThemeProperty("jqx-widget-content jqx-rc-all jqx-file-upload-file-row")+'"></div>');if(g._fileRows.length===0){g._browseButton.after(k)}else{g._fileRows[g._fileRows.length-1].fileRow.after(k)}if(!g.renderFiles){f=a('<div class="'+g.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-name")+'">'+e+"</div>");k.append(f);if(g.localization){if(g.localization.cancelFileTooltip){h=g.localization.cancelFileTooltip}if(g.localization.uploadFileTooltip){j=g.localization.uploadFileTooltip}}i=a('<div class="'+g.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-cancel")+'" title="'+h+'"><div class="'+g.toThemeProperty("jqx-icon-close jqx-file-upload-icon")+'"></div></div>');k.append(i);m=a('<div class="'+g.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-upload")+'" title="'+j+'"><div class="'+g.toThemeProperty("jqx-icon-arrow-up jqx-file-upload-icon jqx-file-upload-icon-upload")+'"></div></div>');k.append(m);l=a('<div class="'+g.toThemeProperty("jqx-file-upload-loading-element")+'"></div>');k.append(l);if(g.rtl){f.addClass(g.toThemeProperty("jqx-file-upload-file-name-rtl"));i.addClass(g.toThemeProperty("jqx-file-upload-file-cancel-rtl"));m.addClass(g.toThemeProperty("jqx-file-upload-file-upload-rtl"));l.addClass(g.toThemeProperty("jqx-file-upload-loading-element-rtl"))}g._setMaxWidth({fileNameContainer:f,uploadFile:m,cancelFile:i})}else{k.html(g.renderFiles(e))}if(g._ie7){g._borderAndPadding("width",k);g._borderAndPadding("height",k);if(!g.renderFiles){g._borderAndPadding("height",f);g._borderAndPadding("height",m);g._borderAndPadding("height",i)}}var c={fileRow:k,fileNameContainer:f,fileName:e,uploadFile:m,cancelFile:i,loadingElement:l,form:b,fileInput:d,index:g._fileRows.length};g._addFileHandlers(c);g._fileRows.push(c);g._raiseEvent("0",{file:e});return c},_setMaxWidth:function(c){var e=this;var f=c.cancelFile.outerWidth(true)+c.uploadFile.outerWidth(true);var b=e._ie7?6:0;var d=e.host.width()-parseInt(e.host.css("padding-left"),10)-parseInt(e.host.css("padding-right"),10)-f-b-7;c.fileNameContainer.css("max-width",d)},_addFileHandlers:function(b){var c=this;if(!c.renderFiles){var d=c.element.id;c.addHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._uploadFile(b)}});c.addHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._removeSingleFileRow(b)}})}},_removeSingleFileRow:function(c){var d=this;d._removeFileRow(c);d._fileRows.splice(c.index,1);if(d._fileRows.length===0){setTimeout(function(){d._browseButton.css("margin-bottom",0)},400);d._hideButtons(true)}else{for(var b=0;b<d._fileRows.length;b++){d._fileRows[b].index=b}}},_removeFileRow:function(b){var c=this;var d=c.element.id;if(!c.renderFiles){c.removeHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"click.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"click.jqxFileUpload"+d)}b.fileRow.fadeOut(function(){b.fileRow.remove();b.form.remove()});c._raiseEvent("1",{file:b.fileName})},_hideButtons:function(b){var c=this;if(b===true){c._bottomButtonsContainer.fadeOut()}else{c._bottomButtonsContainer.fadeIn()}},_addHandlers:function(){var b=this;var c=b.element.id;if(!b._ieOldWebkit){b.addHandler(b._browseButton,"click.jqxFileUpload"+c,function(){b.browse()})}b.addHandler(b._uploadButton,"click.jqxFileUpload"+c,function(){b.uploadAll()});b.addHandler(b._cancelButton,"click.jqxFileUpload"+c,function(){b.cancelAll()});b.addHandler(b._uploadIframe,"load.jqxFileUpload"+c,function(){if(a.jqx.browser.chrome||a.jqx.browser.webkit){b._iframeInitialized=true}if(b._iframeInitialized===false){b._iframeInitialized=true}else{var d=b._uploadIframe.contents().find("body").html();b._raiseEvent("3",{file:b._uploadQueue[b._uploadQueue.length-1].fileName,response:d});if(b._fileObjectToRemove){b._removeSingleFileRow(b._fileObjectToRemove);b._fileObjectToRemove=null}b._uploadQueue.pop();if(b._uploadQueue.length>0){b._uploadFile(b._uploadQueue[b._uploadQueue.length-1])}}})},_removeHandlers:function(b){var d=this;var e=d.element.id;d.removeHandler(d._browseButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadButton,"click.jqxFileUpload"+e);d.removeHandler(d._cancelButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadIframe,"load.jqxFileUpload"+e);if(b===true){var c=d._forms[d._forms.length-1];d.removeHandler(c.fileInput,"change.jqxFileUpload"+e);if(d._ieOldWebkit){d.removeHandler(c.form,"mouseenter.jqxFileUpload"+e);d.removeHandler(c.form,"mouseleave.jqxFileUpload"+e);d.removeHandler(c.form,"mousedown.jqxFileUpload"+e);d.removeHandler(a("body"),"mouseup.jqxFileUpload"+e)}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxFileUpload","",{});a.extend(a.jqx._jqxFileUpload.prototype,{defineInstance:function(){var b={width:null,height:"auto",uploadUrl:"",fileInputName:"",autoUpload:false,multipleFilesUpload:true,accept:null,browseTemplate:"",uploadTemplate:"",cancelTemplate:"",localization:null,renderFiles:null,disabled:false,rtl:false,events:["select","remove","uploadStart","uploadEnd"]};a.extend(true,this,b)},createInstance:function(){var b=this;if(b.host.jqxButton===undefined){throw new Error("jqxFileUpload: Missing reference to jqxbuttons.js")}if(a.jqx.browser.msie){if(a.jqx.browser.version<10){b._ieOldWebkit=true;if(a.jqx.browser.version<8){b._ie7=true}}}else{if(a.jqx.browser.webkit){b._ieOldWebkit=true}}b._fluidWidth=typeof b.width==="string"&&b.width.charAt(b.width.length-1)==="%";b._fluidHeight=typeof b.height==="string"&&b.height.charAt(b.height.length-1)==="%";b._render(true)},_render:function(b){var c=this;c._setSize();c._addClasses();if(b===true){c._appendElements()}else{c._removeHandlers()}c._addHandlers();if(c._ie7){c._borderAndPadding("width",c.host);if(c.height!=="auto"){c._borderAndPadding("height",c.host)}}a.jqx.utilities.resize(c.host,null,true);a.jqx.utilities.resize(c.host,function(){if(c._fluidWidth){if(c._ie7){c.host.css("width",c.width);c._borderAndPadding("width",c.host)}for(var f=0;f<c._fileRows.length;f++){var d=c._fileRows[f];var h=d.fileRow;if(c._ie7){h.css("width","100%");c._borderAndPadding("width",h)}if(!c.renderFiles){c._setMaxWidth(d)}}if(c.rtl&&c._ieOldWebkit){for(var e=0;e<c._forms.length;e++){var g=c._browseButton.position();c._forms[e].form.css({left:g.left,top:g.top})}}}if(c._ie7&&c._fluidHeight){c.host.css("height",c.height);c._borderAndPadding("height",c.host)}})},render:function(){this._render(false)},refresh:function(b){if(b!==true){this._render(false)}},destroy:function(){var b=this;b.cancelAll();b._removeHandlers(true);b.host.remove()},browse:function(){if(a.jqx.browser.msie&&a.jqx.browser.version<10){return}var b=this;if(b.multipleFilesUpload===true||(b.multipleFilesUpload===false&&b._fileRows.length===0)){b._forms[b._forms.length-1].fileInput.click()}},_uploadFile:function(b){var c=this;if(c._uploadQueue.length===0){c._uploadQueue.push(b)}if(!c.renderFiles){b.uploadFile.add(b.cancelFile).hide();b.loadingElement.show()}b.fileInput.attr("name",c.fileInputName);c._raiseEvent("2",{file:b.fileName});b.form[0].submit();c._fileObjectToRemove=b},uploadFile:function(b){var c=this;c._uploadFile(c._fileRows[b])},uploadAll:function(){var c=this;if(c._fileRows.length>0){for(var b=c._fileRows.length-1;b>=0;b--){c._uploadQueue.push(c._fileRows[b])}c._uploadFile(c._fileRows[0])}},cancelFile:function(b){var c=this;c._removeSingleFileRow(c._fileRows[b])},cancelAll:function(){var c=this;if(c._fileRows.length>0){for(var b=0;b<c._fileRows.length;b++){c._removeFileRow(c._fileRows[b])}setTimeout(function(){c._browseButton.css("margin-bottom",0)},400);c._fileRows.length=0;c._hideButtons(true)}},propertyChangedHandler:function(e,m,c,k){var b=e.element.id;if(m==="localization"){if(k.browseButton&&(!c||k.browseButton!==c.browseButton)){e._browseButton.text(k.browseButton);e._browseButton.jqxButton({width:"auto"})}if(k.uploadButton&&(!c||k.uploadButton!==c.uploadButton)){e._uploadButton.text(k.uploadButton);e._uploadButton.jqxButton({width:"auto"})}if(k.cancelButton&&(!c||k.cancelButton!==c.cancelButton)){e._cancelButton.text(k.cancelButton);e._cancelButton.jqxButton({width:"auto"})}if(!e.renderFiles){if(k.uploadFileTooltip&&(!c||k.uploadFileTooltip!==c.uploadFileTooltip)){a("#"+b+" .jqx-file-upload-file-upload").attr("title",k.uploadFileTooltip)}if(k.uploadFileTooltip&&(!c||k.cancelFileTooltip!==c.cancelFileTooltip)){a("#"+b+" .jqx-file-upload-file-cancel").attr("title",k.cancelFileTooltip)}}return}if(k!==c){switch(m){case"width":e.host.css("width",k);if(e._ie7){e._borderAndPadding("width",e.host);for(var d=0;d<e._fileRows.length;d++){var n=e._fileRows[d].fileRow;n.css("width","100%");e._borderAndPadding("width",n)}}e._fluidWidth=typeof k==="string"&&k.charAt(k.length-1)==="%";return;case"height":e.host.css("height",k);if(e._ie7){e._borderAndPadding("height",e.host)}e._fluidHeight=typeof k==="string"&&k.charAt(k-1)==="%";return;case"uploadUrl":for(var g=0;g<e._forms.length;g++){e._forms[g].form.attr("action",k)}return;case"accept":for(var f=0;f<e._forms.length;f++){e._forms[f].fileInput.attr("accept",k)}return;case"theme":a.jqx.utilities.setTheme(c,k,e.host);e._browseButton.jqxButton({theme:k});e._uploadButton.jqxButton({theme:k});e._cancelButton.jqxButton({theme:k});return;case"browseTemplate":e._browseButton.jqxButton({template:k});return;case"uploadTemplate":e._uploadButton.jqxButton({template:k});return;case"cancelTemplate":e._cancelButton.jqxButton({template:k});return;case"disabled":e._browseButton.jqxButton({disabled:k});e._uploadButton.jqxButton({disabled:k});e._cancelButton.jqxButton({disabled:k});if(k===true){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}return;case"rtl":var h=function(l){var o=l?"addClass":"removeClass";e._browseButton[o](e.toThemeProperty("jqx-file-upload-button-browse-rtl"));e._cancelButton[o](e.toThemeProperty("jqx-file-upload-button-cancel-rtl"));e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){e._uploadButton[o](e.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}for(var i=0;i<e._fileRows.length;i++){var j=e._fileRows[i];j.fileNameContainer[o](e.toThemeProperty("jqx-file-upload-file-name-rtl"));j.cancelFile[o](e.toThemeProperty("jqx-file-upload-file-cancel-rtl"));j.uploadFile[o](e.toThemeProperty("jqx-file-upload-file-upload-rtl"));j.loadingElement[o](e.toThemeProperty("jqx-file-upload-loading-element-rtl"))}};h(k);return}}},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b=this.host.trigger(e);return b},_setSize:function(){var b=this;b.host.css("width",b.width);b.host.css("height",b.height)},_borderAndPadding:function(d,c){var b;if(d==="width"){b=parseInt(c.css("border-left-width"),10)+parseInt(c.css("border-right-width"),10)+parseInt(c.css("padding-left"),10)+parseInt(c.css("padding-right"),10)}else{b=parseInt(c.css("border-top-width"),10)+parseInt(c.css("border-bottom-width"),10)+parseInt(c.css("padding-top"),10)+parseInt(c.css("padding-bottom"),10)}c.css(d,c[d]()-b)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-widget jqx-widget-content jqx-rc-all jqx-file-upload"));if(b.disabled===true){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}},_appendElements:function(){var g=this,c="Browse",b=90,h="Upload All",e=90,d="Cancel All",f=90;var i=g.element.id;if(g.localization){if(g.localization.browseButton){c=g.localization.browseButton;b="auto"}if(g.localization.uploadButton){h=g.localization.uploadButton;e="auto"}if(g.localization.cancelButton){d=g.localization.cancelButton;f="auto"}}g._browseButton=a('<button id="'+i+'BrowseButton" class="'+g.toThemeProperty("jqx-file-upload-button-browse")+'">'+c+"</button>");g.host.append(g._browseButton);g._browseButton.jqxButton({theme:g.theme,width:b,template:g.browseTemplate,disabled:g.disabled});g._browseButton.after('<div style="clear: both;"></div>');g._bottomButtonsContainer=a('<div class="'+g.toThemeProperty("jqx-file-upload-buttons-container")+'"></div>');g.host.append(g._bottomButtonsContainer);g._uploadButton=a('<button id="'+i+'UploadButton" class="'+g.toThemeProperty("jqx-file-upload-button-upload")+'">'+h+"</button>");g._bottomButtonsContainer.append(g._uploadButton);g._uploadButton.jqxButton({theme:g.theme,width:e,template:g.uploadTemplate,disabled:g.disabled});g._cancelButton=a('<button id="'+i+'CancelButton" class="'+g.toThemeProperty("jqx-file-upload-button-cancel")+'">'+d+"</button>");g._bottomButtonsContainer.append(g._cancelButton);g._cancelButton.jqxButton({theme:g.theme,width:f,template:g.cancelTemplate,disabled:g.disabled});g._bottomButtonsContainer.after('<div style="clear: both;"></div>');if(g.rtl){g._browseButton.addClass(g.toThemeProperty("jqx-file-upload-button-browse-rtl"));g._cancelButton.addClass(g.toThemeProperty("jqx-file-upload-button-cancel-rtl"));g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl"));if(a.jqx.browser.msie&&a.jqx.browser.version>8){g._uploadButton.addClass(g.toThemeProperty("jqx-file-upload-button-upload-rtl-ie"))}}g._uploadIframe=a('<iframe name="'+i+'Iframe" class="'+g.toThemeProperty("jqx-file-upload-iframe")+'" src=""></iframe>');g.host.append(g._uploadIframe);g._iframeInitialized=false;g._uploadQueue=[];g._forms=[];g._addFormAndFileInput();g._fileRows=[]},_addFormAndFileInput:function(){var f=this;var i=f.element.id;var e=a('<form class="'+f.toThemeProperty("jqx-file-upload-form")+'" action="'+f.uploadUrl+'" target="'+i+'Iframe" method="post" enctype="multipart/form-data"></form>');f.host.append(e);var d=a('<input type="file" class="'+f.toThemeProperty("jqx-file-upload-file-input")+'" />');if(f.accept){d.attr("accept",f.accept)}e.append(d);if(f._ieOldWebkit){var c=f._browseButton.position();var g=f._browseButton.outerWidth();var h=f._browseButton.outerHeight();var b=f.rtl&&f._ie7?12:0;e.css({left:c.left-b,top:c.top,width:g,height:h});e.addClass(f.toThemeProperty("jqx-file-upload-form-ie9"));d.addClass(f.toThemeProperty("jqx-file-upload-file-input-ie9"));f.addHandler(e,"mouseenter.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mouseleave.jqxFileUpload"+i,function(){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-hover"))});f.addHandler(e,"mousedown.jqxFileUpload"+i,function(){f._browseButton.addClass(f.toThemeProperty("jqx-fill-state-pressed"))});f.addHandler(a(document),"mouseup.jqxFileUpload"+i,function(){if(f._browseButton.hasClass("jqx-fill-state-pressed")){f._browseButton.removeClass(f.toThemeProperty("jqx-fill-state-pressed"))}})}f.addHandler(d,"change.jqxFileUpload"+i,function(){var l=this.value,j;if(!a.jqx.browser.mozilla){if(l.indexOf("fakepath")!==-1){l=l.slice(12)}else{l=l.slice(l.lastIndexOf("\\")+1)}}if(a.jqx.browser.msie&&a.jqx.browser.version<10){j="IE9 and earlier do not support getting the file size."}else{j=this.files[0].size}var k=f._addFileRow(l,e,d,j);if(f._fileRows.length===1){f._browseButton.css("margin-bottom","10px");f._hideButtons(false)}if(f._ieOldWebkit){f.removeHandler(e,"mouseenter.jqxFileUpload"+i);f.removeHandler(e,"mouseleave.jqxFileUpload"+i);f.removeHandler(e,"mousedown.jqxFileUpload"+i)}f._addFormAndFileInput();f.removeHandler(d,"change.jqxFileUpload"+i);if(f.autoUpload===true){f._uploadFile(k)}});if(f._ieOldWebkit===true){f.addHandler(d,"click.jqxFileUpload"+i,function(j){if(f.multipleFilesUpload===false&&f._fileRows.length>0){j.preventDefault()}})}f._forms.push({form:e,fileInput:d})},_addFileRow:function(f,b,e,d){var h=this,l,g,m,j,n,i="Cancel",k="Upload File";l=a('<div class="'+h.toThemeProperty("jqx-widget-content jqx-rc-all jqx-file-upload-file-row")+'"></div>');if(h._fileRows.length===0){h._browseButton.after(l)}else{h._fileRows[h._fileRows.length-1].fileRow.after(l)}if(!h.renderFiles){g=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-name")+'">'+f+"</div>");l.append(g);if(h.localization){if(h.localization.cancelFileTooltip){i=h.localization.cancelFileTooltip}if(h.localization.uploadFileTooltip){k=h.localization.uploadFileTooltip}}j=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-cancel")+'" title="'+i+'"><div class="'+h.toThemeProperty("jqx-icon-close jqx-file-upload-icon")+'"></div></div>');l.append(j);n=a('<div class="'+h.toThemeProperty("jqx-widget-header jqx-rc-all jqx-file-upload-file-upload")+'" title="'+k+'"><div class="'+h.toThemeProperty("jqx-icon-arrow-up jqx-file-upload-icon jqx-file-upload-icon-upload")+'"></div></div>');l.append(n);m=a('<div class="'+h.toThemeProperty("jqx-file-upload-loading-element")+'"></div>');l.append(m);if(h.rtl){g.addClass(h.toThemeProperty("jqx-file-upload-file-name-rtl"));j.addClass(h.toThemeProperty("jqx-file-upload-file-cancel-rtl"));n.addClass(h.toThemeProperty("jqx-file-upload-file-upload-rtl"));m.addClass(h.toThemeProperty("jqx-file-upload-loading-element-rtl"))}h._setMaxWidth({fileNameContainer:g,uploadFile:n,cancelFile:j})}else{l.html(h.renderFiles(f))}if(h._ie7){h._borderAndPadding("width",l);h._borderAndPadding("height",l);if(!h.renderFiles){h._borderAndPadding("height",g);h._borderAndPadding("height",n);h._borderAndPadding("height",j)}}var c={fileRow:l,fileNameContainer:g,fileName:f,uploadFile:n,cancelFile:j,loadingElement:m,form:b,fileInput:e,index:h._fileRows.length};h._addFileHandlers(c);h._fileRows.push(c);h._raiseEvent("0",{file:f,size:d});return c},_setMaxWidth:function(c){var e=this;var f=c.cancelFile.outerWidth(true)+c.uploadFile.outerWidth(true);var b=e._ie7?6:0;var d=e.host.width()-parseInt(e.host.css("padding-left"),10)-parseInt(e.host.css("padding-right"),10)-f-b-7;c.fileNameContainer.css("max-width",d)},_addFileHandlers:function(b){var c=this;if(!c.renderFiles){var d=c.element.id;c.addHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.uploadFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.uploadFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._uploadFile(b)}});c.addHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.addClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d,function(){if(c.disabled===false){b.cancelFile.removeClass(c.toThemeProperty("jqx-fill-state-hover"))}});c.addHandler(b.cancelFile,"click.jqxFileUpload"+d,function(){if(c.disabled===false){c._removeSingleFileRow(b)}})}},_removeSingleFileRow:function(c){var d=this;d._removeFileRow(c);d._fileRows.splice(c.index,1);if(d._fileRows.length===0){setTimeout(function(){d._browseButton.css("margin-bottom",0)},400);d._hideButtons(true)}else{for(var b=0;b<d._fileRows.length;b++){d._fileRows[b].index=b}}},_removeFileRow:function(b){var c=this;var d=c.element.id;if(!c.renderFiles){c.removeHandler(b.uploadFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.uploadFile,"click.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseenter.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"mouseleave.jqxFileUpload"+d);c.removeHandler(b.cancelFile,"click.jqxFileUpload"+d)}b.fileRow.fadeOut(function(){b.fileRow.remove();b.form.remove()});c._raiseEvent("1",{file:b.fileName})},_hideButtons:function(b){var c=this;if(b===true){c._bottomButtonsContainer.fadeOut()}else{c._bottomButtonsContainer.fadeIn()}},_addHandlers:function(){var b=this;var c=b.element.id;if(!b._ieOldWebkit){b.addHandler(b._browseButton,"click.jqxFileUpload"+c,function(){b.browse()})}b.addHandler(b._uploadButton,"click.jqxFileUpload"+c,function(){b.uploadAll()});b.addHandler(b._cancelButton,"click.jqxFileUpload"+c,function(){b.cancelAll()});b.addHandler(b._uploadIframe,"load.jqxFileUpload"+c,function(){if(a.jqx.browser.chrome||a.jqx.browser.webkit){b._iframeInitialized=true}if(b._iframeInitialized===false){b._iframeInitialized=true}else{var d=b._uploadIframe.contents().find("body").html();b._raiseEvent("3",{file:b._uploadQueue[b._uploadQueue.length-1].fileName,response:d});if(b._fileObjectToRemove){b._removeSingleFileRow(b._fileObjectToRemove);b._fileObjectToRemove=null}b._uploadQueue.pop();if(b._uploadQueue.length>0){b._uploadFile(b._uploadQueue[b._uploadQueue.length-1])}}})},_removeHandlers:function(b){var d=this;var e=d.element.id;d.removeHandler(d._browseButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadButton,"click.jqxFileUpload"+e);d.removeHandler(d._cancelButton,"click.jqxFileUpload"+e);d.removeHandler(d._uploadIframe,"load.jqxFileUpload"+e);if(b===true){var c=d._forms[d._forms.length-1];d.removeHandler(c.fileInput,"change.jqxFileUpload"+e);if(d._ieOldWebkit){d.removeHandler(c.form,"mouseenter.jqxFileUpload"+e);d.removeHandler(c.form,"mouseleave.jqxFileUpload"+e);d.removeHandler(c.form,"mousedown.jqxFileUpload"+e);d.removeHandler(a("body"),"mouseup.jqxFileUpload"+e)}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxFormattedInput","",{});a.extend(a.jqx._jqxFormattedInput.prototype,{defineInstance:function(){var b={width:null,height:null,radix:10,decimalNotation:"default",value:"0",min:"-9223372036854775808",max:"9223372036854775807",upperCase:false,spinButtons:true,spinButtonsStep:1,dropDown:false,dropDownWidth:null,popupZIndex:20000,placeHolder:"",roundedCorners:true,disabled:false,rtl:false,_opened:false,$popup:a("<ul></ul>"),item:'<li><a href="#"></a></li>',events:["open","close","change","radixChange"]};a.extend(true,this,b)},createInstance:function(){var b=this;b._Long();b._regex={2:new RegExp(/([0-1])/),8:new RegExp(/([0-7])/),10:new RegExp(/([0-9\-])/),16:new RegExp(/([0-9]|[a-f])/i)};b.render()},render:function(){var e=this;e._radixNumber=e._getRadix(e.radix);e._number=new e.longObj.math.Long.fromString((e.value).toString(),e._radixNumber);if(e.baseHost){e.host=e.baseHost;e.element=e.host[0]}if(this.element.nodeName.toLowerCase()==="div"){this.baseHost=this.element;var b=this.host.find("input");var d=false;a.each(b,function(){var f=this.type;if(f===null||f==="text"||f==="textarea"){b=a(this);d=true;return false}});if(!d){throw new Error("jqxFormattedInput: Missing Text Input in the Input Group")}if(b.length>0){this.baseHost=a(this.element);this.host=b;this.element=b[0];this.baseHost.addClass(this.toThemeProperty("jqx-widget"));this.baseHost.addClass(this.toThemeProperty("jqx-rc-all"));this.baseHost.addClass(this.toThemeProperty("jqx-input-group"));var c=this.baseHost.children();a.each(c,function(f){a(this).addClass(e.toThemeProperty("jqx-input-group-addon"));a(this).removeClass(e.toThemeProperty("jqx-rc-all"));if(f===0){a(this).addClass(e.toThemeProperty("jqx-rc-l"))}if(f===c.length-1){a(this).addClass(e.toThemeProperty("jqx-rc-r"))}if(this!==e.element){a(this).addClass(e.toThemeProperty("jqx-fill-state-normal"))}if(this.nodeName.toLowerCase()==="div"){e.appendSpinButtons=function(i){e._spinButtonsContainer=a(i);e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-formatted-input-spin-buttons-container"));var h='<div class="'+e.toThemeProperty("jqx-fill-state-normal jqx-formatted-input-spin-button")+'"><div class="'+e.toThemeProperty("jqx-input-icon")+'"></div></div>';e._upbutton=a(h);e._spinButtonsContainer.append(e._upbutton);e._downbutton=a(h);e._spinButtonsContainer.append(e._downbutton);e._upArrow=e._upbutton.find("div");e._upArrow.addClass(e.toThemeProperty("jqx-icon-arrow-up"));e._downArrow=e._downbutton.find("div");e._downArrow.addClass(e.toThemeProperty("jqx-icon-arrow-down"));e._spinButtonsStepLong=new e.longObj.math.Long.fromNumber(e.spinButtonsStep)};var g=function(h){e._addon=a(h);e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon"));if(!e._arrow){e._arrow=a('<div class="'+e.toThemeProperty("jqx-icon")+" "+e.toThemeProperty("jqx-icon-arrow-down")+'"></div>');e._arrow.appendTo(e._addon)}};if(e.rtl===false){if(!e._spinButtonsContainer&&e.spinButtons===true){e.appendSpinButtons(this)}else{if(!e._addon&&e.dropDown===true&&((f===2)||(f===1&&e.spinButtons===false))){g(this)}}}else{if(!e._addon&&e.dropDown===true){g(this);if(e.spinButtons===true){e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon-rtl"))}}else{if(!e._spinButtonsContainer&&e.spinButtons===true&&((f===1)||(f===0&&e.dropDown===false))){e.appendSpinButtons(this);e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl"));if(e.dropDown===true){e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}}}})}}e._inputAndAddon=e.host;if(e.baseHost){if(e._spinButtonsContainer){e._inputAndAddon=e._inputAndAddon.add(e._spinButtonsContainer)}if(e._addon){e._inputAndAddon=e._inputAndAddon.add(e._addon)}}e.removeHandlers();this.addHandlers();if(this.rtl){this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.host.attr("role","textbox");a.jqx.aria(this,"aria-autocomplete","both");a.jqx.aria(this,"aria-disabled",this.disabled);a.jqx.aria(this,"aria-readonly",false);a.jqx.aria(this,"aria-multiline",false);a.jqx.aria(this,"aria-haspopup",true);if(e.value!==""&&e.value!==null){if(e.upperCase===true){e.host.addClass(e.toThemeProperty("jqx-formatted-input-upper-case"))}else{e.host.addClass(e.toThemeProperty("jqx-formatted-input-lower-case"))}if(e._radixNumber===10&&e.decimalNotation==="exponential"){e.element.value=e._getDecimalNotation("exponential")}else{e.element.value=e.value}}else{if(e._spinButtonsContainer){e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}if(e._addon){e._addon.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}}if(e._radixNumber!==10&&e.min.toString()==="-9223372036854775808"){e._minLong=new e.longObj.math.Long.fromNumber(e.min)}else{e._setMinMax("min")}if(e._radixNumber!==10&&e.max.toString()==="9223372036854775807"){e._maxLong=new e.longObj.math.Long.fromNumber(e.max)}else{e._setMinMax("max")}},_refreshClasses:function(c){var b=c?"addClass":"removeClass";this.host[b](this.toThemeProperty("jqx-widget-content"));this.host[b](this.toThemeProperty("jqx-input"));this.host[b](this.toThemeProperty("jqx-formatted-input"));this.host[b](this.toThemeProperty("jqx-widget"));this.$popup[b](this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.$popup[b](this.toThemeProperty("jqx-noshadow"))}this.$popup[b](this.toThemeProperty("jqx-input-popup"));this.$popup[b](this.toThemeProperty("jqx-menu"));this.$popup[b](this.toThemeProperty("jqx-menu-vertical"));this.$popup[b](this.toThemeProperty("jqx-menu-dropdown"));this.$popup[b](this.toThemeProperty("jqx-widget"));this.$popup[b](this.toThemeProperty("jqx-widget-content"));if(this.roundedCorners){this.host[b](this.toThemeProperty("jqx-rc-all"));this.$popup[b](this.toThemeProperty("jqx-rc-all"));if(this.baseHost){this.baseHost[b](this.toThemeProperty("jqx-rc-all"));if(this.rtl===false){this.host[b](this.toThemeProperty("jqx-rc-l"));if(this._addon){this._addon[b](this.toThemeProperty("jqx-rc-r"))}}else{this.host[b](this.toThemeProperty("jqx-rc-r"));if(this._addon){this._addon[b](this.toThemeProperty("jqx-rc-l"))}}}}else{this.host.removeClass(this.toThemeProperty("jqx-rc-all"));this.$popup.removeClass(this.toThemeProperty("jqx-rc-all"));if(this.baseHost){this.baseHost.removeClass(this.toThemeProperty("jqx-rc-all"));if(this.rtl===false){this.host.removeClass(this.toThemeProperty("jqx-rc-l"));if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-rc-r"))}}else{this.host.removeClass(this.toThemeProperty("jqx-rc-r"));if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-rc-l"))}}}}if(this.disabled){this.host[b](this.toThemeProperty("jqx-fill-state-disabled"));if(this.baseHost){if(this._spinButtonsContainer){this._spinButtonsContainer[b](this.toThemeProperty("jqx-fill-state-disabled"))}if(this._addon){this._addon[b](this.toThemeProperty("jqx-fill-state-disabled"))}}}else{this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));if(this.baseHost&&this.value!==""&&this.value!==null){if(this._spinButtonsContainer){this._spinButtonsContainer.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}}}},selectAll:function(){var b=this.host;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(0,b[0].value.length)}else{var c=b[0].createTextRange();c.collapse(true);c.moveEnd("character",b[0].value.length);c.moveStart("character",0);c.select()}},10)},selectLast:function(){var b=this.host;this.selectStart(b[0].value.length)},selectFirst:function(){this.selectStart(0)},selectStart:function(c){var b=this.host;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(c,c)}else{var d=b[0].createTextRange();d.collapse(true);d.moveEnd("character",c);d.moveStart("character",c);d.select()}},10)},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},refresh:function(){var f=this;this._refreshClasses(false);this._refreshClasses(true);if(!this.baseHost){if(this.width){this.host.width(this.width)}if(this.height){this.host.height(this.height)}}else{if(this.width){this.baseHost.width(this.width)}if(this.height){this.baseHost.height(this.height);var e=0;var j=this.baseHost.height()-2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.baseHost.css("display","inline-block")}a.each(this.baseHost.children(),function(){a(this).css("height","100%");if(a.jqx.browser.msie&&a.jqx.browser.version<8){a(this).css("height",j+"px")}if(this!==f.element){e+=a(this).outerWidth()}});var c=(typeof f.width==="string"&&f.width.charAt(f.width.length-1)==="%")?1:0;this.host.css("width",this.baseHost.width()-e-c+"px");if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(f._spinButtonsContainer){if(f.rtl===false||f.rtl===true&&f._addon){f._spinButtonsContainer.css("border-left-width","0")}}if(f._addon){if(f.rtl===false){f._addon.css("border-left-width","0")}else{if(!f._spinButtonsContainer){f._addon.css("border-right-width","0")}}}var h=0;if(a.jqx.browser.version<8){var g=0;var d=parseInt(f.host.css("border-left-width"),10)+parseInt(f.host.css("border-right-width"),10);var i=parseInt(f.host.css("padding-left"),10)+parseInt(f.host.css("padding-right"),10);if(f._spinButtonsContainer){d+=parseInt(f._spinButtonsContainer.css("border-left-width"),10)+parseInt(f._spinButtonsContainer.css("border-right-width"),10);i+=parseInt(f._spinButtonsContainer.css("padding-left"),10)+parseInt(f._spinButtonsContainer.css("padding-right"),10);if(!f._addon){g=2}}if(f._addon){d+=parseInt(f._addon.css("border-left-width"),10)+parseInt(f._addon.css("border-right-width"),10);i+=parseInt(f._addon.css("padding-left"),10)+parseInt(f._addon.css("padding-right"),10);if(!f._spinButtonsContainer){g=2}}f.host.width(f.host.width()-(i+d)-g);h=6}f.host.height(f.baseHost.height()-(parseInt(f.host.css("border-top-width"),10)+parseInt(f.host.css("border-bottom-width"),10)+parseInt(f.host.css("padding-top"),10)+parseInt(f.host.css("padding-bottom"),10)+h));var b=f.host.height()+"px";f.host.css("min-height",b);f.host.css("line-height",b)}}}this.host.attr("disabled",this.disabled);if(!this.host.attr("placeholder")){this._refreshPlaceHolder()}},_refreshPlaceHolder:function(){if("placeholder" in this.element){this.host.attr("placeHolder",this.placeHolder)}else{var b=this;if(this.element.value===""){this.element.value=this.placeHolder;this.host.focus(function(){if(b.element.value===b.placeHolder){b.element.value=""}});this.host.blur(function(){if(b.element.value===""||b.element.value===b.placeHolder){b.element.value=b.placeHolder}})}}},destroy:function(){this.removeHandlers();if(this.baseHost){a.jqx.utilities.resize(this.baseHost,null,true);this.baseHost.remove()}else{a.jqx.utilities.resize(this.host,null,true);this.host.remove()}if(this.$popup){this.$popup.remove()}},propertyChangedHandler:function(b,d,g,f){if(d==="placeHolder"){b._refreshPlaceHolder();return}if(d==="disabled"){a.jqx.aria(b,"aria-disabled",b.disabled)}if(d==="value"&&g.toString().toUpperCase()!==f.toString().toUpperCase()){b.val(f);return}if(g!==f&&d==="radix"){b._changeRadix(f);return}if(g!==f&&d==="decimalNotation"&&b._radixNumber===10){if(f==="exponential"){b.element.value=b._getDecimalNotation("exponential")}else{b.element.value=b._number.toString(10)}}if(g!==f&&(d==="min"||d==="max")){b._setMinMax(d);b._validateValue(b.value,true);b.value=b.element.value;return}if(g!==f&&(d==="upperCase")&&b.element.value!==""){if(f===true){b.host.removeClass(b.toThemeProperty("jqx-formatted-input-lower-case"));b.host.addClass(b.toThemeProperty("jqx-formatted-input-upper-case"))}else{b.host.removeClass(b.toThemeProperty("jqx-formatted-input-upper-case"));b.host.addClass(b.toThemeProperty("jqx-formatted-input-lower-case"))}return}function c(i,j){var k=b.host.width();var h=i.outerWidth();if(j===false){b.host.width(k+h);i.hide();if(b.rtl===true){if(b.spinButtons===true){b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl-border"))}if(b.dropDown===true){b._addon.removeClass(b.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}else{b.host.width(k-h);i.show();if(b.rtl===true&&b.spinButtons===true&&b.dropDown===true){b._spinButtonsContainer.removeClass(b.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl-border"));b._addon.addClass(b.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}function e(j,l){if(l===true){var k=a("<div></div>");if(b.baseHost){var h=b.baseHost.children("div");if((b.rtl===false&&j==="spinButtons")||(b.rtl===true&&j==="dropDown")){h.before(k)}else{h.after(k)}b.render();b.host.width(b.host.width()-k.outerWidth())}else{var n=b.element.id;b.host.removeAttr("id");b.host.wrap('<div id="'+n+'" style="display: inline-block;"></div>');var m=a("#"+n);if(b.rtl===false){m.append(k)}else{m.prepend(k)}var i=b.host.data();i.jqxFormattedInput.host=m;i.jqxFormattedInput.element=m[0];b.baseHost=m;b.baseHost.data(i);b.render();b.refresh()}}}if(d==="spinButtons"){if(g!==f){if(b._spinButtonsContainer){c(b._spinButtonsContainer,f)}else{e("spinButtons",f)}return}else{return}}if(g!==f&&d==="spinButtonsStep"){b._spinButtonsStepLong=new b.longObj.math.Long.fromNumber(f)}if(d==="dropDown"){if(g!==f){if(b._addon){c(b._addon,f)}else{e("dropDown",f)}return}else{return}}b.refresh()},select:function(d,e,b){var c=this;if(!b){b=c.$popup.find(".jqx-fill-state-pressed").attr("data-value")}c._changeRadix(parseInt(b,10));c._setMaxLength(true);c.close()},val:function(g){var f=this;if(g&&!(typeof g==="object"&&a.isEmptyObject(g)===true)&&g!=="binary"&&g!=="octal"&&g!=="decimal"&&g!=="exponential"&&g!=="scientific"&&g!=="engineering"&&g!=="hexadecimal"){g=g.toString();if(g.toUpperCase()!==f.element.value.toString().toUpperCase()){var b=f.element.value;if(f.upperCase===true){g=g.toUpperCase()}var e=g.split("");for(var c=0;c<e.length;c++){if(!f._regex[""+f._radixNumber+""].test(e[c])){return}}var h=f._validateValue(g,true);f._raiseEvent("2",{value:h,oldValue:b,radix:f._radixNumber});f.value=h;return h}else{return g}}else{if(g&&!(typeof g==="object"&&a.isEmptyObject(g)===true)){if(g==="exponential"||g==="scientific"||g==="engineering"){return f._getDecimalNotation(g)}else{var d=f._getRadix(g);return f._number.toString(d)}}else{return f.element.value}}},_changeRadix:function(d){var f=this;var e=f._getRadix(d);var g=f._number.toString(e);var b=f.radix;var c=f.value;f.radix=d;f._radixNumber=e;f.element.value=g;f.value=g;this._raiseEvent("3",{radix:d,oldRadix:b,value:g,oldValue:c})},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b;if(this.baseHost){b=this.baseHost.trigger(e)}else{b=this.host.trigger(e)}return b},open:function(){var f=this;if(f.value!==""&&f.value!==null){f._setPopupOptions();f._render(f._popupOptions);if(a.jqx.isHidden(this.host)){return}var c;if(f.baseHost){c=a.extend({},f.baseHost.coord(true),{height:f.baseHost[0].offsetHeight})}else{c=a.extend({},f.host.coord(true),{height:f.host[0].offsetHeight})}if(this.$popup.parent().length===0){var e=this.element.id+"_popup";this.$popup[0].id=e;a.jqx.aria(this,"aria-owns",e)}this.$popup.appendTo(a(document.body)).css({position:"absolute",zIndex:this.popupZIndex,top:c.top+c.height,left:c.left}).show();var b=0;var d=this.$popup.children();a.each(d,function(){b+=a(this).outerHeight(true)-1});this.$popup.height(b);this._opened=true;if(f.baseHost){f._addon.addClass(f.toThemeProperty("jqx-fill-state-pressed jqx-combobox-arrow-selected"));f._arrow.addClass(f.toThemeProperty("jqx-icon-arrow-down-selected"))}this._raiseEvent("0",{popup:this.$popup});a.jqx.aria(this,"aria-expanded",true);return this}},close:function(){var b=this;this.$popup.hide();this._opened=false;if(b.baseHost){b._addon.removeClass(b.toThemeProperty("jqx-fill-state-pressed jqx-combobox-arrow-selected"));b._arrow.removeClass(b.toThemeProperty("jqx-icon-arrow-down-selected"))}this._raiseEvent("1",{popup:this.$popup});a.jqx.aria(this,"aria-expanded",false);return this},_render:function(c){var e=this;c=a(c).map(function(h,j){var k=j;var f;switch(h){case 0:f=2;break;case 1:f=8;break;case 2:f=10;break;case 3:f=16;break}h=a(e.item).attr("data-value",f);h.find("a").html(k).attr("data-value",f);var g="";if(e.rtl){g=" "+e.toThemeProperty("jqx-rtl")+" "+e.toThemeProperty("jqx-formatted-input-item-rtl")}h[0].className=e.toThemeProperty("jqx-item")+" "+e.toThemeProperty("jqx-menu-item")+" "+e.toThemeProperty("jqx-formatted-input-item")+" "+e.toThemeProperty("jqx-rc-all")+g;return h[0]});var b;switch(e._radixNumber){case 2:b=0;break;case 8:b=1;break;case 10:b=2;break;case 16:b=3;break}c.eq(b).addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.$popup.html(c);if(!this.dropDownWidth){if(e.baseHost){var d=(typeof e.width==="string"&&e.width.charAt(e.width.length-1)==="%")?1:0;this.$popup.width(this.baseHost.outerWidth()-6-d)}else{this.$popup.width(this.host.outerWidth()-6)}}else{this.$popup.width(this.dropDownWidth)}return this},next:function(){var c=this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed")),b=c.next();if(!b.length){b=a(this.$popup.find("li")[0])}b.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},prev:function(){var c=this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed")),b=c.prev();if(!b.length){b=this.$popup.find("li").last()}b.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},addHandlers:function(){var c=this;this.addHandler(this.host,"focus",a.proxy(this.onFocus,this));this.addHandler(this.host,"blur",a.proxy(this.onBlur,this));this.addHandler(this.host,"keypress",a.proxy(this.keypress,this));this.addHandler(this.host,"keyup",a.proxy(this.keyup,this));this.addHandler(this.host,"keydown",a.proxy(this.keydown,this));this.addHandler(this.$popup,"mousedown",a.proxy(this.click,this));if(this.host.on){this.$popup.on("mouseenter","li",a.proxy(this.mouseenter,this))}else{this.$popup.bind("mouseenter","li",a.proxy(this.mouseenter,this))}this.addHandler(this.host,"change",function(f){f.stopPropagation();f.preventDefault()});if(c.baseHost){var d=c.baseHost.attr("id");if(c._spinButtonsContainer){var b=c._upbutton.add(c._downbutton);c.addHandler(c._upbutton,"mousedown.jqxFormattedInputSpinButtonUp"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._upbutton.addClass(c.toThemeProperty("jqx-fill-state-pressed"));c._incrementOrDecrement("add")}});c.addHandler(c._upbutton,"mouseup.jqxFormattedInputSpinButtonUp"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._upbutton.removeClass(c.toThemeProperty("jqx-fill-state-pressed"))}});c.addHandler(c._downbutton,"mousedown.jqxFormattedInputSpinButtonDown"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._downbutton.addClass(c.toThemeProperty("jqx-fill-state-pressed"));c._incrementOrDecrement("subtract")}});c.addHandler(c._downbutton,"mouseup.jqxFormattedInputSpinButtonDown"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._downbutton.removeClass(c.toThemeProperty("jqx-fill-state-pressed"))}});c.addHandler(b,"mouseenter.jqxFormattedInputSpinButtons"+d,function(g){if(!c.disabled&&c.value!==""&&c.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){c._upbutton.addClass(c.toThemeProperty("jqx-fill-state-hover"));c._upArrow.addClass(c.toThemeProperty("jqx-icon-arrow-up-hover"))}else{c._downbutton.addClass(c.toThemeProperty("jqx-fill-state-hover"));c._downArrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}}});c.addHandler(b,"mouseleave.jqxFormattedInputSpinButtons"+d,function(g){if(!c.disabled&&c.value!==""&&c.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){c._upbutton.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c._upArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-up-hover"))}else{c._downbutton.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c._downArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}}});c.addHandler(a("body"),"mouseup.jqxFormattedInputSpinButtons"+d,function(){c._upbutton.add(c._downbutton).removeClass(c.toThemeProperty("jqx-fill-state-pressed"))})}if(c._addon){c.addHandler(c._addon,"click.jqxFormattedInputAddon"+d,function(){if(!c.disabled){if(c._opened){c.close()}else{c.open()}}});c.addHandler(c._addon,"mouseenter.jqxFormattedInputAddon"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._addon.addClass(c.toThemeProperty("jqx-fill-state-hover jqx-combobox-arrow-hover"));c._arrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}});c.addHandler(c._addon,"mouseleave.jqxFormattedInputAddon"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._addon.removeClass(c.toThemeProperty("jqx-fill-state-hover jqx-combobox-arrow-hover"));c._arrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}});c.addHandler(c._addon.add(c._arrow),"blur.jqxFormattedInputAddon"+d,function(){if(c._opened&&!c.disabled){c.close()}})}a.jqx.utilities.resize(c.baseHost,function(){if(c._opened===true){c.close()}var e=0;if(c._spinButtonsContainer){e+=c._spinButtonsContainer.outerWidth()}if(c._addon){e+=c._addon.outerWidth()}c.host.css("width",c.baseHost.width()-e-1)})}},removeHandlers:function(){var c=this;this.removeHandler(this.host,"focus",a.proxy(this.onFocus,this));this.removeHandler(this.host,"blur",a.proxy(this.onBlur,this));this.removeHandler(this.host,"keypress",a.proxy(this.keypress,this));this.removeHandler(this.host,"keyup",a.proxy(this.keyup,this));this.removeHandler(this.host,"keydown",a.proxy(this.keydown,this));this.removeHandler(this.$popup,"mousedown",a.proxy(this.click,this));if(this.host.off){this.$popup.off("mouseenter","li",a.proxy(this.mouseenter,this))}else{this.$popup.unbind("mouseenter","li",a.proxy(this.mouseenter,this))}if(c.baseHost){var d=c.baseHost.attr("id");if(c._spinButtonsContainer){var b=c._upbutton.add(c._downbutton);c.removeHandler(c._upbutton,"mousedown.jqxFormattedInputSpinButtonUp"+d);c.removeHandler(c._upbutton,"mouseup.jqxFormattedInputSpinButtonUp"+d);c.removeHandler(c._downbutton,"mousedown.jqxFormattedInputSpinButtonDown"+d);c.removeHandler(c._downbutton,"mouseup.jqxFormattedInputSpinButtonDown"+d);c.removeHandler(b,"mouseenter.jqxFormattedInputSpinButtons"+d);c.removeHandler(b,"mouseleave.jqxFormattedInputSpinButtons"+d);c.removeHandler(a("body"),"mouseup.jqxFormattedInputSpinButtons"+d)}if(c._addon){c.removeHandler(c._addon,"click.jqxFormattedInputAddon"+d);c.removeHandler(c._addon,"mouseenter.jqxFormattedInputAddon"+d);c.removeHandler(c._addon,"mouseleave.jqxFormattedInputAddon"+d);c.removeHandler(c._addon.add(c._arrow),"blur.jqxFormattedInputAddon"+d)}}},move:function(b){if(!this._opened){return}switch(b.keyCode){case 9:case 13:case 27:b.preventDefault();break;case 38:b.preventDefault();this.prev();break;case 40:b.preventDefault();this.next();break}b.stopPropagation()},keydown:function(k){var j=this;this.suppressKeyPressRepeat=~a.inArray(k.keyCode,[40,38,9,13,27]);this.move(k);var o=!k.charCode?k.which:k.charCode;var m=String.fromCharCode(o);if(k.altKey===true){if(o===40){if(j._addon){this.open()}return}else{if(o===38){if(j._addon){this.close()}return}}}if(k.ctrlKey===true&&o===67){return}var d=[8,9,13,37,38,39,40,46,88];var i=j._regex[""+j._radixNumber+""];if(d.indexOf(o)===-1&&(!i.test(m)&&!i.test(k.key)&&!i.test(k["char"]))){k.preventDefault();return false}else{var l=j.host[0].selectionStart;var g=j.host[0].selectionEnd-l;var f=this._getCaretPosition(this.host[0]);var b=this.element.value;var c=b.split("");if(o===8){if(g>0){c.splice(l,g)}else{c.splice(f-1,1)}}else{if(o===46){if(g>0){c.splice(l,g)}else{c.splice(f,1)}}else{if(o===88){if(k.ctrlKey===true){if(g>0){c.splice(l,g)}}else{k.preventDefault()}}else{if(o===189){if(c[0]==="-"){c.splice(0,1);j._minus=false}else{c.splice(0,0,"-");j._minus=true}k.preventDefault()}else{var h=d.indexOf(o)===-1?m:"";if(g>0){c.splice(l,g);c.splice(l,0,h)}else{c.splice(f,0,h)}}}}}c=c.join("");if(c!==b){var n=j._validateValue(c,false);if(n===false){j._inputAndAddon.addClass(j.toThemeProperty("jqx-input-invalid"))}else{j._inputAndAddon.removeClass(j.toThemeProperty("jqx-input-invalid"))}}}},keypress:function(c){var b=this;if(b.suppressKeyPressRepeat){return}b.move(c)},keyup:function(c){var b=this;switch(c.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(this._opened){this.select(c,this)}else{b._change()}break;case 27:if(!this._opened){return}this.close();break;case 189:if(b._radixNumber===10){if(b._minus===true){b.element.value="-"+b.element.value}else{b.element.value=b.element.value.slice(1)}}break}c.stopPropagation();c.preventDefault();if(b.element.value!==""){if(b.upperCase){b.host.addClass(b.toThemeProperty("jqx-formatted-input-upper-case"))}else{b.host.addClass(b.toThemeProperty("jqx-formatted-input-lower-case"))}if(b._addon){b._addon.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}}else{b.host.removeClass(b.toThemeProperty("jqx-formatted-input-upper-case jqx-formatted-input-lower-case"));if(b._addon){b._addon.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}}},_getCaretPosition:function(b){var d=0;if(document.selection){b.focus();var c=document.selection.createRange();c.moveStart("character",-b.value.length);d=c.text.length}else{if(b.selectionStart||b.selectionStart==="0"){d=b.selectionStart}}return(d)},onBlur:function(){var b=this;if(b._opened){b.close()}b._setMaxLength();b._inputAndAddon.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._change();if(b._radixNumber===10&&b.decimalNotation==="exponential"){b.element.value=b._getDecimalNotation("exponential")}b._refreshPlaceHolder()},onFocus:function(){var b=this;b._setMaxLength(true);b._inputAndAddon.addClass(b.toThemeProperty("jqx-fill-state-focus"));if(b._radixNumber===10&&b.decimalNotation==="exponential"){b.element.value=b._number.toString(10)}},click:function(c){c.stopPropagation();c.preventDefault();var b=a(c.target).attr("data-value");this.select(c,this,b)},mouseenter:function(b){this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed"));a(b.currentTarget).addClass(this.toThemeProperty("jqx-fill-state-pressed"))},_change:function(){var c=this;var b=c.value;var d=c._validateValue(c.element.value,true);c._inputAndAddon.removeClass(c.toThemeProperty("jqx-input-invalid"));if(d.toUpperCase()!==b.toString().toUpperCase()){c._raiseEvent("2",{value:d,oldValue:b,radix:c._radixNumber});c.value=d}},_getRadix:function(b){switch(b){case 10:case"decimal":return 10;case 2:case"binary":return 2;case 8:case"octal":return 8;case 16:case"hexadecimal":return 16}},_setPopupOptions:function(){var b=this;b._popupOptions=new Array();b._popupOptions.push(b._number.toString(2)+" <em>(BIN)</em>");b._popupOptions.push(b._number.toString(8)+" <em>(OCT)</em>");b._popupOptions.push(b._number.toString(10)+" <em>(DEC)</em>");b._popupOptions.push(b._number.toString(16)+" <em>(HEX)</em>")},_validateValue:function(e,g){if(e!==""){var d=this;var f=new d.longObj.math.Long.fromString((e).toString(),d._radixNumber);if(f.lessThan(d._minLong)){if(g){d._number=d._minLong;var c=d._minLong.toString(d._radixNumber);if(d._radixNumber===16&&d.upperCase===true){c=c.toUpperCase()}d.element.value=c;return c}else{return false}}else{if(f.greaterThan(d._maxLong)){if(g){d._number=d._maxLong;var b=d._maxLong.toString(d._radixNumber);if(d._radixNumber===16&&d.upperCase===true){b=b.toUpperCase()}d.element.value=b;return b}else{return false}}else{if(g){d._number=f;d.element.value=e;return e}else{return true}}}}else{if(g){return e}else{return true}}},_getNegativeDecimal:function(l,h){var o=l;if(h===8){var n=new Array();for(var f=0;f<11;f++){var b=parseInt(l.charAt(f),8).toString(2);while(b.length!==3){b="0"+b}n.push(b)}o=n.join("");if(o.charAt(0)==="0"){o=o.slice(1)}}else{if(h===16){var p=new Array();for(var e=0;e<8;e++){var m=parseInt(l.charAt(e),16).toString(2);while(m.length!==4){m="0"+m}p.push(m)}o=p.join("")}}var d="";for(var c=0;c<o.length;c++){var g=o.charAt(c)==="1"?"0":"1";d+=g}d=(parseInt(d,2)+1)*-1;return d},_setMaxLength:function(c){var d=this;var b;if(c===true){switch(d._radixNumber){case 2:b=64;break;case 8:b=22;break;case 10:b=20;break;case 16:b=16;break}}else{b=524288}d.host.attr("maxlength",b)},_setMinMax:function(b){var c=this;c["_"+b+"Long"]=new c.longObj.math.Long.fromString((c[b]).toString(),c._radixNumber)},_getDecimalNotation:function(c){var e=this;var f=e._number.toString(10);function h(j){var i;if(j.charAt(0)==="-"){i="-";j=j.slice(1,j.length)}else{i=""}var k=j.length-1;while(j.charAt(j.length-1)==="0"){j=j.slice(0,j.length-1)}return i+""+j.charAt(0)+"."+j.slice(1,j.length)+"e+"+k}function d(l){var k=l.indexOf("e");var j=l.slice(k+1);var i=l.slice(0,k+1);i=i.replace("e","×10");i+=e._toSuperScript(j);i=i.replace("+","");return i}function b(o){var n=o.indexOf("e");var m=o.slice(n+1);var k=o.slice(0,n);var l=parseInt(m,10)%3;k=k*Math.pow(10,l);var j=o.slice(0,n).length-l-2;if(j>=0){k=k.toFixed(j)}var i=k+"×10"+e._toSuperScript((parseInt(m,10)-l).toString());return i}var g=h(f);if(c==="scientific"){return d(g)}else{if(c==="engineering"){return b(g)}else{return g}}},_toSuperScript:function(h,g){var f="-0123456789";var d="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";var c="";for(var e=0;e<h.length;e++){if(g===true){var b=d.indexOf(h.charAt(e));c+=(b!==-1?f[b]:h[e])}else{var j=f.indexOf(h.charAt(e));c+=(j!==-1?d[j]:h[e])}}return c},_incrementOrDecrement:function(c){var b=this;if(b._number.toString(b._radixNumber)!==b.element.value){b._number=new b.longObj.math.Long.fromString(b.element.value,b._radixNumber)}b._number=b._number[c](b._spinButtonsStepLong);b.element.value=b._number.toString(b._radixNumber);b._change()},_negativeBinary:function(u,r){var s="";u=u.slice(1,u.length);while(u.length<64){u="0"+u}for(var o=0;o<u.length;o++){var t=u.charAt(o)==="1"?"0":"1";s+=t}var d=true;var g="";for(var n=s.length-1;n>=0;n--){var q=s.charAt(n);var b;if(q==="0"){if(d===true){b="1";d=false}else{b="0"}}else{if(d===true){b="0"}else{b="1"}}g=b+""+g}switch(r){case 2:return g;case 8:g="00"+g;var f="";for(var m=22;m>=1;m--){var p=g[m*3-3]+""+g[m*3-2]+""+g[m*3-1];f=parseInt(p,2).toString(8)+""+f}return f;case 16:var e="";for(var h=16;h>=1;h--){var c=g[h*4-4]+""+g[h*4-3]+""+g[h*4-2]+""+g[h*4-1];e=parseInt(c,2).toString(16)+""+e}return e}},_Long:function(){var c=this;c.longObj=new Object();var b=c.longObj;b.math=new Object();b.math.Long=new Object();b.math.Long=function(d,e){this.lowBits=d|0;this.highBits=e|0};b.math.Long.IntCache={};b.math.Long.fromInt=function(d){if(-128<=d&&d<128){var f=b.math.Long.IntCache[d];if(f){return f}}var e=new b.math.Long(d|0,d<0?-1:0);if(-128<=d&&d<128){b.math.Long.IntCache[d]=e}return e};b.math.Long.fromNumber=function(d){if(isNaN(d)||!isFinite(d)){return b.math.Long.ZERO}else{if(d<=-b.math.Long.TWO_PWR_63_DBL_){return b.math.Long.MIN_VALUE}else{if(d+1>=b.math.Long.TWO_PWR_63_DBL_){return b.math.Long.MAX_VALUE}else{if(d<0){return b.math.Long.fromNumber(-d).negate()}else{return new b.math.Long((d%b.math.Long.TWO_PWR_32_DBL_)|0,(d/b.math.Long.TWO_PWR_32_DBL_)|0)}}}}};b.math.Long.fromBits=function(d,e){return new b.math.Long(d,e)};b.math.Long.fromString=function(f,j){if(f.length===0){throw new Error("number format error: empty string")}var g=j||10;if(g<2||36<g){throw new Error("radix out of range: "+g)}if(f.charAt(0)==="-"){return b.math.Long.fromString(f.substring(1),g).negate()}else{if(f.indexOf("-")>=0){throw new Error('number format error: interior "-" character: '+f)}}var k=b.math.Long.fromNumber(Math.pow(g,8));var m=b.math.Long.ZERO;for(var e=0;e<f.length;e+=8){var l=Math.min(8,f.length-e);var h=parseInt(f.substring(e,e+l),g);if(l<8){var d=b.math.Long.fromNumber(Math.pow(g,l));m=m.multiply(d).add(b.math.Long.fromNumber(h))}else{m=m.multiply(k);m=m.add(b.math.Long.fromNumber(h))}}return m};b.math.Long.TWO_PWR_16_DBL_=1<<16;b.math.Long.TWO_PWR_24_DBL_=1<<24;b.math.Long.TWO_PWR_32_DBL_=b.math.Long.TWO_PWR_16_DBL_*b.math.Long.TWO_PWR_16_DBL_;b.math.Long.TWO_PWR_31_DBL_=b.math.Long.TWO_PWR_32_DBL_/2;b.math.Long.TWO_PWR_48_DBL_=b.math.Long.TWO_PWR_32_DBL_*b.math.Long.TWO_PWR_16_DBL_;b.math.Long.TWO_PWR_64_DBL_=b.math.Long.TWO_PWR_32_DBL_*b.math.Long.TWO_PWR_32_DBL_;b.math.Long.TWO_PWR_63_DBL_=b.math.Long.TWO_PWR_64_DBL_/2;b.math.Long.ZERO=b.math.Long.fromInt(0);b.math.Long.ONE=b.math.Long.fromInt(1);b.math.Long.NEG_ONE=b.math.Long.fromInt(-1);b.math.Long.MAX_VALUE=b.math.Long.fromBits(4294967295|0,2147483647|0);b.math.Long.MIN_VALUE=b.math.Long.fromBits(0,2147483648|0);b.math.Long.TWO_PWR_24_=b.math.Long.fromInt(1<<24);b.math.Long.prototype.toInt=function(){return this.lowBits};b.math.Long.prototype.toNumber=function(){return this.highBits*b.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()};b.math.Long.prototype.toString=function(j){var h=j||10;if(h<2||36<h){throw new Error("radix out of range: "+h)}if(this.isZero()){return"0"}var k,m;if(this.isNegative()){if(this.equals(b.math.Long.MIN_VALUE)){var f=b.math.Long.fromNumber(h);var d=this.div(f);k=d.multiply(f).subtract(this);return d.toString(h)+k.toInt().toString(h)}else{switch(h){case 2:case 8:case 16:m="-"+this.negate().toString(2);return c._negativeBinary(m,h);default:m="-"+this.negate().toString(h);return m}}}var l=b.math.Long.fromNumber(Math.pow(h,6));k=this;m="";while(true){var i=k.div(l);var g=k.subtract(i.multiply(l)).toInt();var e=g.toString(h);k=i;if(k.isZero()){return e+m}else{while(e.length<6){e="0"+e}m=""+e+m}}};b.math.Long.prototype.getHighBits=function(){return this.highBits};b.math.Long.prototype.getLowBits=function(){return this.lowBits};b.math.Long.prototype.getLowBitsUnsigned=function(){return(this.lowBits>=0)?this.lowBits:b.math.Long.TWO_PWR_32_DBL_+this.lowBits};b.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative()){if(this.equals(b.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var e=this.highBits!==0?this.highBits:this.lowBits;for(var d=31;d>0;d--){if((e&(1<<d))!==0){break}}return this.highBits!==0?d+33:d+1}};b.math.Long.prototype.isZero=function(){return this.highBits===0&&this.lowBits===0};b.math.Long.prototype.isNegative=function(){return this.highBits<0};b.math.Long.prototype.isOdd=function(){return(this.lowBits&1)===1};b.math.Long.prototype.equals=function(d){return(this.highBits===d.highBits)&&(this.lowBits===d.lowBits)};b.math.Long.prototype.notEquals=function(d){return(this.highBits!==d.highBits)||(this.lowBits!==d.lowBits)};b.math.Long.prototype.lessThan=function(d){return this.compare(d)<0};b.math.Long.prototype.lessThanOrEqual=function(d){return this.compare(d)<=0};b.math.Long.prototype.greaterThan=function(d){return this.compare(d)>0};b.math.Long.prototype.greaterThanOrEqual=function(d){return this.compare(d)>=0};b.math.Long.prototype.compare=function(e){if(this.equals(e)){return 0}var d=this.isNegative();var f=e.isNegative();if(d&&!f){return -1}if(!d&&f){return 1}if(this.subtract(e).isNegative()){return -1}else{return 1}};b.math.Long.prototype.negate=function(){if(this.equals(b.math.Long.MIN_VALUE)){return b.math.Long.MIN_VALUE}else{return this.not().add(b.math.Long.ONE)}};b.math.Long.prototype.add=function(k){var i=this.highBits>>>16;var e=this.highBits&65535;var l=this.lowBits>>>16;var f=this.lowBits&65535;var n=k.highBits>>>16;var g=k.highBits&65535;var o=k.lowBits>>>16;var h=k.lowBits&65535;var p=0,j=0,d=0,m=0;m+=f+h;d+=m>>>16;m&=65535;d+=l+o;j+=d>>>16;d&=65535;j+=e+g;p+=j>>>16;j&=65535;p+=i+n;p&=65535;return b.math.Long.fromBits((d<<16)|m,(p<<16)|j)};b.math.Long.prototype.subtract=function(d){return this.add(d.negate())};b.math.Long.prototype.multiply=function(k){if(this.isZero()){return b.math.Long.ZERO}else{if(k.isZero()){return b.math.Long.ZERO}}if(this.equals(b.math.Long.MIN_VALUE)){return k.isOdd()?b.math.Long.MIN_VALUE:b.math.Long.ZERO}else{if(k.equals(b.math.Long.MIN_VALUE)){return this.isOdd()?b.math.Long.MIN_VALUE:b.math.Long.ZERO}}if(this.isNegative()){if(k.isNegative()){return this.negate().multiply(k.negate())}else{return this.negate().multiply(k).negate()}}else{if(k.isNegative()){return this.multiply(k.negate()).negate()}}if(this.lessThan(b.math.Long.TWO_PWR_24_)&&k.lessThan(b.math.Long.TWO_PWR_24_)){return b.math.Long.fromNumber(this.toNumber()*k.toNumber())}var i=this.highBits>>>16;var e=this.highBits&65535;var l=this.lowBits>>>16;var f=this.lowBits&65535;var n=k.highBits>>>16;var g=k.highBits&65535;var o=k.lowBits>>>16;var h=k.lowBits&65535;var p=0,j=0,d=0,m=0;m+=f*h;d+=m>>>16;m&=65535;d+=l*h;j+=d>>>16;d&=65535;d+=f*o;j+=d>>>16;d&=65535;j+=e*h;p+=j>>>16;j&=65535;j+=l*o;p+=j>>>16;j&=65535;j+=f*g;p+=j>>>16;j&=65535;p+=i*h+e*o+l*g+f*n;p&=65535;return b.math.Long.fromBits((d<<16)|m,(p<<16)|j)};b.math.Long.prototype.div=function(f){if(f.isZero()){throw new Error("division by zero")}else{if(this.isZero()){return b.math.Long.ZERO}}var i,k;if(this.equals(b.math.Long.MIN_VALUE)){if(f.equals(b.math.Long.ONE)||f.equals(b.math.Long.NEG_ONE)){return b.math.Long.MIN_VALUE}else{if(f.equals(b.math.Long.MIN_VALUE)){return b.math.Long.ONE}else{var d=this.shiftRight(1);i=d.div(f).shiftLeft(1);if(i.equals(b.math.Long.ZERO)){return f.isNegative()?b.math.Long.ONE:b.math.Long.NEG_ONE}else{k=this.subtract(f.multiply(i));var m=i.add(k.div(f));return m}}}}else{if(f.equals(b.math.Long.MIN_VALUE)){return b.math.Long.ZERO}}if(this.isNegative()){if(f.isNegative()){return this.negate().div(f.negate())}else{return this.negate().div(f).negate()}}else{if(f.isNegative()){return this.div(f.negate()).negate()}}var g=b.math.Long.ZERO;k=this;while(k.greaterThanOrEqual(f)){i=Math.max(1,Math.floor(k.toNumber()/f.toNumber()));var l=Math.ceil(Math.log(i)/Math.LN2);var j=(l<=48)?1:Math.pow(2,l-48);var e=b.math.Long.fromNumber(i);var h=e.multiply(f);while(h.isNegative()||h.greaterThan(k)){i-=j;e=b.math.Long.fromNumber(i);h=e.multiply(f)}if(e.isZero()){e=b.math.Long.ONE}g=g.add(e);k=k.subtract(h)}return g};b.math.Long.prototype.modulo=function(d){return this.subtract(this.div(d).multiply(d))};b.math.Long.prototype.not=function(){return b.math.Long.fromBits(~this.lowBits,~this.highBits)};b.math.Long.prototype.and=function(d){return b.math.Long.fromBits(this.lowBits&d.lowBits,this.highBits&d.highBits)};b.math.Long.prototype.or=function(d){return b.math.Long.fromBits(this.lowBits|d.lowBits,this.highBits|d.highBits)};b.math.Long.prototype.xor=function(d){return b.math.Long.fromBits(this.lowBits^d.lowBits,this.highBits^d.highBits)};b.math.Long.prototype.shiftLeft=function(f){f&=63;if(f===0){return this}else{var d=this.lowBits;if(f<32){var e=this.highBits;return b.math.Long.fromBits(d<<f,(e<<f)|(d>>>(32-f)))}else{return b.math.Long.fromBits(0,d<<(f-32))}}};b.math.Long.prototype.shiftRight=function(f){f&=63;if(f===0){return this}else{var e=this.highBits;if(f<32){var d=this.lowBits;return b.math.Long.fromBits((d>>>f)|(e<<(32-f)),e>>f)}else{return b.math.Long.fromBits(e>>(f-32),e>=0?0:-1)}}};b.math.Long.prototype.shiftRightUnsigned=function(f){f&=63;if(f===0){return this}else{var e=this.highBits;if(f<32){var d=this.lowBits;return b.math.Long.fromBits((d>>>f)|(e<<(32-f)),e>>>f)}else{if(f===32){return b.math.Long.fromBits(e,0)}else{return b.math.Long.fromBits(e>>>(f-32),0)}}}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxFormattedInput","",{});a.extend(a.jqx._jqxFormattedInput.prototype,{defineInstance:function(){var b={width:null,height:null,radix:10,decimalNotation:"default",value:"0",min:"-9223372036854775808",max:"9223372036854775807",upperCase:false,spinButtons:true,spinButtonsStep:1,dropDown:false,dropDownWidth:null,popupZIndex:20000,placeHolder:"",roundedCorners:true,disabled:false,rtl:false,_opened:false,$popup:a("<ul></ul>"),item:'<li><a href="#"></a></li>',events:["open","close","change","radixChange"]};a.extend(true,this,b)},createInstance:function(){var b=this;b._Long();b._regex={2:new RegExp(/([0-1])/),8:new RegExp(/([0-7])/),10:new RegExp(/([0-9\-])/),16:new RegExp(/([0-9]|[a-f])/i)};b.render()},render:function(){var e=this;e._radixNumber=e._getRadix(e.radix);if(e.value!==""){e._number=new e.longObj.math.Long.fromString((e.value).toString(),e._radixNumber)}if(e.baseHost){e.host=e.baseHost;e.element=e.host[0]}if(this.element.nodeName.toLowerCase()==="div"){this.baseHost=this.element;var b=this.host.find("input");var d=false;a.each(b,function(){var f=this.type;if(f===null||f==="text"||f==="textarea"){b=a(this);d=true;return false}});if(!d){throw new Error("jqxFormattedInput: Missing Text Input in the Input Group")}if(b.length>0){this.baseHost=a(this.element);this.host=b;this.element=b[0];this.baseHost.addClass(this.toThemeProperty("jqx-widget"));this.baseHost.addClass(this.toThemeProperty("jqx-rc-all"));this.baseHost.addClass(this.toThemeProperty("jqx-input-group"));var c=this.baseHost.children();a.each(c,function(f){a(this).addClass(e.toThemeProperty("jqx-input-group-addon"));a(this).removeClass(e.toThemeProperty("jqx-rc-all"));if(f===0){a(this).addClass(e.toThemeProperty("jqx-rc-l"))}if(f===c.length-1){a(this).addClass(e.toThemeProperty("jqx-rc-r"))}if(this!==e.element){a(this).addClass(e.toThemeProperty("jqx-fill-state-normal"))}if(this.nodeName.toLowerCase()==="div"){e.appendSpinButtons=function(i){e._spinButtonsContainer=a(i);e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-formatted-input-spin-buttons-container"));var h='<div class="'+e.toThemeProperty("jqx-fill-state-normal jqx-formatted-input-spin-button")+'"><div class="'+e.toThemeProperty("jqx-input-icon")+'"></div></div>';e._upbutton=a(h);e._spinButtonsContainer.append(e._upbutton);e._downbutton=a(h);e._spinButtonsContainer.append(e._downbutton);e._upArrow=e._upbutton.find("div");e._upArrow.addClass(e.toThemeProperty("jqx-icon-arrow-up"));e._downArrow=e._downbutton.find("div");e._downArrow.addClass(e.toThemeProperty("jqx-icon-arrow-down"));e._spinButtonsStepLong=new e.longObj.math.Long.fromNumber(e.spinButtonsStep)};var g=function(h){e._addon=a(h);e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon"));if(!e._arrow){e._arrow=a('<div class="'+e.toThemeProperty("jqx-icon")+" "+e.toThemeProperty("jqx-icon-arrow-down")+'"></div>');e._arrow.appendTo(e._addon)}};if(e.rtl===false){if(!e._spinButtonsContainer&&e.spinButtons===true){e.appendSpinButtons(this)}else{if(!e._addon&&e.dropDown===true&&((f===2)||(f===1&&e.spinButtons===false))){g(this)}}}else{if(!e._addon&&e.dropDown===true){g(this);if(e.spinButtons===true){e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon-rtl"))}}else{if(!e._spinButtonsContainer&&e.spinButtons===true&&((f===1)||(f===0&&e.dropDown===false))){e.appendSpinButtons(this);e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl"));if(e.dropDown===true){e._addon.addClass(e.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}}}})}}e._inputAndAddon=e.host;if(e.baseHost){if(e._spinButtonsContainer){e._inputAndAddon=e._inputAndAddon.add(e._spinButtonsContainer)}if(e._addon){e._inputAndAddon=e._inputAndAddon.add(e._addon)}}e.removeHandlers();this.addHandlers();if(this.rtl){this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.host.attr("role","textbox");a.jqx.aria(this,"aria-autocomplete","both");a.jqx.aria(this,"aria-disabled",this.disabled);a.jqx.aria(this,"aria-readonly",false);a.jqx.aria(this,"aria-multiline",false);a.jqx.aria(this,"aria-haspopup",true);if(e.value!==""&&e.value!==null){if(e.upperCase===true){e.host.addClass(e.toThemeProperty("jqx-formatted-input-upper-case"))}else{e.host.addClass(e.toThemeProperty("jqx-formatted-input-lower-case"))}if(e._radixNumber===10&&e.decimalNotation==="exponential"){e.element.value=e._getDecimalNotation("exponential")}else{e.element.value=e.value}}else{if(e._spinButtonsContainer){e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}if(e._addon){e._addon.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}}if(e._radixNumber!==10&&e.min.toString()==="-9223372036854775808"){e._minLong=new e.longObj.math.Long.fromNumber(e.min)}else{e._setMinMax("min")}if(e._radixNumber!==10&&e.max.toString()==="9223372036854775807"){e._maxLong=new e.longObj.math.Long.fromNumber(e.max)}else{e._setMinMax("max")}},_refreshClasses:function(c){var b=c?"addClass":"removeClass";this.host[b](this.toThemeProperty("jqx-widget-content"));this.host[b](this.toThemeProperty("jqx-input"));this.host[b](this.toThemeProperty("jqx-formatted-input"));this.host[b](this.toThemeProperty("jqx-widget"));this.$popup[b](this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.$popup[b](this.toThemeProperty("jqx-noshadow"))}this.$popup[b](this.toThemeProperty("jqx-input-popup"));this.$popup[b](this.toThemeProperty("jqx-menu"));this.$popup[b](this.toThemeProperty("jqx-menu-vertical"));this.$popup[b](this.toThemeProperty("jqx-menu-dropdown"));this.$popup[b](this.toThemeProperty("jqx-widget"));this.$popup[b](this.toThemeProperty("jqx-widget-content"));if(this.roundedCorners){this.host[b](this.toThemeProperty("jqx-rc-all"));this.$popup[b](this.toThemeProperty("jqx-rc-all"));if(this.baseHost){this.baseHost[b](this.toThemeProperty("jqx-rc-all"));if(this.rtl===false){this.host[b](this.toThemeProperty("jqx-rc-l"));if(this._addon){this._addon[b](this.toThemeProperty("jqx-rc-r"))}}else{this.host[b](this.toThemeProperty("jqx-rc-r"));if(this._addon){this._addon[b](this.toThemeProperty("jqx-rc-l"))}}}}else{this.host.removeClass(this.toThemeProperty("jqx-rc-all"));this.$popup.removeClass(this.toThemeProperty("jqx-rc-all"));if(this.baseHost){this.baseHost.removeClass(this.toThemeProperty("jqx-rc-all"));if(this.rtl===false){this.host.removeClass(this.toThemeProperty("jqx-rc-l"));if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-rc-r"))}}else{this.host.removeClass(this.toThemeProperty("jqx-rc-r"));if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-rc-l"))}}}}if(this.disabled){this.host[b](this.toThemeProperty("jqx-fill-state-disabled"));if(this.baseHost){if(this._spinButtonsContainer){this._spinButtonsContainer[b](this.toThemeProperty("jqx-fill-state-disabled"))}if(this._addon){this._addon[b](this.toThemeProperty("jqx-fill-state-disabled"))}}}else{this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));if(this.baseHost&&this.value!==""&&this.value!==null){if(this._spinButtonsContainer){this._spinButtonsContainer.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this._addon){this._addon.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}}}},selectAll:function(){var b=this.host;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(0,b[0].value.length)}else{var c=b[0].createTextRange();c.collapse(true);c.moveEnd("character",b[0].value.length);c.moveStart("character",0);c.select()}},10)},selectLast:function(){var b=this.host;this.selectStart(b[0].value.length)},selectFirst:function(){this.selectStart(0)},selectStart:function(c){var b=this.host;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(c,c)}else{var d=b[0].createTextRange();d.collapse(true);d.moveEnd("character",c);d.moveStart("character",c);d.select()}},10)},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},refresh:function(){var f=this;this._refreshClasses(false);this._refreshClasses(true);if(!this.baseHost){if(this.width){this.host.width(this.width)}if(this.height){this.host.height(this.height)}}else{if(this.width){this.baseHost.width(this.width)}if(this.height){this.baseHost.height(this.height);var e=0;var j=this.baseHost.height()-2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.baseHost.css("display","inline-block")}a.each(this.baseHost.children(),function(){a(this).css("height","100%");if(a.jqx.browser.msie&&a.jqx.browser.version<8){a(this).css("height",j+"px")}if(this!==f.element){e+=a(this).outerWidth()}});var c=(typeof f.width==="string"&&f.width.charAt(f.width.length-1)==="%")?1:0;this.host.css("width",this.baseHost.width()-e-c+"px");if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(f._spinButtonsContainer){if(f.rtl===false||f.rtl===true&&f._addon){f._spinButtonsContainer.css("border-left-width","0")}}if(f._addon){if(f.rtl===false){f._addon.css("border-left-width","0")}else{if(!f._spinButtonsContainer){f._addon.css("border-right-width","0")}}}var h=0;if(a.jqx.browser.version<8){var g=0;var d=parseInt(f.host.css("border-left-width"),10)+parseInt(f.host.css("border-right-width"),10);var i=parseInt(f.host.css("padding-left"),10)+parseInt(f.host.css("padding-right"),10);if(f._spinButtonsContainer){d+=parseInt(f._spinButtonsContainer.css("border-left-width"),10)+parseInt(f._spinButtonsContainer.css("border-right-width"),10);i+=parseInt(f._spinButtonsContainer.css("padding-left"),10)+parseInt(f._spinButtonsContainer.css("padding-right"),10);if(!f._addon){g=2}}if(f._addon){d+=parseInt(f._addon.css("border-left-width"),10)+parseInt(f._addon.css("border-right-width"),10);i+=parseInt(f._addon.css("padding-left"),10)+parseInt(f._addon.css("padding-right"),10);if(!f._spinButtonsContainer){g=2}}f.host.width(f.host.width()-(i+d)-g);h=6}f.host.height(f.baseHost.height()-(parseInt(f.host.css("border-top-width"),10)+parseInt(f.host.css("border-bottom-width"),10)+parseInt(f.host.css("padding-top"),10)+parseInt(f.host.css("padding-bottom"),10)+h));var b=f.host.height()+"px";f.host.css("min-height",b);f.host.css("line-height",b)}}}this.host.attr("disabled",this.disabled);if(!this.host.attr("placeholder")){this._refreshPlaceHolder()}},_refreshPlaceHolder:function(){if("placeholder" in this.element){this.host.attr("placeHolder",this.placeHolder)}else{var b=this;if(this.element.value===""){this.element.value=this.placeHolder;this.host.focus(function(){if(b.element.value===b.placeHolder){b.element.value=""}});this.host.blur(function(){if(b.element.value===""||b.element.value===b.placeHolder){b.element.value=b.placeHolder}})}}},destroy:function(){this.removeHandlers();if(this.baseHost){a.jqx.utilities.resize(this.baseHost,null,true);this.baseHost.remove()}else{a.jqx.utilities.resize(this.host,null,true);this.host.remove()}if(this.$popup){this.$popup.remove()}},propertyChangedHandler:function(b,d,g,f){if(d==="placeHolder"){b._refreshPlaceHolder();return}if(d==="disabled"){a.jqx.aria(b,"aria-disabled",b.disabled)}if(d==="value"&&g.toString().toUpperCase()!==f.toString().toUpperCase()){b.val(f);return}if(g!==f&&d==="radix"){b._changeRadix(f);return}if(g!==f&&d==="decimalNotation"&&b._radixNumber===10){if(f==="exponential"){b.element.value=b._getDecimalNotation("exponential")}else{b.element.value=b._number.toString(10)}}if(g!==f&&(d==="min"||d==="max")){b._setMinMax(d);b._validateValue(b.value,true);b.value=b.element.value;return}if(g!==f&&(d==="upperCase")&&b.element.value!==""){if(f===true){b.host.removeClass(b.toThemeProperty("jqx-formatted-input-lower-case"));b.host.addClass(b.toThemeProperty("jqx-formatted-input-upper-case"))}else{b.host.removeClass(b.toThemeProperty("jqx-formatted-input-upper-case"));b.host.addClass(b.toThemeProperty("jqx-formatted-input-lower-case"))}return}function c(i,j){var k=b.host.width();var h=i.outerWidth();if(j===false){b.host.width(k+h);i.hide();if(b.rtl===true){if(b.spinButtons===true){b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl-border"))}if(b.dropDown===true){b._addon.removeClass(b.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}else{b.host.width(k-h);i.show();if(b.rtl===true&&b.spinButtons===true&&b.dropDown===true){b._spinButtonsContainer.removeClass(b.toThemeProperty("jqx-formatted-input-spin-buttons-container-rtl-border"));b._addon.addClass(b.toThemeProperty("jqx-formatted-input-addon-rtl"))}}}function e(j,l){if(l===true){var k=a("<div></div>");if(b.baseHost){var h=b.baseHost.children("div");if((b.rtl===false&&j==="spinButtons")||(b.rtl===true&&j==="dropDown")){h.before(k)}else{h.after(k)}b.render();b.host.width(b.host.width()-k.outerWidth())}else{var n=b.element.id;b.host.removeAttr("id");b.host.wrap('<div id="'+n+'" style="display: inline-block;"></div>');var m=a("#"+n);if(b.rtl===false){m.append(k)}else{m.prepend(k)}var i=b.host.data();i.jqxFormattedInput.host=m;i.jqxFormattedInput.element=m[0];b.baseHost=m;b.baseHost.data(i);b.render();b.refresh()}}}if(d==="spinButtons"){if(g!==f){if(b._spinButtonsContainer){c(b._spinButtonsContainer,f)}else{e("spinButtons",f)}return}else{return}}if(g!==f&&d==="spinButtonsStep"){b._spinButtonsStepLong=new b.longObj.math.Long.fromNumber(f)}if(d==="dropDown"){if(g!==f){if(b._addon){c(b._addon,f)}else{e("dropDown",f)}return}else{return}}b.refresh()},select:function(d,e,b){var c=this;if(!b){b=c.$popup.find(".jqx-fill-state-pressed").attr("data-value")}c._changeRadix(parseInt(b,10));c._setMaxLength(true);c.close()},val:function(g){var f=this;if((g||g==="")&&!(typeof g==="object"&&a.isEmptyObject(g)===true)&&g!=="binary"&&g!=="octal"&&g!=="decimal"&&g!=="exponential"&&g!=="scientific"&&g!=="engineering"&&g!=="hexadecimal"){g=g.toString();if(g.toUpperCase()!==f.element.value.toString().toUpperCase()){var b=f.element.value;if(f.upperCase===true){g=g.toUpperCase()}var e=g.split("");for(var c=0;c<e.length;c++){if(!f._regex[""+f._radixNumber+""].test(e[c])){return}}var h=f._validateValue(g,true);f._raiseEvent("2",{value:h,oldValue:b,radix:f._radixNumber});f.value=h;return h}else{return g}}else{if(g&&!(typeof g==="object"&&a.isEmptyObject(g)===true)){if(g==="exponential"||g==="scientific"||g==="engineering"){return f._getDecimalNotation(g)}else{var d=f._getRadix(g);return f._number.toString(d)}}else{return f.element.value}}},_changeRadix:function(d){var f=this;var e=f._getRadix(d);var g=f._number.toString(e);var b=f.radix;var c=f.value;f.radix=d;f._radixNumber=e;f.element.value=g;f.value=g;this._raiseEvent("3",{radix:d,oldRadix:b,value:g,oldValue:c})},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;e.args=c;if(e.preventDefault){e.preventDefault()}var b;if(this.baseHost){b=this.baseHost.trigger(e)}else{b=this.host.trigger(e)}return b},open:function(){var f=this;if(f.value!==""&&f.value!==null){f._setPopupOptions();f._render(f._popupOptions);if(a.jqx.isHidden(this.host)){return}var c;if(f.baseHost){c=a.extend({},f.baseHost.coord(true),{height:f.baseHost[0].offsetHeight})}else{c=a.extend({},f.host.coord(true),{height:f.host[0].offsetHeight})}if(this.$popup.parent().length===0){var e=this.element.id+"_popup";this.$popup[0].id=e;a.jqx.aria(this,"aria-owns",e)}this.$popup.appendTo(a(document.body)).css({position:"absolute",zIndex:this.popupZIndex,top:c.top+c.height,left:c.left}).show();var b=0;var d=this.$popup.children();a.each(d,function(){b+=a(this).outerHeight(true)-1});this.$popup.height(b);this._opened=true;if(f.baseHost){f._addon.addClass(f.toThemeProperty("jqx-fill-state-pressed jqx-combobox-arrow-selected"));f._arrow.addClass(f.toThemeProperty("jqx-icon-arrow-down-selected"))}this._raiseEvent("0",{popup:this.$popup});a.jqx.aria(this,"aria-expanded",true);return this}},close:function(){var b=this;this.$popup.hide();this._opened=false;if(b.baseHost){b._addon.removeClass(b.toThemeProperty("jqx-fill-state-pressed jqx-combobox-arrow-selected"));b._arrow.removeClass(b.toThemeProperty("jqx-icon-arrow-down-selected"))}this._raiseEvent("1",{popup:this.$popup});a.jqx.aria(this,"aria-expanded",false);return this},_render:function(c){var e=this;c=a(c).map(function(h,j){var k=j;var f;switch(h){case 0:f=2;break;case 1:f=8;break;case 2:f=10;break;case 3:f=16;break}h=a(e.item).attr("data-value",f);h.find("a").html(k).attr("data-value",f);var g="";if(e.rtl){g=" "+e.toThemeProperty("jqx-rtl")+" "+e.toThemeProperty("jqx-formatted-input-item-rtl")}h[0].className=e.toThemeProperty("jqx-item")+" "+e.toThemeProperty("jqx-menu-item")+" "+e.toThemeProperty("jqx-formatted-input-item")+" "+e.toThemeProperty("jqx-rc-all")+g;return h[0]});var b;switch(e._radixNumber){case 2:b=0;break;case 8:b=1;break;case 10:b=2;break;case 16:b=3;break}c.eq(b).addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.$popup.html(c);if(!this.dropDownWidth){if(e.baseHost){var d=(typeof e.width==="string"&&e.width.charAt(e.width.length-1)==="%")?1:0;this.$popup.width(this.baseHost.outerWidth()-6-d)}else{this.$popup.width(this.host.outerWidth()-6)}}else{this.$popup.width(this.dropDownWidth)}return this},next:function(){var c=this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed")),b=c.next();if(!b.length){b=a(this.$popup.find("li")[0])}b.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},prev:function(){var c=this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed")),b=c.prev();if(!b.length){b=this.$popup.find("li").last()}b.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},addHandlers:function(){var c=this;this.addHandler(this.host,"focus",a.proxy(this.onFocus,this));this.addHandler(this.host,"blur",a.proxy(this.onBlur,this));this.addHandler(this.host,"keypress",a.proxy(this.keypress,this));this.addHandler(this.host,"keyup",a.proxy(this.keyup,this));this.addHandler(this.host,"keydown",a.proxy(this.keydown,this));this.addHandler(this.$popup,"mousedown",a.proxy(this.click,this));if(this.host.on){this.$popup.on("mouseenter","li",a.proxy(this.mouseenter,this))}else{this.$popup.bind("mouseenter","li",a.proxy(this.mouseenter,this))}this.addHandler(this.host,"change",function(f){f.stopPropagation();f.preventDefault()});if(c.baseHost){var d=c.baseHost.attr("id");if(c._spinButtonsContainer){var b=c._upbutton.add(c._downbutton);c.addHandler(c._upbutton,"mousedown.jqxFormattedInputSpinButtonUp"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._upbutton.addClass(c.toThemeProperty("jqx-fill-state-pressed"));c._incrementOrDecrement("add")}});c.addHandler(c._upbutton,"mouseup.jqxFormattedInputSpinButtonUp"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._upbutton.removeClass(c.toThemeProperty("jqx-fill-state-pressed"))}});c.addHandler(c._downbutton,"mousedown.jqxFormattedInputSpinButtonDown"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._downbutton.addClass(c.toThemeProperty("jqx-fill-state-pressed"));c._incrementOrDecrement("subtract")}});c.addHandler(c._downbutton,"mouseup.jqxFormattedInputSpinButtonDown"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._downbutton.removeClass(c.toThemeProperty("jqx-fill-state-pressed"))}});c.addHandler(b,"mouseenter.jqxFormattedInputSpinButtons"+d,function(g){if(!c.disabled&&c.value!==""&&c.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){c._upbutton.addClass(c.toThemeProperty("jqx-fill-state-hover"));c._upArrow.addClass(c.toThemeProperty("jqx-icon-arrow-up-hover"))}else{c._downbutton.addClass(c.toThemeProperty("jqx-fill-state-hover"));c._downArrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}}});c.addHandler(b,"mouseleave.jqxFormattedInputSpinButtons"+d,function(g){if(!c.disabled&&c.value!==""&&c.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){c._upbutton.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c._upArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-up-hover"))}else{c._downbutton.removeClass(c.toThemeProperty("jqx-fill-state-hover"));c._downArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}}});c.addHandler(a("body"),"mouseup.jqxFormattedInputSpinButtons"+d,function(){c._upbutton.add(c._downbutton).removeClass(c.toThemeProperty("jqx-fill-state-pressed"))})}if(c._addon){c.addHandler(c._addon,"click.jqxFormattedInputAddon"+d,function(){if(!c.disabled){if(c._opened){c.close()}else{c.open()}}});c.addHandler(c._addon,"mouseenter.jqxFormattedInputAddon"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._addon.addClass(c.toThemeProperty("jqx-fill-state-hover jqx-combobox-arrow-hover"));c._arrow.addClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}});c.addHandler(c._addon,"mouseleave.jqxFormattedInputAddon"+d,function(){if(!c.disabled&&c.value!==""&&c.value!==null){c._addon.removeClass(c.toThemeProperty("jqx-fill-state-hover jqx-combobox-arrow-hover"));c._arrow.removeClass(c.toThemeProperty("jqx-icon-arrow-down-hover"))}});c.addHandler(c._addon.add(c._arrow),"blur.jqxFormattedInputAddon"+d,function(){if(c._opened&&!c.disabled){c.close()}})}a.jqx.utilities.resize(c.baseHost,function(){if(c._opened===true){c.close()}var e=0;if(c._spinButtonsContainer){e+=c._spinButtonsContainer.outerWidth()}if(c._addon){e+=c._addon.outerWidth()}c.host.css("width",c.baseHost.width()-e-1)})}},removeHandlers:function(){var c=this;this.removeHandler(this.host,"focus",a.proxy(this.onFocus,this));this.removeHandler(this.host,"blur",a.proxy(this.onBlur,this));this.removeHandler(this.host,"keypress",a.proxy(this.keypress,this));this.removeHandler(this.host,"keyup",a.proxy(this.keyup,this));this.removeHandler(this.host,"keydown",a.proxy(this.keydown,this));this.removeHandler(this.$popup,"mousedown",a.proxy(this.click,this));if(this.host.off){this.$popup.off("mouseenter","li",a.proxy(this.mouseenter,this))}else{this.$popup.unbind("mouseenter","li",a.proxy(this.mouseenter,this))}if(c.baseHost){var d=c.baseHost.attr("id");if(c._spinButtonsContainer){var b=c._upbutton.add(c._downbutton);c.removeHandler(c._upbutton,"mousedown.jqxFormattedInputSpinButtonUp"+d);c.removeHandler(c._upbutton,"mouseup.jqxFormattedInputSpinButtonUp"+d);c.removeHandler(c._downbutton,"mousedown.jqxFormattedInputSpinButtonDown"+d);c.removeHandler(c._downbutton,"mouseup.jqxFormattedInputSpinButtonDown"+d);c.removeHandler(b,"mouseenter.jqxFormattedInputSpinButtons"+d);c.removeHandler(b,"mouseleave.jqxFormattedInputSpinButtons"+d);c.removeHandler(a("body"),"mouseup.jqxFormattedInputSpinButtons"+d)}if(c._addon){c.removeHandler(c._addon,"click.jqxFormattedInputAddon"+d);c.removeHandler(c._addon,"mouseenter.jqxFormattedInputAddon"+d);c.removeHandler(c._addon,"mouseleave.jqxFormattedInputAddon"+d);c.removeHandler(c._addon.add(c._arrow),"blur.jqxFormattedInputAddon"+d)}}},move:function(b){if(!this._opened){return}switch(b.keyCode){case 9:case 13:case 27:b.preventDefault();break;case 38:b.preventDefault();this.prev();break;case 40:b.preventDefault();this.next();break}b.stopPropagation()},keydown:function(k){var j=this;this.suppressKeyPressRepeat=~a.inArray(k.keyCode,[40,38,9,13,27]);this.move(k);var o=!k.charCode?k.which:k.charCode;var m=String.fromCharCode(o);if(k.altKey===true){if(o===40){if(j._addon){this.open()}return}else{if(o===38){if(j._addon){this.close()}return}}}if(k.ctrlKey===true&&o===67){return}var d=[8,9,13,37,38,39,40,46,88];var i=j._regex[""+j._radixNumber+""];if(d.indexOf(o)===-1&&(!i.test(m)&&!i.test(k.key)&&!i.test(k["char"]))){k.preventDefault();return false}else{var l=j.host[0].selectionStart;var g=j.host[0].selectionEnd-l;var f=this._getCaretPosition(this.host[0]);var b=this.element.value;var c=b.split("");if(o===8){if(g>0){c.splice(l,g)}else{c.splice(f-1,1)}}else{if(o===46){if(g>0){c.splice(l,g)}else{c.splice(f,1)}}else{if(o===88){if(k.ctrlKey===true){if(g>0){c.splice(l,g)}}else{k.preventDefault()}}else{if(o===189){if(c[0]==="-"){c.splice(0,1);j._minus=false}else{c.splice(0,0,"-");j._minus=true}k.preventDefault()}else{var h=d.indexOf(o)===-1?m:"";if(g>0){c.splice(l,g);c.splice(l,0,h)}else{c.splice(f,0,h)}}}}}c=c.join("");if(c!==b){var n=j._validateValue(c,false);if(n===false){j._inputAndAddon.addClass(j.toThemeProperty("jqx-input-invalid"))}else{j._inputAndAddon.removeClass(j.toThemeProperty("jqx-input-invalid"))}}}},keypress:function(c){var b=this;if(b.suppressKeyPressRepeat){return}b.move(c)},keyup:function(c){var b=this;switch(c.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(this._opened){this.select(c,this)}else{b._change()}break;case 27:if(!this._opened){return}this.close();break;case 189:if(b._radixNumber===10){if(b._minus===true){b.element.value="-"+b.element.value}else{b.element.value=b.element.value.slice(1)}}break}c.stopPropagation();c.preventDefault();if(b.element.value!==""){if(b.upperCase){b.host.addClass(b.toThemeProperty("jqx-formatted-input-upper-case"))}else{b.host.addClass(b.toThemeProperty("jqx-formatted-input-lower-case"))}if(b._spinButtonsContainer){b._spinButtonsContainer.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}if(b._addon){b._addon.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}}else{b.host.removeClass(b.toThemeProperty("jqx-formatted-input-upper-case jqx-formatted-input-lower-case"));if(b._spinButtonsContainer){b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}if(b._addon){b._addon.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}}},_getCaretPosition:function(b){var d=0;if(document.selection){b.focus();var c=document.selection.createRange();c.moveStart("character",-b.value.length);d=c.text.length}else{if(b.selectionStart||b.selectionStart==="0"){d=b.selectionStart}}return(d)},onBlur:function(){var b=this;if(b._opened){b.close()}b._setMaxLength();b._inputAndAddon.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._change();if(b._radixNumber===10&&b.decimalNotation==="exponential"){b.element.value=b._getDecimalNotation("exponential")}b._refreshPlaceHolder()},onFocus:function(){var b=this;b._setMaxLength(true);b._inputAndAddon.addClass(b.toThemeProperty("jqx-fill-state-focus"));if(b._radixNumber===10&&b.decimalNotation==="exponential"){b.element.value=b._number.toString(10)}},click:function(c){c.stopPropagation();c.preventDefault();var b=a(c.target).attr("data-value");this.select(c,this,b)},mouseenter:function(b){this.$popup.find(".jqx-fill-state-pressed").removeClass(this.toThemeProperty("jqx-fill-state-pressed"));a(b.currentTarget).addClass(this.toThemeProperty("jqx-fill-state-pressed"))},_change:function(){var c=this;var b=c.value;var d=c._validateValue(c.element.value,true);c._inputAndAddon.removeClass(c.toThemeProperty("jqx-input-invalid"));if(d.toUpperCase()!==b.toString().toUpperCase()){c._raiseEvent("2",{value:d,oldValue:b,radix:c._radixNumber});c.value=d}},_getRadix:function(b){switch(b){case 10:case"decimal":return 10;case 2:case"binary":return 2;case 8:case"octal":return 8;case 16:case"hexadecimal":return 16}},_setPopupOptions:function(){var b=this;b._popupOptions=new Array();b._popupOptions.push(b._number.toString(2)+" <em>(BIN)</em>");b._popupOptions.push(b._number.toString(8)+" <em>(OCT)</em>");b._popupOptions.push(b._number.toString(10)+" <em>(DEC)</em>");b._popupOptions.push(b._number.toString(16)+" <em>(HEX)</em>")},_validateValue:function(e,g){var d=this;if(e!==""){var f=new d.longObj.math.Long.fromString((e).toString(),d._radixNumber);if(f.lessThan(d._minLong)){if(g){d._number=d._minLong;var c=d._minLong.toString(d._radixNumber);if(d._radixNumber===16&&d.upperCase===true){c=c.toUpperCase()}d.element.value=c;return c}else{return false}}else{if(f.greaterThan(d._maxLong)){if(g){d._number=d._maxLong;var b=d._maxLong.toString(d._radixNumber);if(d._radixNumber===16&&d.upperCase===true){b=b.toUpperCase()}d.element.value=b;return b}else{return false}}else{if(g){d._number=f;d.element.value=e;return e}else{return true}}}}else{if(g){d.element.value="";return e}else{return true}}},_getNegativeDecimal:function(l,h){var o=l;if(h===8){var n=new Array();for(var f=0;f<11;f++){var b=parseInt(l.charAt(f),8).toString(2);while(b.length!==3){b="0"+b}n.push(b)}o=n.join("");if(o.charAt(0)==="0"){o=o.slice(1)}}else{if(h===16){var p=new Array();for(var e=0;e<8;e++){var m=parseInt(l.charAt(e),16).toString(2);while(m.length!==4){m="0"+m}p.push(m)}o=p.join("")}}var d="";for(var c=0;c<o.length;c++){var g=o.charAt(c)==="1"?"0":"1";d+=g}d=(parseInt(d,2)+1)*-1;return d},_setMaxLength:function(c){var d=this;var b;if(c===true){switch(d._radixNumber){case 2:b=64;break;case 8:b=22;break;case 10:b=20;break;case 16:b=16;break}}else{b=524288}d.host.attr("maxlength",b)},_setMinMax:function(b){var c=this;c["_"+b+"Long"]=new c.longObj.math.Long.fromString((c[b]).toString(),c._radixNumber)},_getDecimalNotation:function(c){var e=this;var f=e._number.toString(10);function h(k){if(k==="0"){return parseInt(k).toExponential()}var j;if(k.charAt(0)==="-"){j="-";k=k.slice(1,k.length)}else{j=""}var l=k.length-1;while(k.charAt(k.length-1)==="0"){k=k.slice(0,k.length-1)}var i=k.slice(1,k.length);if(i!==""){i="."+i}return j+""+k.charAt(0)+i+"e+"+l}function d(l){var k=l.indexOf("e");var j=l.slice(k+1);var i=l.slice(0,k+1);i=i.replace("e","×10");i+=e._toSuperScript(j);i=i.replace("+","");return i}function b(o){var n=o.indexOf("e");var m=o.slice(n+1);var k=o.slice(0,n);var l=parseInt(m,10)%3;k=k*Math.pow(10,l);var j=o.slice(0,n).length-l-2;if(j>=0){k=k.toFixed(j)}var i=k+"×10"+e._toSuperScript((parseInt(m,10)-l).toString());return i}var g=h(f);if(c==="scientific"){return d(g)}else{if(c==="engineering"){return b(g)}else{return g}}},_toSuperScript:function(h,g){var f="-0123456789";var d="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";var c="";for(var e=0;e<h.length;e++){if(g===true){var b=d.indexOf(h.charAt(e));c+=(b!==-1?f[b]:h[e])}else{var j=f.indexOf(h.charAt(e));c+=(j!==-1?d[j]:h[e])}}return c},_incrementOrDecrement:function(c){var b=this;if(b._number.toString(b._radixNumber)!==b.element.value){b._number=new b.longObj.math.Long.fromString(b.element.value,b._radixNumber)}b._number=b._number[c](b._spinButtonsStepLong);b.element.value=b._number.toString(b._radixNumber);b._change()},_negativeBinary:function(u,r){var s="";u=u.slice(1,u.length);while(u.length<64){u="0"+u}for(var o=0;o<u.length;o++){var t=u.charAt(o)==="1"?"0":"1";s+=t}var d=true;var g="";for(var n=s.length-1;n>=0;n--){var q=s.charAt(n);var b;if(q==="0"){if(d===true){b="1";d=false}else{b="0"}}else{if(d===true){b="0"}else{b="1"}}g=b+""+g}switch(r){case 2:return g;case 8:g="00"+g;var f="";for(var m=22;m>=1;m--){var p=g[m*3-3]+""+g[m*3-2]+""+g[m*3-1];f=parseInt(p,2).toString(8)+""+f}return f;case 16:var e="";for(var h=16;h>=1;h--){var c=g[h*4-4]+""+g[h*4-3]+""+g[h*4-2]+""+g[h*4-1];e=parseInt(c,2).toString(16)+""+e}return e}},_Long:function(){var c=this;c.longObj=new Object();var b=c.longObj;b.math=new Object();b.math.Long=new Object();b.math.Long=function(d,e){this.lowBits=d|0;this.highBits=e|0};b.math.Long.IntCache={};b.math.Long.fromInt=function(d){if(-128<=d&&d<128){var f=b.math.Long.IntCache[d];if(f){return f}}var e=new b.math.Long(d|0,d<0?-1:0);if(-128<=d&&d<128){b.math.Long.IntCache[d]=e}return e};b.math.Long.fromNumber=function(d){if(isNaN(d)||!isFinite(d)){return b.math.Long.ZERO}else{if(d<=-b.math.Long.TWO_PWR_63_DBL_){return b.math.Long.MIN_VALUE}else{if(d+1>=b.math.Long.TWO_PWR_63_DBL_){return b.math.Long.MAX_VALUE}else{if(d<0){return b.math.Long.fromNumber(-d).negate()}else{return new b.math.Long((d%b.math.Long.TWO_PWR_32_DBL_)|0,(d/b.math.Long.TWO_PWR_32_DBL_)|0)}}}}};b.math.Long.fromBits=function(d,e){return new b.math.Long(d,e)};b.math.Long.fromString=function(f,j){if(f.length===0){throw new Error("number format error: empty string")}var g=j||10;if(g<2||36<g){throw new Error("radix out of range: "+g)}if(f.charAt(0)==="-"){return b.math.Long.fromString(f.substring(1),g).negate()}else{if(f.indexOf("-")>=0){throw new Error('number format error: interior "-" character: '+f)}}var k=b.math.Long.fromNumber(Math.pow(g,8));var m=b.math.Long.ZERO;for(var e=0;e<f.length;e+=8){var l=Math.min(8,f.length-e);var h=parseInt(f.substring(e,e+l),g);if(l<8){var d=b.math.Long.fromNumber(Math.pow(g,l));m=m.multiply(d).add(b.math.Long.fromNumber(h))}else{m=m.multiply(k);m=m.add(b.math.Long.fromNumber(h))}}return m};b.math.Long.TWO_PWR_16_DBL_=1<<16;b.math.Long.TWO_PWR_24_DBL_=1<<24;b.math.Long.TWO_PWR_32_DBL_=b.math.Long.TWO_PWR_16_DBL_*b.math.Long.TWO_PWR_16_DBL_;b.math.Long.TWO_PWR_31_DBL_=b.math.Long.TWO_PWR_32_DBL_/2;b.math.Long.TWO_PWR_48_DBL_=b.math.Long.TWO_PWR_32_DBL_*b.math.Long.TWO_PWR_16_DBL_;b.math.Long.TWO_PWR_64_DBL_=b.math.Long.TWO_PWR_32_DBL_*b.math.Long.TWO_PWR_32_DBL_;b.math.Long.TWO_PWR_63_DBL_=b.math.Long.TWO_PWR_64_DBL_/2;b.math.Long.ZERO=b.math.Long.fromInt(0);b.math.Long.ONE=b.math.Long.fromInt(1);b.math.Long.NEG_ONE=b.math.Long.fromInt(-1);b.math.Long.MAX_VALUE=b.math.Long.fromBits(4294967295|0,2147483647|0);b.math.Long.MIN_VALUE=b.math.Long.fromBits(0,2147483648|0);b.math.Long.TWO_PWR_24_=b.math.Long.fromInt(1<<24);b.math.Long.prototype.toInt=function(){return this.lowBits};b.math.Long.prototype.toNumber=function(){return this.highBits*b.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()};b.math.Long.prototype.toString=function(j){var h=j||10;if(h<2||36<h){throw new Error("radix out of range: "+h)}if(this.isZero()){return"0"}var k,m;if(this.isNegative()){if(this.equals(b.math.Long.MIN_VALUE)){var f=b.math.Long.fromNumber(h);var d=this.div(f);k=d.multiply(f).subtract(this);return d.toString(h)+k.toInt().toString(h)}else{switch(h){case 2:case 8:case 16:m="-"+this.negate().toString(2);return c._negativeBinary(m,h);default:m="-"+this.negate().toString(h);return m}}}var l=b.math.Long.fromNumber(Math.pow(h,6));k=this;m="";while(true){var i=k.div(l);var g=k.subtract(i.multiply(l)).toInt();var e=g.toString(h);k=i;if(k.isZero()){return e+m}else{while(e.length<6){e="0"+e}m=""+e+m}}};b.math.Long.prototype.getHighBits=function(){return this.highBits};b.math.Long.prototype.getLowBits=function(){return this.lowBits};b.math.Long.prototype.getLowBitsUnsigned=function(){return(this.lowBits>=0)?this.lowBits:b.math.Long.TWO_PWR_32_DBL_+this.lowBits};b.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative()){if(this.equals(b.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var e=this.highBits!==0?this.highBits:this.lowBits;for(var d=31;d>0;d--){if((e&(1<<d))!==0){break}}return this.highBits!==0?d+33:d+1}};b.math.Long.prototype.isZero=function(){return this.highBits===0&&this.lowBits===0};b.math.Long.prototype.isNegative=function(){return this.highBits<0};b.math.Long.prototype.isOdd=function(){return(this.lowBits&1)===1};b.math.Long.prototype.equals=function(d){return(this.highBits===d.highBits)&&(this.lowBits===d.lowBits)};b.math.Long.prototype.notEquals=function(d){return(this.highBits!==d.highBits)||(this.lowBits!==d.lowBits)};b.math.Long.prototype.lessThan=function(d){return this.compare(d)<0};b.math.Long.prototype.lessThanOrEqual=function(d){return this.compare(d)<=0};b.math.Long.prototype.greaterThan=function(d){return this.compare(d)>0};b.math.Long.prototype.greaterThanOrEqual=function(d){return this.compare(d)>=0};b.math.Long.prototype.compare=function(e){if(this.equals(e)){return 0}var d=this.isNegative();var f=e.isNegative();if(d&&!f){return -1}if(!d&&f){return 1}if(this.subtract(e).isNegative()){return -1}else{return 1}};b.math.Long.prototype.negate=function(){if(this.equals(b.math.Long.MIN_VALUE)){return b.math.Long.MIN_VALUE}else{return this.not().add(b.math.Long.ONE)}};b.math.Long.prototype.add=function(k){var i=this.highBits>>>16;var e=this.highBits&65535;var l=this.lowBits>>>16;var f=this.lowBits&65535;var n=k.highBits>>>16;var g=k.highBits&65535;var o=k.lowBits>>>16;var h=k.lowBits&65535;var p=0,j=0,d=0,m=0;m+=f+h;d+=m>>>16;m&=65535;d+=l+o;j+=d>>>16;d&=65535;j+=e+g;p+=j>>>16;j&=65535;p+=i+n;p&=65535;return b.math.Long.fromBits((d<<16)|m,(p<<16)|j)};b.math.Long.prototype.subtract=function(d){return this.add(d.negate())};b.math.Long.prototype.multiply=function(k){if(this.isZero()){return b.math.Long.ZERO}else{if(k.isZero()){return b.math.Long.ZERO}}if(this.equals(b.math.Long.MIN_VALUE)){return k.isOdd()?b.math.Long.MIN_VALUE:b.math.Long.ZERO}else{if(k.equals(b.math.Long.MIN_VALUE)){return this.isOdd()?b.math.Long.MIN_VALUE:b.math.Long.ZERO}}if(this.isNegative()){if(k.isNegative()){return this.negate().multiply(k.negate())}else{return this.negate().multiply(k).negate()}}else{if(k.isNegative()){return this.multiply(k.negate()).negate()}}if(this.lessThan(b.math.Long.TWO_PWR_24_)&&k.lessThan(b.math.Long.TWO_PWR_24_)){return b.math.Long.fromNumber(this.toNumber()*k.toNumber())}var i=this.highBits>>>16;var e=this.highBits&65535;var l=this.lowBits>>>16;var f=this.lowBits&65535;var n=k.highBits>>>16;var g=k.highBits&65535;var o=k.lowBits>>>16;var h=k.lowBits&65535;var p=0,j=0,d=0,m=0;m+=f*h;d+=m>>>16;m&=65535;d+=l*h;j+=d>>>16;d&=65535;d+=f*o;j+=d>>>16;d&=65535;j+=e*h;p+=j>>>16;j&=65535;j+=l*o;p+=j>>>16;j&=65535;j+=f*g;p+=j>>>16;j&=65535;p+=i*h+e*o+l*g+f*n;p&=65535;return b.math.Long.fromBits((d<<16)|m,(p<<16)|j)};b.math.Long.prototype.div=function(f){if(f.isZero()){throw new Error("division by zero")}else{if(this.isZero()){return b.math.Long.ZERO}}var i,k;if(this.equals(b.math.Long.MIN_VALUE)){if(f.equals(b.math.Long.ONE)||f.equals(b.math.Long.NEG_ONE)){return b.math.Long.MIN_VALUE}else{if(f.equals(b.math.Long.MIN_VALUE)){return b.math.Long.ONE}else{var d=this.shiftRight(1);i=d.div(f).shiftLeft(1);if(i.equals(b.math.Long.ZERO)){return f.isNegative()?b.math.Long.ONE:b.math.Long.NEG_ONE}else{k=this.subtract(f.multiply(i));var m=i.add(k.div(f));return m}}}}else{if(f.equals(b.math.Long.MIN_VALUE)){return b.math.Long.ZERO}}if(this.isNegative()){if(f.isNegative()){return this.negate().div(f.negate())}else{return this.negate().div(f).negate()}}else{if(f.isNegative()){return this.div(f.negate()).negate()}}var g=b.math.Long.ZERO;k=this;while(k.greaterThanOrEqual(f)){i=Math.max(1,Math.floor(k.toNumber()/f.toNumber()));var l=Math.ceil(Math.log(i)/Math.LN2);var j=(l<=48)?1:Math.pow(2,l-48);var e=b.math.Long.fromNumber(i);var h=e.multiply(f);while(h.isNegative()||h.greaterThan(k)){i-=j;e=b.math.Long.fromNumber(i);h=e.multiply(f)}if(e.isZero()){e=b.math.Long.ONE}g=g.add(e);k=k.subtract(h)}return g};b.math.Long.prototype.modulo=function(d){return this.subtract(this.div(d).multiply(d))};b.math.Long.prototype.not=function(){return b.math.Long.fromBits(~this.lowBits,~this.highBits)};b.math.Long.prototype.and=function(d){return b.math.Long.fromBits(this.lowBits&d.lowBits,this.highBits&d.highBits)};b.math.Long.prototype.or=function(d){return b.math.Long.fromBits(this.lowBits|d.lowBits,this.highBits|d.highBits)};b.math.Long.prototype.xor=function(d){return b.math.Long.fromBits(this.lowBits^d.lowBits,this.highBits^d.highBits)};b.math.Long.prototype.shiftLeft=function(f){f&=63;if(f===0){return this}else{var d=this.lowBits;if(f<32){var e=this.highBits;return b.math.Long.fromBits(d<<f,(e<<f)|(d>>>(32-f)))}else{return b.math.Long.fromBits(0,d<<(f-32))}}};b.math.Long.prototype.shiftRight=function(f){f&=63;if(f===0){return this}else{var e=this.highBits;if(f<32){var d=this.lowBits;return b.math.Long.fromBits((d>>>f)|(e<<(32-f)),e>>f)}else{return b.math.Long.fromBits(e>>(f-32),e>=0?0:-1)}}};b.math.Long.prototype.shiftRightUnsigned=function(f){f&=63;if(f===0){return this}else{var e=this.highBits;if(f<32){var d=this.lowBits;return b.math.Long.fromBits((d>>>f)|(e<<(32-f)),e>>>f)}else{if(f===32){return b.math.Long.fromBits(e,0)}else{return b.math.Long.fromBits(e>>>(f-32),0)}}}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(d){var b={defineInstance:function(){var e={width:350,height:350,radius:"50%",endAngle:270,startAngle:30,value:0,min:0,max:220,disabled:false,ticksDistance:"20%",colorScheme:"scheme01",animationDuration:400,showRanges:true,easing:"easeOutCubic",labels:null,pointer:null,cap:null,caption:null,border:null,ticksMinor:null,ticksMajor:null,style:null,ranges:[],_radius:100,_border:null,_radiusDifference:2,_pointer:null,_labels:[],_cap:null,_ticks:[],_ranges:[],_gauge:null,_caption:null,_animationTimeout:10,renderer:null,_animations:[],aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}}};d.extend(true,this,e);return e},createInstance:function(f){var e=this;e.that=this;d.jqx.aria(e);e._radius=e.radius;e.value=new Number(e.value);e.endAngle=e.endAngle*Math.PI/180+Math.PI/2;e.startAngle=e.startAngle*Math.PI/180+Math.PI/2;e._refresh();e.setValue(e.value,0);e.renderer.getContainer().css("overflow","hidden");d.jqx.utilities.resize(e.host,function(){e._refresh()});e.host.addClass(e.toThemeProperty("jqx-widget"))},_validateEasing:function(){return !!d.easing[this.easing]},_validateProperties:function(){if(this.startAngle===this.endAngle){throw new Error("The end angle can not be equal to the start angle!")}if(!this._validateEasing()){this.easing="linear"}this.ticksDistance=this._validatePercentage(this.ticksDistance,"20%");this.border=this._borderConstructor(this.border,this);this.style=this.style||{fill:"#ffffff",stroke:"#E0E0E0"};this.ticksMinor=new this._tickConstructor(this.ticksMinor,this);this.ticksMajor=new this._tickConstructor(this.ticksMajor,this);this.cap=new this._capConstructor(this.cap,this);this.pointer=new this._pointerConstructor(this.pointer,this);this.labels=new this._labelsConstructor(this.labels,this);this.caption=new this._captionConstructor(this.caption,this);for(var e=0;e<this.ranges.length;e+=1){this.ranges[e]=new this._rangeConstructor(this.ranges[e],this)}},_hostInit:function(){var h=this._getScale(this.width,"width",this.host.parent()),e=this._getScale(this.height,"height",this.host.parent()),g=this._outerBorderOffset(),i=this.host,f;i.width(h);i.height(e);this.radius=f=(this._getScale(this._radius,"width",this.host)||h/2)-g;this._originalRadius=parseInt(this.radius,10)-this._radiusDifference;this._innerRadius=this._originalRadius;if(this.border){this._innerRadius-=this._getSize(this.border.size)}i[0].innerHTML="<div />";this._gaugeParent=i.children();this._gaugeParent.width(h);this._gaugeParent.height(e);this.renderer.init(this._gaugeParent)},_initRenderer:function(e){if(!d.jqx.createRenderer){throw"Please include a reference to jqxdraw.js"}return d.jqx.createRenderer(this,e)},_refresh:function(){var e=this;if(!e.renderer){e._isVML=false;e.host.empty();e._initRenderer(e.host)}var f=e.renderer;if(!f){return}if(e._ranges){d(e._ranges).remove()}if(e._pointer){d(e._pointer).remove()}if(e._labels){d(e._labels).remove()}if(e._cap){d(e._cap).remove()}if(e._ticks){d(e._ticks).remove()}if(e._border){d(e._border).remove()}if(e._caption){d(e._caption).remove()}e._caption=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._pointer=null;e._validateProperties();e._removeElements();e._hostInit();e._render();e.setValue(this.value,0)},val:function(e){if(arguments.length==0||typeof(e)=="object"){return this.value}this.setValue(e,0)},refresh:function(){this._refresh.apply(this,Array.prototype.slice(arguments))},_outerBorderOffset:function(){var e=parseInt(this.border.style["stroke-width"],10)||1;return e/2},_removeCollection:function(f){for(var e=0;e<f.length;e+=1){d(f[e]).remove()}f=[]},_render:function(){this._addBorder();this._addGauge();this._addRanges();this._addTicks();this._addLabels();this._addCaption();this._addPointer();this._addCap()},_addBorder:function(){if(!this.border.visible){return}var e=this.border.style.fill,f=this._outerBorderOffset();if(!e){e="#BABABA"}if(this.border.showGradient){if(e.indexOf("url")<0&&e.indexOf("#grd")<0){this._originalColor=e}else{e=this._originalColor}e=this.renderer._toLinearGradient(e,true,[[0,1],[25,1.1],[50,1.5],[100,1]])}this._border=this.renderer.circle(this._originalRadius+f,this._originalRadius+f,this._originalRadius);this.border.style.fill=e;this.renderer.attr(this._border,this.border.style)},_addGauge:function(){var g=this._originalRadius,e=this.renderer._toLinearGradient("#ffffff",[[3,2],[100,1]],true),f=this._outerBorderOffset();this._gauge=this.renderer.circle(g+f,g+f,this._innerRadius);this.renderer.attr(this._gauge,this.style)},_addCap:function(){var e="visible",g=this._outerBorderOffset();if(!this.cap.visible){e="hidden"}var h=this._originalRadius,f=this._getSize(this.cap.size),i;i=this.renderer.circle(h+g,h+g,f);this._capCenter=[h,h];this.renderer.attr(i,this.cap.style);d(i).css("visibility",e);this._cap=i},_addTicks:function(){var e=this.ticksMinor,l=this.ticksMajor,h=e.interval,k=l.interval,m={};for(var g=this.min,f=this.min;g<=this.max||f<=this.max;g+=h,f+=k){if(f<=this.max&&l.visible){this._drawTick({angle:this._getAngleByValue(f),distance:this._getDistance(this.ticksDistance),style:l.style,size:this._getSize(l.size),type:"major"});m[f.toFixed(5)]=true}if(!m[g.toFixed(5)]&&e.visible){if(g<=this.max){this._drawTick({angle:this._getAngleByValue(g),distance:this._getDistance(this.ticksDistance),style:e.style,size:this._getSize(e.size),type:"minor"})}}}this._handleTicksVisibility()},_handleTicksVisibility:function(){if(!this.ticksMinor.visible){this.host.children(".jqx-gauge-tick-minor").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-minor").css("visibility","visible")}if(!this.ticksMajor.visible){this.host.children(".jqx-gauge-tick-major").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-major").css("visibility","visible")}},_getSize:function(e){if(e.toString().indexOf("%")>=0){e=(parseInt(e,10)/100)*this._innerRadius}e=parseInt(e,10);return e},_getDistance:function(e){return this._getSize(e)+(this._originalRadius-this._innerRadius)},_drawTick:function(s){var l=this.that;var j=s.angle,g=s.distance,q=s.size,k=l._outerBorderOffset(),e=l._originalRadius,i=e-g,m=i-q,h=e+k+i*Math.sin(j),o=e+k+i*Math.cos(j),f=e+k+m*Math.sin(j),n=e+k+m*Math.cos(j),p;s.style["class"]=l.toThemeProperty("jqx-gauge-tick-"+s.type);if(l._isVML){h=Math.round(h);f=Math.round(f);o=Math.round(o);n=Math.round(n)}p=l.renderer.line(h,o,f,n,s.style);l._ticks.push(p)},_addRanges:function(){var f="visible";if(!this.showRanges){f="hidden"}else{var e=this.ranges;for(var g=0;g<e.length;g+=1){this._addRange(e[g],f)}}},_getMaxRangeSize:function(){var f,h=-1,j,e;for(var g=0;g<this.ranges.length;g+=1){j=this.ranges[g].startWidth;e=this.ranges[g].endWidth;if(j>h){h=j}if(e>h){h=e}}return h},_getRangeDistance:function(i,e){var h=this._getLabelsDistance(),f=this._getDistance(i),g=this._getMaxRangeSize();if(this.labels.position==="outside"){if(h<f+this._getMaxTickSize()){return this._getDistance(this.ticksDistance)+g/2+this._getSize(this.ticksMajor.size)}}else{if(this.labels.position==="inside"){if(h+this._getMaxTickSize()<f){return this._getSize(this.border.size)+this._originalRadius/20}}}return f},_addRange:function(m,g){var n=this.that;if(m.startValue<n.min||m.endValue>n.max){return}var q=n._getAngleByValue(m.startValue),j=n._getAngleByValue(m.endValue),o=n._originalRadius,f=o-n._getRangeDistance(m.startDistance,m.startWidth),s=o-n._getRangeDistance(m.endDistance,m.endWidth),l=m.startWidth,e=m.endWidth,k=n._outerBorderOffset(),i={x:o+k+f*Math.sin(q),y:o+k+f*Math.cos(q)},r={x:o+k+s*Math.sin(j),y:o+k+s*Math.cos(j)},t=n._getProjectionPoint(q,o+k,f,l),p=n._getProjectionPoint(j,o+k,s,e),h="default",u,m;if(Math.abs(j-q)>Math.PI){h="opposite"}if(n._isVML){u=n._rangeVMLRender(i,r,o,t,p,e,l,f,s,h)}else{u=n._rangeSVGRender(i,r,o,t,p,e,l,f,s,h)}m.style.visibility=g;m.style["class"]=n.toThemeProperty("jqx-gauge-range");m=n.renderer.path(u,m.style);n._ranges.push(m)},_rangeSVGRender:function(i,m,k,o,l,e,j,f,n,h){var p="",f=k-f,n=k-n,g=["0,1","0,0"];if(h==="opposite"){g=["1,1","1,0"]}p="M"+i.x+","+i.y+" ";p+="A"+(k-f)+","+(k-f)+" 100 "+g[0]+" "+m.x+","+m.y+" ";p+="L "+(l.x)+","+(l.y)+" ";p+="A"+(k-e-f)+","+(k-e-f)+" 100 "+g[1]+" "+(o.x)+","+(o.y)+" ";p+="L "+(i.x)+","+(i.y)+" ";p+="z";return p},_rangeVMLRender:function(p,m,h,w,i,l,n,q,s,f){h-=h-q+10;var o="",r=Math.floor(h+(n+l)/2),q=Math.floor(h-q),s=Math.floor(s),t={x:(w.x+i.x)/2,y:(w.y+i.y)/2},e=Math.sqrt((i.x-w.x)*(i.x-w.x)+(i.y-w.y)*(i.y-w.y)),v=Math.floor(t.x+Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e),u=Math.floor(t.y+Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e),x={x:(p.x+m.x)/2,y:(p.y+m.y)/2},g=Math.sqrt((m.x-p.x)*(m.x-p.x)+(m.y-p.y)*(m.y-p.y)),k=Math.floor(x.x+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g),j=Math.floor(x.y+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g);if(f==="opposite"){v=Math.floor(t.x-Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e);u=Math.floor(t.y-Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e);k=Math.floor(x.x-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g);j=Math.floor(x.y-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g)}h=Math.floor(h);m={x:Math.floor(m.x),y:Math.floor(m.y)};p={x:Math.floor(p.x),y:Math.floor(p.y)};w={x:Math.floor(w.x),y:Math.floor(w.y)};i={x:Math.floor(i.x),y:Math.floor(i.y)};o="m "+m.x+","+m.y;o+="at "+(k-r)+" "+(j-r)+" "+(r+k)+" "+(r+j)+" "+m.x+","+m.y+" "+p.x+","+p.y;o+="l "+w.x+","+w.y;o+="m "+m.x+","+m.y;o+="l "+i.x+","+i.y;o+="at "+(v-h)+" "+(u-h)+" "+(h+v)+" "+(h+u)+" "+i.x+","+i.y+" "+w.x+","+w.y;o+="qx "+w.x+" "+w.y;return o},_getProjectionPoint:function(i,f,h,g){var e={x:f+(h-g)*Math.sin(i),y:f+(h-g)*Math.cos(i)};return e},_addLabels:function(f){var g=this._getDistance(this._getLabelsDistance());for(var e=this.min;e<=this.max;e+=this.labels.interval){if(this.labels.visible){this._addLabel({angle:this._getAngleByValue(e),value:this.labels.interval>=1?e:new Number(e).toFixed(2),distance:g,style:this.labels.className})}}},_getLabelsDistance:function(){var g=this._getMaxLabelSize(),f=this._getDistance(this.labels.distance),e=this._getDistance(this.ticksDistance);g=g.width;if(this.labels.position==="inside"){return e+g-5}else{if(this.labels.position==="outside"){if(f<(e-g*1.5)){return f}return Math.max(e-g*1.5,0.6*g)}}return this.labels.distance},_addLabel:function(s){var j=this.that;var g=s.angle,f=j._originalRadius,p=f-s.distance,h=j.labels.offset,q=j.labels.formatValue,i=j._outerBorderOffset(),n=f+i+p*Math.sin(g)+h[0],l=f+i+p*Math.cos(g)+h[1],o=s.value,k=s.style||"",e,m;if(typeof q==="function"){o=q(o)}e=j.renderer.measureText(o,0,{"class":k});m=j.renderer.text(o,Math.round(n)-e.width/2,Math.round(l),e.width,e.height,0,{"class":this.toThemeProperty("jqx-gauge-label")});j._labels.push(m)},_addCaption:function(){var i=this.that;var k=i.caption.value,j=i.toThemeProperty("jqx-gauge-caption"),g=i.caption.offset,m=i.renderer.measureText(k,0,{"class":j}),h=i._getPosition(this.caption.position,m,g),e=i.caption.style,f=i._outerBorderOffset(),l=i.renderer.text(k,h.left+f,h.top+f,m.width,m.height,0,{"class":j});this._caption=l},_getPosition:function(e,f,j){var i=0,h=0,g=this._originalRadius;switch(e){case"left":i=(g-f.width)/2;h=g-f.height/2;break;case"right":i=g+(g-f.width)/2;h=g-f.height/2;break;case"bottom":i=(2*g-f.width)/2;h=(g+2*g-f.height)/2;break;default:i=(2*g-f.width)/2;h=(g+f.height)/2;break}return{left:i+j[0],top:h+j[1]}},_addPointer:function(){var g="visible";if(!this.pointer.visible){g="hidden"}var f=this._originalRadius,i=this._getSize(this.pointer.length),j=i*0.9,k=this._getAngleByValue(this.value),e=this.pointer.pointerType,h;h=this._computePointerPoints(this._getSize(this.pointer.width),k,i,e!=="default");this._pointer=this.renderer.path(h,this.pointer.style);d(this._pointer).css("visibility",g)},_computePointerPoints:function(e,g,h,f){if(!f){return this._computeArrowPoints(e,g,h)}else{return this._computeRectPoints(e,g,h)}},_computeArrowPoints:function(n,g,k){var f=this._originalRadius-0.5,l=Math.sin(g),q=Math.cos(g),j=this._outerBorderOffset(),o=f+j+k*l,m=f+j+k*q,i=f+j+n*q,e=f+j-n*l,h=f+j-n*q,s=f+j+n*l,p;if(this._isVML){i=Math.round(i);h=Math.round(h);e=Math.round(e);s=Math.round(s);o=Math.round(o);m=Math.round(m)}p="M "+i+","+e+" L "+h+","+s+" L "+o+","+m+"";return p},_computeRectPoints:function(q,i,o){var f=this._originalRadius,p=Math.sin(i),t=Math.cos(i),u=o,l=this._outerBorderOffset(),n=f+l-q*t+o*p,h=f+l+q*p+o*t,m=f+l+q*t+o*p,g=f+l-q*p+o*t,k=f+l+q*t,e=f+l-q*p,j=f+l-q*t,v=f+l+q*p,s;if(this._isVML){k=Math.round(k);j=Math.round(j);e=Math.round(e);v=Math.round(v);n=Math.round(n);h=Math.round(h);m=Math.round(m);g=Math.round(g)}s="M "+k+","+e+" L "+j+","+v+" L "+n+","+h+" "+m+","+g;return s},_getAngleByValue:function(i){var h=this.startAngle,g=this.endAngle,k=this.min,e=this.max,f=(h-g)/(e-k);var j=f*(i-this.min)+h+Math.PI;return j},_setValue:function(g){if(g<=this.max&&g>=this.min){var h=this._getAngleByValue(g),e=this.pointer.pointerType,f=this._computePointerPoints(this._getSize(this.pointer.width),h,this._getSize(this.pointer.length),e!=="default");if(this._isVML){if(this._pointer){d(this._pointer).remove()}this._pointer=this.renderer.path(f,this.pointer.style)}else{this.renderer.attr(this._pointer,{d:f})}this.value=g;d.jqx.aria(this,"aria-valuenow",g)}},resize:function(f,e){this.width=f;this.height=e;this.refresh()},propertyChangedHandler:function(e,f,h,g){if(g==h){return}if(f=="min"){this.min=parseInt(g);d.jqx.aria(e,"aria-valuemin",g)}if(f=="max"){this.max=parseInt(g);d.jqx.aria(e,"aria-valuemax",g)}if(f=="value"){this.value=parseInt(g)}if(f==="disabled"){if(g){this.disable()}else{this.enable()}d.jqx.aria(this,"aria-disabled",g)}else{if(f==="value"){this.value=h;this.setValue(g)}else{if(f==="startAngle"){this.startAngle=this.startAngle*Math.PI/180+Math.PI/2}else{if(f==="endAngle"){this.endAngle=this.endAngle*Math.PI/180+Math.PI/2}else{if(f==="colorScheme"){this.pointer.style=null;this.cap.style=null}else{if(f==="radius"){this._radius=g}}}}if(f!=="animationDuration"&&f!=="easing"){this._refresh()}}}if(this.renderer instanceof d.jqx.HTML5Renderer){this.renderer.refresh()}},_tickConstructor:function(f,e){if(this.host){return new this._tickConstructor(f,e)}f=f||{};this.size=e._validatePercentage(f.size,"10%");this.interval=parseFloat(f.interval);if(!this.interval){this.interval=5}this.style=f.style||{stroke:"#898989","stroke-width":1};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}},_capConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._capConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.size=e._validatePercentage(g.size,"4%");this.style=g.style||{fill:f,"stroke-width":"1px",stroke:f,"z-index":30}},_pointerConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._pointerConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.pointerType=g.pointerType;if(this.pointerType!=="default"&&this.pointerType!=="rectangle"){this.pointerType="default"}this.style=g.style||{"z-index":0,stroke:f,fill:f,"stroke-width":1};this.length=e._validatePercentage(g.length,"70%");this.width=e._validatePercentage(g.width,"2%")},_labelsConstructor:function(f,e){if(this.host){return new this._labelsConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,-10]}this.interval=parseFloat(f.interval);if(!this.interval){this.interval=20}this.distance=e._validatePercentage(f.distance,"38%");this.position=f.position;if(this.position!=="inside"&&this.position!=="outside"){this.position="none"}this.formatValue=f.formatValue;if(typeof this.formatValue!=="function"){this.formatValue=function(g){return g}}},_captionConstructor:function(f,e){if(this.host){return new this._captionConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.value=f.value||"";this.position=f.position;if(this.position!=="bottom"&&this.position!=="top"&&this.position!=="left"&&this.position!=="right"){this.position="bottom"}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,0]}},_rangeConstructor:function(f,e){if(this.host){return new this._rangeConstructor(f,e)}f=f||{};this.startDistance=e._validatePercentage(f.startDistance,"5%");this.endDistance=e._validatePercentage(f.endDistance,"5%");this.style=f.style||{fill:"#000000",stroke:"#111111"};this.startWidth=parseFloat(f.startWidth,10);if(!this.startWidth){this.startWidth=10}this.startWidth=Math.max(this.startWidth,2);this.endWidth=parseFloat(f.endWidth,10);if(!this.endWidth){this.endWidth=10}this.endWidth=Math.max(this.endWidth,2);this.startValue=parseFloat(f.startValue,10);if(!this.startValue){this.startValue=0}this.endValue=parseFloat(f.endValue,10);if(undefined==this.endValue){this.endValue=100}},_borderConstructor:function(f,e){if(this.host){return new this._borderConstructor(f,e)}f=f||{};this.size=e._validatePercentage(f.size,"10%");this.style=f.style||{stroke:"#cccccc"};if(typeof f.showGradient==="undefined"){this.showGradient=true}else{this.showGradient=f.showGradient}if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}}};var c={_events:["valueChanging","valueChanged"],_animationTimeout:10,_schemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_getScale:function(e,g,f){if(e&&e.toString().indexOf("%")>=0){e=parseInt(e,10)/100;return f[g]()*e}return parseInt(e,10)},_removeElements:function(){this.host.children(".chartContainer").remove();this.host.children("#tblChart").remove()},_getMaxLabelSize:function(){var h=this.max,e=this.min;if(this.labels.interval<1){e=new Number(e).toFixed(2);h=new Number(h).toFixed(2)}var g=this.renderer.measureText(h,0,{"class":this.toThemeProperty("jqx-gauge-label")}),f=this.renderer.measureText(e,0,{"class":this.toThemeProperty("jqx-gauge-label")});if(f.width>g.width){return f}return g},disable:function(){this.disabled=true;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))},enable:function(){this.disabled=false;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))},destroy:function(){var e=this;if(e._timeout){clearTimeout(this._timeout)}e._timeout=null;d.jqx.utilities.resize(e.host,null,true);e._removeElements();e.renderer.clear();e.renderer=null;var f=d.data(e.element,"jqxGauge");if(f){delete f.instance}e.host.children().remove();e._caption=null;e._caption=null;e._pointer=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._gauge=null;e._caption=null;e.renderer=null;e._animations=[];e.host.removeData();e.host.removeClass();e.host.remove();e.that=null;e.element=null;e._gaugeParent=null;delete e._gaugeParent;delete e.element;delete e.host},_validatePercentage:function(f,e){if(parseFloat(f)!==0&&(!f||!parseInt(f,10))){f=e}return f},_getColorScheme:function(f){var e;for(var g=0;g<this._schemes.length;g+=1){e=this._schemes[g];if(e.name===f){return e.colors}}return null},setValue:function(e,f){if(!this.disabled){if(e>this.max){e=this.max}if(e<this.min){e=this.min}f=f||this.animationDuration||0;var g=f/this._animationTimeout;this._animate((e-this.value)/g,this.value,e,f);d.jqx.aria(this,"aria-valuenow",e)}},_animate:function(f,h,e,g){if(this._timeout){this._endAnimation(this.value,false)}if(!g){this._endAnimation(e,true);return}this._animateHandler(f,h,e,0,g)},_animateHandler:function(g,j,e,i,h){var f=this;if(i<=h){this._timeout=setTimeout(function(){f.value=j+(e-j)*d.easing[f.easing](i/h,i,0,1,h);f._setValue(f.value);f._raiseEvent(0,{value:f.value});f._animateHandler(g,j,e,i+f._animationTimeout,h)},this._animationTimeout)}else{this._endAnimation(e,true)}},_endAnimation:function(e,f){clearTimeout(this._timeout);this._timeout=null;this._setValue(e);if(f){this._raiseEvent(1,{value:e})}},_getMaxTickSize:function(){return Math.max(this._getSize(this.ticksMajor.size),this._getSize(this.ticksMinor.size))},_raiseEvent:function(g,f){var h=d.Event(this._events[g]),e;h.args=f||{};e=this.host.trigger(h);return e}},a={defineInstance:function(){var e={value:-50,max:40,min:-60,width:100,height:300,pointer:{},labels:{},animationDuration:1000,showRanges:{},ticksMajor:{size:"15%",interval:5},ticksMinor:{size:"10%",interval:2.5},ranges:[],easing:"easeOutCubic",colorScheme:"scheme01",disabled:false,rangesOffset:0,background:{},ticksPosition:"both",rangeSize:"5%",scaleStyle:null,ticksOffset:null,scaleLength:"90%",orientation:"vertical",aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}},_originalColor:"",_width:null,_height:null,renderer:null};d.extend(true,this,e)},createInstance:function(){d.jqx.aria(this);this.host.css("overflow","hidden");this.host.addClass(this.toThemeProperty("jqx-widget"));var e=this;d.jqx.utilities.resize(this.host,function(){e.refresh(false,false)})},val:function(e){if(arguments.length==0||typeof(e)=="object"){return this.value}this.setValue(e,0)},_initRenderer:function(e){if(!d.jqx.createRenderer){throw"Please include a reference to jqxdraw.js"}return d.jqx.createRenderer(this,e)},refresh:function(h,g){var e=this;if(!e.renderer){e._isVML=false;e.host.empty();e._initRenderer(e.host)}var f=e.renderer;if(!f){return}e._validateProperties();e._reset();e._init();e._performLayout();e._render();if(g!==false){e.setValue(e.value,1)}},_getBorderSize:function(){var f=1,e;if(this._isVML){f=0}if(this.background){e=(parseInt(this.background.style["stroke-width"],10)||f)/2;if(this._isVML){return Math.round(e)}return e}return f},_validateProperties:function(){this.background=this._backgroundConstructor(this.background,this);this.ticksOffset=this.ticksOffset||this._getDefaultTicksOffset();this.rangesOffset=this.rangesOffset||0;this.rangeSize=this._validatePercentage(this.rangeSize,5);this.ticksOffset[0]=this._validatePercentage(this.ticksOffset[0],"5%");this.ticksOffset[1]=this._validatePercentage(this.ticksOffset[1],"5%");this.ticksMinor=this._tickConstructor(this.ticksMinor,this);this.ticksMajor=this._tickConstructor(this.ticksMajor,this);this.scaleStyle=this.scaleStyle||this.ticksMajor.style;this.labels=this._labelsConstructor(this.labels,this);this.pointer=this._pointerConstructor(this.pointer,this);for(var e=0;e<this.ranges.length;e+=1){this.ranges[e]=this._rangeConstructor(this.ranges[e],this)}},_getDefaultTicksOffset:function(){if(this.orientation==="horizontal"){return["5%","36%"]}return["36%","5%"]},_handleOrientation:function(){if(this.orientation==="vertical"){d.extend(this,linearVerticalGauge)}else{d.extend(this,linearHorizontalGauge)}},_reset:function(){this.host.empty()},_performLayout:function(){var e=parseInt(this.background.style["stroke-width"],10)||1;this._width-=e;this._height-=e;this.host.css("padding",e/2)},_init:function(){var f=this._getBorderSize(),e;this._width=this._getScale(this.width,"width",this.host.parent())-3;this._height=this._getScale(this.height,"height",this.host.parent())-3;this.element.innerHTML="<div/>";this.host.width(this._width);this.host.height(this._height);this.host.children().width(this._width);this.host.children().height(this._height);this.renderer.init(this.host.children());e=this.renderer.getContainer();e.width(this._width);e.height(this._height)},_render:function(){this._renderBackground();this._renderTicks();this._renderLabels();this._renderRanges();this._renderPointer()},_renderBackground:function(){if(!this.background.visible){return}var g=this.background.style,f=d.jqx._rup(this._getBorderSize()),e="rect",h;g=this._handleShapeOptions(g);if(this.background.backgroundType==="roundedRectangle"&&this._isVML){e="roundrect"}if(!this._Vml){g.x=f;g.y=f}h=this.renderer.shape(e,g);if(this._isVML){this._fixVmlRoundrect(h,g)}},_handleShapeOptions:function(g){var e=this.background.style.fill,f=this._getBorderSize();if(!e){e="#cccccc"}if(this.background.showGradient){if(e.indexOf("url")<0&&e.indexOf("#grd")<0){this._originalColor=e}else{e=this._originalColor}e=this.renderer._toLinearGradient(e,this.orientation==="horizontal",[[1,1.1],[90,1.5]])}this.background.style.fill=e;if(this.background.backgroundType==="roundedRectangle"){if(this._isVML){g.arcsize=this.background.borderRadius+"%"}else{g.rx=this.background.borderRadius;g.ry=this.background.borderRadius}}g.width=this._width-1;g.height=this._height-1;return g},_fixVmlRoundrect:function(g,f){var e=this._getBorderSize();g.style.position="absolute";g.style.left=e;g.style.top=e;g.style.width=this._width-1;g.style.height=this._height-1;g.strokeweight=0;delete f.width;delete f.height;delete f.arcsize;this.renderer.attr(g,f)},_renderTicks:function(){var k=Math.abs(this.max-this.min),h=this.ticksMinor,f=this.ticksMajor,i=k/f.interval,g=k/h.interval,e,j;e={size:this._getSize(f.size),style:f.style,visible:f.visible,interval:f.interval};j={size:this._getSize(h.size),style:h.style,visible:h.visible,interval:h.interval,checkOverlap:true};if(this.ticksPosition==="near"||this.ticksPosition==="both"){this._ticksRenderHandler(e);this._ticksRenderHandler(j)}if(this.ticksPosition==="far"||this.ticksPosition==="both"){e.isFar=true;j.isFar=true;this._ticksRenderHandler(e);this._ticksRenderHandler(j)}this._renderConnectionLine()},_ticksRenderHandler:function(f){if(!f.visible){return}var i=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),e=this._getBorderSize(),h=this._calculateTickOffset()+this._getMaxTickSize();if(f.isFar){h+=f.size}this._drawTicks(f,e,h+e)},_drawTicks:function(g,f,j){var e;for(var h=this.min;h<=this.max;h+=g.interval){e=this._valueToCoordinates(h);if(!g.checkOverlap||!this._overlapTick(h)){this._renderTick(g.size,e,g.style,j)}}},_calculateTickOffset:function(){var f=this._getSize(this.ticksOffset[0],"width"),e=this._getSize(this.ticksOffset[1],"height"),g=e;if(this.orientation==="vertical"){g=f}return g},_overlapTick:function(e){e+=this.min;if(e%this.ticksMinor.interval===e%this.ticksMajor.interval){return true}return false},_renderConnectionLine:function(){if(!this.ticksMajor.visible&&!this.ticksMinor.visible){return}var f=this._getScaleLength(),e=this._getBorderSize(),h=this._valueToCoordinates(this.max),j=this._valueToCoordinates(this.min),i=this._getMaxTickSize(),g=i+e;if(this.orientation==="vertical"){g+=this._getSize(this.ticksOffset[0],"width");this.renderer.line(g,h,g,j,this.scaleStyle)}else{g+=this._getSize(this.ticksOffset[1],"height");this.renderer.line(h,g,j,g,this.scaleStyle)}},_getScaleLength:function(){return this._getSize(this.scaleLength,(this.orientation==="vertical"?"height":"width"))},_renderTick:function(e,i,f,h){var g=this._handleTickCoordinates(e,i,h);this.renderer.line(Math.round(g.x1),Math.round(g.y1),Math.round(g.x2),Math.round(g.y2),f)},_handleTickCoordinates:function(e,g,f){if(this.orientation==="vertical"){return{x1:f-e,x2:f,y1:g,y2:g}}return{x1:g,x2:g,y1:f-e,y2:f}},_getTickCoordinates:function(f,g){var e=this._handleTickCoordinates(f,0,this._calculateTickOffset());if(this.orientation==="vertical"){e=e.x1}else{e=e.y1}e+=f;return e},_renderLabels:function(){if(!this.labels.visible){return}var g=this._getSize(this.ticksOffset[0],"width"),i=this._getMaxTickSize(),k=this.labels.position,j="height",f=this._getBorderSize(),h=this._calculateTickOffset()+i,e;if(this.orientation==="vertical"){g=this._getSize(this.ticksOffset[1],"height");j="width"}e=this._getMaxLabelSize()[j];if(k==="near"||k==="both"){this._labelListRender(h-i-e+f,g+f,e,"near")}if(k==="far"||k==="both"){this._labelListRender(h+i+e+f,g+f,e,"far")}},_labelListRender:function(k,e,f,m){var h=this.labels.interval,n=Math.abs(this.max-this.min)/h,g=this._getScaleLength(),j=g/n,o=(this.orientation==="vertical")?this.max:this.min;k+=this._getSize(this.labels.offset);for(var l=0;l<=n;l+=1){this._renderLabel(e,m,k,f,o);o+=(this.orientation==="vertical")?-h:h;e+=j}},_renderLabel:function(f,m,j,g,n){var i={"class":this.toThemeProperty("jqx-gauge-label")},h=this.labels.interval,l,e,k;k=this.labels.formatValue(n,m);e=this.renderer.measureText(k,0,i);if(this.orientation==="vertical"){l=(m==="near")?g-e.width:0;this.renderer.text(k,Math.round(j)+l-g/2,Math.round(f-e.height/2),e.width,e.height,0,i)}else{l=(m==="near")?g-e.height:0;this.renderer.text(k,Math.round(f-e.width/2),Math.round(j)+l-g/2,e.width,e.height,0,i)}},_renderRanges:function(){if(!this.showRanges){return}var h=(this.orientation==="vertical")?"width":"height",j=this._getSize(this.rangesOffset,h),g=this._getSize(this.rangeSize,h),e;for(var f=0;f<this.ranges.length;f+=1){e=this.ranges[f];e.size=g;this._renderRange(e,j)}},_renderRange:function(q,k){var h=this._getScaleLength(),j=this._getBorderSize(),i=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),n=this._getMaxTickSize(),p=this._getSize(q.size),m=this._valueToCoordinates(q.endValue);var f=q.startValue;if(f<this.min){f=this.min}var o=Math.abs(this._valueToCoordinates(f)-m),l,e;if(this.orientation==="vertical"){l=this.renderer.rect(i+n+k-p+j,m,q.size,o,q.style)}else{e=o;l=this.renderer.rect(this._valueToCoordinates(q.startValue),g+n+j,e,q.size,q.style)}this.renderer.attr(l,q.style)},_renderPointer:function(){if(!this.pointer.visible){return}if(this.pointer.pointerType==="default"){this._renderColumnPointer()}else{this._renderArrowPointer()}},_renderColumnPointer:function(){this._pointer=this.renderer.rect(0,0,0,0,this.pointer.style);this.renderer.attr(this._pointer,this.pointer.style);this._setValue(this.value)},_renderArrowPointer:function(){var e=this._getArrowPathByValue(0);this._pointer=this.renderer.path(e,this.pointer.style)},_renderArrowPointerByValue:function(e){var f=this._getArrowPathByValue(e);this._pointer=this.renderer.path(f,this.pointer.style)},_getArrowPathByValue:function(o){var i=this._getBorderSize(),m=Math.ceil(this._valueToCoordinates(o))+i,g=i,h=Math.ceil(this._getSize(this.ticksOffset[0],"width")),f=Math.ceil(this._getSize(this.ticksOffset[1],"height")),j=Math.ceil(this._getSize(this.pointer.offset)),n=Math.ceil(this._getMaxTickSize()),r=Math.ceil(this._getSize(this.pointer.size)),k=Math.ceil(Math.sqrt((r*r)/3)),q,l,p;if(this.orientation==="vertical"){g+=h+n+j;l=(j>=0)?g+r:g-r;q="M "+g+" "+m+" L "+l+" "+(m-k)+" L "+l+" "+(m+k)}else{var e=this._getMaxLabelSize()["height"];g+=h+n+j+e;if(this._isVML){g-=2}p=m;m=g;g=p;l=m-r;q="M "+g+" "+m+" L "+(g-k)+" "+l+" L "+(g+k)+" "+l}return q},_setValue:function(e){if(this.pointer.pointerType==="default"){this._performColumnPointerLayout(e)}else{this._performArrowPointerLayout(e)}this.value=e},_performColumnPointerLayout:function(h){var e=this._valueToCoordinates(this.min),m=this._valueToCoordinates(h),p=Math.abs(e-m),k=this._getBorderSize(),j=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),n=this._getMaxTickSize(),f=this._getSize(this.pointer.size),l=this._getSize(this.pointer.offset),o={},i;if(this.orientation==="vertical"){i=j+n;o={left:i+l+1+k,top:m,height:p,width:f}}else{i=g+n;o={left:e,top:i+l-f-1+k,height:f,width:p}}this._setRectAttrs(o)},_performArrowPointerLayout:function(f){var e=this._getArrowPathByValue(f);if(this._isVML){if(this._pointer){d(this._pointer).remove()}this._renderArrowPointerByValue(f)}else{this.renderer.attr(this._pointer,{d:e})}},_setRectAttrs:function(e){if(!this._isVML){this.renderer.attr(this._pointer,{x:e.left});this.renderer.attr(this._pointer,{y:e.top});this.renderer.attr(this._pointer,{width:e.width});this.renderer.attr(this._pointer,{height:e.height})}else{this._pointer.style.top=e.top;this._pointer.style.left=e.left;this._pointer.style.width=e.width;this._pointer.style.height=e.height}},_valueToCoordinates:function(h){var e=this._getBorderSize(),j=this._getScaleLength(),g=this._getSize(this.ticksOffset[0],"width"),f=this._getSize(this.ticksOffset[1],"height"),i=Math.abs(this.min-h),k=Math.abs(this.max-this.min);if(this.orientation==="vertical"){return this._height-(i/k)*j-(this._height-f-j)+e}return(i/k)*j+(this._width-g-j)+e},_getSize:function(e,f){f=f||(this.orientation==="vertical"?"width":"height");if(e.toString().indexOf("%")>=0){e=(parseInt(e,10)/100)*this["_"+f]}e=parseInt(e,10);return e},propertyChangedHandler:function(f,g,i,h){if(h==i){return}if(g=="min"){this.min=parseInt(h);d.jqx.aria(this,"aria-valuemin",h)}if(g=="max"){this.max=parseInt(h);d.jqx.aria(this,"aria-valuemax",h)}if(g=="value"){this.value=parseInt(h)}if(g==="disabled"){if(h){this.disable()}else{this.enable()}d.jqx.aria(this,"aria-disabled",h)}else{if(g==="value"){if(this._timeout!=undefined){clearTimeout(this._timeout);this._timeout=null}this.value=i;this.setValue(h)}else{if(g==="colorScheme"){this.pointer.style=null}else{if(g==="orientation"&&i!==h){var e=this.ticksOffset[0];this.ticksOffset[0]=this.ticksOffset[1];this.ticksOffset[1]=e}}if(g!=="animationDuration"&&g!=="easing"){this.refresh()}}}if(this.renderer instanceof d.jqx.HTML5Renderer){this.renderer.refresh()}},_backgroundConstructor:function(g,e){if(this.host){return new this._backgroundConstructor(g,e)}var f={rectangle:true,roundedRectangle:true};g=g||{};this.style=g.style||{stroke:"#cccccc",fill:null};if(g.visible||typeof g.visible==="undefined"){this.visible=true}else{this.visible=false}if(f[g.backgroundType]){this.backgroundType=g.backgroundType}else{this.backgroundType="roundedRectangle"}if(this.backgroundType==="roundedRectangle"){if(typeof g.borderRadius==="number"){this.borderRadius=g.borderRadius}else{this.borderRadius=15}}if(typeof g.showGradient==="undefined"){this.showGradient=true}else{this.showGradient=g.showGradient}},resize:function(f,e){this.width=f;this.height=e;this.refresh()},_tickConstructor:function(f,e){if(this.host){return new this._tickConstructor(f,e)}this.size=e._validatePercentage(f.size,"10%");this.interval=parseFloat(f.interval);if(!this.interval){this.interval=5}this.style=f.style||{stroke:"#A1A1A1","stroke-width":"1px"};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}},_labelsConstructor:function(f,e){if(this.host){return new this._labelsConstructor(f,e)}this.position=f.position;if(this.position!=="far"&&this.position!=="near"&&this.position!=="both"){this.position="both"}if(typeof f.formatValue==="function"){this.formatValue=f.formatValue}else{this.formatValue=function(g){return g}}this.visible=f.visible;if(this.visible!==false&&this.visible!==true){this.visible=true}if(typeof f.interval!=="number"){this.interval=10}else{this.interval=f.interval}this.offset=e._validatePercentage(f.offset,0)},_rangeConstructor:function(f,e){if(this.host){return new this._rangeConstructor(f,e)}if(typeof f.startValue==="number"){this.startValue=f.startValue}else{this.startValue=e.min}if(typeof f.endValue==="number"&&f.endValue>f.startValue){this.endValue=f.endValue}else{this.endValue=this.startValue+1}this.style=f.style||{fill:"#dddddd",stroke:"#dddddd"}},_pointerConstructor:function(g,e){if(this.host){return new this._pointerConstructor(g,e)}var f=e._getColorScheme(e.colorScheme)[0];this.pointerType=g.pointerType;if(this.pointerType!=="default"&&this.pointerType!=="arrow"){this.pointerType="default"}this.style=g.style||{fill:f,stroke:f,"stroke-width":1};this.size=e._validatePercentage(g.size,"7%");this.visible=g.visible;if(this.visible!==true&&this.visible!==false){this.visible=true}this.offset=e._validatePercentage(g.offset,0)}};d.extend(b,c);d.extend(a,c);d.jqx.jqxWidget("jqxLinearGauge","",{});d.jqx.jqxWidget("jqxGauge","",{});d.extend(d.jqx._jqxGauge.prototype,b);d.extend(d.jqx._jqxLinearGauge.prototype,a)})(jqxBaseFramework); | ||
(function(d){var b={defineInstance:function(){var e={width:350,height:350,radius:"50%",endAngle:270,startAngle:30,int64:false,value:0,min:0,max:220,disabled:false,ticksDistance:"20%",colorScheme:"scheme01",animationDuration:400,showRanges:true,easing:"easeOutCubic",labels:null,pointer:null,cap:null,caption:null,border:null,ticksMinor:null,ticksMajor:null,style:null,ranges:[],_radius:100,_border:null,_radiusDifference:2,_pointer:null,_labels:[],_cap:null,_ticks:[],_ranges:[],_gauge:null,_caption:null,_animationTimeout:10,renderer:null,_animations:[],aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}}};d.extend(true,this,e);return e},createInstance:function(f){var e=this;e.that=this;d.jqx.aria(e);e._radius=e.radius;e.endAngle=e.endAngle*Math.PI/180+Math.PI/2;e.startAngle=e.startAngle*Math.PI/180+Math.PI/2;if(e.int64===true){if(!d.jqx.longInt){throw new Error("jqxGauge: Missing reference to jqxdata.js")}d.jqx.longInt(e);e._value64=new d.jqx.math().fromString(e.value.toString(),10);e._min64=new d.jqx.math().fromString(e.min.toString(),10);e._max64=new d.jqx.math().fromString(e.max.toString(),10)}else{e.value=new Number(e.value)}e._refresh();e.renderer.getContainer().css("overflow","hidden");if(e.int64===true){e.setValue(e._value64,0)}else{e.setValue(e.value,0)}d.jqx.utilities.resize(e.host,function(){e._refresh()});e.host.addClass(e.toThemeProperty("jqx-widget"))},_validateEasing:function(){return !!d.easing[this.easing]},_validateProperties:function(){if(this.startAngle===this.endAngle){throw new Error("The end angle can not be equal to the start angle!")}if(!this._validateEasing()){this.easing="linear"}this.ticksDistance=this._validatePercentage(this.ticksDistance,"20%");this.border=this._borderConstructor(this.border,this);this.style=this.style||{fill:"#ffffff",stroke:"#E0E0E0"};this.ticksMinor=new this._tickConstructor(this.ticksMinor,this);this.ticksMajor=new this._tickConstructor(this.ticksMajor,this);this.cap=new this._capConstructor(this.cap,this);this.pointer=new this._pointerConstructor(this.pointer,this);this.labels=new this._labelsConstructor(this.labels,this);this.caption=new this._captionConstructor(this.caption,this);for(var e=0;e<this.ranges.length;e+=1){this.ranges[e]=new this._rangeConstructor(this.ranges[e],this)}},_hostInit:function(){var h=this._getScale(this.width,"width",this.host.parent()),e=this._getScale(this.height,"height",this.host.parent()),g=this._outerBorderOffset(),i=this.host,f;i.width(h);i.height(e);this.radius=f=(this._getScale(this._radius,"width",this.host)||h/2)-g;this._originalRadius=parseInt(this.radius,10)-this._radiusDifference;this._innerRadius=this._originalRadius;if(this.border){this._innerRadius-=this._getSize(this.border.size)}i[0].innerHTML="<div />";this._gaugeParent=i.children();this._gaugeParent.width(h);this._gaugeParent.height(e);this.renderer.init(this._gaugeParent)},_initRenderer:function(e){if(!d.jqx.createRenderer){throw"Please include a reference to jqxdraw.js"}return d.jqx.createRenderer(this,e)},_refresh:function(){var e=this;if(!e.renderer){e._isVML=false;e.host.empty();e._initRenderer(e.host)}var f=e.renderer;if(!f){return}if(e._ranges){d(e._ranges).remove()}if(e._pointer){d(e._pointer).remove()}if(e._labels){d(e._labels).remove()}if(e._cap){d(e._cap).remove()}if(e._ticks){d(e._ticks).remove()}if(e._border){d(e._border).remove()}if(e._caption){d(e._caption).remove()}e._caption=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._pointer=null;e._validateProperties();e._removeElements();e._hostInit();e._render();e.setValue(this.value,0)},val:function(e){if(arguments.length==0||typeof(e)=="object"){return this.value}this.setValue(e,0)},refresh:function(){this._refresh.apply(this,Array.prototype.slice(arguments))},_outerBorderOffset:function(){var e=parseInt(this.border.style["stroke-width"],10)||1;return e/2},_removeCollection:function(f){for(var e=0;e<f.length;e+=1){d(f[e]).remove()}f=[]},_render:function(){this._addBorder();this._addGauge();this._addRanges();this._addTicks();this._addLabels();this._addCaption();this._addPointer();this._addCap()},_addBorder:function(){if(!this.border.visible){return}var e=this.border.style.fill,f=this._outerBorderOffset();if(!e){e="#BABABA"}if(this.border.showGradient){if(e.indexOf("url")<0&&e.indexOf("#grd")<0){this._originalColor=e}else{e=this._originalColor}e=this.renderer._toLinearGradient(e,true,[[0,1],[25,1.1],[50,1.5],[100,1]])}this._border=this.renderer.circle(this._originalRadius+f,this._originalRadius+f,this._originalRadius);this.border.style.fill=e;this.renderer.attr(this._border,this.border.style)},_addGauge:function(){var g=this._originalRadius,e=this.renderer._toLinearGradient("#ffffff",[[3,2],[100,1]],true),f=this._outerBorderOffset();this._gauge=this.renderer.circle(g+f,g+f,this._innerRadius);this.renderer.attr(this._gauge,this.style)},_addCap:function(){var e="visible",g=this._outerBorderOffset();if(!this.cap.visible){e="hidden"}var h=this._originalRadius,f=this._getSize(this.cap.size),i;i=this.renderer.circle(h+g,h+g,f);this._capCenter=[h,h];this.renderer.attr(i,this.cap.style);d(i).css("visibility",e);this._cap=i},_addTicks:function(){var n=this;var p=this.ticksMinor,e=this.ticksMajor,l,o,m={};function k(i){n._drawTick({angle:n._getAngleByValue(i),distance:n._getDistance(n.ticksDistance),style:e.style,size:n._getSize(e.size),type:"major"})}function f(j){n._drawTick({angle:n._getAngleByValue(j),distance:n._getDistance(n.ticksDistance),style:p.style,size:n._getSize(p.size),type:"minor"})}if(n.int64===true){l=new d.jqx.math().fromString((p.interval).toString(),10);o=new d.jqx.math().fromString((e.interval).toString(),10);for(var h=new d.jqx.math().fromString((n.min).toString(),10),g=new d.jqx.math().fromString((n.min).toString(),10);h.lessThanOrEqual(n._max64)||g.lessThanOrEqual(n._max64);h=h.add(l),g=g.add(o)){if(g.lessThanOrEqual(n._max64)&&e.visible){k(g);m[g.toString()]=true}if(!m[h.toString()]&&p.visible&&h.lessThanOrEqual(n._max64)){f(h)}}}else{l=p.interval;o=e.interval;for(var h=this.min,g=this.min;h<=this.max||g<=this.max;h+=l,g+=o){if(g<=this.max&&e.visible){k(g);m[g.toFixed(5)]=true}if(!m[h.toFixed(5)]&&p.visible&&h<=this.max){f(h)}}}this._handleTicksVisibility()},_handleTicksVisibility:function(){if(!this.ticksMinor.visible){this.host.children(".jqx-gauge-tick-minor").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-minor").css("visibility","visible")}if(!this.ticksMajor.visible){this.host.children(".jqx-gauge-tick-major").css("visibility","hidden")}else{this.host.children(".jqx-gauge-tick-major").css("visibility","visible")}},_getSize:function(e){if(e.toString().indexOf("%")>=0){e=(parseInt(e,10)/100)*this._innerRadius}e=parseInt(e,10);return e},_getDistance:function(e){return this._getSize(e)+(this._originalRadius-this._innerRadius)},_drawTick:function(s){var l=this.that;var j=s.angle,g=s.distance,q=s.size,k=l._outerBorderOffset(),e=l._originalRadius,i=e-g,m=i-q,h=e+k+i*Math.sin(j),o=e+k+i*Math.cos(j),f=e+k+m*Math.sin(j),n=e+k+m*Math.cos(j),p;s.style["class"]=l.toThemeProperty("jqx-gauge-tick-"+s.type);if(l._isVML){h=Math.round(h);f=Math.round(f);o=Math.round(o);n=Math.round(n)}p=l.renderer.line(h,o,f,n,s.style);l._ticks.push(p)},_addRanges:function(){var f="visible";if(!this.showRanges){f="hidden"}else{var e=this.ranges;for(var g=0;g<e.length;g+=1){this._addRange(e[g],f)}}},_getMaxRangeSize:function(){var f,h=-1,j,e;for(var g=0;g<this.ranges.length;g+=1){j=this.ranges[g].startWidth;e=this.ranges[g].endWidth;if(j>h){h=j}if(e>h){h=e}}return h},_getRangeDistance:function(i,e){var h=this._getLabelsDistance(),f=this._getDistance(i),g=this._getMaxRangeSize();if(this.labels.position==="outside"){if(h<f+this._getMaxTickSize()){return this._getDistance(this.ticksDistance)+g/2+this._getSize(this.ticksMajor.size)}}else{if(this.labels.position==="inside"){if(h+this._getMaxTickSize()<f){return this._getSize(this.border.size)+this._originalRadius/20}}}return f},_addRange:function(m,g){var n=this.that;if((n.int64===true&&(m._startValue64.lessThan(n._min64)||m._endValue64.greaterThan(n._max64)))||(n.int64===false&&(m.startValue<n.min||m.endValue>n.max))){return}var q=n.int64?n._getAngleByValue(m._startValue64):n._getAngleByValue(m.startValue),j=n.int64?n._getAngleByValue(m._endValue64):n._getAngleByValue(m.endValue);var o=n._originalRadius,f=o-n._getRangeDistance(m.startDistance,m.startWidth),s=o-n._getRangeDistance(m.endDistance,m.endWidth),l=m.startWidth,e=m.endWidth,k=n._outerBorderOffset(),i={x:o+k+f*Math.sin(q),y:o+k+f*Math.cos(q)},r={x:o+k+s*Math.sin(j),y:o+k+s*Math.cos(j)},t=n._getProjectionPoint(q,o+k,f,l),p=n._getProjectionPoint(j,o+k,s,e),h="default",u,m;if(Math.abs(j-q)>Math.PI){h="opposite"}if(n._isVML){u=n._rangeVMLRender(i,r,o,t,p,e,l,f,s,h)}else{u=n._rangeSVGRender(i,r,o,t,p,e,l,f,s,h)}m.style.visibility=g;m.style["class"]=n.toThemeProperty("jqx-gauge-range");m=n.renderer.path(u,m.style);n._ranges.push(m)},_rangeSVGRender:function(i,m,k,o,l,e,j,f,n,h){var p="",f=k-f,n=k-n,g=["0,1","0,0"];if(h==="opposite"){g=["1,1","1,0"]}p="M"+i.x+","+i.y+" ";p+="A"+(k-f)+","+(k-f)+" 100 "+g[0]+" "+m.x+","+m.y+" ";p+="L "+(l.x)+","+(l.y)+" ";p+="A"+(k-e-f)+","+(k-e-f)+" 100 "+g[1]+" "+(o.x)+","+(o.y)+" ";p+="L "+(i.x)+","+(i.y)+" ";p+="z";return p},_rangeVMLRender:function(p,m,h,w,i,l,n,q,s,f){h-=h-q+10;var o="",r=Math.floor(h+(n+l)/2),q=Math.floor(h-q),s=Math.floor(s),t={x:(w.x+i.x)/2,y:(w.y+i.y)/2},e=Math.sqrt((i.x-w.x)*(i.x-w.x)+(i.y-w.y)*(i.y-w.y)),v=Math.floor(t.x+Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e),u=Math.floor(t.y+Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e),x={x:(p.x+m.x)/2,y:(p.y+m.y)/2},g=Math.sqrt((m.x-p.x)*(m.x-p.x)+(m.y-p.y)*(m.y-p.y)),k=Math.floor(x.x+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g),j=Math.floor(x.y+Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g);if(f==="opposite"){v=Math.floor(t.x-Math.sqrt(h*h-(e/2)*(e/2))*(w.y-i.y)/e);u=Math.floor(t.y-Math.sqrt(h*h-(e/2)*(e/2))*(i.x-w.x)/e);k=Math.floor(x.x-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(p.y-m.y)/g);j=Math.floor(x.y-Math.sqrt(Math.abs(r*r-(g/2)*(g/2)))*(m.x-p.x)/g)}h=Math.floor(h);m={x:Math.floor(m.x),y:Math.floor(m.y)};p={x:Math.floor(p.x),y:Math.floor(p.y)};w={x:Math.floor(w.x),y:Math.floor(w.y)};i={x:Math.floor(i.x),y:Math.floor(i.y)};o="m "+m.x+","+m.y;o+="at "+(k-r)+" "+(j-r)+" "+(r+k)+" "+(r+j)+" "+m.x+","+m.y+" "+p.x+","+p.y;o+="l "+w.x+","+w.y;o+="m "+m.x+","+m.y;o+="l "+i.x+","+i.y;o+="at "+(v-h)+" "+(u-h)+" "+(h+v)+" "+(h+u)+" "+i.x+","+i.y+" "+w.x+","+w.y;o+="qx "+w.x+" "+w.y;return o},_getProjectionPoint:function(i,f,h,g){var e={x:f+(h-g)*Math.sin(i),y:f+(h-g)*Math.cos(i)};return e},_addLabels:function(g){var f=this;if(f.labels.visible){var i=this._getDistance(this._getLabelsDistance()),h;if(f.int64===true){for(var e=new d.jqx.math().fromNumber(f.min.toString(),10);e.lessThanOrEqual(f._max64);e=e.add(f.labels._interval64)){this._addLabel({angle:this._getAngleByValue(e),value:e.toString(),distance:i,style:this.labels.className})}}else{for(var e=this.min;e<=this.max;e+=this.labels.interval){this._addLabel({angle:this._getAngleByValue(e),value:this.labels.interval>=1?e:new Number(e).toFixed(2),distance:i,style:this.labels.className})}}}},_getLabelsDistance:function(){var g=this._getMaxLabelSize(),f=this._getDistance(this.labels.distance),e=this._getDistance(this.ticksDistance);g=g.width;if(this.labels.position==="inside"){return e+g-5}else{if(this.labels.position==="outside"){if(f<(e-g*1.5)){return f}return Math.max(e-g*1.5,0.6*g)}}return this.labels.distance},_addLabel:function(s){var j=this.that;var g=s.angle,f=j._originalRadius,p=f-s.distance,h=j.labels.offset,q=j.labels.formatValue,i=j._outerBorderOffset(),n=f+i+p*Math.sin(g)+h[0],l=f+i+p*Math.cos(g)+h[1],o=s.value,k=s.style||"",e,m;if(typeof q==="function"){o=q(o)}e=j.renderer.measureText(o,0,{"class":k});m=j.renderer.text(o,Math.round(n)-e.width/2,Math.round(l),e.width,e.height,0,{"class":this.toThemeProperty("jqx-gauge-label")});j._labels.push(m)},_addCaption:function(){if(this.caption.visible!==false){var i=this.that;var k=i.caption.value,j=i.toThemeProperty("jqx-gauge-caption"),g=i.caption.offset,m=i.renderer.measureText(k,0,{"class":j}),h=i._getPosition(this.caption.position,m,g),e=i.caption.style,f=i._outerBorderOffset(),l=i.renderer.text(k,h.left+f,h.top+f,m.width,m.height,0,{"class":j});this._caption=l}},_getPosition:function(e,f,j){var i=0,h=0,g=this._originalRadius;switch(e){case"left":i=(g-f.width)/2;h=g-f.height/2;break;case"right":i=g+(g-f.width)/2;h=g-f.height/2;break;case"bottom":i=(2*g-f.width)/2;h=(g+2*g-f.height)/2;break;default:i=(2*g-f.width)/2;h=(g+f.height)/2;break}return{left:i+j[0],top:h+j[1]}},_addPointer:function(){var g="visible";if(!this.pointer.visible){g="hidden"}var f=this._originalRadius,i=this._getSize(this.pointer.length),j=i*0.9,k=this._getAngleByValue(this.value),e=this.pointer.pointerType,h;h=this._computePointerPoints(this._getSize(this.pointer.width),k,i,e!=="default");this._pointer=this.renderer.path(h,this.pointer.style);d(this._pointer).css("visibility",g)},_computePointerPoints:function(e,g,h,f){if(!f){return this._computeArrowPoints(e,g,h)}else{return this._computeRectPoints(e,g,h)}},_computeArrowPoints:function(n,g,k){var f=this._originalRadius-0.5,l=Math.sin(g),q=Math.cos(g),j=this._outerBorderOffset(),o=f+j+k*l,m=f+j+k*q,i=f+j+n*q,e=f+j-n*l,h=f+j-n*q,s=f+j+n*l,p;if(this._isVML){i=Math.round(i);h=Math.round(h);e=Math.round(e);s=Math.round(s);o=Math.round(o);m=Math.round(m)}p="M "+i+","+e+" L "+h+","+s+" L "+o+","+m+"";return p},_computeRectPoints:function(q,i,o){var f=this._originalRadius,p=Math.sin(i),t=Math.cos(i),u=o,l=this._outerBorderOffset(),n=f+l-q*t+o*p,h=f+l+q*p+o*t,m=f+l+q*t+o*p,g=f+l-q*p+o*t,k=f+l+q*t,e=f+l-q*p,j=f+l-q*t,v=f+l+q*p,s;if(this._isVML){k=Math.round(k);j=Math.round(j);e=Math.round(e);v=Math.round(v);n=Math.round(n);h=Math.round(h);m=Math.round(m);g=Math.round(g)}s="M "+k+","+e+" L "+j+","+v+" L "+n+","+h+" "+m+","+g;return s},_getAngleByValue:function(s){var v=this,p=v.startAngle,t=p-v.endAngle,e,k,o,n,h;if(v.int64===true){s=new d.jqx.math().fromString(s.toString(),10);e=v._min64;k=v._max64;o=k.subtract(e);n=s.subtract(e);var f=o.toString(),j,r=n.toString(),g;if(f.length>15){var u=f.length-15;f=f.slice(0,15)+"."+f.slice(15);j=parseFloat(f);if(r.length>u){var q=r.length-u;r=r.slice(0,q)+"."+r.slice(q)}else{if(r.length===u){r="0."+r}else{var m="0.";for(var l=0;l<u-r.length;l++){m+="0"}r=m+""+r}}g=parseFloat(r)}else{j=o.toNumber();g=n.toNumber()}h=t*g/j+p+Math.PI}else{e=v.min;k=v.max;o=k-e;n=s-e;h=t*n/o+p+Math.PI}return h},_setValue:function(h){var f=this;if((f.int64===true&&h.lessThanOrEqual(f._max64)&&h.greaterThanOrEqual(f._min64))||(f.int64===false&&h<=f.max&&h>=f.min)){var i=f._getAngleByValue(h),e=f.pointer.pointerType,g=f._computePointerPoints(f._getSize(f.pointer.width),i,f._getSize(f.pointer.length),e!=="default");if(f._isVML){if(f._pointer){d(f._pointer).remove()}f._pointer=f.renderer.path(g,f.pointer.style)}else{f.renderer.attr(f._pointer,{d:g})}if(f.int64===true){f.value=h.toString();f._value64=new d.jqx.math().fromString(f.value,10)}else{f.value=h}d.jqx.aria(f,"aria-valuenow",h.toString())}},resize:function(f,e){this.width=f;this.height=e;this.refresh()},propertyChangedHandler:function(e,f,h,g){if(g==h){return}if(f=="min"){if(e.int64===true){e._min64=new d.jqx.math().fromString(g.toString(),10)}else{this.min=parseInt(g)}d.jqx.aria(e,"aria-valuemin",g)}if(f=="max"){if(e.int64===true){e._max64=new d.jqx.math().fromString(g.toString(),10)}else{this.max=parseInt(g)}d.jqx.aria(e,"aria-valuemax",g)}if(f==="disabled"){if(g){this.disable()}else{this.enable()}d.jqx.aria(this,"aria-disabled",g)}else{if(f==="value"){this.value=h;this.setValue(g)}else{if(f==="startAngle"){this.startAngle=this.startAngle*Math.PI/180+Math.PI/2}else{if(f==="endAngle"){this.endAngle=this.endAngle*Math.PI/180+Math.PI/2}else{if(f==="colorScheme"){this.pointer.style=null;this.cap.style=null}else{if(f==="radius"){this._radius=g}}}}if(f!=="animationDuration"&&f!=="easing"){this._refresh()}}}if(this.renderer instanceof d.jqx.HTML5Renderer){this.renderer.refresh()}},_tickConstructor:function(f,e){if(this.host){return new this._tickConstructor(f,e)}f=f||{};this.size=e._validatePercentage(f.size,"10%");this.interval=parseFloat(f.interval);if(!this.interval){this.interval=5}this.style=f.style||{stroke:"#898989","stroke-width":1};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}},_capConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._capConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.size=e._validatePercentage(g.size,"4%");this.style=g.style||{fill:f,"stroke-width":"1px",stroke:f,"z-index":30}},_pointerConstructor:function(g,e){var f=e._getColorScheme(e.colorScheme)[0];if(this.host){return new this._pointerConstructor(g,e)}g=g||{};if(typeof g.visible==="undefined"){this.visible=true}else{this.visible=g.visible}this.pointerType=g.pointerType;if(this.pointerType!=="default"&&this.pointerType!=="rectangle"){this.pointerType="default"}this.style=g.style||{"z-index":0,stroke:f,fill:f,"stroke-width":1};this.length=e._validatePercentage(g.length,"70%");this.width=e._validatePercentage(g.width,"2%")},_labelsConstructor:function(f,e){if(this.host){return new this._labelsConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,-10]}if(!f.interval){f.interval=20}if(e.int64===true){this.interval=f.interval;this._interval64=new d.jqx.math().fromString(f.interval.toString(),10)}else{this.interval=parseFloat(f.interval)}this.distance=e._validatePercentage(f.distance,"38%");this.position=f.position;if(this.position!=="inside"&&this.position!=="outside"){this.position="none"}this.formatValue=f.formatValue;if(typeof this.formatValue!=="function"){this.formatValue=function(g){return g}}},_captionConstructor:function(f,e){if(this.host){return new this._captionConstructor(f,e)}f=f||{};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}this.value=f.value||"";this.position=f.position;if(this.position!=="bottom"&&this.position!=="top"&&this.position!=="left"&&this.position!=="right"){this.position="bottom"}this.offset=f.offset;if(!(this.offset instanceof Array)){this.offset=[0,0]}},_rangeConstructor:function(f,e){if(this.host){return new this._rangeConstructor(f,e)}f=f||{};this.startDistance=e._validatePercentage(f.startDistance,"5%");this.endDistance=e._validatePercentage(f.endDistance,"5%");this.style=f.style||{fill:"#000000",stroke:"#111111"};this.startWidth=parseFloat(f.startWidth,10);if(!this.startWidth){this.startWidth=10}this.startWidth=Math.max(this.startWidth,2);this.endWidth=parseFloat(f.endWidth,10);if(!this.endWidth){this.endWidth=10}this.endWidth=Math.max(this.endWidth,2);if(f.startValue===undefined){f.startValue=0}if(f.endValue===undefined){f.endValue=100}if(e.int64===true){this.startValue=f.startValue;this.endValue=f.endValue;this._startValue64=new d.jqx.math().fromString(f.startValue.toString(),10);this._endValue64=new d.jqx.math().fromString(f.endValue.toString(),10)}else{this.startValue=parseFloat(f.startValue,10);this.endValue=parseFloat(f.endValue,10)}},_borderConstructor:function(f,e){if(this.host){return new this._borderConstructor(f,e)}f=f||{};this.size=e._validatePercentage(f.size,"10%");this.style=f.style||{stroke:"#cccccc"};if(typeof f.showGradient==="undefined"){this.showGradient=true}else{this.showGradient=f.showGradient}if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}}};var c={_events:["valueChanging","valueChanged"],_animationTimeout:10,_schemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_getScale:function(e,g,f){if(e&&e.toString().indexOf("%")>=0){e=parseInt(e,10)/100;return f[g]()*e}return parseInt(e,10)},_removeElements:function(){this.host.children(".chartContainer").remove();this.host.children("#tblChart").remove()},_getMaxLabelSize:function(){var h=this.max,e=this.min;if(this.labels.interval<1){e=new Number(e).toFixed(2);h=new Number(h).toFixed(2)}var g=this.renderer.measureText(h,0,{"class":this.toThemeProperty("jqx-gauge-label")}),f=this.renderer.measureText(e,0,{"class":this.toThemeProperty("jqx-gauge-label")});if(f.width>g.width){return f}return g},disable:function(){this.disabled=true;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))},enable:function(){this.disabled=false;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))},destroy:function(){var e=this;if(e._timeout){clearTimeout(this._timeout)}e._timeout=null;d.jqx.utilities.resize(e.host,null,true);e._removeElements();e.renderer.clear();e.renderer=null;var f=d.data(e.element,"jqxGauge");if(f){delete f.instance}e.host.children().remove();e._caption=null;e._caption=null;e._pointer=null;e._labels=[];e._cap=null;e._ticks=[];e._ranges=[];e._border=null;e._gauge=null;e._caption=null;e.renderer=null;e._animations=[];e.host.removeData();e.host.removeClass();e.host.remove();e.that=null;e.element=null;e._gaugeParent=null;delete e._gaugeParent;delete e.element;delete e.host},_validatePercentage:function(f,e){if(parseFloat(f)!==0&&(!f||!parseInt(f,10))){f=e}return f},_getColorScheme:function(f){var e;for(var g=0;g<this._schemes.length;g+=1){e=this._schemes[g];if(e.name===f){return e.colors}}return null},setValue:function(f,g){var e=this;if(!e.disabled){g=g||e.animationDuration||0;if(e.int64===true){if(typeof f==="number"){f=new d.jqx.math().fromNumber(f,10)}else{if(typeof f==="string"){f=new d.jqx.math().fromString(f,10)}}if(f.greaterThan(e._max64)){f=new d.jqx.math().fromString(e._max64.toString(),10)}if(f.lessThan(e._min64)){f=new d.jqx.math().fromString(e._min64.toString(),10)}e._animate(e._value64,f,g)}else{if(f>e.max){f=e.max}if(f<e.min){f=e.min}e._animate(e.value,f,g)}d.jqx.aria(e,"aria-valuenow",f.toString())}},_animate:function(h,e,g){var f=this;if(f._timeout){f._endAnimation(f.int64?f._value64:f.value,false)}if(!g){f._endAnimation(e,true);return}f._animateHandler(h,e,0,g)},_animateHandler:function(i,e,h,g){var f=this;if(h<=g){this._timeout=setTimeout(function(){if(f.int64===true){var k=e.subtract(i);var j=new d.jqx.math().fromNumber((d.easing[f.easing](h/g,h,0,1,g))*100,10);f._value64=i.add(k.multiply(j).div(new d.jqx.math().fromNumber(100,10)));f.value=f._value64.toString();f._setValue(f._value64)}else{f.value=i+(e-i)*d.easing[f.easing](h/g,h,0,1,g);f._setValue(f.value)}f._raiseEvent(0,{value:f.value.toString()});f._animateHandler(i,e,h+f._animationTimeout,g)},this._animationTimeout)}else{this._endAnimation(e,true)}},_endAnimation:function(e,f){clearTimeout(this._timeout);this._timeout=null;this._setValue(e);if(f){this._raiseEvent(1,{value:e.toString()})}},_getMaxTickSize:function(){return Math.max(this._getSize(this.ticksMajor.size),this._getSize(this.ticksMinor.size))},_raiseEvent:function(g,f){var h=d.Event(this._events[g]),e;h.args=f||{};e=this.host.trigger(h);return e}},a={defineInstance:function(){var e={int64:false,value:-50,max:40,min:-60,width:100,height:300,pointer:{},labels:{},animationDuration:1000,showRanges:{},ticksMajor:{size:"15%",interval:5},ticksMinor:{size:"10%",interval:2.5},ranges:[],easing:"easeOutCubic",colorScheme:"scheme01",disabled:false,rangesOffset:0,background:{},ticksPosition:"both",rangeSize:"5%",scaleStyle:null,ticksOffset:null,scaleLength:"90%",orientation:"vertical",aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}},_originalColor:"",_width:null,_height:null,renderer:null};d.extend(true,this,e)},createInstance:function(){d.jqx.aria(this);this.host.css("overflow","hidden");this.host.addClass(this.toThemeProperty("jqx-widget"));var e=this;if(e.int64===true){if(!d.jqx.longInt){throw new Error("jqxGauge: Missing reference to jqxdata.js")}d.jqx.longInt(e);e._value64=new d.jqx.math().fromString(e.value.toString(),10);e._min64=new d.jqx.math().fromString(e.min.toString(),10);e._max64=new d.jqx.math().fromString(e.max.toString(),10)}d.jqx.utilities.resize(this.host,function(){e.refresh(false,false)})},val:function(e){if(arguments.length==0||typeof(e)=="object"){return this.value}this.setValue(e,0)},_initRenderer:function(e){if(!d.jqx.createRenderer){throw"Please include a reference to jqxdraw.js"}return d.jqx.createRenderer(this,e)},refresh:function(h,g){var e=this;if(!e.renderer){e._isVML=false;e.host.empty();e._initRenderer(e.host)}var f=e.renderer;if(!f){return}e._validateProperties();e._reset();e._init();e._performLayout();e._render();if(g!==false){e.setValue(e.value,1)}},_getBorderSize:function(){var f=1,e;if(this._isVML){f=0}if(this.background){e=(parseInt(this.background.style["stroke-width"],10)||f)/2;if(this._isVML){return Math.round(e)}return e}return f},_validateProperties:function(){this.background=this._backgroundConstructor(this.background,this);this.ticksOffset=this.ticksOffset||this._getDefaultTicksOffset();this.rangesOffset=this.rangesOffset||0;this.rangeSize=this._validatePercentage(this.rangeSize,5);this.ticksOffset[0]=this._validatePercentage(this.ticksOffset[0],"5%");this.ticksOffset[1]=this._validatePercentage(this.ticksOffset[1],"5%");this.ticksMinor=this._tickConstructor(this.ticksMinor,this);this.ticksMajor=this._tickConstructor(this.ticksMajor,this);this.scaleStyle=this.scaleStyle||this.ticksMajor.style;this.labels=this._labelsConstructor(this.labels,this);this.pointer=this._pointerConstructor(this.pointer,this);for(var e=0;e<this.ranges.length;e+=1){this.ranges[e]=this._rangeConstructor(this.ranges[e],this)}},_getDefaultTicksOffset:function(){if(this.orientation==="horizontal"){return["5%","36%"]}return["36%","5%"]},_handleOrientation:function(){if(this.orientation==="vertical"){d.extend(this,linearVerticalGauge)}else{d.extend(this,linearHorizontalGauge)}},_reset:function(){this.host.empty()},_performLayout:function(){var e=parseInt(this.background.style["stroke-width"],10)||1;this._width-=e;this._height-=e;this.host.css("padding",e/2)},_init:function(){var f=this._getBorderSize(),e;this._width=this._getScale(this.width,"width",this.host.parent())-3;this._height=this._getScale(this.height,"height",this.host.parent())-3;this.element.innerHTML="<div/>";this.host.width(this._width);this.host.height(this._height);this.host.children().width(this._width);this.host.children().height(this._height);this.renderer.init(this.host.children());e=this.renderer.getContainer();e.width(this._width);e.height(this._height)},_render:function(){this._renderBackground();this._renderTicks();this._renderLabels();this._renderRanges();this._renderPointer()},_renderBackground:function(){if(!this.background.visible){return}var g=this.background.style,f=d.jqx._rup(this._getBorderSize()),e="rect",h;g=this._handleShapeOptions(g);if(this.background.backgroundType==="roundedRectangle"&&this._isVML){e="roundrect"}if(!this._Vml){g.x=f;g.y=f}h=this.renderer.shape(e,g);if(this._isVML){this._fixVmlRoundrect(h,g)}},_handleShapeOptions:function(g){var e=this.background.style.fill,f=this._getBorderSize();if(!e){e="#cccccc"}if(this.background.showGradient){if(e.indexOf("url")<0&&e.indexOf("#grd")<0){this._originalColor=e}else{e=this._originalColor}e=this.renderer._toLinearGradient(e,this.orientation==="horizontal",[[1,1.1],[90,1.5]])}this.background.style.fill=e;if(this.background.backgroundType==="roundedRectangle"){if(this._isVML){g.arcsize=this.background.borderRadius+"%"}else{g.rx=this.background.borderRadius;g.ry=this.background.borderRadius}}g.width=this._width-1;g.height=this._height-1;return g},_fixVmlRoundrect:function(g,f){var e=this._getBorderSize();g.style.position="absolute";g.style.left=e;g.style.top=e;g.style.width=this._width-1;g.style.height=this._height-1;g.strokeweight=0;delete f.width;delete f.height;delete f.arcsize;this.renderer.attr(g,f)},_renderTicks:function(){var k=this.ticksMinor,l=this.ticksMajor,f,i,h,g,e,m,j;if(this.int64){f=this._max64.subtract(this._min64);if(f.isNegative()){f=f.negate()}i=l._interval64;h=k._interval64;g=f.div(i);e=f.div(h)}else{f=Math.abs(this.max-this.min);i=l.interval;h=k.interval;g=f/i;e=f/h}m={size:this._getSize(l.size),style:l.style,visible:l.visible,interval:i};j={size:this._getSize(k.size),style:k.style,visible:k.visible,interval:h,checkOverlap:true};if(this.ticksPosition==="near"||this.ticksPosition==="both"){this._ticksRenderHandler(m);this._ticksRenderHandler(j)}if(this.ticksPosition==="far"||this.ticksPosition==="both"){m.isFar=true;j.isFar=true;this._ticksRenderHandler(m);this._ticksRenderHandler(j)}this._renderConnectionLine()},_ticksRenderHandler:function(f){if(!f.visible){return}var i=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),e=this._getBorderSize(),h=this._calculateTickOffset()+this._getMaxTickSize();if(f.isFar){h+=f.size}this._drawTicks(f,e,h+e)},_drawTicks:function(j,h,l){var g=this,e;function f(m){e=g._valueToCoordinates(m);if(!j.checkOverlap||!g._overlapTick(m)){g._renderTick(j.size,e,j.style,l)}}if(this.int64===true){for(var k=new d.jqx.math().fromString(this._min64.toString(),10);k.lessThanOrEqual(this._max64);k=k.add(j.interval)){f(k)}}else{for(var k=this.min;k<=this.max;k+=j.interval){f(k)}}},_calculateTickOffset:function(){var f=this._getSize(this.ticksOffset[0],"width"),e=this._getSize(this.ticksOffset[1],"height"),g=e;if(this.orientation==="vertical"){g=f}return g},_overlapTick:function(e){if(this.int64===true){e=e.add(this._min64);if((e.modulo(this.ticksMinor._interval64)).equals(e.modulo(this.ticksMajor._interval64))){return true}else{return false}}else{e+=this.min;if(e%this.ticksMinor.interval===e%this.ticksMajor.interval){return true}return false}},_renderConnectionLine:function(){if(!this.ticksMajor.visible&&!this.ticksMinor.visible){return}var f=this._getScaleLength(),e=this._getBorderSize(),h,j,i=this._getMaxTickSize(),g=i+e;if(this.int64===true){h=this._valueToCoordinates(this._max64);j=this._valueToCoordinates(this._min64)}else{h=this._valueToCoordinates(this.max);j=this._valueToCoordinates(this.min)}if(this.orientation==="vertical"){g+=this._getSize(this.ticksOffset[0],"width");this.renderer.line(g,h,g,j,this.scaleStyle)}else{g+=this._getSize(this.ticksOffset[1],"height");this.renderer.line(h,g,j,g,this.scaleStyle)}},_getScaleLength:function(){return this._getSize(this.scaleLength,(this.orientation==="vertical"?"height":"width"))},_renderTick:function(e,i,f,h){var g=this._handleTickCoordinates(e,i,h);this.renderer.line(Math.round(g.x1),Math.round(g.y1),Math.round(g.x2),Math.round(g.y2),f)},_handleTickCoordinates:function(e,g,f){if(this.orientation==="vertical"){return{x1:f-e,x2:f,y1:g,y2:g}}return{x1:g,x2:g,y1:f-e,y2:f}},_getTickCoordinates:function(f,g){var e=this._handleTickCoordinates(f,0,this._calculateTickOffset());if(this.orientation==="vertical"){e=e.x1}else{e=e.y1}e+=f;return e},_renderLabels:function(){if(!this.labels.visible){return}var g=this._getSize(this.ticksOffset[0],"width"),i=this._getMaxTickSize(),k=this.labels.position,j="height",f=this._getBorderSize(),h=this._calculateTickOffset()+i,e;if(this.orientation==="vertical"){g=this._getSize(this.ticksOffset[1],"height");j="width"}e=this._getMaxLabelSize()[j];if(k==="near"||k==="both"){this._labelListRender(h-i-e+f,g+f,e,"near")}if(k==="far"||k==="both"){this._labelListRender(h+i+e+f,g+f,e,"far")}},_labelListRender:function(k,e,f,m){var h,n,j,o,g=this._getScaleLength();k+=this._getSize(this.labels.offset);if(this.int64===true){h=this.labels._interval64;n=(this._max64.subtract(this._min64)).div(h).toNumber();o=(this.orientation==="vertical")?this._max64:this._min64}else{h=this.labels.interval;n=Math.abs(this.max-this.min)/h;o=(this.orientation==="vertical")?this.max:this.min}j=g/n;for(var l=0;l<=n;l+=1){this._renderLabel(e,m,k,f,o);if(this.int64===true){o=(this.orientation==="vertical")?o.subtract(h):o.add(h)}else{o+=(this.orientation==="vertical")?-h:h}e+=j}},_renderLabel:function(f,m,j,g,n){var i={"class":this.toThemeProperty("jqx-gauge-label")},h=this.labels.interval,l,e,k;k=this.labels.formatValue(n.toString(),m);e=this.renderer.measureText(k,0,i);if(this.orientation==="vertical"){l=(m==="near")?g-e.width:0;this.renderer.text(k,Math.round(j)+l-g/2,Math.round(f-e.height/2),e.width,e.height,0,i)}else{l=(m==="near")?g-e.height:0;this.renderer.text(k,Math.round(f-e.width/2),Math.round(j)+l-g/2,e.width,e.height,0,i)}},_renderRanges:function(){if(!this.showRanges){return}var h=(this.orientation==="vertical")?"width":"height",j=this._getSize(this.rangesOffset,h),g=this._getSize(this.rangeSize,h),e;for(var f=0;f<this.ranges.length;f+=1){e=this.ranges[f];e.size=g;this._renderRange(e,j)}},_renderRange:function(q,k){var h=this._getScaleLength(),j=this._getBorderSize(),i=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),n=this._getMaxTickSize(),p=this._getSize(q.size),m,f;if(this.int64===true){m=this._valueToCoordinates(q._endValue64);f=q._startValue64;if(f.lessThan(this._min64)){f=new d.jqx.math().fromString(this._min64.toString(),10)}}else{m=this._valueToCoordinates(q.endValue);f=q.startValue;if(f<this.min){f=this.min}}var o=Math.abs(this._valueToCoordinates(f)-m),l,e;if(this.orientation==="vertical"){l=this.renderer.rect(i+n+k-p+j,m,q.size,o,q.style)}else{e=o;l=this.renderer.rect(this._valueToCoordinates(q.startValue),g+n+j,e,q.size,q.style)}this.renderer.attr(l,q.style)},_renderPointer:function(){if(!this.pointer.visible){return}if(this.pointer.pointerType==="default"){this._renderColumnPointer()}else{this._renderArrowPointer()}},_renderColumnPointer:function(){this._pointer=this.renderer.rect(0,0,0,0,this.pointer.style);this.renderer.attr(this._pointer,this.pointer.style);if(this.int64===true){this._setValue(this._value64)}else{this._setValue(this.value)}},_renderArrowPointer:function(){var e=this._getArrowPathByValue(0);this._pointer=this.renderer.path(e,this.pointer.style)},_renderArrowPointerByValue:function(e){var f=this._getArrowPathByValue(e);this._pointer=this.renderer.path(f,this.pointer.style)},_getArrowPathByValue:function(o){var i=this._getBorderSize(),m=Math.ceil(this._valueToCoordinates(o))+i,g=i,h=Math.ceil(this._getSize(this.ticksOffset[0],"width")),f=Math.ceil(this._getSize(this.ticksOffset[1],"height")),j=Math.ceil(this._getSize(this.pointer.offset)),n=Math.ceil(this._getMaxTickSize()),r=Math.ceil(this._getSize(this.pointer.size)),k=Math.ceil(Math.sqrt((r*r)/3)),q,l,p;if(this.orientation==="vertical"){g+=h+n+j;l=(j>=0)?g+r:g-r;q="M "+g+" "+m+" L "+l+" "+(m-k)+" L "+l+" "+(m+k)}else{var e=this._getMaxLabelSize()["height"];g+=h+n+j+e;if(this._isVML){g-=2}p=m;m=g;g=p;l=m-r;q="M "+g+" "+m+" L "+(g-k)+" "+l+" L "+(g+k)+" "+l}return q},_setValue:function(e){if(this.pointer.pointerType==="default"){this._performColumnPointerLayout(e)}else{this._performArrowPointerLayout(e)}this.value=e},_performColumnPointerLayout:function(h){var e,i,p,m=this._valueToCoordinates(h),k=this._getBorderSize(),j=this._getSize(this.ticksOffset[0],"width"),g=this._getSize(this.ticksOffset[1],"height"),n=this._getMaxTickSize(),f=this._getSize(this.pointer.size),l=this._getSize(this.pointer.offset),o={};if(this.int64===true){e=this._valueToCoordinates(this._min64)}else{e=this._valueToCoordinates(this.min)}p=Math.abs(e-m);if(this.orientation==="vertical"){i=j+n;o={left:i+l+1+k,top:m,height:p,width:f}}else{i=g+n;o={left:e,top:i+l-f-1+k,height:f,width:p}}this._setRectAttrs(o)},_performArrowPointerLayout:function(f){var e=this._getArrowPathByValue(f);if(this._isVML){if(this._pointer){d(this._pointer).remove()}this._renderArrowPointerByValue(f)}else{this.renderer.attr(this._pointer,{d:e})}},_setRectAttrs:function(e){if(!this._isVML){this.renderer.attr(this._pointer,{x:e.left});this.renderer.attr(this._pointer,{y:e.top});this.renderer.attr(this._pointer,{width:e.width});this.renderer.attr(this._pointer,{height:e.height})}else{this._pointer.style.top=e.top;this._pointer.style.left=e.left;this._pointer.style.width=e.width;this._pointer.style.height=e.height}},_valueToCoordinates:function(t){var n=this._getBorderSize(),k=this._getScaleLength(),l=this._getSize(this.ticksOffset[0],"width"),j=this._getSize(this.ticksOffset[1],"height"),q,f,h;if(this.int64===true){q=t.subtract(this._min64);if(q.isNegative()){q.negate()}f=this._max64.subtract(this._min64);if(f.isNegative()){f.negate()}var e=q.toString(),g=f.toString(),m,s;if(g.length>15){var u=g.length-15;g=g.slice(0,15)+"."+g.slice(15);s=parseFloat(g);if(e.length>u){var r=e.length-u;e=e.slice(0,r)+"."+e.slice(r)}else{if(e.length===u){e="0."+e}else{var p="0.";for(var o=0;o<u-e.length;o++){p+="0"}e=p+""+e}}m=parseFloat(e)}else{m=q.toNumber();s=f.toNumber()}h=(m/s)*k}else{q=Math.abs(this.min-t);f=Math.abs(this.max-this.min);h=(q/f)*k}if(this.orientation==="vertical"){return this._height-h-(this._height-j-k)+n}return h+(this._width-l-k)+n},_getSize:function(e,f){f=f||(this.orientation==="vertical"?"width":"height");if(e.toString().indexOf("%")>=0){e=(parseInt(e,10)/100)*this["_"+f]}e=parseInt(e,10);return e},propertyChangedHandler:function(f,g,i,h){if(h==i){return}if(g=="min"){if(f.int64===true){f._min64=new d.jqx.math().fromString(h.toString(),10)}else{this.min=parseInt(h)}d.jqx.aria(this,"aria-valuemin",h)}if(g=="max"){if(f.int64===true){f._max64=new d.jqx.math().fromString(h.toString(),10)}else{this.max=parseInt(h)}d.jqx.aria(this,"aria-valuemax",h)}if(g==="disabled"){if(h){this.disable()}else{this.enable()}d.jqx.aria(this,"aria-disabled",h)}else{if(g==="value"){if(this._timeout!=undefined){clearTimeout(this._timeout);this._timeout=null}this.value=i;this.setValue(h)}else{if(g==="colorScheme"){this.pointer.style=null}else{if(g==="orientation"&&i!==h){var e=this.ticksOffset[0];this.ticksOffset[0]=this.ticksOffset[1];this.ticksOffset[1]=e}}if(g!=="animationDuration"&&g!=="easing"){this.refresh()}}}if(this.renderer instanceof d.jqx.HTML5Renderer){this.renderer.refresh()}},_backgroundConstructor:function(g,e){if(this.host){return new this._backgroundConstructor(g,e)}var f={rectangle:true,roundedRectangle:true};g=g||{};this.style=g.style||{stroke:"#cccccc",fill:null};if(g.visible||typeof g.visible==="undefined"){this.visible=true}else{this.visible=false}if(f[g.backgroundType]){this.backgroundType=g.backgroundType}else{this.backgroundType="roundedRectangle"}if(this.backgroundType==="roundedRectangle"){if(typeof g.borderRadius==="number"){this.borderRadius=g.borderRadius}else{this.borderRadius=15}}if(typeof g.showGradient==="undefined"){this.showGradient=true}else{this.showGradient=g.showGradient}},resize:function(f,e){this.width=f;this.height=e;this.refresh()},_tickConstructor:function(f,e){if(this.host){return new this._tickConstructor(f,e)}this.size=e._validatePercentage(f.size,"10%");if(f.interval){this.interval=f.interval}else{this.interval=5}if(e.int64===true){this._interval64=new d.jqx.math().fromString(this.interval.toString(),10)}else{this.interval=parseFloat(this.interval)}this.style=f.style||{stroke:"#A1A1A1","stroke-width":"1px"};if(typeof f.visible==="undefined"){this.visible=true}else{this.visible=f.visible}},_labelsConstructor:function(f,e){if(this.host){return new this._labelsConstructor(f,e)}this.position=f.position;if(this.position!=="far"&&this.position!=="near"&&this.position!=="both"){this.position="both"}if(typeof f.formatValue==="function"){this.formatValue=f.formatValue}else{this.formatValue=function(g){return g}}this.visible=f.visible;if(this.visible!==false&&this.visible!==true){this.visible=true}if(f.interval){this.interval=f.interval}else{this.interval=10}if(e.int64===true){this._interval64=new d.jqx.math().fromString(this.interval.toString(),10)}else{this.interval=parseFloat(this.interval)}this.offset=e._validatePercentage(f.offset,0)},_rangeConstructor:function(f,e){if(this.host){return new this._rangeConstructor(f,e)}if(f.startValue){this.startValue=f.startValue}else{this.startValue=e.min}if(f.endValue){this.endValue=f.endValue}else{this.endValue=e.max}if(e.int64===true){this._startValue64=new d.jqx.math().fromString(this.startValue.toString(),10);this._endValue64=new d.jqx.math().fromString(this.endValue.toString(),10);if(this._endValue64.lessThanOrEqual(this._startValue64)){this._endValue64=this._startValue64.add(new d.jqx.math().fromNumber(1,10));this.endValue=this._endValue64.toString()}}else{this.startValue=parseFloat(this.startValue);this.endValue=parseFloat(this.endValue);if(this.endValue<=this.startValue){this.endValue=this.startValue+1}}this.style=f.style||{fill:"#dddddd",stroke:"#dddddd"}},_pointerConstructor:function(g,e){if(this.host){return new this._pointerConstructor(g,e)}var f=e._getColorScheme(e.colorScheme)[0];this.pointerType=g.pointerType;if(this.pointerType!=="default"&&this.pointerType!=="arrow"){this.pointerType="default"}this.style=g.style||{fill:f,stroke:f,"stroke-width":1};this.size=e._validatePercentage(g.size,"7%");this.visible=g.visible;if(this.visible!==true&&this.visible!==false){this.visible=true}this.offset=e._validatePercentage(g.offset,0)}};d.extend(b,c);d.extend(a,c);d.jqx.jqxWidget("jqxLinearGauge","",{});d.jqx.jqxWidget("jqxGauge","",{});d.extend(d.jqx._jqxGauge.prototype,b);d.extend(d.jqx._jqxLinearGauge.prototype,a)})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_calculateaggregate:function(g,j,h,c){var f=g.aggregates;if(!f){f=j}if(f){var e=new Array();for(var d=0;d<f.length;d++){if(f[d]=="count"){continue}e[e.length]=g.cellsformat}if(this.source&&this.source.getAggregatedData){if(c==undefined){c=this.getrows()}if(this.virtualmode){var c=new Array();a.each(this.source._source.records,function(){c.push(this)})}if(h==undefined||h==true){var b=this.source.getAggregatedData([{name:g.datafield,aggregates:f,formatStrings:e}],this.gridlocalization,c);return b}else{var b=this.source.getAggregatedData([{name:g.datafield,aggregates:f}],this.gridlocalization,c);return b}}}return null},getcolumnaggregateddata:function(c,g,h,d){var e=this.getcolumn(c);var j=(h==undefined||h==false)?false:h;if(g==null){return""}var b=e.aggregates;e.aggregates=null;var i=this._calculateaggregate(e,g,j,d);var f={};if(i){f=i[c]}e.aggregates=b;return f},refreshaggregates:function(){this._updatecolumnsaggregates()},renderaggregates:function(){this._updateaggregates()},_updatecolumnaggregates:function(d,g,b){var e=this;if(!g){b.children().remove();b.html("");if(d.aggregatesrenderer){var f={};if(d.aggregates){f=this.getcolumnaggregateddata(d.datafield,d.aggregates)}var c=d.aggregatesrenderer({},d,b,null);b.html(c)}return}b.children().remove();b.html("");if(d.aggregatesrenderer){if(g){var c=d.aggregatesrenderer(g[d.datafield],d,b,this.getcolumnaggregateddata(d.datafield,g[d.datafield]));b.html(c)}}else{a.each(g,function(){var i=this;for(f in i){var j=a('<div style="position: relative; margin: 4px; overflow: hidden;"></div>');var h=f;h=e._getaggregatename(h);j.html(h+":"+i[f]);if(e.rtl){j.addClass(e.toThemeProperty("jqx-rtl"))}b.append(j)}})}},_getaggregatetype:function(c){switch(c){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return c}var b=c;for(var d in c){b=d;break}return b},_getaggregatename:function(c){var b=c;switch(c){case"min":b="Min";break;case"max":b="Max";break;case"count":b="Count";break;case"avg":b="Avg";break;case"product":b="Product";break;case"var":b="Var";break;case"stdevp":b="StDevP";break;case"stdev":b="StDev";break;case"varp":b="VarP";case"sum":b="Sum";break}if(c===b&&typeof(b)!="string"){for(var d in c){b=d;break}}return b},_updatecolumnsaggregates:function(){var f=this.getrows();var b=this.columns.records.length;if(undefined!=this.statusbar[0].cells){for(var e=0;e<b;e++){var g=a(this.statusbar[0].cells[e]);var d=this.columns.records[e];var c=this._calculateaggregate(d,null,true,f);this._updatecolumnaggregates(d,c,g)}}},_updateaggregates:function(){var b=a('<div style="position: relative;" id="statusrow'+this.element.id+'"></div>');var e=0;var l=this.columns.records.length;var k=this.toThemeProperty("jqx-grid-cell");if(this.rtl){k+=" "+this.toThemeProperty("jqx-grid-cell-rtl");e=-1}k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var m=l+10;var n=new Array();this.statusbar[0].cells=n;for(var g=0;g<l;g++){var f=this.columns.records[g];var h=this._calculateaggregate(f);var c=f.width;if(c<f.minwidth){c=f.minwidth}if(c>f.maxwidth){c=f.maxwidth}var d=k;if(f.cellsalign){d+=" "+this.toThemeProperty("jqx-"+f.cellsalign+"-align")}var i=a('<div style="overflow: hidden; position: absolute; height: 100%;" class="'+d+'"></div>');b.append(i);i.css("left",e);if(!this.rtl){i.css("z-index",m--)}else{i.css("z-index",m++)}i.width(c);i[0].left=e;if(!(f.hidden&&f.hideable)){e+=c}else{i.css("display","none")}n[n.length]=i[0];this._updatecolumnaggregates(f,h,i)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){b.css("z-index",m--)}b.width(parseFloat(e)+2);b.height(this.statusbarheight);this.statusbar.children().remove();this.statusbar.append(b);this.statusbar.removeClass(this.toThemeProperty("jqx-widget-header"));this.statusbar.addClass(k);this.statusbar.css("border-bottom-color","transparent");this.statusbar.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}}})})(jqxBaseFramework); | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_calculateaggregate:function(g,j,h,c){var f=g.aggregates;if(!f){f=j}if(f){var e=new Array();for(var d=0;d<f.length;d++){if(f[d]=="count"){continue}e[e.length]=g.cellsformat}if(this.source&&this.source.getAggregatedData){if(c==undefined){c=this.getrows()}if(this.virtualmode){var c=new Array();a.each(this.source._source.records,function(){c.push(this)})}if(h==undefined||h==true){var b=this.source.getAggregatedData([{name:g.datafield,aggregates:f,formatStrings:e}],this.gridlocalization,c);return b}else{var b=this.source.getAggregatedData([{name:g.datafield,aggregates:f}],this.gridlocalization,c);return b}}}return null},getcolumnaggregateddata:function(c,g,h,d){var e=this.getcolumn(c);var j=(h==undefined||h==false)?false:h;if(g==null){return""}var b=e.aggregates;e.aggregates=null;var i=this._calculateaggregate(e,g,j,d);var f={};if(i){f=i[c]}e.aggregates=b;return f},refreshaggregates:function(){this._updatecolumnsaggregates()},renderaggregates:function(){this._updateaggregates()},_updatecolumnaggregates:function(d,g,b){var e=this;if(!g){b.children().remove();b.html("");if(d.aggregatesrenderer){var f={};if(d.aggregates){f=this.getcolumnaggregateddata(d.datafield,d.aggregates)}var c=d.aggregatesrenderer({},d,b,null);b.html(c)}return}b.children().remove();b.html("");if(d.aggregatesrenderer){if(g){var c=d.aggregatesrenderer(g[d.datafield],d,b,this.getcolumnaggregateddata(d.datafield,g[d.datafield]));b.html(c)}}else{a.each(g,function(){var i=this;for(f in i){var j=a('<div style="position: relative; margin: 4px; overflow: hidden;"></div>');var h=f;h=e._getaggregatename(h);j.html(h+":"+i[f]);if(e.rtl){j.addClass(e.toThemeProperty("jqx-rtl"))}b.append(j)}})}},_getaggregatetype:function(c){switch(c){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return c}var b=c;for(var d in c){b=d;break}return b},_getaggregatename:function(c){var b=c;switch(c){case"min":b="Min";break;case"max":b="Max";break;case"count":b="Count";break;case"avg":b="Avg";break;case"product":b="Product";break;case"var":b="Var";break;case"stdevp":b="StDevP";break;case"stdev":b="StDev";break;case"varp":b="VarP";case"sum":b="Sum";break}if(c===b&&typeof(b)!="string"){for(var d in c){b=d;break}}return b},_updatecolumnsaggregates:function(){var f=this.getrows();var b=this.columns.records.length;if(undefined!=this.statusbar[0].cells){for(var e=0;e<b;e++){var g=a(this.statusbar[0].cells[e]);var d=this.columns.records[e];var c=this._calculateaggregate(d,null,true,f);this._updatecolumnaggregates(d,c,g)}}},_updateaggregates:function(){var b=a('<div style="position: relative;" id="statusrow'+this.element.id+'"></div>');var e=0;var l=this.columns.records.length;var k=this.toThemeProperty("jqx-grid-cell");if(this.rtl){k+=" "+this.toThemeProperty("jqx-grid-cell-rtl");e=-1}k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var m=l+10;var n=new Array();this.statusbar[0].cells=n;for(var g=0;g<l;g++){var f=this.columns.records[g];var h=this._calculateaggregate(f);var c=f.width;if(c<f.minwidth){c=f.minwidth}if(c>f.maxwidth){c=f.maxwidth}var d=k;if(f.cellsalign){d+=" "+this.toThemeProperty("jqx-"+f.cellsalign+"-align")}var i=a('<div style="overflow: hidden; position: absolute; height: 100%;" class="'+d+'"></div>');b.append(i);i.css("left",e);if(!this.rtl){i.css("z-index",m--)}else{i.css("z-index",m++)}i.width(c);i[0].left=e;if(!(f.hidden&&f.hideable)){e+=c}else{i.css("display","none")}n[n.length]=i[0];this._updatecolumnaggregates(f,h,i)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){b.css("z-index",m--)}b.width(parseFloat(e)+2);b.height(this.statusbarheight);this.statusbar.children().remove();this.statusbar.append(b);this.statusbar.removeClass(this.toThemeProperty("jqx-widget-header"));this.statusbar.addClass(k);this.statusbar.css("border-bottom-color","transparent");this.statusbar.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}this._arrange()}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ 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);if(!b){return}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(n.getboundindex(h),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(D,x){if(x.handlekeyboardnavigation){var p=x.handlekeyboardnavigation(D);if(p==true){return true}}var H=D.charCode?D.charCode:D.keyCode?D.keyCode:0;if(x.showfilterrow&&x.filterable){if(this.filterrow){if(a(D.target).ischildof(this.filterrow)){return true}}}if(x.pageable){if(a(D.target).ischildof(this.pager)){return true}}if(this.showtoolbar){if(a(D.target).ischildof(this.toolbar)){return true}}if(this.showeverpresentrow){if(this.addnewrowtop){if(a(D.target).ischildof(this.addnewrowtop)){return true}}if(this.addnewrowbottom){if(a(D.target).ischildof(this.addnewrowbottom)){return true}}}if(this.showstatusbar){if(a(D.target).ischildof(this.statusbar)){return true}}if(this.rowdetails){if(a(D.target).ischildof(this.content.find("[role='rowgroup']"))){return true}}if(this.editcell){if(this.editmode==="selectedrow"){if(H===13){this.endrowedit(this.editcell.row,false)}else{if(H===27){this.endrowedit(this.editcell.row,true)}}if(H===9){return false}return true}if(this.editcell.columntype==null||this.editcell.columntype=="textbox"||this.editcell.columntype=="numberinput"||this.editcell.columntype=="combobox"||this.editcell.columntype=="datetimeinput"){if(H>=33&&H<=40&&x.selectionmode=="multiplecellsadvanced"){var i=this.editcell.columntype=="textbox"||this.editcell.columntype==null?this.editcell.editor:this.editcell.editor.find("input");var I=x._selection(i);var y=i.val().length;if(I.length>0&&this.editcell.columntype!="datetimeinput"){x._cancelkeydown=true}if(I.start>0&&H==37){x._cancelkeydown=true}if(I.start<y&&H==39&&this.editcell.columntype!="datetimeinput"){x._cancelkeydown=true}if(this.editcell.columntype=="datetimeinput"&&H==39){if(I.start+I.length<y){x._cancelkeydown=true}}}}else{if(this.editcell.columntype=="dropdownlist"){if(H==37||H==39&&x.selectionmode=="multiplecellsadvanced"){x._cancelkeydown=false}}else{if(this.selectionmode=="multiplecellsadvanced"&&this.editcell.columntype!="textbox"&&this.editcell.columntype!="numberinput"){x._cancelkeydown=true}}}if(H==32){if(x.editcell.columntype=="checkbox"){var f=x.getcolumn(x.editcell.datafield);if(f.editable){var o=!x.getcellvalue(x.editcell.row,x.editcell.column);if(f.cellbeginedit){var b=f.cellbeginedit(x.editcell.row,f.datafield,f.columntype,!o);if(b==false){return false}}var k=x.getrowdata(x.editcell.row);x.setcellvalue(x.editcell.row,x.editcell.column,o,true);x._raiseEvent(18,{rowindex:x.editcell.row,row:k,datafield:x.editcell.column,oldvalue:!o,value:o,columntype:"checkbox"});return false}}}if(H==9){var h=this.editcell.row;var v=this.editcell.column;var n=v;var A=x._getcolumnindex(v);var u=false;var d=x.getrowvisibleindex(h);this.editchar="";var e=this.editcell.validated;if(!this.editcell.validated){var e=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false)}if(e!=false){if(D.shiftKey){var f=x._getpreveditablecolumn(A);if(f){v=f.datafield;u=true;if(x.selectionmode.indexOf("cell")!=-1){x.selectprevcell(h,n);x._oldselectedcell=x.selectedcell;setTimeout(function(){x.ensurecellvisible(d,v)},10)}}}else{var f=x._getnexteditablecolumn(A);if(f){v=f.datafield;u=true;if(x.selectionmode.indexOf("cell")!=-1){x.selectnextcell(h,n);x._oldselectedcell=x.selectedcell;setTimeout(function(){x.ensurecellvisible(d,v)},10)}}}if(u){x.begincelledit(h,v);if(this.editcell!=null&&this.editcell.columntype=="checkbox"){this._renderrows(this.virtualsizeinfo)}}else{if(this.editcell!=null){x.endcelledit(h,v,false);this._renderrows(this.virtualsizeinfo)}return true}}return false}else{if(H==13){var t=this.selectedcell;if(t){var w=this.getrowvisibleindex(t.rowindex)}this.endcelledit(this.editcell.row,this.editcell.column,false,true);if(this.selectionmode=="multiplecellsadvanced"){var c=x.getselectedcell();if(c!=null){if(x.selectcell){if(this.editcell==null){if(c.rowindex+1<this.dataview.totalrecords){if(this.sortcolumn!=c.datafield){var d=this.getrowvisibleindex(c.rowindex);var G=this.dataview.loadedrecords[d+1];if(G){if(!this.pageable||(this.pageable&&d+1<(this.dataview.pagenum+1)*this.pagesize)){this.clearselection(false);this.selectcell(this.getboundindex(G),c.datafield);var c=this.getselectedcell();this.ensurecellvisible(G.visibleindex,c.datafield)}}}else{if(t!=null){var F=this.dataview.loadedrecords[w+1];if(F){if(!this.pageable||(this.pageable&&w+1<this.pagesize)){this.clearselection(false);this.selectcell(this.getboundindex(F),c.datafield)}else{if(this.pageable&&w+1>=this.pagesize){this.clearselection(false);var F=this.dataview.loadedrecords[w];this.selectcell(this.getboundindex(F),c.datafield)}}}}}}}}}}return false}else{if(H==27){this.endcelledit(this.editcell.row,this.editcell.column,true,true);return false}}}}else{var z=false;if(H==113){z=true}if(!D.ctrlKey&&!D.altKey&&!D.metaKey){if(H>=48&&H<=57){this.editchar=String.fromCharCode(H);z=true}if(H>=65&&H<=90){this.editchar=String.fromCharCode(H);var s=false;if(D.shiftKey){s=D.shiftKey}else{if(D.modifiers){s=!!(D.modifiers&4)}}if(!s){this.editchar=this.editchar.toLowerCase()}z=true}else{if(H>=96&&H<=105){this.editchar=H-96;this.editchar=this.editchar.toString();z=true}}var r=a(".jqx-grid").length;z=z&&(r==1||(r>1&&x.focused));var l=a.data(document.body,"jqxgrid.edit");if(l!==undefined&&l!==""){if(H===13||z){if(l!=x.element.id){return true}}}}if(H==13||z){if(x.getselectedrowindex){var h=x.getselectedrowindex();switch(x.selectionmode){case"singlerow":case"multiplerows":case"multiplerowsextended":if(h>=0){var v="";for(var B=0;B<x.columns.records.length;B++){var f=x.getcolumnat(B);if(f.editable){v=f.datafield;break}}x.begincelledit(h,v)}break;case"singlecell":case"multiplecells":case"multiplecellsextended":var c=x.getselectedcell();if(c!=null){var f=x._getcolumnbydatafield(c.datafield);if(f.columntype!="checkbox"){x.begincelledit(c.rowindex,c.datafield)}}break;case"multiplecellsadvanced":var c=x.getselectedcell();if(c!=null){if(H==13){if(x.selectcell){if(c.rowindex+1<x.dataview.totalrecords){var d=this.getrowvisibleindex(c.rowindex);var G=this.dataview.loadedrecords[d+1];if(G){this.clearselection(false);this.selectcell(this.getboundindex(G),c.datafield);var c=this.getselectedcell();this.ensurecellvisible(G.visibleindex,c.datafield)}}}}else{if(x.editmode!=="selectedrow"){x.begincelledit(c.rowindex,c.datafield)}}}break}return false}}if(H==46){var g=x.getselectedcells();if(x.selectionmode.indexOf("cell")==-1){if(x._getcellsforcopypaste){g=x._getcellsforcopypaste()}}if(g!=null&&g.length>0){for(var q=0;q<g.length;q++){var c=g[q];if(!c.datafield){continue}var f=x.getcolumn(c.datafield);var E=x.getcellvalue(c.rowindex,c.datafield);if(E!==""&&f.editable&&x.enablekeyboarddelete){var j=null;if(f.columntype=="checkbox"){if(!f.threestatecheckbox){j=false}}if(f.cellbeginedit){var b=f.cellbeginedit(c.rowindex,f.datafield,f.columntype,j);if(b==false){return false}}var k=x.getrowdata(c.rowindex);x._raiseEvent(17,{rowindex:c.rowindex,row:k,datafield:c.datafield,value:E});if(q==g.length-1){x.setcellvalue(c.rowindex,c.datafield,j,true);if(f.displayfield!=f.datafield){x.setcellvalue(c.rowindex,f.displayfield,j,true)}}else{x.setcellvalue(c.rowindex,c.datafield,j,false);if(f.displayfield!=f.datafield){x.setcellvalue(c.rowindex,f.displayfield,j,true)}}if(f.cellendedit){var C=f.cellendedit(c.rowindex,f.datafield,f.columntype,j)}x._raiseEvent(18,{rowindex:c.rowindex,row:k,datafield:c.datafield,oldvalue:E,value:j})}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo);return false}}if(H==32){var c=x.getselectedcell();if(c!=null){var f=x.getcolumn(c.datafield);if(f.columntype=="checkbox"&&f.editable){var o=!x.getcellvalue(c.rowindex,c.datafield);if(f.cellbeginedit){var b=f.cellbeginedit(c.rowindex,f.datafield,f.columntype,!o);if(b==false){return false}}var k=x.getrowdata(c.rowindex);x._raiseEvent(17,{rowindex:c.rowindex,row:k,datafield:c.datafield,value:!o,columntype:"checkbox"});x.setcellvalue(c.rowindex,c.datafield,o,true);x._raiseEvent(18,{rowindex:c.rowindex,row:k,datafield:c.datafield,oldvalue:!o,value:o,columntype:"checkbox"});return false}}}}return true},begincelledit:function(n,e,l,g,c){var f=this.getcolumn(e);this._cellscache=new Array();if(e==null){return}if(f.columntype=="number"||f.columntype=="button"){return}if(this.groupable){if(this.groups.indexOf(e)>=0){return}if(this.groups.indexOf(f.displayfield)>=0){return}}if(this.editrow!=undefined){return}if(this.editcell){if(this.editcell.row==n&&this.editcell.column==e){return true}if(this.editmode==="selectedrow"){if(this.editcell.row==n){return}}var d=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false);if(false==d){return}}var i=f.columntype=="checkbox"||f.columntype=="button";this.host.removeClass("jqx-disableselect");this.content.removeClass("jqx-disableselect");if(f.editable){if(f.cellbeginedit){var k=this.getcell(n,e);var m=f.cellbeginedit(n,e,f.columntype,k!=null?k.value:null);if(m==false){return}}var j=this.getrowvisibleindex(n);this.editcell=this.getcell(n,e);if(this.editcell){this.editcell.visiblerowindex=j;if(!this.editcell.editing){if(!i){this.editcell.editing=true}this.editcell.columntype=f.columntype;this.editcell.defaultvalue=l;if(f.defaultvalue!=undefined){this.editcell.defaultvalue=f.defaultvalue}this.editcell.init=true;if(f.columntype!="checkbox"&&this.editmode!="selectedrow"){var h=this.getrowdata(n);this._raiseEvent(17,{rowindex:n,row:h,datafield:f.datafield,value:this.editcell.value,columntype:f.columntype})}a.data(document.body,"jqxgrid.edit",this.element.id);if(!i){var b=this.getrowvisibleindex(n);if(g!==false){this.ensurecellvisible(b,f.datafield)}if(c!==false){this._renderrows(this.virtualsizeinfo)}}if(this.editcell){this.editcell.init=false;return true}}}}else{if(!this.editcell){return}this.editcell.editor=null;this.editcell.editing=false;if(c!==false){this._renderrows(this.virtualsizeinfo)}this.editcell=null}},getScrollTop:function(){if(this._py){return pageYOffset}this._py=typeof pageYOffset!="undefined";if(this._py){return pageYOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollTop}},getScrollLeft:function(){if(typeof pageXOffset!="undefined"){return pageXOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollLeft}},endcelledit:function(h,n,j,e,o){if(h==undefined||n==undefined){if(this.editcell){h=this.editcell.row;n=this.editcell.column}if(j==undefined){j=true}}if(!this.editcell){return}var d=this.getcolumn(n);var u=this;if(u.editmode==="selectedrow"){this.endrowedit(h,j);return}var t=function(){if(o!=false){if(u.isTouchDevice()){return}if(!u.isNestedGrid){var v=u.getScrollTop();var x=u.getScrollLeft();try{u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}setTimeout(function(){u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}},10)}catch(w){}}}};if(d.columntype=="checkbox"||d.columntype=="button"){if(this.editcell){this.editcell.editor=null;this.editcell.editing=false;this.editcell=null}return true}var i=this._geteditorvalue(d);var g=function(w){w._hidecelleditor();if(d.cellendedit){d.cellendedit(h,n,d.columntype,w.editcell.value,i)}w.editchar=null;if(d.displayfield!=d.datafield){var v=w.getcellvalue(w.editcell.row,d.displayfield);var x=w.editcell.value;oldvalue={value:x,label:v}}else{oldvalue=w.editcell.value}var y=w.getrowdata(h);w._raiseEvent(18,{rowindex:h,row:y,datafield:n,displayfield:d.displayfield,oldvalue:i,value:i,columntype:d.columntype});w.editcell.editor=null;w.editcell.editing=false;w.editcell=null;if(e||e==undefined){w._renderrows(w.virtualsizeinfo)}t();if(!w.enablebrowserselection){w.host.addClass("jqx-disableselect");w.content.addClass("jqx-disableselect")}};if(j){g(this);return false}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(d.cellvaluechanging){var b=d.cellvaluechanging(h,n,d.columntype,this.editcell.value,i);if(b!=undefined){i=b}}if(d.validation){var c=this.getcell(h,n);try{var p=d.validation(c,i);var l=this.gridlocalization.validationstring;if(p.message!=undefined){l=p.message}var m=typeof p=="boolean"?p:p.result;if(!m){if(p.showmessage==undefined||p.showmessage==true){this._showvalidationpopup(h,n,l)}this.editcell.validated=false;return false}}catch(r){this._showvalidationpopup(h,n,this.gridlocalization.validationstring);this.editcell.validated=false;return false}}if(d.displayfield!=d.datafield){var k=this.getcellvalue(this.editcell.row,d.displayfield);var q=this.editcell.value;oldvalue={value:q,label:k}}else{oldvalue=this.editcell.value}var f=this.getrowdata(h);if(d.cellendedit){var s=d.cellendedit(h,n,d.columntype,this.editcell.value,i);if(s==false){this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:oldvalue,columntype:d.columntype});g(this);return false}}this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:i,columntype:d.columntype});this._hidecelleditor(false);if(this.editcell!=undefined){this.editcell.editor=null;this.editcell.editing=false}this.editcell=null;this.editchar=null;this.setcellvalue(h,n,i,e);if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}if(!a.jqx.browser.msie){t()}a.data(document.body,"jqxgrid.edit","");return true},beginrowedit:function(e){var d=this;var f=-1;d._oldselectedrow=e;this._cellscache=new Array();var c=false;if(this.editmode!="selectedrow"){c=true}if(c){var b=this.editmode;this.editmode="selectedrow"}a.each(this.columns.records,function(h,j){if(d.editable&&this.editable){var g=d.getcell(e,this.datafield);d.begincelledit(e,this.datafield,null,false,false);var i=d.getrowdata(e);d._raiseEvent(17,{rowindex:e,row:i,datafield:this.datafield,value:g.value,columntype:this.columntype})}});if(d.editcell){d.editcell.init=true}this._renderrows(this.virtualsizeinfo);if(c){this.editmode=b}},endrowedit:function(k,o){var D=this;if(!this.editcell){return false}if(this.editcell.editor==undefined){return false}var C=function(){if(focus!=false){if(D.isTouchDevice()){return}if(!D.isNestedGrid){var i=D.getScrollTop();var F=D.getScrollLeft();try{D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}setTimeout(function(){D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}},10)}catch(E){}}}};var p=false;if(this.editmode!="selectedrow"){p=true}if(p){var v=this.editmode;this.editmode="selectedrow"}var h=false;var d={};if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}for(var B=0;B<this.columns.records.length;B++){var e=this.columns.records[B];if(!e.editable){continue}if(e.hidden){continue}if(e.columntype=="checkbox"){continue}var l=this._geteditorvalue(e);var g=function(F){F._hidecelleditor();var E=F.getcellvalue(F.editcell.row,e.displayfield);if(e.cellendedit){e.cellendedit(k,u,e.columntype,E,l)}F.editchar=null;if(e.displayfield!=e.datafield){var i=F.getcellvalue(F.editcell.row,e.displayfield);var H=E;n={value:H,label:i}}else{n=E}var G=F.getrowdata(k);F._raiseEvent(18,{rowindex:k,row:G,datafield:u,displayfield:e.displayfield,oldvalue:E,value:E,columntype:e.columntype});F.editcell.editing=false};if(o){g(this);continue}if(e.cellvaluechanging){var n=this.getcellvalue(this.editcell.row,e.displayfield);var b=e.cellvaluechanging(k,u,e.columntype,n,l);if(b!=undefined){l=b}}var u=e.datafield;if(e.validation){var c=this.getcell(k,e.datafield);try{var w=e.validation(c,l);var r=this.gridlocalization.validationstring;if(w.message!=undefined){r=w.message}var t=typeof w=="boolean"?w:w.result;if(!t){if(w.showmessage==undefined||w.showmessage==true){this._showvalidationpopup(k,u,r)}h=true;this.editcell[e.datafield].validated=false;continue}}catch(z){this._showvalidationpopup(k,u,this.gridlocalization.validationstring);this.editcell[e.datafield].validated=false;h=true;continue}}if(e.displayfield!=e.datafield){var q=this.getcellvalue(this.editcell.row,e.displayfield);var x=this.editcell.value;n={value:x,label:q}}else{n=this.getcellvalue(this.editcell.row,e.displayfield)}d[e.datafield]={newvalue:l,oldvalue:n}}var y={};var s={};if(!h){this._hidecelleditor(false);for(var B=0;B<this.columns.records.length;B++){var e=this.columns.records[B];var u=e.datafield;if(e.hidden){continue}if(!e.editable){continue}var f=this.getrowdata(k);if(e.columntype=="checkbox"){var l=this.getcellvalue(k,e.displayfield);this._raiseEvent(18,{rowindex:k,row:f,datafield:e.datafield,displayfield:e.displayfield,oldvalue:l,value:l,columntype:e.columntype});continue}if(!d[e.datafield]){continue}var l=d[e.datafield].newvalue;var n=d[e.datafield].oldvalue;if(e.cellendedit){var A=e.cellendedit(k,u,e.columntype,n,l);if(A==false){this._raiseEvent(18,{rowindex:k,row:f,datafield:u,displayfield:e.displayfield,oldvalue:n,value:n,columntype:e.columntype});g(this);continue}}if(!this.source.updaterow){this._raiseEvent(18,{rowindex:k,row:f,datafield:e.datafield,displayfield:e.displayfield,oldvalue:n,value:l,columntype:e.columntype})}y[e.datafield]=l;s[e.datafield]=n}var j=this.getrowid(k);var f=this.getrowdata(k);a.each(y,function(i,F){if(F&&F.label!=undefined){var E=D.getcolumn(i);f[E.displayfield]=F.label;f[E.datafield]=F.value}else{f[i]=F}});if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}a.data(document.body,"jqxgrid.edit","");this.editcell=null;this.editchar=null;if(this.source.updaterow){var m=false;var D=this;var t=function(I){var G=D.source.updaterow;D.source.updaterow=null;if(false==I){a.each(s,function(i,K){if(K&&K.label!=undefined){var J=D.getcolumn(i);f[J.displayfield]=K.label;f[J.datafield]=K.value}else{f[i]=K}});D.updaterow(j,f)}else{D.updaterow(j,f)}for(var F=0;F<D.columns.records.length;F++){var H=D.columns.records[F];var E=H.datafield;D._raiseEvent(18,{rowindex:k,datafield:H.datafield,row:f,displayfield:H.displayfield,oldvalue:s[H.datafield],value:f[H.displayfield],columntype:H.columntype})}D.source.updaterow=G};try{m=this.source.updaterow(j,f,t);if(m==undefined){m=true}}catch(z){m=false;return}}else{this.updaterow(j,f);this._renderrows(this.virtualsizeinfo)}}if(p){this.editmode=v}return h},_selection:function(b){if("selectionStart" in b[0]){var g=b[0];var h=g.selectionEnd-g.selectionStart;return{start:g.selectionStart,end:g.selectionEnd,length:h,text:g.value}}else{var d=document.selection.createRange();if(d==null){return{start:0,end:g.value.length,length:0}}var c=b[0].createTextRange();var f=c.duplicate();c.moveToBookmark(d.getBookmark());f.setEndPoint("EndToStart",c);var h=d.text.length;return{start:f.text.length,end:f.text.length+d.text.length,length:h,text:d.text}}},_setSelection:function(e,b,d){if("selectionStart" in d[0]){d[0].focus();d[0].setSelectionRange(e,b)}else{var c=d[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",e);c.select()}},findRecordIndex:function(g,c,b){var b=b;if(c){var e=b.length;for(var h=0;h<e;h++){var f=b[h];var d=f.label;if(g==d){return h}}}return -1},_destroyeditors:function(){var b=this;if(!this.columns.records){return}a.each(this.columns.records,function(f,j){var c=a.trim(this.datafield).split(" ").join("");switch(this.columntype){case"dropdownlist":var g=b.editors["dropdownlist_"+c];if(g){g.jqxDropDownList("destroy");b.editors["dropdownlist_"+c]=null}break;case"combobox":var k=b.editors["combobox_"+c];if(k){k.jqxComboBox("destroy");b.editors["combobox_"+c]=null}break;case"datetimeinput":var d=b.editors["datetimeinput_"+this.datafield];if(d){d.jqxDateTimeInput("destroy");b.editors["datetimeinput_"+c]=null}break;case"numberinput":var e=b.editors["numberinput_"+c];if(e){e.jqxNumberInput("destroy");b.editors["numberinput_"+c]=null}break;case"custom":case"template":if(b.destroyeditor){if(b.editors["templateeditor_"+c]){b.destroyeditor(b.editors["templateeditor_"+c]);b.editors["templateeditor_"+c]=null}}if(b.destroyeditor){var m=b.getrows.length();for(var l=0;l<m;l++){if(b.editors["customeditor_"+c+"_"+l]){b.destroyeditor(b.editors["customeditor_"+c+"_"+l],l);b.editors["customeditor_"+c+"_"+l]=null}}}break;case"textbox":default:var h=b.editors["textboxeditor_"+c];if(h){b.removeHandler(h,"keydown");b.editors["textbox_"+c]=null}break}});b.editors=new Array()},_showcelleditor:function(q,G,n,K,w){if(n==undefined){return}if(this.editcell==null){return}if(G.columntype=="checkbox"&&G.editable){return}if(w==undefined){w=true}if(this.editmode=="selectedrow"){this.editchar="";w=false}var E=G.datafield;var g=a(n);var s=this;var d=this.editcell.editor;var I=this.getcellvalue(q,E);var C=this.getcelltext(q,E);var j=this.hScrollInstance;var t=j.value;var i=parseInt(t);var J=this.columns.records.indexOf(G);this.editcell.element=n;if(this.editcell.validated==false){var H="";if(this.validationpopup){H=this.validationpopup.text()}this._showvalidationpopup(q,E,H)}var l=function(P){if(s.hScrollInstance.isScrolling()||s.vScrollInstance.isScrolling()){return}if(!w){return}if(s.isTouchDevice()){return}if(P){P.focus()}if(s.gridcontent[0].scrollTop!=0){s.scrolltop(Math.abs(s.gridcontent[0].scrollTop));s.gridcontent[0].scrollTop=0}if(s.gridcontent[0].scrollLeft!=0){s.gridcontent[0].scrollLeft=0}};switch(G.columntype){case"dropdownlist":if(this.host.jqxDropDownList){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");var A=a.trim(G.displayfield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}if(A.indexOf(".")!=-1){A=A.replace(".","")}var k=this.editors["dropdownlist_"+D];d=k==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='dropdownlisteditor'></div>"):k;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(k==undefined){d.prependTo(this.table);d[0].id="dropdownlisteditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxDropDownList({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});this.editors["dropdownlist_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDropDownList({width:g.width()-2})}var c=d.jqxDropDownList("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxDropDownList("autoDropDownHeight",true)}else{d.jqxDropDownList("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxDropDownList("selectIndex",z,true)}else{d.jqxDropDownList("selectIndex",-1)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxDropDownList("selectIndex",this.editcell.defaultvalue,true)}if(w){d.jqxDropDownList("focus")}}break;case"combobox":if(this.host.jqxComboBox){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");var A=a.trim(G.displayfield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}if(A.indexOf(".")!=-1){A=A.replace(".","")}var r=this.editors["combobox_"+D];d=r==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='comboboxeditor'></div>"):r;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(r==undefined){d.prependTo(this.table);d[0].id="comboboxeditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxComboBox({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});d.removeAttr("tabindex");d.find("div").removeAttr("tabindex");this.editors["combobox_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxComboBox({width:g.width()-2})}var c=d.jqxComboBox("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxComboBox("autoDropDownHeight",true)}else{d.jqxComboBox("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxComboBox("selectIndex",z,true);d.jqxComboBox("val",I)}else{d.jqxComboBox("selectIndex",-1);d.jqxComboBox("val",I)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxComboBox("selectIndex",this.editcell.defaultvalue,true)}if(this.editchar&&this.editchar.length>0){d.jqxComboBox("input").val(this.editchar)}if(w){setTimeout(function(){l(d.jqxComboBox("input"));if(d){d.jqxComboBox("_setSelection",0,0);if(s.editchar){d.jqxComboBox("_setSelection",1,1);s.editchar=null}else{if(d.jqxComboBox("input")){var P=d.jqxComboBox("input").val();d.jqxComboBox("_setSelection",0,P.length)}}}},10)}}break;case"datetimeinput":if(this.host.jqxDateTimeInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var v=this.editors["datetimeinput_"+D];d=v==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='datetimeeditor'></div>"):v;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(v==undefined){d.prependTo(this.table);d[0].id="datetimeeditor"+this.element.id+D;var F={calendar:this.gridlocalization};d.jqxDateTimeInput({enableBrowserBoundsDetection:true,localization:F,_editor:true,theme:this.theme,rtl:this.rtl,width:g.width(),height:g.height(),formatString:G.cellsformat});this.editors["datetimeinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDateTimeInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var L=new Date(I);if(L=="Invalid Date"){if(this.source.getvaluebytype){L=this.source.getvaluebytype(I,{name:G.datafield,type:"date"})}}d.jqxDateTimeInput("setDate",L)}else{d.jqxDateTimeInput("setDate",null)}if(this.editcell.defaultvalue!=undefined){d.jqxDateTimeInput("setDate",this.editcell.defaultvalue)}}if(w){setTimeout(function(){l(d.jqxDateTimeInput("dateTimeInput"))},10)}}break;case"numberinput":if(this.host.jqxNumberInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var N=this.editors["numberinput_"+D];d=N==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='numbereditor'></div>"):N;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(N==undefined){d.prependTo(this.table);d[0].id="numbereditor"+this.element.id+D;var m="";var y="left";var M=2;if(G.cellsformat){if(G.cellsformat.indexOf("c")!=-1){m=this.gridlocalization.currencysymbol;y=this.gridlocalization.currencysymbolposition;if(y=="before"){y="left"}else{y="right"}if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}else{if(G.cellsformat.indexOf("p")!=-1){m=this.gridlocalization.percentsymbol;y="right";if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}}}else{M=0}d.jqxNumberInput({decimalSeparator:this.gridlocalization.decimalseparator,decimalDigits:M,inputMode:"simple",theme:this.theme,rtl:this.rtl,width:g.width()-1,height:g.height()-1,spinButtons:true,symbol:m,symbolPosition:y});this.editors["numberinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxNumberInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var O=I;d.jqxNumberInput("setDecimal",O)}else{d.jqxNumberInput("setDecimal",0)}if(this.editcell.defaultvalue!=undefined){d.jqxNumberInput("setDecimal",this.editcell.defaultvalue)}if(this.editchar&&this.editchar.length>0){var o=parseInt(this.editchar);if(!isNaN(o)){d.jqxNumberInput("setDecimal",o)}}if(w){setTimeout(function(){l(d.jqxNumberInput("numberInput"));d.jqxNumberInput("_setSelectionStart",0);if(s.editchar){if(G.cellsformat.length>0){d.jqxNumberInput("_setSelectionStart",2)}else{d.jqxNumberInput("_setSelectionStart",1)}s.editchar=null}else{var P=d.jqxNumberInput("spinButtons");if(P){var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],Q.length,Q.length)}else{var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],0,Q.length)}}},10)}}}break;case"custom":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var B=this.editors["customeditor_"+D+"_"+q];d=B==undefined?a("<div style='overflow: hidden; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='customeditor'></div>"):B;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(B==undefined){d.prependTo(this.table);d[0].id="customeditor"+this.element.id+D+"_"+q;this.editors["customeditor_"+D+"_"+q]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"template":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var h=this.editors["templateeditor_"+D];d=h==undefined?a("<div style='overflow: hidden; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='templateeditor'></div>"):h;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(h==undefined){d.prependTo(this.table);d[0].id="templateeditor"+this.element.id+D;this.editors["templateeditor_"+D]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"textbox":default:n.innerHTML="";d=this.editors["textboxeditor_"+G.datafield]||a("<input autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' type='textbox' id='textboxeditor'/>");d[0].id="textboxeditor"+this.element.id+G.datafield;d.appendTo(g);if(this.rtl){d.css("direction","rtl")}if(K||d[0].className==""){d.addClass(this.toThemeProperty("jqx-input"));d.addClass(this.toThemeProperty("jqx-widget-content"));if(this.editchar&&this.editchar.length>0){d.val(this.editchar)}else{if(G.cellsformat!=""){I=this.getcelltext(q,E)}if(I==undefined){I=""}d.val(I)}if(this.editcell.defaultvalue!=undefined){d.val(this.editcell.defaultvalue)}d.width(g.width()+1);d.height(g.height()+1);if(G.createeditor){G.createeditor(q,I,d)}if(G.cellsformat!=""){if(G.cellsformat.indexOf("p")!=-1||G.cellsformat.indexOf("c")!=-1||G.cellsformat.indexOf("n")!=-1||G.cellsformat.indexOf("f")!=-1){if(!this.editors["textboxeditor_"+G.datafield]){d.keydown(function(Q){var W=Q.charCode?Q.charCode:Q.keyCode?Q.keyCode:0;var T=String.fromCharCode(W);var U=parseInt(T);if(isNaN(U)){return true}if(s._selection(d).length>0){return true}var S="";var R=d.val();if(G.cellsformat.length>1){var V=parseInt(G.cellsformat.substring(1));if(isNaN(V)){V=0}}else{var V=0}if(V>0){if(R.indexOf(s.gridlocalization.decimalseparator)!=-1){if(s._selection(d).start>R.indexOf(s.gridlocalization.decimalseparator)){return true}}}for(var X=0;X<R.length-V;X++){var P=R.substring(X,X+1);if(P.match(/^[0-9]+$/)!=null){S+=P}}if(S.length>=11){return false}})}}}}this.editors["textboxeditor_"+G.datafield]=d;if(K){if(w){setTimeout(function(){l(d);if(s.editchar){s._setSelection(d[0],1,1);s.editchar=null}else{s._setSelection(d[0],0,d.val().length)}},25)}}break}if(d){d[0].style.zIndex=1+n.style.zIndex;if(a.jqx.browser.msie&&a.jqx.browser.version<8){d[0].style.zIndex=1+this.columns.records.length+n.style.zIndex}d.css("display","block");this.editcell.editor=d;if(!this.editcell[E]){this.editcell[E]={};this.editcell[E].editor=d}else{this.editcell[E].editor=d}}if(K){if(G.initeditor){G.initeditor(q,I,d,C,this.editchar)}}if(s.isTouchDevice()){return}setTimeout(function(){if(s.content){s.content[0].scrollTop=0;s.content[0].scrollLeft=0}if(s.gridcontent){s.gridcontent[0].scrollLeft=0;s.gridcontent[0].scrollTop=0}},10)},_setSelection:function(d,g,b){try{if("selectionStart" in d){d.setSelectionRange(g,b)}else{var c=d.createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",g);c.select()}}catch(e){var f=e}},_hideeditors:function(){if(this.editcells!=null){var b=this;for(var c in this.editcells){b.editcell=b.editcells[c];b._hidecelleditor()}}},_hidecelleditor:function(b){if(!this.editcell){return}if(this.editmode==="selectedrow"){for(var c=0;c<this.columns.records.length;c++){var e=this.columns.records[c];if(this.editcell[e.datafield]&&this.editcell[e.datafield].editor){this.editcell[e.datafield].editor.hide();var d=this.editcell[e.datafield].editor;switch(e.columntype){case"dropdownlist":d.jqxDropDownList({closeDelay:0});d.jqxDropDownList("hideListBox");d.jqxDropDownList({closeDelay:300});break;case"combobox":d.jqxComboBox({closeDelay:0});d.jqxComboBox("hideListBox");d.jqxComboBox({closeDelay:300});break;case"datetimeinput":if(d.jqxDateTimeInput("isOpened")){d.jqxDateTimeInput({closeDelay:0});d.jqxDateTimeInput("hideCalendar");d.jqxDateTimeInput({closeDelay:300})}break}}}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}return}if(this.editcell.columntype=="checkbox"){return}if(this.editcell.editor){this.editcell.editor.hide();switch(this.editcell.columntype){case"dropdownlist":this.editcell.editor.jqxDropDownList({closeDelay:0});this.editcell.editor.jqxDropDownList("hideListBox");this.editcell.editor.jqxDropDownList({closeDelay:300});break;case"combobox":this.editcell.editor.jqxComboBox({closeDelay:0});this.editcell.editor.jqxComboBox("hideListBox");this.editcell.editor.jqxComboBox({closeDelay:300});break;case"datetimeinput":var f=this.editcell.editor;if(f.jqxDateTimeInput("isOpened")){f.jqxDateTimeInput({closeDelay:0});f.jqxDateTimeInput("hideCalendar");f.jqxDateTimeInput({closeDelay:300})}break}}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(!this.isNestedGrid){if(b!=false){this.element.focus()}}},_geteditorvalue:function(h){var o=new String();if(!this.editcell){return null}var l=this.editcell.editor;if(this.editmode=="selectedrow"){if(this.editcell[h.datafield]){var l=this.editcell[h.datafield].editor}}if(l){switch(h.columntype){case"textbox":default:o=l.val();if(h.cellsformat!=""){var n="string";var e=this.source.datafields||((this.source._source)?this.source._source.datafields:null);if(e){var p="";a.each(e,function(){if(this.name==h.displayfield){if(this.type){p=this.type}return false}});if(p){n=p}}var i=n==="number"||n==="float"||n==="int"||n==="integer";var f=n==="date"||n==="time";if(i||(n==="string"&&(h.cellsformat.indexOf("p")!=-1||h.cellsformat.indexOf("c")!=-1||h.cellsformat.indexOf("n")!=-1||h.cellsformat.indexOf("f")!=-1))){if(o===""&&h.nullable){return""}if(o.indexOf(this.gridlocalization.currencysymbol)>-1){o=o.replace(this.gridlocalization.currencysymbol,"")}var m=function(w,u,v){var s=w;if(u==v){return w}var t=s.indexOf(u);while(t!=-1){s=s.replace(u,v);t=s.indexOf(u)}return s};var k=o;k=new Number(k);if(!isNaN(k)){return k}o=m(o,this.gridlocalization.thousandsseparator,"");o=o.replace(this.gridlocalization.decimalseparator,".");if(o.indexOf(this.gridlocalization.percentsymbol)>-1){o=o.replace(this.gridlocalization.percentsymbol,"")}var d="";for(var r=0;r<o.length;r++){var b=o.substring(r,r+1);if(b==="-"){d+="-"}if(b==="."){d+="."}if(b.match(/^[0-9]+$/)!=null){d+=b}}o=d;o=o.replace(/ /g,"");o=new Number(o);if(isNaN(o)){o=""}}if(f||(n==="string"&&(h.cellsformat.indexOf("H")!=-1||h.cellsformat.indexOf("m")!=-1||h.cellsformat.indexOf("M")!=-1||h.cellsformat.indexOf("y")!=-1||h.cellsformat.indexOf("h")!=-1||h.cellsformat.indexOf("d")!=-1))){if(o===""&&h.nullable){return""}var c=o;o=new Date(o);if(o=="Invalid Date"||o==null){if(a.jqx.dataFormat){o=a.jqx.dataFormat.tryparsedate(c,this.gridlocalization)}if(o=="Invalid Date"||o==null){o=""}}}}if(h.displayfield!=h.datafield){o={label:o,value:o}}break;case"checkbox":if(l.jqxCheckBox){o=l.jqxCheckBox("checked")}break;case"datetimeinput":if(l.jqxDateTimeInput){l.jqxDateTimeInput({isEditing:false});l.jqxDateTimeInput("_validateValue");o=l.jqxDateTimeInput("getDate");if(o==null){return null}o=new Date(o.toString());if(h.displayfield!=h.datafield){o={label:o,value:o}}}break;case"dropdownlist":if(l.jqxDropDownList){var g=l.jqxDropDownList("selectedIndex");var q=l.jqxDropDownList("listBox").getVisibleItem(g);if(h.displayfield!=h.datafield){if(q){o={label:q.label,value:q.value}}else{o=""}}else{if(q){o=q.label}else{o=""}}if(o==null){o=""}}break;case"combobox":if(l.jqxComboBox){o=l.jqxComboBox("val");if(h.displayfield!=h.datafield){var q=l.jqxComboBox("getSelectedItem");if(q!=null){o={label:q.label,value:q.value}}}if(o==null){o=""}}break;case"numberinput":if(l.jqxNumberInput){if(this.touchdevice){l.jqxNumberInput("_doTouchHandling")}var j=l.jqxNumberInput("getDecimal");o=new Number(j);o=parseFloat(o);if(isNaN(o)){o=0}if(h.displayfield!=h.datafield){o={label:o,value:o}}}break}if(h.geteditorvalue){if(this.editmode=="selectedrow"){o=h.geteditorvalue(this.editcell.row,this.getcellvalue(this.editcell.row,h.datafield),l)}else{o=h.geteditorvalue(this.editcell.row,this.editcell.value,l)}}}return o},hidevalidationpopups:function(){if(this.popups){a.each(this.popups,function(){this.validation.remove();this.validationrow.remove()});this.popups=new Array()}if(this.validationpopup){this.validationpopuparrow.hide();this.validationpopup.hide()}},showvalidationpopup:function(f,j,h){if(h==undefined){var h=this.gridlocalization.validationstring}var g=a("<div style='z-index: 99999; top: 0px; left: 0px; position: absolute;'></div>");var r=a("<div style='width: 20px; height: 20px; z-index: 999999; top: 0px; left: 0px; position: absolute;'></div>");g.html(h);r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));g.addClass(this.toThemeProperty("jqx-grid-validation"));g.addClass(this.toThemeProperty("jqx-rc-all"));g.prependTo(this.table);r.prependTo(this.table);var l=this.hScrollInstance;var n=l.value;var d=parseInt(n);var b=this.getcolumn(j).uielement;var p=null;for(var o=0;o<this.hittestinfo.length;o++){if(f===this.hittestinfo[o].row.visibleindex){p=this.hittestinfo[o]}}if(!p){this.ensurerowvisible(f);var s=this;g.remove();r.remove();setTimeout(function(){var v=null;for(var u=0;u<s.hittestinfo.length;u++){if(f===s.hittestinfo[u].row.visibleindex){v=s.hittestinfo[u]}}if(v){s.showvalidationpopup(f,j,h)}},25);return}var c=a(p.visualrow);g.css("top",parseInt(c.position().top)+30+"px");var k=parseInt(g.css("top"));r.css("top",k-12);r.removeClass();r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var q=false;if(k>=this._gettableheight()){r.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));k=parseInt(c.position().top)-this.rowsheight-5;if(k<0){k=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));q=true}g.css("top",k+"px");r.css("top",k+g.outerHeight()-9)}var t=-d+parseInt(a(b).position().left);r.css("left",d+t+30);var m=g.width();if(m+t>this.host.width()-20){var e=m+t-this.host.width()+40;t-=e}if(!q){g.css("left",d+t)}else{g.css("left",d+parseInt(a(b).position().left)-g.outerWidth())}g.show();r.show();if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:g,validationrow:r}},_showvalidationpopup:function(p,e,q){var c=this.editcell;var k=this.editcell.editor;if(this.editmode=="selectedrow"){var c=this.editcell[e];if(c&&c.editor){k=c.editor;c.element=k}}if(!k){return}if(this.validationpopup&&a.jqx.isHidden(this.validationpopup)){if(this.validationpopup.remove){this.validationpopup.remove();this.validationpopuparrow.remove()}this.validationpopup=null;this.validationpopuparrow=null;if(e===undefined&&q===undefined&&this.editors&&this.editors.length===0){return}}if(!this.validationpopup){var n=a("<div style='z-index: 99999; top: 0px; left: 0px; position: absolute;'></div>");var m=a("<div style='width: 20px; height: 20px; z-index: 999999; top: 0px; left: 0px; position: absolute;'></div>");n.html(q);m.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));n.addClass(this.toThemeProperty("jqx-grid-validation"));n.addClass(this.toThemeProperty("jqx-rc-all"));n.prependTo(this.table);m.prependTo(this.table);this.validationpopup=n;this.validationpopuparrow=m}else{this.validationpopup.html(q)}var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);if(this.editmode=="selectedrow"){this.validationpopup.css("top",parseInt(a(c.editor).position().top)+(this.rowsheight+5)+"px")}else{this.validationpopup.css("top",parseInt(a(c.element).parent().position().top)+(this.rowsheight+5)+"px")}var b=parseInt(this.validationpopup.css("top"));this.validationpopuparrow.css("top",b-11);this.validationpopuparrow.removeClass();this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var o=this._gettableheight();var f=false;if(b>=o){this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));b=parseInt(a(c.element).parent().position().top)-this.rowsheight-5;if(b<0){b=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}this.validationpopup.css("top",b+"px");this.validationpopuparrow.css("top",b+this.validationpopup.outerHeight()-9)}var l=-g+parseInt(a(c.element).position().left);this.validationpopuparrow.css("left",g+l+30);var d=this.validationpopup.width();if(d+l>this.host.width()-20){var i=d+l-this.host.width()+40;l-=i}if(!f){this.validationpopup.css("left",g+l)}else{this.validationpopup.css("left",g+parseInt(a(c.element).position().left)-this.validationpopup.outerWidth())}if(this.editcell.editor.css("display")=="none"){this.validationpopup.hide();this.validationpopuparrow.hide()}else{this.validationpopup.show();this.validationpopuparrow.show()}}})})(jqxBaseFramework); | ||
(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);if(!b){return}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(n.getboundindex(h),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(D,x){if(x.handlekeyboardnavigation){var p=x.handlekeyboardnavigation(D);if(p==true){return true}}var H=D.charCode?D.charCode:D.keyCode?D.keyCode:0;if(x.showfilterrow&&x.filterable){if(this.filterrow){if(a(D.target).ischildof(this.filterrow)){return true}}}if(x.pageable){if(a(D.target).ischildof(this.pager)){return true}}if(this.showtoolbar){if(a(D.target).ischildof(this.toolbar)){return true}}if(this.showeverpresentrow){if(this.addnewrowtop){if(a(D.target).ischildof(this.addnewrowtop)){return true}}if(this.addnewrowbottom){if(a(D.target).ischildof(this.addnewrowbottom)){return true}}}if(this.showstatusbar){if(a(D.target).ischildof(this.statusbar)){return true}}if(this.rowdetails){if(a(D.target).ischildof(this.content.find("[role='rowgroup']"))){return true}}if(this.editcell){if(this.editmode==="selectedrow"){if(H===13){this.endrowedit(this.editcell.row,false)}else{if(H===27){this.endrowedit(this.editcell.row,true)}}if(H===9){return false}return true}if(this.editcell.columntype==null||this.editcell.columntype=="textbox"||this.editcell.columntype=="numberinput"||this.editcell.columntype=="combobox"||this.editcell.columntype=="datetimeinput"){if(H>=33&&H<=40&&x.selectionmode=="multiplecellsadvanced"){var i=this.editcell.columntype=="textbox"||this.editcell.columntype==null?this.editcell.editor:this.editcell.editor.find("input");var I=x._selection(i);var y=i.val().length;if(I.length>0&&this.editcell.columntype!="datetimeinput"){x._cancelkeydown=true}if(I.start>0&&H==37){x._cancelkeydown=true}if(I.start<y&&H==39&&this.editcell.columntype!="datetimeinput"){x._cancelkeydown=true}if(this.editcell.columntype=="datetimeinput"&&H==39){if(I.start+I.length<y){x._cancelkeydown=true}}}}else{if(this.editcell.columntype=="dropdownlist"){if(H==37||H==39&&x.selectionmode=="multiplecellsadvanced"){x._cancelkeydown=false}}else{if(this.selectionmode=="multiplecellsadvanced"&&this.editcell.columntype!="textbox"&&this.editcell.columntype!="numberinput"){x._cancelkeydown=true}}}if(H==32){if(x.editcell.columntype=="checkbox"){var f=x.getcolumn(x.editcell.datafield);if(f.editable){var o=!x.getcellvalue(x.editcell.row,x.editcell.column);if(f.cellbeginedit){var b=f.cellbeginedit(x.editcell.row,f.datafield,f.columntype,!o);if(b==false){return false}}var k=x.getrowdata(x.editcell.row);x.setcellvalue(x.editcell.row,x.editcell.column,o,true);x._raiseEvent(18,{rowindex:x.editcell.row,row:k,datafield:x.editcell.column,oldvalue:!o,value:o,columntype:"checkbox"});return false}}}if(H==9){var h=this.editcell.row;var v=this.editcell.column;var n=v;var A=x._getcolumnindex(v);var u=false;var d=x.getrowvisibleindex(h);this.editchar="";var e=this.editcell.validated;if(!this.editcell.validated){var e=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false)}if(e!=false){if(D.shiftKey){var f=x._getpreveditablecolumn(A);if(f){v=f.datafield;u=true;if(x.selectionmode.indexOf("cell")!=-1){x.selectprevcell(h,n);x._oldselectedcell=x.selectedcell;setTimeout(function(){x.ensurecellvisible(d,v)},10)}}}else{var f=x._getnexteditablecolumn(A);if(f){v=f.datafield;u=true;if(x.selectionmode.indexOf("cell")!=-1){x.selectnextcell(h,n);x._oldselectedcell=x.selectedcell;setTimeout(function(){x.ensurecellvisible(d,v)},10)}}}if(u){x.begincelledit(h,v);if(this.editcell!=null&&this.editcell.columntype=="checkbox"){this._renderrows(this.virtualsizeinfo)}}else{if(this.editcell!=null){x.endcelledit(h,v,false);this._renderrows(this.virtualsizeinfo)}return true}}return false}else{if(H==13){var t=this.selectedcell;if(t){var w=this.getrowvisibleindex(t.rowindex)}this.endcelledit(this.editcell.row,this.editcell.column,false,true);if(this.selectionmode=="multiplecellsadvanced"){var c=x.getselectedcell();if(c!=null){if(x.selectcell){if(this.editcell==null){if(c.rowindex+1<this.dataview.totalrecords){if(this.sortcolumn!=c.datafield){var d=this.getrowvisibleindex(c.rowindex);var G=this.dataview.loadedrecords[d+1];if(G){if(!this.pageable||(this.pageable&&d+1<(this.dataview.pagenum+1)*this.pagesize)){this.clearselection(false);this.selectcell(this.getboundindex(G),c.datafield);var c=this.getselectedcell();this.ensurecellvisible(G.visibleindex,c.datafield)}}}else{if(t!=null){var F=this.dataview.loadedrecords[w+1];if(F){if(!this.pageable||(this.pageable&&w+1<this.pagesize)){this.clearselection(false);this.selectcell(this.getboundindex(F),c.datafield)}else{if(this.pageable&&w+1>=this.pagesize){this.clearselection(false);var F=this.dataview.loadedrecords[w];this.selectcell(this.getboundindex(F),c.datafield)}}}}}}}}}}return false}else{if(H==27){this.endcelledit(this.editcell.row,this.editcell.column,true,true);return false}}}}else{var z=false;if(H==113){z=true}if(!D.ctrlKey&&!D.altKey&&!D.metaKey){if(H>=48&&H<=57){this.editchar=String.fromCharCode(H);z=true}if(H>=65&&H<=90){this.editchar=String.fromCharCode(H);var s=false;if(D.shiftKey){s=D.shiftKey}else{if(D.modifiers){s=!!(D.modifiers&4)}}if(!s){this.editchar=this.editchar.toLowerCase()}z=true}else{if(H>=96&&H<=105){this.editchar=H-96;this.editchar=this.editchar.toString();z=true}}var r=a(".jqx-grid").length;z=z&&(r==1||(r>1&&x.focused));var l=a.data(document.body,"jqxgrid.edit");if(l!==undefined&&l!==""){if(H===13||z){if(l!=x.element.id){return true}}}}if(H==13||z){if(x.getselectedrowindex){var h=x.getselectedrowindex();switch(x.selectionmode){case"singlerow":case"multiplerows":case"multiplerowsextended":if(h>=0){var v="";for(var B=0;B<x.columns.records.length;B++){var f=x.getcolumnat(B);if(f.editable){v=f.datafield;break}}x.begincelledit(h,v)}break;case"singlecell":case"multiplecells":case"multiplecellsextended":var c=x.getselectedcell();if(c!=null){var f=x._getcolumnbydatafield(c.datafield);if(f.columntype!="checkbox"){x.begincelledit(c.rowindex,c.datafield)}}break;case"multiplecellsadvanced":var c=x.getselectedcell();if(c!=null){if(H==13){if(x.selectcell){if(c.rowindex+1<x.dataview.totalrecords){var d=this.getrowvisibleindex(c.rowindex);var G=this.dataview.loadedrecords[d+1];if(G){this.clearselection(false);this.selectcell(this.getboundindex(G),c.datafield);var c=this.getselectedcell();this.ensurecellvisible(G.visibleindex,c.datafield)}}}}else{if(x.editmode!=="selectedrow"){x.begincelledit(c.rowindex,c.datafield)}}}break}return false}}if(H==46){var g=x.getselectedcells();if(x.selectionmode.indexOf("cell")==-1){if(x._getcellsforcopypaste){g=x._getcellsforcopypaste()}}if(g!=null&&g.length>0){for(var q=0;q<g.length;q++){var c=g[q];if(!c.datafield){continue}var f=x.getcolumn(c.datafield);var E=x.getcellvalue(c.rowindex,c.datafield);if(E!==""&&f.editable&&x.enablekeyboarddelete){var j=null;if(f.columntype=="checkbox"){if(!f.threestatecheckbox){j=false}}if(f.cellbeginedit){var b=f.cellbeginedit(c.rowindex,f.datafield,f.columntype,j);if(b==false){return false}}var k=x.getrowdata(c.rowindex);x._raiseEvent(17,{rowindex:c.rowindex,row:k,datafield:c.datafield,value:E});if(q==g.length-1){x.setcellvalue(c.rowindex,c.datafield,j,true);if(f.displayfield!=f.datafield){x.setcellvalue(c.rowindex,f.displayfield,j,true)}}else{x.setcellvalue(c.rowindex,c.datafield,j,false);if(f.displayfield!=f.datafield){x.setcellvalue(c.rowindex,f.displayfield,j,true)}}if(f.cellendedit){var C=f.cellendedit(c.rowindex,f.datafield,f.columntype,j)}x._raiseEvent(18,{rowindex:c.rowindex,row:k,datafield:c.datafield,oldvalue:E,value:j})}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo);return false}}if(H==32){var c=x.getselectedcell();if(c!=null){var f=x.getcolumn(c.datafield);if(f.columntype=="checkbox"&&f.editable){var o=!x.getcellvalue(c.rowindex,c.datafield);if(f.cellbeginedit){var b=f.cellbeginedit(c.rowindex,f.datafield,f.columntype,!o);if(b==false){return false}}var k=x.getrowdata(c.rowindex);x._raiseEvent(17,{rowindex:c.rowindex,row:k,datafield:c.datafield,value:!o,columntype:"checkbox"});x.setcellvalue(c.rowindex,c.datafield,o,true);x._raiseEvent(18,{rowindex:c.rowindex,row:k,datafield:c.datafield,oldvalue:!o,value:o,columntype:"checkbox"});return false}}}}return true},begincelledit:function(n,e,l,g,c){var f=this.getcolumn(e);this._cellscache=new Array();if(e==null){return}if(f.columntype=="number"||f.columntype=="button"){return}if(this.groupable){if(this.groups.indexOf(e)>=0){return}if(this.groups.indexOf(f.displayfield)>=0){return}}if(this.editrow!=undefined){return}if(this.editcell){if(this.editcell.row==n&&this.editcell.column==e){return true}if(this.editmode==="selectedrow"){if(this.editcell.row==n){return}}var d=this.endcelledit(this.editcell.row,this.editcell.column,false,true,false);if(false==d){return}}var i=f.columntype=="checkbox"||f.columntype=="button";this.host.removeClass("jqx-disableselect");this.content.removeClass("jqx-disableselect");if(f.editable){if(f.cellbeginedit){var k=this.getcell(n,e);var m=f.cellbeginedit(n,e,f.columntype,k!=null?k.value:null);if(m==false){return}}var j=this.getrowvisibleindex(n);this.editcell=this.getcell(n,e);if(this.editcell){this.editcell.visiblerowindex=j;if(!this.editcell.editing){if(!i){this.editcell.editing=true}this.editcell.columntype=f.columntype;this.editcell.defaultvalue=l;if(f.defaultvalue!=undefined){this.editcell.defaultvalue=f.defaultvalue}this.editcell.init=true;if(f.columntype!="checkbox"&&this.editmode!="selectedrow"){var h=this.getrowdata(n);this._raiseEvent(17,{rowindex:n,row:h,datafield:f.datafield,value:this.editcell.value,columntype:f.columntype})}a.data(document.body,"jqxgrid.edit",this.element.id);if(!i){var b=this.getrowvisibleindex(n);if(g!==false){this.ensurecellvisible(b,f.datafield)}if(c!==false){this._renderrows(this.virtualsizeinfo)}}if(this.editcell){this.editcell.init=false;return true}}}}else{if(!this.editcell){return}this.editcell.editor=null;this.editcell.editing=false;if(c!==false){this._renderrows(this.virtualsizeinfo)}this.editcell=null}},getScrollTop:function(){if(this._py){return pageYOffset}this._py=typeof pageYOffset!="undefined";if(this._py){return pageYOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollTop}},getScrollLeft:function(){if(typeof pageXOffset!="undefined"){return pageXOffset}else{var c=document.body;var b=document.documentElement;b=(b.clientHeight)?b:c;return b.scrollLeft}},endcelledit:function(h,n,j,e,o){if(h==undefined||n==undefined){if(this.editcell){h=this.editcell.row;n=this.editcell.column}if(j==undefined){j=true}}if(!this.editcell){return}var d=this.getcolumn(n);var u=this;if(u.editmode==="selectedrow"){this.endrowedit(h,j);return}var t=function(){if(o!=false){if(u.isTouchDevice()){return}if(!u.isNestedGrid){var v=u.getScrollTop();var x=u.getScrollLeft();try{u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}setTimeout(function(){u.element.focus();u.content.focus();if(v!=u.getScrollTop()){window.scrollTo(x,v)}},10)}catch(w){}}}};if(d.columntype=="checkbox"||d.columntype=="button"){if(this.editcell){this.editcell.editor=null;this.editcell.editing=false;this.editcell=null}return true}var i=this._geteditorvalue(d);var g=function(w){w._hidecelleditor();if(d.cellendedit){d.cellendedit(h,n,d.columntype,w.editcell.value,i)}w.editchar=null;if(d.displayfield!=d.datafield){var v=w.getcellvalue(w.editcell.row,d.displayfield);var x=w.editcell.value;oldvalue={value:x,label:v}}else{oldvalue=w.editcell.value}var y=w.getrowdata(h);w._raiseEvent(18,{rowindex:h,row:y,datafield:n,displayfield:d.displayfield,oldvalue:i,value:i,columntype:d.columntype});w.editcell.editor=null;w.editcell.editing=false;w.editcell=null;if(e||e==undefined){w._renderrows(w.virtualsizeinfo)}t();if(!w.enablebrowserselection){w.host.addClass("jqx-disableselect");w.content.addClass("jqx-disableselect")}};if(j){g(this);return false}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(d.cellvaluechanging){var b=d.cellvaluechanging(h,n,d.columntype,this.editcell.value,i);if(b!=undefined){i=b}}if(d.validation){var c=this.getcell(h,n);try{var p=d.validation(c,i);var l=this.gridlocalization.validationstring;if(p.message!=undefined){l=p.message}var m=typeof p=="boolean"?p:p.result;if(!m){if(p.showmessage==undefined||p.showmessage==true){this._showvalidationpopup(h,n,l)}this.editcell.validated=false;return false}}catch(r){this._showvalidationpopup(h,n,this.gridlocalization.validationstring);this.editcell.validated=false;return false}}if(d.displayfield!=d.datafield){var k=this.getcellvalue(this.editcell.row,d.displayfield);var q=this.editcell.value;oldvalue={value:q,label:k}}else{oldvalue=this.editcell.value}var f=this.getrowdata(h);if(d.cellendedit){var s=d.cellendedit(h,n,d.columntype,this.editcell.value,i);if(s==false){this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:oldvalue,columntype:d.columntype});g(this);return false}}this._raiseEvent(18,{rowindex:h,row:f,datafield:n,displayfield:d.displayfield,oldvalue:oldvalue,value:i,columntype:d.columntype});this._hidecelleditor(false);if(this.editcell!=undefined){this.editcell.editor=null;this.editcell.editing=false}this.editcell=null;this.editchar=null;this.setcellvalue(h,n,i,e);if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}if(!a.jqx.browser.msie){t()}a.data(document.body,"jqxgrid.edit","");return true},beginrowedit:function(e){var d=this;var f=-1;d._oldselectedrow=e;this._cellscache=new Array();var c=false;if(this.editmode!="selectedrow"){c=true}if(c){var b=this.editmode;this.editmode="selectedrow"}a.each(this.columns.records,function(h,j){if(d.editable&&this.editable){var g=d.getcell(e,this.datafield);d.begincelledit(e,this.datafield,null,false,false);var i=d.getrowdata(e);d._raiseEvent(17,{rowindex:e,row:i,datafield:this.datafield,value:g.value,columntype:this.columntype})}});if(d.editcell){d.editcell.init=true}this._renderrows(this.virtualsizeinfo);if(c){this.editmode=b}},endrowedit:function(k,o){var D=this;if(!this.editcell){return false}if(this.editcell.editor==undefined){return false}var C=function(){if(focus!=false){if(D.isTouchDevice()){return}if(!D.isNestedGrid){var i=D.getScrollTop();var F=D.getScrollLeft();try{D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}setTimeout(function(){D.element.focus();D.content.focus();if(i!=D.getScrollTop()){window.scrollTo(F,i)}},10)}catch(E){}}}};var p=false;if(this.editmode!="selectedrow"){p=true}if(p){var v=this.editmode;this.editmode="selectedrow"}var h=false;var d={};if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}for(var B=0;B<this.columns.records.length;B++){var e=this.columns.records[B];if(!e.editable){continue}if(e.hidden){continue}if(e.columntype=="checkbox"){continue}var l=this._geteditorvalue(e);var g=function(F){F._hidecelleditor();var E=F.getcellvalue(F.editcell.row,e.displayfield);if(e.cellendedit){e.cellendedit(k,u,e.columntype,E,l)}F.editchar=null;if(e.displayfield!=e.datafield){var i=F.getcellvalue(F.editcell.row,e.displayfield);var H=E;n={value:H,label:i}}else{n=E}var G=F.getrowdata(k);F._raiseEvent(18,{rowindex:k,row:G,datafield:u,displayfield:e.displayfield,oldvalue:E,value:E,columntype:e.columntype});F.editcell.editing=false};if(o){g(this);continue}if(e.cellvaluechanging){var n=this.getcellvalue(this.editcell.row,e.displayfield);var b=e.cellvaluechanging(k,u,e.columntype,n,l);if(b!=undefined){l=b}}var u=e.datafield;if(e.validation){var c=this.getcell(k,e.datafield);try{var w=e.validation(c,l);var r=this.gridlocalization.validationstring;if(w.message!=undefined){r=w.message}var t=typeof w=="boolean"?w:w.result;if(!t){if(w.showmessage==undefined||w.showmessage==true){this._showvalidationpopup(k,u,r)}h=true;this.editcell[e.datafield].validated=false;continue}}catch(z){this._showvalidationpopup(k,u,this.gridlocalization.validationstring);this.editcell[e.datafield].validated=false;h=true;continue}}if(e.displayfield!=e.datafield){var q=this.getcellvalue(this.editcell.row,e.displayfield);var x=this.editcell.value;n={value:x,label:q}}else{n=this.getcellvalue(this.editcell.row,e.displayfield)}d[e.datafield]={newvalue:l,oldvalue:n}}var y={};var s={};if(!h){this._hidecelleditor(false);for(var B=0;B<this.columns.records.length;B++){var e=this.columns.records[B];var u=e.datafield;if(e.hidden){continue}if(!e.editable){continue}var f=this.getrowdata(k);if(e.columntype=="checkbox"){var l=this.getcellvalue(k,e.displayfield);this._raiseEvent(18,{rowindex:k,row:f,datafield:e.datafield,displayfield:e.displayfield,oldvalue:l,value:l,columntype:e.columntype});continue}if(!d[e.datafield]){continue}var l=d[e.datafield].newvalue;var n=d[e.datafield].oldvalue;if(e.cellendedit){var A=e.cellendedit(k,u,e.columntype,n,l);if(A==false){this._raiseEvent(18,{rowindex:k,row:f,datafield:u,displayfield:e.displayfield,oldvalue:n,value:n,columntype:e.columntype});g(this);continue}}if(!this.source.updaterow){this._raiseEvent(18,{rowindex:k,row:f,datafield:e.datafield,displayfield:e.displayfield,oldvalue:n,value:l,columntype:e.columntype})}y[e.datafield]=l;s[e.datafield]=n}var j=this.getrowid(k);var f=this.getrowdata(k);a.each(y,function(i,F){if(F&&F.label!=undefined){var E=D.getcolumn(i);f[E.displayfield]=F.label;f[E.datafield]=F.value}else{f[i]=F}});if(!this.enablebrowserselection){this.host.addClass("jqx-disableselect");this.content.addClass("jqx-disableselect")}a.data(document.body,"jqxgrid.edit","");this.editcell=null;this.editchar=null;if(this.source.updaterow){var m=false;var D=this;var t=function(I){var G=D.source.updaterow;D.source.updaterow=null;if(false==I){a.each(s,function(i,K){if(K&&K.label!=undefined){var J=D.getcolumn(i);f[J.displayfield]=K.label;f[J.datafield]=K.value}else{f[i]=K}});D.updaterow(j,f)}else{D.updaterow(j,f)}for(var F=0;F<D.columns.records.length;F++){var H=D.columns.records[F];var E=H.datafield;D._raiseEvent(18,{rowindex:k,datafield:H.datafield,row:f,displayfield:H.displayfield,oldvalue:s[H.datafield],value:f[H.displayfield],columntype:H.columntype})}D.source.updaterow=G};try{m=this.source.updaterow(j,f,t);if(m==undefined){m=true}}catch(z){m=false;return}}else{this.updaterow(j,f);this._renderrows(this.virtualsizeinfo)}}if(p){this.editmode=v}return h},_selection:function(b){if("selectionStart" in b[0]){var g=b[0];var h=g.selectionEnd-g.selectionStart;return{start:g.selectionStart,end:g.selectionEnd,length:h,text:g.value}}else{var d=document.selection.createRange();if(d==null){return{start:0,end:g.value.length,length:0}}var c=b[0].createTextRange();var f=c.duplicate();c.moveToBookmark(d.getBookmark());f.setEndPoint("EndToStart",c);var h=d.text.length;return{start:f.text.length,end:f.text.length+d.text.length,length:h,text:d.text}}},_setSelection:function(e,b,d){if("selectionStart" in d[0]){d[0].focus();d[0].setSelectionRange(e,b)}else{var c=d[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",e);c.select()}},findRecordIndex:function(g,c,b){var b=b;if(c){var e=b.length;for(var h=0;h<e;h++){var f=b[h];var d=f.label;if(g==d){return h}}}return -1},_destroyeditors:function(){var b=this;if(!this.columns.records){return}a.each(this.columns.records,function(f,j){var c=a.trim(this.datafield).split(" ").join("");switch(this.columntype){case"dropdownlist":var g=b.editors["dropdownlist_"+c];if(g){g.jqxDropDownList("destroy");b.editors["dropdownlist_"+c]=null}break;case"combobox":var k=b.editors["combobox_"+c];if(k){k.jqxComboBox("destroy");b.editors["combobox_"+c]=null}break;case"datetimeinput":var d=b.editors["datetimeinput_"+this.datafield];if(d){d.jqxDateTimeInput("destroy");b.editors["datetimeinput_"+c]=null}break;case"numberinput":var e=b.editors["numberinput_"+c];if(e){e.jqxNumberInput("destroy");b.editors["numberinput_"+c]=null}break;case"custom":case"template":if(b.destroyeditor){if(b.editors["templateeditor_"+c]){b.destroyeditor(b.editors["templateeditor_"+c]);b.editors["templateeditor_"+c]=null}}if(b.destroyeditor){var m=b.getrows.length();for(var l=0;l<m;l++){if(b.editors["customeditor_"+c+"_"+l]){b.destroyeditor(b.editors["customeditor_"+c+"_"+l],l);b.editors["customeditor_"+c+"_"+l]=null}}}break;case"textbox":default:var h=b.editors["textboxeditor_"+c];if(h){b.removeHandler(h,"keydown");b.editors["textbox_"+c]=null}break}});b.editors=new Array()},_showcelleditor:function(q,G,n,K,w){if(n==undefined){return}if(this.editcell==null){return}if(G.columntype=="checkbox"&&G.editable){return}if(w==undefined){w=true}if(this.editmode=="selectedrow"){this.editchar="";w=false}var E=G.datafield;var g=a(n);var s=this;var d=this.editcell.editor;var I=this.getcellvalue(q,E);var C=this.getcelltext(q,E);var j=this.hScrollInstance;var t=j.value;var i=parseInt(t);var J=this.columns.records.indexOf(G);this.editcell.element=n;if(this.editcell.validated==false){var H="";if(this.validationpopup){H=this.validationpopup.text()}this._showvalidationpopup(q,E,H)}var l=function(P){if(s.hScrollInstance.isScrolling()||s.vScrollInstance.isScrolling()){return}if(!w){return}if(s.isTouchDevice()){return}if(P){P.focus()}if(s.gridcontent[0].scrollTop!=0){s.scrolltop(Math.abs(s.gridcontent[0].scrollTop));s.gridcontent[0].scrollTop=0}if(s.gridcontent[0].scrollLeft!=0){s.gridcontent[0].scrollLeft=0}};switch(G.columntype){case"dropdownlist":if(this.host.jqxDropDownList){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");var A=a.trim(G.displayfield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}if(A.indexOf(".")!=-1){A=A.replace(".","")}var k=this.editors["dropdownlist_"+D];d=k==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='dropdownlisteditor'></div>"):k;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(k==undefined){d.prependTo(this.table);d[0].id="dropdownlisteditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxDropDownList({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});this.editors["dropdownlist_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDropDownList({width:g.width()-2})}var c=d.jqxDropDownList("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxDropDownList("autoDropDownHeight",true)}else{d.jqxDropDownList("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxDropDownList("selectIndex",z,true)}else{d.jqxDropDownList("selectIndex",-1)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxDropDownList("selectIndex",this.editcell.defaultvalue,true)}if(w){d.jqxDropDownList("focus")}}break;case"combobox":if(this.host.jqxComboBox){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");var A=a.trim(G.displayfield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}if(A.indexOf(".")!=-1){A=A.replace(".","")}var r=this.editors["combobox_"+D];d=r==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='comboboxeditor'></div>"):r;d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(r==undefined){d.prependTo(this.table);d[0].id="comboboxeditor"+this.element.id+D;var f=this.source._source?true:false;var x=null;if(!f){x=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[A],async:false,autoSort:true,autoSortField:A})}else{var p={localdata:this.source.records,datatype:this.source.datatype,async:false};x=new a.jqx.dataAdapter(p,{autoBind:false,async:false,uniqueDataFields:[A],autoSort:true,autoSortField:A})}var u=!G.createeditor?true:false;d.jqxComboBox({enableBrowserBoundsDetection:true,keyboardSelection:false,source:x,rtl:this.rtl,autoDropDownHeight:u,theme:this.theme,width:g.width()-2,height:g.height()-2,displayMember:A,valueMember:E});d.removeAttr("tabindex");d.find("div").removeAttr("tabindex");this.editors["combobox_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxComboBox({width:g.width()-2})}var c=d.jqxComboBox("listBox").visibleItems;if(!G.createeditor){if(c.length<8){d.jqxComboBox("autoDropDownHeight",true)}else{d.jqxComboBox("autoDropDownHeight",false)}}var I=this.getcellvalue(q,A);var z=this.findRecordIndex(I,A,c);if(K){if(I!=""){d.jqxComboBox("selectIndex",z,true);d.jqxComboBox("val",I)}else{d.jqxComboBox("selectIndex",-1);d.jqxComboBox("val",I)}}if(!this.editcell){return}if(this.editcell.defaultvalue!=undefined){d.jqxComboBox("selectIndex",this.editcell.defaultvalue,true)}if(this.editchar&&this.editchar.length>0){d.jqxComboBox("input").val(this.editchar)}if(w){setTimeout(function(){l(d.jqxComboBox("input"));if(d){d.jqxComboBox("_setSelection",0,0);if(s.editchar){d.jqxComboBox("_setSelection",1,1);s.editchar=null}else{if(d.jqxComboBox("input")){var P=d.jqxComboBox("input").val();d.jqxComboBox("_setSelection",0,P.length)}}}},10)}}break;case"datetimeinput":if(this.host.jqxDateTimeInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var v=this.editors["datetimeinput_"+D];d=v==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='datetimeeditor'></div>"):v;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(v==undefined){d.prependTo(this.table);d[0].id="datetimeeditor"+this.element.id+D;var F={calendar:this.gridlocalization};d.jqxDateTimeInput({enableBrowserBoundsDetection:true,localization:F,_editor:true,theme:this.theme,rtl:this.rtl,width:g.width(),height:g.height(),formatString:G.cellsformat});this.editors["datetimeinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxDateTimeInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var L=new Date(I);if(L=="Invalid Date"){if(this.source.getvaluebytype){L=this.source.getvaluebytype(I,{name:G.datafield,type:"date"})}}d.jqxDateTimeInput("setDate",L)}else{d.jqxDateTimeInput("setDate",null)}if(this.editcell.defaultvalue!=undefined){d.jqxDateTimeInput("setDate",this.editcell.defaultvalue)}}if(w){setTimeout(function(){l(d.jqxDateTimeInput("dateTimeInput"))},10)}}break;case"numberinput":if(this.host.jqxNumberInput){n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var N=this.editors["numberinput_"+D];d=N==undefined?a("<div style='border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='numbereditor'></div>"):N;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(N==undefined){d.prependTo(this.table);d[0].id="numbereditor"+this.element.id+D;var m="";var y="left";var M=2;if(G.cellsformat){if(G.cellsformat.indexOf("c")!=-1){m=this.gridlocalization.currencysymbol;y=this.gridlocalization.currencysymbolposition;if(y=="before"){y="left"}else{y="right"}if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}else{if(G.cellsformat.indexOf("p")!=-1){m=this.gridlocalization.percentsymbol;y="right";if(G.cellsformat.length>1){M=parseInt(G.cellsformat.substring(1),10)}}}}else{M=0}d.jqxNumberInput({decimalSeparator:this.gridlocalization.decimalseparator,decimalDigits:M,inputMode:"simple",theme:this.theme,rtl:this.rtl,width:g.width()-1,height:g.height()-1,spinButtons:true,symbol:m,symbolPosition:y});this.editors["numberinput_"+D]=d;if(G.createeditor){G.createeditor(q,I,d)}}if(G._requirewidthupdate){d.jqxNumberInput({width:g.width()-2})}if(K){if(I!=""&&I!=null){var O=I;d.jqxNumberInput("setDecimal",O)}else{d.jqxNumberInput("setDecimal",0)}if(this.editcell.defaultvalue!=undefined){d.jqxNumberInput("setDecimal",this.editcell.defaultvalue)}if(this.editchar&&this.editchar.length>0){var o=parseInt(this.editchar);if(!isNaN(o)){d.jqxNumberInput("setDecimal",o)}}if(w){setTimeout(function(){l(d.jqxNumberInput("numberInput"));d.jqxNumberInput("_setSelectionStart",0);if(s.editchar){if(G.cellsformat.length>0){d.jqxNumberInput("_setSelectionStart",2)}else{d.jqxNumberInput("_setSelectionStart",1)}s.editchar=null}else{var P=d.jqxNumberInput("spinButtons");if(P){var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],Q.length,Q.length)}else{var Q=d.jqxNumberInput("numberInput").val();s._setSelection(d.jqxNumberInput("numberInput")[0],0,Q.length)}}d.jqxNumberInput("selectAll")},10)}}}break;case"custom":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var B=this.editors["customeditor_"+D+"_"+q];d=B==undefined?a("<div style='overflow: hidden; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='customeditor'></div>"):B;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(B==undefined){d.prependTo(this.table);d[0].id="customeditor"+this.element.id+D+"_"+q;this.editors["customeditor_"+D+"_"+q]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"template":n.innerHTML="";var D=a.trim(G.datafield).split(" ").join("");if(D.indexOf(".")!=-1){D=D.replace(".","")}var h=this.editors["templateeditor_"+D];d=h==undefined?a("<div style='overflow: hidden; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id='templateeditor'></div>"):h;d.show();d.css("top",a(n).parent().position().top);if(this.oldhscroll){d.css("left",-i+parseInt(a(n).position().left))}else{d.css("left",parseInt(a(n).position().left))}if(G.pinned){d.css("left",i+parseInt(a(n).position().left))}if(h==undefined){d.prependTo(this.table);d[0].id="templateeditor"+this.element.id+D;this.editors["templateeditor_"+D]=d;var b=g.width()-1;var e=g.height()-1;d.width(b);d.height(e);if(G.createeditor){G.createeditor(q,I,d,C,b,e,this.editchar)}}if(G._requirewidthupdate){d.width(g.width()-2)}break;case"textbox":default:n.innerHTML="";d=this.editors["textboxeditor_"+G.datafield]||a("<input autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' type='textbox' id='textboxeditor'/>");d[0].id="textboxeditor"+this.element.id+G.datafield;d.appendTo(g);if(this.rtl){d.css("direction","rtl")}if(K||d[0].className==""){d.addClass(this.toThemeProperty("jqx-input"));d.addClass(this.toThemeProperty("jqx-widget-content"));if(this.editchar&&this.editchar.length>0){d.val(this.editchar)}else{if(G.cellsformat!=""){I=this.getcelltext(q,E)}if(I==undefined){I=""}d.val(I)}if(this.editcell.defaultvalue!=undefined){d.val(this.editcell.defaultvalue)}d.width(g.width()+1);d.height(g.height()+1);if(G.createeditor){G.createeditor(q,I,d)}if(G.cellsformat!=""){if(G.cellsformat.indexOf("p")!=-1||G.cellsformat.indexOf("c")!=-1||G.cellsformat.indexOf("n")!=-1||G.cellsformat.indexOf("f")!=-1){if(!this.editors["textboxeditor_"+G.datafield]){d.keydown(function(Q){var W=Q.charCode?Q.charCode:Q.keyCode?Q.keyCode:0;var T=String.fromCharCode(W);var U=parseInt(T);if(isNaN(U)){return true}if(s._selection(d).length>0){return true}var S="";var R=d.val();if(G.cellsformat.length>1){var V=parseInt(G.cellsformat.substring(1));if(isNaN(V)){V=0}}else{var V=0}if(V>0){if(R.indexOf(s.gridlocalization.decimalseparator)!=-1){if(s._selection(d).start>R.indexOf(s.gridlocalization.decimalseparator)){return true}}}for(var X=0;X<R.length-V;X++){var P=R.substring(X,X+1);if(P.match(/^[0-9]+$/)!=null){S+=P}}if(S.length>=11){return false}})}}}}this.editors["textboxeditor_"+G.datafield]=d;if(K){if(w){setTimeout(function(){l(d);if(s.editchar){s._setSelection(d[0],1,1);s.editchar=null}else{s._setSelection(d[0],0,d.val().length)}},25)}}break}if(d){d[0].style.zIndex=1+n.style.zIndex;if(a.jqx.browser.msie&&a.jqx.browser.version<8){d[0].style.zIndex=1+this.columns.records.length+n.style.zIndex}d.css("display","block");this.editcell.editor=d;if(!this.editcell[E]){this.editcell[E]={};this.editcell[E].editor=d}else{this.editcell[E].editor=d}}if(K){if(G.initeditor){G.initeditor(q,I,d,C,this.editchar)}}if(s.isTouchDevice()){return}setTimeout(function(){if(s.content){s.content[0].scrollTop=0;s.content[0].scrollLeft=0}if(s.gridcontent){s.gridcontent[0].scrollLeft=0;s.gridcontent[0].scrollTop=0}},10)},_setSelection:function(d,g,b){try{if("selectionStart" in d){d.setSelectionRange(g,b)}else{var c=d.createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",g);c.select()}}catch(e){var f=e}},_hideeditors:function(){if(this.editcells!=null){var b=this;for(var c in this.editcells){b.editcell=b.editcells[c];b._hidecelleditor()}}},_hidecelleditor:function(b){if(!this.editcell){return}if(this.editmode==="selectedrow"){for(var c=0;c<this.columns.records.length;c++){var e=this.columns.records[c];if(this.editcell[e.datafield]&&this.editcell[e.datafield].editor){this.editcell[e.datafield].editor.hide();var d=this.editcell[e.datafield].editor;switch(e.columntype){case"dropdownlist":d.jqxDropDownList({closeDelay:0});d.jqxDropDownList("hideListBox");d.jqxDropDownList({closeDelay:300});break;case"combobox":d.jqxComboBox({closeDelay:0});d.jqxComboBox("hideListBox");d.jqxComboBox({closeDelay:300});break;case"datetimeinput":if(d.jqxDateTimeInput("isOpened")){d.jqxDateTimeInput({closeDelay:0});d.jqxDateTimeInput("hideCalendar");d.jqxDateTimeInput({closeDelay:300})}break}}}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}return}if(this.editcell.columntype=="checkbox"){return}if(this.editcell.editor){this.editcell.editor.hide();switch(this.editcell.columntype){case"dropdownlist":this.editcell.editor.jqxDropDownList({closeDelay:0});this.editcell.editor.jqxDropDownList("hideListBox");this.editcell.editor.jqxDropDownList({closeDelay:300});break;case"combobox":this.editcell.editor.jqxComboBox({closeDelay:0});this.editcell.editor.jqxComboBox("hideListBox");this.editcell.editor.jqxComboBox({closeDelay:300});break;case"datetimeinput":var f=this.editcell.editor;if(f.jqxDateTimeInput("isOpened")){f.jqxDateTimeInput({closeDelay:0});f.jqxDateTimeInput("hideCalendar");f.jqxDateTimeInput({closeDelay:300})}break}}if(this.validationpopup){this.validationpopup.hide();this.validationpopuparrow.hide()}if(!this.isNestedGrid){if(b!=false){this.element.focus()}}},_geteditorvalue:function(h){var o=new String();if(!this.editcell){return null}var l=this.editcell.editor;if(this.editmode=="selectedrow"){if(this.editcell[h.datafield]){var l=this.editcell[h.datafield].editor}}if(l){switch(h.columntype){case"textbox":default:o=l.val();if(h.cellsformat!=""){var n="string";var e=this.source.datafields||((this.source._source)?this.source._source.datafields:null);if(e){var p="";a.each(e,function(){if(this.name==h.displayfield){if(this.type){p=this.type}return false}});if(p){n=p}}var i=n==="number"||n==="float"||n==="int"||n==="integer";var f=n==="date"||n==="time";if(i||(n==="string"&&(h.cellsformat.indexOf("p")!=-1||h.cellsformat.indexOf("c")!=-1||h.cellsformat.indexOf("n")!=-1||h.cellsformat.indexOf("f")!=-1))){if(o===""&&h.nullable){return""}if(o.indexOf(this.gridlocalization.currencysymbol)>-1){o=o.replace(this.gridlocalization.currencysymbol,"")}var m=function(w,u,v){var s=w;if(u==v){return w}var t=s.indexOf(u);while(t!=-1){s=s.replace(u,v);t=s.indexOf(u)}return s};var k=o;k=new Number(k);if(!isNaN(k)){return k}o=m(o,this.gridlocalization.thousandsseparator,"");o=o.replace(this.gridlocalization.decimalseparator,".");if(o.indexOf(this.gridlocalization.percentsymbol)>-1){o=o.replace(this.gridlocalization.percentsymbol,"")}var d="";for(var r=0;r<o.length;r++){var b=o.substring(r,r+1);if(b==="-"){d+="-"}if(b==="."){d+="."}if(b.match(/^[0-9]+$/)!=null){d+=b}}o=d;o=o.replace(/ /g,"");o=new Number(o);if(isNaN(o)){o=""}}if(f||(n==="string"&&(h.cellsformat.indexOf("H")!=-1||h.cellsformat.indexOf("m")!=-1||h.cellsformat.indexOf("M")!=-1||h.cellsformat.indexOf("y")!=-1||h.cellsformat.indexOf("h")!=-1||h.cellsformat.indexOf("d")!=-1))){if(o===""&&h.nullable){return""}var c=o;o=new Date(o);if(o=="Invalid Date"||o==null){if(a.jqx.dataFormat){o=a.jqx.dataFormat.tryparsedate(c,this.gridlocalization)}if(o=="Invalid Date"||o==null){o=""}}}}if(h.displayfield!=h.datafield){o={label:o,value:o}}break;case"checkbox":if(l.jqxCheckBox){o=l.jqxCheckBox("checked")}break;case"datetimeinput":if(l.jqxDateTimeInput){l.jqxDateTimeInput({isEditing:false});l.jqxDateTimeInput("_validateValue");o=l.jqxDateTimeInput("getDate");if(o==null){return null}o=new Date(o.toString());if(h.displayfield!=h.datafield){o={label:o,value:o}}}break;case"dropdownlist":if(l.jqxDropDownList){var g=l.jqxDropDownList("selectedIndex");var q=l.jqxDropDownList("listBox").getVisibleItem(g);if(h.displayfield!=h.datafield){if(q){o={label:q.label,value:q.value}}else{o=""}}else{if(q){o=q.label}else{o=""}}if(o==null){o=""}}break;case"combobox":if(l.jqxComboBox){o=l.jqxComboBox("val");if(h.displayfield!=h.datafield){var q=l.jqxComboBox("getSelectedItem");if(q!=null){o={label:q.label,value:q.value}}}if(o==null){o=""}}break;case"numberinput":if(l.jqxNumberInput){if(this.touchdevice){l.jqxNumberInput("_doTouchHandling")}var j=l.jqxNumberInput("getDecimal");o=new Number(j);o=parseFloat(o);if(isNaN(o)){o=0}if(h.displayfield!=h.datafield){o={label:o,value:o}}}break}if(h.geteditorvalue){if(this.editmode=="selectedrow"){o=h.geteditorvalue(this.editcell.row,this.getcellvalue(this.editcell.row,h.datafield),l)}else{o=h.geteditorvalue(this.editcell.row,this.editcell.value,l)}}}return o},hidevalidationpopups:function(){if(this.popups){a.each(this.popups,function(){this.validation.remove();this.validationrow.remove()});this.popups=new Array()}if(this.validationpopup){this.validationpopuparrow.hide();this.validationpopup.hide()}},showvalidationpopup:function(f,j,h){if(h==undefined){var h=this.gridlocalization.validationstring}var g=a("<div style='z-index: 99999; top: 0px; left: 0px; position: absolute;'></div>");var r=a("<div style='width: 20px; height: 20px; z-index: 999999; top: 0px; left: 0px; position: absolute;'></div>");g.html(h);r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));g.addClass(this.toThemeProperty("jqx-grid-validation"));g.addClass(this.toThemeProperty("jqx-rc-all"));g.prependTo(this.table);r.prependTo(this.table);var l=this.hScrollInstance;var n=l.value;var d=parseInt(n);var b=this.getcolumn(j).uielement;var p=null;for(var o=0;o<this.hittestinfo.length;o++){if(f===this.hittestinfo[o].row.visibleindex){p=this.hittestinfo[o]}}if(!p){this.ensurerowvisible(f);var s=this;g.remove();r.remove();setTimeout(function(){var v=null;for(var u=0;u<s.hittestinfo.length;u++){if(f===s.hittestinfo[u].row.visibleindex){v=s.hittestinfo[u]}}if(v){s.showvalidationpopup(f,j,h)}},25);return}var c=a(p.visualrow);g.css("top",parseInt(c.position().top)+30+"px");var k=parseInt(g.css("top"));r.css("top",k-12);r.removeClass();r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var q=false;if(k>=this._gettableheight()){r.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));r.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));k=parseInt(c.position().top)-this.rowsheight-5;if(k<0){k=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));q=true}g.css("top",k+"px");r.css("top",k+g.outerHeight()-9)}var t=-d+parseInt(a(b).position().left);r.css("left",d+t+30);var m=g.width();if(m+t>this.host.width()-20){var e=m+t-this.host.width()+40;t-=e}if(!q){g.css("left",d+t)}else{g.css("left",d+parseInt(a(b).position().left)-g.outerWidth())}g.show();r.show();if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:g,validationrow:r}},_showvalidationpopup:function(p,e,q){var c=this.editcell;var k=this.editcell.editor;if(this.editmode=="selectedrow"){var c=this.editcell[e];if(c&&c.editor){k=c.editor;c.element=k}}if(!k){return}if(this.validationpopup&&a.jqx.isHidden(this.validationpopup)){if(this.validationpopup.remove){this.validationpopup.remove();this.validationpopuparrow.remove()}this.validationpopup=null;this.validationpopuparrow=null;if(e===undefined&&q===undefined&&this.editors&&this.editors.length===0){return}}if(!this.validationpopup){var n=a("<div style='z-index: 99999; top: 0px; left: 0px; position: absolute;'></div>");var m=a("<div style='width: 20px; height: 20px; z-index: 999999; top: 0px; left: 0px; position: absolute;'></div>");n.html(q);m.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));n.addClass(this.toThemeProperty("jqx-grid-validation"));n.addClass(this.toThemeProperty("jqx-rc-all"));n.prependTo(this.table);m.prependTo(this.table);this.validationpopup=n;this.validationpopuparrow=m}else{this.validationpopup.html(q)}var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);if(this.editmode=="selectedrow"){this.validationpopup.css("top",parseInt(a(c.editor).position().top)+(this.rowsheight+5)+"px")}else{this.validationpopup.css("top",parseInt(a(c.element).parent().position().top)+(this.rowsheight+5)+"px")}var b=parseInt(this.validationpopup.css("top"));this.validationpopuparrow.css("top",b-11);this.validationpopuparrow.removeClass();this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var o=this._gettableheight();var f=false;if(b>=o){this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));b=parseInt(a(c.element).parent().position().top)-this.rowsheight-5;if(this.editmode=="selectedrow"){b=parseInt(a(c.editor).position().top)-this.rowsheight-5}if(b<0){b=0;this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}this.validationpopup.css("top",b+"px");this.validationpopuparrow.css("top",b+this.validationpopup.outerHeight()-9)}var l=-g+parseInt(a(c.element).position().left);this.validationpopuparrow.css("left",g+l+30);var d=this.validationpopup.width();if(d+l>this.host.width()-20){var i=d+l-this.host.width()+40;l-=i}if(!f){this.validationpopup.css("left",g+l)}else{this.validationpopup.css("left",g+parseInt(a(c.element).position().left)-this.validationpopup.outerWidth())}if(this.editcell.editor.css("display")=="none"){this.validationpopup.hide();this.validationpopuparrow.hide()}else{this.validationpopup.show();this.validationpopuparrow.show()}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_updatefilterrowui:function(f){var m=this.columns.records.length;var e=0;var l=this;if(!this.filterrow){return}for(var i=0;i<m;i++){var g=this.columns.records[i];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[i]);k.css("left",e);var h=true;if(k.width()==c){h=false}if(f){h=true}k.width(c);k[0].left=e;if(!(g.hidden&&g.hideable)){e+=c}else{k.css("display","none")}if(!h){continue}if(g.createfilterwidget&&g.filtertype=="custom"){g.createfilterwidget(g,k)}else{if(g.filterable){var d=function(n,o){var j=a(o.children()[0]);j.width(c-10);j.attr("disabled",n.disabled)};switch(g.filtertype){case"number":case"input":a(k.children()[0]).width(c);k.find("input").width(c-30);k.find("input").attr("disabled",l.disabled);a(k.find(".jqx-dropdownlist-state-normal")).jqxDropDownList({theme:l.theme,disabled:l.disabled});break;case"date":case"range":if(this.host.jqxDateTimeInput){a(k.children()[0]).jqxDateTimeInput({theme:l.theme,disabled:l.disabled,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({theme:l.theme,disabled:l.disabled,width:c-10})}else{d(this,k)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){d(this,k)}else{a(k.children()[0]).jqxCheckBox({theme:l.theme,disabled:l.disabled})}break}}}}var b=a(this.filterrow.children()[0]);b.width(parseInt(e)+2);b.height(this.filterrowheight)},clearfilterrow:function(d){this._disablefilterrow=true;if(!this.columns.records){return}var l=this.columns.records.length;var e=0;for(var h=0;h<l;h++){var f=this.columns.records[h];var k=a(this.filterrow[0].cells[h]);if(typeof d=="string"){if(f.displayfield!=d){continue}}if(f.filterable){var c=function(n,o){var j=a(o.children()[0]);j.val("");if(j[0]){n["_oldWriteText"+j[0].id]=""}};switch(f.filtertype){case"number":case"input":k.find("input").val("");if(this.host.jqxDropDownList){var i=a(a(a(k).children()[0]).children()[1]);i.jqxDropDownList("clearSelection");var g=0;if(g==0){var b=this._getfiltersbytype(f.filtertype=="number"?"number":"string");var m=b.indexOf("contains");if(m!=-1&&f.filtercondition==null){g=m}}i.jqxDropDownList({selectedIndex:g});i.jqxDropDownList("ensureVisible",g)}break;case"date":case"range":if(this.host.jqxDateTimeInput){a(k.children()[0]).jqxDateTimeInput("setDate",null)}else{c(this,k)}break;case"textbox":case"default":c(this,k);break;case"list":if(this.host.jqxDropDownList){a(k.children()[0]).jqxDropDownList("clearSelection")}else{c(this,k)}break;case"checkedlist":if(this.host.jqxDropDownList){a(k.children()[0]).jqxDropDownList("checkAll",false)}else{c(this,k)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){c(this,k)}else{a(k.children()[0]).jqxCheckBox({checked:null})}break}}}this._disablefilterrow=false},_applyfilterfromfilterrow:function(){if(this._disablefilterrow==true){return}if(this.disabled){return}var z=this.columns.records.length;var D=this.that;for(var t=0;t<z;t++){var k=new a.jqx.filter();var u=this.columns.records[t];if(!u.filterable){continue}if(u.datafield===null){continue}var f=D._getcolumntypebydatafield(u);var d=D._getfiltertype(f);var l=1;var E=true;var e=u.filtertype;var B=function(j,L,I){var i=true;if(j._filterwidget){var G=j._filterwidget.val();if(G!=""){var J="equal";if(L=="stringfilter"){var J="contains"}if(L=="numericfilter"){if(D.gridlocalization.decimalseparator==","){if(G.indexOf(D.gridlocalization.decimalseparator)>=0){G=G.replace(D.gridlocalization.decimalseparator,".")}}}if(L!="stringfilter"){var K=0;if(G.indexOf(">")!=-1){J="greater_than";K=1}if(G.indexOf("<")!=-1){J="less_than";K=1}if(G.indexOf("=")!=-1){if(J=="greater_than"){J="greater_than_or_equal";K=2}else{if(J=="less_than"){J="less_than_or_equal";K=2}else{J="equal";K=1}}}if(K!=0){G=G.substring(K);if(G.length<1){return false}}}if(j.filtercondition!=undefined){J=j.filtercondition}if(L=="datefilter"){var H=I.createfilter(L,G,J,null,j.cellsformat,D.gridlocalization)}else{var H=I.createfilter(L,G,J)}I.addfilter(l,H)}else{i=false}}return i};switch(u.filtertype){case"range":case"date":if(u._filterwidget.jqxDateTimeInput){if(u.filtertype=="range"){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.setMinutes(0);r.setFullYear(p.from.getFullYear(),p.from.getMonth(),p.from.getDate());var q=new Date(0);q.setHours(0);q.setMinutes(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{E=false}}else{var p=u._filterwidget.jqxDateTimeInput("getDate");if(p!=null){var r=new Date(0);r.setHours(0);r.setMinutes(0);r.setFullYear(p.getFullYear(),p.getMonth(),p.getDate());var y=k.createfilter(d,r,"EQUAL");k.addfilter(0,y)}else{E=false}}}else{E=B(u,d,k)}break;case"input":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(D.updatefilterconditions){var F=D.updatefilterconditions(d,k.getoperatorsbyfiltertype(d));if(F!=undefined){k.setoperatorsbyfiltertype(d,F)}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,u.cellsformat,D.gridlocalization);k.addfilter(0,y)}else{E=false}}else{E=false}break;case"number":if(u._filterwidget){var p=u._filterwidget.find("input").val();if(D.gridlocalization.decimalseparator==","){if(p.indexOf(D.gridlocalization.decimalseparator)>=0){p=p.replace(D.gridlocalization.decimalseparator,".")}}var h=u._filterwidget.find(".filter").jqxDropDownList("selectedIndex");var w=k.getoperatorsbyfiltertype(d)[h];if(D.updatefilterconditions){var F=D.updatefilterconditions(d,k.getoperatorsbyfiltertype(d));if(F!=undefined){k.setoperatorsbyfiltertype(d,F)}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,new Number(p),w,null,u.cellsformat,D.gridlocalization);k.addfilter(0,y)}else{E=false}}else{E=false}break;case"textbox":case"default":E=B(u,d,k);break;case"bool":case"boolean":if(u._filterwidget.jqxCheckBox){var p=u._filterwidget.jqxCheckBox("checked");if(p!=null){var o="equal";var m=k.createfilter(d,p,o);k.addfilter(l,m)}else{E=false}}else{E=B(u,d,k)}break;case"list":var g=u._filterwidget.jqxDropDownList("listBox");if(g.selectedIndex>0){var b=g.getItem(g.selectedIndex);var p=b.label;var A=b.value;var o="equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);k.addfilter(l,m);if(A!==p){m.data=A}}else{E=false}break;case"checkedlist":if(u._filterwidget.jqxDropDownList){var g=u._filterwidget.jqxDropDownList("listBox");var C=g.getCheckedItems();if(C.length==0){for(var v=1;v<g.items.length;v++){var p=g.items[v].label;var A=g.items[v].value;var o="not_equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);if(A!==p){m.data=A}k.addfilter(0,m)}E=true}else{if(C.length!=g.items.length){for(var v=0;v<C.length;v++){var p=C[v].label;var A=C[v].value;var o="equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);if(A!==p){m.data=A}k.addfilter(l,m)}}else{E=false}}}else{E=B(u,d,k)}break}if(!this._loading){if(E){this.addfilter(u.displayfield,k,false)}else{this.removefilter(u.displayfield,false)}}}if(!this._loading){this.applyfilters("filterrow")}},_updatefilterrow:function(){var b=a('<div style="position: relative;" id="row00'+this.element.id+'"></div>');var f=0;var o=this.columns.records.length;var m=this.toThemeProperty("jqx-grid-cell");m+=" "+this.toThemeProperty("jqx-grid-cell-pinned");m+=" "+this.toThemeProperty("jqx-grid-cell-filter-row");var r=o+10;var s=new Array();var n=this.that;this.filterrow[0].cells=s;b.height(this.filterrowheight);this.filterrow.children().detach();this.filterrow.append(b);if(!this._filterrowcache){this._filterrowcache=new Array()}this._initcolumntypes();var g=false;var d=new Array();var q=document.createDocumentFragment();for(var h=0;h<o;h++){var e=this.columns.records[h];var c=e.width;if(c<e.minwidth){c=e.minwidth}if(c>e.maxwidth){c=e.maxwidth}var l=document.createElement("div");l.style.overflow="hidden";l.style.position="absolute";l.style.height="100%";l.className=m;l=a(l);q.appendChild(l[0]);l[0].style.left=f+"px";if(this.rtl){l.css("z-index",r++);l.css("border-left-width","1px")}else{l.css("z-index",r--)}if(c=="auto"){c=0}l[0].style.width=parseFloat(c)+"px";l[0].left=f;if(!(e.hidden&&e.hideable)){f+=c}else{l.css("display","none")}s[s.length]=l[0];var k=true;if(!this.rtl){if(this.groupable){var p=(this.showrowdetailscolumn&&this.rowdetails)?1:0;if(this.groups.length+p>h){k=false}}if(this.showrowdetailscolumn&&this.rowdetails&&h==0){k=false}}else{if(this.groupable){var p=(this.showrowdetailscolumn&&this.rowdetails)?1:0;if(this.groups.length+p+h>o-1){k=false}}if(this.showrowdetailscolumn&&this.rowdetails&&h==o-1){k=false}}if(k){if(e.filtertype=="custom"&&e.createfilterwidget){var i=function(){n._applyfilterfromfilterrow()};e.createfilterwidget(e,l,i)}else{if(e.filterable){if(this._filterrowcache[e.datafield]){g=true;l.append(this._filterrowcache[e.datafield]);e._filterwidget=this._filterrowcache[e.datafield]}else{this._addfilterwidget(e,l,c);d[e.datafield]=e._filterwidget}}}}}b[0].appendChild(q);this._filterrowcache=d;if(a.jqx.browser.msie&&a.jqx.browser.version<8){b.css("z-index",r--)}b.width(parseFloat(f)+2);this.filterrow.addClass(m);this.filterrow.css("border-top-width","1px");this.filterrow.css("border-right-width","0px");if(g){this._updatefilterrowui(true)}},_addfilterwidget:function(C,d,A){var G=this.that;var z="";for(var E=0;E<G.dataview.filters.length;E++){var x=G.dataview.filters[E];if(x.datafield&&x.datafield==C.datafield){z=x.filter.getfilters()[0].value;break}}var g=function(H,I){var f=a('<input autocomplete="off" type="textarea"/>');f[0].id=a.jqx.utilities.createId();f.addClass(H.toThemeProperty("jqx-widget"));f.addClass(H.toThemeProperty("jqx-input"));f.addClass(H.toThemeProperty("jqx-rc-all"));f.addClass(H.toThemeProperty("jqx-widget-content"));if(H.rtl){f.css("direction","rtl")}if(H.disabled){f.attr("disabled",true)}f.attr("disabled",false);f.appendTo(I);f.width(A-10);f.height(H.filterrowheight-10);f.css("margin","4px");if(C.createfilterwidget){C.createfilterwidget(C,I,f)}C._filterwidget=f;f.focus(function(){H.content[0].scrollLeft=0;setTimeout(function(){H.content[0].scrollLeft=0},10);H.focusedfilter=f;f.addClass(H.toThemeProperty("jqx-fill-state-focus"));return false});f.blur(function(){f.removeClass(H.toThemeProperty("jqx-fill-state-focus"))});f.keydown(function(J){if(J.keyCode=="13"){H._applyfilterfromfilterrow()}if(f[0]._writeTimer){clearTimeout(f[0]._writeTimer)}f[0]._writeTimer=setTimeout(function(){if(!H._loading){if(H["_oldWriteText"+f[0].id]!=f.val()){H._applyfilterfromfilterrow();H["_oldWriteText"+f[0].id]=f.val()}}},C.filterdelay);H.focusedfilter=f});H.host.removeClass("jqx-disableselect");H.content.removeClass("jqx-disableselect");f.val(z)};if(C.datatype!=null){if(C.filtertype=="number"){if(C.datatype=="string"||C.datatype=="date"||C.datatype=="bool"){C.filtertype="textbox"}}if(C.filtertype=="date"){if(C.datatype=="string"||C.datatype=="number"||C.datatype=="bool"){C.filtertype="textbox"}}if(C.filtertype=="bool"){if(C.datatype=="string"||C.datatype=="number"||C.datatype=="date"){C.filtertype="textbox"}}}switch(C.filtertype){case"number":case"input":var m=a("<div></div>");m.width(d.width());m.height(this.filterrowheight);d.append(m);var A=d.width()-20;var s=function(I,J,f){var H=a('<input style="float: left;" autocomplete="off" type="textarea"/>');if(G.rtl){H.css("float","right");H.css("direction","rtl")}H[0].id=a.jqx.utilities.createId();H.addClass(G.toThemeProperty("jqx-widget jqx-input jqx-rc-all jqx-widget-content"));H.appendTo(I);H.width(J-10);if(G.disabled){H.attr("disabled",true)}H.attr("disabled",false);H.height(G.filterrowheight-10);H.css("margin","4px");H.css("margin-right","2px");H.focus(function(){G.focusedfilter=H;H.addClass(G.toThemeProperty("jqx-fill-state-focus"))});H.blur(function(){H.removeClass(G.toThemeProperty("jqx-fill-state-focus"))});H.keydown(function(K){if(K.keyCode=="13"){G._applyfilterfromfilterrow()}if(H[0]._writeTimer){clearTimeout(H[0]._writeTimer)}H[0]._writeTimer=setTimeout(function(){if(!G._loading){if(G["_oldWriteText"+H[0].id]!=H.val()){G._applyfilterfromfilterrow();G["_oldWriteText"+H[0].id]=H.val()}}},C.filterdelay);G.focusedfilter=H});H.val(z);return H};s(m,A);var B=G._getfiltersbytype(C.filtertype=="number"?"number":"string");var t=a("<div class='filter' style='float: left;'></div>");t.css("margin-top","4px");t.appendTo(m);if(G.rtl){t.css("float","right")}var h=0;if(C.filtercondition!=null){var E=new a.jqx.filter();var r=E.getoperatorsbyfiltertype(C.filtertype=="number"?"numericfilter":"stringfilter");var e=r.indexOf(C.filtercondition.toUpperCase());if(e!=-1){h=e}}var D=170;if(C.filtertype=="input"){D=240;if(h==0){var e=B.indexOf("contains");if(e!=-1&&C.filtercondition==null){h=e}}}t.jqxDropDownList({disabled:G.disabled,touchMode:G.touchmode,rtl:G.rtl,dropDownHorizontalAlignment:"right",enableBrowserBoundsDetection:true,selectedIndex:h,width:18,height:21,dropDownHeight:150,dropDownWidth:D,source:B,theme:G.theme});t.jqxDropDownList({selectionRenderer:function(f){return""}});t.jqxDropDownList("setContent","");t.find(".jqx-dropdownlist-content").hide();if(C.createfilterwidget){C.createfilterwidget(C,d,m)}C._filterwidget=m;var j=null;this.addHandler(t,"select",function(){var f=t.jqxDropDownList("getSelectedItem").label;if(C._filterwidget.find("input").val().length>0&&!G.refreshingfilter){G._applyfilterfromfilterrow()}if(C.filtertype=="input"&&!G.refreshingfilter){G._applyfilterfromfilterrow()}else{if(C._filterwidget.find("input").val().length==0&&!G.refreshingfilter){if(j=="null"||j=="not null"||f=="null"||f=="not null"){G._applyfilterfromfilterrow()}}}j=f});break;case"textbox":case"default":default:g(this,d);break;case"none":break;case"date":case"range":if(this.host.jqxDateTimeInput){var b=a("<div></div>");b.css("margin","4px");b.appendTo(d);var n={calendar:this.gridlocalization,todayString:this.gridlocalization.todaystring,clearString:this.gridlocalization.clearstring};b.jqxDateTimeInput({readonly:true,disabled:G.disabled,localization:n,rtl:G.rtl,showFooter:true,formatString:C.cellsformat,selectionMode:C.filtertype,value:null,theme:this.theme,width:A-10,height:this.filterrowheight-10});if(C.createfilterwidget){C.createfilterwidget(C,d,b)}C._filterwidget=b;this.addHandler(b,"valueChanged",function(f){if(!G.refreshingfilter){G._applyfilterfromfilterrow();G.focusedfilter=null}})}else{g(this,d)}break;case"list":case"checkedlist":if(this.host.jqxDropDownList){var q=this._getfilterdataadapter(C);var l=false;var t=a("<div></div>");t.css("margin","4px");var u=C.datafield;var v=C.filtertype=="checkedlist"?true:false;var D=A<150?220:"auto";q.dataBind();var p=q.records;var k=p.length<8?true:false;l=k;t.appendTo(d);t.jqxDropDownList({disabled:G.disabled,touchMode:G.touchmode,rtl:G.rtl,checkboxes:v,dropDownWidth:D,source:q.records,autoDropDownHeight:k,theme:this.theme,width:A-10,height:this.filterrowheight-10,displayMember:C.displayfield,valueMember:u});if(C.createfilterwidget){C.createfilterwidget(C,d,t)}var c=t.jqxDropDownList("listBox");if(v){t.jqxDropDownList({selectionRenderer:function(){var f='<span class="'+G.toThemeProperty("jqx-item")+'" style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+G.gridlocalization.filterselectstring+"</span>";return f}});var y=a('<span style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+G.gridlocalization.filterselectstring+"</span>");y.addClass(this.toThemeProperty("jqx-item"));if(c!=undefined){if(!l){c.host.height(200)}c.insertAt(G.gridlocalization.filterselectallstring,0);t.jqxDropDownList("setContent",y);var i=true;var F=new Array();c.checkAll(false);G.addHandler(c.host,"checkChange",function(I){t[0]._selectionChanged=true;if(!i){return}if(I.args.label!=G.gridlocalization.filterselectallstring){i=false;c.host.jqxListBox("checkIndex",0,true,false);var f=c.host.jqxListBox("getCheckedItems");var H=c.host.jqxListBox("getItems");if(f.length==1){c.host.jqxListBox("uncheckIndex",0,true,false)}else{if(H.length!=f.length){c.host.jqxListBox("indeterminateIndex",0,true,false)}}i=true}else{i=false;if(I.args.checked){c.host.jqxListBox("checkAll",false)}else{c.host.jqxListBox("uncheckAll",false)}i=true}})}}else{c.insertAt({label:this.gridlocalization.filterchoosestring,value:""},0);t.jqxDropDownList({selectedIndex:0})}C._filterwidget=t;var o=t.jqxDropDownList("dropdownlistWrapper");if(C.filtertype=="list"){this.addHandler(t,"select",function(f){if(!G.refreshingfilter){if(f.args&&f.args.type!="none"){G._applyfilterfromfilterrow();G.focusedfilter=null}}})}else{this.addHandler(t,"close",function(f){if(t[0]._selectionChanged){G._applyfilterfromfilterrow();G.focusedfilter=null;t[0]._selectionChanged=false}})}}else{g(this,d)}break;case"bool":case"boolean":if(this.host.jqxCheckBox){var w=a('<div tabIndex=0 style="opacity: 0.99; position: absolute; top: 50%; left: 50%; margin-top: -7px; margin-left: -10px;"></div>');w.appendTo(d);w.jqxCheckBox({disabled:G.disabled,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0,hasThreeStates:true,theme:this.theme,checked:null});if(C.createfilterwidget){C.createfilterwidget(C,d,w)}if(z===true||z=="true"){w.jqxCheckBox({checked:true})}else{if(z===false||z=="false"){w.jqxCheckBox({checked:false})}}C._filterwidget=w;this.addHandler(w,"change",function(f){if(!G.refreshingfilter){if(f.args){G.focusedfilter=null;G._applyfilterfromfilterrow()}}})}else{g(this,d)}break}},_getfilterdataadapter:function(b){var c=this.source._source?true:false;if(!c){dataadapter=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[b.displayfield],autoSort:true,autoSortField:b.displayfield,async:false})}else{var e={localdata:this.source.records,datatype:this.source.datatype,async:false};var d=this;dataadapter=new a.jqx.dataAdapter(e,{autoBind:false,autoSort:true,autoSortField:b.displayfield,async:false,uniqueDataFields:[b.displayfield],beforeLoadComplete:function(f){var k=new Array();if(b.cellsformat){var j=d._getcolumntypebydatafield(b);for(var g=0;g<f.length;g++){k.push(f[g]);var h=f[g][b.displayfield];f[g][b.displayfield+"JQValue"]=h;if(j==="date"){f[g][b.displayfield]=dataadapter.formatDate(h,b.cellsformat,d.gridlocalization)}else{if(j==="number"||j==="float"||j==="int"){f[g][b.displayfield]=dataadapter.formatNumber(h,b.cellsformat,d.gridlocalization)}}}return k}else{return f}}})}if(b.filteritems&&b.filteritems.length>0){var e={localdata:b.filteritems,datatype:this.source.datatype,async:false};dataadapter=new a.jqx.dataAdapter(e,{autoBind:false,async:false})}else{if(b.filteritems){if(b.filteritems._source){b.filteritems._options.autoBind=false;b.filteritems._options.async=false;return b.filteritems}else{if(a.isFunction(b.filteritems)){return b.filteritems()}}}}return dataadapter},refreshfilterrow:function(){if(!this.showfilterrow){return}this.refreshingfilter=true;this._updatefilterrowui();this._updatelistfilters(true,true);var h=this.that;var l=this.columns.records.length;for(var d=0;d<l;d++){var c=this.columns.records[d];if(c.filterable){if(c.filter){var b=c.filter.getfilters();if(b.length>0){var k=b[0].value;var e=c._filterwidget;var f=c._filterwidget.parent();if(e!=null){switch(c.filtertype){case"number":f.find("input").val(k);if(this.host.jqxDropDownList){var i=c.filter.getoperatorsbyfiltertype("numericfilter");e.find(".filter").jqxDropDownList("selectIndex",i.indexOf(b[0].condition))}break;case"input":f.find("input").val(k);if(this.host.jqxDropDownList){var i=c.filter.getoperatorsbyfiltertype("stringfilter");e.find(".filter").jqxDropDownList("selectIndex",i.indexOf(b[0].condition))}break;case"date":case"range":if(this.host.jqxDateTimeInput){var k=c.filter.getfilterat(0).filtervalue;if(k!=undefined){if(c.filter.getfilterat(1)){var g=c.filter.getfilterat(1).filtervalue}else{g=k}if(c.filtertype=="range"){a(f.children()[0]).jqxDateTimeInput("setRange",new Date(k),new Date(g))}else{a(f.children()[0]).jqxDateTimeInput("setDate",new Date(k))}}}else{e.val(k)}break;case"textbox":case"default":e.val(k);h["_oldWriteText"+e[0].id]=k;break;case"bool":case"boolean":if(!this.host.jqxCheckBox){e.val(k)}else{a(f.children()[0]).jqxCheckBox({checked:k})}break}}}}}}this.refreshingfilter=false},_destroyedfilters:function(){var g=this.that;var b=this.columns.records.length;for(var f=0;f<b;f++){var c=this.columns.records[f];if(c.filterable){var h=c._filterwidget;if(c.filtertype=="list"||c.filtertype=="checkedlist"){this.removeHandler(h,"select");this.removeHandler(h,"close");h.jqxDropDownList("destroy")}else{if(c.filtertype=="date"){this.removeHandler(h,"valueChanged");h.jqxDateTimeInput("destroy")}else{if(c.filtertype=="bool"){this.removeHandler(h,"change");h.jqxCheckBox("destroy")}else{if(c.filtertype=="number"){var d=h.find(".jqx-input");this.removeHandler(d,"keydown");var e=a(h.children()[1]);e.jqxDropDownList("destroy")}else{this.removeHandler(h,"keydown")}}}}h.remove()}}},_updatelistfilters:function(l,k){var v=this.that;var t=this.columns.records.length;for(var p=0;p<t;p++){var q=this.columns.records[p];if(q.filterable){if(q.filtertype=="list"||q.filtertype=="checkedlist"){var h=q._filterwidget;if(!l){if(q.filter==undefined){h.jqxDropDownList("renderSelection");continue}}else{var e=this._getfilterdataadapter(q);h.jqxDropDownList({source:e});var d=h.jqxDropDownList("getItems");var o=true;if(d.length!=e.records.length+1){o=false}if(o){for(var s=1;s<d.length;s++){if(d[s].label!=e.records[s-1][q.displayfield]){o=false;break}}}if(o&&!k){continue}}var m=q.filtertype=="checkedlist"?true:false;var d=h.jqxDropDownList("getItems");var b=h.jqxDropDownList("listBox");h.jqxDropDownList("dataBind");if(m){h.jqxDropDownList({selectionRenderer:function(){return v.gridlocalization.filterselectstring}});b.insertAt(this.gridlocalization.filterselectallstring,0);var n=a('<span style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+this.gridlocalization.filterselectstring+"</span>");n.addClass(this.toThemeProperty("jqx-item"));h.jqxDropDownList("setContent",n);b.checkAll(false);if(q.filter){var g=q.filter.getfilters();for(var s=0;s<b.items.length;s++){var f=b.items[s].label;var r=undefined;a.each(g,function(){var i;if(this.condition=="NOT_EQUAL"){if(f==this.value){i=false}else{i=true}}else{if(this.condition=="EQUAL"){if(f==this.value){i=true}else{i=false}}}if(r==undefined&&i!==undefined){r=i}else{if(this.condition=="EQUAL"){r=r||i}else{r=r&&i}}});if(r){b.checkIndex(s,false,false)}else{b.uncheckIndex(s,false,false)}}b._updateCheckedItems();var u=b.getCheckedItems().length;if(b.items.length!=u&&u>0){b.host.jqxListBox("indeterminateIndex",0,true,false)}}}else{b.insertAt({label:this.gridlocalization.filterchoosestring,value:""},0);h.jqxDropDownList({selectedIndex:0});if(q.filter){var g=q.filter.getfilters();var c=-1;for(var s=0;s<b.items.length;s++){var f=b.items[s].label;a.each(g,function(){if(this.condition=="NOT_EQUAL"){return true}if(f==this.value){c=s;return false}})}if(c!=-1){b.selectIndex(c)}}}if(d.length<8){h.jqxDropDownList("autoDropDownHeight",true)}else{h.jqxDropDownList("autoDropDownHeight",false)}}}}},_renderfiltercolumn:function(){var b=this.that;if(this.filterable){if(!this.columns.records){return}a.each(this.columns.records,function(d,e){var c=false;if(b.autoshowfiltericon){if(this.filter){a(this.filtericon).show();c=true}else{a(this.filtericon).hide()}}else{if(this.filterable){a(this.filtericon).show();c=true}}if(this.align=="right"&&!this.renderer){if(this.element){if(!c){this.element.firstChild.firstChild.style.marginRight="2px"}else{this.element.firstChild.firstChild.style.marginRight="18px"}}}})}},_initcolumntypes:function(){if(this.columns&&this.columns.records){var b=this.source._source.datafields;if(b){for(var c=0;c<this.columns.records.length;c++){var d=this.columns.records[c];if(d.datatype){continue}var e="";a.each(b,function(){if(this.name==d.displayfield){if(this.type){e=this.type}return false}});if(e!=""){d.datatype=e}else{d.datatype=""}}}}},_getcolumntypebydatafield:function(f){var g=this.that;var e="string";var d=g.source.datafields||((g.source._source)?g.source._source.datafields:null);if(d){var i="";a.each(d,function(){if(this.name==f.displayfield){if(this.type){i=this.type}return false}});if(i){return i}}if(f!=null){if(this.dataview.cachedrecords==undefined){return e}var b=null;if(!this.virtualmode){if(this.dataview.cachedrecords.length==0){return e}b=this.dataview.cachedrecords[0][f.displayfield];if(b!=null&&b.toString()==""){return"string"}}else{a.each(this.dataview.cachedrecords,function(){b=this[f.displayfield];return false})}if(b!=null){if(typeof b=="boolean"){e="boolean"}else{if(a.jqx.dataFormat.isNumber(b)){e="number"}else{var h=new Date(b);if(h.toString()=="NaN"||h.toString()=="Invalid Date"){if(a.jqx.dataFormat){h=a.jqx.dataFormat.tryparsedate(b);if(h!=null){if(h&&h.getFullYear()){if(h.getFullYear()==1970&&h.getMonth()==0&&h.getDate()==1){var c=new Number(b);if(!isNaN(c)){return"number"}return"string"}}return"date"}else{e="string"}}else{e="string"}}else{e="date"}}}}}return e},_getfiltersbytype:function(b){var c=this.that;var d="";switch(b){case"number":case"float":case"int":d=c.gridlocalization.filternumericcomparisonoperators;break;case"date":d=c.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":d=c.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:d=c.gridlocalization.filterstringcomparisonoperators;break}return d},_getfiltertype:function(b){var c="stringfilter";switch(b){case"number":case"int":case"float":case"decimal":c="numericfilter";break;case"boolean":case"bool":c="booleanfilter";break;case"date":case"time":case"range":c="datefilter";break;case"string":case"input":c="stringfilter";break}return c},_buildfilter:function(r,l,F){var f=a(l).find("#filter1"+r.element.id);var G=a(l).find("#filter2"+r.element.id);var K=a(l).find("#filter3"+r.element.id);var k=a(l).find(".filtertext1"+r.element.id);var j=a(l).find(".filtertext2"+r.element.id);var A=k.val();var z=j.val();var M=r._getcolumntypebydatafield(F);var t=r._getfiltersbytype(M);var J=new a.jqx.filter();var w=r._getfiltertype(M);if(r.filtermode==="default"&&(F.filtertype!=="list"&&F.filtertype!=="checkedlist")){var E=f.jqxDropDownList("selectedIndex");var c=G.jqxDropDownList("selectedIndex");var D=K.jqxDropDownList("selectedIndex");var e=null;var d=null;if(r.updatefilterconditions){var p=r.updatefilterconditions(w,J.getoperatorsbyfiltertype(w));if(p!=undefined){J.setoperatorsbyfiltertype(w,p)}}var q=false;var L=J.getoperatorsbyfiltertype(w)[E];var K=J.getoperatorsbyfiltertype(w)[D];var v=L=="NULL"||L=="NOT_NULL";var h=L=="EMPTY"||L=="NOT_EMPTY";if(L==undefined){L=J.getoperatorsbyfiltertype(w)[0]}if(K==undefined){K=J.getoperatorsbyfiltertype(w)[0]}if(A.length>0||v||h){e=J.createfilter(w,A,L,null,F.cellsformat,r.gridlocalization);J.addfilter(c,e);q=true}var u=K=="NULL"||K=="NOT_NULL";var g=K=="EMPTY"||K=="NOT_EMPTY";if(z.length>0||u||g){d=J.createfilter(w,z,K,null,F.cellsformat,r.gridlocalization);J.addfilter(c,d);q=true}if(q){var C=F.displayfield;this.addfilter(C,J,true)}else{this._clearfilter(r,l,F)}}else{if(r.filtermode==="excel"||(F.filtertype==="list"||F.filtertype==="checkedlist")){var B=this;var n=false;var x=f.data().jqxListBox.instance;var I=this.filtermode==="excel"||F.filtertype==="checkedlist";var o=x.getCheckedItems();if(!I){var o=x.getSelectedItems()}if(o.length==0){for(var H=1;H<x.items.length;H++){var m=x.items[H].value;var b="not_equal";if(m.indexOf("|")>=0||m.indexOf(" AND ")>=0||m.indexOf(" OR ")>=0||m.indexOf(" and ")>=0||m.indexOf(" or ")>=0){m=m.replace("|","");m=m.replace("AND","");m=m.replace("OR","");m=m.replace("and","");m=m.replace("or","");var b="equal"}var y=J.createfilter(w,m,b,null);J.addfilter(0,y)}n=true}else{if(o.length!=x.items.length){n=true;for(var H=0;H<o.length;H++){if(r.gridlocalization.filterselectallstring===o[H].value){continue}var m=o[H].value;var b="equal";var y=J.createfilter(w,m,b,null);var s=1;J.addfilter(s,y)}}else{n=false}}if(n){var C=F.displayfield;this.addfilter(C,J,true)}else{var C=F.displayfield;this.removefilter(C,true)}}}},_clearfilter:function(e,c,d){var b=d.displayfield;this.removefilter(b,true)},addfilter:function(d,e,c){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}var f=this.getcolumn(d);var b=this._getcolumn(d);if(f==undefined||f==null){return}f.filter=e;b.filter=e;this.dataview.addfilter(d,e);if(c==true&&c!=undefined){this.applyfilters("add")}},removefilter:function(d,c){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}var e=this.getcolumn(d);var b=this._getcolumn(d);if(e==undefined||e==null){return}if(e.filter==null){return}this.dataview.removefilter(d,e.filter);e.filter=null;b.filter=null;if(this.showfilterrow){this.clearfilterrow(d)}if(c==true||c!==false){this.applyfilters("remove")}},applyfilters:function(f){var c=false;if(this.dataview.filters.length>=0&&(this.virtualmode||!this.source.localdata)){if(this.source!=null&&this.source.filter){var g=-1;if(this.pageable){g=this.dataview.pagenum;this.dataview.pagenum=0}else{this.vScrollInstance.setPosition(0);this.loadondemand=true;this._renderrows(this.virtualsizeinfo)}if(this.pageable&&this.virtualmode){this.dataview.pagenum=0}this.source.filter(this.dataview.filters,this.dataview.records,this.dataview.records.length);if(this.pageable&&!this.virtualmode){this.dataview.pagenum=g}}}if(this.dataview.clearsortdata){this.dataview.clearsortdata()}if(!this.virtualmode){var b=this.selectedrowindexes;var d=this.that;this.dataview.refresh();if(this.dataview.clearsortdata){if(this.sortcolumn&&this.sortdirection){var e=this.sortdirection.ascending?"asc":"desc";if(!this._loading){this.sortby(this.sortcolumn,e,null,false)}else{this.sortby(this.sortcolumn,e,null,false,false)}}}}else{if(this.pageable){this.dataview.updateview();if(this.gotopage){this.gotopage(0)}}this.rendergridcontent(false,false);if(this.showfilterrow){if(typeof f!="string"&&a.isEmptyObject(f)){this.refreshfilterrow()}}this._raiseEvent(13,{filters:this.dataview.filters});return}if(this.pageable){this.dataview.updateview();if(this.gotopage){this.gotopage(0);this.updatepagerdetails()}}this._updaterowsproperties();if(!this.groupable||(this.groupable&&this.groups.length==0)){this._rowdetailscache=new Array();this.virtualsizeinfo=null;this._pagescache=new Array();if(this.columns&&this.columns.records&&this.columns.records.length>0&&!this.columns.records[0].filtericon){this.prerenderrequired=true}this.rendergridcontent(true,false);this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);if(this.showaggregates&&this._updatecolumnsaggregates){this._updatecolumnsaggregates()}}else{this._rowdetailscache=new Array();this._render(true,true,false,false,false);if(this.showfilterrow){this._updatefocusedfilter()}this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}if(this.showfilterrow){if(typeof f!="string"&&a.isEmptyObject(f)){this.refreshfilterrow()}}this._raiseEvent(13,{filters:this.dataview.filters})},getfilterinformation:function(){var d=new Array();for(var b=0;b<this.dataview.filters.length;b++){var c=this.getcolumn(this.dataview.filters[b].datafield);d[b]={filter:this.dataview.filters[b].filter,datafield:c.datafield,displayfield:c.displayfield,filtercolumn:c.datafield,filtercolumntext:c.text}}return d},clearfilters:function(b){var d=this.that;if(this.showfilterrow){this.clearfilterrow()}if(this.columns.records){var c=b==true||b!==false;a.each(this.columns.records,function(){d.removefilter(this.displayfield,!c)})}if(b===false){return}if(b==true||b!==false){this.applyfilters("clear")}},_destroyfilterpanel:function(){var e=a(a.find("#filterclearbutton"+this.element.id));var d=a(a.find("#filterbutton"+this.element.id));var h=a(a.find("#filter1"+this.element.id));var c=a(a.find("#filter2"+this.element.id));var g=a(a.find("#filter3"+this.element.id));var f=a(a.find(".filtertext1"+this.element.id));var b=a(a.find(".filtertext2"+this.element.id));if(f.length>0&&b.length>0){f.removeClass();b.removeClass();f.remove();b.remove()}if(e.length>0){e.jqxButton("destroy");d.jqxButton("destroy");this.removeHandler(e,"click");this.removeHandler(d,"click")}if(h.length>0){h.jqxDropDownList("destroy")}if(c.length>0){c.jqxDropDownList("destroy")}if(g.length>0){g.jqxDropDownList("destroy")}},_updatefilterpanel:function(s,p,E){if(s==null||s==undefined){s=this}var Q=s._getcolumntypebydatafield(E);var u=s._getfiltersbytype(Q);if(!s.host.jqxDropDownList){throw new Error("jqxGrid: Missing reference to jqxdropdownlist.js.");return}s.filterpanel.detach();s.excelfilterpanel.detach();if(E.filterpanel){E.filterpanel.detach()}a(p).children().detach();var k=a(s.menuitemsarray[6]);a(k).css("height","175px");if(E.createfilterpanel&&!E.filterpanel){var K=a("<div class='filter' style='margin-left: 7px;'></div>");a(p).append(K);E.createfilterpanel(E.displayfield,K);E.filterpanel=K}if(E.filtertype==="list"||E.filtertype==="checkedlist"){a(p).append(s.excelfilterpanel)}else{if(E.filtertype!=="custom"){a(p).append(s.filterpanel)}else{if(E.filterpanel){a(p).append(E.filterpanel)}}}var g=a(p);var N=g.find("#filterclearbutton"+s.element.id);var l=g.find("#filterbutton"+s.element.id);var f=g.find("#filter1"+s.element.id);var m=g.find("#filter2"+s.element.id);var P=g.find("#filter3"+s.element.id);var j=g.find(".filtertext1"+s.element.id);var h=g.find(".filtertext2"+s.element.id);if(this._hasdatefilter&&(E.filtertype!=="list"&&E.filtertype!=="checkedlist"&&E.filtertype!=="custom")){var e=j.parent();var d=h.parent();e.children().remove();d.children().remove();if(E.filtertype=="date"){s._showwhere.text(s.gridlocalization.filtershowrowdatestring);var b=a("<div class='filtertext1"+s.element.id+"' style='margin-top: 3px; margin-bottom: 3px;'></div>");e.append(b);var n=function(c){var i={calendar:s.gridlocalization,todayString:s.gridlocalization.todaystring,clearString:s.gridlocalization.clearstring};c.jqxDateTimeInput({disabled:s.disabled,localization:i,rtl:s.rtl,width:s._filterpanelwidth-15,height:20,value:null,formatString:E.cellsformat,theme:s.theme})};n(b);var b=a("<div class='filtertext2"+s.element.id+"' style='margin-top: 3px; margin-bottom: 3px;'></div>");d.append(b);n(b)}else{s._showwhere.text(s.gridlocalization.filtershowrowstring);var b=a("<input class='filtertext1"+s.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input>");e.append(b);var n=function(c){c.addClass(s.toThemeProperty("jqx-input"));c.addClass(s.toThemeProperty("jqx-widget-content"));c.addClass(s.toThemeProperty("jqx-rc-all"));c.width(s._filterpanelwidth-15)};n(b);var b=a("<input class='filtertext2"+s.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input>");d.append(b);n(b)}var j=g.find(".filtertext1"+s.element.id);var h=g.find(".filtertext2"+s.element.id)}if(E.filtertype!="date"){j.val("");h.val("")}else{j.val(null);h.val(null)}this.removeHandler(l,"click");this.addHandler(l,"click",function(){s._buildfilter(s,p,E);s._closemenu()});this.removeHandler(N,"click");this.addHandler(N,"click",function(){s._clearfilter(s,p,E);s._closemenu()});this.removeHandler(l,"keydown");this.addHandler(l,"keydown",function(c){if(c.keyCode===13){s._buildfilter(s,p,E);s._closemenu()}});this.removeHandler(N,"keydown");this.addHandler(N,"keydown",function(c){if(c.keyCode===13){s._clearfilter(s,p,E);s._closemenu()}});this.removeHandler(j,"keydown");this.addHandler(j,"keydown",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});this.removeHandler(h,"keydown");this.addHandler(h,"keydown",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});if(this.filtermode==="default"&&(E.filtertype!=="list"&&E.filtertype!=="checkedlist"&&E.filtertype!=="custom")){if(f.jqxDropDownList("source")!=u){f.jqxDropDownList({enableBrowserBoundsDetection:false,source:u});P.jqxDropDownList({enableBrowserBoundsDetection:false,source:u})}if(Q=="boolean"||Q=="bool"){f.jqxDropDownList({autoDropDownHeight:true,selectedIndex:0});P.jqxDropDownList({autoDropDownHeight:true,selectedIndex:0})}else{var H=false;if(u&&u.length){if(u.length<5){H=true}}f.jqxDropDownList({autoDropDownHeight:H,selectedIndex:2});P.jqxDropDownList({autoDropDownHeight:H,selectedIndex:2})}m.jqxDropDownList({selectedIndex:0});var z=E.filter;var M=new a.jqx.filter();var x="";switch(Q){case"number":case"int":case"float":case"decimal":x="numericfilter";o=M.getoperatorsbyfiltertype("numericfilter");break;case"boolean":case"bool":x="booleanfilter";o=M.getoperatorsbyfiltertype("booleanfilter");break;case"date":case"time":x="datefilter";o=M.getoperatorsbyfiltertype("datefilter");break;case"string":x="stringfilter";o=M.getoperatorsbyfiltertype("stringfilter");break}if(z!=null){var e=z.getfilterat(0);var d=z.getfilterat(1);var I=z.getoperatorat(0);if(s.updatefilterconditions){var o=[];var r=s.updatefilterconditions(x,o);if(r!=undefined){for(var O=0;O<r.length;O++){r[O]=r[O].toUpperCase()}z.setoperatorsbyfiltertype(x,r);o=r}}var w="default";if(e!=null){var D=o.indexOf(e.comparisonoperator);var A=e.filtervalue;j.val(A);f.jqxDropDownList({selectedIndex:D,animationType:w})}if(d!=null){var C=o.indexOf(d.comparisonoperator);var y=d.filtervalue;h.val(y);P.jqxDropDownList({selectedIndex:C,animationType:w})}if(z.getoperatorat(0)==undefined){m.jqxDropDownList({selectedIndex:0,animationType:w})}else{if(z.getoperatorat(0)=="and"||z.getoperatorat(0)==0){m.jqxDropDownList({selectedIndex:0})}else{m.jqxDropDownList({selectedIndex:1})}}}if(s.updatefilterpanel){s.updatefilterpanel(f,P,m,j,h,l,N,z,x,o)}if(!this._hasdatefilter||(this._hasdatefilter&&E.filtertype!="date")){j.focus();setTimeout(function(){j.focus()},10)}}else{if(this.filtermode==="excel"||E.filtertype==="list"||E.filtertype==="checkedlist"){var v=s._getfilterdataadapter(E);var x=s._getfiltertype(Q);var L=this.filtermode==="excel"||E.filtertype==="checkedlist";f.jqxListBox("focus");this.removeHandler(f,"keyup");this.addHandler(f,"keyup",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});if(E.cellsformat){f.jqxListBox({checkboxes:L,displayMember:E.displayfield,valueMember:E.displayfield+"JQValue",source:v})}else{f.jqxListBox({checkboxes:L,displayMember:E.displayfield,valueMember:E.displayfield,source:v})}if(L){f.jqxListBox("insertAt",s.gridlocalization.filterselectallstring,0);var F=f.data().jqxListBox.instance;F.checkAll(false);var B=this;if(E.filter){F.uncheckAll(false);var t=E.filter.getfilters();for(var J=0;J<F.items.length;J++){var G=F.items[J].value;a.each(t,function(){if(this.condition=="NOT_EQUAL"){if(G!=this.value){F.uncheckIndex(J,false,false);return false}}else{if(this.condition=="EQUAL"){if(G==this.value){F.checkIndex(J,false,false);return false}}}})}F._updateCheckedItems();var q=F.getCheckedItems().length;if(F.items.length!=q&&q>0){F.host.jqxListBox("indeterminateIndex",0,true,false)}if(q===F.items.length-1){F.host.jqxListBox("checkIndex",0,true,false)}}}else{if(E.filter){var F=f.data().jqxListBox.instance;F.clearSelection();var t=E.filter.getfilters();for(var J=0;J<F.items.length;J++){var G=F.items[J].value;a.each(t,function(){if(this.condition=="NOT_EQUAL"){if(G!=this.value){F.unselectIndex(J,false,false);return false}}else{if(this.condition=="EQUAL"){if(G==this.value){F.selectIndex(J,true,false);return false}}}})}F._renderItems()}}}}},_initfilterpanel:function(y,b,c,o,v){if(y==null||y==undefined){y=this}b[0].innerHTML="";var s=a("<div class='filter' style='margin-left: 7px;'></div>");b.append(s);var n=a("<div class='filter' style='margin-top: 3px; margin-bottom: 3px;'></div>");n.text(y.gridlocalization.filtershowrowstring);this._showwhere=n;var u=a("<div class='filter' id='filter1"+y.element.id+"'></div>");var h=a("<div class='filter' id='filter2"+y.element.id+"' style='margin-bottom: 3px;'></div>");var r=a("<div class='filter' id='filter3"+y.element.id+"'></div>");var e=y._getcolumntypebydatafield(c);if(!u.jqxDropDownList){throw new Error("jqxGrid: jqxdropdownlist.js is not loaded.");return}var p=y._getfiltersbytype(e);this._hasdatefilter=false;this._filterpanelwidth=o;if(this.columns&&this.columns.records){for(var t=0;t<this.columns.records.length;t++){if(this.columns.records[t].filtertype=="date"){this._hasdatefilter=true;break}}}var k=a("<div class='filter'><input class='filtertext1"+y.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input></div>");var m=k.find("input");m.addClass(this.toThemeProperty("jqx-input"));m.addClass(this.toThemeProperty("jqx-widget-content"));m.addClass(this.toThemeProperty("jqx-rc-all"));m.width(o-15);var l=a("<div class='filter'><input class='filtertext2"+y.element.id+"' style='height: 20px; margin-top: 3px;' type='text'></input></div>");var j=l.find("input");j.addClass(this.toThemeProperty("jqx-input"));j.addClass(this.toThemeProperty("jqx-widget-content"));j.addClass(this.toThemeProperty("jqx-rc-all"));j.width(o-15);if(y.rtl){m.css("direction","rtl");j.css("direction","rtl")}var g=a("<div class='filter' style='height: 25px; margin-left: 20px; margin-top: 7px;'></div>");var f=a('<span tabIndex=0 id="filterbutton'+y.element.id+'" class="filterbutton" style="padding: 4px 12px; margin-left: 2px;">'+y.gridlocalization.filterstring+"</span>");g.append(f);var w=a('<span tabIndex=0 id="filterclearbutton'+y.element.id+'" class="filterclearbutton" style="padding: 4px 12px; margin-left: 5px;">'+y.gridlocalization.filterclearstring+"</span>");g.append(w);f.jqxButton({height:20,theme:y.theme});w.jqxButton({height:20,theme:y.theme});var x=function(z){if(z){if(z.text().indexOf("case sensitive")!=-1){var i=z.text();i=i.replace("case sensitive","match case");z.text(i)}z.css("font-family",y.host.css("font-family"));z.css("font-size",y.host.css("font-size"));z.css("top","1px");z.css("position","relative");return z}return""};if(this.filtermode==="default"&&!v){s.append(n);s.append(u);u.jqxDropDownList({_checkForHiddenParent:false,rtl:y.rtl,enableBrowserBoundsDetection:false,selectedIndex:2,width:o-15,height:20,dropDownHeight:150,dropDownWidth:o-15,selectionRenderer:x,source:p,theme:y.theme});s.append(k);var q=new Array();q[0]=y.gridlocalization.filterandconditionstring;q[1]=y.gridlocalization.filterorconditionstring;h.jqxDropDownList({_checkForHiddenParent:false,rtl:y.rtl,enableBrowserBoundsDetection:false,autoDropDownHeight:true,selectedIndex:0,width:60,height:20,source:q,selectionRenderer:x,theme:y.theme});s.append(h);r.jqxDropDownList({_checkForHiddenParent:false,rtl:y.rtl,enableBrowserBoundsDetection:false,selectedIndex:2,width:o-15,height:20,dropDownHeight:150,dropDownWidth:o-15,selectionRenderer:x,source:p,theme:y.theme});s.append(r);s.append(l)}else{if(this.filtermode==="excel"||v){s.append(n);s.append(u);u.attr("tabindex",0);u.jqxListBox({rtl:y.rtl,_checkForHiddenParent:false,checkboxes:true,selectedIndex:2,width:o-15,height:120,theme:y.theme});var d=true;y.addHandler(u,"checkChange",function(A){if(!d){return}if(A.args.label!=y.gridlocalization.filterselectallstring){d=false;u.jqxListBox("checkIndex",0,true,false);var i=u.jqxListBox("getCheckedItems");var z=u.jqxListBox("getItems");if(i.length==1){u.jqxListBox("uncheckIndex",0,true,false)}else{if(z.length!=i.length){u.jqxListBox("indeterminateIndex",0,true,false)}}d=true}else{d=false;if(A.args.checked){u.jqxListBox("checkAll",false)}else{u.jqxListBox("uncheckAll",false)}d=true}})}}s.append(g);if(y.updatefilterpanel){y.updatefilterpanel(u,r,h,k,l,f,w,null,null,p)}}})})(jqxBaseFramework); | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_updatefilterrowui:function(f){var m=this.columns.records.length;var e=0;var l=this;if(!this.filterrow){return}for(var i=0;i<m;i++){var g=this.columns.records[i];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[i]);k.css("left",e);var h=true;if(k.width()==c){h=false}if(f){h=true}k.width(c);k[0].left=e;if(!(g.hidden&&g.hideable)){e+=c}else{k.css("display","none")}if(!h){continue}if(g.createfilterwidget&&g.filtertype=="custom"){g.createfilterwidget(g,k)}else{if(g.filterable){var d=function(n,o){var j=a(o.children()[0]);j.width(c-10);j.attr("disabled",n.disabled)};switch(g.filtertype){case"number":case"input":a(k.children()[0]).width(c);k.find("input").width(c-30);k.find("input").attr("disabled",l.disabled);a(k.find(".jqx-dropdownlist-state-normal")).jqxDropDownList({theme:l.theme,disabled:l.disabled});break;case"date":case"range":if(this.host.jqxDateTimeInput){a(k.children()[0]).jqxDateTimeInput({theme:l.theme,disabled:l.disabled,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({theme:l.theme,disabled:l.disabled,width:c-10})}else{d(this,k)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){d(this,k)}else{a(k.children()[0]).jqxCheckBox({theme:l.theme,disabled:l.disabled})}break}}}}var b=a(this.filterrow.children()[0]);b.width(parseInt(e)+2);b.height(this.filterrowheight)},clearfilterrow:function(d){this._disablefilterrow=true;if(!this.columns.records){return}var l=this.columns.records.length;var e=0;for(var h=0;h<l;h++){var f=this.columns.records[h];var k=a(this.filterrow[0].cells[h]);if(typeof d=="string"){if(f.displayfield!=d){continue}}if(f.filterable){var c=function(n,o){var j=a(o.children()[0]);j.val("");if(j[0]){n["_oldWriteText"+j[0].id]=""}};switch(f.filtertype){case"number":case"input":k.find("input").val("");if(this.host.jqxDropDownList){var i=a(a(a(k).children()[0]).children()[1]);i.jqxDropDownList("clearSelection");var g=0;if(g==0){var b=this._getfiltersbytype(f.filtertype=="number"?"number":"string");var m=b.indexOf("contains");if(m!=-1&&f.filtercondition==null){g=m}}i.jqxDropDownList({selectedIndex:g});i.jqxDropDownList("ensureVisible",g)}break;case"date":case"range":if(this.host.jqxDateTimeInput){a(k.children()[0]).jqxDateTimeInput("setDate",null)}else{c(this,k)}break;case"textbox":case"default":c(this,k);break;case"list":if(this.host.jqxDropDownList){a(k.children()[0]).jqxDropDownList("clearSelection")}else{c(this,k)}break;case"checkedlist":if(this.host.jqxDropDownList){a(k.children()[0]).jqxDropDownList("checkAll",false)}else{c(this,k)}break;case"bool":case"boolean":if(!this.host.jqxCheckBox){c(this,k)}else{a(k.children()[0]).jqxCheckBox({checked:null})}break}}}this._disablefilterrow=false},_applyfilterfromfilterrow:function(){if(this._disablefilterrow==true){return}if(this.disabled){return}var z=this.columns.records.length;var D=this.that;for(var t=0;t<z;t++){var k=new a.jqx.filter();var u=this.columns.records[t];if(!u.filterable){continue}if(u.datafield===null){continue}var f=D._getcolumntypebydatafield(u);var d=D._getfiltertype(f);var l=1;var E=true;var e=u.filtertype;var B=function(j,L,I){var i=true;if(j._filterwidget){var G=j._filterwidget.val();if(G!=""){var J="equal";if(L=="stringfilter"){var J="contains"}if(L=="numericfilter"){if(D.gridlocalization.decimalseparator==","){if(G.indexOf(D.gridlocalization.decimalseparator)>=0){G=G.replace(D.gridlocalization.decimalseparator,".")}}}if(L!="stringfilter"){var K=0;if(G.indexOf(">")!=-1){J="greater_than";K=1}if(G.indexOf("<")!=-1){J="less_than";K=1}if(G.indexOf("=")!=-1){if(J=="greater_than"){J="greater_than_or_equal";K=2}else{if(J=="less_than"){J="less_than_or_equal";K=2}else{J="equal";K=1}}}if(K!=0){G=G.substring(K);if(G.length<1){return false}}}if(j.filtercondition!=undefined){J=j.filtercondition}if(L=="datefilter"){var H=I.createfilter(L,G,J,null,j.cellsformat,D.gridlocalization)}else{var H=I.createfilter(L,G,J)}I.addfilter(l,H)}else{i=false}}return i};switch(u.filtertype){case"range":case"date":if(u._filterwidget.jqxDateTimeInput){if(u.filtertype=="range"){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.setMinutes(0);r.setFullYear(p.from.getFullYear(),p.from.getMonth(),p.from.getDate());var q=new Date(0);q.setHours(0);q.setMinutes(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{E=false}}else{var p=u._filterwidget.jqxDateTimeInput("getDate");if(p!=null){var r=new Date(0);r.setHours(0);r.setMinutes(0);r.setFullYear(p.getFullYear(),p.getMonth(),p.getDate());var y=k.createfilter(d,r,"EQUAL");k.addfilter(0,y)}else{E=false}}}else{E=B(u,d,k)}break;case"input":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(D.updatefilterconditions){var F=D.updatefilterconditions(d,k.getoperatorsbyfiltertype(d));if(F!=undefined){k.setoperatorsbyfiltertype(d,F)}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,u.cellsformat,D.gridlocalization);k.addfilter(0,y)}else{E=false}}else{E=false}break;case"number":if(u._filterwidget){var p=u._filterwidget.find("input").val();if(D.gridlocalization.decimalseparator==","){if(p.indexOf(D.gridlocalization.decimalseparator)>=0){p=p.replace(D.gridlocalization.decimalseparator,".")}}var h=u._filterwidget.find(".filter").jqxDropDownList("selectedIndex");var w=k.getoperatorsbyfiltertype(d)[h];if(D.updatefilterconditions){var F=D.updatefilterconditions(d,k.getoperatorsbyfiltertype(d));if(F!=undefined){k.setoperatorsbyfiltertype(d,F)}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,new Number(p),w,null,u.cellsformat,D.gridlocalization);k.addfilter(0,y)}else{E=false}}else{E=false}break;case"textbox":case"default":E=B(u,d,k);break;case"bool":case"boolean":if(u._filterwidget.jqxCheckBox){var p=u._filterwidget.jqxCheckBox("checked");if(p!=null){var o="equal";var m=k.createfilter(d,p,o);k.addfilter(l,m)}else{E=false}}else{E=B(u,d,k)}break;case"list":var g=u._filterwidget.jqxDropDownList("listBox");if(g.selectedIndex>0){var b=g.getItem(g.selectedIndex);var p=b.label;var A=b.value;var o="equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);k.addfilter(l,m);if(A!==p){m.data=A}}else{E=false}break;case"checkedlist":if(u._filterwidget.jqxDropDownList){var g=u._filterwidget.jqxDropDownList("listBox");var C=g.getCheckedItems();if(C.length==0){for(var v=1;v<g.items.length;v++){var p=g.items[v].label;var A=g.items[v].value;var o="not_equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);if(A!==p){m.data=A}k.addfilter(0,m)}E=true}else{if(C.length!=g.items.length){for(var v=0;v<C.length;v++){var p=C[v].label;var A=C[v].value;var o="equal";if(p===""){o="NULL"}var m=k.createfilter(d,p,o);if(A!==p){m.data=A}k.addfilter(l,m)}}else{E=false}}}else{E=B(u,d,k)}break}if(!this._loading){if(E){this.addfilter(u.displayfield,k,false)}else{this.removefilter(u.displayfield,false)}}}if(!this._loading){this.applyfilters("filterrow")}},_updatefilterrow:function(){var b=a('<div style="position: relative;" id="row00'+this.element.id+'"></div>');var f=0;var o=this.columns.records.length;var m=this.toThemeProperty("jqx-grid-cell");m+=" "+this.toThemeProperty("jqx-grid-cell-pinned");m+=" "+this.toThemeProperty("jqx-grid-cell-filter-row");var r=o+10;var s=new Array();var n=this.that;this.filterrow[0].cells=s;b.height(this.filterrowheight);this.filterrow.children().detach();this.filterrow.append(b);if(!this._filterrowcache){this._filterrowcache=new Array()}this._initcolumntypes();var g=false;var d=new Array();var q=document.createDocumentFragment();for(var h=0;h<o;h++){var e=this.columns.records[h];var c=e.width;if(c<e.minwidth){c=e.minwidth}if(c>e.maxwidth){c=e.maxwidth}var l=document.createElement("div");l.style.overflow="hidden";l.style.position="absolute";l.style.height="100%";l.className=m;l=a(l);q.appendChild(l[0]);l[0].style.left=f+"px";if(this.rtl){l.css("z-index",r++);l.css("border-left-width","1px")}else{l.css("z-index",r--)}if(c=="auto"){c=0}l[0].style.width=parseFloat(c)+"px";l[0].left=f;if(!(e.hidden&&e.hideable)){f+=c}else{l.css("display","none")}s[s.length]=l[0];var k=true;if(!this.rtl){if(this.groupable){var p=(this.showrowdetailscolumn&&this.rowdetails)?1:0;if(this.groups.length+p>h){k=false}}if(this.showrowdetailscolumn&&this.rowdetails&&h==0){k=false}}else{if(this.groupable){var p=(this.showrowdetailscolumn&&this.rowdetails)?1:0;if(this.groups.length+p+h>o-1){k=false}}if(this.showrowdetailscolumn&&this.rowdetails&&h==o-1){k=false}}if(k){if(e.filtertype=="custom"&&e.createfilterwidget){var i=function(){n._applyfilterfromfilterrow()};e.createfilterwidget(e,l,i)}else{if(e.filterable){if(this._filterrowcache[e.datafield]){g=true;l.append(this._filterrowcache[e.datafield]);e._filterwidget=this._filterrowcache[e.datafield]}else{this._addfilterwidget(e,l,c);d[e.datafield]=e._filterwidget}}}}}b[0].appendChild(q);this._filterrowcache=d;if(a.jqx.browser.msie&&a.jqx.browser.version<8){b.css("z-index",r--)}b.width(parseFloat(f)+2);this.filterrow.addClass(m);this.filterrow.css("border-top-width","1px");this.filterrow.css("border-right-width","0px");if(g){this._updatefilterrowui(true)}},_addfilterwidget:function(C,d,A){var G=this.that;var z="";for(var E=0;E<G.dataview.filters.length;E++){var x=G.dataview.filters[E];if(x.datafield&&x.datafield==C.datafield){z=x.filter.getfilters()[0].value;break}}var g=function(H,I){var f=a('<input autocomplete="off" type="textarea"/>');f[0].id=a.jqx.utilities.createId();f.addClass(H.toThemeProperty("jqx-widget"));f.addClass(H.toThemeProperty("jqx-input"));f.addClass(H.toThemeProperty("jqx-rc-all"));f.addClass(H.toThemeProperty("jqx-widget-content"));if(H.rtl){f.css("direction","rtl")}if(H.disabled){f.attr("disabled",true)}f.attr("disabled",false);f.appendTo(I);f.width(A-10);f.height(H.filterrowheight-10);f.css("margin","4px");if(C.createfilterwidget){C.createfilterwidget(C,I,f)}C._filterwidget=f;f.focus(function(){H.content[0].scrollLeft=0;setTimeout(function(){H.content[0].scrollLeft=0},10);H.focusedfilter=f;f.addClass(H.toThemeProperty("jqx-fill-state-focus"));return false});f.blur(function(){f.removeClass(H.toThemeProperty("jqx-fill-state-focus"))});f.keydown(function(J){if(J.keyCode=="13"){H._applyfilterfromfilterrow()}if(f[0]._writeTimer){clearTimeout(f[0]._writeTimer)}f[0]._writeTimer=setTimeout(function(){if(!H._loading){if(!H["_oldWriteText"+f[0].id]){H["_oldWriteText"+f[0].id]=""}if(H["_oldWriteText"+f[0].id]!=f.val()){H._applyfilterfromfilterrow();H["_oldWriteText"+f[0].id]=f.val()}}},C.filterdelay);H.focusedfilter=f});H.host.removeClass("jqx-disableselect");H.content.removeClass("jqx-disableselect");f.val(z)};if(C.datatype!=null){if(C.filtertype=="number"){if(C.datatype=="string"||C.datatype=="date"||C.datatype=="bool"){C.filtertype="textbox"}}if(C.filtertype=="date"){if(C.datatype=="string"||C.datatype=="number"||C.datatype=="bool"){C.filtertype="textbox"}}if(C.filtertype=="bool"){if(C.datatype=="string"||C.datatype=="number"||C.datatype=="date"){C.filtertype="textbox"}}}switch(C.filtertype){case"number":case"input":var m=a("<div></div>");m.width(d.width());m.height(this.filterrowheight);d.append(m);var A=d.width()-20;var s=function(I,J,f){var H=a('<input style="float: left;" autocomplete="off" type="textarea"/>');if(G.rtl){H.css("float","right");H.css("direction","rtl")}H[0].id=a.jqx.utilities.createId();H.addClass(G.toThemeProperty("jqx-widget jqx-input jqx-rc-all jqx-widget-content"));H.appendTo(I);H.width(J-10);if(G.disabled){H.attr("disabled",true)}H.attr("disabled",false);H.height(G.filterrowheight-10);H.css("margin","4px");H.css("margin-right","2px");H.focus(function(){G.focusedfilter=H;H.addClass(G.toThemeProperty("jqx-fill-state-focus"))});H.blur(function(){H.removeClass(G.toThemeProperty("jqx-fill-state-focus"))});H.keydown(function(K){if(K.keyCode=="13"){G._applyfilterfromfilterrow()}if(H[0]._writeTimer){clearTimeout(H[0]._writeTimer)}H[0]._writeTimer=setTimeout(function(){if(!G._loading){if(G["_oldWriteText"+H[0].id]!=H.val()){G._applyfilterfromfilterrow();G["_oldWriteText"+H[0].id]=H.val()}}},C.filterdelay);G.focusedfilter=H});H.val(z);return H};s(m,A);var B=G._getfiltersbytype(C.filtertype=="number"?"number":"string");var t=a("<div class='filter' style='float: left;'></div>");t.css("margin-top","4px");t.appendTo(m);if(G.rtl){t.css("float","right")}var h=0;if(C.filtercondition!=null){var E=new a.jqx.filter();var r=E.getoperatorsbyfiltertype(C.filtertype=="number"?"numericfilter":"stringfilter");var e=r.indexOf(C.filtercondition.toUpperCase());if(e!=-1){h=e}}var D=170;if(C.filtertype=="input"){D=240;if(h==0){var e=B.indexOf("contains");if(e!=-1&&C.filtercondition==null){h=e}}}t.jqxDropDownList({disabled:G.disabled,touchMode:G.touchmode,rtl:G.rtl,dropDownHorizontalAlignment:"right",enableBrowserBoundsDetection:true,selectedIndex:h,width:18,height:21,dropDownHeight:150,dropDownWidth:D,source:B,theme:G.theme});t.jqxDropDownList({selectionRenderer:function(f){return""}});t.jqxDropDownList("setContent","");t.find(".jqx-dropdownlist-content").hide();if(C.createfilterwidget){C.createfilterwidget(C,d,m)}C._filterwidget=m;var j=null;this.addHandler(t,"select",function(){var f=t.jqxDropDownList("getSelectedItem").label;if(C._filterwidget.find("input").val().length>0&&!G.refreshingfilter){G._applyfilterfromfilterrow()}if(C.filtertype=="input"&&!G.refreshingfilter){G._applyfilterfromfilterrow()}else{if(C._filterwidget.find("input").val().length==0&&!G.refreshingfilter){if(j=="null"||j=="not null"||f=="null"||f=="not null"){G._applyfilterfromfilterrow()}}}j=f});break;case"textbox":case"default":default:g(this,d);break;case"none":break;case"date":case"range":if(this.host.jqxDateTimeInput){var b=a("<div></div>");b.css("margin","4px");b.appendTo(d);var n={calendar:this.gridlocalization,todayString:this.gridlocalization.todaystring,clearString:this.gridlocalization.clearstring};b.jqxDateTimeInput({readonly:true,disabled:G.disabled,localization:n,rtl:G.rtl,showFooter:true,formatString:C.cellsformat,selectionMode:C.filtertype,value:null,theme:this.theme,width:A-10,height:this.filterrowheight-10});if(C.createfilterwidget){C.createfilterwidget(C,d,b)}C._filterwidget=b;this.addHandler(b,"valueChanged",function(f){if(!G.refreshingfilter){G._applyfilterfromfilterrow();G.focusedfilter=null}})}else{g(this,d)}break;case"list":case"checkedlist":if(this.host.jqxDropDownList){var q=this._getfilterdataadapter(C);var l=false;var t=a("<div></div>");t.css("margin","4px");var u=C.datafield;var v=C.filtertype=="checkedlist"?true:false;var D=A<150?220:"auto";q.dataBind();var p=q.records;var k=p.length<8?true:false;l=k;t.appendTo(d);t.jqxDropDownList({disabled:G.disabled,touchMode:G.touchmode,rtl:G.rtl,checkboxes:v,dropDownWidth:D,source:q.records,autoDropDownHeight:k,theme:this.theme,width:A-10,height:this.filterrowheight-10,displayMember:C.displayfield,valueMember:u});if(C.createfilterwidget){C.createfilterwidget(C,d,t)}var c=t.jqxDropDownList("listBox");if(v){t.jqxDropDownList({selectionRenderer:function(){var f='<span class="'+G.toThemeProperty("jqx-item")+'" style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+G.gridlocalization.filterselectstring+"</span>";return f}});var y=a('<span style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+G.gridlocalization.filterselectstring+"</span>");y.addClass(this.toThemeProperty("jqx-item"));if(c!=undefined){if(!l){c.host.height(200)}c.insertAt(G.gridlocalization.filterselectallstring,0);t.jqxDropDownList("setContent",y);var i=true;var F=new Array();c.checkAll(false);G.addHandler(c.host,"checkChange",function(I){t[0]._selectionChanged=true;if(!i){return}if(I.args.label!=G.gridlocalization.filterselectallstring){i=false;c.host.jqxListBox("checkIndex",0,true,false);var f=c.host.jqxListBox("getCheckedItems");var H=c.host.jqxListBox("getItems");if(f.length==1){c.host.jqxListBox("uncheckIndex",0,true,false)}else{if(H.length!=f.length){c.host.jqxListBox("indeterminateIndex",0,true,false)}}i=true}else{i=false;if(I.args.checked){c.host.jqxListBox("checkAll",false)}else{c.host.jqxListBox("uncheckAll",false)}i=true}})}}else{c.insertAt({label:this.gridlocalization.filterchoosestring,value:""},0);t.jqxDropDownList({selectedIndex:0})}C._filterwidget=t;var o=t.jqxDropDownList("dropdownlistWrapper");if(C.filtertype=="list"){this.addHandler(t,"select",function(f){if(!G.refreshingfilter){if(f.args&&f.args.type!="none"){G._applyfilterfromfilterrow();G.focusedfilter=null}}})}else{this.addHandler(t,"close",function(f){if(t[0]._selectionChanged){G._applyfilterfromfilterrow();G.focusedfilter=null;t[0]._selectionChanged=false}})}}else{g(this,d)}break;case"bool":case"boolean":if(this.host.jqxCheckBox){var w=a('<div tabIndex=0 style="opacity: 0.99; position: absolute; top: 50%; left: 50%; margin-top: -7px; margin-left: -10px;"></div>');w.appendTo(d);w.jqxCheckBox({disabled:G.disabled,enableContainerClick:false,animationShowDelay:0,animationHideDelay:0,hasThreeStates:true,theme:this.theme,checked:null});if(C.createfilterwidget){C.createfilterwidget(C,d,w)}if(z===true||z=="true"){w.jqxCheckBox({checked:true})}else{if(z===false||z=="false"){w.jqxCheckBox({checked:false})}}C._filterwidget=w;this.addHandler(w,"change",function(f){if(!G.refreshingfilter){if(f.args){G.focusedfilter=null;G._applyfilterfromfilterrow()}}})}else{g(this,d)}break}},_getfilterdataadapter:function(b){var c=this.source._source?true:false;if(!c){dataadapter=new a.jqx.dataAdapter(this.source,{autoBind:false,uniqueDataFields:[b.displayfield],autoSort:true,autoSortField:b.displayfield,async:false})}else{var e={localdata:this.source.records,datatype:this.source.datatype,async:false};var d=this;dataadapter=new a.jqx.dataAdapter(e,{autoBind:false,autoSort:true,autoSortField:b.displayfield,async:false,uniqueDataFields:[b.displayfield],beforeLoadComplete:function(f){var k=new Array();if(b.cellsformat){var j=d._getcolumntypebydatafield(b);for(var g=0;g<f.length;g++){k.push(f[g]);var h=f[g][b.displayfield];f[g][b.displayfield+"JQValue"]=h;if(j==="date"){f[g][b.displayfield]=dataadapter.formatDate(h,b.cellsformat,d.gridlocalization)}else{if(j==="number"||j==="float"||j==="int"){f[g][b.displayfield]=dataadapter.formatNumber(h,b.cellsformat,d.gridlocalization)}}}return k}else{return f}}})}if(b.filteritems&&b.filteritems.length>0){var e={localdata:b.filteritems,datatype:this.source.datatype,async:false};dataadapter=new a.jqx.dataAdapter(e,{autoBind:false,async:false})}else{if(b.filteritems){if(b.filteritems._source){b.filteritems._options.autoBind=false;b.filteritems._options.async=false;return b.filteritems}else{if(a.isFunction(b.filteritems)){return b.filteritems()}}}}return dataadapter},refreshfilterrow:function(){if(!this.showfilterrow){return}this.refreshingfilter=true;this._updatefilterrowui();this._updatelistfilters(true,true);var h=this.that;var l=this.columns.records.length;for(var d=0;d<l;d++){var c=this.columns.records[d];if(c.filterable){if(c.filter){var b=c.filter.getfilters();if(b.length>0){var k=b[0].value;var e=c._filterwidget;var f=c._filterwidget.parent();if(e!=null){switch(c.filtertype){case"number":f.find("input").val(k);if(this.host.jqxDropDownList){var i=c.filter.getoperatorsbyfiltertype("numericfilter");e.find(".filter").jqxDropDownList("selectIndex",i.indexOf(b[0].condition))}break;case"input":f.find("input").val(k);if(this.host.jqxDropDownList){var i=c.filter.getoperatorsbyfiltertype("stringfilter");e.find(".filter").jqxDropDownList("selectIndex",i.indexOf(b[0].condition))}break;case"date":case"range":if(this.host.jqxDateTimeInput){var k=c.filter.getfilterat(0).filtervalue;if(k!=undefined){if(c.filter.getfilterat(1)){var g=c.filter.getfilterat(1).filtervalue}else{g=k}if(c.filtertype=="range"){a(f.children()[0]).jqxDateTimeInput("setRange",new Date(k),new Date(g))}else{a(f.children()[0]).jqxDateTimeInput("setDate",new Date(k))}}}else{e.val(k)}break;case"textbox":case"default":e.val(k);h["_oldWriteText"+e[0].id]=k;break;case"bool":case"boolean":if(!this.host.jqxCheckBox){e.val(k)}else{a(f.children()[0]).jqxCheckBox({checked:k})}break}}}}}}this.refreshingfilter=false},_destroyedfilters:function(){var g=this.that;var b=this.columns.records.length;for(var f=0;f<b;f++){var c=this.columns.records[f];if(c.filterable){var h=c._filterwidget;if(c.filtertype=="list"||c.filtertype=="checkedlist"){this.removeHandler(h,"select");this.removeHandler(h,"close");h.jqxDropDownList("destroy")}else{if(c.filtertype=="date"){this.removeHandler(h,"valueChanged");h.jqxDateTimeInput("destroy")}else{if(c.filtertype=="bool"){this.removeHandler(h,"change");h.jqxCheckBox("destroy")}else{if(c.filtertype=="number"){var d=h.find(".jqx-input");this.removeHandler(d,"keydown");var e=a(h.children()[1]);e.jqxDropDownList("destroy")}else{this.removeHandler(h,"keydown")}}}}h.remove()}}},_updatelistfilters:function(l,k){var v=this.that;var t=this.columns.records.length;for(var p=0;p<t;p++){var q=this.columns.records[p];if(q.filterable){if(q.filtertype=="list"||q.filtertype=="checkedlist"){var h=q._filterwidget;if(!l){if(q.filter==undefined){h.jqxDropDownList("renderSelection");continue}}else{var e=this._getfilterdataadapter(q);h.jqxDropDownList({source:e});var d=h.jqxDropDownList("getItems");var o=true;if(d.length!=e.records.length+1){o=false}if(o){for(var s=1;s<d.length;s++){if(d[s].label!=e.records[s-1][q.displayfield]){o=false;break}}}if(o&&!k){continue}}var m=q.filtertype=="checkedlist"?true:false;var d=h.jqxDropDownList("getItems");var b=h.jqxDropDownList("listBox");h.jqxDropDownList("dataBind");if(m){h.jqxDropDownList({selectionRenderer:function(){return v.gridlocalization.filterselectstring}});b.insertAt(this.gridlocalization.filterselectallstring,0);var n=a('<span style="top: 2px; position: relative; color: inherit; border: none; background-color: transparent;">'+this.gridlocalization.filterselectstring+"</span>");n.addClass(this.toThemeProperty("jqx-item"));h.jqxDropDownList("setContent",n);b.checkAll(false);if(q.filter){var g=q.filter.getfilters();for(var s=0;s<b.items.length;s++){var f=b.items[s].label;var r=undefined;a.each(g,function(){var i;if(this.condition=="NOT_EQUAL"){if(f==this.value){i=false}else{i=true}}else{if(this.condition=="EQUAL"){if(f==this.value){i=true}else{i=false}}}if(r==undefined&&i!==undefined){r=i}else{if(this.condition=="EQUAL"){r=r||i}else{r=r&&i}}});if(r){b.checkIndex(s,false,false)}else{b.uncheckIndex(s,false,false)}}b._updateCheckedItems();var u=b.getCheckedItems().length;if(b.items.length!=u&&u>0){b.host.jqxListBox("indeterminateIndex",0,true,false)}}}else{b.insertAt({label:this.gridlocalization.filterchoosestring,value:""},0);h.jqxDropDownList({selectedIndex:0});if(q.filter){var g=q.filter.getfilters();var c=-1;for(var s=0;s<b.items.length;s++){var f=b.items[s].label;a.each(g,function(){if(this.condition=="NOT_EQUAL"){return true}if(f==this.value){c=s;return false}})}if(c!=-1){b.selectIndex(c)}}}if(d.length<8){h.jqxDropDownList("autoDropDownHeight",true)}else{h.jqxDropDownList("autoDropDownHeight",false)}}}}},_renderfiltercolumn:function(){var b=this.that;if(this.filterable){if(!this.columns.records){return}a.each(this.columns.records,function(d,e){var c=false;if(b.autoshowfiltericon){if(this.filter){a(this.filtericon).show();c=true}else{a(this.filtericon).hide()}}else{if(this.filterable){a(this.filtericon).show();c=true}}if(this.align=="right"&&!this.renderer){if(this.element){if(!c){this.element.firstChild.firstChild.style.marginRight="2px"}else{this.element.firstChild.firstChild.style.marginRight="18px"}}}})}},_initcolumntypes:function(){if(this.columns&&this.columns.records){var b=this.source._source.datafields;if(b){for(var c=0;c<this.columns.records.length;c++){var d=this.columns.records[c];if(d.datatype){continue}var e="";a.each(b,function(){if(this.name==d.displayfield){if(this.type){e=this.type}return false}});if(e!=""){d.datatype=e}else{d.datatype=""}}}}},_getcolumntypebydatafield:function(f){var g=this.that;var e="string";var d=g.source.datafields||((g.source._source)?g.source._source.datafields:null);if(d){var i="";a.each(d,function(){if(this.name==f.displayfield){if(this.type){i=this.type}return false}});if(i){return i}}if(f!=null){if(this.dataview.cachedrecords==undefined){return e}var b=null;if(!this.virtualmode){if(this.dataview.cachedrecords.length==0){return e}b=this.dataview.cachedrecords[0][f.displayfield];if(b!=null&&b.toString()==""){return"string"}}else{a.each(this.dataview.cachedrecords,function(){b=this[f.displayfield];return false})}if(b!=null){if(typeof b=="boolean"){e="boolean"}else{if(a.jqx.dataFormat.isNumber(b)){e="number"}else{var h=new Date(b);if(h.toString()=="NaN"||h.toString()=="Invalid Date"){if(a.jqx.dataFormat){h=a.jqx.dataFormat.tryparsedate(b);if(h!=null){if(h&&h.getFullYear()){if(h.getFullYear()==1970&&h.getMonth()==0&&h.getDate()==1){var c=new Number(b);if(!isNaN(c)){return"number"}return"string"}}return"date"}else{e="string"}}else{e="string"}}else{e="date"}}}}}return e},_getfiltersbytype:function(b){var c=this.that;var d="";switch(b){case"number":case"float":case"int":d=c.gridlocalization.filternumericcomparisonoperators;break;case"date":d=c.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":d=c.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:d=c.gridlocalization.filterstringcomparisonoperators;break}return d},_getfiltertype:function(b){var c="stringfilter";switch(b){case"number":case"int":case"float":case"decimal":c="numericfilter";break;case"boolean":case"bool":c="booleanfilter";break;case"date":case"time":case"range":c="datefilter";break;case"string":case"input":c="stringfilter";break}return c},_buildfilter:function(r,l,F){var f=a(l).find(".filter1");var G=a(l).find(".filter2");var K=a(l).find(".filter3");var k=a(l).find(".filtertext1"+r.element.id);var j=a(l).find(".filtertext2"+r.element.id);var A=k.val();var z=j.val();var M=r._getcolumntypebydatafield(F);var t=r._getfiltersbytype(M);var J=new a.jqx.filter();var w=r._getfiltertype(M);if(r.filtermode==="default"&&(F.filtertype!=="list"&&F.filtertype!=="checkedlist")){var E=f.jqxDropDownList("selectedIndex");var c=G.jqxDropDownList("selectedIndex");var D=K.jqxDropDownList("selectedIndex");var e=null;var d=null;if(r.updatefilterconditions){var p=r.updatefilterconditions(w,J.getoperatorsbyfiltertype(w));if(p!=undefined){J.setoperatorsbyfiltertype(w,p)}}var q=false;var L=J.getoperatorsbyfiltertype(w)[E];var K=J.getoperatorsbyfiltertype(w)[D];var v=L=="NULL"||L=="NOT_NULL";var h=L=="EMPTY"||L=="NOT_EMPTY";if(L==undefined){L=J.getoperatorsbyfiltertype(w)[0]}if(K==undefined){K=J.getoperatorsbyfiltertype(w)[0]}if(A.length>0||v||h){e=J.createfilter(w,A,L,null,F.cellsformat,r.gridlocalization);J.addfilter(c,e);q=true}var u=K=="NULL"||K=="NOT_NULL";var g=K=="EMPTY"||K=="NOT_EMPTY";if(z.length>0||u||g){d=J.createfilter(w,z,K,null,F.cellsformat,r.gridlocalization);J.addfilter(c,d);q=true}if(q){var C=F.displayfield;this.addfilter(C,J,true)}else{this._clearfilter(r,l,F)}}else{if(r.filtermode==="excel"||(F.filtertype==="list"||F.filtertype==="checkedlist")){var B=this;var n=false;var x=f.data().jqxListBox.instance;var I=this.filtermode==="excel"||F.filtertype==="checkedlist";var o=x.getCheckedItems();if(!I){var o=x.getSelectedItems()}if(o.length==0){for(var H=1;H<x.items.length;H++){var m=x.items[H].value;var b="not_equal";if(m.indexOf("|")>=0||m.indexOf(" AND ")>=0||m.indexOf(" OR ")>=0||m.indexOf(" and ")>=0||m.indexOf(" or ")>=0){m=m.replace("|","");m=m.replace("AND","");m=m.replace("OR","");m=m.replace("and","");m=m.replace("or","");var b="equal"}var y=J.createfilter(w,m,b,null);J.addfilter(0,y)}n=true}else{if(o.length!=x.items.length){n=true;for(var H=0;H<o.length;H++){if(r.gridlocalization.filterselectallstring===o[H].value){continue}var m=o[H].value;var b="equal";var y=J.createfilter(w,m,b,null);var s=1;J.addfilter(s,y)}}else{n=false}}if(n){var C=F.displayfield;this.addfilter(C,J,true)}else{var C=F.displayfield;this.removefilter(C,true)}}}},_clearfilter:function(e,c,d){var b=d.displayfield;this.removefilter(b,true)},addfilter:function(d,e,c){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}var f=this.getcolumn(d);var b=this._getcolumn(d);if(f==undefined||f==null){return}f.filter=e;b.filter=e;this.dataview.addfilter(d,e);if(c==true&&c!=undefined){this.applyfilters("add")}},removefilter:function(d,c){if(this._loading){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}var e=this.getcolumn(d);var b=this._getcolumn(d);if(e==undefined||e==null){return}if(e.filter==null){return}this.dataview.removefilter(d,e.filter);e.filter=null;b.filter=null;if(this.showfilterrow){this.clearfilterrow(d)}if(c==true||c!==false){this.applyfilters("remove")}},applyfilters:function(f){var c=false;if(this.dataview.filters.length>=0&&(this.virtualmode||!this.source.localdata)){if(this.source!=null&&this.source.filter){var g=-1;if(this.pageable){g=this.dataview.pagenum;this.dataview.pagenum=0}else{this.vScrollInstance.setPosition(0);this.loadondemand=true;this._renderrows(this.virtualsizeinfo)}if(this.pageable&&this.virtualmode){this.dataview.pagenum=0}this.source.filter(this.dataview.filters,this.dataview.records,this.dataview.records.length);if(this.pageable&&!this.virtualmode){this.dataview.pagenum=g}}}if(this.dataview.clearsortdata){this.dataview.clearsortdata()}if(!this.virtualmode){var b=this.selectedrowindexes;var d=this.that;this.dataview.refresh();if(this.dataview.clearsortdata){if(this.sortcolumn&&this.sortdirection){var e=this.sortdirection.ascending?"asc":"desc";if(!this._loading){this.sortby(this.sortcolumn,e,null,false)}else{this.sortby(this.sortcolumn,e,null,false,false)}}}}else{if(this.pageable){this.dataview.updateview();if(this.gotopage){this.gotopage(0)}}this.rendergridcontent(false,false);if(this.showfilterrow){if(typeof f!="string"&&a.isEmptyObject(f)){this.refreshfilterrow()}}this._raiseEvent(13,{filters:this.dataview.filters});return}if(this.pageable){this.dataview.updateview();if(this.gotopage){this.gotopage(0);this.updatepagerdetails()}}this._updaterowsproperties();if(!this.groupable||(this.groupable&&this.groups.length==0)){this._rowdetailscache=new Array();this.virtualsizeinfo=null;this._pagescache=new Array();if(this.columns&&this.columns.records&&this.columns.records.length>0&&!this.columns.records[0].filtericon){this.prerenderrequired=true}this.rendergridcontent(true,false);this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);if(this.showaggregates&&this._updatecolumnsaggregates){this._updatecolumnsaggregates()}}else{this._rowdetailscache=new Array();this._render(true,true,false,false,false);if(this.showfilterrow){this._updatefocusedfilter()}this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}if(this.showfilterrow){if(typeof f!="string"&&a.isEmptyObject(f)){this.refreshfilterrow()}}this._raiseEvent(13,{filters:this.dataview.filters})},getfilterinformation:function(){var d=new Array();for(var b=0;b<this.dataview.filters.length;b++){var c=this.getcolumn(this.dataview.filters[b].datafield);d[b]={filter:this.dataview.filters[b].filter,datafield:c.datafield,displayfield:c.displayfield,filtercolumn:c.datafield,filtercolumntext:c.text}}return d},clearfilters:function(b){var d=this.that;if(this.showfilterrow){this.clearfilterrow()}if(this.columns.records){var c=b==true||b!==false;a.each(this.columns.records,function(){d.removefilter(this.displayfield,!c)})}if(b===false){return}if(b==true||b!==false){this.applyfilters("clear")}},_destroyfilterpanel:function(){var e=a(a.find("#filterclearbutton"+this.element.id));var d=a(a.find("#filterbutton"+this.element.id));var h=a(a.find(".filter1"));var c=a(a.find(".filter2"));var g=a(a.find(".filter3"));var f=a(a.find(".filtertext1"+this.element.id));var b=a(a.find(".filtertext2"+this.element.id));if(f.length>0&&b.length>0){f.removeClass();b.removeClass();f.remove();b.remove()}if(e.length>0){e.jqxButton("destroy");d.jqxButton("destroy");this.removeHandler(e,"click");this.removeHandler(d,"click")}if(h.length>0){h.jqxDropDownList("destroy")}if(c.length>0){c.jqxDropDownList("destroy")}if(g.length>0){g.jqxDropDownList("destroy")}},_updatefilterpanel:function(s,p,E){if(s==null||s==undefined){s=this}var Q=s._getcolumntypebydatafield(E);var u=s._getfiltersbytype(Q);if(!s.host.jqxDropDownList){throw new Error("jqxGrid: Missing reference to jqxdropdownlist.js.");return}s.filterpanel.detach();s.excelfilterpanel.detach();if(E.filterpanel){E.filterpanel.detach()}a(p).children().detach();var k=a(s.menuitemsarray[6]);a(k).css("height","175px");if(E.createfilterpanel&&!E.filterpanel){var K=a("<div class='filter' style='margin-left: 7px;'></div>");a(p).append(K);E.createfilterpanel(E.displayfield,K);E.filterpanel=K}if(E.filtertype==="list"||E.filtertype==="checkedlist"){a(p).append(s.excelfilterpanel)}else{if(E.filtertype!=="custom"){a(p).append(s.filterpanel)}else{if(E.filterpanel){a(p).append(E.filterpanel)}}}var g=a(p);var N=g.find("#filterclearbutton"+s.element.id);var l=g.find("#filterbutton"+s.element.id);var f=g.find(".filter1");var m=g.find(".filter2");var P=g.find(".filter3");var j=g.find(".filtertext1"+s.element.id);var h=g.find(".filtertext2"+s.element.id);if(this._hasdatefilter&&(E.filtertype!=="list"&&E.filtertype!=="checkedlist"&&E.filtertype!=="custom")){var e=j.parent();var d=h.parent();e.children().remove();d.children().remove();if(E.filtertype=="date"){s._showwhere.text(s.gridlocalization.filtershowrowdatestring);var b=a("<div class='filtertext1"+s.element.id+"' style='margin-top: 3px; margin-bottom: 3px;'></div>");e.append(b);var n=function(c){var i={calendar:s.gridlocalization,todayString:s.gridlocalization.todaystring,clearString:s.gridlocalization.clearstring};c.jqxDateTimeInput({disabled:s.disabled,localization:i,rtl:s.rtl,width:s._filterpanelwidth-15,height:20,value:null,formatString:E.cellsformat,theme:s.theme})};n(b);var b=a("<div class='filtertext2"+s.element.id+"' style='margin-top: 3px; margin-bottom: 3px;'></div>");d.append(b);n(b)}else{s._showwhere.text(s.gridlocalization.filtershowrowstring);var b=a("<input class='filtertext1"+s.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input>");e.append(b);var n=function(c){c.addClass(s.toThemeProperty("jqx-input"));c.addClass(s.toThemeProperty("jqx-widget-content"));c.addClass(s.toThemeProperty("jqx-rc-all"));c.width(s._filterpanelwidth-15)};n(b);var b=a("<input class='filtertext2"+s.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input>");d.append(b);n(b)}var j=g.find(".filtertext1"+s.element.id);var h=g.find(".filtertext2"+s.element.id)}if(E.filtertype!="date"){j.val("");h.val("")}else{j.val(null);h.val(null)}this.removeHandler(l,"click");this.addHandler(l,"click",function(){s._buildfilter(s,p,E);s._closemenu()});this.removeHandler(N,"click");this.addHandler(N,"click",function(){s._clearfilter(s,p,E);s._closemenu()});this.removeHandler(l,"keydown");this.addHandler(l,"keydown",function(c){if(c.keyCode===13){s._buildfilter(s,p,E);s._closemenu()}});this.removeHandler(N,"keydown");this.addHandler(N,"keydown",function(c){if(c.keyCode===13){s._clearfilter(s,p,E);s._closemenu()}});this.removeHandler(j,"keydown");this.addHandler(j,"keydown",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});this.removeHandler(h,"keydown");this.addHandler(h,"keydown",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});if(this.filtermode==="default"&&(E.filtertype!=="list"&&E.filtertype!=="checkedlist"&&E.filtertype!=="custom")){if(f.jqxDropDownList("source")!=u){f.jqxDropDownList({enableBrowserBoundsDetection:false,source:u});P.jqxDropDownList({enableBrowserBoundsDetection:false,source:u})}if(Q=="boolean"||Q=="bool"){f.jqxDropDownList({autoDropDownHeight:true,selectedIndex:0});P.jqxDropDownList({autoDropDownHeight:true,selectedIndex:0})}else{var H=false;if(u&&u.length){if(u.length<5){H=true}}f.jqxDropDownList({autoDropDownHeight:H,selectedIndex:2});P.jqxDropDownList({autoDropDownHeight:H,selectedIndex:2})}m.jqxDropDownList({selectedIndex:0});var z=E.filter;var M=new a.jqx.filter();var x="";switch(Q){case"number":case"int":case"float":case"decimal":x="numericfilter";o=M.getoperatorsbyfiltertype("numericfilter");break;case"boolean":case"bool":x="booleanfilter";o=M.getoperatorsbyfiltertype("booleanfilter");break;case"date":case"time":x="datefilter";o=M.getoperatorsbyfiltertype("datefilter");break;case"string":x="stringfilter";o=M.getoperatorsbyfiltertype("stringfilter");break}if(z!=null){var e=z.getfilterat(0);var d=z.getfilterat(1);var I=z.getoperatorat(0);if(s.updatefilterconditions){var o=[];var r=s.updatefilterconditions(x,o);if(r!=undefined){for(var O=0;O<r.length;O++){r[O]=r[O].toUpperCase()}z.setoperatorsbyfiltertype(x,r);o=r}}var w="default";if(e!=null){var D=o.indexOf(e.comparisonoperator);var A=e.filtervalue;j.val(A);f.jqxDropDownList({selectedIndex:D,animationType:w})}if(d!=null){var C=o.indexOf(d.comparisonoperator);var y=d.filtervalue;h.val(y);P.jqxDropDownList({selectedIndex:C,animationType:w})}if(z.getoperatorat(0)==undefined){m.jqxDropDownList({selectedIndex:0,animationType:w})}else{if(z.getoperatorat(0)=="and"||z.getoperatorat(0)==0){m.jqxDropDownList({selectedIndex:0})}else{m.jqxDropDownList({selectedIndex:1})}}}if(s.updatefilterpanel){s.updatefilterpanel(f,P,m,j,h,l,N,z,x,o)}if(!this._hasdatefilter||(this._hasdatefilter&&E.filtertype!="date")){j.focus();setTimeout(function(){j.focus()},10)}}else{if(this.filtermode==="excel"||E.filtertype==="list"||E.filtertype==="checkedlist"){var v=s._getfilterdataadapter(E);var x=s._getfiltertype(Q);var L=this.filtermode==="excel"||E.filtertype==="checkedlist";f.jqxListBox("focus");this.removeHandler(f,"keyup");this.addHandler(f,"keyup",function(c){if(c.keyCode===13){l.trigger("click")}if(c.keyCode===27){s._closemenu()}});if(E.cellsformat){f.jqxListBox({checkboxes:L,displayMember:E.displayfield,valueMember:E.displayfield+"JQValue",source:v})}else{f.jqxListBox({checkboxes:L,displayMember:E.displayfield,valueMember:E.displayfield,source:v})}if(L){f.jqxListBox("insertAt",s.gridlocalization.filterselectallstring,0);var F=f.data().jqxListBox.instance;F.checkAll(false);var B=this;if(E.filter){F.uncheckAll(false);var t=E.filter.getfilters();for(var J=0;J<F.items.length;J++){var G=F.items[J].value;a.each(t,function(){if(this.condition=="NOT_EQUAL"){if(G!=this.value){F.uncheckIndex(J,false,false);return false}}else{if(this.condition=="EQUAL"){if(G==this.value){F.checkIndex(J,false,false);return false}}}})}F._updateCheckedItems();var q=F.getCheckedItems().length;if(F.items.length!=q&&q>0){F.host.jqxListBox("indeterminateIndex",0,true,false)}if(q===F.items.length-1){F.host.jqxListBox("checkIndex",0,true,false)}}}else{if(E.filter){var F=f.data().jqxListBox.instance;F.clearSelection();var t=E.filter.getfilters();for(var J=0;J<F.items.length;J++){var G=F.items[J].value;a.each(t,function(){if(this.condition=="NOT_EQUAL"){if(G!=this.value){F.unselectIndex(J,false,false);return false}}else{if(this.condition=="EQUAL"){if(G==this.value){F.selectIndex(J,true,false);return false}}}})}F._renderItems()}}}}},_initfilterpanel:function(z,b,c,p,w){if(z==null||z==undefined){z=this}b[0].innerHTML="";var t=a("<div class='filter' style='margin-left: 7px;'></div>");b.append(t);var n=a("<div class='filter' style='margin-top: 3px; margin-bottom: 3px;'></div>");n.text(z.gridlocalization.filtershowrowstring);this._showwhere=n;var o=w?"ex":"";var v=a("<div class='filter filter1' id='filter1"+z.element.id+o+"'></div>");var h=a("<div class='filter filter2' id='filter2"+z.element.id+o+"' style='margin-bottom: 3px;'></div>");var s=a("<div class='filter filter3' id='filter3"+z.element.id+o+"'></div>");var e=z._getcolumntypebydatafield(c);if(!v.jqxDropDownList){throw new Error("jqxGrid: jqxdropdownlist.js is not loaded.");return}var q=z._getfiltersbytype(e);this._hasdatefilter=false;this._filterpanelwidth=p;if(this.columns&&this.columns.records){for(var u=0;u<this.columns.records.length;u++){if(this.columns.records[u].filtertype=="date"){this._hasdatefilter=true;break}}}var k=a("<div class='filter'><input class='filtertext1"+z.element.id+"' style='height: 20px; margin-top: 3px; margin-bottom: 3px;' type='text'></input></div>");var m=k.find("input");m.addClass(this.toThemeProperty("jqx-input"));m.addClass(this.toThemeProperty("jqx-widget-content"));m.addClass(this.toThemeProperty("jqx-rc-all"));m.width(p-15);var l=a("<div class='filter'><input class='filtertext2"+z.element.id+"' style='height: 20px; margin-top: 3px;' type='text'></input></div>");var j=l.find("input");j.addClass(this.toThemeProperty("jqx-input"));j.addClass(this.toThemeProperty("jqx-widget-content"));j.addClass(this.toThemeProperty("jqx-rc-all"));j.width(p-15);if(z.rtl){m.css("direction","rtl");j.css("direction","rtl")}var g=a("<div class='filter' style='height: 25px; margin-left: 20px; margin-top: 7px;'></div>");var f=a('<span tabIndex=0 id="filterbutton'+z.element.id+'" class="filterbutton" style="padding: 4px 12px; margin-left: 2px;">'+z.gridlocalization.filterstring+"</span>");g.append(f);var x=a('<span tabIndex=0 id="filterclearbutton'+z.element.id+'" class="filterclearbutton" style="padding: 4px 12px; margin-left: 5px;">'+z.gridlocalization.filterclearstring+"</span>");g.append(x);f.jqxButton({height:20,theme:z.theme});x.jqxButton({height:20,theme:z.theme});var y=function(A){if(A){if(A.text().indexOf("case sensitive")!=-1){var i=A.text();i=i.replace("case sensitive","match case");A.text(i)}A.css("font-family",z.host.css("font-family"));A.css("font-size",z.host.css("font-size"));A.css("top","1px");A.css("position","relative");return A}return""};if(this.filtermode==="default"&&!w){t.append(n);t.append(v);v.jqxDropDownList({_checkForHiddenParent:false,rtl:z.rtl,enableBrowserBoundsDetection:false,selectedIndex:2,width:p-15,height:20,dropDownHeight:150,dropDownWidth:p-15,selectionRenderer:y,source:q,theme:z.theme});t.append(k);var r=new Array();r[0]=z.gridlocalization.filterandconditionstring;r[1]=z.gridlocalization.filterorconditionstring;h.jqxDropDownList({_checkForHiddenParent:false,rtl:z.rtl,enableBrowserBoundsDetection:false,autoDropDownHeight:true,selectedIndex:0,width:60,height:20,source:r,selectionRenderer:y,theme:z.theme});t.append(h);s.jqxDropDownList({_checkForHiddenParent:false,rtl:z.rtl,enableBrowserBoundsDetection:false,selectedIndex:2,width:p-15,height:20,dropDownHeight:150,dropDownWidth:p-15,selectionRenderer:y,source:q,theme:z.theme});t.append(s);t.append(l)}else{if(this.filtermode==="excel"||w){t.append(n);t.append(v);v.attr("tabindex",0);v.jqxListBox({rtl:z.rtl,_checkForHiddenParent:false,checkboxes:true,selectedIndex:2,width:p-15,height:120,theme:z.theme});var d=true;z.addHandler(v,"checkChange",function(B){if(!d){return}if(B.args.label!=z.gridlocalization.filterselectallstring){d=false;v.jqxListBox("checkIndex",0,true,false);var i=v.jqxListBox("getCheckedItems");var A=v.jqxListBox("getItems");if(i.length==1){v.jqxListBox("uncheckIndex",0,true,false)}else{if(A.length!=i.length){v.jqxListBox("indeterminateIndex",0,true,false)}}d=true}else{d=false;if(B.args.checked){v.jqxListBox("checkAll",false)}else{v.jqxListBox("uncheckAll",false)}d=true}})}}t.append(g);if(z.updatefilterpanel){z.updatefilterpanel(v,s,h,k,l,f,x,null,null,q)}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.dataview.grouping=function(){this.loadgrouprecords=function(E,H,s,F,I,f,R,G,x){var M=E;var j=this;var Q=new Array();for(var n=0;n<j.groups.length;n++){Q[n]=j.generatekey()}var K=new Array();var b=0;var Q=Q;var B=new Array();var P=H;var e=H;var C=j.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 O=this.sortdata!=null;var S=O?this.sortdata:this.records;if(this.pageable){var A=Object.prototype.toString;var l=this.groups[0];Object.prototype.toString=(typeof l=="function")?l:function(){return this[l]};if(O){var c=this.sortfield;Object.prototype.toString=(typeof l=="function")?l:function(){return this[l]+" "+this[c]}}var u=new Array();var D=0;if(!S[H]){a.each(S,function(i,q){u[H+i++]=this});S=u}if(!O){if(S.sort){S.sort(function(q,i){if(q===undefined){q=null}if(i===undefined){i=null}if(q===null&&i===null){return 0}if(q===null&&i!==null){return 1}if(q!==null&&i===null){return -1}q=q.toString();i=i.toString();if(a.jqx.dataFormat.isNumber(q)&&a.jqx.dataFormat.isNumber(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(a.jqx.dataFormat.isDate(q)&&a.jqx.dataFormat.isDate(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(q)&&!a.jqx.dataFormat.isNumber(i)){q=String(q).toLowerCase();i=String(i).toLowerCase()}}}try{if(q<i){return -1}if(q>i){return 1}}catch(T){var U=T}return 0})}}else{S.sort(function(q,i){var q=q.value;var i=i.value;if(q===undefined){q=null}if(i===undefined){i=null}if(q===null&&i===null){return 0}if(q===null&&i!==null){return 1}if(q!==null&&i===null){return -1}if(a.jqx.dataFormat.isNumber(q)&&a.jqx.dataFormat.isNumber(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(a.jqx.dataFormat.isDate(q)&&a.jqx.dataFormat.isDate(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(q)&&!a.jqx.dataFormat.isNumber(i)){q=String(q).toLowerCase();i=String(i).toLowerCase()}}}try{if(q<i){return -1}if(q>i){return 1}}catch(T){var U=T}return 0})}Object.prototype.toString=A}if(this.virtualmode){var u=new Array();var D=0;for(var P=0;P<s-H;P++){if(S[P]){u[H+D++]=S[P]}else{if(S[H+D]){u[H+D]=S[H+D];D++}}}P=0;S=u}for(var d=H;d<s;d++){var y={};if(!O){y=a.extend({},S[d])}else{y=a.extend({},S[d].value)}id=y[j.uniqueId];if(I>=G||id!=R[I][j.uniqueId]||(f&&f[id])){x[x.length]=I}var L=new Array();var w=0;for(var n=0;n<C;n++){var t=j.groups[n];var J=y[t];if(J==null){J=""}L[w++]={value:J,hash:Q[n]}}if(L.length!=C){break}var k=null;var m="";var g=-1;for(var N=0;N<L.length;N++){g++;var p=L[N].value;var v=L[N].hash;m=m+"_"+v+"_"+p;if(B[m]!=undefined&&B[m]!=null){k=B[m];continue}if(k==null){k={group:p,subItems:new Array(),subGroups:new Array(),level:0};K[b++]=k;k.uniqueid=j.generatekey();j.loadedgroupsByKey[p]=k}else{var o={group:p,subItems:new Array(),subGroups:new Array(),parentItem:k,level:k.level+1};j.loadedgroupsByKey[k.uniqueid+"_"+p]=o;o.uniqueid=j.generatekey();k.subGroups[k.subGroups.length++]=o;k=o}B[m]=k}if(k!=null){if(undefined==y.uid){y.uid=this.getid(this.source.id,y,P)}if(!O){y.boundindex=P;this.recordsbyid["id"+y.uid]=S[d]}else{y.boundindex=S[d].index;this.recordsbyid["id"+y.uid]=S[d].value}this.bounditems[y.boundindex]=y;this.sortedgroups[P]=y;y.uniqueid=j.generatekey();y.parentItem=k;y.level=k.level+1;k.subItems[k.subItems.length++]=y}else{if(undefined==y.uid){y.uid=this.getid(this.source.id,y,P)}if(!O){y.boundindex=P;this.recordsbyid["id"+y.uid]=S[d]}else{y.boundindex=S[d].index;this.recordsbyid["id"+y.uid]=S[d].value}this.sortedgroups[P]=y;this.bounditems[y.boundindex]=y;y.uniqueid=j.generatekey()}I++;P++;e++}var h=function(q,T,U){for(var i=0;i<T.subItems.length;i++){T.subItems[i].visibleindex=E+U;q.rows[U]=T.subItems[i];q.loadedrecords[U]=T.subItems[i];U++}return U};var r=function(i,U,V){var q=function(Y){if(i.aggregates==true){var W=Y;var X={};if(W!=null){X.level=W.level;X.visibleindex=E+V;X.uniqueid=i.generatekey();i.rows[V]=X;i.loadedrecords[V++]=X;X.totalsrow=true;if(Y.subItems.length>0){W=Y.subItems[Y.subItems.length-1];X.parentItem=W.parentItem;if(X.parentItem.subItems){X.parentItem.subItems[X.parentItem.subItems.length]=X}}else{if(Y.subGroups.length>0){W=Y.subGroups[Y.subGroups.length-1];X.level=W.level;X.parentItem=Y;Y.subGroups[Y.subGroups.length]=X}}}}};for(subGroup in U.subGroups){var T=U.subGroups[subGroup];if(T.subGroups){i.loadedgroups[i.loadedgroups.length]=T;T.visibleindex=E+V;i.rows[V]=T;i.loadedrecords[V]=T;V++;if(T.subGroups.length>0){V=r(i,T,V)}else{if(T.subItems.length>0){V=h(i,T,V)}}q(T)}}if(U.subItems.length>0){V=h(i,U,V)}q(U);return V};var z=K.length;this.loadedgroups=new Array();this.rows=new Array();var M=0;for(var P=0;P<z;P++){var t=K[P];this.loadedrootgroups[P]=t;this.loadedgroups[this.loadedgroups.length]=t;t.visibleindex=E+M;this.rows[M]=t;this.loadedrecords[M]=t;M++;M=r(this,t,M)}return M};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(),subGroups:new Array(),level:0};o[k++]=z;var E=C.loadedgroupsByKey[G];if(E!=undefined){z.visibleindex=E.visibleindex;z.uniqueid=E.uniqueid}}else{var t={group:G,subItems:new Array(),subGroups:new Array(),parentItem:z,level:z.level+1};var E=C.loadedgroupsByKey[z.uniqueid+"_"+G];t.visibleindex=E.visibleindex;t.uniqueid=E.uniqueid;z.subGroups[z.subGroups.length++]=t;z=t}h[s]=z}if(z!=null){H.parentItem=z;H.level=z.level+1;z.subItems[z.subItems.length++]=H}d++}F++;K++}var x=function(L,M,q){for(var i=0;i<M.subItems.length;i++){p[q]=a.extend({},M.subItems[i]);q++}return q};var I=function(M){var q=false;for(subGroup in M.subGroups){var L=M.subGroups[subGroup];if(L.subGroups){if(L.subGroups.length>0){var i=I(L);if(i){q=true;return true}}if(L.subItems.length>0){q=true;return true}}}if(M.subItems.length>0){q=true;return true}return q};var b=function(q,M,i){for(subGroup in M.subGroups){var L=M.subGroups[subGroup];if(L.subGroups){if(I(L)){p[i]=L;i++;if(L.subGroups.length>0){i=b(q,L,i)}else{if(L.subItems.length>0){i=x(q,L,i)}}}}}if(M.subItems.length>0){i=x(q,M,i)}return i};var J=0;for(var F=0;F<o.length;F++){var n=o[F];if(I(n)){p[B]=n;B++;B=b(this,n,B)}}}return p}};a.extend(a.jqx._jqxGrid.prototype,{_initgroupsheader:function(){this.groupsheader.css("visibility","hidden");if(this._groupsheader()){this.groupsheader.css("visibility","inherit");var e=this;var c=this.gridlocalization.groupsheaderstring;this.groupsheaderdiv=this.groupsheaderdiv||a('<div style="width: 100%; position: relative;"></div>');this.groupsheaderdiv.height(this.groupsheaderheight);this.groupsheaderdiv.css("top",0);this.groupsheader.append(this.groupsheaderdiv);this.groupheadersbounds=new Array();var d=this.groups.length;this.groupsheaderdiv.children().remove();this.groupsheaderdiv[0].innerHTML="";var b=new Array();if(d>0){a.each(this.groups,function(i){var n=this;var m=e._getColumnText(this);var l=m.label;var k=e._rendergroupcolumn(l,n);k.addClass(e.toThemeProperty("jqx-grid-group-column"));e.groupsheaderdiv.append(k);if(e.closeablegroups){var j=a(k.find(".jqx-icon-close"));if(e.isTouchDevice()&&e.touchmode!==true){e.addHandler(j,"touchstart",function(){e.removegroupat(i);return false})}else{e.addHandler(j,"click",function(){e.removegroupat(i);return false})}}if(e.sortable){e.addHandler(k,"click",function(){var o=e.getcolumn(n);if(o!=null){e._togglesort(o)}return false})}b[b.length]=k;e._handlegroupstocolumnsdragdrop(this,k);if(i<d-1){var g=k.height();var h=a('<div style="float: left; position: relative;"></div>');if(e.rtl){h.css("float","right")}h.width(e.groupindentwidth/3);h.height(1);h.css("top",g/2);h.addClass(e.toThemeProperty("jqx-grid-group-column-line"));e.groupsheaderdiv.append(h)}})}else{var f=a('<div style="position: relative;">'+c+"</div>");this.groupsheaderdiv.append(f);if(this.rtl){f.addClass(this.toThemeProperty("jqx-rtl"))}}this._groupheaders=b;this._updategroupheadersbounds()}},_updategroupheadersbounds:function(){var c=this;var b=this.groupsheaderdiv.children().outerHeight();var d=(this.groupsheader.height()-b)/2;this.groupsheaderdiv.css("top",d);if(!this.rtl){this.groupsheaderdiv.css("left",d)}else{this.groupsheaderdiv.css("right",d)}if(this.rtl){this._groupheaders.reverse()}a.each(this._groupheaders,function(f){var e=this.coord();c.groupheadersbounds[f]={left:e.left,top:e.top,width:this.outerWidth(),height:this.outerHeight(),index:f}})},addgroup:function(c){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups[b.groups.length]=c;b.refreshgroups();this._raiseEvent(12,{type:"Add",index:b.groups[b.groups.length],groups:b.groups})}},insertgroup:function(d,c){if(d!=undefined&&d!=null&&d>=0&&d<=this.groups.length){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(d,0,c.toString());b.refreshgroups();this._raiseEvent(12,{type:"Insert",index:d,groups:b.groups})}}},refreshgroups:function(){this._refreshdataview();this._render(true,true,true,false)},_insertaftergroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b+1,c)},_insertbeforegroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b,c)},removegroupat:function(c){if(c>=0&&c!=null&&c!=undefined){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(c,1);b.refreshgroups();if(b.virtualmode){b.updatebounddata()}this._raiseEvent(12,{type:"Remove",index:c,groups:b.groups});return true}return false},cleargroups:function(){var b=this;b.groups=[];b.dataview.groups=b.groups;b.refreshgroups();this._raiseEvent(12,{type:"Clear",index:-1,groups:b.groups});return true},removegroup:function(c){if(c==null){return false}var b=this.groups.indexOf(c.toString());return this.removegroupat(b)},getrootgroupscount:function(){var b=this.dataview.loadedrootgroups.length;return b},collapsegroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,false)}var b=c.toString().split(".");var f=null;for(var d=0;d<b.length;d++){var c=parseInt(b[d]);if(d==0){var f=this.dataview.loadedrootgroups[c];this._setrootgroupstate(c,false)}else{var e=f.subGroups[c];if(e){f=e;this._setgroupstate(f,false,true)}}}},expandgroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,true)}var b=c.toString().split(".");var f=null;for(var d=0;d<b.length;d++){var c=parseInt(b[d]);if(d==0){var f=this.dataview.loadedrootgroups[c];this._setrootgroupstate(c,true)}else{var e=f.subGroups[c];if(e){f=e;this._setgroupstate(f,true,true)}}}},collapseallgroups:function(b){this._setbatchgroupstate(false,b)},expandallgroups:function(b){this._setbatchgroupstate(true,b)},getgroup:function(e){var j=this.dataview.loadedrootgroups[e];if(j==null){return null}var f=this.expandedgroups[j.uniqueid].expanded;var g=j.group;var b=j.level;var c=new Array();this._getsubgroups(c,j);var i=this;var d={group:g,level:b,expanded:f,subgroups:c};if(j.subItems){var h=new Array();a.each(j.subItems,function(){var k=this.boundindex;h[h.length]=i.getrowdata(k)});if(h.length>0){d.subrows=h}}return d},getrootgroups:function(){var d=this.dataview.loadedrootgroups.length;var c=new Array();for(var b=0;b<d;b++){c[b]=this.getgroup(b)}return c},_getsubgroups:function(c,j){var i=this;for(obj in j.subGroups){var g=j.subGroups[obj];var e=i.expandedgroups[g.uniqueid].expanded;var f=g.group;var b=g.level;c[c.length]={group:f,level:b,expanded:e};if(g.subItems){var h=new Array();a.each(g.subItems,function(){var k=this.boundindex;h[h.length]=i.getrowdata(k)});c[c.length-1].subrows=h}if(g.subGroups){var d=new Array();i._getsubgroups(d,g)}}return c},_setbatchgroupstate:function(b,e){var c=this;for(obj in this.dataview.loadedrootgroups){c._setrootgroupstate(obj,b,false,true)}if(e==false){c._requiresupdate=true;c._renderrows(c.virtualsizeinfo);return true}var d=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(d!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}return true},_setrootgroupstate:function(d,b,f,c){if(d==undefined||d==null||d<0){return false}if(!this.groupable||this.groups.length==0){return false}var j=f!=undefined?f:true;if(d>=0&&d<this.dataview.loadedrootgroups.length){var h=this.dataview.loadedrootgroups[d];if(this.pageable){var g=new Array();for(var e=0;e<this.dataview.rows.length;e++){if(this.dataview.rows[e].group!=null&&this.dataview.rows[e].level===0){g.push(this.dataview.rows[e])}}h=g[d];if(!h){return}}return this._setgroupstate(h,b,j,c)}return false},_togglegroupstate:function(e,f){if(e==null||e==undefined){return false}var c=this.vScrollInstance.value;var d=this.expandedgroups[e.uniqueid];if(d==undefined){d=false}else{d=d.expanded}d=!d;var b=this._setgroupstate(e,d,f);if(c!==0&&this.vScrollBar.css("visibility")!=="hidden"){if(c<=this.vScrollInstance.max){this.vScrollInstance.setPosition(c)}else{this.vScrollInstance.setPosition(this.vScrollInstance.max)}}return b},_setgroupstate:function(f,b,h,c){if(f==null||f==undefined){return false}var e=false;if(this.editable&&this.editcell){this.endcelledit(this.editcell.row,this.editcell.column,false,false)}var d=this.expandedgroups[f.uniqueid];if(d==undefined){d={expanded:false};e=true}if(d.expanded!=b){e=true}if(e){this.expandedgroups[f.uniqueid]={expanded:b,group:f};this._setsubgroupsvisibility(this,f,!b,c);if(h){var g=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(g!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}}if(undefined==this.suspendgroupevents||this.suspendgroupevents==false){if(b){this._raiseEvent(4,{group:f.group,parentgroup:f.parentItem?f.parentItem.group:null,level:f.level,visibleindex:f.visibleindex})}else{this._raiseEvent(5,{group:f.group,parentgroup:f.parentItem?f.parentItem.group:null,level:f.level,visibleindex:f.visibleindex})}}return true}return false},_setgroupitemsvisibility:function(c,e,d){for(var b=0;b<e.subItems.length;b++){c._setrowvisibility(e.subItems[b].visibleindex,d,false)}},_setsubgroupsvisibility:function(c,g,f,d){if(g.parentItem!=null){if(this.hiddens[g.parentItem.visibleindex]){return}}else{if(g.parentItem==null){if(this.hiddens[g.visibleindex]){return}}}for(subGroup in g.subGroups){var e=g.subGroups[subGroup];if(!f){c._setrowvisibility(e.visibleindex,f,false)}var b=!f;if(!d){if(c.expandedgroups[e.uniqueid]==undefined){b=false}else{b=c.expandedgroups[e.uniqueid].expanded}}else{this.expandedgroups[e.uniqueid]={expanded:b,group:e}}if(e.subGroups){if(e.subGroups.length>0){c._setsubgroupsvisibility(c,e,!b||f,d)}else{if(e.subItems.length>0){c._setgroupitemsvisibility(c,e,!b||f)}}}if(f){c._setrowvisibility(e.visibleindex,f,false)}}if(g.subItems&&g.subItems.length>0){c._setgroupitemsvisibility(c,g,f)}},_handlecolumnsdragdrop:function(){var d=this;var g=-1;var c=false;if(!d.groupable){return}var f="mousemove.grouping"+this.element.id;var e="mousedown.grouping"+this.element.id;var h="mouseup.grouping"+this.element.id;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;f=a.jqx.mobile.getTouchEventName("touchmove")+".grouping"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchstart")+".grouping"+this.element.id;h=a.jqx.mobile.getTouchEventName("touchend")+".grouping"+this.element.id}this.removeHandler(a(document),f);this.addHandler(a(document),f,function(j){if(!d.showgroupsheader){return true}if(d.dragcolumn!=null){var l=parseInt(j.pageX);var u=parseInt(j.pageY);if(b){var r=d.getTouches(j);var p=r[0];l=parseInt(p.pageX);u=parseInt(p.pageY)}var n=d.host.coord();var v=parseInt(n.left);var w=parseInt(n.top);if(d.dragmousedownoffset==undefined||d.dragmousedownoffset==null){d.dragmousedownoffset={left:0,top:0}}var t=parseInt(l)-parseInt(d.dragmousedownoffset.left);var i=parseInt(u)-parseInt(d.dragmousedownoffset.top);d.dragcolumn.css({left:t+"px",top:i+"px"});c=false;if(l>=v&&l<=v+d.host.width()){if(u>=w&&u<=w+d.host.height()){c=true}}g=-1;if(c){d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-dragcancel-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-drag-icon"));var s=d.groupsheader.coord();var m=s.top+d.groupsheader.height();var q=a.data(d.dragcolumn[0],"datarecord");if(q){var k=d.groups.indexOf(q.toString())}else{var k=-1}var o=(k==-1)||(d.groups.length>1&&k>-1);if(d.dropline!=null){if(u>=s.top&&u<=m){if(o){g=d._handlegroupdroplines(l)}}else{d.dropline.fadeOut("slow")}}}else{if(d.dropline!=null){d.dropline.fadeOut("slow")}d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-drag-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-dragcancel-icon"))}if(b){j.preventDefault();j.stopPropagation();return false}}});this.removeHandler(a(document),h);this.addHandler(a(document),h,function(i){if(!d.showgroupsheader){return true}d.__drag=false;a(document.body).removeClass("jqx-disableselect");var m=parseInt(i.pageX);var s=parseInt(i.pageY);if(b){var p=d.getTouches(i);var o=p[0];m=parseInt(o.pageX);s=parseInt(o.pageY)}var n=d.host.coord();var t=parseInt(n.left);var u=parseInt(n.top);var k=d.groupsheader.height();if(d.showtoolbar){u+=d.toolbarheight}d.dragstarted=false;d.dragmousedown=null;if(d.dragcolumn!=null){var l=a.data(d.dragcolumn[0],"datarecord");d.dragcolumn.remove();d.dragcolumn=null;if(l!=null){if(!d.getcolumn(l).groupable){if(d.dropline!=null){d.dropline.remove();d.dropline=null}return}if(c){if(g!=-1){var q=g.index;var r=d.groups[q];var j=d._getGroupIndexByDataField(l);if(j!=q){if(j!=undefined&&j>=0){d.groups.splice(j,1)}if(g.position=="before"){if(!d.rtl){d._insertbeforegroup(r,l)}else{d._insertaftergroup(r,l)}}else{if(!d.rtl){d._insertaftergroup(r,l)}else{d._insertbeforegroup(r,l)}}}}else{if(d.groups.length==0){if(s>u&&s<=u+k){d.addgroup(l)}}else{if(s>u+k){var j=d._getGroupIndexByDataField(l);d.removegroupat(j)}}}}if(d.dropline!=null){d.dropline.remove();d.dropline=null}}}})},_getGroupIndexByDataField:function(b){for(var c=0;c<this.groups.length;c++){if(this.groups[c]==b){return c}}return -1},_isColumnInGroups:function(c){for(var b=0;b<this.groups.length;b++){if(this.groups[b]==c){return true}}return false},_handlegroupdroplines:function(d){var b=this;var c=-1;a.each(b.groupheadersbounds,function(e){if(d<=this.left+this.width/2){var f=this.left-3;if(e>0){f=this.left-1-b.groupindentwidth/6}b.dropline.css("left",f);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"before"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"before"}}return false}else{if(d>=this.left+this.width/2){b.dropline.css("left",1+this.left+this.width);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"after"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"after"}}}}});return c},_handlegroupstocolumnsdragdrop:function(c,e){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var f=this;var d;var h="mousedown";var g="mousemove";var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;h=a.jqx.mobile.getTouchEventName("touchstart");g=a.jqx.mobile.getTouchEventName("touchmove")}this.addHandler(e,"dragstart",function(i){return false});this.addHandler(e,h,function(i){if(!f.showgroupsheader){return true}var l=i.pageX;var k=i.pageY;f.__drag=true;f.dragmousedown={left:l,top:k};if(b){var j=f.getTouches(i);var n=j[0];l=n.pageX;k=n.pageY;f.dragmousedown={left:l,top:k};if(i.preventDefault){i.preventDefault()}}var m=a(i.target).coord();f.dragmousedownoffset={left:parseInt(l)-parseInt(m.left),top:parseInt(k-m.top)}});this.addHandler(e,g,function(i){if(!f.showgroupsheader){return true}if(f.dragmousedown){d={left:i.pageX,top:i.pageY};if(b){var k=f.getTouches(i);var m=k[0];d={left:m.pageX,top:m.pageY}}if(!f.dragstarted&&f.dragcolumn==null){var j=Math.abs(d.left-f.dragmousedown.left);var l=Math.abs(d.top-f.dragmousedown.top);if(j>3||l>3){f._createdragcolumn(e,d,true);a(document.body).addClass("jqx-disableselect");a.data(f.dragcolumn[0],"datarecord",c);if(i.preventDefault){i.preventDefault()}}}}})},_createdragcolumn:function(c,e,g){var h=this;var f=e;h.dragcolumn=a("<div></div>");var j=c.clone();h.dragcolumn.css("z-index",999999);j.css("border-width","1px");j.css("opacity","0.4");var i=a(j.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(i.length>0){i.css("display","none")}var b=a(j.find(".jqx-icon-close"));if(b.length>0){b.css("display","none")}h.dragcolumnicon=a('<div style="z-index: 9999; position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px;"></div>');h.dragcolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.dragcolumn.css("float","left");h.dragcolumn.css("position","absolute");var d=h.host.coord();j.width(c.width()+16);h.dragcolumn.append(j);h.dragcolumn.height(c.height());h.dragcolumn.width(j.width());h.dragcolumn.append(h.dragcolumnicon);a(document.body).append(h.dragcolumn);j.css("margin-left",0);j.css("left",0);j.css("top",0);h.dragcolumn.css("left",f.left+h.dragmousedown.left);h.dragcolumn.css("top",f.top+h.dragmousedown.top);if(g!=undefined&&g){h.dropline=a('<div style="display: none; position: absolute;"></div>');h.dropline.width(2);h.dropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));a(document.body).append(h.dropline)}},iscolumngroupable:function(b){return this._getcolumnproperty(b,"groupable")},_handlecolumnstogroupsdragdrop:function(c,f){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var g=this;var e;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true}var d="mousedown.drag";var e="mousemove.drag";if(b){d=a.jqx.mobile.getTouchEventName("touchstart")+".drag";e=a.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(f,"dragstart",function(h){return false})}this.addHandler(f,d,function(j){if(!g.showgroupsheader){return true}g.__drag=true;if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(false==c.groupable){return true}var i=j.pageX;var h=j.pageY;if(b){var k=g.getTouches(j);var m=k[0];i=m.pageX;h=m.pageY}g.dragmousedown={left:i,top:h};if(b){if(j.preventDefault){j.preventDefault()}}var l=a(j.target).coord();g.dragmousedownoffset={left:parseInt(i)-parseInt(l.left),top:parseInt(h-l.top)}});this.addHandler(f,e,function(j){if(!g.showgroupsheader){return true}if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(g.dragmousedown){var i=j.pageX;var h=j.pageY;if(b){var l=g.getTouches(j);var n=l[0];i=n.pageX;h=n.pageY}e={left:i,top:h};if(!g.dragstarted&&g.dragcolumn==null){var k=Math.abs(e.left-g.dragmousedown.left);var m=Math.abs(e.top-g.dragmousedown.top);if(k>3||m>3){g._createdragcolumn(f,e,true);a.data(g.dragcolumn[0],"datarecord",c.displayfield);if(j.preventDefault){j.preventDefault()}}}}})},_rendergroupcolumn:function(g,h){var e=a('<div style="float: left; position: relative;"></div>');if(this.rtl){e.css("float","right")}if(this.groupcolumnrenderer!=null){e[0].innerHTML=this.groupcolumnrenderer(g);e.addClass(this.toThemeProperty("jqx-grid-group-column"));e.addClass(this.toThemeProperty("jqx-fill-state-normal"))}if(this.closeablegroups){if(e[0].innerHTML==""){e[0].innerHTML='<a style="float: left;" href="#">'+g+"</a>"}if(this.rtl){e[0].innerHTML='<a style="float: right;" href="#">'+g+"</a>"}var d=!this.rtl?"right":"left";var c='<div style="float: '+d+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='<div style="float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>'}if(this.rtl){var c='<div style="float: '+d+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='<div style="float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>'}}e[0].innerHTML+=c}else{if(e[0].innerHTML==""){e[0].innerHTML='<a href="#">'+g+"</a>"}}if(this.sortable){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>');if(this.closeablegroups){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -32px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -32px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>')}if(this.rtl){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 0px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 0px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>');if(this.closeablegroups){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>')}}f.css("display","none");b.css("display","none");if(a.jqx.browser.msie&&a.jqx.browser.version<8){f.css("float","left");b.css("float","left")}e.append(f);e.append(b);a.data(document.body,"groupsortelements"+h,{sortasc:f,sortdesc:b})}e.addClass(this.toThemeProperty("jqx-fill-state-normal"));e.addClass(this.toThemeProperty("jqx-grid-group-column"));return e},_rendergroup:function(o,w,b,u,j,A,t){var F=w;var c=w.cells[b.level];if(this.rtl){c=w.cells[w.cells.length-1-b.level]}var E=this._findgroupstate(b.uniqueid);if(b.bounddata.subGroups.length>0||b.bounddata.subItems.length>0){var i=this.rtl?"-rtl":"";var B=this.toThemeProperty("jqx-icon-arrow-right");if(i){B=this.toThemeProperty("jqx-icon-arrow-left")}if(E){c.className+=" "+this.toThemeProperty("jqx-grid-group-expand"+i)+" "+this.toThemeProperty("jqx-icon-arrow-down")}else{c.className+=" "+this.toThemeProperty("jqx-grid-group-collapse"+i)+" "+B}}var s=this._getColumnText(this.groups[b.level]).label;var d=this.groupindentwidth;var q=this.rowdetails&&this.showrowdetailscolumn?(1+o)*d:(o)*d;var x=t-q;var g=b.level+1;if(this.rtl){g=0}var l=F.cells[g];var z=2;while(l!=undefined&&l.style.display=="none"&&z<F.cells.length-1){l=F.cells[g+z-1];z++}var f=a(l);if(!l){return}l.style.width=parseInt(x)+"px";if(l.className.indexOf("jqx-grid-cell-filter")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-filter"))}if(l.className.indexOf("jqx-grid-cell-sort")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-sort"))}if(l.className.indexOf("jqx-grid-cell-pinned")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-pinned"))}if(this.groupsrenderer!=null){var h={group:b.group,level:b.level,parent:b.bounddata.parentItem,subGroups:b.bounddata.subGroups,subItems:b.bounddata.subItems,groupcolumn:this._getColumnText(this.groups[b.level]).column};var p=this.groupsrenderer(s+": "+b.group,b.group,E,h);if(p){l.innerHTML=p}else{var k=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;l.innerHTML='<div class="'+this.toThemeProperty("jqx-grid-groups-row")+'" style="position: absolute;"><span>'+s+': </span><span class="'+this.toThemeProperty("jqx-grid-groups-row-details")+'">'+b.group+" ("+k+")</span></div>"}}else{var e=this._getcolumnbydatafield(this.groups[b.level]);var y=b.group;if(e!=null){if(e.cellsformat){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(y)){y=a.jqx.dataFormat.formatdate(y,e.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(y)){y=a.jqx.dataFormat.formatnumber(y,e.cellsformat,this.gridlocalization)}}}}var k=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;l.innerHTML='<div class="'+this.toThemeProperty("jqx-grid-groups-row")+'" style="position: absolute;"><span>'+s+': </span><span class="'+this.toThemeProperty("jqx-grid-groups-row-details")+'">'+y+" ("+k+")</span></div>"}else{throw new Error("jqxGrid: Unable to find '"+this.groups[b.level]+"' group in the Grid's columns collection.")}}if(this.rtl){if(!e){e=this._getcolumnbydatafield(this.groups[b.level])}var r=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max-this.hScrollInstance.value;var C=this.vScrollBar.css("visibility")=="hidden"?0:this.scrollbarsize+6;var q=this.rowdetails&&this.showrowdetailscolumn?(2+b.level)*d:(1+b.level)*d;l.style.width=t+parseInt(r)-q-C+"px";f.addClass(this.toThemeProperty("jqx-rtl"));var v=a(w.cells[w.cells.length-1]).css("z-index");f.css("z-index",v);var D=f.find("div");var x=D.width();D.css("left","100%");var n=this.columns.records[w.cells.length-2-b.level]!=null?this.columns.records[w.cells.length-2-b.level].pinned:false;if(this.table.width()<t){t=this.table.width();if(this.vScrollBar.css("visibility")!="hidden"){t+=this.vScrollBar.outerWidth()}}if(e.pinned||n){if(this.rowdetails&&this.showrowdetailscolumn){t+=30}D.css("margin-left",-x);l.style.width=t+r-q-C+"px"}else{var r=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max;l.style.width=t+r-q-C+"px";var x=D.width();D.css("margin-left",-x)}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.dataview.grouping=function(){this.loadgrouprecords=function(E,H,s,F,I,f,R,G,x){var M=E;var j=this;var Q=new Array();for(var n=0;n<j.groups.length;n++){Q[n]=j.generatekey()}var K=new Array();var b=0;var Q=Q;var B=new Array();var P=H;var e=H;var C=j.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 O=this.sortdata!=null;var S=O?this.sortdata:this.records;if(this.pageable){var A=Object.prototype.toString;var l=this.groups[0];if(this.groups.length==1){Object.prototype.toString=(typeof l=="function")?l:function(){return this[l]}}else{Object.prototype.toString=(typeof l=="function")?l:function(){var T="";for(var i=0;i<j.groups.length;i++){T+=this[j.groups[i]];if(i<j.groups.length-1){T+=" "}}return T}}if(O){var c=this.sortfield;Object.prototype.toString=(typeof l=="function")?l:function(){return this[l]+" "+this[c]}}var u=new Array();var D=0;if(!S[H]){a.each(S,function(i,q){u[H+i++]=this});S=u}if(!O){if(S.sort){S.sort(function(q,i){if(q===undefined){q=null}if(i===undefined){i=null}if(q===null&&i===null){return 0}if(q===null&&i!==null){return 1}if(q!==null&&i===null){return -1}q=q.toString();i=i.toString();if(a.jqx.dataFormat.isNumber(q)&&a.jqx.dataFormat.isNumber(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(a.jqx.dataFormat.isDate(q)&&a.jqx.dataFormat.isDate(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(q)&&!a.jqx.dataFormat.isNumber(i)){q=String(q).toLowerCase();i=String(i).toLowerCase()}}}try{if(q<i){return -1}if(q>i){return 1}}catch(T){var U=T}return 0})}}else{S.sort(function(q,i){var q=q.value;var i=i.value;if(q===undefined){q=null}if(i===undefined){i=null}if(q===null&&i===null){return 0}if(q===null&&i!==null){return 1}if(q!==null&&i===null){return -1}if(a.jqx.dataFormat.isNumber(q)&&a.jqx.dataFormat.isNumber(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(a.jqx.dataFormat.isDate(q)&&a.jqx.dataFormat.isDate(i)){if(q<i){return -1}if(q>i){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(q)&&!a.jqx.dataFormat.isNumber(i)){q=String(q).toLowerCase();i=String(i).toLowerCase()}}}try{if(q<i){return -1}if(q>i){return 1}}catch(T){var U=T}return 0})}Object.prototype.toString=A}if(this.virtualmode){var u=new Array();var D=0;for(var P=0;P<s-H;P++){if(S[P]){u[H+D++]=S[P]}else{if(S[H+D]){u[H+D]=S[H+D];D++}}}P=0;S=u}for(var d=H;d<s;d++){var y={};if(!O){y=a.extend({},S[d])}else{y=a.extend({},S[d].value)}id=y[j.uniqueId];if(I>=G||id!=R[I][j.uniqueId]||(f&&f[id])){x[x.length]=I}var L=new Array();var w=0;for(var n=0;n<C;n++){var t=j.groups[n];var J=y[t];if(J==null){J=""}L[w++]={value:J,hash:Q[n]}}if(L.length!=C){break}var k=null;var m="";var g=-1;for(var N=0;N<L.length;N++){g++;var p=L[N].value;var v=L[N].hash;m=m+"_"+v+"_"+p;if(B[m]!=undefined&&B[m]!=null){k=B[m];continue}if(k==null){k={group:p,subItems:new Array(),subGroups:new Array(),level:0};K[b++]=k;k.uniqueid=j.generatekey();j.loadedgroupsByKey[p]=k}else{var o={group:p,subItems:new Array(),subGroups:new Array(),parentItem:k,level:k.level+1};j.loadedgroupsByKey[k.uniqueid+"_"+p]=o;o.uniqueid=j.generatekey();k.subGroups[k.subGroups.length++]=o;k=o}B[m]=k}if(k!=null){if(undefined==y.uid){y.uid=this.getid(this.source.id,y,P)}if(!O){y.boundindex=P;this.recordsbyid["id"+y.uid]=S[d]}else{y.boundindex=S[d].index;this.recordsbyid["id"+y.uid]=S[d].value}this.bounditems[y.boundindex]=y;this.sortedgroups[P]=y;y.uniqueid=j.generatekey();y.parentItem=k;y.level=k.level+1;k.subItems[k.subItems.length++]=y}else{if(undefined==y.uid){y.uid=this.getid(this.source.id,y,P)}if(!O){y.boundindex=P;this.recordsbyid["id"+y.uid]=S[d]}else{y.boundindex=S[d].index;this.recordsbyid["id"+y.uid]=S[d].value}this.sortedgroups[P]=y;this.bounditems[y.boundindex]=y;y.uniqueid=j.generatekey()}I++;P++;e++}var h=function(q,T,U){for(var i=0;i<T.subItems.length;i++){T.subItems[i].visibleindex=E+U;q.rows[U]=T.subItems[i];q.loadedrecords[U]=T.subItems[i];U++}return U};var r=function(i,U,V){var q=function(Y){if(i.aggregates==true){var W=Y;var X={};if(W!=null){X.level=W.level;X.visibleindex=E+V;X.uniqueid=i.generatekey();i.rows[V]=X;i.loadedrecords[V++]=X;X.totalsrow=true;if(Y.subItems.length>0){W=Y.subItems[Y.subItems.length-1];X.parentItem=W.parentItem;if(X.parentItem.subItems){X.parentItem.subItems[X.parentItem.subItems.length]=X}}else{if(Y.subGroups.length>0){W=Y.subGroups[Y.subGroups.length-1];X.level=W.level;X.parentItem=Y;Y.subGroups[Y.subGroups.length]=X}}}}};for(subGroup in U.subGroups){var T=U.subGroups[subGroup];if(T.subGroups){i.loadedgroups[i.loadedgroups.length]=T;T.visibleindex=E+V;i.rows[V]=T;i.loadedrecords[V]=T;V++;if(T.subGroups.length>0){V=r(i,T,V)}else{if(T.subItems.length>0){V=h(i,T,V)}}q(T)}}if(U.subItems.length>0){V=h(i,U,V)}q(U);return V};var z=K.length;this.loadedgroups=new Array();this.rows=new Array();var M=0;for(var P=0;P<z;P++){var t=K[P];this.loadedrootgroups[P]=t;this.loadedgroups[this.loadedgroups.length]=t;t.visibleindex=E+M;this.rows[M]=t;this.loadedrecords[M]=t;M++;M=r(this,t,M)}return M};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(),subGroups:new Array(),level:0};o[k++]=z;var E=C.loadedgroupsByKey[G];if(E!=undefined){z.visibleindex=E.visibleindex;z.uniqueid=E.uniqueid}}else{var t={group:G,subItems:new Array(),subGroups:new Array(),parentItem:z,level:z.level+1};var E=C.loadedgroupsByKey[z.uniqueid+"_"+G];t.visibleindex=E.visibleindex;t.uniqueid=E.uniqueid;z.subGroups[z.subGroups.length++]=t;z=t}h[s]=z}if(z!=null){H.parentItem=z;H.level=z.level+1;z.subItems[z.subItems.length++]=H}d++}F++;K++}var x=function(L,M,q){for(var i=0;i<M.subItems.length;i++){p[q]=a.extend({},M.subItems[i]);q++}return q};var I=function(M){var q=false;for(subGroup in M.subGroups){var L=M.subGroups[subGroup];if(L.subGroups){if(L.subGroups.length>0){var i=I(L);if(i){q=true;return true}}if(L.subItems.length>0){q=true;return true}}}if(M.subItems.length>0){q=true;return true}return q};var b=function(q,M,i){for(subGroup in M.subGroups){var L=M.subGroups[subGroup];if(L.subGroups){if(I(L)){p[i]=L;i++;if(L.subGroups.length>0){i=b(q,L,i)}else{if(L.subItems.length>0){i=x(q,L,i)}}}}}if(M.subItems.length>0){i=x(q,M,i)}return i};var J=0;for(var F=0;F<o.length;F++){var n=o[F];if(I(n)){p[B]=n;B++;B=b(this,n,B)}}}return p}};a.extend(a.jqx._jqxGrid.prototype,{_initgroupsheader:function(){this.groupsheader.css("visibility","hidden");if(this._groupsheader()){this.groupsheader.css("visibility","inherit");var e=this;var c=this.gridlocalization.groupsheaderstring;this.groupsheaderdiv=this.groupsheaderdiv||a('<div style="width: 100%; position: relative;"></div>');this.groupsheaderdiv.height(this.groupsheaderheight);this.groupsheaderdiv.css("top",0);this.groupsheader.append(this.groupsheaderdiv);this.groupheadersbounds=new Array();var d=this.groups.length;this.groupsheaderdiv.children().remove();this.groupsheaderdiv[0].innerHTML="";var b=new Array();if(d>0){a.each(this.groups,function(i){var n=this;var m=e._getColumnText(this);var l=m.label;var k=e._rendergroupcolumn(l,n);k.addClass(e.toThemeProperty("jqx-grid-group-column"));e.groupsheaderdiv.append(k);if(e.closeablegroups){var j=a(k.find(".jqx-icon-close"));if(e.isTouchDevice()&&e.touchmode!==true){e.addHandler(j,"touchstart",function(){e.removegroupat(i);return false})}else{e.addHandler(j,"click",function(){e.removegroupat(i);return false})}}if(e.sortable){e.addHandler(k,"click",function(){var o=e.getcolumn(n);if(o!=null){e._togglesort(o)}return false})}b[b.length]=k;e._handlegroupstocolumnsdragdrop(this,k);if(i<d-1){var g=k.height();var h=a('<div style="float: left; position: relative;"></div>');if(e.rtl){h.css("float","right")}h.width(e.groupindentwidth/3);h.height(1);h.css("top",g/2);h.addClass(e.toThemeProperty("jqx-grid-group-column-line"));e.groupsheaderdiv.append(h)}})}else{var f=a('<div style="position: relative;">'+c+"</div>");this.groupsheaderdiv.append(f);if(this.rtl){f.addClass(this.toThemeProperty("jqx-rtl"))}}this._groupheaders=b;this._updategroupheadersbounds()}},_updategroupheadersbounds:function(){var c=this;var b=this.groupsheaderdiv.children().outerHeight();var d=(this.groupsheader.height()-b)/2;this.groupsheaderdiv.css("top",d);if(!this.rtl){this.groupsheaderdiv.css("left",d);this.groupsheaderdiv.css("right","")}else{this.groupsheaderdiv.css("left","");this.groupsheaderdiv.css("right",d)}if(this.rtl){this._groupheaders.reverse()}a.each(this._groupheaders,function(f){var e=this.coord();c.groupheadersbounds[f]={left:e.left,top:e.top,width:this.outerWidth(),height:this.outerHeight(),index:f}})},addgroup:function(c){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups[b.groups.length]=c;b.refreshgroups();this._raiseEvent(12,{type:"Add",index:b.groups[b.groups.length],groups:b.groups})}},insertgroup:function(d,c){if(d!=undefined&&d!=null&&d>=0&&d<=this.groups.length){if(c){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(d,0,c.toString());b.refreshgroups();this._raiseEvent(12,{type:"Insert",index:d,groups:b.groups})}}},refreshgroups:function(){this._refreshdataview();this._render(true,true,true,false)},_insertaftergroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b+1,c)},_insertbeforegroup:function(d,c){var b=this._getGroupIndexByDataField(d);this.insertgroup(b,c)},removegroupat:function(c){if(c>=0&&c!=null&&c!=undefined){var b=this;if(b.groups!==b.dataview.groups){b.dataview.groups=b.groups}b.groups.splice(c,1);b.refreshgroups();if(b.virtualmode){b.updatebounddata()}this._raiseEvent(12,{type:"Remove",index:c,groups:b.groups});return true}return false},cleargroups:function(){var b=this;b.groups=[];b.dataview.groups=b.groups;b.refreshgroups();this._raiseEvent(12,{type:"Clear",index:-1,groups:b.groups});return true},removegroup:function(c){if(c==null){return false}var b=this.groups.indexOf(c.toString());return this.removegroupat(b)},getrootgroupscount:function(){var b=this.dataview.loadedrootgroups.length;return b},collapsegroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,false)}var b=c.toString().split(".");var f=null;for(var d=0;d<b.length;d++){var c=parseInt(b[d]);if(d==0){var f=this.dataview.loadedrootgroups[c];this._setrootgroupstate(c,false)}else{var e=f.subGroups[c];if(e){f=e;this._setgroupstate(f,false,true)}}}},expandgroup:function(c){if(c>=0&&c.toString().indexOf(".")===-1){return this._setrootgroupstate(c,true)}var b=c.toString().split(".");var f=null;for(var d=0;d<b.length;d++){var c=parseInt(b[d]);if(d==0){var f=this.dataview.loadedrootgroups[c];this._setrootgroupstate(c,true)}else{var e=f.subGroups[c];if(e){f=e;this._setgroupstate(f,true,true)}}}},collapseallgroups:function(b){this._setbatchgroupstate(false,b)},expandallgroups:function(b){this._setbatchgroupstate(true,b)},isgroupexpanded:function(c){var d=this.dataview.loadedrootgroups[c];if(d==null){return null}var b=this.expandedgroups[d.uniqueid].expanded;return b},getgroup:function(e){var j=this.dataview.loadedrootgroups[e];if(j==null){return null}var f=this.expandedgroups[j.uniqueid].expanded;var g=j.group;var b=j.level;var c=new Array();this._getsubgroups(c,j);var i=this;var d={group:g,level:b,expanded:f,subgroups:c};if(j.subItems){var h=new Array();a.each(j.subItems,function(){var k=this.boundindex;h[h.length]=i.getrowdata(k)});if(h.length>0){d.subrows=h}}return d},getrootgroups:function(){var d=this.dataview.loadedrootgroups.length;var c=new Array();for(var b=0;b<d;b++){c[b]=this.getgroup(b)}return c},_getsubgroups:function(c,j){var i=this;for(obj in j.subGroups){var g=j.subGroups[obj];var e=i.expandedgroups[g.uniqueid].expanded;var f=g.group;var b=g.level;c[c.length]={group:f,level:b,expanded:e};if(g.subItems){var h=new Array();a.each(g.subItems,function(){var k=this.boundindex;h[h.length]=i.getrowdata(k)});c[c.length-1].subrows=h}if(g.subGroups){var d=new Array();i._getsubgroups(d,g)}}return c},_setbatchgroupstate:function(b,e){var c=this;for(obj in this.dataview.loadedrootgroups){c._setrootgroupstate(obj,b,false,true)}if(e==false){c._requiresupdate=true;c._renderrows(c.virtualsizeinfo);return true}var d=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(d!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}return true},_setrootgroupstate:function(d,b,f,c){if(d==undefined||d==null||d<0){return false}if(!this.groupable||this.groups.length==0){return false}var j=f!=undefined?f:true;if(d>=0&&d<this.dataview.loadedrootgroups.length){var h=this.dataview.loadedrootgroups[d];if(this.pageable){var g=new Array();for(var e=0;e<this.dataview.rows.length;e++){if(this.dataview.rows[e].group!=null&&this.dataview.rows[e].level===0){g.push(this.dataview.rows[e])}}h=g[d];if(!h){return}}return this._setgroupstate(h,b,j,c)}return false},_togglegroupstate:function(e,f){if(e==null||e==undefined){return false}var c=this.vScrollInstance.value;var d=this.expandedgroups[e.uniqueid];if(d==undefined){d=false}else{d=d.expanded}d=!d;var b=this._setgroupstate(e,d,f);if(c!==0&&this.vScrollBar.css("visibility")!=="hidden"){if(c<=this.vScrollInstance.max){this.vScrollInstance.setPosition(c)}else{this.vScrollInstance.setPosition(this.vScrollInstance.max)}}return b},_setgroupstate:function(f,b,h,c){if(f==null||f==undefined){return false}var e=false;if(this.editable&&this.editcell){this.endcelledit(this.editcell.row,this.editcell.column,false,false)}var d=this.expandedgroups[f.uniqueid];if(d==undefined){d={expanded:false};e=true}if(d.expanded!=b){e=true}if(e){this.expandedgroups[f.uniqueid]={expanded:b,group:f};this._setsubgroupsvisibility(this,f,!b,c);if(h){var g=this.vScrollBar[0].style.visibility;this.rendergridcontent(true,false);if(g!=this.vScrollBar[0].style.visibility||this._hiddencolumns){this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo)}}if(undefined==this.suspendgroupevents||this.suspendgroupevents==false){if(b){this._raiseEvent(4,{group:f.group,parentgroup:f.parentItem?f.parentItem.group:null,level:f.level,visibleindex:f.visibleindex})}else{this._raiseEvent(5,{group:f.group,parentgroup:f.parentItem?f.parentItem.group:null,level:f.level,visibleindex:f.visibleindex})}}return true}return false},_setgroupitemsvisibility:function(c,e,d){for(var b=0;b<e.subItems.length;b++){c._setrowvisibility(e.subItems[b].visibleindex,d,false)}},_setsubgroupsvisibility:function(c,g,f,d){if(g.parentItem!=null){if(this.hiddens[g.parentItem.visibleindex]){return}}else{if(g.parentItem==null){if(this.hiddens[g.visibleindex]){return}}}for(subGroup in g.subGroups){var e=g.subGroups[subGroup];if(!f){c._setrowvisibility(e.visibleindex,f,false)}var b=!f;if(!d){if(c.expandedgroups[e.uniqueid]==undefined){b=false}else{b=c.expandedgroups[e.uniqueid].expanded}}else{this.expandedgroups[e.uniqueid]={expanded:b,group:e}}if(e.subGroups){if(e.subGroups.length>0){c._setsubgroupsvisibility(c,e,!b||f,d)}else{if(e.subItems.length>0){c._setgroupitemsvisibility(c,e,!b||f)}}}if(f){c._setrowvisibility(e.visibleindex,f,false)}}if(g.subItems&&g.subItems.length>0){c._setgroupitemsvisibility(c,g,f)}},_handlecolumnsdragdrop:function(){var d=this;var g=-1;var c=false;if(!d.groupable){return}var f="mousemove.grouping"+this.element.id;var e="mousedown.grouping"+this.element.id;var h="mouseup.grouping"+this.element.id;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;f=a.jqx.mobile.getTouchEventName("touchmove")+".grouping"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchstart")+".grouping"+this.element.id;h=a.jqx.mobile.getTouchEventName("touchend")+".grouping"+this.element.id}this.removeHandler(a(document),f);this.addHandler(a(document),f,function(j){if(!d.showgroupsheader){return true}if(d.dragcolumn!=null){var l=parseInt(j.pageX);var u=parseInt(j.pageY);if(b){var r=d.getTouches(j);var p=r[0];l=parseInt(p.pageX);u=parseInt(p.pageY)}var n=d.host.coord();var v=parseInt(n.left);var w=parseInt(n.top);if(d.dragmousedownoffset==undefined||d.dragmousedownoffset==null){d.dragmousedownoffset={left:0,top:0}}var t=parseInt(l)-parseInt(d.dragmousedownoffset.left);var i=parseInt(u)-parseInt(d.dragmousedownoffset.top);d.dragcolumn.css({left:t+"px",top:i+"px"});c=false;if(l>=v&&l<=v+d.host.width()){if(u>=w&&u<=w+d.host.height()){c=true}}g=-1;if(c){d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-dragcancel-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-drag-icon"));var s=d.groupsheader.coord();var m=s.top+d.groupsheader.height();var q=a.data(d.dragcolumn[0],"datarecord");if(q){var k=d.groups.indexOf(q.toString())}else{var k=-1}var o=(k==-1)||(d.groups.length>1&&k>-1);if(d.dropline!=null){if(u>=s.top&&u<=m){if(o){g=d._handlegroupdroplines(l)}}else{d.dropline.fadeOut("slow")}}}else{if(d.dropline!=null){d.dropline.fadeOut("slow")}d.dragcolumnicon.removeClass(d.toThemeProperty("jqx-grid-drag-icon"));d.dragcolumnicon.addClass(d.toThemeProperty("jqx-grid-dragcancel-icon"))}if(b){j.preventDefault();j.stopPropagation();return false}}});this.removeHandler(a(document),h);this.addHandler(a(document),h,function(i){if(!d.showgroupsheader){return true}d.__drag=false;a(document.body).removeClass("jqx-disableselect");var m=parseInt(i.pageX);var s=parseInt(i.pageY);if(b){var p=d.getTouches(i);var o=p[0];m=parseInt(o.pageX);s=parseInt(o.pageY)}var n=d.host.coord();var t=parseInt(n.left);var u=parseInt(n.top);var k=d.groupsheader.height();if(d.showtoolbar){u+=d.toolbarheight}d.dragstarted=false;d.dragmousedown=null;if(d.dragcolumn!=null){var l=a.data(d.dragcolumn[0],"datarecord");d.dragcolumn.remove();d.dragcolumn=null;if(l!=null){if(!d.getcolumn(l).groupable){if(d.dropline!=null){d.dropline.remove();d.dropline=null}return}if(c){if(g!=-1){var q=g.index;var r=d.groups[q];var j=d._getGroupIndexByDataField(l);if(j!=q){if(j!=undefined&&j>=0){d.groups.splice(j,1)}if(g.position=="before"){if(!d.rtl){d._insertbeforegroup(r,l)}else{d._insertaftergroup(r,l)}}else{if(!d.rtl){d._insertaftergroup(r,l)}else{d._insertbeforegroup(r,l)}}}}else{if(d.groups.length==0){if(s>u&&s<=u+k){d.addgroup(l)}}else{if(s>u+k){var j=d._getGroupIndexByDataField(l);d.removegroupat(j)}}}}if(d.dropline!=null){d.dropline.remove();d.dropline=null}}}})},_getGroupIndexByDataField:function(b){for(var c=0;c<this.groups.length;c++){if(this.groups[c]==b){return c}}return -1},_isColumnInGroups:function(c){for(var b=0;b<this.groups.length;b++){if(this.groups[b]==c){return true}}return false},_handlegroupdroplines:function(d){var b=this;var c=-1;a.each(b.groupheadersbounds,function(e){if(d<=this.left+this.width/2){var f=this.left-3;if(e>0){f=this.left-1-b.groupindentwidth/6}b.dropline.css("left",f);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"before"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"before"}}return false}else{if(d>=this.left+this.width/2){b.dropline.css("left",1+this.left+this.width);b.dropline.css("top",this.top);b.dropline.height(this.height);b.dropline.fadeIn("slow");c={index:e,position:"after"};if(b.rtl){c={index:b.groupheadersbounds.length-1-e,position:"after"}}}}});return c},_handlegroupstocolumnsdragdrop:function(c,e){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var f=this;var d;var h="mousedown";var g="mousemove";var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true;h=a.jqx.mobile.getTouchEventName("touchstart");g=a.jqx.mobile.getTouchEventName("touchmove")}this.addHandler(e,"dragstart",function(i){return false});this.addHandler(e,h,function(i){if(!f.showgroupsheader){return true}var l=i.pageX;var k=i.pageY;f.__drag=true;f.dragmousedown={left:l,top:k};if(b){var j=f.getTouches(i);var n=j[0];l=n.pageX;k=n.pageY;f.dragmousedown={left:l,top:k};if(i.preventDefault){i.preventDefault()}}var m=a(i.target).coord();f.dragmousedownoffset={left:parseInt(l)-parseInt(m.left),top:parseInt(k-m.top)}});this.addHandler(e,g,function(i){if(!f.showgroupsheader){return true}if(f.dragmousedown){d={left:i.pageX,top:i.pageY};if(b){var k=f.getTouches(i);var m=k[0];d={left:m.pageX,top:m.pageY}}if(!f.dragstarted&&f.dragcolumn==null){var j=Math.abs(d.left-f.dragmousedown.left);var l=Math.abs(d.top-f.dragmousedown.top);if(j>3||l>3){f._createdragcolumn(e,d,true);a(document.body).addClass("jqx-disableselect");a.data(f.dragcolumn[0],"datarecord",c);if(i.preventDefault){i.preventDefault()}}}}})},_createdragcolumn:function(c,e,g){var h=this;var f=e;h.dragcolumn=a("<div></div>");var j=c.clone();h.dragcolumn.css("z-index",999999);j.css("border-width","1px");j.css("opacity","0.4");var i=a(j.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(i.length>0){i.css("display","none")}var b=a(j.find(".jqx-icon-close"));if(b.length>0){b.css("display","none")}h.dragcolumnicon=a('<div style="z-index: 9999; position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px;"></div>');h.dragcolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.dragcolumn.css("float","left");h.dragcolumn.css("position","absolute");var d=h.host.coord();j.width(c.width()+16);h.dragcolumn.append(j);h.dragcolumn.height(c.height());h.dragcolumn.width(j.width());h.dragcolumn.append(h.dragcolumnicon);a(document.body).append(h.dragcolumn);j.css("margin-left",0);j.css("left",0);j.css("top",0);h.dragcolumn.css("left",f.left+h.dragmousedown.left);h.dragcolumn.css("top",f.top+h.dragmousedown.top);if(g!=undefined&&g){h.dropline=a('<div style="display: none; position: absolute;"></div>');h.dropline.width(2);h.dropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));a(document.body).append(h.dropline)}},iscolumngroupable:function(b){return this._getcolumnproperty(b,"groupable")},_handlecolumnstogroupsdragdrop:function(c,f){this.dragmousedown=null;this.dragmousedownoffset=null;this.dragstarted=false;this.dragcolumn=null;var g=this;var e;var b=false;if(this.isTouchDevice()&&this.touchmode!==true){b=true}var d="mousedown.drag";var e="mousemove.drag";if(b){d=a.jqx.mobile.getTouchEventName("touchstart")+".drag";e=a.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(f,"dragstart",function(h){return false})}this.addHandler(f,d,function(j){if(!g.showgroupsheader){return true}g.__drag=true;if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(false==c.groupable){return true}var i=j.pageX;var h=j.pageY;if(b){var k=g.getTouches(j);var m=k[0];i=m.pageX;h=m.pageY}g.dragmousedown={left:i,top:h};if(b){if(j.preventDefault){j.preventDefault()}}var l=a(j.target).coord();g.dragmousedownoffset={left:parseInt(i)-parseInt(l.left),top:parseInt(h-l.top)}});this.addHandler(f,e,function(j){if(!g.showgroupsheader){return true}if(g._isColumnInGroups(c.displayfield)){if(f.css("cursor")!="col-resize"){return true}else{return true}}if(g.dragmousedown){var i=j.pageX;var h=j.pageY;if(b){var l=g.getTouches(j);var n=l[0];i=n.pageX;h=n.pageY}e={left:i,top:h};if(!g.dragstarted&&g.dragcolumn==null){var k=Math.abs(e.left-g.dragmousedown.left);var m=Math.abs(e.top-g.dragmousedown.top);if(k>3||m>3){g._createdragcolumn(f,e,true);a.data(g.dragcolumn[0],"datarecord",c.displayfield);if(j.preventDefault){j.preventDefault()}}}}})},_rendergroupcolumn:function(g,h){var e=a('<div style="float: left; position: relative;"></div>');if(this.rtl){e.css("float","right")}if(this.groupcolumnrenderer!=null){e[0].innerHTML=this.groupcolumnrenderer(g);e.addClass(this.toThemeProperty("jqx-grid-group-column"));e.addClass(this.toThemeProperty("jqx-fill-state-normal"))}if(this.closeablegroups){if(e[0].innerHTML==""){e[0].innerHTML='<a style="float: left;" href="#">'+g+"</a>"}if(this.rtl){e[0].innerHTML='<a style="float: right;" href="#">'+g+"</a>"}var d=!this.rtl?"right":"left";var c='<div style="float: '+d+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='<div style="float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>'}if(this.rtl){var c='<div style="float: '+d+'; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>';if(a.jqx.browser.msie&&a.jqx.browser.version<8){c='<div style="float: left; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-icon-close")+'"></div></div>'}}e[0].innerHTML+=c}else{if(e[0].innerHTML==""){e[0].innerHTML='<a href="#">'+g+"</a>"}}if(this.sortable){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>');if(this.closeablegroups){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -32px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 100%; top: 50%; margin-left: -32px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>')}if(this.rtl){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 0px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 0px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>');if(this.closeablegroups){var f=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortascbutton")+'"></div></div>');var b=a('<div style="float: right; min-height: 16px; min-width: 18px;"><div style="position: absolute; left: 0px; top: 50%; margin-left: 16px; margin-top: -8px; float: none; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-grid-column-sortdescbutton")+'"></div></div>')}}f.css("display","none");b.css("display","none");if(a.jqx.browser.msie&&a.jqx.browser.version<8){f.css("float","left");b.css("float","left")}e.append(f);e.append(b);a.data(document.body,"groupsortelements"+h,{sortasc:f,sortdesc:b})}e.addClass(this.toThemeProperty("jqx-fill-state-normal"));e.addClass(this.toThemeProperty("jqx-grid-group-column"));return e},_rendergroup:function(o,w,b,u,j,A,t){var F=w;var c=w.cells[b.level];if(this.rtl){c=w.cells[w.cells.length-1-b.level]}var E=this._findgroupstate(b.uniqueid);if(b.bounddata.subGroups.length>0||b.bounddata.subItems.length>0){var i=this.rtl?"-rtl":"";var B=this.toThemeProperty("jqx-icon-arrow-right");if(i){B=this.toThemeProperty("jqx-icon-arrow-left")}if(E){c.className+=" "+this.toThemeProperty("jqx-grid-group-expand"+i)+" "+this.toThemeProperty("jqx-icon-arrow-down")}else{c.className+=" "+this.toThemeProperty("jqx-grid-group-collapse"+i)+" "+B}}var s=this._getColumnText(this.groups[b.level]).label;var d=this.groupindentwidth;var q=this.rowdetails&&this.showrowdetailscolumn?(1+o)*d:(o)*d;var x=t-q;var g=b.level+1;if(this.rtl){g=0}var l=F.cells[g];var z=2;while(l!=undefined&&l.style.display=="none"&&z<F.cells.length-1){l=F.cells[g+z-1];z++}var f=a(l);if(!l){return}l.style.width=parseInt(x)+"px";if(l.className.indexOf("jqx-grid-cell-filter")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-filter"))}if(l.className.indexOf("jqx-grid-cell-sort")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-sort"))}if(l.className.indexOf("jqx-grid-cell-pinned")!=-1){f.removeClass(this.toThemeProperty("jqx-grid-cell-pinned"))}if(this.groupsrenderer!=null){var h={group:b.group,level:b.level,parent:b.bounddata.parentItem,subGroups:b.bounddata.subGroups,subItems:b.bounddata.subItems,groupcolumn:this._getColumnText(this.groups[b.level]).column};var p=this.groupsrenderer(s+": "+b.group,b.group,E,h);if(p){l.innerHTML=p}else{var k=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;l.innerHTML='<div class="'+this.toThemeProperty("jqx-grid-groups-row")+'" style="position: absolute;"><span>'+s+': </span><span class="'+this.toThemeProperty("jqx-grid-groups-row-details")+'">'+b.group+" ("+k+")</span></div>"}}else{var e=this._getcolumnbydatafield(this.groups[b.level]);var y=b.group;if(e!=null){if(e.cellsformat){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(y)){y=a.jqx.dataFormat.formatdate(y,e.cellsformat,this.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(y)){y=a.jqx.dataFormat.formatnumber(y,e.cellsformat,this.gridlocalization)}}}}var k=b.bounddata.subItems.length>0?b.bounddata.subItems.length:b.bounddata.subGroups.length;l.innerHTML='<div class="'+this.toThemeProperty("jqx-grid-groups-row")+'" style="position: absolute;"><span>'+s+': </span><span class="'+this.toThemeProperty("jqx-grid-groups-row-details")+'">'+y+" ("+k+")</span></div>"}else{throw new Error("jqxGrid: Unable to find '"+this.groups[b.level]+"' group in the Grid's columns collection.")}}if(this.rtl){if(!e){e=this._getcolumnbydatafield(this.groups[b.level])}var r=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max-this.hScrollInstance.value;var C=this.vScrollBar.css("visibility")=="hidden"?0:this.scrollbarsize+6;var q=this.rowdetails&&this.showrowdetailscolumn?(2+b.level)*d:(1+b.level)*d;l.style.width=t+parseInt(r)-q-C+"px";f.addClass(this.toThemeProperty("jqx-rtl"));var v=a(w.cells[w.cells.length-1]).css("z-index");f.css("z-index",v);var D=f.find("div");var x=D.width();D.css("left","100%");var n=this.columns.records[w.cells.length-2-b.level]!=null?this.columns.records[w.cells.length-2-b.level].pinned:false;if(this.table.width()<t){t=this.table.width();if(this.vScrollBar.css("visibility")!="hidden"){t+=this.vScrollBar.outerWidth()}}if(e.pinned||n){if(this.rowdetails&&this.showrowdetailscolumn){t+=30}D.css("margin-left",-x);l.style.width=t+r-q-C+"px"}else{var r=this.hScrollBar.css("visibility")=="hidden"?0:this.hScrollInstance.max;l.style.width=t+r-q-C+"px";var x=D.width();D.css("margin-left",-x)}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_initpager:function(){var r=this.that;var j=this.gridlocalization.pagergotopagestring;var s=this.gridlocalization.pagerrangestring;var l=this.gridlocalization.pagershowrowsstring;var m=(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",m);this.pager.append(this.pagerdiv);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>');this.pagerbuttons=a('<div style="margin-right: 3px; float: right;"></div>');if(this.pagershowrowscombo&&this.pagershowrowscombo.jqxDropDownList){this.pagershowrowscombo.remove();this.pagershowrowscombo=null}this.pagergotoinput.attr("disabled",this.disabled);this.pagerfirstbutton=a('<div type="button" style="padding: 0px; margin-top: 0px; margin-left: 3px; margin-right: 3px; width: 27px; float: right;"></div>');this.pagerlastbutton=a('<div type="button" style="padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"></div>');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.removeHandler(this.pagerfirstbutton,"mousedown");this.removeHandler(this.pagerfirstbutton,"mouseup");this.removeHandler(this.pagerfirstbutton,"click");this.removeHandler(this.pagerlastbutton,"mousedown");this.removeHandler(this.pagerlastbutton,"mouseup");this.removeHandler(this.pagerlastbutton,"click");this.pagerleftbutton.attr("title",this.gridlocalization.pagerpreviousbuttonstring);this.pagerrightbutton.attr("title",this.gridlocalization.pagernextbuttonstring);if(this.pagermode=="simple"){if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.pagerbuttons.css("overflow","visible");this.pagerbuttons.css("padding","3px")}this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring);this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring);var n=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");n.addClass(this.toThemeProperty("jqx-icon-arrow-first"));this.pagerfirstbutton.wrapInner(n);var g=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");g.addClass(this.toThemeProperty("jqx-icon-arrow-last"));this.pagerlastbutton.wrapInner(g);if(!this.rtl){this.pagerdiv.append(this.pagerfirstbutton);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerlastbutton)}else{this.pagerdiv.append(this.pagerlastbutton);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerfirstbutton)}this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});var t=!this.rtl?"left":"right";this.pagerbuttons.css("float",t);this.pagerlastbutton.css("float",t);this.pagerfirstbutton.css("float",t);this.pagerrightbutton.css("float",t);this.pagerleftbutton.css("float",t);this.pagerdetails.css("float",this.rtl?"left":"right");if(this.rtl){this.pagerdetails.css("margin-left","7px");this.pagerdetails.css("margin-right","0px")}else{this.pagerdetails.css("margin-left","0px");this.pagerdetails.css("margin-right","7px")}this.pagergotoinput.hide();this.pagershowrowscombo.hide();this.pagergoto.hide();this.pagershowrows.hide()}else{this.pagergotoinput.show();this.pagershowrowscombo.show();this.pagergoto.show();this.pagershowrows.show();if(!this.rtl){this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerleftbutton)}}this.pagerrightbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.find(".jqx-icon-arrow-left").remove();this.pagerrightbutton.find(".jqx-icon-arrow-right").remove();var c=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");c.addClass(this.toThemeProperty("jqx-icon-arrow-left"));this.pagerleftbutton.wrapInner(c);var d=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");d.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(d);this.pagerdiv.append(this.pagerdetails);if(this.pagermode!="simple"){if(!this.rtl){this.pagerdiv.append(this.pagershowrowscombo);this.pagerdiv.append(this.pagershowrows);this.pagerdiv.append(this.pagergotoinput);this.pagerdiv.append(this.pagergoto)}else{this.pagerdiv.append(this.pagergoto);this.pagerdiv.append(this.pagergotoinput);this.pagerdiv.append(this.pagershowrows);this.pagerdiv.append(this.pagershowrowscombo);this.pagerdiv.append(this.pagerdetails);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerleftbutton)}}var o=this.pagesizeoptions;if(!this.pagershowrowscombo.jqxDropDownList){throw new Error("jqxGrid: jqxdropdownlist.js is not loaded.");return}this.pagershowrowscombo.jqxDropDownList({rtl:this.rtl,disabled:this.disabled,source:o,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:16,theme:this.theme});var q=0;for(var p=0;p<o.length;p++){if(this.pagesize>=o[p]){q=p}}this.pagershowrows[0].innerHTML=l;this.pagergoto[0].innerHTML=j;this.updatepagerdetails();this.pagershowrowscombo.jqxDropDownList({selectedIndex:q});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 r=this.that;this.removeHandler(this.pagershowrowscombo,"select");this.addHandler(this.pagershowrowscombo,"select",function(w){if(w.args){if(r.vScrollInstance){r.vScrollInstance.setPosition(0)}if(r.editcell!=null&&r.endcelledit){r.endcelledit(r.editcell.row,r.editcell.column,true,false)}var u=w.args.index;var x=r.dataview.pagenum*r.dataview.pagesize;var v=o[u];var y=r.pagesize;r.pagesize=parseInt(v);if(isNaN(r.pagesize)){r.pagesize=10}if(v>=100){r.pagershowrowscombo.jqxDropDownList({width:"auto"})}else{r.pagershowrowscombo.jqxDropDownList({width:44})}r.dataview.pagesize=r.pagesize;var i=Math.floor(x/r.dataview.pagesize);r.prerenderrequired=true;r._requiresupdate=true;r._raiseEvent(10,{pagenum:i,oldpagesize:y,pagesize:r.dataview.pagesize});r.gotopage(i);if(r.autoheight&&r._updatesizeonwindowresize){r._updatesize(true);setTimeout(function(){r._updatesize(true)},500)}}});var k=this.pagergotoinput.find("input");k.addClass(this.toThemeProperty("jqx-grid-pager-input"));k.addClass(this.toThemeProperty("jqx-rc-all"));this.removeHandler(k,"keydown");this.removeHandler(k,"change");this.addHandler(k,"keydown",function(i){if(i.keyCode>=65&&i.keyCode<=90){return false}if(i.keyCode=="13"){var u=k.val();u=parseInt(u);if(!isNaN(u)){r.gotopage(u-1)}return false}});this.addHandler(k,"change",function(){var i=k.val();i=parseInt(i);if(!isNaN(i)){r.gotopage(i-1)}});this.addHandler(this.pagerrightbutton,"mouseenter",function(){d.addClass(r.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){c.addClass(r.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){d.addClass(r.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){c.addClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(a(document),"mouseup.pagerbuttons"+this.element.id,function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-selected"));c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerrightbutton,"click",function(){if(!r.pagerrightbutton.jqxButton("disabled")){if(!r.rtl){r.gotonextpage()}else{r.gotoprevpage()}}});this.addHandler(this.pagerleftbutton,"click",function(){if(!r.pagerleftbutton.jqxButton("disabled")){if(!r.rtl){r.gotoprevpage()}else{r.gotonextpage()}}});var f=this;if(this.pagermode==="simple"){var e=this.pagerfirstbutton;var h=this.pagerlastbutton;this.addHandler(h,"mouseenter",function(){g.addClass(f.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(e,"mouseenter",function(){n.addClass(f.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(h,"mouseleave",function(){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(e,"mouseleave",function(){n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(h,"mousedown",function(){g.addClass(f.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(e,"mousedown",function(){n.addClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(h,"mouseup",function(){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(e,"mouseup",function(){n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(a(document),"mouseup.pagerbuttons"+name+this.element.id,function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-right-selected"));c.removeClass(f.toThemeProperty("jqx-icon-arrow-left-selected"));if(g){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-selected"));n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))}});this.addHandler(e,"click",function(){if(!e.jqxButton("disabled")){if(!f.rtl){f.gotopage(0)}else{var u=f.dataview.totalrecords;var i=Math.ceil(u/f.pagesize);f.gotopage(i-1)}}});this.addHandler(h,"click",function(){if(!h.jqxButton("disabled")){if(!f.rtl){var u=f.dataview.totalrecords;var i=Math.ceil(u/f.pagesize);f.gotopage(i-1)}else{f.gotopage(0)}}})}}else{this.pagerdiv.children().remove();var b=this.pagerrenderer();if(b!=null){this.pagerdiv.append(a(b))}this.pager.append(this.pagerdiv)}this.vScrollBar.jqxScrollBar("refresh");this._arrange()},_updatepagertheme:function(){if(this.pagershowrowscombo==null){return}this.pagershowrowscombo.jqxDropDownList({theme:this.theme});this.pagerrightbutton.jqxButton({theme:this.theme});this.pagerleftbutton.jqxButton({theme:this.theme});this.pagerpageinput.removeClass();var c=this.pagergotoinput.find("input");c.removeClass();c.addClass(this.toThemeProperty("jqx-grid-pager-input"));c.addClass(this.toThemeProperty("jqx-rc-all"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-input"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-widget-content"));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 e=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");e.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(e);if(this.pagermode=="simple"){if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.pagerbuttons.css("overflow","visible");this.pagerbuttons.css("padding","3px")}this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring);this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring);var h=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");h.addClass(this.toThemeProperty("jqx-icon-arrow-first"));this.pagerfirstbutton.wrapInner(h);var g=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");g.addClass(this.toThemeProperty("jqx-icon-arrow-last"));this.pagerlastbutton.wrapInner(g);this.pagerdiv.append(this.pagerfirstbutton);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerlastbutton);this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerbuttons.css("float","left");this.pagerlastbutton.css("float","left");this.pagerfirstbutton.css("float","left");this.pagerrightbutton.css("float","left");this.pagerleftbutton.css("float","left");this.pagergotoinput.hide();this.pagershowrowscombo.hide();this.pagergoto.hide();this.pagershowrows.hide()}else{this.pagergotoinput.show();this.pagershowrowscombo.show();this.pagergoto.show();this.pagershowrows.show()}var b=function(j,i){j.removeHandler(i,"mouseenter");j.removeHandler(i,"mouseleave");j.removeHandler(i,"mousedown");j.removeHandler(i,"mouseup")};b(this,this.pagerrightbutton);b(this,this.pagerleftbutton);var f=this.that;this.addHandler(this.pagerrightbutton,"mouseenter",function(){e.addClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){d.addClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){e.removeClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){e.addClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){e.removeClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){d.addClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))})},gotopage:function(d){if(d==null||d==undefined){d=0}if(d==-1){d=0}if(d<0){return}var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var e=this.pagenum;this._raiseEvent(25,{oldpagenum:this.dataview.pagenum,pagenum:d,pagesize:this.dataview.pagesize});var b=Math.ceil(c/this.pagesize);if(d>=b){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(d>0){d=b-1}if(d<0){d=0}}if(this.dataview.pagenum!=d||this._requiresupdate){if(this.pageable){if(this.source.pager){this.source.pager(d,this.dataview.pagesize,this.dataview.pagenum)}this.dataview.pagenum=d;if(this.virtualmode){this.hiddens=new Array();this.expandedgroups=new Array();if(this.rendergridrows){var h=d*this.dataview.pagesize;var g=h+this.dataview.pagesize;if(h!=null&&g!=null){if(this.pagerrightbutton){this.pagerrightbutton.jqxButton({disabled:true});this.pagerleftbutton.jqxButton({disabled:true});this.pagershowrowscombo.jqxDropDownList({disabled:true})}if(this.pagerfirstbutton){this.pagerfirstbutton.jqxButton({disabled:true});this.pagerlastbutton.jqxButton({disabled:true})}this.updatebounddata("pagechanged");this._raiseEvent(9,{pagenum:d,oldpagenum:e,pagesize:this.dataview.pagesize});this.updatepagerdetails();if(this.autosavestate){if(this.savestate){this.savestate()}}return}}}else{this.dataview.updateview()}this._loadrows();this._updatepageviews();this.tableheight=null;this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);this.updatepagerdetails();if(this.autoheight||this.autorowheight){var f=this.host.height()-this._gettableheight();height=f+this._pageviews[0].height;if(height!=this.host.height()){this._arrange();this._updatepageviews();if(this.autorowheight){this._renderrows(this.virtualsizeinfo)}}}if(this.editcell!=null&&this.endcelledit){this.endcelledit(this.editcell.row,this.editcell.column,true,false)}this.focus();this._raiseEvent(9,{pagenum:d,oldpagenum:e,pagesize:this.dataview.pagesize});if(this.autosavestate){if(this.savestate){this.savestate()}}}}},gotoprevpage:function(){if(this.dataview.pagenum>0){this.gotopage(this.dataview.pagenum-1)}else{if(this.pagermode!="simple"){var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var b=Math.ceil(c/this.pagesize);this.gotopage(b-1)}}},gotonextpage:function(){var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var b=Math.ceil(c/this.pagesize);if(this.dataview.pagenum<b-1){this.gotopage(this.dataview.pagenum+1)}else{if(this.pagermode!="simple"){this.gotopage(0)}}},updatepagerdetails:function(){if(this.pagerdetails!=null&&this.pagerdetails.length>0){var n=this.dataview.pagenum*this.pagesize;var d=(this.dataview.pagenum+1)*this.pagesize;if(d>=this.dataview.totalrecords){d=this.dataview.totalrecords}var q=this.dataview.totalrecords;if(this.summaryrows){q+=this.summaryrows.length;if((this.dataview.pagenum+1)*this.pagesize>this.dataview.totalrecords){d=q}}n++;var g=Math.ceil(q/this.dataview.pagesize);if(g>=1){g--}g++;if(this.pagermode!=="simple"){var o=this.pagergotoinput.find("input");o.val(this.dataview.pagenum+1)}else{var b="";var f=this.pagerbuttonscount;if(f==0||!f){f=5}var h=0;if(this.rtl){h=f-1}while((this.rtl&&h>=0)||(!this.rtl&&h<f)){var m=1+h;var k=this.dataview.pagenum/f;var e=Math.floor(k);m+=e*f;var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(m>g){break}if(!this.rtl){if(h==0&&m>f){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(-1+m)+"'>...</a>"}}if(this.dataview.pagenum===m-1){l+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+m+"'>"+m+"</a>";if(h===f-1){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(g>=1+m){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(1+m)+"'>...</a>"}}}else{if(h===f-1){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(g>=1+m){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(1+m)+"'>...</a>"}}if(this.dataview.pagenum===m-1){l+=" "+this.toTP("jqx-fill-state-pressed")}b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+m+"'>"+m+"</a>"}if(this.rtl){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(h==0&&m>f){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(-1+m)+"'>...</a>"}}if(!this.rtl){h++}else{h--}}var p=this["pagerbuttons"].find("a");this.removeHandler(p,"click");this.removeHandler(p,"mouseenter");this.removeHandler(p,"mouseleave");this["pagerbuttons"][0].innerHTML=b;var j=this;var c=function(){j.addHandler(p,"click",function(i){var r=a(i.target).attr("data-page");j.gotopage(parseInt(r)-1);return false});j.addHandler(p,"mouseenter",function(i){a(i.target).addClass(j.toTP("jqx-fill-state-hover"))});j.addHandler(p,"mouseleave",function(i){a(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};var p=this["pagerbuttons"].find("a");c(p)}this.pagergotoinput.attr("title","1 - "+g);if(d==0&&d<n){n=0}if(!this.rtl){this.pagerdetails[0].innerHTML=n+"-"+d+this.gridlocalization.pagerrangestring+q}else{this.pagerdetails[0].innerHTML=q+this.gridlocalization.pagerrangestring+d+"-"+n}if(n>d){this.gotoprevpage()}}},_updatepagedview:function(e,g,b){var j=this.that;if(this.dataview.rows.length!=this.dataview.pagesize){this.dataview.updateview()}var k=this.dataview.rows.length;for(var d=0;d<k;d++){var f=this.dataview.rows[d].visibleindex;var h={index:f,height:this.heights[f],hidden:this.hiddens[f],details:this.details[f]};if(this.heights[f]==undefined){this.heights[f]=this.rowsheight;h.height=this.rowsheight}if(this.hiddens[f]==undefined){this.hiddens[f]=false;h.hidden=false}if(this.details[f]==undefined){this.details[f]=null}if(h.height!=j.rowsheight){g-=j.rowsheight;g+=h.height}if(h.hidden){g-=h.height}else{b+=h.height;var c=0;if(this.rowdetails){if(h.details&&h.details.rowdetails&&!h.details.rowdetailshidden){c=h.details.rowdetailsheight;b+=c;g+=c}}}}this._pageviews[0]={top:0,height:b};return g}})})(jqxBaseFramework); | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{_initpager:function(){var r=this.that;var j=this.gridlocalization.pagergotopagestring;var s=this.gridlocalization.pagerrangestring;var l=this.gridlocalization.pagershowrowsstring;var m=(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",m);this.pager.append(this.pagerdiv);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>');this.pagerbuttons=a('<div style="margin-right: 3px; float: right;"></div>');if(this.pagershowrowscombo&&this.pagershowrowscombo.jqxDropDownList){this.pagershowrowscombo.remove();this.pagershowrowscombo=null}this.pagergotoinput.attr("disabled",this.disabled);this.pagerfirstbutton=a('<div type="button" style="padding: 0px; margin-top: 0px; margin-left: 3px; margin-right: 3px; width: 27px; float: right;"></div>');this.pagerlastbutton=a('<div type="button" style="padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"></div>');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.removeHandler(this.pagerfirstbutton,"mousedown");this.removeHandler(this.pagerfirstbutton,"mouseup");this.removeHandler(this.pagerfirstbutton,"click");this.removeHandler(this.pagerlastbutton,"mousedown");this.removeHandler(this.pagerlastbutton,"mouseup");this.removeHandler(this.pagerlastbutton,"click");this.pagerleftbutton.attr("title",this.gridlocalization.pagerpreviousbuttonstring);this.pagerrightbutton.attr("title",this.gridlocalization.pagernextbuttonstring);if(this.pagermode=="simple"){if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.pagerbuttons.css("overflow","visible");this.pagerbuttons.css("padding","3px")}this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring);this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring);var n=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");n.addClass(this.toThemeProperty("jqx-icon-arrow-first"));this.pagerfirstbutton.wrapInner(n);var g=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");g.addClass(this.toThemeProperty("jqx-icon-arrow-last"));this.pagerlastbutton.wrapInner(g);if(!this.rtl){this.pagerdiv.append(this.pagerfirstbutton);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerlastbutton)}else{this.pagerdiv.append(this.pagerlastbutton);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerfirstbutton)}this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});var t=!this.rtl?"left":"right";this.pagerbuttons.css("float",t);this.pagerlastbutton.css("float",t);this.pagerfirstbutton.css("float",t);this.pagerrightbutton.css("float",t);this.pagerleftbutton.css("float",t);this.pagerdetails.css("float",this.rtl?"left":"right");if(this.rtl){this.pagerdetails.css("margin-left","7px");this.pagerdetails.css("margin-right","0px")}else{this.pagerdetails.css("margin-left","0px");this.pagerdetails.css("margin-right","7px")}this.pagergotoinput.hide();this.pagershowrowscombo.hide();this.pagergoto.hide();this.pagershowrows.hide()}else{this.pagergotoinput.show();this.pagershowrowscombo.show();this.pagergoto.show();this.pagershowrows.show();if(!this.rtl){this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerleftbutton)}}this.pagerrightbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.find(".jqx-icon-arrow-left").remove();this.pagerrightbutton.find(".jqx-icon-arrow-right").remove();var c=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");c.addClass(this.toThemeProperty("jqx-icon-arrow-left"));this.pagerleftbutton.wrapInner(c);var d=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");d.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(d);this.pagerdiv.append(this.pagerdetails);if(this.pagermode!="simple"){if(!this.rtl){this.pagerdiv.append(this.pagershowrowscombo);this.pagerdiv.append(this.pagershowrows);this.pagerdiv.append(this.pagergotoinput);this.pagerdiv.append(this.pagergoto)}else{this.pagerdiv.append(this.pagergoto);this.pagerdiv.append(this.pagergotoinput);this.pagerdiv.append(this.pagershowrows);this.pagerdiv.append(this.pagershowrowscombo);this.pagerdiv.append(this.pagerdetails);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerleftbutton)}}var o=this.pagesizeoptions;if(!this.pagershowrowscombo.jqxDropDownList){throw new Error("jqxGrid: jqxdropdownlist.js is not loaded.");return}this.pagershowrowscombo.jqxDropDownList({rtl:this.rtl,disabled:this.disabled,source:o,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:16,theme:this.theme});var q=0;for(var p=0;p<o.length;p++){if(this.pagesize>=o[p]){q=p}}this.pagershowrows[0].innerHTML=l;this.pagergoto[0].innerHTML=j;this.updatepagerdetails();this.pagershowrowscombo.jqxDropDownList({selectedIndex:q});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 r=this.that;this.removeHandler(this.pagershowrowscombo,"select");this.addHandler(this.pagershowrowscombo,"select",function(w){if(w.args){if(r.vScrollInstance){r.vScrollInstance.setPosition(0)}if(r.editcell!=null&&r.endcelledit){r.endcelledit(r.editcell.row,r.editcell.column,true,false)}var u=w.args.index;var x=r.dataview.pagenum*r.dataview.pagesize;var v=o[u];var y=r.pagesize;r.pagesize=parseInt(v);if(isNaN(r.pagesize)){r.pagesize=10}if(v>=100){r.pagershowrowscombo.jqxDropDownList({width:"auto"})}else{r.pagershowrowscombo.jqxDropDownList({width:44})}r.dataview.pagesize=r.pagesize;var i=Math.floor(x/r.dataview.pagesize);r.prerenderrequired=true;r._requiresupdate=true;r._raiseEvent(10,{pagenum:i,oldpagesize:y,pagesize:r.dataview.pagesize});r.gotopage(i);if(r.autoheight&&r._updatesizeonwindowresize){r._updatesize(true);setTimeout(function(){r._updatesize(true)},500)}}});var k=this.pagergotoinput.find("input");k.addClass(this.toThemeProperty("jqx-grid-pager-input"));k.addClass(this.toThemeProperty("jqx-rc-all"));this.removeHandler(k,"keydown");this.removeHandler(k,"change");this.addHandler(k,"keydown",function(i){if(i.keyCode>=65&&i.keyCode<=90){return false}if(i.keyCode=="13"){var u=k.val();u=parseInt(u);if(!isNaN(u)){r.gotopage(u-1)}return false}});this.addHandler(k,"change",function(){var i=k.val();i=parseInt(i);if(!isNaN(i)){r.gotopage(i-1)}});this.addHandler(this.pagerrightbutton,"mouseenter",function(){d.addClass(r.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){c.addClass(r.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){d.addClass(r.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){c.addClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(a(document),"mouseup.pagerbuttons"+this.element.id,function(){d.removeClass(r.toThemeProperty("jqx-icon-arrow-right-selected"));c.removeClass(r.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerrightbutton,"click",function(){if(!r.pagerrightbutton.jqxButton("disabled")){if(!r.rtl){r.gotonextpage()}else{r.gotoprevpage()}}});this.addHandler(this.pagerleftbutton,"click",function(){if(!r.pagerleftbutton.jqxButton("disabled")){if(!r.rtl){r.gotoprevpage()}else{r.gotonextpage()}}});var f=this;if(this.pagermode==="simple"){var e=this.pagerfirstbutton;var h=this.pagerlastbutton;this.addHandler(h,"mouseenter",function(){g.addClass(f.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(e,"mouseenter",function(){n.addClass(f.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(h,"mouseleave",function(){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(e,"mouseleave",function(){n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(h,"mousedown",function(){g.addClass(f.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(e,"mousedown",function(){n.addClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(h,"mouseup",function(){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(e,"mouseup",function(){n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(a(document),"mouseup.pagerbuttons"+name+this.element.id,function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-right-selected"));c.removeClass(f.toThemeProperty("jqx-icon-arrow-left-selected"));if(g){g.removeClass(f.toThemeProperty("jqx-icon-arrow-last-selected"));n.removeClass(f.toThemeProperty("jqx-icon-arrow-first-selected"))}});this.addHandler(e,"click",function(){if(!e.jqxButton("disabled")){if(!f.rtl){f.gotopage(0)}else{var u=f.dataview.totalrecords;var i=Math.ceil(u/f.pagesize);f.gotopage(i-1)}}});this.addHandler(h,"click",function(){if(!h.jqxButton("disabled")){if(!f.rtl){var u=f.dataview.totalrecords;var i=Math.ceil(u/f.pagesize);f.gotopage(i-1)}else{f.gotopage(0)}}})}}else{this.pagerdiv.children().remove();var b=this.pagerrenderer();if(b!=null){this.pagerdiv.append(a(b))}this.pager.append(this.pagerdiv)}this.vScrollBar.jqxScrollBar("refresh");this._arrange()},_updatepagertheme:function(){if(this.pagershowrowscombo==null){return}this.pagershowrowscombo.jqxDropDownList({theme:this.theme});this.pagerrightbutton.jqxButton({theme:this.theme});this.pagerleftbutton.jqxButton({theme:this.theme});this.pagerpageinput.removeClass();var c=this.pagergotoinput.find("input");c.removeClass();c.addClass(this.toThemeProperty("jqx-grid-pager-input"));c.addClass(this.toThemeProperty("jqx-rc-all"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-input"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-widget-content"));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 e=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");e.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(e);if(this.pagermode=="simple"){if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.pagerbuttons.css("overflow","visible");this.pagerbuttons.css("padding","3px")}this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring);this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring);var h=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");h.addClass(this.toThemeProperty("jqx-icon-arrow-first"));this.pagerfirstbutton.wrapInner(h);var g=a("<div style='margin-left: 6px; width: 15px; height: 15px;'></div>");g.addClass(this.toThemeProperty("jqx-icon-arrow-last"));this.pagerlastbutton.wrapInner(g);this.pagerdiv.append(this.pagerfirstbutton);this.pagerdiv.append(this.pagerleftbutton);this.pagerdiv.append(this.pagerbuttons);this.pagerdiv.append(this.pagerrightbutton);this.pagerdiv.append(this.pagerlastbutton);this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerbuttons.css("float","left");this.pagerlastbutton.css("float","left");this.pagerfirstbutton.css("float","left");this.pagerrightbutton.css("float","left");this.pagerleftbutton.css("float","left");this.pagergotoinput.hide();this.pagershowrowscombo.hide();this.pagergoto.hide();this.pagershowrows.hide()}else{this.pagergotoinput.show();this.pagershowrowscombo.show();this.pagergoto.show();this.pagershowrows.show()}var b=function(j,i){j.removeHandler(i,"mouseenter");j.removeHandler(i,"mouseleave");j.removeHandler(i,"mousedown");j.removeHandler(i,"mouseup")};b(this,this.pagerrightbutton);b(this,this.pagerleftbutton);var f=this.that;this.addHandler(this.pagerrightbutton,"mouseenter",function(){e.addClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){d.addClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){e.removeClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){e.addClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){e.removeClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){d.addClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){d.removeClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))})},gotopage:function(d){if(d==null||d==undefined){d=0}if(d==-1){d=0}if(d<0){return}var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var e=this.pagenum;this._raiseEvent(25,{oldpagenum:this.dataview.pagenum,pagenum:d,pagesize:this.dataview.pagesize});var b=Math.ceil(c/this.pagesize);if(d>=b){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(d>0){d=b-1}if(d<0){d=0}}if(this.dataview.pagenum!=d||this._requiresupdate){if(this.pageable){if(this.source.pager){this.source.pager(d,this.dataview.pagesize,this.dataview.pagenum)}this.dataview.pagenum=d;if(this.virtualmode){this.hiddens=new Array();this.expandedgroups=new Array();if(this.rendergridrows){var h=d*this.dataview.pagesize;var g=h+this.dataview.pagesize;if(h!=null&&g!=null){if(this.pagerrightbutton){this.pagerrightbutton.jqxButton({disabled:true});this.pagerleftbutton.jqxButton({disabled:true});this.pagershowrowscombo.jqxDropDownList({disabled:true})}if(this.pagerfirstbutton){this.pagerfirstbutton.jqxButton({disabled:true});this.pagerlastbutton.jqxButton({disabled:true})}this.updatebounddata("pagechanged");this._raiseEvent(9,{pagenum:d,oldpagenum:e,pagesize:this.dataview.pagesize});this.updatepagerdetails();if(this.autosavestate){if(this.savestate){this.savestate()}}return}}}else{this.dataview.updateview()}this._loadrows();this._updatepageviews();this.tableheight=null;this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);this.updatepagerdetails();if(this.autoheight||this.autorowheight){var f=this.host.height()-this._gettableheight();height=f+this._pageviews[0].height;if(height!=this.host.height()){this._arrange();this._updatepageviews();if(this.autorowheight){this._renderrows(this.virtualsizeinfo)}}}if(this.editcell!=null&&this.endcelledit){this.endcelledit(this.editcell.row,this.editcell.column,false,false)}this.focus();this._raiseEvent(9,{pagenum:d,oldpagenum:e,pagesize:this.dataview.pagesize});if(this.autosavestate){if(this.savestate){this.savestate()}}}}},gotoprevpage:function(){if(this.dataview.pagenum>0){this.gotopage(this.dataview.pagenum-1)}else{if(this.pagermode!="simple"){var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var b=Math.ceil(c/this.pagesize);this.gotopage(b-1)}}},gotonextpage:function(){var c=this.dataview.totalrecords;if(this.summaryrows){c+=this.summaryrows.length}var b=Math.ceil(c/this.pagesize);if(this.dataview.pagenum<b-1){this.gotopage(this.dataview.pagenum+1)}else{if(this.pagermode!="simple"){this.gotopage(0)}}},updatepagerdetails:function(){if(this.pagerdetails!=null&&this.pagerdetails.length>0){var n=this.dataview.pagenum*this.pagesize;var d=(this.dataview.pagenum+1)*this.pagesize;if(d>=this.dataview.totalrecords){d=this.dataview.totalrecords}var q=this.dataview.totalrecords;if(this.summaryrows){q+=this.summaryrows.length;if((this.dataview.pagenum+1)*this.pagesize>this.dataview.totalrecords){d=q}}n++;var g=Math.ceil(q/this.dataview.pagesize);if(g>=1){g--}g++;if(this.pagermode!=="simple"){var o=this.pagergotoinput.find("input");o.val(this.dataview.pagenum+1)}else{var b="";var f=this.pagerbuttonscount;if(f==0||!f){f=5}var h=0;if(this.rtl){h=f-1}while((this.rtl&&h>=0)||(!this.rtl&&h<f)){var m=1+h;var k=this.dataview.pagenum/f;var e=Math.floor(k);m+=e*f;var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(m>g){break}if(!this.rtl){if(h==0&&m>f){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(-1+m)+"'>...</a>"}}if(this.dataview.pagenum===m-1){l+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+m+"'>"+m+"</a>";if(h===f-1){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(g>=1+m){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(1+m)+"'>...</a>"}}}else{if(h===f-1){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(g>=1+m){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(1+m)+"'>...</a>"}}if(this.dataview.pagenum===m-1){l+=" "+this.toTP("jqx-fill-state-pressed")}b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+m+"'>"+m+"</a>"}if(this.rtl){var l=this.toTP("jqx-grid-pager-number");l+=" "+this.toTP("jqx-rc-all");if(h==0&&m>f){b+="<a class='"+l+"' tabindex=-1 href='javascript:;' data-page='"+(-1+m)+"'>...</a>"}}if(!this.rtl){h++}else{h--}}var p=this["pagerbuttons"].find("a");this.removeHandler(p,"click");this.removeHandler(p,"mouseenter");this.removeHandler(p,"mouseleave");this["pagerbuttons"][0].innerHTML=b;var j=this;var c=function(){j.addHandler(p,"click",function(i){var r=a(i.target).attr("data-page");j.gotopage(parseInt(r)-1);return false});j.addHandler(p,"mouseenter",function(i){a(i.target).addClass(j.toTP("jqx-fill-state-hover"))});j.addHandler(p,"mouseleave",function(i){a(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};var p=this["pagerbuttons"].find("a");c(p)}this.pagergotoinput.attr("title","1 - "+g);if(d==0&&d<n){n=0}if(!this.rtl){this.pagerdetails[0].innerHTML=n+"-"+d+this.gridlocalization.pagerrangestring+q}else{this.pagerdetails[0].innerHTML=q+this.gridlocalization.pagerrangestring+d+"-"+n}if(n>d){this.gotoprevpage()}}},_updatepagedview:function(e,g,b){var j=this.that;if(this.dataview.rows.length!=this.dataview.pagesize){this.dataview.updateview()}var k=this.dataview.rows.length;for(var d=0;d<k;d++){var f=this.dataview.rows[d].visibleindex;var h={index:f,height:this.heights[f],hidden:this.hiddens[f],details:this.details[f]};if(this.heights[f]==undefined){this.heights[f]=this.rowsheight;h.height=this.rowsheight}if(this.hiddens[f]==undefined){this.hiddens[f]=false;h.hidden=false}if(this.details[f]==undefined){this.details[f]=null}if(h.height!=j.rowsheight){g-=j.rowsheight;g+=h.height}if(h.hidden){g-=h.height}else{b+=h.height;var c=0;if(this.rowdetails){if(h.details&&h.details.rowdetails&&!h.details.rowdetailshidden){c=h.details.rowdetailsheight;b+=c;g+=c}}}}this._pageviews[0]={top:0,height:b};return g}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{selectallrows:function(){this._trigger=false;var d=this.virtualmode?this.dataview.totalrecords:this.dataview.loadedrecords.length;this.selectedrowindexes=new Array();var e=this.dataview.loadedrecords;for(var c=0;c<d;c++){var f=e[c];if(!f){this.selectedrowindexes[c]=c;continue}var b=this.getboundindex(f);if(b!=undefined){this.selectedrowindexes[c]=b}}if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){if(this._checkboxcolumn){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:true})}}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(2,{rowindex:this.selectedrowindexes})}},unselectallrows:function(){this._trigger=false;var c=this.virtualmode?this.dataview.totalrecords:this.dataview.loadedrecords.length;this.selectedrowindexes=new Array();var d=this.dataview.loadedrecords;for(var b=0;b<c;b++){var e=d[b];if(!e){this.selectedrowindexes[b]=b;continue}delete this.selectedrowindexes[b]}if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){if(this._checkboxcolumn){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(2,{rowindex:this.selectedrowindexes})}},selectrow:function(b,c){this._applyrowselection(b,true,c);if(c!==false){this._updatecheckboxselection()}},_updatecheckboxselection:function(){if(this.selectionmode=="checkbox"){var d=this.getrows();if(d&&this._checkboxcolumn){if(d.length===0){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false});return}var c=d.length;if(this.groupable){c=this.dataview.loadedrecords.length}if(this.virtualmode){c=this.source._source.totalrecords}var b=this.selectedrowindexes.length;if(b===c){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:true})}else{if(b===0){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}else{this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:null})}}}}},unselectrow:function(b,c){this._applyrowselection(b,false,c);if(c!==false){this._updatecheckboxselection()}},selectcell:function(c,b){this._applycellselection(c,b,true)},unselectcell:function(c,b){this._applycellselection(c,b,false)},clearselection:function(c,d){this._trigger=false;this.selectedrowindex=-1;this._oldselectedcell=null;if(d!==false){for(var b=0;b<this.selectedrowindexes.length;b++){this._raiseEvent(3,{rowindex:this.selectedrowindexes[b]})}}this.selectedrowindexes=new Array();this.selectedcells=new Array();this.selectedcell=null;if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}if(false===c){this._trigger=true;return}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(3,{rowindex:this.selectedrowindexes})}},getselectedrowindex:function(){if(this.selectedrowindex==-1){for(var b=0;b<this.selectedrowindexes.length;b++){return this.selectedrowindexes[b]}}return this.selectedrowindex},getselectedrowindexes:function(){return this.selectedrowindexes},getselectedcell:function(){if(!this.selectedcell){return null}var b=this.selectedcell;b.row=this.selectedcell.rowindex;b.column=this.selectedcell.datafield;b.value=this.getcellvalue(b.row,b.column);return b},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 g="";var m=this;this.clipboardselection={};this._clipboardselection=[];var l=m.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){l=this._getcellsforcopypaste()}if(l!=null&&l.length>0){var n=999999999999999;var k=-1;for(var e=0;e<l.length;e++){var h=l[e];var b=m.getcolumn(h.datafield);if(b!=null){var j=m.getcelltext(h.rowindex,h.datafield);var d=this.getrowdisplayindex(h.rowindex);if(!this.clipboardselection[d]){this.clipboardselection[d]={}}this.clipboardselection[d][h.datafield]=j;n=Math.min(n,d);k=Math.max(k,d)}}for(var c=n;c<=k;c++){var f=0;this._clipboardselection[this._clipboardselection.length]=new Array();if(this.clipboardselection[c]!=undefined){a.each(this.clipboardselection[c],function(i,o){if(f>0){g+="\t"}var p=o;if(o==null){p=""}m._clipboardselection[m._clipboardselection.length-1][f]=p;f++;g+=p})}if(c<k){g+="\r\n"}}}this.clipboardselectedtext=g;return g},pasteselection:function(){var q=this.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){q=this._getcellsforcopypaste()}if(q!=null&&q.length>0){var p=q[0].rowindex;var i=this.getrowdisplayindex(p);var g=q[0].datafield;var m=this._getcolumnindex(g);var l=0;this.selectedrowindexes=new Array();this.selectedcells=new Array();if(!this._clipboardselection){return}for(var r=0;r<this._clipboardselection.length;r++){for(var k=0;k<this._clipboardselection[r].length;k++){var h=this.getcolumnat(m+k);if(!h){continue}var f=this.getrowboundindex(i+r);var n=this.getcell(f,h.datafield);var d=null;d=this._clipboardselection[r][k];if(d!=null){if(h.cellsformat){if(h.cellsformat.indexOf("p")!=-1||h.cellsformat.indexOf("c")!=-1||h.cellsformat.indexOf("n")!=-1||h.cellsformat.indexOf("f")!=-1){if(d.indexOf(this.gridlocalization.currencysymbol)>-1){d=d.replace(this.gridlocalization.currencysymbol,"")}var j=function(v,t,u){var c=v;if(t==u){return v}var s=c.indexOf(t);while(s!=-1){c=c.replace(t,u);s=c.indexOf(t)}return c};d=j(d,this.gridlocalization.thousandsseparator,"");d=d.replace(this.gridlocalization.decimalseparator,".");if(d.indexOf(this.gridlocalization.percentsymbol)>-1){d=d.replace(this.gridlocalization.percentsymbol,"")}var e="";for(var o=0;o<d.length;o++){var b=d.substring(o,o+1);if(b==="-"){e+="-"}if(b==="."){e+="."}if(b.match(/^[0-9]+$/)!=null){e+=b}}d=e;d=d.replace(/ /g,"");d=new Number(d);if(isNaN(d)){d=""}}}this._raiseEvent(17,{rowindex:f,datafield:n.datafield,value:d});this.setcellvalue(f,n.column,d,false);this._raiseEvent(18,{rowindex:f,datafield:n.datafield,oldvalue:this.getcellvalue(n.rowindex,n.datafield),value:d});this._applycellselection(f,n.datafield,true,false)}}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}},_applyrowselection:function(e,i,f,h,b){if(e==null){return false}var j=this.selectedrowindex;if(this.selectionmode=="singlerow"){if(i){this._raiseEvent(2,{rowindex:e,row:this.getrowdata(e)})}else{this._raiseEvent(3,{rowindex:e,row:this.getrowdata(e)})}this._raiseEvent(3,{rowindex:j});this.selectedrowindexes=new Array();this.selectedcells=new Array()}if(h==true){this.selectedrowindexes=new Array()}if(this.dataview.filters.length>0){var c=this.getrowdata(e);if(c&&c.dataindex!==undefined){e=c.dataindex}else{if(c&&c.dataindex===undefined){if(c.uid!=undefined){e=this.getrowboundindexbyid(c.uid)}}}}var d=this.selectedrowindexes.indexOf(e);if(i){this.selectedrowindex=e;if(d==-1){this.selectedrowindexes.push(e);if(this.selectionmode!="singlerow"){this._raiseEvent(2,{rowindex:e,row:this.getrowdata(e)})}}else{if(this.selectionmode=="multiplerows"){this.selectedrowindexes.splice(d,1);this._raiseEvent(3,{rowindex:this.selectedrowindex,row:this.getrowdata(e)});this.selectedrowindex=this.selectedrowindexes.length>0?this.selectedrowindexes[this.selectedrowindexes.length-1]:-1}}}else{if(d>=0||this.selectionmode=="singlerow"||this.selectionmode=="multiplerowsextended"||this.selectionmode=="multiplerowsadvanced"){var g=this.selectedrowindexes[d];this.selectedrowindexes.splice(d,1);this._raiseEvent(3,{rowindex:g,row:this.getrowdata(e)});this.selectedrowindex=-1}}if(f==undefined||f){this._rendervisualrows()}return true},_applycellselection:function(e,b,h,f){if(e==null){return false}if(b==null){return false}var j=this.selectedrowindex;if(this.selectionmode=="singlecell"){var d=this.selectedcell;if(d!=null){this._raiseEvent(16,{rowindex:d.rowindex,datafield:d.datafield})}this.selectedcells=new Array()}if(this.selectionmode=="multiplecellsextended"||this.selectionmode=="multiplecellsadvanced"){var d=this.selectedcell;if(d!=null){this._raiseEvent(16,{rowindex:d.rowindex,datafield:d.datafield})}}var g=e+"_"+b;if(this.dataview.filters.length>0){var c=this.getrowdata(e);if(c&&c.dataindex!==undefined){e=c.dataindex;var g=e+"_"+b}else{if(c&&c.dataindex===undefined){if(c.uid){e=this.getrowboundindexbyid(c.uid);var g=e+"_"+b}}}}var i={rowindex:e,datafield:b};if(h){this.selectedcell=i;if(!this.selectedcells[g]){this.selectedcells[g]=i;this.selectedcells.length++;this._raiseEvent(15,i)}else{if(this.selectionmode=="multiplecells"||this.selectionmode=="multiplecellsextended"||this.selectionmode=="multiplecellsadvanced"){delete this.selectedcells[g];if(this.selectedcells.length>0){this.selectedcells.length--}this._raiseEvent(16,i)}}}else{delete this.selectedcells[g];if(this.selectedcells.length>0){this.selectedcells.length--}this._raiseEvent(16,i)}if(f==undefined||f){this._rendervisualrows()}return true},_getcellindex:function(b){var c=-1;a.each(this.selectedcells,function(){c++;if(this[b]){return false}});return c},_clearhoverstyle:function(){if(undefined==this.hoveredrow||this.hoveredrow==-1){return}if(this.vScrollInstance.isScrolling()){return}if(this.hScrollInstance.isScrolling()){return}var b=this.table.find(".jqx-grid-cell-hover");if(b.length>0){b.removeClass(this.toTP("jqx-grid-cell-hover"));b.removeClass(this.toTP("jqx-fill-state-hover"))}this.hoveredrow=-1},_clearselectstyle:function(){var k=this.table[0].rows.length;var p=this.table[0].rows;var l=this.toTP("jqx-grid-cell-selected");var c=this.toTP("jqx-fill-state-pressed");var m=this.toTP("jqx-grid-cell-hover");var h=this.toTP("jqx-fill-state-hover");for(var g=0;g<k;g++){var b=p[g];var f=b.cells.length;var o=b.cells;for(var e=0;e<f;e++){var d=o[e];var n=a(d);if(d.className.indexOf("jqx-grid-cell-selected")!=-1){n.removeClass(l);n.removeClass(c)}if(d.className.indexOf("jqx-grid-cell-hover")!=-1){n.removeClass(m);n.removeClass(h)}}}},_selectpath:function(n,e){var l=this;var i=this._lastClickedCell?Math.min(this._lastClickedCell.row,n):0;var k=this._lastClickedCell?Math.max(this._lastClickedCell.row,n):0;if(i<=k){var h=this._getcolumnindex(this._lastClickedCell.column);var g=this._getcolumnindex(e);var f=Math.min(h,g);var d=Math.max(h,g);this.selectedcells=new Array();var m=this.dataview.loadedrecords;for(var b=i;b<=k;b++){for(var j=f;j<=d;j++){var n=m[b];this._applycellselection(l.getboundindex(n),l._getcolumnat(j).datafield,true,false)}}this._rendervisualrows()}},_selectrowpath:function(g){if(this.selectionmode=="multiplerowsextended"){var c=this;var b=this._lastClickedCell?Math.min(this._lastClickedCell.row,g):0;var h=this._lastClickedCell?Math.max(this._lastClickedCell.row,g):0;var f=this.dataview.loadedrecords;if(b<=h){this.selectedrowindexes=new Array();for(var e=b;e<=h;e++){var g=f[e];var d=this.getrowboundindex(e);this._applyrowselection(d,true,false)}this._rendervisualrows()}}},_selectrowwithmouse:function(p,b,c,f,d,s){var j=b.row;if(j==undefined){return}var k=b.index;if(this.hittestinfo[k]==undefined){return}var t=this.hittestinfo[k].visualrow;if(this.hittestinfo[k].details){return}var m=t.cells[0].className;if(j.group){return}if(this.selectionmode=="multiplerows"||this.selectionmode=="multiplecells"||this.selectionmode=="checkbox"||(this.selectionmode.indexOf("multiple")!=-1&&(s==true||d==true))){var l=this.getboundindex(j);if(this.dataview.filters.length>0){var v=this.getrowdata(l);if(v){l=v.dataindex;if(l==undefined){var l=this.getboundindex(j)}}}var q=c.indexOf(l)!=-1;var w=this.getboundindex(j)+"_"+f;if(this.selectionmode.indexOf("cell")!=-1){var h=this.selectedcells[w]!=undefined;if(this.selectedcells[w]!=undefined&&h){this._selectcellwithstyle(p,false,k,f,t)}else{this._selectcellwithstyle(p,true,k,f,t)}if(s&&this._lastClickedCell==undefined){var g=this.getselectedcells();if(g&&g.length>0){this._lastClickedCell={row:g[0].rowindex,column:g[0].datafield}}}if(s&&this._lastClickedCell){this._selectpath(j.visibleindex,f);this.mousecaptured=false;if(this.selectionarea.css("visibility")=="visible"){this.selectionarea.css("visibility","hidden")}}}else{if(q){if(d){this._applyrowselection(this.getboundindex(j),false)}else{this._selectrowwithstyle(p,t,false,f)}}else{this._selectrowwithstyle(p,t,true,f)}if(s&&this._lastClickedCell==undefined){var i=this.getselectedrowindexes();if(i&&i.length>0){this._lastClickedCell={row:i[0],column:f}}}if(s&&this._lastClickedCell){this.selectedrowindexes=new Array();var e=this._lastClickedCell?Math.min(this._lastClickedCell.row,j.visibleindex):0;var u=this._lastClickedCell?Math.max(this._lastClickedCell.row,j.visibleindex):0;var n=this.dataview.loadedrecords;for(var o=e;o<=u;o++){var j=n[o];if(j){this._applyrowselection(this.getboundindex(j),true,false,false)}}this._rendervisualrows()}}}else{this._clearselectstyle();this._selectrowwithstyle(p,t,true,f);if(this.selectionmode.indexOf("cell")!=-1){this._selectcellwithstyle(p,true,k,f,t)}}if(!s){this._lastClickedCell={row:j.visibleindex,column:f}}},_selectcellwithstyle:function(d,c,g,f,e){var b=a(e.cells[d._getcolumnindex(f)]);b.removeClass(this.toTP("jqx-grid-cell-hover"));b.removeClass(this.toTP("jqx-fill-state-hover"));if(c){b.addClass(this.toTP("jqx-grid-cell-selected"));b.addClass(this.toTP("jqx-fill-state-pressed"))}else{b.removeClass(this.toTP("jqx-grid-cell-selected"));b.removeClass(this.toTP("jqx-fill-state-pressed"))}},_selectrowwithstyle:function(e,h,b,j){var c=h.cells.length;var f=0;if(e.rowdetails&&e.showrowdetailscolumn){if(!this.rtl){f=1+this.groups.length}else{c-=1;c-=this.groups.length}}else{if(this.groupable){if(!this.rtl){f=this.groups.length}else{c-=this.groups.length}}}for(var g=f;g<c;g++){var d=h.cells[g];if(b){a(d).removeClass(this.toTP("jqx-grid-cell-hover"));a(d).removeClass(this.toTP("jqx-fill-state-hover"));if(e.selectionmode.indexOf("cell")==-1){a(d).addClass(this.toTP("jqx-grid-cell-selected"));a(d).addClass(this.toTP("jqx-fill-state-pressed"))}}else{a(d).removeClass(this.toTP("jqx-grid-cell-hover"));a(d).removeClass(this.toTP("jqx-grid-cell-selected"));a(d).removeClass(this.toTP("jqx-fill-state-hover"));a(d).removeClass(this.toTP("jqx-fill-state-pressed"))}}},_handlemousemoveselection:function(ab,o){if(o.hScrollInstance.isScrolling()||o.vScrollInstance.isScrolling()){return false}if((o.selectionmode=="multiplerowsextended"||o.selectionmode=="multiplecellsextended"||o.selectionmode=="multiplecellsadvanced")&&o.mousecaptured){if(o.multipleselectionbegins){var b=o.multipleselectionbegins(ab);if(b===false){return true}}var aa=this.showheader?this.columnsheader.height()+2:0;var I=this._groupsheader()?this.groupsheader.height():0;var K=this.showtoolbar?this.toolbar.height():0;I+=K;var Z=this.host.coord();if(this.hasTransform){Z=a.jqx.utilities.getOffset(this.host);var ad=this._getBodyOffset();Z.left-=ad.left;Z.top-=ad.top}if(this.host.css("border-top-width")==="0px"){I-=2}var M=ab.pageX;var L=ab.pageY-I;if(Math.abs(this.mousecaptureposition.left-M)>3||Math.abs(this.mousecaptureposition.top-L)>3){var f=parseInt(this.columnsheader.coord().top);if(this.hasTransform){f=a.jqx.utilities.getOffset(this.columnsheader).top}if(M<Z.left){M=Z.left}if(M>Z.left+this.host.width()){M=Z.left+this.host.width()}var X=Z.top+aa;if(L<X){L=X+5}var J=parseInt(Math.min(o.mousecaptureposition.left,M));var g=-5+parseInt(Math.min(o.mousecaptureposition.top,L));var H=parseInt(Math.abs(o.mousecaptureposition.left-M));var P=parseInt(Math.abs(o.mousecaptureposition.top-L));J-=Z.left;g-=Z.top;this.selectionarea.css("visibility","visible");if(o.selectionmode=="multiplecellsadvanced"){var M=J;var t=M+H;var G=M;var n=o.hScrollInstance;var v=n.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){v=n.max-n.value}if(this.vScrollBar[0].style.visibility!="hidden"){}}var h=o.table[0].rows[0];var T=0;var B=o.mousecaptureposition.clickedcell;var A=B;var m=false;var r=0;var ac=h.cells.length;if(o.mousecaptureposition.left<=ab.pageX){r=B}for(var W=r;W<ac;W++){var Y=parseInt(a(this.columnsrow[0].cells[W]).css("left"));var j=Y-v;if(o.columns.records[W].pinned){j=Y;continue}var O=this._getcolumnat(W);if(O!=null&&O.hidden){continue}if(o.groupable&&o.groups.length>0){if(W<o.groups.length){continue}}var S=j+a(this.columnsrow[0].cells[W]).width();if(o.mousecaptureposition.left>ab.pageX){if(S>=M&&M>=j){A=W;m=true;break}}else{if(S>=t&&t>=j){A=W;m=true;break}}}if(!m){if(o.mousecaptureposition.left>ab.pageX){a.each(this.columns.records,function(i,k){if(o.groupable&&o.groups.length>0){if(i<o.groups.length){return true}}if(!this.pinned&&!this.hidden){A=i;return false}})}else{if(!o.groupable||(o.groupable&&!o.groups.length>0)){A=h.cells.length-1}}}var N=B;B=Math.min(B,A);A=Math.max(N,A);g+=5;g+=I;var R=o.table[0].rows.indexOf(o.mousecaptureposition.clickedrow);var w=0;var e=-1;var u=-1;var d=0;for(var W=0;W<o.table[0].rows.length;W++){var s=a(o.table[0].rows[W]);if(W==0){d=s.coord().top}var F=s.height();var z=d-Z.top;if(e==-1&&z+F>=g){var c=false;for(var Q=0;Q<o.groups.length;Q++){var V=s[0].cells[Q].className;if(V.indexOf("jqx-grid-group-collapse")!=-1||V.indexOf("jqx-grid-group-expand")!=-1){c=true;break}}if(c){continue}e=W}d+=F;if(o.groupable&&o.groups.length>0){var c=false;for(var Q=0;Q<o.groups.length;Q++){var V=s[0].cells[Q].className;if(V.indexOf("jqx-grid-group-collapse")!=-1||V.indexOf("jqx-grid-group-expand")!=-1){c=true;break}}if(c){continue}var T=0;for(var U=o.groups.length;U<s[0].cells.length;U++){var E=s[0].cells[U];if(a(E).html()==""){T++}}if(T==s[0].cells.length-o.groups.length){continue}}if(e!=-1){w+=F}if(z+F>g+P){u=W;break}}if(e!=-1){g=a(o.table[0].rows[e]).coord().top-Z.top-I-2;var D=0;if(this.filterable&&this.showfilterrow){D=this.filterrowheight}if(parseInt(o.table[0].style.top)<0&&g<this.rowsheight+D){g-=parseInt(o.table[0].style.top);w+=parseInt(o.table[0].style.top)}P=w;var l=a(this.columnsrow[0].cells[B]);var C=a(this.columnsrow[0].cells[A]);J=parseInt(l.css("left"));H=parseInt(C.css("left"))-parseInt(J)+C.width()-2;J-=v;if(o.editcell&&o.editable&&o.endcelledit&&(B!=A||e!=u)){if(o.editcell.validated==false){return}o.endcelledit(o.editcell.row,o.editcell.column,true,true)}}}this.selectionarea.width(H);this.selectionarea.height(P);this.selectionarea.css("left",J);this.selectionarea.css("top",g)}}},_handlemouseupselection:function(u,o){if(!this.selectionarea){return}if(this.selectionarea[0].style.visibility!="visible"){o.mousecaptured=false;return true}if(o.mousecaptured&&(o.selectionmode=="multiplerowsextended"||o.selectionmode=="multiplerowsadvanced"||o.selectionmode=="multiplecellsextended"||o.selectionmode=="multiplecellsadvanced")){o.mousecaptured=false;if(this.selectionarea.css("visibility")=="visible"){this.selectionarea.css("visibility","hidden");var w=this.showheader?this.columnsheader.height()+2:0;var p=this._groupsheader()?this.groupsheader.height():0;if(this.host.css("border-top-width")==="0px"){p-=2}var B=this.showtoolbar?this.toolbar.height():0;p+=B;var C=this.selectionarea.coord();var c=this.host.coord();if(this.hasTransform){c=a.jqx.utilities.getOffset(this.host);C=a.jqx.utilities.getOffset(this.selectionarea)}if(this.host.css("border-top-width")==="0px"){p-=2}var n=C.left-c.left;var k=C.top-w-c.top-p;var s=k;var g=n+this.selectionarea.width();var D=n;var l=new Array();var e=new Array();if(o.selectionmode=="multiplerowsextended"){while(k<s+this.selectionarea.height()){var b=this._hittestrow(n,k);var f=b.row;var h=b.index;if(h!=-1){if(!e[h]){e[h]=true;l[l.length]=b}}k+=20}var s=0;a.each(l,function(){var i=this;var m=this.row;if(o.selectionmode!="none"&&o._selectrowwithmouse){if(u.ctrlKey||u.metaKey){o._applyrowselection(o.getboundindex(m),true,false,false)}else{if(s==0){o._applyrowselection(o.getboundindex(m),true,false,true)}else{o._applyrowselection(o.getboundindex(m),true,false,false)}}s++}})}else{if(o.selectionmode=="multiplecellsadvanced"){k+=2}var r=o.hScrollInstance;var t=r.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){t=r.max-r.value}if(this.vScrollBar[0].style.visibility!="hidden"){t-=this.scrollbarsize+4}}var q=o.table[0].rows[0];var j=o.selectionarea.height();if(!u.ctrlKey&&!u.metaKey&&j>0){o.selectedcells=new Array()}var A=j;while(k<s+A){var b=o._hittestrow(n,k);if(!b){k+=5;continue}var f=b.row;var h=b.index;if(h!=-1){if(!e[h]){e[h]=true;for(var v=0;v<q.cells.length;v++){var d=parseInt(a(o.columnsrow[0].cells[v]).css("left"))-t;var z=d+a(o.columnsrow[0].cells[v]).width();if((D>=d&&D<=z)||(g>=d&&g<=z)||(d>=D&&d<=g)){o._applycellselection(o.getboundindex(f),o._getcolumnat(v).datafield,true,false)}}}}k+=5}}if(o.autosavestate){if(o.savestate){o.savestate()}}o._renderrows(o.virtualsizeinfo)}}},selectprevcell:function(e,c){var f=this._getcolumnindex(c);var b=this.columns.records.length;var d=this._getprevvisiblecolumn(f);if(d!=null){this.clearselection();this.selectcell(e,d.datafield)}},selectnextcell:function(e,d){var f=this._getcolumnindex(d);var c=this.columns.records.length;var b=this._getnextvisiblecolumn(f);if(b!=null){this.clearselection();this.selectcell(e,b.datafield)}},_getfirstvisiblecolumn:function(){var b=this;var e=this.columns.records.length;for(var c=0;c<e;c++){var d=this.columns.records[c];if(!d.hidden&&d.datafield!=null){return d}}return null},_getlastvisiblecolumn:function(){var b=this;var e=this.columns.records.length;for(var c=e-1;c>=0;c--){var d=this.columns.records[c];if(!d.hidden&&d.datafield!=null){return d}}return null},_handlekeydown:function(y,r){if(r.groupable&&r.groups.length>0){return true}if(r.disabled){return false}var E=y.charCode?y.charCode:y.keyCode?y.keyCode:0;if(r.editcell&&r.selectionmode!="multiplecellsadvanced"){return true}else{if(r.editcell&&r.selectionmode=="multiplecellsadvanced"){if(E>=33&&E<=40){if(!y.altKey){if(r._cancelkeydown==undefined||r._cancelkeydown==false){if(r.editmode!=="selectedrow"){r.endcelledit(r.editcell.row,r.editcell.column,false,true);r._cancelkeydown=false;if(r.editcell&&!r.editcell.validated){r._rendervisualrows();r.endcelledit(r.editcell.row,r.editcell.column,false,true);return false}}else{return true}}else{r._cancelkeydown=false;return true}}else{r._cancelkeydown=false;return true}}else{return true}}}if(r.selectionmode=="none"){return true}if(r.showfilterrow&&r.filterable){if(this.filterrow){if(a(y.target).ischildof(r.filterrow)){return true}}}if(r.showeverpresentrow){if(r.addnewrowtop){if(a(y.target).ischildof(r.addnewrowtop)){return true}}if(r.addnewrowbottom){if(a(y.target).ischildof(r.addnewrowbottom)){return true}}}if(r.pageable){if(a(y.target).ischildof(this.pager)){return true}}if(this.showtoolbar){if(a(y.target).ischildof(this.toolbar)){return true}}if(this.showstatusbar){if(a(y.target).ischildof(this.statusbar)){return true}}var p=false;if(y.altKey){return true}if(y.ctrlKey||y.metaKey){if(this.clipboard){var b=String.fromCharCode(E).toLowerCase();if(b=="c"||b=="x"){var o=this.copyselection();if(window.clipboardData){window.clipboardData.setData("Text",o)}else{var g=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');g.val(o);a("body").append(g);g.select();setTimeout(function(){document.designMode="off";g.select();g.remove();r.focus()},100)}}else{if(b=="v"){var D=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');a("body").append(D);D.select();var j=this;setTimeout(function(){j._clipboardselection=new Array();var J=D.val();var I=J.split("\n");for(var H=0;H<I.length;H++){if(I[H].split("\t").length>0){var G=I[H].split("\t");if(G.length==1&&H==I.length-1&&G[0]==""){continue}if(G.length>0){j._clipboardselection.push(G)}}}j.pasteselection();D.remove();j.focus()},100)}}if(b=="x"){this.deleteselection();this.host.focus()}}}var l=Math.round(r._gettableheight());var w=Math.round(l/r.rowsheight);var f=r.getdatainformation();switch(r.selectionmode){case"singlecell":case"multiplecells":case"multiplecellsextended":case"multiplecellsadvanced":var F=r.getselectedcell();if(F!=null){var e=this.getrowvisibleindex(F.rowindex);var i=e;var n=F.datafield;var u=r._getcolumnindex(n);var c=r.columns.records.length;var t=function(L,H,K){var G=function(P,M){var O=r.dataview.loadedrecords[P];if(O!=undefined&&M!=null){if(K||K==undefined){r.clearselection()}var N=r.getboundindex(O);r.selectcell(N,M);r._oldselectedcell=r.selectedcell;p=true;r.ensurecellvisible(P,M);return true}return false};if(!G(L,H)){r.ensurecellvisible(L,H);G(L,H);if(r.virtualmode){r.host.focus()}}if(y.shiftKey&&E!=9){if(r.selectionmode=="multiplecellsextended"||r.selectionmode=="multiplecellsadvanced"){if(r._lastClickedCell){r._selectpath(L,H);var J=r.dataview.loadedrecords[L];var I=r.getboundindex(J);r.selectedcell={rowindex:I,datafield:H};return}}}else{if(!y.shiftKey){r._lastClickedCell={row:L,column:H}}}};var z=y.shiftKey&&r.selectionmode!="singlecell"&&r.selectionmode!="multiplecells";var A=function(){t(0,n,!z)};var h=function(){var G=f.rowscount-1;t(G,n,!z)};var d=E==9&&!y.shiftKey;var k=E==9&&y.shiftKey;if(r.rtl){var q=d;d=k;k=q}if(d||k){z=false}if(d||k){if(document.activeElement&&document.activeElement.className&&document.activeElement.className.indexOf("jqx-grid-cell-add-new-row")>=0){return true}}var m=y.ctrlKey||y.metaKey;if(m&&E==37){var C=r._getfirstvisiblecolumn(u);if(C!=null){t(i,C.datafield)}}else{if(m&&E==39){var s=r._getlastvisiblecolumn(u);if(s!=null){t(i,s.datafield)}}else{if(E==39||d){var v=r._getnextvisiblecolumn(u);if(v!=null){t(i,v.datafield,!z)}else{if(!d){p=true}}}else{if(E==37||k){var C=r._getprevvisiblecolumn(u);if(C!=null){t(i,C.datafield,!z)}else{if(!k){p=true}}}else{if(E==36){A()}else{if(E==35){h()}else{if(E==33){if(i-w>=0){var B=i-w;t(B,n,!z)}else{A()}}else{if(E==34){if(f.rowscount>i+w){var B=i+w;t(B,n,!z)}else{h()}}else{if(E==38){if(m){A()}else{if(i>0){t(i-1,n,!z)}else{p=true}}}else{if(E==40){if(m){h()}else{if(f.rowscount>i+1){t(i+1,n,!z)}else{p=true}}}}}}}}}}}}}break;case"singlerow":case"multiplerows":case"multiplerowsextended":case"multiplerowsadvanced":var i=r.getselectedrowindex();if(i==null||i==-1){return true}i=this.getrowvisibleindex(i);var x=function(H,I){var G=function(L){var N=r.dataview.loadedrecords[L];if(N!=undefined){var M=r.getboundindex(N);var K=r.selectedrowindex;if(I||I==undefined){r.clearselection()}r.selectedrowindex=K;r.selectrow(M,false);var J=r.ensurerowvisible(L);if(!J||r.autoheight||r.groupable){r._rendervisualrows()}p=true;return true}return false};if(!G(H)){r.ensurerowvisible(H);G(H,I);if(r.virtualmode){setTimeout(function(){G(H,I)},25)}if(r.virtualmode){r.host.focus()}}if(y.shiftKey&&E!=9){if(r.selectionmode=="multiplerowsextended"){if(r._lastClickedCell){r._selectrowpath(H);r.selectedrowindex=r.getrowboundindex(H);return}}}else{if(!y.shiftKey){r._lastClickedCell={row:H};r.selectedrowindex=r.getrowboundindex(H)}}};var z=y.shiftKey&&r.selectionmode!="singlerow"&&r.selectionmode!="multiplerows";var A=function(){x(0,!z)};var h=function(){var G=f.rowscount-1;x(G,!z)};var m=y.ctrlKey||y.metaKey;if(E==36||(m&&E==38)){A()}else{if(E==35||(m&&E==40)){h()}else{if(E==33){if(i-w>=0){var B=i-w;x(B,!z)}else{A()}}else{if(E==34){if(f.rowscount>i+w){var B=i+w;x(B,!z)}else{h()}}else{if(E==38){if(i>0){x(i-1,!z)}else{p=true}}else{if(E==40){if(f.rowscount>i+1){x(i+1,!z)}else{p=true}}}}}}}break}if(p){if(r.autosavestate){if(r.savestate){r.savestate()}}return false}return true},_handlemousemove:function(u,p){if(p.vScrollInstance.isScrolling()){return}if(p.hScrollInstance.isScrolling()){return}var w;var q;var f;var n;var m;if(p.enablehover||p.selectionmode=="multiplerows"){w=this.showheader?this.columnsheader.height()+2:0;q=this._groupsheader()?this.groupsheader.height():0;var A=this.showtoolbar?this.toolbarheight:0;q+=A;f=this.host.coord();if(this.hasTransform){f=a.jqx.utilities.getOffset(this.host);var k=this._getBodyOffset();f.left-=k.left;f.top-=k.top}n=u.pageX-f.left;m=u.pageY-w-f.top-q}if(p.selectionmode=="multiplerowsextended"||p.selectionmode=="multiplecellsextended"||p.selectionmode=="multiplecellsadvanced"){if(p.mousecaptured==true){return}}if(p.enablehover){if(p.disabled){return}if(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()){return}var c=this._hittestrow(n,m);if(!c){return}var h=c.row;var j=c.index;if(this.hoveredrow!=-1&&j!=-1&&this.hoveredrow==j&&this.selectionmode.indexOf("cell")==-1&&this.selectionmode!="checkbox"){return}this._clearhoverstyle();if(j==-1||h==undefined){return}var r=this.hittestinfo[j].visualrow;if(r==null){return}if(this.hittestinfo[j].details){return}if(u.clientX>a(r).width()+a(r).coord().left){return}var B=0;var o=r.cells.length;if(p.rowdetails&&p.showrowdetailscolumn){if(!this.rtl){B=1+this.groups.length}else{o-=1;o-=this.groups.length}}else{if(this.groupable){if(!this.rtl){B=this.groups.length}else{o-=this.groups.length}}}if(r.cells.length==0){return}var l=r.cells[B].className;if(h.group||(this.selectionmode.indexOf("row")>=0&&l.indexOf("jqx-grid-cell-selected")!=-1)){return}this.hoveredrow=j;if(this.selectionmode.indexOf("cell")!=-1||this.selectionmode=="checkbox"){var e=-1;var s=this.hScrollInstance;var t=s.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){t=s.max-s.value}}for(var v=B;v<o;v++){var g=parseInt(a(this.columnsrow[0].cells[v]).css("left"))-t;var z=g+a(this.columnsrow[0].cells[v]).width();if(z>=n&&n>=g){e=v;break}}if(e!=-1){var b=r.cells[e];if(this.cellhover){this.cellhover(b,u.pageX,u.pageY)}if(b.className.indexOf("jqx-grid-cell-selected")==-1){if(this.editcell){var d=this._getcolumnat(e);if(d){if(this.editcell.row==j&&this.editcell.column==d.datafield){return}}}a(b).addClass(this.toTP("jqx-grid-cell-hover"));a(b).addClass(this.toTP("jqx-fill-state-hover"))}}return}for(var v=B;v<o;v++){var b=r.cells[v];a(b).addClass(this.toTP("jqx-grid-cell-hover"));a(b).addClass(this.toTP("jqx-fill-state-hover"));if(this.cellhover){this.cellhover(b,u.pageX,u.pageY)}}}else{return true}}})})(jqxBaseFramework); | ||
(function(a){a.extend(a.jqx._jqxGrid.prototype,{selectallrows:function(){this._trigger=false;var d=this.virtualmode?this.dataview.totalrecords:this.dataview.loadedrecords.length;this.selectedrowindexes=new Array();var e=this.dataview.loadedrecords;for(var c=0;c<d;c++){var f=e[c];if(!f){this.selectedrowindexes[c]=c;continue}var b=this.getboundindex(f);if(b!=undefined){this.selectedrowindexes[c]=b}}if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){if(this._checkboxcolumn){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:true})}}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(2,{rowindex:this.selectedrowindexes})}},unselectallrows:function(){this._trigger=false;var c=this.virtualmode?this.dataview.totalrecords:this.dataview.loadedrecords.length;this.selectedrowindexes=new Array();var d=this.dataview.loadedrecords;for(var b=0;b<c;b++){var e=d[b];if(!e){this.selectedrowindexes[b]=b;continue}delete this.selectedrowindexes[b]}if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){if(this._checkboxcolumn){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(2,{rowindex:this.selectedrowindexes})}},selectrow:function(b,c){this._applyrowselection(b,true,c);if(c!==false){this._updatecheckboxselection()}},_updatecheckboxselection:function(){if(this.selectionmode=="checkbox"){var d=this.getrows();if(d&&this._checkboxcolumn){if(d.length===0){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false});return}var c=d.length;if(this.groupable){c=this.dataview.loadedrecords.length}if(this.virtualmode){c=this.source._source.totalrecords}var b=this.selectedrowindexes.length;if(b===c){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:true})}else{if(b===0){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}else{this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:null})}}}}},unselectrow:function(b,c){this._applyrowselection(b,false,c);if(c!==false){this._updatecheckboxselection()}},selectcell:function(c,b){this._applycellselection(c,b,true)},unselectcell:function(c,b){this._applycellselection(c,b,false)},clearselection:function(c,d){this._trigger=false;this.selectedrowindex=-1;this._oldselectedcell=null;if(d!==false){for(var b=0;b<this.selectedrowindexes.length;b++){this._raiseEvent(3,{rowindex:this.selectedrowindexes[b]})}}this.selectedrowindexes=new Array();this.selectedcells=new Array();this.selectedcell=null;if(this.selectionmode=="checkbox"&&!this._checkboxcolumnupdating){this._checkboxcolumn.checkboxelement.jqxCheckBox({checked:false})}if(false===c){this._trigger=true;return}this._renderrows(this.virtualsizeinfo);this._trigger=true;if(this.selectionmode=="checkbox"){this._raiseEvent(3,{rowindex:this.selectedrowindexes})}},getselectedrowindex:function(){if(this.selectedrowindex==-1||this.selectedrowindex==undefined){for(var b=0;b<this.selectedrowindexes.length;b++){return this.selectedrowindexes[b]}}return this.selectedrowindex},getselectedrowindexes:function(){return this.selectedrowindexes},getselectedcell:function(){if(!this.selectedcell){return null}var b=this.selectedcell;b.row=this.selectedcell.rowindex;b.column=this.selectedcell.datafield;b.value=this.getcellvalue(b.row,b.column);return b},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 j="";var p=this;this.clipboardselection={};this.logicalclipboardselection={};this._clipboardselection=[];var o=p.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){o=this._getcellsforcopypaste()}var b=0;if(o!=null&&o.length>0){var q=999999999999999;var n=-1;for(var g=0;g<o.length;g++){var k=o[g];var c=p.getcolumn(k.datafield);if(c!=null){var m=p.getcelltext(k.rowindex,c.displayfield);var f=this.getrowdisplayindex(k.rowindex);if(!this.clipboardselection[f]){this.clipboardselection[f]={}}this.clipboardselection[f][c.displayfield]=m;if(!this.logicalclipboardselection[f]){this.logicalclipboardselection[f]={}}this.logicalclipboardselection[f][c.displayfield]=m;if(c.displayfield!=c.datafield){this.logicalclipboardselection[f][c.datafield]=p.getcellvalue(k.rowindex,c.datafield)}q=Math.min(q,f);n=Math.max(n,f)}}var e=new Array();for(var d=q;d<=n;d++){var l=a.extend({},this.logicalclipboardselection[d]);e.push(l)}this.logicalclipboardselection=e;for(var d=q;d<=n;d++){var h=0;this._clipboardselection[this._clipboardselection.length]=new Array();if(this.clipboardselection[d]!=undefined){a.each(this.clipboardselection[d],function(i,r){if(h>0){j+="\t"}var s=r;if(r==null){s=""}p._clipboardselection[p._clipboardselection.length-1][h]=s;h++;j+=s})}if(d<n){j+="\r\n"}}}this.clipboardselectedtext=j;return j},pasteselection:function(){var r=this.getselectedcells();if(this.selectionmode.indexOf("cell")==-1){r=this._getcellsforcopypaste()}if(r!=null&&r.length>0){var q=r[0].rowindex;var i=this.getrowdisplayindex(q);var g=r[0].datafield;var n=this._getcolumnindex(g);var l=0;this.selectedrowindexes=new Array();this.selectedcells=new Array();if(!this._clipboardselection){return}for(var s=0;s<this._clipboardselection.length;s++){for(var k=0;k<this._clipboardselection[s].length;k++){var h=this.getcolumnat(n+k);if(!h){continue}var f=this.getrowboundindex(i+s);var o=this.getcell(f,h.datafield);var d=null;d=this._clipboardselection[s][k];if(d!=null){if(h.cellsformat){if(h.cellsformat.indexOf("p")!=-1||h.cellsformat.indexOf("c")!=-1||h.cellsformat.indexOf("n")!=-1||h.cellsformat.indexOf("f")!=-1){if(d.indexOf(this.gridlocalization.currencysymbol)>-1){d=d.replace(this.gridlocalization.currencysymbol,"")}var j=function(w,u,v){var c=w;if(u==v){return w}var t=c.indexOf(u);while(t!=-1){c=c.replace(u,v);t=c.indexOf(u)}return c};d=j(d,this.gridlocalization.thousandsseparator,"");d=d.replace(this.gridlocalization.decimalseparator,".");if(d.indexOf(this.gridlocalization.percentsymbol)>-1){d=d.replace(this.gridlocalization.percentsymbol,"")}var e="";for(var p=0;p<d.length;p++){var b=d.substring(p,p+1);if(b==="-"){e+="-"}if(b==="."){e+="."}if(b.match(/^[0-9]+$/)!=null){e+=b}}d=e;d=d.replace(/ /g,"");d=new Number(d);if(isNaN(d)){d=""}}}this._raiseEvent(17,{rowindex:f,datafield:o.datafield,value:d});this.setcellvalue(f,h.displayfield,d,false);if(h.displayfield!=h.datafield&&this.logicalclipboardselection){var m=this.logicalclipboardselection[s][h.datafield];if(m!=undefined){this.setcellvalue(f,h.datafield,m,false)}}this._raiseEvent(18,{rowindex:f,datafield:o.datafield,oldvalue:this.getcellvalue(o.rowindex,o.datafield),value:d});this._applycellselection(f,o.datafield,true,false)}}}this.dataview.updateview();this._renderrows(this.virtualsizeinfo)}},_applyrowselection:function(e,i,f,h,b){if(e==null){return false}var j=this.selectedrowindex;if(this.selectionmode=="singlerow"){if(i){this._raiseEvent(2,{rowindex:e,row:this.getrowdata(e)})}else{this._raiseEvent(3,{rowindex:e,row:this.getrowdata(e)})}this._raiseEvent(3,{rowindex:j});this.selectedrowindexes=new Array();this.selectedcells=new Array()}if(h==true){this.selectedrowindexes=new Array()}if(this.dataview.filters.length>0){var c=this.getrowdata(e);if(c&&c.dataindex!==undefined){e=c.dataindex}else{if(c&&c.dataindex===undefined){if(c.uid!=undefined){e=this.getrowboundindexbyid(c.uid)}}}}var d=this.selectedrowindexes.indexOf(e);if(i){this.selectedrowindex=e;if(d==-1){this.selectedrowindexes.push(e);if(this.selectionmode!="singlerow"){this._raiseEvent(2,{rowindex:e,row:this.getrowdata(e)})}}else{if(this.selectionmode=="multiplerows"){this.selectedrowindexes.splice(d,1);this._raiseEvent(3,{rowindex:this.selectedrowindex,row:this.getrowdata(e)});this.selectedrowindex=this.selectedrowindexes.length>0?this.selectedrowindexes[this.selectedrowindexes.length-1]:-1}}}else{if(d>=0||this.selectionmode=="singlerow"||this.selectionmode=="multiplerowsextended"||this.selectionmode=="multiplerowsadvanced"){var g=this.selectedrowindexes[d];this.selectedrowindexes.splice(d,1);this._raiseEvent(3,{rowindex:g,row:this.getrowdata(e)});this.selectedrowindex=-1}}if(f==undefined||f){this._rendervisualrows()}return true},_applycellselection:function(e,b,h,f){if(e==null){return false}if(b==null){return false}var j=this.selectedrowindex;if(this.selectionmode=="singlecell"){var d=this.selectedcell;if(d!=null){this._raiseEvent(16,{rowindex:d.rowindex,datafield:d.datafield})}this.selectedcells=new Array()}if(this.selectionmode=="multiplecellsextended"||this.selectionmode=="multiplecellsadvanced"){var d=this.selectedcell;if(d!=null){this._raiseEvent(16,{rowindex:d.rowindex,datafield:d.datafield})}}var g=e+"_"+b;if(this.dataview.filters.length>0){var c=this.getrowdata(e);if(c&&c.dataindex!==undefined){e=c.dataindex;var g=e+"_"+b}else{if(c&&c.dataindex===undefined){if(c.uid){e=this.getrowboundindexbyid(c.uid);var g=e+"_"+b}}}}var i={rowindex:e,datafield:b};if(h){this.selectedcell=i;if(!this.selectedcells[g]){this.selectedcells[g]=i;this.selectedcells.length++;this._raiseEvent(15,i)}else{if(this.selectionmode=="multiplecells"||this.selectionmode=="multiplecellsextended"||this.selectionmode=="multiplecellsadvanced"){delete this.selectedcells[g];if(this.selectedcells.length>0){this.selectedcells.length--}this._raiseEvent(16,i)}}}else{delete this.selectedcells[g];if(this.selectedcells.length>0){this.selectedcells.length--}this._raiseEvent(16,i)}if(f==undefined||f){this._rendervisualrows()}return true},_getcellindex:function(b){var c=-1;a.each(this.selectedcells,function(){c++;if(this[b]){return false}});return c},_clearhoverstyle:function(){if(undefined==this.hoveredrow||this.hoveredrow==-1){return}if(this.vScrollInstance.isScrolling()){return}if(this.hScrollInstance.isScrolling()){return}var b=this.table.find(".jqx-grid-cell-hover");if(b.length>0){b.removeClass(this.toTP("jqx-grid-cell-hover"));b.removeClass(this.toTP("jqx-fill-state-hover"))}this.hoveredrow=-1},_clearselectstyle:function(){var k=this.table[0].rows.length;var p=this.table[0].rows;var l=this.toTP("jqx-grid-cell-selected");var c=this.toTP("jqx-fill-state-pressed");var m=this.toTP("jqx-grid-cell-hover");var h=this.toTP("jqx-fill-state-hover");for(var g=0;g<k;g++){var b=p[g];var f=b.cells.length;var o=b.cells;for(var e=0;e<f;e++){var d=o[e];var n=a(d);if(d.className.indexOf("jqx-grid-cell-selected")!=-1){n.removeClass(l);n.removeClass(c)}if(d.className.indexOf("jqx-grid-cell-hover")!=-1){n.removeClass(m);n.removeClass(h)}}}},_selectpath:function(n,e){var l=this;var i=this._lastClickedCell?Math.min(this._lastClickedCell.row,n):0;var k=this._lastClickedCell?Math.max(this._lastClickedCell.row,n):0;if(i<=k){var h=this._getcolumnindex(this._lastClickedCell.column);var g=this._getcolumnindex(e);var f=Math.min(h,g);var d=Math.max(h,g);this.selectedcells=new Array();var m=this.dataview.loadedrecords;for(var b=i;b<=k;b++){for(var j=f;j<=d;j++){var n=m[b];this._applycellselection(l.getboundindex(n),l._getcolumnat(j).datafield,true,false)}}this._rendervisualrows()}},_selectrowpath:function(g){if(this.selectionmode=="multiplerowsextended"){var c=this;var b=this._lastClickedCell?Math.min(this._lastClickedCell.row,g):0;var h=this._lastClickedCell?Math.max(this._lastClickedCell.row,g):0;var f=this.dataview.loadedrecords;if(b<=h){this.selectedrowindexes=new Array();for(var e=b;e<=h;e++){var g=f[e];var d=this.getrowboundindex(e);this._applyrowselection(d,true,false)}this._rendervisualrows()}}},_selectrowwithmouse:function(p,b,c,f,d,s){var j=b.row;if(j==undefined){return}var k=b.index;if(this.hittestinfo[k]==undefined){return}var t=this.hittestinfo[k].visualrow;if(this.hittestinfo[k].details){return}var m=t.cells[0].className;if(j.group){return}if(this.selectionmode=="multiplerows"||this.selectionmode=="multiplecells"||this.selectionmode=="checkbox"||(this.selectionmode.indexOf("multiple")!=-1&&(s==true||d==true))){var l=this.getboundindex(j);if(this.dataview.filters.length>0){var v=this.getrowdata(l);if(v){l=v.dataindex;if(l==undefined){var l=this.getboundindex(j)}}}var q=c.indexOf(l)!=-1;var w=this.getboundindex(j)+"_"+f;if(this.selectionmode.indexOf("cell")!=-1){var h=this.selectedcells[w]!=undefined;if(this.selectedcells[w]!=undefined&&h){this._selectcellwithstyle(p,false,k,f,t)}else{this._selectcellwithstyle(p,true,k,f,t)}if(s&&this._lastClickedCell==undefined){var g=this.getselectedcells();if(g&&g.length>0){this._lastClickedCell={row:g[0].rowindex,column:g[0].datafield}}}if(s&&this._lastClickedCell){this._selectpath(j.visibleindex,f);this.mousecaptured=false;if(this.selectionarea.css("visibility")=="visible"){this.selectionarea.css("visibility","hidden")}}}else{if(q){if(d){this._applyrowselection(this.getboundindex(j),false)}else{this._selectrowwithstyle(p,t,false,f)}}else{this._selectrowwithstyle(p,t,true,f)}if(s&&this._lastClickedCell==undefined){var i=this.getselectedrowindexes();if(i&&i.length>0){this._lastClickedCell={row:i[0],column:f}}}if(s&&this._lastClickedCell){this.selectedrowindexes=new Array();var e=this._lastClickedCell?Math.min(this._lastClickedCell.row,j.visibleindex):0;var u=this._lastClickedCell?Math.max(this._lastClickedCell.row,j.visibleindex):0;var n=this.dataview.loadedrecords;for(var o=e;o<=u;o++){var j=n[o];if(j){this._applyrowselection(this.getboundindex(j),true,false,false)}}this._rendervisualrows()}}}else{this._clearselectstyle();this._selectrowwithstyle(p,t,true,f);if(this.selectionmode.indexOf("cell")!=-1){this._selectcellwithstyle(p,true,k,f,t)}}if(!s){this._lastClickedCell={row:j.visibleindex,column:f}}},_selectcellwithstyle:function(d,c,g,f,e){var b=a(e.cells[d._getcolumnindex(f)]);b.removeClass(this.toTP("jqx-grid-cell-hover"));b.removeClass(this.toTP("jqx-fill-state-hover"));if(c){b.addClass(this.toTP("jqx-grid-cell-selected"));b.addClass(this.toTP("jqx-fill-state-pressed"))}else{b.removeClass(this.toTP("jqx-grid-cell-selected"));b.removeClass(this.toTP("jqx-fill-state-pressed"))}},_selectrowwithstyle:function(e,h,b,j){var c=h.cells.length;var f=0;if(e.rowdetails&&e.showrowdetailscolumn){if(!this.rtl){f=1+this.groups.length}else{c-=1;c-=this.groups.length}}else{if(this.groupable){if(!this.rtl){f=this.groups.length}else{c-=this.groups.length}}}for(var g=f;g<c;g++){var d=h.cells[g];if(b){a(d).removeClass(this.toTP("jqx-grid-cell-hover"));a(d).removeClass(this.toTP("jqx-fill-state-hover"));if(e.selectionmode.indexOf("cell")==-1){a(d).addClass(this.toTP("jqx-grid-cell-selected"));a(d).addClass(this.toTP("jqx-fill-state-pressed"))}}else{a(d).removeClass(this.toTP("jqx-grid-cell-hover"));a(d).removeClass(this.toTP("jqx-grid-cell-selected"));a(d).removeClass(this.toTP("jqx-fill-state-hover"));a(d).removeClass(this.toTP("jqx-fill-state-pressed"))}}},_handlemousemoveselection:function(ab,o){if(o.hScrollInstance.isScrolling()||o.vScrollInstance.isScrolling()){return false}if((o.selectionmode=="multiplerowsextended"||o.selectionmode=="multiplecellsextended"||o.selectionmode=="multiplecellsadvanced")&&o.mousecaptured){if(o.multipleselectionbegins){var b=o.multipleselectionbegins(ab);if(b===false){return true}}var aa=this.showheader?this.columnsheader.height()+2:0;var I=this._groupsheader()?this.groupsheader.height():0;var K=this.showtoolbar?this.toolbar.height():0;I+=K;var Z=this.host.coord();if(this.hasTransform){Z=a.jqx.utilities.getOffset(this.host);var ad=this._getBodyOffset();Z.left-=ad.left;Z.top-=ad.top}if(this.host.css("border-top-width")==="0px"){I-=2}var M=ab.pageX;var L=ab.pageY-I;if(Math.abs(this.mousecaptureposition.left-M)>3||Math.abs(this.mousecaptureposition.top-L)>3){var f=parseInt(this.columnsheader.coord().top);if(this.hasTransform){f=a.jqx.utilities.getOffset(this.columnsheader).top}if(M<Z.left){M=Z.left}if(M>Z.left+this.host.width()){M=Z.left+this.host.width()}var X=Z.top+aa;if(L<X){L=X+5}var J=parseInt(Math.min(o.mousecaptureposition.left,M));var g=-5+parseInt(Math.min(o.mousecaptureposition.top,L));var H=parseInt(Math.abs(o.mousecaptureposition.left-M));var P=parseInt(Math.abs(o.mousecaptureposition.top-L));J-=Z.left;g-=Z.top;this.selectionarea.css("visibility","visible");if(o.selectionmode=="multiplecellsadvanced"){var M=J;var t=M+H;var G=M;var n=o.hScrollInstance;var v=n.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){v=n.max-n.value}if(this.vScrollBar[0].style.visibility!="hidden"){}}var h=o.table[0].rows[0];var T=0;var B=o.mousecaptureposition.clickedcell;var A=B;var m=false;var r=0;var ac=h.cells.length;if(o.mousecaptureposition.left<=ab.pageX){r=B}for(var W=r;W<ac;W++){var Y=parseInt(a(this.columnsrow[0].cells[W]).css("left"));var j=Y-v;if(o.columns.records[W].pinned){j=Y;continue}var O=this._getcolumnat(W);if(O!=null&&O.hidden){continue}if(o.groupable&&o.groups.length>0){if(W<o.groups.length){continue}}var S=j+a(this.columnsrow[0].cells[W]).width();if(o.mousecaptureposition.left>ab.pageX){if(S>=M&&M>=j){A=W;m=true;break}}else{if(S>=t&&t>=j){A=W;m=true;break}}}if(!m){if(o.mousecaptureposition.left>ab.pageX){a.each(this.columns.records,function(i,k){if(o.groupable&&o.groups.length>0){if(i<o.groups.length){return true}}if(!this.pinned&&!this.hidden){A=i;return false}})}else{if(!o.groupable||(o.groupable&&!o.groups.length>0)){A=h.cells.length-1}}}var N=B;B=Math.min(B,A);A=Math.max(N,A);g+=5;g+=I;var R=o.table[0].rows.indexOf(o.mousecaptureposition.clickedrow);var w=0;var e=-1;var u=-1;var d=0;for(var W=0;W<o.table[0].rows.length;W++){var s=a(o.table[0].rows[W]);if(W==0){d=s.coord().top}var F=s.height();var z=d-Z.top;if(e==-1&&z+F>=g){var c=false;for(var Q=0;Q<o.groups.length;Q++){var V=s[0].cells[Q].className;if(V.indexOf("jqx-grid-group-collapse")!=-1||V.indexOf("jqx-grid-group-expand")!=-1){c=true;break}}if(c){continue}e=W}d+=F;if(o.groupable&&o.groups.length>0){var c=false;for(var Q=0;Q<o.groups.length;Q++){var V=s[0].cells[Q].className;if(V.indexOf("jqx-grid-group-collapse")!=-1||V.indexOf("jqx-grid-group-expand")!=-1){c=true;break}}if(c){continue}var T=0;for(var U=o.groups.length;U<s[0].cells.length;U++){var E=s[0].cells[U];if(a(E).html()==""){T++}}if(T==s[0].cells.length-o.groups.length){continue}}if(e!=-1){w+=F}if(z+F>g+P){u=W;break}}if(e!=-1){g=a(o.table[0].rows[e]).coord().top-Z.top-I-2;var D=0;if(this.filterable&&this.showfilterrow){D=this.filterrowheight}if(parseInt(o.table[0].style.top)<0&&g<this.rowsheight+D){g-=parseInt(o.table[0].style.top);w+=parseInt(o.table[0].style.top)}P=w;var l=a(this.columnsrow[0].cells[B]);var C=a(this.columnsrow[0].cells[A]);J=parseInt(l.css("left"));H=parseInt(C.css("left"))-parseInt(J)+C.width()-2;J-=v;if(o.editcell&&o.editable&&o.endcelledit&&(B!=A||e!=u)){if(o.editcell.validated==false){return}o.endcelledit(o.editcell.row,o.editcell.column,true,true)}}}this.selectionarea.width(H);this.selectionarea.height(P);this.selectionarea.css("left",J);this.selectionarea.css("top",g)}}},_handlemouseupselection:function(u,o){if(!this.selectionarea){return}if(this.selectionarea[0].style.visibility!="visible"){o.mousecaptured=false;return true}if(o.mousecaptured&&(o.selectionmode=="multiplerowsextended"||o.selectionmode=="multiplerowsadvanced"||o.selectionmode=="multiplecellsextended"||o.selectionmode=="multiplecellsadvanced")){o.mousecaptured=false;if(this.selectionarea.css("visibility")=="visible"){this.selectionarea.css("visibility","hidden");var w=this.showheader?this.columnsheader.height()+2:0;var p=this._groupsheader()?this.groupsheader.height():0;if(this.host.css("border-top-width")==="0px"){p-=2}var B=this.showtoolbar?this.toolbar.height():0;p+=B;var C=this.selectionarea.coord();var c=this.host.coord();if(this.hasTransform){c=a.jqx.utilities.getOffset(this.host);C=a.jqx.utilities.getOffset(this.selectionarea)}if(this.host.css("border-top-width")==="0px"){p-=2}var n=C.left-c.left;var k=C.top-w-c.top-p;var s=k;var g=n+this.selectionarea.width();var D=n;var l=new Array();var e=new Array();if(o.selectionmode=="multiplerowsextended"){while(k<s+this.selectionarea.height()){var b=this._hittestrow(n,k);var f=b.row;var h=b.index;if(h!=-1){if(!e[h]){e[h]=true;l[l.length]=b}}k+=20}var s=0;a.each(l,function(){var i=this;var m=this.row;if(o.selectionmode!="none"&&o._selectrowwithmouse){if(u.ctrlKey||u.metaKey){o._applyrowselection(o.getboundindex(m),true,false,false)}else{if(s==0){o._applyrowselection(o.getboundindex(m),true,false,true)}else{o._applyrowselection(o.getboundindex(m),true,false,false)}}s++}})}else{if(o.selectionmode=="multiplecellsadvanced"){k+=2}var r=o.hScrollInstance;var t=r.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){t=r.max-r.value}if(this.vScrollBar[0].style.visibility!="hidden"){t-=this.scrollbarsize+4}}var q=o.table[0].rows[0];var j=o.selectionarea.height();if(!u.ctrlKey&&!u.metaKey&&j>0){o.selectedcells=new Array()}var A=j;while(k<s+A){var b=o._hittestrow(n,k);if(!b){k+=5;continue}var f=b.row;var h=b.index;if(h!=-1){if(!e[h]){e[h]=true;for(var v=0;v<q.cells.length;v++){var d=parseInt(a(o.columnsrow[0].cells[v]).css("left"))-t;var z=d+a(o.columnsrow[0].cells[v]).width();if((D>=d&&D<=z)||(g>=d&&g<=z)||(d>=D&&d<=g)){o._applycellselection(o.getboundindex(f),o._getcolumnat(v).datafield,true,false)}}}}k+=5}}if(o.autosavestate){if(o.savestate){o.savestate()}}o._renderrows(o.virtualsizeinfo)}}},selectprevcell:function(e,c){var f=this._getcolumnindex(c);var b=this.columns.records.length;var d=this._getprevvisiblecolumn(f);if(d!=null){this.clearselection();this.selectcell(e,d.datafield)}},selectnextcell:function(e,d){var f=this._getcolumnindex(d);var c=this.columns.records.length;var b=this._getnextvisiblecolumn(f);if(b!=null){this.clearselection();this.selectcell(e,b.datafield)}},_getfirstvisiblecolumn:function(){var b=this;var e=this.columns.records.length;for(var c=0;c<e;c++){var d=this.columns.records[c];if(!d.hidden&&d.datafield!=null){return d}}return null},_getlastvisiblecolumn:function(){var b=this;var e=this.columns.records.length;for(var c=e-1;c>=0;c--){var d=this.columns.records[c];if(!d.hidden&&d.datafield!=null){return d}}return null},_handlekeydown:function(y,r){if(r.groupable&&r.groups.length>0){}if(r.disabled){return false}var E=y.charCode?y.charCode:y.keyCode?y.keyCode:0;if(r.editcell&&r.selectionmode!="multiplecellsadvanced"){return true}else{if(r.editcell&&r.selectionmode=="multiplecellsadvanced"){if(E>=33&&E<=40){if(!y.altKey){if(r._cancelkeydown==undefined||r._cancelkeydown==false){if(r.editmode!=="selectedrow"){r.endcelledit(r.editcell.row,r.editcell.column,false,true);r._cancelkeydown=false;if(r.editcell&&!r.editcell.validated){r._rendervisualrows();r.endcelledit(r.editcell.row,r.editcell.column,false,true);return false}}else{return true}}else{r._cancelkeydown=false;return true}}else{r._cancelkeydown=false;return true}}else{return true}}}if(r.selectionmode=="none"){return true}if(r.showfilterrow&&r.filterable){if(this.filterrow){if(a(y.target).ischildof(r.filterrow)){return true}}}if(r.showeverpresentrow){if(r.addnewrowtop){if(a(y.target).ischildof(r.addnewrowtop)){return true}}if(r.addnewrowbottom){if(a(y.target).ischildof(r.addnewrowbottom)){return true}}}if(r.pageable){if(a(y.target).ischildof(this.pager)){return true}}if(this.showtoolbar){if(a(y.target).ischildof(this.toolbar)){return true}}if(this.showstatusbar){if(a(y.target).ischildof(this.statusbar)){return true}}var p=false;if(y.altKey){return true}if(y.ctrlKey||y.metaKey){if(this.clipboard){var b=String.fromCharCode(E).toLowerCase();if(b=="c"||b=="x"){var o=this.copyselection();if(window.clipboardData){window.clipboardData.setData("Text",o)}else{var g=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');g.val(o);a("body").append(g);g.select();setTimeout(function(){document.designMode="off";g.select();g.remove();r.focus()},100)}}else{if(b=="v"){var D=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');a("body").append(D);D.select();var j=this;setTimeout(function(){j._clipboardselection=new Array();var J=D.val();if(J.length==0&&window.clipboardData){D.val(window.clipboardData.getData("Text"));var J=D.val()}var I=J.split("\n");for(var H=0;H<I.length;H++){if(I[H].split("\t").length>0){var G=I[H].split("\t");if(G.length==1&&H==I.length-1&&G[0]==""){continue}if(G.length>0){j._clipboardselection.push(G)}}}j.pasteselection();D.remove();j.focus()},100)}}if(b=="x"){this.deleteselection();this.host.focus()}}}var l=Math.round(r._gettableheight());var w=Math.round(l/r.rowsheight);var f=r.getdatainformation();switch(r.selectionmode){case"singlecell":case"multiplecells":case"multiplecellsextended":case"multiplecellsadvanced":var F=r.getselectedcell();if(F!=null){var e=this.getrowvisibleindex(F.rowindex);var i=e;var n=F.datafield;var u=r._getcolumnindex(n);var c=r.columns.records.length;var t=function(N,H,M,L){var G=function(Y,R){var T=r.dataview.loadedrecords[Y];if(r.groupable&&r.groups.length>0){var U=Y;if(L=="up"){U++}if(L=="down"){U--}var T=r.getdisplayrows()[U];var O=function(Z){if(Z.group){if(r.expandedgroups[Z.uniqueid]){return r.expandedgroups[Z.uniqueid].expanded}}else{return false}};var W=1;var P=true;while(P&&W<300){P=false;if(L=="down"){T=r.getdisplayrows()[U+W]}else{if(L=="up"){T=r.getdisplayrows()[U-W]}}if(!T){break}if(T&&T.group){P=true}var X=T.parentItem;while(X){if(X&&!O(X)){P=true}X=X.parentItem}if(!P){break}W++}if(W==300){T=null}if(r.pageable){var V=false;if(T){for(var S=0;S<r.dataview.rows.length;S++){if(r.dataview.rows[S].boundindex==T.boundindex){V=true}}if(!V){T=null}}}}if(T!=undefined&&R!=null){if(M||M==undefined){r.clearselection()}var Q=r.getboundindex(T);r.selectcell(Q,R);r._oldselectedcell=r.selectedcell;p=true;r.ensurecellvisible(Y,R);return true}return false};if(!G(N,H)){r.ensurecellvisible(N,H);G(N,H);if(r.virtualmode){r.host.focus()}}var J=r.groupable&&r.groups.length>0;if(!J){if(y.shiftKey&&E!=9){if(r.selectionmode=="multiplecellsextended"||r.selectionmode=="multiplecellsadvanced"){if(r._lastClickedCell){r._selectpath(N,H);var K=r.dataview.loadedrecords[N];var I=r.getboundindex(K);r.selectedcell={rowindex:I,datafield:H};return}}}else{if(!y.shiftKey){r._lastClickedCell={row:N,column:H}}}}};var z=y.shiftKey&&r.selectionmode!="singlecell"&&r.selectionmode!="multiplecells";var A=function(){t(0,n,!z)};var h=function(){var G=f.rowscount-1;t(G,n,!z)};var d=E==9&&!y.shiftKey;var k=E==9&&y.shiftKey;if(r.rtl){var q=d;d=k;k=q}if(d||k){z=false}if(d||k){if(document.activeElement&&document.activeElement.className&&document.activeElement.className.indexOf("jqx-grid-cell-add-new-row")>=0){return true}}var m=y.ctrlKey||y.metaKey;if(m&&E==37){var C=r._getfirstvisiblecolumn(u);if(C!=null){t(i,C.datafield)}}else{if(m&&E==39){var s=r._getlastvisiblecolumn(u);if(s!=null){t(i,s.datafield)}}else{if(E==39||d){var v=r._getnextvisiblecolumn(u);if(v!=null){t(i,v.datafield,!z)}else{if(!d){p=true}}}else{if(E==37||k){var C=r._getprevvisiblecolumn(u);if(C!=null){t(i,C.datafield,!z)}else{if(!k){p=true}}}else{if(E==36){A()}else{if(E==35){h()}else{if(E==33){if(i-w>=0){var B=i-w;t(B,n,!z)}else{A()}}else{if(E==34){if(f.rowscount>i+w){var B=i+w;t(B,n,!z)}else{h()}}else{if(E==38){if(m){A()}else{if(i>0){t(i-1,n,!z,"up")}else{p=true}}}else{if(E==40){if(m){h()}else{if((f.rowscount>i+1)||(r.groupable&&r.groups.length>0)){t(i+1,n,!z,"down")}else{p=true}}}}}}}}}}}}}break;case"singlerow":case"multiplerows":case"multiplerowsextended":case"multiplerowsadvanced":var i=r.getselectedrowindex();if(i==null||i==-1){return true}i=this.getrowvisibleindex(i);var x=function(H,K,J){var G=function(S){var R=r.dataview.loadedrecords[S];if(r.groupable&&r.groups.length>0){if(J=="up"){S++}if(J=="down"){S--}var R=r.getdisplayrows()[S];var L=function(W){if(W.group){if(r.expandedgroups[W.uniqueid]){return r.expandedgroups[W.uniqueid].expanded}}else{return false}};var U=1;var M=true;while(M&&U<300){M=false;if(J=="down"){R=r.getdisplayrows()[S+U]}else{if(J=="up"){R=r.getdisplayrows()[S-U]}}if(!R){break}if(R&&R.group){M=true}var V=R.parentItem;while(V){if(V&&!L(V)){M=true}V=V.parentItem}if(!M){break}U++}if(U==300){R=null}if(r.pageable){var T=false;if(R){for(var Q=0;Q<r.dataview.rows.length;Q++){if(r.dataview.rows[Q].boundindex==R.boundindex){T=true}}if(!T){R=null}}}}if(R!=undefined){var N=r.getboundindex(R);var P=r.selectedrowindex;if(K||K==undefined){r.clearselection()}r.selectedrowindex=P;r.selectrow(N,false);var O=r.ensurerowvisible(S);if(!O||r.autoheight||r.groupable){r._rendervisualrows()}p=true;return true}return false};if(!G(H)){r.ensurerowvisible(H);G(H,K);if(r.virtualmode){setTimeout(function(){G(H,K)},25)}if(r.virtualmode){r.host.focus()}}var I=r.groupable&&r.groups.length>0;if(!I){if(y.shiftKey&&E!=9){if(r.selectionmode=="multiplerowsextended"){if(r._lastClickedCell){r._selectrowpath(H);r.selectedrowindex=r.getrowboundindex(H);return}}}else{if(!y.shiftKey){r._lastClickedCell={row:H};r.selectedrowindex=r.getrowboundindex(H)}}}};var z=y.shiftKey&&r.selectionmode!="singlerow"&&r.selectionmode!="multiplerows";var A=function(){x(0,!z)};var h=function(){var G=f.rowscount-1;x(G,!z)};var m=y.ctrlKey||y.metaKey;if(E==36||(m&&E==38)){A()}else{if(E==35||(m&&E==40)){h()}else{if(E==33){if(i-w>=0){var B=i-w;x(B,!z)}else{A()}}else{if(E==34){if(f.rowscount>i+w){var B=i+w;x(B,!z)}else{h()}}else{if(E==38){if(i>0){x(i-1,!z,"up")}else{p=true}}else{if(E==40){if((f.rowscount>i+1)||(r.groupable&&r.groups.length>0)){x(i+1,!z,"down")}else{p=true}}}}}}}break}if(p){if(r.autosavestate){if(r.savestate){r.savestate()}}return false}return true},_handlemousemove:function(u,p){if(p.vScrollInstance.isScrolling()){return}if(p.hScrollInstance.isScrolling()){return}var w;var q;var f;var n;var m;if(p.enablehover||p.selectionmode=="multiplerows"){w=this.showheader?this.columnsheader.height()+2:0;q=this._groupsheader()?this.groupsheader.height():0;var A=this.showtoolbar?this.toolbarheight:0;q+=A;f=this.host.coord();if(this.hasTransform){f=a.jqx.utilities.getOffset(this.host);var k=this._getBodyOffset();f.left-=k.left;f.top-=k.top}n=u.pageX-f.left;m=u.pageY-w-f.top-q}if(p.selectionmode=="multiplerowsextended"||p.selectionmode=="multiplecellsextended"||p.selectionmode=="multiplecellsadvanced"){if(p.mousecaptured==true){return}}if(p.enablehover){if(p.disabled){return}if(this.vScrollInstance.isScrolling()||this.hScrollInstance.isScrolling()){return}var c=this._hittestrow(n,m);if(!c){return}var h=c.row;var j=c.index;if(this.hoveredrow!=-1&&j!=-1&&this.hoveredrow==j&&this.selectionmode.indexOf("cell")==-1&&this.selectionmode!="checkbox"){return}this._clearhoverstyle();if(j==-1||h==undefined){return}var r=this.hittestinfo[j].visualrow;if(r==null){return}if(this.hittestinfo[j].details){return}if(u.clientX>a(r).width()+a(r).coord().left){return}var B=0;var o=r.cells.length;if(p.rowdetails&&p.showrowdetailscolumn){if(!this.rtl){B=1+this.groups.length}else{o-=1;o-=this.groups.length}}else{if(this.groupable){if(!this.rtl){B=this.groups.length}else{o-=this.groups.length}}}if(r.cells.length==0){return}var l=r.cells[B].className;if(h.group||(this.selectionmode.indexOf("row")>=0&&l.indexOf("jqx-grid-cell-selected")!=-1)){return}this.hoveredrow=j;if(this.selectionmode.indexOf("cell")!=-1||this.selectionmode=="checkbox"){var e=-1;var s=this.hScrollInstance;var t=s.value;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){t=s.max-s.value}}for(var v=B;v<o;v++){var g=parseInt(a(this.columnsrow[0].cells[v]).css("left"))-t;var z=g+a(this.columnsrow[0].cells[v]).width();if(z>=n&&n>=g){e=v;break}}if(e!=-1){var b=r.cells[e];if(this.cellhover){this.cellhover(b,u.pageX,u.pageY)}if(b.className.indexOf("jqx-grid-cell-selected")==-1){if(this.editcell){var d=this._getcolumnat(e);if(d){if(this.editcell.row==j&&this.editcell.column==d.datafield){return}}}a(b).addClass(this.toTP("jqx-grid-cell-hover"));a(b).addClass(this.toTP("jqx-fill-state-hover"))}}return}for(var v=B;v<o;v++){var b=r.cells[v];a(b).addClass(this.toTP("jqx-grid-cell-hover"));a(b).addClass(this.toTP("jqx-fill-state-hover"));if(this.cellhover){this.cellhover(b,u.pageX,u.pageY)}}}else{return true}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ 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.that;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.that;var d=this.getsortcolumn();if(this.sortdirection){var c=function(f,g){var e=b.getcolumn(f);if(e){if(g.ascending){a.jqx.aria(e.element,"aria-sort","ascending")}else{if(g.descending){a.jqx.aria(e.element,"aria-sort","descending")}else{a.jqx.aria(e.element,"aria-sort","none")}}}};if(this._oldsortinfo){if(this._oldsortinfo.column){c(this._oldsortinfo.column,{ascending:false,descending:false})}}c(d,this.sortdirection)}this._oldsortinfo={column:d,direction:this.sortdirection};if(this.sortdirection){a.each(this.columns.records,function(f,g){var e=a.data(document.body,"groupsortelements"+this.displayfield);if(d==null||this.displayfield!=d){a(this.sortasc).hide();a(this.sortdesc).hide();if(e!=null){e.sortasc.hide();e.sortdesc.hide()}}else{if(b.sortdirection.ascending){a(this.sortasc).show();a(this.sortdesc).hide();if(e!=null){e.sortasc.show();e.sortdesc.hide()}}else{a(this.sortasc).hide();a(this.sortdesc).show();if(e!=null){e.sortasc.hide();e.sortdesc.show()}}}})}},getsortcolumn:function(){if(this.sortcolumn!=undefined){return this.sortcolumn}return null},removesort:function(){this.sortby(null)},sortby:function(d,g,f,e,b){if(this._loading&&b!==false){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==null){g=null;d=this.sortcolumn}if(d!=undefined){var c=this.that;if(f==undefined&&c.source.sortcomparer!=null){f=c.source.sortcomparer}if(g=="a"||g=="asc"||g=="ascending"||g==true){ascending=true}else{ascending=false}if(g!=null){c.sortdirection={ascending:ascending,descending:!ascending}}else{c.sortdirection={ascending:false,descending:false}}if(g!=null){c.sortcolumn=d}else{c.sortcolumn=null}if(c.source.sort||c.virtualmode){c.dataview.sortfield=d;if(g==null){c.dataview.sortfielddirection=""}else{c.dataview.sortfielddirection=ascending?"asc":"desc"}if(c.source.sort&&!this._loading){c.source.sort(d,g);c._raiseEvent(6,{sortinformation:c.getsortinformation()});return}}else{c.dataview.sortby(d,g,f)}if(e===false){return}if(c.groupable&&c.groups.length>0){c._render(true,false,false);if(c._updategroupheadersbounds&&c.showgroupsheader){c._updategroupheadersbounds()}}else{if(c.pageable){c.dataview.updateview()}c._updaterowsproperties();c.rendergridcontent(true)}c._raiseEvent(6,{sortinformation:c.getsortinformation()})}},_togglesort:function(d){var b=this.that;if(this.disabled){return}if(d.sortable&&b.sortable){var c=b.getsortinformation();var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(b.sorttogglestates>1){if(e==true){e=false}else{e=null}}else{e=!e}}else{e=true}b.sortby(d.displayfield,e,null)}}})})(jqxBaseFramework); | ||
(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.sortcache={};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.that;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.that;var d=this.getsortcolumn();if(this.sortdirection){var c=function(f,g){var e=b.getcolumn(f);if(e){if(g.ascending){a.jqx.aria(e.element,"aria-sort","ascending")}else{if(g.descending){a.jqx.aria(e.element,"aria-sort","descending")}else{a.jqx.aria(e.element,"aria-sort","none")}}}};if(this._oldsortinfo){if(this._oldsortinfo.column){c(this._oldsortinfo.column,{ascending:false,descending:false})}}c(d,this.sortdirection)}this._oldsortinfo={column:d,direction:this.sortdirection};if(this.sortdirection){a.each(this.columns.records,function(f,g){var e=a.data(document.body,"groupsortelements"+this.displayfield);if(d==null||this.displayfield!=d){a(this.sortasc).hide();a(this.sortdesc).hide();if(e!=null){e.sortasc.hide();e.sortdesc.hide()}}else{if(b.sortdirection.ascending){a(this.sortasc).show();a(this.sortdesc).hide();if(e!=null){e.sortasc.show();e.sortdesc.hide()}}else{a(this.sortasc).hide();a(this.sortdesc).show();if(e!=null){e.sortasc.hide();e.sortdesc.show()}}}})}},getsortcolumn:function(){if(this.sortcolumn!=undefined){return this.sortcolumn}return null},removesort:function(){this.sortby(null)},sortby:function(d,g,f,e,b){if(this._loading&&b!==false){throw new Error("jqxGrid: "+this.loadingerrormessage);return false}if(d==null){g=null;d=this.sortcolumn}if(d!=undefined){var c=this.that;if(f==undefined&&c.source.sortcomparer!=null){f=c.source.sortcomparer}if(g=="a"||g=="asc"||g=="ascending"||g==true){ascending=true}else{ascending=false}if(g!=null){c.sortdirection={ascending:ascending,descending:!ascending}}else{c.sortdirection={ascending:false,descending:false}}if(g!=null){c.sortcolumn=d}else{c.sortcolumn=null}if(c.source.sort||c.virtualmode){c.dataview.sortfield=d;if(g==null){c.dataview.sortfielddirection=""}else{c.dataview.sortfielddirection=ascending?"asc":"desc"}if(c.source.sort&&!this._loading){c.source.sort(d,g);c._raiseEvent(6,{sortinformation:c.getsortinformation()});return}}else{c.dataview.sortby(d,g,f)}if(e===false){return}if(c.groupable&&c.groups.length>0){c._render(true,false,false);if(c._updategroupheadersbounds&&c.showgroupsheader){c._updategroupheadersbounds()}}else{if(c.pageable){c.dataview.updateview()}c._updaterowsproperties();c.rendergridcontent(true)}c._raiseEvent(6,{sortinformation:c.getsortinformation()})}},_togglesort:function(d){var b=this.that;if(this.disabled){return}if(d.sortable&&b.sortable){var c=b.getsortinformation();var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(b.sorttogglestates>1){if(e==true){e=false}else{e=null}}else{e=!e}}else{e=true}b.sortby(d.displayfield,e,null)}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxNumberInput","",{});a.extend(a.jqx._jqxNumberInput.prototype,{defineInstance:function(){var b={value:null,decimal:0,min:-99999999,max:99999999,width:200,validationMessage:"Invalid value",height:25,textAlign:"right",readOnly:false,promptChar:"_",decimalDigits:2,decimalSeparator:".",groupSeparator:",",groupSize:3,symbol:"",symbolPosition:"left",digits:8,negative:false,negativeSymbol:"-",disabled:false,inputMode:"advanced",spinButtons:false,spinButtonsWidth:18,spinButtonsStep:1,autoValidate:true,spinMode:"advanced",enableMouseWheel:true,touchMode:"auto",rtl:false,events:["valueChanged","textchanged","mousedown","mouseup","change"],aria:{"aria-valuenow":{name:"decimal",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}},invalidArgumentExceptions:["invalid argument exception"]};a.extend(true,this,b);return b},createInstance:function(b){var c=this.host.attr("value");if(c!=undefined){this.decimal=c}if(this.value!=null){this.decimal=this.value}this.render()},_doTouchHandling:function(){var e=this;var g=e.savedValue;if(!e.parsing){e.parsing=true}if(e.parsing){if(e.numberInput.val()&&e.numberInput.val().indexOf("-")==0){e.setvalue("negative",true)}else{e.setvalue("negative",false)}var f=e.numberInput.val();for(var c=0;c<f.length-1;c++){var d=f.substring(c,c+1);if(isNaN(parseFloat(d))&&d!=e.symbol&&d!="%"&&d!="$"&&d!="."&&d!=","&&d!="-"){e.numberInput[0].value=g;e.parsing=false;return}}e.ValueString=e.GetValueString(e.numberInput.val(),e.decimalSeparator,e.decimalSeparator!="");e.ValueString=new Number(e.ValueString).toFixed(e.decimalDigits);e._parseDecimalInSimpleMode();e.decimal=e.ValueString;var b=e.getvalue("negative");if(b){e.decimal="-"+e.ValueString}e.parsing=false}},render:function(){this.host.attr({role:"spinbutton"});this.host.attr("data-role","input");a.jqx.aria(this);a.jqx.aria(this,"aria-multiline",false);var f=this;if(this.officeMode||(this.theme&&this.theme.indexOf("office")!=-1)){if(this.spinButtonsWidth==18){this.spinButtonsWidth=15}}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){this.inputMode="textbox";this.spinMode="simple"}if(this.decimalSeparator==""){this.decimalSeparator=" "}this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this._spinButtons()}else{this.numberInput=a("<input autocomplete='off' type='textarea'/>").appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}var d=this.host.attr("name");if(d){this.numberInput.attr("name",d)}if(this.host.attr("tabindex")){this.numberInput.attr("tabindex",this.host.attr("tabindex"));this.host.removeAttr("tabindex")}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true||this.inputMode=="textbox"){var f=this;f.savedValue="";this.addHandler(this.numberInput,"focus",function(){f.savedValue=f.numberInput[0].value});this.addHandler(this.numberInput,"change",function(){f._doTouchHandling()})}var h=a.data(this.host[0],"jqxNumberInput");h.jqxNumberInput=this;var f=this;if(this.host.parents("form").length>0){this.addHandler(this.host.parents("form"),"reset",function(){setTimeout(function(){f.setDecimal(0)},10)})}this.propertyChangeMap.disabled=function(n,q,o,r){if(r){n.numberInput.addClass(c.toThemeProperty("jqx-input-disabled"));n.numberInput.attr("disabled",true)}else{n.host.removeClass(c.toThemeProperty("jqx-input-disabled"));n.numberInput.attr("disabled",false)}if(n.spinButtons&&n.host.jqxRepeatButton){n.upbutton.jqxRepeatButton({disabled:r});n.downbutton.jqxRepeatButton({disabled:r})}};if(this.disabled){this.numberInput.addClass(this.toThemeProperty("jqx-input-disabled"));this.numberInput.attr("disabled",true);this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}this.selectedText="";this.decimalSeparatorPosition=-1;var l=this.element.id;var e=this.element;var c=this;this.oldValue=this._value();this.items=new Array();var g=this.value;var b=this.decimal;this._initializeLiterals();this._render();this.setDecimal(b);var f=this;setTimeout(function(){f._render(false)},100);this._addHandlers();a.jqx.utilities.resize(this.host,function(){f._render()})},refresh:function(b){if(!b){this._render()}},wheel:function(d,c){if(!c.enableMouseWheel){return}var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(d.preventDefault){d.preventDefault()}if(d.originalEvent!=null){d.originalEvent.mouseHandled=true}if(d.stopPropagation!=undefined){d.stopPropagation()}if(b){b=false;d.returnValue=b;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return true},_addHandlers:function(){var b=this;this.addHandler(this.numberInput,"mousedown",function(d){return b._raiseEvent(2,d)});this._mousewheelfunc=this._mousewheelfunc||function(d){if(!b.editcell){b.wheel(d,b);return false}};this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var c="";this.addHandler(this.numberInput,"focus",function(d){a.data(b.numberInput,"selectionstart",b._selection().start);b.host.addClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.addClass(b.toThemeProperty("jqx-numberinput-focus"))}c=b.numberInput.val()});this.addHandler(this.numberInput,"blur",function(e){if(b.inputMode=="simple"){b._exitSimpleInputMode(e,b,false,c)}if(b.autoValidate){var f=parseFloat(b.decimal);var d=b.getvalue("negative");if(d&&b.decimal>0){f=-parseFloat(b.decimal)}if(f>b.max){b._disableSetSelection=true;b.setDecimal(b.max);b._disableSetSelection=false}if(f<b.min){b._disableSetSelection=true;b.setDecimal(b.min);b._disableSetSelection=false}}b.host.removeClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.removeClass(b.toThemeProperty("jqx-numberinput-focus"))}if(b.numberInput.val()!=c){b._raiseEvent(7,e);a.jqx.aria(b,"aria-valuenow",b.decimal);b.element.value=b.decimal}return true});this.addHandler(this.numberInput,"mouseup",function(d){return b._raiseEvent(3,d)});this.addHandler(this.numberInput,"keydown",function(d){return b._raiseEvent(4,d)});this.addHandler(this.numberInput,"keyup",function(d){return b._raiseEvent(5,d)});this.addHandler(this.numberInput,"keypress",function(d){return b._raiseEvent(6,d)})},focus:function(){try{this.numberInput.focus()}catch(b){}},_removeHandlers:function(){var b=this;this.removeHandler(this.numberInput,"mousedown");var c=a.jqx.mobile.isOperaMiniMobileBrowser();if(c){this.removeHandler(a(document),"click."+this.element.id,b._exitSimpleInputMode,b)}this.removeHandler(this.numberInput,"focus");this.removeHandler(this.numberInput,"blur");this.removeHandler(this.numberInput,"mouseup");this.removeHandler(this.numberInput,"keydown");this.removeHandler(this.numberInput,"keyup");this.removeHandler(this.numberInput,"keypress")},_spinButtons:function(){if(this.host.jqxRepeatButton){if(!this.numberInput){this.numberInput=a("<input autocomplete='off' style='position: relative; float: left;' type='textarea'/>");this.numberInput.appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}else{this.numberInput.css("float","left")}if(this.spincontainer){if(this.upbutton){this.upbutton.jqxRepeatButton("destroy")}if(this.downbutton){this.downbutton.jqxRepeatButton("destroy")}this.spincontainer.remove()}this.spincontainer=a('<div style="float: right; height: 100%; overflow: hidden; position: relative;"></div>');if(this.rtl){this.spincontainer.css("float","right");this.numberInput.css("float","right");this.spincontainer.css("left","-1px")}this.host.append(this.spincontainer);this.upbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.upbutton);this.upbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"top-right"});this.downbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.downbutton);this.downbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"bottom-right"});var d=this;this.downbutton.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-rc-tr"));this.downbutton.addClass(this.toThemeProperty("jqx-rc-br"));this.addHandler(this.downbutton,"mouseup",function(e){if(!d.disabled){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))}});this.addHandler(this.upbutton,"mouseup",function(e){if(!d.disabled){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"))}});this.removeHandler(a(document),"mouseup."+this.element.id);this.addHandler(a(document),"mouseup."+this.element.id,function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))});this.addHandler(this.downbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mouseenter",function(e){d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.upbutton,"mouseleave",function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.downbutton,"mouseenter",function(e){d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.addHandler(this.downbutton,"mouseleave",function(e){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.upbutton.css("border-width","0px");this.downbutton.css("border-width","0px");if(this.disabled){this.upbutton[0].disabled=true;this.downbutton[0].disabled=true}else{this.upbutton[0].disabled=false;this.downbutton[0].disabled=false}this.spincontainer.addClass(this.toThemeProperty("jqx-input"));this.spincontainer.addClass(this.toThemeProperty("jqx-rc-r"));this.spincontainer.css("border-width","0px");if(!this.rtl){this.spincontainer.css("border-left-width","1px")}else{this.spincontainer.css("border-right-width","1px")}this._upArrow=this.upbutton.find("div");this._downArrow=this.downbutton.find("div");this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"));this._upArrow.addClass(this.toThemeProperty("jqx-input-icon"));this._downArrow.addClass(this.toThemeProperty("jqx-input-icon"));var d=this;this._upArrow.hover(function(){if(!d.disabled){d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))}},function(){d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this._downArrow.hover(function(){if(!d.disabled){d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))}},function(){d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});var b=a.jqx.mobile.isTouchDevice();var c="click";if(b){c=a.jqx.mobile.getTouchEventName("touchstart")}if(b){this.addHandler(this.downbutton,"click",function(e){d.spinDown()});this.addHandler(this.upbutton,"click",function(e){d.spinUp()})}this.addHandler(this.downbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinDown();return false});this.addHandler(this.upbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinUp();return false})}else{throw new Error("jqxNumberInput: Missing reference to jqxbuttons.js.")}},spinDown:function(){var o=this;if(o.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(-1);return}var b=this.getvalue("negative");var t=b?-1:0;if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){o._doTouchHandling()}if(!o.disabled){var r=this._selection();var q=this.decimal;var l=this.getDecimal();if(l<this.min){l=this.min;this.setDecimal(this.min);this._setSelectionStart(r.start);this.spinDown();return}else{if(l>this.max){l=this.max;this.setDecimal(this.max);this._setSelectionStart(r.start);this.spinDown();return}}if(o.spinButtonsStep<0){o.spinButtonsStep=1}var d=parseInt(o.decimal)-o.spinButtonsStep;d=d.toString().length;var f=t+d<=o.digits;if(o.spinMode!="advanced"){if(l-o.spinButtonsStep>=o.min&&f){var v=1;for(g=0;g<o.decimalDigits;g++){v=v*10}var e=(v*l)-(v*o.spinButtonsStep);e=e/v;e=this._parseDecimalValueToEditorValue(e);o.setDecimal(e)}}else{var s=this._getspindecimal();var n=this._getSeparatorPosition();var l=parseFloat(s.decimal);if(o.spinButtonsStep<0){o.spinButtonsStep=1}var d=parseInt(l)-o.spinButtonsStep;d=d.toString().length;var f=t+d<=o.digits;var v=1;var c=s.decimal.indexOf(".");if(c!=-1){var h=s.decimal.length-c-1;var v=1;for(var g=0;g<h;g++){v=v*10}l-=new Number(o.spinButtonsStep/v);l=l.toFixed(h);var c=l.toString().indexOf(".");if(c==-1){l=l.toString()+"."}var u=l.toString()+s.afterdecimal;u=new Number(u);u=u.toFixed(o.decimalDigits);if(u>=o.min){u=this._parseDecimalValueToEditorValue(u);o.setDecimal(u)}}else{if(l-o.spinButtonsStep>=o.min&&f){var e=(v*l)-(v*o.spinButtonsStep);e=e/v;var u=e.toString()+s.afterdecimal;if(u>=o.min){u=this._parseDecimalValueToEditorValue(u);o.setDecimal(u)}}}}if(u==undefined||this.inputMode!="simple"){this._setSelectionStart(r.start);o.savedValue=o.numberInput[0].value;if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal);return}u=this.decimal.toString();var b=this.getvalue("negative");if(t==0&&b){this._setSelectionStart(r.start+1)}else{if((u!=undefined&&(q==undefined||q.toString().length==u.length))){this._setSelectionStart(r.start)}else{if(b){this._setSelectionStart(r.start+1)}else{this._setSelectionStart(r.start-1)}}}if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal)}},_getspindecimal:function(){var q=this._selection();var r="";var n=this._getSeparatorPosition();var t=this._getVisibleItems();var e=this._getHiddenPrefixCount();var s=this.numberInput.val();if(this.numberInput.val().length==q.start&&q.length==0){this._setSelection(q.start,q.start+1);q=this._selection()}var l=this.inputMode!="advanced";for(var c=0;c<q.start;c++){if(l){var o=s.substring(c,c+1);var h=(!isNaN(parseInt(o)));if(h){r+=o}if(o==this.decimalSeparator){r+=o}continue}if(t[c].canEdit&&t[c].character!=this.promptChar){r+=t[c].character}else{if(!t[c].canEdit&&this.decimalSeparatorPosition!=-1&&t[c]==t[this.decimalSeparatorPosition-e]){if(r.length==0){r="0"}r+=t[c].character}}}var g="";for(var c=q.start;c<t.length;c++){if(l){var o=s.substring(c,c+1);var h=(!isNaN(parseInt(o)));if(h){g+=o}if(o==this.decimalSeparator){g+=o}continue}if(t[c].canEdit&&t[c].character!=this.promptChar){g+=t[c].character}else{if(!t[c].canEdit&&this.decimalSeparatorPosition!=-1&&t[c]==t[this.decimalSeparatorPosition-e]){g+=t[c].character}}}var b=this.getvalue("negative");var f=b?"-"+this._parseDecimalValue(r).toString():this._parseDecimalValue(r).toString();return{decimal:f,afterdecimal:this._parseDecimalValue(g)}},_parseDecimalValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(this.decimalSeparator);if(d>=0){var b=c.toString().substring(0,d)+"."+c.toString().substring(d+1);return b}}return c},_parseDecimalValueToEditorValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(".");if(d>=0){var b=c.toString().substring(0,d)+this.decimalSeparator+c.toString().substring(d+1);return b}}return c},spinUp:function(){var q=this;if(q.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(1);return}if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){q._doTouchHandling()}var b=this.getvalue("negative");var u=b?-1:0;if(!q.disabled){var s=this._selection();var r=q.decimal;var n=q.getDecimal();if(n<this.min){n=this.min;this.setDecimal(this.min);this._setSelectionStart(s.start);this.spinUp();return}else{if(n>this.max){n=this.max;this.setDecimal(this.max);this._setSelectionStart(s.start);this.spinUp();return}}if(q.spinButtonsStep<0){q.spinButtonsStep=1}var d=parseInt(q.decimal)+q.spinButtonsStep;d=d.toString().length;var g=u+d<=q.digits;if(q.spinMode!="advanced"){if(n+q.spinButtonsStep<=q.max&&g){var w=1;for(var l=0;l<q.decimalDigits;l++){w=w*10}var f=(w*n)+(w*q.spinButtonsStep);f=f/w;f=this._parseDecimalValueToEditorValue(f);q.setDecimal(f)}}else{var t=this._getspindecimal();var o=this._getSeparatorPosition();var n=parseFloat(t.decimal);if(q.spinButtonsStep<0){q.spinButtonsStep=1}var d=parseInt(n)+q.spinButtonsStep;d=d.toString().length;var g=u+d<=q.digits;var w=1;var c=t.decimal.indexOf(".");if(c!=-1){var h=t.decimal.length-c-1;var w=1;for(var l=0;l<h;l++){w=w*10}n+=new Number(q.spinButtonsStep/w);n=n.toFixed(h);var c=n.toString().indexOf(".");if(c==-1){n=n.toString()+"."}var v=n.toString()+t.afterdecimal;v=new Number(v);v=v.toFixed(q.decimalDigits);var e=new Number(v).toFixed(q.decimalDigits);if(e<=q.max){v=this._parseDecimalValueToEditorValue(v);q.setDecimal(v)}else{v=undefined}}else{if(n+q.spinButtonsStep<=q.max&&g){var f=(w*n)+(w*q.spinButtonsStep);f=f/w;var v=f.toString()+t.afterdecimal;var e=new Number(v).toFixed(q.decimalDigits);if(e<=q.max){v=this._parseDecimalValueToEditorValue(v);if(b&&v.indexOf("-")==-1){if(t.decimal!="-0"){v="-"+v}}q.setDecimal(v)}else{v=undefined}}}}if(v==undefined||this.inputMode!="simple"){this._setSelectionStart(s.start);q.savedValue=q.numberInput[0].value;if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal);return}v=this.decimal.toString();var b=this.getvalue("negative");if(u==-1&&!b){this._setSelectionStart(-1+s.start)}else{if((v!=undefined&&(r==undefined||r.toString().length==v.length))){this._setSelectionStart(s.start)}else{if(b){this._setSelectionStart(s.start)}else{this._setSelectionStart(1+s.start)}}}if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal)}},_exitSimpleInputMode:function(b,o,h,d){if(o==undefined){o=b.data}if(o==null){return}if(h==undefined){if(b.target!=null&&o.element!=null){if((b.target.id!=undefined&&b.target.id.toString().length>0&&o.host.find("#"+b.target.id).length>0)||b.target==o.element){return}}var f=o.host.offset();var e=f.left;var g=f.top;var c=o.host.width();var n=o.host.height();var q=a(b.target).offset();if(q.left>=e&&q.left<=e+c){if(q.top>=g&&q.top<=g+n){return}}}if(a.jqx.mobile.isOperaMiniBrowser()){o.numberInput.attr("readonly",true)}if(o.disabled||o.readOnly){return}var l=a.data(o.numberInput,"simpleInputMode");if(l==null){return}a.data(o.numberInput,"simpleInputMode",null);this._parseDecimalInSimpleMode();return false},_getDecimalInSimpleMode:function(){var d=this.decimal;if(this.decimalSeparator!="."){var b=d.toString().indexOf(this.decimalSeparator);if(b>0){var c=d.toString().substring(0,b);var d=c+"."+d.toString().substring(b+1)}}return d},_parseDecimalInSimpleMode:function(d){var o=this;var b=o.getvalue("negative");var e=this.ValueString;if(e==undefined){e=this.GetValueString(this.numberInput.val(),this.decimalSeparator,this.decimalSeparator!="")}if(this.decimalSeparator!="."){var g=e.toString().indexOf(".");if(g>0){var f=e.toString().substring(0,g);var c=f+this.decimalSeparator+e.toString().substring(g+1);e=c}}var h=b?"-":"";if(this.symbolPosition=="left"){h+=this.symbol}var l=this.digits%this.groupSize;if(l==0){l=this.groupSize}var n=e.toString();if(n.indexOf("-")>=0){n=n.substring(n.indexOf("-")+1)}h+=n;if(this.symbolPosition=="right"){h+=this.symbol}if(d!=false){o.numberInput.val(h)}},_enterSimpleInputMode:function(f,d){if(d==undefined){d=f.data}var e=this._selection();if(d==null){return}var c=d.getvalue("negative");var b=d.decimal;if(c){if(b>0){b=-b}}d.numberInput.val(b);a.data(d.numberInput,"simpleInputMode",true);if(a.jqx.mobile.isOperaMiniBrowser()){d.numberInput.attr("readonly",false)}this._parseDecimalInSimpleMode();this._setSelectionStart(e.start)},setvalue:function(b,c){if(this[b]!==undefined){if(b=="decimal"){this._setDecimal(c)}else{this[b]=c;this.propertyChangedHandler(this,b,c,c)}}},getvalue:function(b){if(b=="decimal"){if(this.negative!=undefined&&this.negative==true){return -Math.abs(this[b])}}if(b in this){return this[b]}return null},_getString:function(){var c="";for(var b=0;b<this.items.length;b++){var d=this.items[b].character;c+=d}return c},_literal:function(d,b,c,e){return{character:d,regex:b,canEdit:c,isSeparator:e}},_initializeLiterals:function(){if(this.inputMode=="textbox"){return}var h=0;var e=this.negativeSymbol.length;for(var d=0;d<e;d++){var g=this.negativeSymbol.substring(d,d+1);var n="";var b=false;var o=null;if(this.negative){o=this._literal(g,n,b,false)}else{o=this._literal("",n,b,false)}this.items[h]=o;h++}var c=this.symbol.length;if(this.symbolPosition=="left"){for(d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var n="";var b=false;var o=this._literal(g,n,b,false);this.items[h]=o;h++}}var f=this.digits%this.groupSize;if(f==0){f=this.groupSize}for(var d=0;d<this.digits;d++){var g=this.promptChar;var n="\\d";var b=true;var o=this._literal(g,n,b,false);this.items[h]=o;h++;if(d<this.digits-1&&this.groupSeparator!=undefined&&this.groupSeparator.length>0){f--;if(f==0){f=this.groupSize;var l=this._literal(this.groupSeparator,"",false,false);this.items[h]=l;h++}}else{if(d==this.digits-1){o.character=0}}}this.decimalSeparatorPosition=-1;if(this.decimalDigits!=undefined&&this.decimalDigits>0){var g=this.decimalSeparator;if(g.length==0){g="."}var o=this._literal(g,"",false,true);this.items[h]=o;this.decimalSeparatorPosition=h;h++;for(var d=0;d<this.decimalDigits;d++){var r=0;var n="\\d";var q=this._literal(r,n,true,false);this.items[h]=q;h++}}if(this.symbolPosition=="right"){for(var d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var n="";var b=false;var o=this._literal(g,n,b);this.items[h]=o;h++}}},_match:function(c,b){var d=new RegExp(b,"i");return d.test(c)},_raiseEvent:function(r,d){var o=this.events[r];var c={};c.owner=this;if(this.host.css("display")=="none"){return true}var x=d.charCode?d.charCode:d.keyCode?d.keyCode:0;var f=true;var h=this.readOnly;var v=this;if(r==3||r==2){if(!this.disabled){if(this.inputMode!="simple"&&this.inputMode!="textbox"){this._handleMouse(d)}else{return true}}}if(r==0){var g=this.getvalue("decimal");if((this.max<g)||(this.min>g)){this.host.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.host.removeClass(this.toThemeProperty("jqx-input-invalid"));this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"))}}var s=new a.Event(o);s.owner=this;c.value=this.getvalue("decimal");c.text=this.numberInput.val();s.args=c;if(o!=undefined){f=this.host.trigger(s)}var v=this;if(this.inputMode=="textbox"){return f}if(this.inputMode!="simple"){if(r==4){if(h||this.disabled){return false}f=v._handleKeyDown(d,x)}else{if(r==5){if(h||this.disabled){f=false}}else{if(r==6){if(h||this.disabled){return false}f=v._handleKeyPress(d,x)}}}}else{if(r==4||r==5||r==6){if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){return true}if(h||this.disabled){return false}var w=String.fromCharCode(x);var q=parseInt(w);var t=true;if(!d.ctrlKey&&!d.shiftKey&&!d.metaKey){if(x>=65&&x<=90){t=false}}if(r==6&&a.jqx.browser.opera!=undefined){if(x==8){return false}}if(t){if(r==4){t=v._handleSimpleKeyDown(d,x)}if(x==189||x==45||x==109||x==173){var y=v._selection();if(r==4){var l=v.getvalue("negative");if(l==false){v.setvalue("negative",true)}else{v.setvalue("negative",false)}v.decimal=v.ValueString;v._parseDecimalInSimpleMode();v._setSelectionStart(y.start);t=false;v._raiseEvent(0,v.value);v._raiseEvent(1,v.numberInput.val())}}var b=c.ctrlKey||c.metaKey;if(!a.jqx.browser.msie){var u=d;if((b&&x==99)||(b&&x==67)||(b&&x==122)||(b&&x==90)||(b&&x==118)||(b&&x==86)||(u.shiftKey&&x==45)){if(a.jqx.browser.webkit||a.jqx.browser.chrome){v._handleSimpleKeyDown(d,x)}if(x==67){return true}return false}}if((b&&x==97)||(b&&x==65)){return true}if(r==6&&t){var n=this._isSpecialKey(x);return n}}return t}}return f},GetSelectionInValue:function(h,g,f,e){var c=0;for(i=0;i<g.length;i++){if(i>=h){break}var d=g.substring(i,i+1);var b=(!isNaN(parseInt(d)));if(b||(e&&g.substring(i,i+1)==f)){c++}}return c},GetSelectionLengthInValue:function(g,h,f,e){var c=0;for(i=0;i<f.length;i++){if(i>=g+h){break}var d=f.substring(i,i+1);var b=(!isNaN(parseInt(d)));if(h>0&&i>=g&&b||(i>=g&&f[i].toString()==e)){c++}}return c},GetInsertTypeByPositionInValue:function(e,g,h,f){var c="before";var b=this.GetValueString(h,g,f);var d=this.GetDigitsToSeparator(0,b,g);if(e>d){c="after"}return c},RemoveRange:function(f,e,q,g,w,b){var h=this.digits;var r=f;var x=e;var c=0;var s=this.decimal;var B=this._selection();var q=this.numberInput.val();var g=this.decimalSeparator;var l=g!="";if(x==0&&this.ValueString.length<this.decimalPossibleChars-1){return c}var y=this.GetSeparatorPositionInText(g,q);if(!w){y=this.GetSeparatorPositionInText(g,q)}if(y<0&&!l&&q.length>1){y=q.length}if(y==-1){y=q.length}var d=l?1:0;if(e<2&&b==true){var A=this.ValueString.length-this.decimalDigits-d;if((A)==h&&f+e<y){x++}}var n="";for(var v=0;v<q.length;v++){if(v<r||v>=r+x){n+=q.substring(v,v+1);continue}else{var u=q.substring(v,v+1);if(u==g){n+=g;continue}else{var u=q.substring(v,v+1);if(this.symbol&&this.symbol!=""&&this.symbol.indexOf(u)>=0){continue}if(v>y){n+="0";continue}}}var u=q.substring(v,v+1);var t=(!isNaN(parseInt(u)));if(t){c++}}if(n.length==0){n="0"}if(w){this.numberInput.val(n)}else{this.ValueString=n}var o=n.substring(0,1);if(o==g&&isNaN(parseInt(o))){var z="0"+n;n=z}this.ValueString=this.GetValueString(n,g,l);this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(r);return c},InsertDigit:function(v,B){if(typeof this.digits!="number"){this.digits=parseInt(this.digits)}if(typeof this.decimalDigits!="number"){this.decimalDigits=parseInt(this.decimalDigits)}var l=1+this.digits;var C=this._selection();var q=this.getvalue("negative");var d=false;if(C.start==0&&this.symbol!=""&&this.symbolPosition=="left"){this._setSelectionStart(C.start+1);C=this._selection();d=true}if((q&&d)||(q&&!d&&C.start==0)){this._setSelectionStart(C.start+1);C=this._selection()}var z=this.numberInput.val().substring(C.start,C.start+1);var s=this.numberInput.val();var g=this.decimalSeparator;var n=g!=""&&this.decimalDigits>0;if(z==this.symbol&&this.symbolPosition=="right"){if(this.decimalDigits==0){this.ValueString=this.GetValueString(s,g,n);if(this.ValueString.length>=l){return}}else{return}}this.ValueString=this.GetValueString(s,g,n);if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits)}var y=this.ValueString;if(this.decimalDigits>0&&B>=y.length){B=y.length-1}var t="";if(B<y.length){t=y.substring(B,B+1)}var h=false;var A=false;var e=this.GetInsertTypeByPositionInValue(B,g,s,n);if(e=="after"){h=true}var b=n?1:0;if(t!=g&&(this.ValueString.length-this.decimalDigits-b)>=l-1){h=true}if(t==="0"&&this.ValueString.length===1&&this.decimalDigits===0){h=true}var u=false;var w=n?1:0;if(!h&&this.ValueString&&this.ValueString.length>=this.digits+this.decimalDigits+w){return}if(h&&t!=g){if(u){B++}var r=y.substring(0,B);if(r.length==y.length){if(this.ValueString.length>=this.digits+this.decimalDigits+w){return}}var x=v;var c="";if(B+1<y.length){c=y.substring(B+1)}var o=r+x+c;this.ValueString=o}else{var r=y.substring(0,B);var x=v;var c=y.substring(B);var o=r+x+c;if(y.substring(0,1)=="0"&&y.substring(1,2)==g){o=x+y.substring(1);if(t==g){this._setSelectionStart(C.start-1);C=this._selection()}}this.ValueString=o}if(q){this.decimal=-this.ValueString}else{this.decimal=this.ValueString}this._parseDecimalInSimpleMode();var f=C.start;f+=1;this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},GetStringToSeparator:function(h,f,e){var d="";var b=f;var g=this.GetSeparatorPositionInText(f,h);var c=h.subString(0,g);d=this.GetValueString(c,f,e);return d},GetSeparatorPositionInText:function(c,d){var b=-1;for(i=0;i<d.length;i++){if(d.substring(i,i+1)==c){b=i;break}}return b},GetValueString:function(h,g,f){var d="";for(var c=0;c<h.length;c++){var e=h.substring(c,c+1);var b=(!isNaN(parseInt(e)));if(b){d+=e}if(e==g){d+=g}}return d},Backspace:function(){var d=this._selection();var e=this._selection();var f=this.numberInput.val();if(d.start==0&&d.length==0){return}this.isBackSpace=true;var c=f.substring[d.start,d.start+1];var b=(!isNaN(parseInt(c)));if(d.start>0&&d.length==0){this._setSelectionStart(d.start-1);var d=this._selection()}this.Delete();this._setSelectionStart(e.start-1);this.isBackSpace=false},Delete:function(c){var e=this._selection();var g=this.numberInput.val();var f=e.start;var h=e.length;h=Math.max(h,1);this.ValueString=this.GetValueString(g,this.decimalSeparator,this.decimalSeparator!="");this.RemoveRange(e.start,h,this.ValueString,".",false);var d=this.ValueString.substring(0,1);var b=(!isNaN(parseInt(d)));if(!b){this.ValueString="0"+this.ValueString}this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},insertsimple:function(d){var l=this._selection();var n=this.numberInput.val();if(l.start==n.length&&this.decimal!=null&&this.decimalDigits>0){return}var b=this.decimal;var g=this.decimalSeparator;this.ValueString=this.GetValueString(n,g,g!="");var h=this.GetSelectionInValue(l.start,n,g,g!="");var e=this.GetSelectionLengthInValue(l.start,l.length,n,g);var f=this.GetDigitsToSeparator(0,this.ValueString,g);var c=false;if(this.decimalDigits>0&&h>=this.ValueString.length){h--}if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits);this.InsertDigit(d,h,l);return}this.RemoveRange(l.start,e,this.ValueString,g,false,true);this.InsertDigit(d,h,l)},GetDigitsToSeparator:function(c,b,d){if(d==undefined){d="."}if(b.indexOf(d)<0){return b.length}for(i=0;i<b.length;i++){if(b.substring(i,i+1)==d){c=i;break}}return c},_handleSimpleKeyDown:function(n,v){var u=this._selection();var b=n.ctrlKey||n.metaKey;if((v==8||v==46)&&b){this.setDecimal(null);return false}if(u.start>=0&&u.start<this.items.length){var d=String.fromCharCode(v)}if(this.rtl&&v==37){var c=n.shiftKey;var g=c?1:0;if(c){this._setSelection(u.start+1-g,u.start+u.length+1)}else{this._setSelection(u.start+1-g,u.start+1)}return false}else{if(this.rtl&&v==39){var c=n.shiftKey;var g=c?1:0;if(c){this._setSelection(u.start-1,u.length+g+u.start-1)}else{this._setSelection(u.start-1,u.start-1)}return false}}if(v==8){this.Backspace();return false}if(v==190||v==110){var l=this.GetSeparatorPositionInText(this.decimalSeparator,this.numberInput.val());if(l!=-1){this._setSelectionStart(l+1)}return false}if(v==188){var t=this.numberInput.val();for(h=u.start;h<t.length;h++){if(t[h]==this.groupSeparator){this._setSelectionStart(1+h);break}}return false}var b=n.ctrlKey||n.metaKey;if((b&&v==99)||(b&&v==67)){var u=this._selection();var w="";var s=this.numberInput.val();if(u.start>0||u.length>0){for(var h=u.start;h<u.end;h++){w+=s.substring(h,h+1)}}a.data(document.body,"jqxSelection",w);if(a.jqx.browser.msie){window.clipboardData.setData("Text",w)}else{var o=this;var f=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');f.val(w);a("body").append(f);f.select();setTimeout(function(){document.designMode="off";f.select();f.remove();o.focus()},100)}this.savedText=w;return true}if((b&&v==122)||(b&&v==90)){return false}if((b&&v==118)||(b&&v==86)||(n.shiftKey&&v==45)){if(a.jqx.browser.msie&&!this.savedText){this.savedText=window.clipboardData.getData("Text")}if(this.savedText!=null&&this.savedText.length>0){this.val(this.savedText)}else{this.val(a.data(document.body,"jqxSelection"))}return false}var d=String.fromCharCode(v);var q=parseInt(d);if(v>=96&&v<=105){q=v-96;v=v-48}if(!isNaN(q)){var o=this;this.insertsimple(q);return false}if(v==46){this.Delete();return false}if(v==38){this.spinUp();return false}else{if(v==40){this.spinDown();return false}}var r=this._isSpecialKey(v);if(!a.jqx.browser.mozilla){return true}return r},_getEditRange:function(){var c=0;var b=0;for(i=0;i<this.items.length;i++){if(this.items[i].canEdit){c=i;break}}for(i=this.items.length-1;i>=0;i--){if(this.items[i].canEdit){b=i;break}}return{start:c,end:b}},_getVisibleItems:function(){var b=new Array();var c=0;for(i=0;i<this.items.length;i++){if(this.items[i].character.toString().length>0){b[c]=this.items[i];c++}}return b},_hasEmptyVisibleItems:function(){var b=this._getVisibleItems();for(i=0;i<b.length;i++){if(b[i].canEdit&&b[i].character==this.promptChar){return true}}return false},_getFirstVisibleNonEmptyIndex:function(){var b=this._getVisibleItems();for(i=0;i<b.length;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){return i}}},_handleMouse:function(f,b){var d=this._selection();if(d.length<=1){var c=this._getFirstVisibleNonEmptyIndex();if(d.start<c){this._setSelectionStart(c)}}},_insertKey:function(l){this.numberInput[0].focus();var d=String.fromCharCode(l);var e=parseInt(d);if(isNaN(e)){return}var q=0;for(i=0;i<this.items.length;i++){if(this.items[i].character.length==0){q++}}var g=this._selection();var b=this;if(g.start>=0&&g.start<=this.items.length){var f=false;var h=this._getFirstVisibleNonEmptyIndex();if(g.start<h&&g.length==0){if(!isNaN(d)||d==" "){this._setSelectionStart(h);g=this._selection()}}var c=this._getFirstEditableItemIndex();var o=this._getLastEditableItemIndex();var n=this._getVisibleItems();a.each(n,function(x,B){if(g.start>x&&x!=n.length-1){return}var E=n[x];if(x>o){E=n[o]}if(isNaN(d)||d==" "){return}if(!E.canEdit){return}var A=b._getSeparatorPosition();if(b._match(d,E.regex)){if(!f&&g.length>0){for(j=g.start+q;j<g.end+q;j++){if(b.items[j].canEdit){if(j>A){b.items[j].character="0"}else{b.items[j].character=b.promptChar}}}var D=b._getString();f=true}var A=b._getSeparatorPosition();var y=b._hasEmptyVisibleItems();if(b.decimal==null){g.start=A-1;if(g.start<0){g.start=0}g.end=g.start}if(g.start<=A&&y){var v=x;if(b.decimalSeparatorPosition==-1&&g.start==A){v=x+1}if(b.decimal==null){v=g.start}var u="";for(p=0;p<v;p++){if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}u+=d;var w=b.decimal<1?1:0;if(g.start==A&&b.decimalSeparatorPosition!=-1){u+=b.decimalSeparator;w=0}for(p=v+w;p<n.length;p++){if(n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character}else{if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}}if(b.decimalSeparator!="."){u=b._parseDecimalValue(u)}u=parseFloat(u).toString();u=new Number(u);u=u.toFixed(b.decimalDigits);if(b.decimalSeparator!="."){u=b._parseDecimalValueToEditorValue(u)}b.setvalue("decimal",u);var D=b._getString();if(g.end<A){b._setSelectionStart(g.end+w)}else{b._setSelectionStart(g.end)}if(g.length>=1){b._setSelectionStart(g.end)}if(g.length==b.numberInput.val().length){var r=b._moveCaretToDecimalSeparator();var C=b.decimalSeparatorPosition>=0?1:0;b._setSelectionStart(r-C)}}else{if(g.start<A||g.start>A){if(b.numberInput.val().length==g.start&&b.decimalSeparatorPosition!=-1){return false}else{if(b.numberInput.val().length==g.start&&b.decimalSeparatorPosition==-1&&!y){return false}}var u="";var s=false;for(p=0;p<x;p++){if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}if(n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character;s=true}}u+=d;var w=b.decimal<1?1:0;if(!s&&g.start==A-1){u+=b.decimalSeparator;s=true}for(p=x+1;p<n.length;p++){if(!s&&n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character}else{if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}}b.setvalue("decimal",u);var D=b._getString();if(b.decimalSeparatorPosition<0&&E==n[o]){b._setSelectionStart(x);return false}var z=D.indexOf(b.symbol);var t=!b.getvalue("negative")?0:1;if(z<=t){z=D.length}if(g.start<z){b._setSelectionStart(x+1)}else{b._setSelectionStart(x)}if(g.length>=1){}if(g.length==b.numberInput.val().length){var r=b._moveCaretToDecimalSeparator();b._setSelectionStart(r-1)}}}return false}})}},_handleKeyPress:function(h,d){var f=this._selection();var b=this;var l=h.ctrlKey||h.metaKey;if((l&&d==97)||(l&&d==65)){return true}if(d==8){if(f.start>0){b._setSelectionStart(f.start)}return false}if(d==46){if(f.start<this.items.length){b._setSelectionStart(f.start)}return false}if(!a.jqx.browser.mozilla){if(d==45||d==173||d==109||d==189){var c=this.getvalue("negative");if(c==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(a.jqx.browser.msie){this._insertKey(d)}var g=this._isSpecialKey(d);return g},_deleteSelectedText:function(){var d=this._selection();var c="";var f=this._getSeparatorPosition();var b=this._getVisibleItems();var e=this._getHiddenPrefixCount();if(this.numberInput.val().length==d.start&&d.length==0){this._setSelection(d.start,d.start+1);d=this._selection()}for(i=0;i<d.start;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){c+=b[i].character}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}for(i=d.start;i<d.end;i++){if(i>f&&this.decimalSeparatorPosition!=-1){if(b[i].canEdit&&b[i].character!=this.promptChar){c+="0"}}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}for(i=d.end;i<b.length;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){c+=b[i].character}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}this.setvalue("decimal",c);return d.length>0},_restoreInitialState:function(){var b=parseInt(this.decimalDigits);if(b>0){b+=2}for(k=this.items.length-1;k>this.items.length-1-b;k--){if(this.items[k].canEdit&&this.items[k].character==this.promptChar){this.items[k].character=0}}},clear:function(){this.setDecimal(0)},clearDecimal:function(){if(this.inputMode=="textbox"){this.numberInput.val();return}for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit){this.items[b].character=this.promptChar}}this._restoreInitialState()},_saveSelectedText:function(){var c=this._selection();var d="";var b=this._getVisibleItems();if(c.start>0||c.length>0){for(i=c.start;i<c.end;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){d+=b[i].character}else{if(b[i].isSeparator){d+=b[i].character}}}}if(a.jqx.browser.msie){window.clipboardData.setData("Text",d)}return d},_pasteSelectedText:function(){var f=this._selection();var h="";var c=0;this.selectedText=a.data(document.body,"jqxSelection");if(window.clipboardData){var d=window.clipboardData.getData("Text");if(d!=this.selectedText&&d.length>0){this.selectedText=window.clipboardData.getData("Text");if(this.selectedText==null||this.selectedText==undefined){return}}}var e=f.start;var n=this._getVisibleItems();if(this.selectedText!=null){for(var l=0;l<this.selectedText.length;l++){var b=parseInt(this.selectedText[l]);if(!isNaN(b)){var g=48+b;this._insertKey(g)}}}},_getHiddenPrefixCount:function(){var b=0;if(!this.negative){b++}if(this.symbolPosition=="left"){for(i=0;i<this.symbol.length;i++){if(this.symbol.substring(i,i+1)==""){b++}}}return b},_getEditableItem:function(){var b=this._selection();for(i=0;i<this.items.length;i++){if(i<b.start){if(this.items[i].canEdit&&this.items[i].character!=this.promptChar){return this.items[i]}}}return null},_getEditableItems:function(){var c=new Array();var b=0;for(i=0;i<this.items.length;i++){if(this.items[i].canEdit){c[b]=this.items[i];b++}}return c},_getValidSelectionStart:function(b){for(i=this.items.length-1;i>=0;i--){if(this.items[i].canEdit&&this.items[i].character!=this.promptChar){return i}}return -1},_getEditableItemIndex:function(c){var e=this._selection();var f=this._getHiddenPrefixCount();var b=this._getVisibleItems();var d=e.start;var g=-1;for(i=0;i<d;i++){if(i<b.length&&b[i].canEdit){g=i+f}}if(g==-1&&e.length>0){d=e.end;for(i=0;i<d;i++){if(i<b.length&&b[i].canEdit){g=i+f;break}}}return g},_getEditableItemByIndex:function(b){for(k=0;k<this.items.length;k++){if(k>b){if(this.items[k].canEdit&&this.items[k].character!=this.promptChar){return k}}}return -1},_getFirstEditableItemIndex:function(){var b=this._getVisibleItems();for(m=0;m<b.length;m++){if(b[m].character!=this.promptChar&&b[m].canEdit&&b[m].character!="0"){return m}}return -1},_getLastEditableItemIndex:function(){var b=this._getVisibleItems();for(m=b.length-1;m>=0;m--){if(b[m].character!=this.promptChar&&b[m].canEdit){return m}}return -1},_moveCaretToDecimalSeparator:function(){for(i=this.items.length-1;i>=0;i--){if(this.items[i].character==this.decimalSeparator&&this.items[i].isSeparator){if(!this.negative){this._setSelectionStart(i);return i}else{this._setSelectionStart(i+1);return i}break}}return this.numberInput.val().length},_handleBackspace:function(){var e=this._selection();var f=this._getHiddenPrefixCount();var b=this._getEditableItemIndex()-f;if(b>=0){if(e.length==0&&b!=-1){this._setSelection(b,b+1)}var g=e.start>this._getSeparatorPosition()+1&&this.decimalSeparatorPosition>0;if(g){e=this._selection()}var d=this._deleteSelectedText();if(e.length<1||g){this._setSelectionStart(e.start)}else{if(e.length>=1){this._setSelectionStart(e.end)}}if(e.length==this.numberInput.val().length){var c=this._moveCaretToDecimalSeparator();this._setSelectionStart(c-1)}}else{this._setSelectionStart(e.start)}},_handleKeyDown:function(h,s){var r=this._selection();var c=h.ctrlKey||h.metaKey;if((s==8||s==46)&&c){this.setDecimal(null);return false}if(this.rtl&&s==37){var d=h.shiftKey;var g=d?1:0;if(d){this._setSelection(r.start+1-g,r.start+r.length+1)}else{this._setSelection(r.start+1-g,r.start+1)}return false}else{if(this.rtl&&s==39){var d=h.shiftKey;var g=d?1:0;if(d){this._setSelection(r.start-1,r.length+g+r.start-1)}else{this._setSelection(r.start-1,r.start-1)}return false}}if((c&&s==97)||(c&&s==65)){return true}if((c&&s==120)||(c&&s==88)){this.selectedText=this._saveSelectedText(h);a.data(document.body,"jqxSelection",this.selectedText);this._handleBackspace();return false}if((c&&s==99)||(c&&s==67)){this.selectedText=this._saveSelectedText(h);a.data(document.body,"jqxSelection",this.selectedText);return false}if((c&&s==122)||(c&&s==90)){return false}if((c&&s==118)||(c&&s==86)||(h.shiftKey&&s==45)){this._pasteSelectedText();return false}if(r.start>=0&&r.start<this.items.length){var f=String.fromCharCode(s);var u=this.items[r.start]}if(s==8){this._handleBackspace();return false}if(s==190||s==110){this._moveCaretToDecimalSeparator();return false}if(s==188){var q=this.numberInput.val();for(i=r.start;i<q.length;i++){if(q[i]==this.groupSeparator){this._setSelectionStart(1+i);break}}return false}if(a.jqx.browser.msie==null){var f=String.fromCharCode(s);var n=parseInt(f);if(s>=96&&s<=105){n=s-96;s=s-48}if(!isNaN(n)){var l=this;l._insertKey(s);return false}}if(s==46){var t=this._getVisibleItems();if(r.start<t.length){var g=t[r.start].canEdit==false?2:1;if(r.length==0){this._setSelection(r.start+g,r.start+g+r.length)}this._handleBackspace();if(new Number(this.decimal)<1||r.start>this._getSeparatorPosition()){this._setSelectionStart(r.end+g)}else{if(r.start+1<this.decimalSeparatorPosition){this._setSelectionStart(r.end+g)}}}return false}if(s==38){this.spinUp();return false}else{if(s==40){this.spinDown();return false}}var o=this._isSpecialKey(s);if(a.jqx.browser.mozilla){if(s==45||s==173||s==109||s==189){var b=this.getvalue("negative");if(b==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(!a.jqx.browser.mozilla){return true}return o},_isSpecialKey:function(b){if(b!=8&&b!=9&&b!=13&&b!=35&&b!=36&&b!=37&&b!=39&&b!=27&&b!=46){return false}return true},_selection:function(){try{if("selectionStart" in this.numberInput[0]){var g=this.numberInput[0];var h=g.selectionEnd-g.selectionStart;return{start:g.selectionStart,end:g.selectionEnd,length:h,text:g.value}}else{var d=document.selection.createRange();if(d==null){return{start:0,end:g.value.length,length:0}}var c=this.numberInput[0].createTextRange();var f=c.duplicate();c.moveToBookmark(d.getBookmark());f.setEndPoint("EndToStart",c);var h=d.text.length;return{start:f.text.length,end:f.text.length+d.text.length,length:h,text:d.text}}}catch(b){return{start:0,end:0,length:0}}},_setSelection:function(f,b){if(this._disableSetSelection==true){return}var e=a.jqx.mobile.isTouchDevice();if(e||this.touchMode==true){return}try{if("selectionStart" in this.numberInput[0]){this.numberInput[0].focus();this.numberInput[0].setSelectionRange(f,b)}else{var c=this.numberInput[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",f);c.select()}}catch(d){}},_setSelectionStart:function(b){this._setSelection(b,b);a.data(this.numberInput,"selectionstart",b)},resize:function(c,b){this.width=c;this.height=b;this._render(false)},_render:function(f){var c=parseInt(this.host.css("border-left-width"));var h=parseInt(this.host.css("border-left-width"));var g=parseInt(this.host.css("border-left-width"));var d=parseInt(this.host.css("border-left-width"));this.numberInput.css("padding-top","0px");this.numberInput.css("padding-bottom","0px");this.host.height(this.height);this.host.width(this.width);var e=this.host.width();var o=this.host.height();this.numberInput.css({"border-left-width":0,"border-right-width":0,"border-bottom-width":0,"border-top-width":0});this.numberInput.css("text-align",this.textAlign);var q=this.numberInput.css("font-size");this.numberInput.css("height",parseInt(q)+4+"px");this.numberInput.css("width",e-2);var n=o-2*g-parseInt(q)-2;if(isNaN(n)){n=0}if(n<0){n=0}if(this.spinButtons&&this.spincontainer){e-=parseInt(this.spinButtonsWidth-2);var l=a.jqx.mobile.isTouchDevice();if(!l&&this.touchMode!==true){this.spincontainer.width(this.spinButtonsWidth);this.upbutton.width(this.spinButtonsWidth+2);this.downbutton.width(this.spinButtonsWidth+2);this.upbutton.height("50%");this.downbutton.height("50%");this.spincontainer.width(this.spinButtonsWidth)}else{this.spincontainer.width(2*(this.spinButtonsWidth));e-=this.spinButtonsWidth;this.upbutton.height("100%");this.downbutton.height("100%");this.downbutton.css("float","left");this.upbutton.css("float","right");this.upbutton.width(this.spinButtonsWidth);this.downbutton.width(1+this.spinButtonsWidth)}this._upArrow.height("100%");this._downArrow.height("100%");this.numberInput.css("width",e-6);this.numberInput.css("margin-right","2px")}var b=n/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){b=n/4}this.numberInput.css("padding-left","0px");this.numberInput.css("padding-right","0px");this.numberInput.css("padding-top",Math.round(b)+"px");this.numberInput.css("padding-bottom",Math.round(b)+"px");if(f==undefined||f==true){this.numberInput.val(this._getString());if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode()}}},destroy:function(){this._removeHandlers();this.host.remove()},inputValue:function(b){if(b===undefined){return this._value()}this.propertyChangedHandler(this,"value",this._value,b);this._refreshValue();return this},_value:function(){var b=this.numberInput.val();return b},val:function(c){if(c!==undefined&&typeof c!="object"||c===null){if(c===null){this.setDecimal(null);return}else{var f=c;f=f.toString();if(f.indexOf(this.symbol)>-1){f=f.replace(this.symbol,"")}var b=function(q,n,o){var h=q;if(n==o){return q}var l=h.indexOf(n);while(l!=-1){h=h.replace(n,o);l=h.indexOf(n)}return h};f=b(f,this.groupSeparator,"");f=f.replace(this.decimalSeparator,".");var g="";for(var d=0;d<f.length;d++){var e=f.substring(d,d+1);if(e==="-"){g+="-"}if(e==="."){g+="."}if(e.match(/^[0-9]+$/)!=null){g+=e}}f=g;f=f.replace(/ /g,"");f=new Number(f);this.setDecimal(f)}}else{return this.getDecimal()}},getDecimal:function(){if(this.decimal==null){return null}if(this.inputMode=="simple"){this._parseDecimalInSimpleMode(false);this.decimal=this._getDecimalInSimpleMode(this.decimal)}if(this.decimal==""){return 0}var b=this.getvalue("negative");if(b&&this.decimal>0){return -parseFloat(this.decimal)}return parseFloat(this.decimal)},setDecimal:function(e){var b=e;if(this.decimalSeparator!="."){if(e===null){this._setDecimal(e)}else{var d=e;if(typeof(e)!="number"){e=e.toString();var g=e.indexOf(".");if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}else{var g=e.indexOf(this.decimalSeparator);if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}}}if(d<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}this._setDecimal(e)}}else{if(e<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}if(e===null){this._setDecimal(e)}else{this._setDecimal(Math.abs(e))}}if(b==null){this.numberInput.val("")}},_setDecimal:function(r){if(r==null){this.decimal=null;this.value=null;this._refreshValue();this.decimal=null;this.value=null;return}if(r==null||r==undefined){r=0}if(r.toString().indexOf("e")!=-1){r=0}this.clearDecimal();var s=r.toString();var t="";var b="";var d=true;if(s.length==0){s="0"}for(var g=0;g<s.length;g++){if(s.substring(g,g+1)==this.decimalSeparator){d=false;continue}if(d){t+=s.substring(g,g+1)}else{b+=s.substring(g,g+1)}}if(t.length>0){t=parseFloat(t).toString()}var o=this.digits;if(o<t.length){t=t.substr(0,o)}var f=0;var q=this._getSeparatorPosition();var n=this._getHiddenPrefixCount();q=q+n;for(var g=q;g>=0;g--){if(g<this.items.length&&this.items[g].canEdit){if(f<t.length){this.items[g].character=t.substring(t.length-f-1,t.length-f);f++}}}f=0;for(var g=q;g<this.items.length;g++){if(this.items[g].canEdit){if(f<b.length){this.items[g].character=b.substring(f,f+1);f++}}}this._refreshValue();if(this.decimalSeparator=="."){this.ValueString=new Number(r).toFixed(this.decimalDigits)}else{var l=r.toString().indexOf(this.decimalSeparator);if(l>0){var h=r.toString().substring(0,l);var e=h+"."+r.toString().substring(l+1);this.ValueString=new Number(e).toFixed(this.decimalDigits)}else{this.ValueString=new Number(r).toFixed(this.decimalDigits)}}if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode();this._raiseEvent(1,this.ValueString)}if(this.inputMode=="textbox"){this.decimal=this.ValueString;var c=this.getvalue("negative");if(c){this.decimal="-"+this.ValueString}}var r=this.val();if(r<this.min||r>this.max){this.host.addClass("jqx-input-invalid")}else{this.host.removeClass("jqx-input-invalid")}},_getSeparatorPosition:function(){var b=this._getHiddenPrefixCount();if(this.decimalSeparatorPosition>0){return this.decimalSeparatorPosition-b}return this.items.length-b},_setTheme:function(){this.host.removeClass();this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this.downbutton.removeClass();this.upbutton.removeClass();this.downbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this._upArrow.removeClass();this._downArrow.removeClass();this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}this.numberInput.removeClass();this.numberInput.addClass(this.toThemeProperty("jqx-input-content"))},propertyChangedHandler:function(c,d,g,f){if(d=="digits"||d=="groupSize"||d=="decimalDigits"){if(f<0){throw new Exception(this.invalidArgumentExceptions[0])}}if(d==="theme"){a.jqx.utilities.setTheme(g,f,c.host)}if(d=="digits"){if(f!=g){c.digits=parseInt(f)}}if(d=="min"||d=="max"){a.jqx.aria(c,"aria-value"+d,f.toString());c._refreshValue()}if(d=="decimalDigits"){if(f!=g){c.decimalDigits=parseInt(f)}}if(d=="decimalSeparator"||d=="digits"||d=="symbol"||d=="symbolPosition"||d=="groupSize"||d=="groupSeparator"||d=="decimalDigits"||d=="negativeSymbol"){var b=c.decimal;if(d=="decimalSeparator"&&f==""){f=" "}if(g!=f){var e=c._selection();c.items=new Array();c._initializeLiterals();c.value=c._getString();c._refreshValue();c._setDecimal(b)}}if(d=="rtl"){if(c.rtl){if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","right")}else{if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","left")}}if(d=="spinButtons"){if(c.spincontainer){if(!f){c.spincontainer.css("display","none")}else{c.spincontainer.css("display","block")}c._render()}else{c._spinButtons()}}if(d==="touchMode"){c.inputMode="textbox";c.spinMode="simple";c.render()}if(d=="negative"&&c.inputMode=="advanced"){var e=c._selection();var h=0;if(f){c.items[0].character=c.negativeSymbol[0];h=1}else{c.items[0].character="";h=-1}c._refreshValue();if(c.isInitialized){c._setSelection(e.start+h,e.end+h)}}if(d=="decimal"){c.value=f;c.setDecimal(f)}if(d==="value"){c.value=f;c.setDecimal(f);c._raiseEvent(1,f)}if(d=="textAlign"){c.textAlign=f;c._render()}if(d=="disabled"){c.numberInput.attr("disabled",f);if(c.disabled){c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"))}a.jqx.aria(c,"aria-disabled",f.toString())}if(d=="readOnly"){c.readOnly=f}if(d=="promptChar"){for(i=0;i<c.items.length;i++){if(c.items[i].character==c.promptChar){c.items[i].character=f}}c.promptChar=f}if(d=="width"){c.width=f;c._render()}else{if(d=="height"){c.height=f;c._render()}}},_value:function(){var b=this.value;return b},_refreshValue:function(){var g=this.value;var b=0;if(this.inputMode==="textbox"){return}this.value=this._getString();g=this.value;var f="";for(var c=0;c<this.items.length;c++){var e=this.items[c];if(e.canEdit&&e.character!=this.promptChar){f+=e.character}if(c==this.decimalSeparatorPosition){f+="."}}this.decimal=f;var d=false;if(this.oldValue!==g){this.oldValue=g;this._raiseEvent(0,g);d=true}if(this.inputMode!="simple"){this.numberInput.val(g);if(d){this._raiseEvent(1,g)}}if(g==null){this.numberInput.val("")}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxNumberInput","",{});a.extend(a.jqx._jqxNumberInput.prototype,{defineInstance:function(){var b={value:null,decimal:0,min:-99999999,max:99999999,width:200,validationMessage:"Invalid value",height:25,textAlign:"right",readOnly:false,promptChar:"_",decimalDigits:2,decimalSeparator:".",groupSeparator:",",groupSize:3,symbol:"",symbolPosition:"left",digits:8,negative:false,negativeSymbol:"-",disabled:false,inputMode:"advanced",spinButtons:false,spinButtonsWidth:18,spinButtonsStep:1,autoValidate:true,spinMode:"advanced",enableMouseWheel:true,touchMode:"auto",rtl:false,events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","change"],aria:{"aria-valuenow":{name:"decimal",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}},invalidArgumentExceptions:["invalid argument exception"]};a.extend(true,this,b);return b},createInstance:function(b){var c=this.host.attr("value");if(c!=undefined){this.decimal=c}if(this.value!=null){this.decimal=this.value}this.render()},_doTouchHandling:function(){var e=this;var g=e.savedValue;if(!e.parsing){e.parsing=true}if(e.parsing){if(e.numberInput.val()&&e.numberInput.val().indexOf("-")==0){e.setvalue("negative",true)}else{e.setvalue("negative",false)}var f=e.numberInput.val();for(var c=0;c<f.length-1;c++){var d=f.substring(c,c+1);if(isNaN(parseFloat(d))&&d!=e.symbol&&d!="%"&&d!="$"&&d!="."&&d!=","&&d!="-"){e.numberInput[0].value=g;e.parsing=false;return}}e.ValueString=e.GetValueString(e.numberInput.val(),e.decimalSeparator,e.decimalSeparator!="");e.ValueString=new Number(e.ValueString).toFixed(e.decimalDigits);e._parseDecimalInSimpleMode();e.decimal=e.ValueString;var b=e.getvalue("negative");if(b){e.decimal="-"+e.ValueString}e.parsing=false}},render:function(){this.host.attr({role:"spinbutton"});this.host.attr("data-role","input");a.jqx.aria(this);a.jqx.aria(this,"aria-multiline",false);var f=this;if(this.officeMode||(this.theme&&this.theme.indexOf("office")!=-1)){if(this.spinButtonsWidth==18){this.spinButtonsWidth=15}}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){this.inputMode="textbox";this.spinMode="simple"}if(this.decimalSeparator==""){this.decimalSeparator=" "}this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this._spinButtons()}else{this.numberInput=a("<input autocomplete='off' type='textarea'/>").appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}var d=this.host.attr("name");if(d){this.numberInput.attr("name",d)}if(this.host.attr("tabindex")){this.numberInput.attr("tabindex",this.host.attr("tabindex"));this.host.removeAttr("tabindex")}if(a.jqx.mobile.isTouchDevice()||this.touchMode===true||this.inputMode=="textbox"){var f=this;f.savedValue="";this.addHandler(this.numberInput,"focus",function(){f.savedValue=f.numberInput[0].value});this.addHandler(this.numberInput,"change",function(){f._doTouchHandling()})}var h=a.data(this.host[0],"jqxNumberInput");h.jqxNumberInput=this;var f=this;if(this.host.parents("form").length>0){this.addHandler(this.host.parents("form"),"reset",function(){setTimeout(function(){f.setDecimal(0)},10)})}this.propertyChangeMap.disabled=function(n,q,o,r){if(r){n.numberInput.addClass(c.toThemeProperty("jqx-input-disabled"));n.numberInput.attr("disabled",true)}else{n.host.removeClass(c.toThemeProperty("jqx-input-disabled"));n.numberInput.attr("disabled",false)}if(n.spinButtons&&n.host.jqxRepeatButton){n.upbutton.jqxRepeatButton({disabled:r});n.downbutton.jqxRepeatButton({disabled:r})}};if(this.disabled){this.numberInput.addClass(this.toThemeProperty("jqx-input-disabled"));this.numberInput.attr("disabled",true);this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}this.selectedText="";this.decimalSeparatorPosition=-1;var l=this.element.id;var e=this.element;var c=this;this.oldValue=this._value();this.items=new Array();var g=this.value;var b=this.decimal;this._initializeLiterals();this._render();this.setDecimal(b);var f=this;setTimeout(function(){},100);this._addHandlers();a.jqx.utilities.resize(this.host,function(){f._render()})},refresh:function(b){if(!b){this._render()}},wheel:function(d,c){if(!c.enableMouseWheel){return}var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(d.preventDefault){d.preventDefault()}if(d.originalEvent!=null){d.originalEvent.mouseHandled=true}if(d.stopPropagation!=undefined){d.stopPropagation()}if(b){b=false;d.returnValue=b;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return true},_addHandlers:function(){var b=this;this.addHandler(this.numberInput,"mousedown",function(d){return b._raiseEvent(2,d)});this._mousewheelfunc=this._mousewheelfunc||function(d){if(!b.editcell){b.wheel(d,b);return false}};this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var c="";this.addHandler(this.numberInput,"focus",function(d){a.data(b.numberInput,"selectionstart",b._selection().start);b.host.addClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.addClass(b.toThemeProperty("jqx-numberinput-focus"))}c=b.numberInput.val()});this.addHandler(this.numberInput,"blur",function(e){if(b.inputMode=="simple"){b._exitSimpleInputMode(e,b,false,c)}if(b.autoValidate){var f=parseFloat(b.decimal);var d=b.getvalue("negative");if(d&&b.decimal>0){f=-parseFloat(b.decimal)}if(f>b.max){b._disableSetSelection=true;b.setDecimal(b.max);b._disableSetSelection=false}if(f<b.min){b._disableSetSelection=true;b.setDecimal(b.min);b._disableSetSelection=false}}b.host.removeClass(b.toThemeProperty("jqx-fill-state-focus"));if(b.spincontainer){b.spincontainer.removeClass(b.toThemeProperty("jqx-numberinput-focus"))}if(b.numberInput.val()!=c){b._raiseEvent(7,e);a.jqx.aria(b,"aria-valuenow",b.decimal);b.element.value=b.decimal}return true});this.addHandler(this.numberInput,"mouseup",function(d){return b._raiseEvent(3,d)});this.addHandler(this.numberInput,"keydown",function(d){return b._raiseEvent(4,d)});this.addHandler(this.numberInput,"keyup",function(d){return b._raiseEvent(5,d)});this.addHandler(this.numberInput,"keypress",function(d){return b._raiseEvent(6,d)})},focus:function(){try{this.numberInput.focus()}catch(b){}},_removeHandlers:function(){var b=this;this.removeHandler(this.numberInput,"mousedown");var c=a.jqx.mobile.isOperaMiniMobileBrowser();if(c){this.removeHandler(a(document),"click."+this.element.id,b._exitSimpleInputMode,b)}this.removeHandler(this.numberInput,"focus");this.removeHandler(this.numberInput,"blur");this.removeHandler(this.numberInput,"mouseup");this.removeHandler(this.numberInput,"keydown");this.removeHandler(this.numberInput,"keyup");this.removeHandler(this.numberInput,"keypress")},_spinButtons:function(){if(this.host.jqxRepeatButton){if(!this.numberInput){this.numberInput=a("<input autocomplete='off' style='position: relative; float: left;' type='textarea'/>");this.numberInput.appendTo(this.host);this.numberInput.addClass(this.toThemeProperty("jqx-input-content"));this.numberInput.addClass(this.toThemeProperty("jqx-widget-content"))}else{this.numberInput.css("float","left")}if(this.spincontainer){if(this.upbutton){this.upbutton.jqxRepeatButton("destroy")}if(this.downbutton){this.downbutton.jqxRepeatButton("destroy")}this.spincontainer.remove()}this.spincontainer=a('<div style="float: right; height: 100%; overflow: hidden; position: relative;"></div>');if(this.rtl){this.spincontainer.css("float","right");this.numberInput.css("float","right");this.spincontainer.css("left","-1px")}this.host.append(this.spincontainer);this.upbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.upbutton);this.upbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"top-right"});this.downbutton=a('<div style="overflow: hidden; padding: 0px; margin-left: -1px; position: relative;"><div></div></div>');this.spincontainer.append(this.downbutton);this.downbutton.jqxRepeatButton({overrideTheme:true,disabled:this.disabled,roundedCorners:"bottom-right"});var d=this;this.downbutton.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-rc-tr"));this.downbutton.addClass(this.toThemeProperty("jqx-rc-br"));this.addHandler(this.downbutton,"mouseup",function(e){if(!d.disabled){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))}});this.addHandler(this.upbutton,"mouseup",function(e){if(!d.disabled){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"))}});this.removeHandler(a(document),"mouseup."+this.element.id);this.addHandler(a(document),"mouseup."+this.element.id,function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-selected"))});this.addHandler(this.downbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mousedown",function(e){if(!d.disabled){if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._inputSelection=d._selection()}d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-selected"));e.preventDefault();e.stopPropagation();return false}});this.addHandler(this.upbutton,"mouseenter",function(e){d.upbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.upbutton,"mouseleave",function(e){d.upbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this.addHandler(this.downbutton,"mouseenter",function(e){d.downbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.addHandler(this.downbutton,"mouseleave",function(e){d.downbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});this.upbutton.css("border-width","0px");this.downbutton.css("border-width","0px");if(this.disabled){this.upbutton[0].disabled=true;this.downbutton[0].disabled=true}else{this.upbutton[0].disabled=false;this.downbutton[0].disabled=false}this.spincontainer.addClass(this.toThemeProperty("jqx-input"));this.spincontainer.addClass(this.toThemeProperty("jqx-rc-r"));this.spincontainer.css("border-width","0px");if(!this.rtl){this.spincontainer.css("border-left-width","1px")}else{this.spincontainer.css("border-right-width","1px")}this._upArrow=this.upbutton.find("div");this._downArrow=this.downbutton.find("div");this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"));this._upArrow.addClass(this.toThemeProperty("jqx-input-icon"));this._downArrow.addClass(this.toThemeProperty("jqx-input-icon"));var d=this;this._upArrow.hover(function(){if(!d.disabled){d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))}},function(){d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))});this._downArrow.hover(function(){if(!d.disabled){d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))}},function(){d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))});var b=a.jqx.mobile.isTouchDevice();var c="click";if(b){c=a.jqx.mobile.getTouchEventName("touchstart")}if(b){this.addHandler(this.downbutton,"click",function(e){d.spinDown()});this.addHandler(this.upbutton,"click",function(e){d.spinUp()})}this.addHandler(this.downbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinDown();return false});this.addHandler(this.upbutton,c,function(e){if(!b){if(d._selection().start==0){d._setSelectionStart(d.numberInput.val().length)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d._setSelectionStart(d._inputSelection.start)}}else{e.preventDefault();e.stopPropagation()}d.spinUp();return false})}else{throw new Error("jqxNumberInput: Missing reference to jqxbuttons.js.")}},spinDown:function(){var o=this;if(o.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(-1);return}var b=this.getvalue("negative");var t=b?-1:0;if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){o._doTouchHandling()}if(!o.disabled){var r=this._selection();var q=this.decimal;var l=this.getDecimal();if(l<this.min){l=this.min;this.setDecimal(this.min);this._setSelectionStart(r.start);this.spinDown();return}else{if(l>this.max){l=this.max;this.setDecimal(this.max);this._setSelectionStart(r.start);this.spinDown();return}}if(o.spinButtonsStep<0){o.spinButtonsStep=1}var d=parseInt(o.decimal)-o.spinButtonsStep;d=d.toString().length;var f=t+d<=o.digits;if(o.spinMode!="advanced"){if(l-o.spinButtonsStep>=o.min&&f){var v=1;for(g=0;g<o.decimalDigits;g++){v=v*10}var e=(v*l)-(v*o.spinButtonsStep);e=e/v;e=this._parseDecimalValueToEditorValue(e);o.setDecimal(e)}}else{var s=this._getspindecimal();var n=this._getSeparatorPosition();var l=parseFloat(s.decimal);if(o.spinButtonsStep<0){o.spinButtonsStep=1}var d=parseInt(l)-o.spinButtonsStep;d=d.toString().length;var f=t+d<=o.digits;var v=1;var c=s.decimal.indexOf(".");if(c!=-1){var h=s.decimal.length-c-1;var v=1;for(var g=0;g<h;g++){v=v*10}l-=new Number(o.spinButtonsStep/v);l=l.toFixed(h);var c=l.toString().indexOf(".");if(c==-1){l=l.toString()+"."}var u=l.toString()+s.afterdecimal;u=new Number(u);u=u.toFixed(o.decimalDigits);if(u>=o.min){u=this._parseDecimalValueToEditorValue(u);o.setDecimal(u)}}else{if(l-o.spinButtonsStep>=o.min&&f){var e=(v*l)-(v*o.spinButtonsStep);e=e/v;var u=e.toString()+s.afterdecimal;if(u>=o.min){u=this._parseDecimalValueToEditorValue(u);o.setDecimal(u)}}}}if(u==undefined||this.inputMode!="simple"){this._setSelectionStart(r.start);o.savedValue=o.numberInput[0].value;if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal);return}u=this.decimal.toString();var b=this.getvalue("negative");if(t==0&&b){this._setSelectionStart(r.start+1)}else{if((u!=undefined&&(q==undefined||q.toString().length==u.length))){this._setSelectionStart(r.start)}else{if(b){this._setSelectionStart(r.start+1)}else{this._setSelectionStart(r.start-1)}}}if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal)}},_getspindecimal:function(){var q=this._selection();var r="";var n=this._getSeparatorPosition();var t=this._getVisibleItems();var e=this._getHiddenPrefixCount();var s=this.numberInput.val();if(this.numberInput.val().length==q.start&&q.length==0){this._setSelection(q.start,q.start+1);q=this._selection()}var l=this.inputMode!="advanced";for(var c=0;c<q.start;c++){if(l){var o=s.substring(c,c+1);var h=(!isNaN(parseInt(o)));if(h){r+=o}if(o==this.decimalSeparator){r+=o}continue}if(t[c].canEdit&&t[c].character!=this.promptChar){r+=t[c].character}else{if(!t[c].canEdit&&this.decimalSeparatorPosition!=-1&&t[c]==t[this.decimalSeparatorPosition-e]){if(r.length==0){r="0"}r+=t[c].character}}}var g="";for(var c=q.start;c<t.length;c++){if(l){var o=s.substring(c,c+1);var h=(!isNaN(parseInt(o)));if(h){g+=o}if(o==this.decimalSeparator){g+=o}continue}if(t[c].canEdit&&t[c].character!=this.promptChar){g+=t[c].character}else{if(!t[c].canEdit&&this.decimalSeparatorPosition!=-1&&t[c]==t[this.decimalSeparatorPosition-e]){g+=t[c].character}}}var b=this.getvalue("negative");var f=b?"-"+this._parseDecimalValue(r).toString():this._parseDecimalValue(r).toString();return{decimal:f,afterdecimal:this._parseDecimalValue(g)}},_parseDecimalValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(this.decimalSeparator);if(d>=0){var b=c.toString().substring(0,d)+"."+c.toString().substring(d+1);return b}}return c},_parseDecimalValueToEditorValue:function(c){if(this.decimalSeparator!="."){var d=c.toString().indexOf(".");if(d>=0){var b=c.toString().substring(0,d)+this.decimalSeparator+c.toString().substring(d+1);return b}}return c},spinUp:function(){var q=this;if(q.spinMode=="none"){return}if(this.decimal==null){this.setDecimal(1);return}if(a.jqx.mobile.isTouchDevice()||this.inputMode=="textbox"){q._doTouchHandling()}var b=this.getvalue("negative");var u=b?-1:0;if(!q.disabled){var s=this._selection();var r=q.decimal;var n=q.getDecimal();if(n<this.min){n=this.min;this.setDecimal(this.min);this._setSelectionStart(s.start);this.spinUp();return}else{if(n>this.max){n=this.max;this.setDecimal(this.max);this._setSelectionStart(s.start);this.spinUp();return}}if(q.spinButtonsStep<0){q.spinButtonsStep=1}var d=parseInt(q.decimal)+q.spinButtonsStep;d=d.toString().length;var g=u+d<=q.digits;if(q.spinMode!="advanced"){if(n+q.spinButtonsStep<=q.max&&g){var w=1;for(var l=0;l<q.decimalDigits;l++){w=w*10}var f=(w*n)+(w*q.spinButtonsStep);f=f/w;f=this._parseDecimalValueToEditorValue(f);q.setDecimal(f)}}else{var t=this._getspindecimal();var o=this._getSeparatorPosition();var n=parseFloat(t.decimal);if(q.spinButtonsStep<0){q.spinButtonsStep=1}var d=parseInt(n)+q.spinButtonsStep;d=d.toString().length;var g=u+d<=q.digits;var w=1;var c=t.decimal.indexOf(".");if(c!=-1){var h=t.decimal.length-c-1;var w=1;for(var l=0;l<h;l++){w=w*10}n+=new Number(q.spinButtonsStep/w);n=n.toFixed(h);var c=n.toString().indexOf(".");if(c==-1){n=n.toString()+"."}var v=n.toString()+t.afterdecimal;v=new Number(v);v=v.toFixed(q.decimalDigits);var e=new Number(v).toFixed(q.decimalDigits);if(e<=q.max){v=this._parseDecimalValueToEditorValue(v);q.setDecimal(v)}else{v=undefined}}else{if(n+q.spinButtonsStep<=q.max&&g){var f=(w*n)+(w*q.spinButtonsStep);f=f/w;var v=f.toString()+t.afterdecimal;var e=new Number(v).toFixed(q.decimalDigits);if(e<=q.max){v=this._parseDecimalValueToEditorValue(v);if(b&&v.indexOf("-")==-1){if(t.decimal!="-0"){v="-"+v}}q.setDecimal(v)}else{v=undefined}}}}if(v==undefined||this.inputMode!="simple"){this._setSelectionStart(s.start);q.savedValue=q.numberInput[0].value;if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal);return}v=this.decimal.toString();var b=this.getvalue("negative");if(u==-1&&!b){this._setSelectionStart(-1+s.start)}else{if((v!=undefined&&(r==undefined||r.toString().length==v.length))){this._setSelectionStart(s.start)}else{if(b){this._setSelectionStart(s.start)}else{this._setSelectionStart(1+s.start)}}}if(a.jqx.mobile.isTouchDevice()){this._raiseEvent(0,{})}this._raiseEvent(7,{});a.jqx.aria(self,"aria-valuenow",this.decimal)}},_exitSimpleInputMode:function(b,o,h,d){if(o==undefined){o=b.data}if(o==null){return}if(h==undefined){if(b.target!=null&&o.element!=null){if((b.target.id!=undefined&&b.target.id.toString().length>0&&o.host.find("#"+b.target.id).length>0)||b.target==o.element){return}}var f=o.host.offset();var e=f.left;var g=f.top;var c=o.host.width();var n=o.host.height();var q=a(b.target).offset();if(q.left>=e&&q.left<=e+c){if(q.top>=g&&q.top<=g+n){return}}}if(a.jqx.mobile.isOperaMiniBrowser()){o.numberInput.attr("readonly",true)}if(o.disabled||o.readOnly){return}var l=a.data(o.numberInput,"simpleInputMode");if(l==null){return}a.data(o.numberInput,"simpleInputMode",null);this._parseDecimalInSimpleMode();return false},_getDecimalInSimpleMode:function(){var d=this.decimal;if(this.decimalSeparator!="."){var b=d.toString().indexOf(this.decimalSeparator);if(b>0){var c=d.toString().substring(0,b);var d=c+"."+d.toString().substring(b+1)}}return d},_parseDecimalInSimpleMode:function(d){var o=this;var b=o.getvalue("negative");var e=this.ValueString;if(e==undefined){e=this.GetValueString(this.numberInput.val(),this.decimalSeparator,this.decimalSeparator!="")}if(this.decimalSeparator!="."){var g=e.toString().indexOf(".");if(g>0){var f=e.toString().substring(0,g);var c=f+this.decimalSeparator+e.toString().substring(g+1);e=c}}var h=b?"-":"";if(this.symbolPosition=="left"){h+=this.symbol}var l=this.digits%this.groupSize;if(l==0){l=this.groupSize}var n=e.toString();if(n.indexOf("-")>=0){n=n.substring(n.indexOf("-")+1)}h+=n;if(this.symbolPosition=="right"){h+=this.symbol}if(d!=false){o.numberInput.val(h)}},_enterSimpleInputMode:function(f,d){if(d==undefined){d=f.data}var e=this._selection();if(d==null){return}var c=d.getvalue("negative");var b=d.decimal;if(c){if(b>0){b=-b}}d.numberInput.val(b);a.data(d.numberInput,"simpleInputMode",true);if(a.jqx.mobile.isOperaMiniBrowser()){d.numberInput.attr("readonly",false)}this._parseDecimalInSimpleMode();this._setSelectionStart(e.start)},setvalue:function(b,c){if(this[b]!==undefined){if(b=="decimal"){this._setDecimal(c)}else{this[b]=c;this.propertyChangedHandler(this,b,c,c)}}},getvalue:function(b){if(b=="decimal"){if(this.negative!=undefined&&this.negative==true){return -Math.abs(this[b])}}if(b in this){return this[b]}return null},_getString:function(){var c="";for(var b=0;b<this.items.length;b++){var d=this.items[b].character;c+=d}return c},_literal:function(d,b,c,e){return{character:d,regex:b,canEdit:c,isSeparator:e}},_initializeLiterals:function(){if(this.inputMode=="textbox"){return}var h=0;var e=this.negativeSymbol.length;for(var d=0;d<e;d++){var g=this.negativeSymbol.substring(d,d+1);var n="";var b=false;var o=null;if(this.negative){o=this._literal(g,n,b,false)}else{o=this._literal("",n,b,false)}this.items[h]=o;h++}var c=this.symbol.length;if(this.symbolPosition=="left"){for(d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var n="";var b=false;var o=this._literal(g,n,b,false);this.items[h]=o;h++}}var f=this.digits%this.groupSize;if(f==0){f=this.groupSize}for(var d=0;d<this.digits;d++){var g=this.promptChar;var n="\\d";var b=true;var o=this._literal(g,n,b,false);this.items[h]=o;h++;if(d<this.digits-1&&this.groupSeparator!=undefined&&this.groupSeparator.length>0){f--;if(f==0){f=this.groupSize;var l=this._literal(this.groupSeparator,"",false,false);this.items[h]=l;h++}}else{if(d==this.digits-1){o.character=0}}}this.decimalSeparatorPosition=-1;if(this.decimalDigits!=undefined&&this.decimalDigits>0){var g=this.decimalSeparator;if(g.length==0){g="."}var o=this._literal(g,"",false,true);this.items[h]=o;this.decimalSeparatorPosition=h;h++;for(var d=0;d<this.decimalDigits;d++){var r=0;var n="\\d";var q=this._literal(r,n,true,false);this.items[h]=q;h++}}if(this.symbolPosition=="right"){for(var d=0;d<c;d++){var g=this.symbol.substring(d,d+1);var n="";var b=false;var o=this._literal(g,n,b);this.items[h]=o;h++}}},_match:function(c,b){var d=new RegExp(b,"i");return d.test(c)},_raiseEvent:function(r,d){var o=this.events[r];var c={};c.owner=this;if(this.host.css("display")=="none"){return true}var x=d.charCode?d.charCode:d.keyCode?d.keyCode:0;var f=true;var h=this.readOnly;var v=this;if(r==3||r==2){if(!this.disabled){if(this.inputMode!="simple"&&this.inputMode!="textbox"){this._handleMouse(d)}else{return true}}}if(r==0){var g=this.getvalue("decimal");if((this.max<g)||(this.min>g)){this.host.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.host.removeClass(this.toThemeProperty("jqx-input-invalid"));this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"))}}var s=new a.Event(o);s.owner=this;c.value=this.getvalue("decimal");c.text=this.numberInput.val();s.args=c;if(o!=undefined){if(r!=4&&r!=5&&r!=6){f=this.host.trigger(s)}}var v=this;if(this.inputMode=="textbox"){return f}if(this.inputMode!="simple"){if(r==4){if(h||this.disabled){return false}f=v._handleKeyDown(d,x)}else{if(r==5){if(h||this.disabled){f=false}}else{if(r==6){if(h||this.disabled){return false}f=v._handleKeyPress(d,x)}}}}else{if(r==4||r==5||r==6){if(a.jqx.mobile.isTouchDevice()||this.touchMode===true){return true}if(h||this.disabled){return false}var w=String.fromCharCode(x);var q=parseInt(w);var t=true;if(!d.ctrlKey&&!d.shiftKey&&!d.metaKey){if(x>=65&&x<=90){t=false}}if(r==6&&a.jqx.browser.opera!=undefined){if(x==8){return false}}if(t){if(r==4){t=v._handleSimpleKeyDown(d,x)}if(x==189||x==45||x==109||x==173){var y=v._selection();if(r==4){var l=v.getvalue("negative");if(l==false){v.setvalue("negative",true)}else{v.setvalue("negative",false)}v.decimal=v.ValueString;v._parseDecimalInSimpleMode();v._setSelectionStart(y.start);t=false;v._raiseEvent(0,v.value);v._raiseEvent(1,v.numberInput.val())}}var b=c.ctrlKey||c.metaKey;if(!a.jqx.browser.msie){var u=d;if((b&&x==99)||(b&&x==67)||(b&&x==122)||(b&&x==90)||(b&&x==118)||(b&&x==86)||(u.shiftKey&&x==45)){if(a.jqx.browser.webkit||a.jqx.browser.chrome){v._handleSimpleKeyDown(d,x)}if(x==67){return true}return false}}if((b&&x==97)||(b&&x==65)){return true}if(r==6&&t){var n=this._isSpecialKey(x);return n}}return t}}return f},GetSelectionInValue:function(h,g,f,e){var c=0;for(i=0;i<g.length;i++){if(i>=h){break}var d=g.substring(i,i+1);var b=(!isNaN(parseInt(d)));if(b||(e&&g.substring(i,i+1)==f)){c++}}return c},GetSelectionLengthInValue:function(g,h,f,e){var c=0;for(i=0;i<f.length;i++){if(i>=g+h){break}var d=f.substring(i,i+1);var b=(!isNaN(parseInt(d)));if(h>0&&i>=g&&b||(i>=g&&f[i].toString()==e)){c++}}return c},GetInsertTypeByPositionInValue:function(e,g,h,f){var c="before";var b=this.GetValueString(h,g,f);var d=this.GetDigitsToSeparator(0,b,g);if(e>d){c="after"}return c},RemoveRange:function(f,e,q,g,w,b){var h=this.digits;var r=f;var x=e;var c=0;var s=this.decimal;var B=this._selection();var q=this.numberInput.val();var g=this.decimalSeparator;var l=g!="";if(x==0&&this.ValueString.length<this.decimalPossibleChars-1){return c}var y=this.GetSeparatorPositionInText(g,q);if(!w){y=this.GetSeparatorPositionInText(g,q)}if(y<0&&!l&&q.length>1){y=q.length}if(y==-1){y=q.length}var d=l?1:0;if(e<2&&b==true){var A=this.ValueString.length-this.decimalDigits-d;if((A)==h&&f+e<y){x++}}var n="";for(var v=0;v<q.length;v++){if(v<r||v>=r+x){n+=q.substring(v,v+1);continue}else{var u=q.substring(v,v+1);if(u==g){n+=g;continue}else{var u=q.substring(v,v+1);if(this.symbol&&this.symbol!=""&&this.symbol.indexOf(u)>=0){continue}if(v>y){n+="0";continue}}}var u=q.substring(v,v+1);var t=(!isNaN(parseInt(u)));if(t){c++}}if(n.length==0){n="0"}if(w){this.numberInput.val(n)}else{this.ValueString=n}var o=n.substring(0,1);if(o==g&&isNaN(parseInt(o))){var z="0"+n;n=z}this.ValueString=this.GetValueString(n,g,l);this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(r);return c},InsertDigit:function(v,B){if(typeof this.digits!="number"){this.digits=parseInt(this.digits)}if(typeof this.decimalDigits!="number"){this.decimalDigits=parseInt(this.decimalDigits)}var l=1+this.digits;var C=this._selection();var q=this.getvalue("negative");var d=false;if(C.start==0&&this.symbol!=""&&this.symbolPosition=="left"){this._setSelectionStart(C.start+1);C=this._selection();d=true}if((q&&d)||(q&&!d&&C.start==0)){this._setSelectionStart(C.start+1);C=this._selection()}var z=this.numberInput.val().substring(C.start,C.start+1);var s=this.numberInput.val();var g=this.decimalSeparator;var n=g!=""&&this.decimalDigits>0;if(z==this.symbol&&this.symbolPosition=="right"){if(this.decimalDigits==0){this.ValueString=this.GetValueString(s,g,n);if(this.ValueString.length>=l){return}}else{return}}this.ValueString=this.GetValueString(s,g,n);if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits)}var y=this.ValueString;if(this.decimalDigits>0&&B>=y.length){B=y.length-1}var t="";if(B<y.length){t=y.substring(B,B+1)}var h=false;var A=false;var e=this.GetInsertTypeByPositionInValue(B,g,s,n);if(e=="after"){h=true}var b=n?1:0;if(t!=g&&(this.ValueString.length-this.decimalDigits-b)>=l-1){h=true}if(t==="0"&&this.ValueString.length===1&&this.decimalDigits===0){h=true}var u=false;var w=n?1:0;if(!h&&this.ValueString&&this.ValueString.length>=this.digits+this.decimalDigits+w){return}if(h&&t!=g){if(u){B++}var r=y.substring(0,B);if(r.length==y.length){if(this.ValueString.length>=this.digits+this.decimalDigits+w){return}}var x=v;var c="";if(B+1<y.length){c=y.substring(B+1)}var o=r+x+c;this.ValueString=o}else{var r=y.substring(0,B);var x=v;var c=y.substring(B);var o=r+x+c;if(y.substring(0,1)=="0"&&y.substring(1,2)==g){o=x+y.substring(1);if(t==g){this._setSelectionStart(C.start-1);C=this._selection()}}this.ValueString=o}if(q){this.decimal=-this.ValueString}else{this.decimal=this.ValueString}this._parseDecimalInSimpleMode();var f=C.start;f+=1;this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},GetStringToSeparator:function(h,f,e){var d="";var b=f;var g=this.GetSeparatorPositionInText(f,h);var c=h.subString(0,g);d=this.GetValueString(c,f,e);return d},GetSeparatorPositionInText:function(c,d){var b=-1;for(i=0;i<d.length;i++){if(d.substring(i,i+1)==c){b=i;break}}return b},GetValueString:function(h,g,f){var d="";for(var c=0;c<h.length;c++){var e=h.substring(c,c+1);var b=(!isNaN(parseInt(e)));if(b){d+=e}if(e==g){d+=g}}return d},Backspace:function(){var d=this._selection();var e=this._selection();var f=this.numberInput.val();if(d.start==0&&d.length==0){return}this.isBackSpace=true;var c=f.substring[d.start,d.start+1];var b=(!isNaN(parseInt(c)));if(d.start>0&&d.length==0){this._setSelectionStart(d.start-1);var d=this._selection()}this.Delete();this._setSelectionStart(e.start-1);this.isBackSpace=false},Delete:function(c){var e=this._selection();var g=this.numberInput.val();if(e.start===0&&g.substring(0,1)=="-"){this.setvalue("negative",false);var e=this._selection();var g=this.numberInput.val()}var f=e.start;var h=e.length;h=Math.max(h,1);this.ValueString=this.GetValueString(g,this.decimalSeparator,this.decimalSeparator!="");this.RemoveRange(e.start,h,this.ValueString,".",false);var d=this.ValueString.substring(0,1);var b=(!isNaN(parseInt(d)));if(!b){this.ValueString="0"+this.ValueString}this.decimal=this.ValueString;this._parseDecimalInSimpleMode();this._setSelectionStart(f);this.value=this.decimal;this._raiseEvent(0,this.value);this._raiseEvent(1,this.numberInput.val())},insertsimple:function(d){var l=this._selection();var n=this.numberInput.val();if(l.start==n.length&&this.decimal!=null&&this.decimalDigits>0){return}var b=this.decimal;var g=this.decimalSeparator;this.ValueString=this.GetValueString(n,g,g!="");var h=this.GetSelectionInValue(l.start,n,g,g!="");var e=this.GetSelectionLengthInValue(l.start,l.length,n,g);var f=this.GetDigitsToSeparator(0,this.ValueString,g);var c=false;if(this.decimalDigits>0&&h>=this.ValueString.length){h--}if(this.ValueString==""){this.ValueString=new Number(0).toFixed(this.decimalDigits);this.InsertDigit(d,h,l);return}this.RemoveRange(l.start,e,this.ValueString,g,false,true);this.InsertDigit(d,h,l)},GetDigitsToSeparator:function(c,b,d){if(d==undefined){d="."}if(b.indexOf(d)<0){return b.length}for(i=0;i<b.length;i++){if(b.substring(i,i+1)==d){c=i;break}}return c},_handleSimpleKeyDown:function(n,v){var u=this._selection();var b=n.ctrlKey||n.metaKey;if((v==8||v==46)&&b){this.setDecimal(null);return false}if(u.start>=0&&u.start<this.items.length){var d=String.fromCharCode(v)}if(this.rtl&&v==37){var c=n.shiftKey;var g=c?1:0;if(c){this._setSelection(u.start+1-g,u.start+u.length+1)}else{this._setSelection(u.start+1-g,u.start+1)}return false}else{if(this.rtl&&v==39){var c=n.shiftKey;var g=c?1:0;if(c){this._setSelection(u.start-1,u.length+g+u.start-1)}else{this._setSelection(u.start-1,u.start-1)}return false}}if(v==8){this.Backspace();return false}if(v==190||v==110){var l=this.GetSeparatorPositionInText(this.decimalSeparator,this.numberInput.val());if(l!=-1){this._setSelectionStart(l+1)}return false}if(v==188){var t=this.numberInput.val();for(h=u.start;h<t.length;h++){if(t[h]==this.groupSeparator){this._setSelectionStart(1+h);break}}return false}var b=n.ctrlKey||n.metaKey;if((b&&v==99)||(b&&v==67)){var u=this._selection();var w="";var s=this.numberInput.val();if(u.start>0||u.length>0){for(var h=u.start;h<u.end;h++){w+=s.substring(h,h+1)}}a.data(document.body,"jqxSelection",w);if(a.jqx.browser.msie){window.clipboardData.setData("Text",w)}else{var o=this;var f=a('<textarea style="position: absolute; left: -1000px; top: -1000px;"/>');f.val(w);a("body").append(f);f.select();setTimeout(function(){document.designMode="off";f.select();f.remove();o.focus()},100)}this.savedText=w;return true}if((b&&v==122)||(b&&v==90)){return false}if((b&&v==118)||(b&&v==86)||(n.shiftKey&&v==45)){if(a.jqx.browser.msie&&!this.savedText){this.savedText=window.clipboardData.getData("Text")}if(this.savedText!=null&&this.savedText.length>0){this.val(this.savedText)}else{this.val(a.data(document.body,"jqxSelection"))}return false}var d=String.fromCharCode(v);var q=parseInt(d);if(v>=96&&v<=105){q=v-96;v=v-48}if(!isNaN(q)){var o=this;this.insertsimple(q);return false}if(v==46){this.Delete();return false}if(v==38){this.spinUp();return false}else{if(v==40){this.spinDown();return false}}var r=this._isSpecialKey(v);if(!a.jqx.browser.mozilla){return true}return r},_getEditRange:function(){var c=0;var b=0;for(i=0;i<this.items.length;i++){if(this.items[i].canEdit){c=i;break}}for(i=this.items.length-1;i>=0;i--){if(this.items[i].canEdit){b=i;break}}return{start:c,end:b}},_getVisibleItems:function(){var b=new Array();var c=0;for(i=0;i<this.items.length;i++){if(this.items[i].character.toString().length>0){b[c]=this.items[i];c++}}return b},_hasEmptyVisibleItems:function(){var b=this._getVisibleItems();for(i=0;i<b.length;i++){if(b[i].canEdit&&b[i].character==this.promptChar){return true}}return false},_getFirstVisibleNonEmptyIndex:function(){var b=this._getVisibleItems();for(i=0;i<b.length;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){return i}}},_handleMouse:function(f,b){var d=this._selection();if(d.length<=1){var c=this._getFirstVisibleNonEmptyIndex();if(d.start<c){this._setSelectionStart(c)}}},_insertKey:function(l){this.numberInput[0].focus();var d=String.fromCharCode(l);var e=parseInt(d);if(isNaN(e)){return}var q=0;for(i=0;i<this.items.length;i++){if(this.items[i].character.length==0){q++}}var g=this._selection();var b=this;if(g.start>=0&&g.start<=this.items.length){var f=false;var h=this._getFirstVisibleNonEmptyIndex();if(g.start<h&&g.length==0){if(!isNaN(d)||d==" "){this._setSelectionStart(h);g=this._selection()}}var c=this._getFirstEditableItemIndex();var o=this._getLastEditableItemIndex();var n=this._getVisibleItems();a.each(n,function(x,B){if(g.start>x&&x!=n.length-1){return}var E=n[x];if(x>o){E=n[o]}if(isNaN(d)||d==" "){return}if(!E.canEdit){return}var A=b._getSeparatorPosition();if(b._match(d,E.regex)){if(!f&&g.length>0){for(j=g.start+q;j<g.end+q;j++){if(b.items[j].canEdit){if(j>A){b.items[j].character="0"}else{b.items[j].character=b.promptChar}}}var D=b._getString();f=true}var A=b._getSeparatorPosition();var y=b._hasEmptyVisibleItems();if(b.decimal==null){g.start=A-1;if(g.start<0){g.start=0}g.end=g.start}if(g.start<=A&&y){var v=x;if(b.decimalSeparatorPosition==-1&&g.start==A){v=x+1}if(b.decimal==null){v=g.start}var u="";for(p=0;p<v;p++){if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}u+=d;var w=b.decimal<1?1:0;if(g.start==A&&b.decimalSeparatorPosition!=-1){u+=b.decimalSeparator;w=0}for(p=v+w;p<n.length;p++){if(n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character}else{if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}}if(b.decimalSeparator!="."){u=b._parseDecimalValue(u)}u=parseFloat(u).toString();u=new Number(u);u=u.toFixed(b.decimalDigits);if(b.decimalSeparator!="."){u=b._parseDecimalValueToEditorValue(u)}b.setvalue("decimal",u);var D=b._getString();if(g.end<A){b._setSelectionStart(g.end+w)}else{b._setSelectionStart(g.end)}if(g.length>=1){b._setSelectionStart(g.end)}if(g.length==b.numberInput.val().length){var r=b._moveCaretToDecimalSeparator();var C=b.decimalSeparatorPosition>=0?1:0;b._setSelectionStart(r-C)}}else{if(g.start<A||g.start>A){if(b.numberInput.val().length==g.start&&b.decimalSeparatorPosition!=-1){return false}else{if(b.numberInput.val().length==g.start&&b.decimalSeparatorPosition==-1&&!y){return false}}var u="";var s=false;for(p=0;p<x;p++){if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}if(n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character;s=true}}u+=d;var w=b.decimal<1?1:0;if(!s&&g.start==A-1){u+=b.decimalSeparator;s=true}for(p=x+1;p<n.length;p++){if(!s&&n[p].character==b.decimalSeparator&&n[p].isSeparator){u+=n[p].character}else{if(n[p].canEdit&&n[p].character!=b.promptChar){u+=n[p].character}}}b.setvalue("decimal",u);var D=b._getString();if(b.decimalSeparatorPosition<0&&E==n[o]){b._setSelectionStart(x);return false}var z=D.indexOf(b.symbol);var t=!b.getvalue("negative")?0:1;if(z<=t){z=D.length}if(g.start<z){b._setSelectionStart(x+1)}else{b._setSelectionStart(x)}if(g.length>=1){}if(g.length==b.numberInput.val().length){var r=b._moveCaretToDecimalSeparator();b._setSelectionStart(r-1)}}}return false}})}},_handleKeyPress:function(h,d){var f=this._selection();var b=this;var l=h.ctrlKey||h.metaKey;if((l&&d==97)||(l&&d==65)){return true}if(d==8){if(f.start>0){b._setSelectionStart(f.start)}return false}if(d==46){if(f.start<this.items.length){b._setSelectionStart(f.start)}return false}if(!a.jqx.browser.mozilla){if(d==45||d==173||d==109||d==189){var c=this.getvalue("negative");if(c==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(a.jqx.browser.msie){this._insertKey(d)}var g=this._isSpecialKey(d);return g},_deleteSelectedText:function(){var d=this._selection();var c="";var f=this._getSeparatorPosition();var b=this._getVisibleItems();var e=this._getHiddenPrefixCount();if(this.numberInput.val().length==d.start&&d.length==0){this._setSelection(d.start,d.start+1);d=this._selection()}for(i=0;i<d.start;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){c+=b[i].character}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}for(i=d.start;i<d.end;i++){if(i>f&&this.decimalSeparatorPosition!=-1){if(b[i].canEdit&&b[i].character!=this.promptChar){c+="0"}}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}for(i=d.end;i<b.length;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){c+=b[i].character}else{if(!b[i].canEdit&&this.decimalSeparatorPosition!=-1&&b[i]==b[this.decimalSeparatorPosition-e]){if(c.length==0){c="0"}c+=b[i].character}}}this.setvalue("decimal",c);return d.length>0},_restoreInitialState:function(){var b=parseInt(this.decimalDigits);if(b>0){b+=2}for(k=this.items.length-1;k>this.items.length-1-b;k--){if(this.items[k].canEdit&&this.items[k].character==this.promptChar){this.items[k].character=0}}},clear:function(){this.setDecimal(0)},clearDecimal:function(){if(this.inputMode=="textbox"){this.numberInput.val();return}for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit){this.items[b].character=this.promptChar}}this._restoreInitialState()},_saveSelectedText:function(){var c=this._selection();var d="";var b=this._getVisibleItems();if(c.start>0||c.length>0){for(i=c.start;i<c.end;i++){if(b[i].canEdit&&b[i].character!=this.promptChar){d+=b[i].character}else{if(b[i].isSeparator){d+=b[i].character}}}}if(a.jqx.browser.msie){window.clipboardData.setData("Text",d)}return d},_pasteSelectedText:function(){var f=this._selection();var h="";var c=0;this.selectedText=a.data(document.body,"jqxSelection");if(window.clipboardData){var d=window.clipboardData.getData("Text");if(d!=this.selectedText&&d.length>0){this.selectedText=window.clipboardData.getData("Text");if(this.selectedText==null||this.selectedText==undefined){return}}}var e=f.start;var n=this._getVisibleItems();if(this.selectedText!=null){for(var l=0;l<this.selectedText.length;l++){var b=parseInt(this.selectedText[l]);if(!isNaN(b)){var g=48+b;this._insertKey(g)}}}},_getHiddenPrefixCount:function(){var b=0;if(!this.negative){b++}if(this.symbolPosition=="left"){for(i=0;i<this.symbol.length;i++){if(this.symbol.substring(i,i+1)==""){b++}}}return b},_getEditableItem:function(){var b=this._selection();for(i=0;i<this.items.length;i++){if(i<b.start){if(this.items[i].canEdit&&this.items[i].character!=this.promptChar){return this.items[i]}}}return null},_getEditableItems:function(){var c=new Array();var b=0;for(i=0;i<this.items.length;i++){if(this.items[i].canEdit){c[b]=this.items[i];b++}}return c},_getValidSelectionStart:function(b){for(i=this.items.length-1;i>=0;i--){if(this.items[i].canEdit&&this.items[i].character!=this.promptChar){return i}}return -1},_getEditableItemIndex:function(c){var e=this._selection();var f=this._getHiddenPrefixCount();var b=this._getVisibleItems();var d=e.start;var g=-1;for(i=0;i<d;i++){if(i<b.length&&b[i].canEdit){g=i+f}}if(g==-1&&e.length>0){d=e.end;for(i=0;i<d;i++){if(i<b.length&&b[i].canEdit){g=i+f;break}}}return g},_getEditableItemByIndex:function(b){for(k=0;k<this.items.length;k++){if(k>b){if(this.items[k].canEdit&&this.items[k].character!=this.promptChar){return k}}}return -1},_getFirstEditableItemIndex:function(){var b=this._getVisibleItems();for(m=0;m<b.length;m++){if(b[m].character!=this.promptChar&&b[m].canEdit&&b[m].character!="0"){return m}}return -1},_getLastEditableItemIndex:function(){var b=this._getVisibleItems();for(m=b.length-1;m>=0;m--){if(b[m].character!=this.promptChar&&b[m].canEdit){return m}}return -1},_moveCaretToDecimalSeparator:function(){for(i=this.items.length-1;i>=0;i--){if(this.items[i].character==this.decimalSeparator&&this.items[i].isSeparator){if(!this.negative){this._setSelectionStart(i);return i}else{this._setSelectionStart(i+1);return i}break}}return this.numberInput.val().length},_handleBackspace:function(){var g=this._selection();var h=this._getHiddenPrefixCount();var b=this._getEditableItemIndex()-h;var f=this._getFirstVisibleNonEmptyIndex();var c=false;if(this.negative){c=true;if(f>=b+1||g.start==0){this.setvalue("negative",false);if(g.length==0){this._setSelectionStart(g.start-1);var g=this._selection()}}}if(b>=0){if(g.length==0&&b!=-1){this._setSelection(b,b+1)}var l=g.start>this._getSeparatorPosition()+1&&this.decimalSeparatorPosition>0;if(l){g=this._selection()}var e=this._deleteSelectedText();if(g.length<1||l){this._setSelectionStart(g.start)}else{if(g.length>=1){this._setSelectionStart(g.end)}}if(g.length==this.numberInput.val().length||c){var d=this._moveCaretToDecimalSeparator();this._setSelectionStart(d-1)}}else{this._setSelectionStart(g.start)}},_handleKeyDown:function(h,s){var r=this._selection();var c=h.ctrlKey||h.metaKey;if((s==8||s==46)&&c){this.setDecimal(null);return false}if(this.rtl&&s==37){var d=h.shiftKey;var g=d?1:0;if(d){this._setSelection(r.start+1-g,r.start+r.length+1)}else{this._setSelection(r.start+1-g,r.start+1)}return false}else{if(this.rtl&&s==39){var d=h.shiftKey;var g=d?1:0;if(d){this._setSelection(r.start-1,r.length+g+r.start-1)}else{this._setSelection(r.start-1,r.start-1)}return false}}if((c&&s==97)||(c&&s==65)){return true}if((c&&s==120)||(c&&s==88)){this.selectedText=this._saveSelectedText(h);a.data(document.body,"jqxSelection",this.selectedText);this._handleBackspace();return false}if((c&&s==99)||(c&&s==67)){this.selectedText=this._saveSelectedText(h);a.data(document.body,"jqxSelection",this.selectedText);return false}if((c&&s==122)||(c&&s==90)){return false}if((c&&s==118)||(c&&s==86)||(h.shiftKey&&s==45)){this._pasteSelectedText();return false}if(r.start>=0&&r.start<this.items.length){var f=String.fromCharCode(s);var u=this.items[r.start]}if(s==8){this._handleBackspace();return false}if(s==190||s==110){this._moveCaretToDecimalSeparator();return false}if(s==188){var q=this.numberInput.val();for(i=r.start;i<q.length;i++){if(q[i]==this.groupSeparator){this._setSelectionStart(1+i);break}}return false}if(a.jqx.browser.msie==null){var f=String.fromCharCode(s);var n=parseInt(f);if(s>=96&&s<=105){n=s-96;s=s-48}if(!isNaN(n)){var l=this;l._insertKey(s);return false}}if(s==46){var t=this._getVisibleItems();if(r.start<t.length){var g=t[r.start].canEdit==false?2:1;if(r.start==0){if(this.negative){this.setvalue("negative",false);if(r.length==0){this._setSelectionStart(0)}var r=this._selection();if(r.length==0){return false}}}if(r.length==0){this._setSelection(r.start+g,r.start+g+r.length)}this._handleBackspace();if(new Number(this.decimal)<1||r.start>this._getSeparatorPosition()){this._setSelectionStart(r.end+g)}else{if(r.start+1<this.decimalSeparatorPosition){this._setSelectionStart(r.end+g)}}}return false}if(s==38){this.spinUp();return false}else{if(s==40){this.spinDown();return false}}var o=this._isSpecialKey(s);if(a.jqx.browser.mozilla){if(s==45||s==173||s==109||s==189){var b=this.getvalue("negative");if(b==false){this.setvalue("negative",true)}else{this.setvalue("negative",false)}}}if(!a.jqx.browser.mozilla){return true}return o},_isSpecialKey:function(b){if(b!=8&&b!=9&&b!=13&&b!=35&&b!=36&&b!=37&&b!=39&&b!=27&&b!=46){return false}return true},_selection:function(){try{if("selectionStart" in this.numberInput[0]){var g=this.numberInput[0];var h=g.selectionEnd-g.selectionStart;return{start:g.selectionStart,end:g.selectionEnd,length:h,text:g.value}}else{var d=document.selection.createRange();if(d==null){return{start:0,end:g.value.length,length:0}}var c=this.numberInput[0].createTextRange();var f=c.duplicate();c.moveToBookmark(d.getBookmark());f.setEndPoint("EndToStart",c);var h=d.text.length;return{start:f.text.length,end:f.text.length+d.text.length,length:h,text:d.text}}}catch(b){return{start:0,end:0,length:0}}},selectAll:function(){var b=this.numberInput;setTimeout(function(){if("selectionStart" in b[0]){b[0].focus();b[0].setSelectionRange(0,b[0].value.length)}else{var c=b[0].createTextRange();c.collapse(true);c.moveEnd("character",b[0].value.length);c.moveStart("character",0);c.select()}},10)},_setSelection:function(f,b){if(this._disableSetSelection==true){return}var e=a.jqx.mobile.isTouchDevice();if(e||this.touchMode==true){return}try{if("selectionStart" in this.numberInput[0]){this.numberInput[0].focus();this.numberInput[0].setSelectionRange(f,b)}else{var c=this.numberInput[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",f);c.select()}}catch(d){}},_setSelectionStart:function(b){this._setSelection(b,b);a.data(this.numberInput,"selectionstart",b)},resize:function(c,b){this.width=c;this.height=b;this._render(false)},_render:function(f){var c=parseInt(this.host.css("border-left-width"));var h=parseInt(this.host.css("border-left-width"));var g=parseInt(this.host.css("border-left-width"));var d=parseInt(this.host.css("border-left-width"));this.numberInput.css("padding-top","0px");this.numberInput.css("padding-bottom","0px");this.host.height(this.height);this.host.width(this.width);var e=this.host.width();var o=this.host.height();this.numberInput.css({"border-left-width":0,"border-right-width":0,"border-bottom-width":0,"border-top-width":0});this.numberInput.css("text-align",this.textAlign);var q=this.numberInput.css("font-size");this.numberInput.css("height",parseInt(q)+4+"px");this.numberInput.css("width",e-2);var n=o-2*g-parseInt(q)-2;if(isNaN(n)){n=0}if(n<0){n=0}if(this.spinButtons&&this.spincontainer){e-=parseInt(this.spinButtonsWidth-2);var l=a.jqx.mobile.isTouchDevice();if(!l&&this.touchMode!==true){this.spincontainer.width(this.spinButtonsWidth);this.upbutton.width(this.spinButtonsWidth+2);this.downbutton.width(this.spinButtonsWidth+2);this.upbutton.height("50%");this.downbutton.height("50%");this.spincontainer.width(this.spinButtonsWidth)}else{this.spincontainer.width(2*(this.spinButtonsWidth));e-=this.spinButtonsWidth;this.upbutton.height("100%");this.downbutton.height("100%");this.downbutton.css("float","left");this.upbutton.css("float","right");this.upbutton.width(this.spinButtonsWidth);this.downbutton.width(1+this.spinButtonsWidth)}this._upArrow.height("100%");this._downArrow.height("100%");this.numberInput.css("width",e-6);this.numberInput.css("margin-right","2px")}var b=n/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){b=n/4}this.numberInput.css("padding-left","0px");this.numberInput.css("padding-right","0px");this.numberInput.css("padding-top",Math.round(b)+"px");this.numberInput.css("padding-bottom",Math.round(b)+"px");if(f==undefined||f==true){this.numberInput.val(this._getString());if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode()}}},destroy:function(){this._removeHandlers();this.host.remove()},inputValue:function(b){if(b===undefined){return this._value()}this.propertyChangedHandler(this,"value",this._value,b);this._refreshValue();return this},_value:function(){var b=this.numberInput.val();return b},val:function(c){if(c!==undefined&&typeof c!="object"||c===null){if(c===null){this.setDecimal(null);return}else{var f=c;f=f.toString();if(f.indexOf(this.symbol)>-1){f=f.replace(this.symbol,"")}var b=function(q,n,o){var h=q;if(n==o){return q}var l=h.indexOf(n);while(l!=-1){h=h.replace(n,o);l=h.indexOf(n)}return h};f=b(f,this.groupSeparator,"");f=f.replace(this.decimalSeparator,".");var g="";for(var d=0;d<f.length;d++){var e=f.substring(d,d+1);if(e==="-"){g+="-"}if(e==="."){g+="."}if(e.match(/^[0-9]+$/)!=null){g+=e}}f=g;f=f.replace(/ /g,"");f=new Number(f);this.setDecimal(f)}}else{return this.getDecimal()}},getDecimal:function(){if(this.decimal==null){return null}if(this.inputMode=="simple"){this._parseDecimalInSimpleMode(false);this.decimal=this._getDecimalInSimpleMode(this.decimal)}if(this.decimal==""){return 0}var b=this.getvalue("negative");if(b&&this.decimal>0){return -parseFloat(this.decimal)}return parseFloat(this.decimal)},setDecimal:function(e){var b=e;if(this.decimalSeparator!="."){if(e===null){this._setDecimal(e)}else{var d=e;if(typeof(e)!="number"){e=e.toString();var g=e.indexOf(".");if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}else{var g=e.indexOf(this.decimalSeparator);if(g!=-1){var c=e.substring(0,g);var f=e.substring(g+1);d=c+"."+f;if(c.indexOf("-")!=-1){c=c.substring(1)}if(this.inputMode!="advanced"){e=c+"."+f}else{e=c+this.decimalSeparator+f}}}}if(d<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}this._setDecimal(e)}}else{if(e<0){this.setvalue("negative",true)}else{this.setvalue("negative",false)}if(e===null){this._setDecimal(e)}else{this._setDecimal(Math.abs(e))}}if(b==null){this.numberInput.val("")}},_setDecimal:function(r){if(r==null){this.decimal=null;this.value=null;this._refreshValue();this.decimal=null;this.value=null;return}if(r==null||r==undefined){r=0}if(r.toString().indexOf("e")!=-1){r=0}this.clearDecimal();var s=r.toString();var t="";var b="";var d=true;if(s.length==0){s="0"}for(var g=0;g<s.length;g++){if(s.substring(g,g+1)==this.decimalSeparator){d=false;continue}if(d){t+=s.substring(g,g+1)}else{b+=s.substring(g,g+1)}}if(t.length>0){t=parseFloat(t).toString()}var o=this.digits;if(o<t.length){t=t.substr(0,o)}var f=0;var q=this._getSeparatorPosition();var n=this._getHiddenPrefixCount();q=q+n;for(var g=q;g>=0;g--){if(g<this.items.length&&this.items[g].canEdit){if(f<t.length){this.items[g].character=t.substring(t.length-f-1,t.length-f);f++}}}f=0;for(var g=q;g<this.items.length;g++){if(this.items[g].canEdit){if(f<b.length){this.items[g].character=b.substring(f,f+1);f++}}}this._refreshValue();if(this.decimalSeparator=="."){this.ValueString=new Number(r).toFixed(this.decimalDigits)}else{var l=r.toString().indexOf(this.decimalSeparator);if(l>0){var h=r.toString().substring(0,l);var e=h+"."+r.toString().substring(l+1);this.ValueString=new Number(e).toFixed(this.decimalDigits)}else{this.ValueString=new Number(r).toFixed(this.decimalDigits)}}if(this.inputMode!="advanced"){this._parseDecimalInSimpleMode();this._raiseEvent(1,this.ValueString)}if(this.inputMode=="textbox"){this.decimal=this.ValueString;var c=this.getvalue("negative");if(c){this.decimal="-"+this.ValueString}}var r=this.val();if(r<this.min||r>this.max){this.host.addClass("jqx-input-invalid")}else{this.host.removeClass("jqx-input-invalid")}},_getSeparatorPosition:function(){var b=this._getHiddenPrefixCount();if(this.decimalSeparatorPosition>0){return this.decimalSeparatorPosition-b}return this.items.length-b},_setTheme:function(){this.host.removeClass();this.host.addClass(this.toThemeProperty("jqx-input"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-numberinput"));if(this.spinButtons){this.downbutton.removeClass();this.upbutton.removeClass();this.downbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this.upbutton.addClass(this.toThemeProperty("jqx-scrollbar-button-state-normal"));this._upArrow.removeClass();this._downArrow.removeClass();this._upArrow.addClass(this.toThemeProperty("jqx-icon-arrow-up"));this._downArrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}this.numberInput.removeClass();this.numberInput.addClass(this.toThemeProperty("jqx-input-content"))},propertyChangedHandler:function(c,d,g,f){if(d=="digits"||d=="groupSize"||d=="decimalDigits"){if(f<0){throw new Exception(this.invalidArgumentExceptions[0])}}if(d==="theme"){a.jqx.utilities.setTheme(g,f,c.host)}if(d=="digits"){if(f!=g){c.digits=parseInt(f)}}if(d=="min"||d=="max"){a.jqx.aria(c,"aria-value"+d,f.toString());c._refreshValue()}if(d=="decimalDigits"){if(f!=g){c.decimalDigits=parseInt(f)}}if(d=="decimalSeparator"||d=="digits"||d=="symbol"||d=="symbolPosition"||d=="groupSize"||d=="groupSeparator"||d=="decimalDigits"||d=="negativeSymbol"){var b=c.decimal;if(d=="decimalSeparator"&&f==""){f=" "}if(g!=f){var e=c._selection();c.items=new Array();c._initializeLiterals();c.value=c._getString();c._refreshValue();c._setDecimal(b)}}if(d=="rtl"){if(c.rtl){if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","right")}else{if(c.spincontainer){c.spincontainer.css("float","right");c.spincontainer.css("border-right-width","1px")}c.numberInput.css("float","left")}}if(d=="spinButtons"){if(c.spincontainer){if(!f){c.spincontainer.css("display","none")}else{c.spincontainer.css("display","block")}c._render()}else{c._spinButtons()}}if(d==="touchMode"){c.inputMode="textbox";c.spinMode="simple";c.render()}if(d=="negative"&&c.inputMode=="advanced"){var e=c._selection();var h=0;if(f){c.items[0].character=c.negativeSymbol[0];h=1}else{c.items[0].character="";h=-1}c._refreshValue();if(c.isInitialized){c._setSelection(e.start+h,e.end+h)}}if(d=="decimal"){c.value=f;c.setDecimal(f)}if(d==="value"){c.value=f;c.setDecimal(f);c._raiseEvent(1,f)}if(d=="textAlign"){c.textAlign=f;c._render()}if(d=="disabled"){c.numberInput.attr("disabled",f);if(c.disabled){c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"))}a.jqx.aria(c,"aria-disabled",f.toString())}if(d=="readOnly"){c.readOnly=f}if(d=="promptChar"){for(i=0;i<c.items.length;i++){if(c.items[i].character==c.promptChar){c.items[i].character=f}}c.promptChar=f}if(d=="width"){c.width=f;c._render()}else{if(d=="height"){c.height=f;c._render()}}},_value:function(){var b=this.value;return b},_refreshValue:function(){var g=this.value;var b=0;if(this.inputMode==="textbox"){return}this.value=this._getString();g=this.value;var f="";for(var c=0;c<this.items.length;c++){var e=this.items[c];if(e.canEdit&&e.character!=this.promptChar){f+=e.character}if(c==this.decimalSeparatorPosition){f+="."}}this.decimal=f;var d=false;if(this.oldValue!==g){this.oldValue=g;this._raiseEvent(0,g);d=true}if(this.inputMode!="simple"){this.numberInput.val(g);if(d){this._raiseEvent(1,g)}}if(g==null){this.numberInput.val("")}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxRadioButton","",{});a.extend(a.jqx._jqxRadioButton.prototype,{defineInstance:function(){var b={animationShowDelay:300,animationHideDelay:300,width:null,height:null,boxSize:"13px",checked:false,hasThreeStates:false,disabled:false,enableContainerClick:true,locked:false,groupName:"",rtl:false,aria:{"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}},events:["checked","unchecked","indeterminate","change"]};a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this.setSize();var c=this;this.propertyChangeMap.width=function(d,f,e,g){c.setSize()};this.propertyChangeMap.height=function(d,f,e,g){c.setSize()};if(this.radiobutton){this.radiobutton.remove()}this.radiobutton=a("<div><div><span></span></div></div>");this.host.attr("role","radio");if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.prepend(this.radiobutton);this.host.append(a('<div style="clear: both;"></div>'));this.checkMark=a(this.radiobutton).find("span");this.box=a(this.radiobutton).find("div");this._supportsRC=true;if(a.jqx.browser.msie&&a.jqx.browser.version<9){this._supportsRC=false}this.box.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.box.addClass(this.toThemeProperty("jqx-radiobutton-default"));this.host.addClass(this.toThemeProperty("jqx-widget"));if(this.disabled){this.disable()}this.host.addClass(this.toThemeProperty("jqx-radiobutton"));if(this.locked){this.host.css("cursor","auto")}var b=this.element.getAttribute("checked");if(b=="checked"||b=="true"||b==true){this.checked=true}this._addInput();this._render();this._addHandlers();a.jqx.aria(this)},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.setSize()},setSize:function(){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)}}},_addHandlers:function(){var b=this;this.addHandler(this.box,"click",function(c){if(!b.disabled&&!b.enableContainerClick){b.toggle("click");c.preventDefault();return false}});this.addHandler(this.host,"keydown",function(c){if(!b.disabled&&!b.locked){if(c.keyCode==32){b.toggle("click");c.preventDefault();return false}}});this.addHandler(this.host,"click",function(c){if(!b.disabled&&b.enableContainerClick){b.toggle("click");c.preventDefault();return false}});this.addHandler(this.host,"selectstart",function(c){if(!b.disabled&&b.enableContainerClick){c.preventDefault()}});this.addHandler(this.host,"mouseup",function(c){if(!b.disabled&&b.enableContainerClick){c.preventDefault()}});this.addHandler(this.host,"focus",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-focus"));c.preventDefault();return false}});this.addHandler(this.host,"blur",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-focus"));c.preventDefault();return false}});this.addHandler(this.host,"mouseenter",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-hover"));c.preventDefault();return false}});this.addHandler(this.host,"mouseleave",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-hover"));c.preventDefault();return false}});this.addHandler(this.box,"mouseenter",function(){if(!b.disabled&&!b.enableContainerClick){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!b.disabled&&!b.enableContainerClick){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}})},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){this.removeHandler(this.box,"click");this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave");this.removeHandler(this.host,"click");this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"mousedown");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur")},_render:function(){if(this.boxSize==null){this.boxSize=13}this.box.width(this.boxSize);this.box.height(this.boxSize);if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{this.host.css("cursor","auto")}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-radiobutton-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates()},val:function(b){if(arguments.length==0||typeof(b)=="object"){return this.checked}if(typeof b=="string"){if(b=="true"){this.check("api")}if(b=="false"){this.uncheck("api")}if(b==""){this.indeterminate("api")}}else{if(b==true){this.check("api")}if(b==false){this.uncheck("api")}if(b==null){this.indeterminate("api")}}return this.checked},check:function(c){this.checked=true;var d=this;this.checkMark.removeClass();this.checkMark.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(a.jqx.browser.msie){if(!this.disabled){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"));this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}}else{if(!this.disabled){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"));this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}var e=a.find(".jqx-radiobutton");if(this.groupName==null){this.groupName=""}a.each(e,function(){var f=a(this).jqxRadioButton("groupName");if(f==d.groupName&&this!=d.element){a(this).jqxRadioButton("uncheck","api")}});this._raiseEvent("0");this._raiseEvent("3",{type:c,checked:true});if(this.checkMark.height()==0){this.checkMark.height(this.boxSize);this.checkMark.width(this.boxSize)}else{if(this.boxSize!="13px"){var b=parseInt(this.boxSize)/2;this.checkMark.height(b);this.checkMark.width(b);this.checkMark.css("margin-left",1+(b/4));this.checkMark.css("margin-top",1+(b/4))}}this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)},uncheck:function(b){var d=this.checked;this.checked=false;var c=this;if(a.jqx.browser.msie){c.checkMark.removeClass()}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){c.checkMark.removeClass()})}if(d){this._raiseEvent("1");this._raiseEvent("3",{type:b,checked:false})}this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)},indeterminate:function(b){var c=this.checked;this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(c!=null){this._raiseEvent("2");this._raiseEvent("3",{type:b,checked:null})}this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined")},toggle:function(c){if(this.disabled){return}if(this.locked){return}var b=this.checked;if(this.checked==true){this.checked=this.hasTreeStates?null:true}else{this.checked=true}if(b!=this.checked){this.updateStates(c)}this.input.val(this.checked)},updateStates:function(b){if(this.checked){this.check(b)}else{if(this.checked==false){this.uncheck(b)}else{if(this.checked==null){this.indeterminate(b)}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-radiobutton-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-radiobutton-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-radiobutton-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this._removeHandlers();this.host.remove()},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c==this.enableContainerClick&&!this.disabled&&!this.locked){if(d){this.host.css("cursor","pointer")}else{this.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-radiobutton-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-radiobutton-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="checked"){switch(d){case true:this.check("api");break;case false:this.uncheck("api");break;case null:this.indeterminate();break}}if(c=="theme"){a.jqx.utilities.setTheme(e,d,this.host)}if(c=="disabled"){if(d){this.disable()}else{this.enable()}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxRadioButton","",{});a.extend(a.jqx._jqxRadioButton.prototype,{defineInstance:function(){var b={animationShowDelay:300,animationHideDelay:300,width:null,height:null,boxSize:"13px",checked:false,hasThreeStates:false,disabled:false,enableContainerClick:true,locked:false,groupName:"",rtl:false,aria:{"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}},events:["checked","unchecked","indeterminate","change"]};a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this.setSize();var c=this;this.propertyChangeMap.width=function(d,f,e,g){c.setSize()};this.propertyChangeMap.height=function(d,f,e,g){c.setSize()};if(this.radiobutton){this.radiobutton.remove()}this.radiobutton=a("<div><div><span></span></div></div>");this.host.attr("role","radio");if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.prepend(this.radiobutton);this.host.append(a('<div style="clear: both;"></div>'));this.checkMark=a(this.radiobutton).find("span");this.box=a(this.radiobutton).find("div");this._supportsRC=true;if(a.jqx.browser.msie&&a.jqx.browser.version<9){this._supportsRC=false}this.box.addClass(this.toThemeProperty("jqx-fill-state-normal"));this.box.addClass(this.toThemeProperty("jqx-radiobutton-default"));this.host.addClass(this.toThemeProperty("jqx-widget"));if(this.disabled){this.disable()}this.host.addClass(this.toThemeProperty("jqx-radiobutton"));if(this.locked){this.host.css("cursor","auto")}var b=this.element.getAttribute("checked");if(b=="checked"||b=="true"||b==true){this.checked=true}this._addInput();this._render();this._addHandlers();a.jqx.aria(this)},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.setSize()},setSize:function(){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)}}},_addHandlers:function(){var b=this;this.addHandler(this.box,"click",function(c){if(!b.disabled&&!b.enableContainerClick){b.toggle("click");c.preventDefault();return false}});this.addHandler(this.host,"keydown",function(c){if(!b.disabled&&!b.locked){if(c.keyCode==32){b.toggle("click");c.preventDefault();return false}}});this.addHandler(this.host,"click",function(c){if(!b.disabled&&b.enableContainerClick){b.toggle("click");c.preventDefault();return false}});this.addHandler(this.host,"selectstart",function(c){if(!b.disabled&&b.enableContainerClick){c.preventDefault()}});this.addHandler(this.host,"mouseup",function(c){if(!b.disabled&&b.enableContainerClick){c.preventDefault()}});this.addHandler(this.host,"focus",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-focus"));c.preventDefault();return false}});this.addHandler(this.host,"blur",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-focus"));c.preventDefault();return false}});this.addHandler(this.host,"mouseenter",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-hover"));c.preventDefault();return false}});this.addHandler(this.host,"mouseleave",function(c){if(!b.disabled&&b.enableContainerClick&&!b.locked){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-hover"));c.preventDefault();return false}});this.addHandler(this.box,"mouseenter",function(){if(!b.disabled&&!b.enableContainerClick){b.box.addClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!b.disabled&&!b.enableContainerClick){b.box.removeClass(b.toThemeProperty("jqx-radiobutton-hover"));b.box.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}})},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){this.removeHandler(this.box,"click");this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave");this.removeHandler(this.host,"click");this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"mousedown");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur")},_render:function(){if(this.boxSize==null){this.boxSize=13}this.box.width(this.boxSize);this.box.height(this.boxSize);if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{this.host.css("cursor","auto")}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-radiobutton-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates()},val:function(b){if(arguments.length==0||typeof(b)=="object"){return this.checked}if(typeof b=="string"){if(b=="true"){this.check("api")}if(b=="false"){this.uncheck("api")}if(b==""){this.indeterminate("api")}}else{if(b==true){this.check("api")}if(b==false){this.uncheck("api")}if(b==null){this.indeterminate("api")}}return this.checked},check:function(c){this.checked=true;var d=this;this.checkMark.removeClass();this.checkMark.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(a.jqx.browser.msie){if(!this.disabled){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"));this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}}else{if(!this.disabled){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"));this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-checked"))}this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}var e=a.find(".jqx-radiobutton");if(this.groupName==null){this.groupName=""}a.each(e,function(){var f=a(this).jqxRadioButton("groupName");if(f==d.groupName&&this!=d.element){a(this).jqxRadioButton("uncheck","api")}});this._raiseEvent("0");this._raiseEvent("3",{type:c,checked:true});if(this.checkMark.height()==0){var b=parseInt(this.boxSize)/2;this.checkMark.height(b);this.checkMark.width(b)}else{if(this.boxSize!="13px"){var b=parseInt(this.boxSize)/2;this.checkMark.height(b);this.checkMark.width(b);this.checkMark.css("margin-left",1+(b/4));this.checkMark.css("margin-top",1+(b/4))}}this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)},uncheck:function(b){var d=this.checked;this.checked=false;var c=this;if(a.jqx.browser.msie){c.checkMark.removeClass()}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){c.checkMark.removeClass()})}if(d){this._raiseEvent("1");this._raiseEvent("3",{type:b,checked:false})}this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked)},indeterminate:function(b){var c=this.checked;this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(c!=null){this._raiseEvent("2");this._raiseEvent("3",{type:b,checked:null})}this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined")},toggle:function(c){if(this.disabled){return}if(this.locked){return}var b=this.checked;if(this.checked==true){this.checked=this.hasTreeStates?null:true}else{this.checked=true}if(b!=this.checked){this.updateStates(c)}this.input.val(this.checked)},updateStates:function(b){if(this.checked){this.check(b)}else{if(this.checked==false){this.uncheck(b)}else{if(this.checked==null){this.indeterminate(b)}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-radiobutton-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-radiobutton-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-radiobutton-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-radiobutton-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this._removeHandlers();this.host.remove()},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c==this.enableContainerClick&&!this.disabled&&!this.locked){if(d){this.host.css("cursor","pointer")}else{this.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-radiobutton-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-radiobutton-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="checked"){switch(d){case true:this.check("api");break;case false:this.uncheck("api");break;case null:this.indeterminate();break}}if(c=="theme"){a.jqx.utilities.setTheme(e,d,this.host)}if(c=="disabled"){if(d){this.disable()}else{this.enable()}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxRibbon","",{});a.extend(a.jqx._jqxRibbon.prototype,{defineInstance:function(){var b={width:null,height:"auto",mode:"default",position:"top",selectedIndex:-1,selectionMode:"click",popupCloseMode:"click",animationType:"fade",animationDelay:400,scrollPosition:"both",disabled:false,rtl:false,scrollStep:10,scrollDelay:30,initContent:null,events:["select","unselect","change"]};a.extend(true,this,b)},createInstance:function(){var b=this;b._browser=a.jqx.browser;if(b.mode!="popup"&&b.selectedIndex===-1){b.selectedIndex=0}b._originalHTML=b.host.html();b._render(true)},render:function(){this._render()},refresh:function(b){if(b!==true){this._render()}},destroy:function(){var b=this;b._removeHandlers();b.host.remove()},selectAt:function(b){this._selectAt(b)},clearSelection:function(){this._clearSelection()},disableAt:function(b){var c=this;c._items[b]._disabled=true;a(c._items[b]).addClass(c.toThemeProperty("jqx-fill-state-disabled"));if(b===c.selectedIndex){c._clearSelection()}},enableAt:function(b){var c=this;c._items[b]._disabled=false;a(c._items[b]).removeClass(c.toThemeProperty("jqx-fill-state-disabled"))},hideAt:function(b){var c=this;a(c._items[b]).css("display","none");c._checkScrollButtons();if(b===c.selectedIndex){c._clearSelection()}else{c._updatePositions()}},showAt:function(b){var c=this;if(c._orientation==="horizontal"){a(c._items[b]).css("display","inline-block")}else{a(c._items[b]).css("display","inherit")}c._checkScrollButtons();c._updatePositions()},val:function(b){var c=this;if(b){c._selectAt(b)}else{return c.selectedIndex}},addAt:function(b,e){var c=this;c._removeHandlers();var f=a('<li class="'+c.toThemeProperty("jqx-ribbon-item")+" "+c.toThemeProperty("jqx-ribbon-item-"+c.position)+'">'+e.title+"</li>");var d=a('<div class="'+c.toThemeProperty("jqx-widget-content")+" "+c.toThemeProperty("jqx-ribbon-content-section")+" "+c.toThemeProperty("jqx-ribbon-content-section-"+c.position)+'">'+e.content+"</div>");switch(c.position){case"top":f.addClass(c.toThemeProperty("jqx-rc-t"));d.addClass(c.toThemeProperty("jqx-rc-b"));break;case"bottom":f.addClass(c.toThemeProperty("jqx-rc-b"));d.addClass(c.toThemeProperty("jqx-rc-t"));break;case"left":f.addClass(c.toThemeProperty("jqx-rc-l"));d.addClass(c.toThemeProperty("jqx-rc-r"));break;case"right":f.addClass(c.toThemeProperty("jqx-rc-r"));d.addClass(c.toThemeProperty("jqx-rc-l"));break}if(c.mode==="popup"){d.addClass(c.toThemeProperty("jqx-ribbon-content-section-popup"));if(c._orientation==="horizontal"){d.addClass(c.toThemeProperty("jqx-ribbon-content-section-horizontal-popup"))}else{d.addClass(c.toThemeProperty("jqx-ribbon-content-section-vertical-popup"))}}if(c.rtl===true){f.addClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}if(c._items.length-1>=b){a(c._items[b]).before(f);a(c._contentSections[b]).before(d)}else{c._header.append(f);c._content.append(d)}c._updateItems();c._addHandlers();c._checkScrollButtons();if(b<=c.selectedIndex){c.selectedIndex++}c._updatePositions()},removeAt:function(b){var c=this;if(b===c.selectedIndex){c._clearSelection()}a(c._items[b]).add(c._contentSections[b]).remove();c._updateItems();c._updatePositions()},updateAt:function(b,c){var d=this;a(d._items[b]).html(c.newTitle);a(d._contentSections[b]).html(c.newContent);d._items[b]._isInitialized=false;if(d.initContent&&b===d.selectedIndex){d.initContent(b);d._items[b]._isInitialized=true}d._updatePositions()},setPopupLayout:function(c,f,d,b){var e=this;if(e.mode==="popup"){if(!a(e._contentSections[c]).attr("data-width")){if(a(e._contentSections[c])[0].style.width){a(e._contentSections[c]).attr("data-width",a(e._contentSections[c])[0].style.width)}if(a(e._contentSections[c])[0].style.height){a(e._contentSections[c]).attr("data-height",a(e._contentSections[c])[0].style.height)}}if(d){a(e._contentSections[c]).css("width",d)}if(b){a(e._contentSections[c]).css("height",b)}e._contentSections[c]._layout=f;e._positionContent(c)}},propertyChangedHandler:function(c,d,f,e){if(e!==f){switch(d){case"width":case"height":c._updateSize();break;case"position":c._render();break;case"mode":c._content.width("auto");c._removeHandlers(null,f);c._render();break;case"selectedIndex":c._selectAt(e,f);break;case"selectionMode":c._removeHandlers(f);c._addHandlers();break;case"scrollPosition":c._scrollButtons.removeClass(c.toThemeProperty("jqx-ribbon-scrollbutton-"+f));c._scrollButtons.addClass(c.toThemeProperty("jqx-ribbon-scrollbutton-"+e));var b=a(c._scrollButtons[0]);var g=a(c._scrollButtons[1]);c._scrollButtons.removeClass(c.toThemeProperty("jqx-rc-tr"));c._scrollButtons.removeClass(c.toThemeProperty("jqx-rc-bl"));b.removeClass(c.toThemeProperty("jqx-rc-tl"));g.removeClass(c.toThemeProperty("jqx-rc-br"));c._scrollButtonRc(b,g);c._checkScrollButtons();c._updatePositions();break;case"disabled":if(e===true){c._removeHandlers();c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"));c._addHandlers()}break;case"theme":a.jqx.utilities.setTheme(f,e,c.host);break;case"rtl":if(e===true){c._header.addClass(c.toThemeProperty("jqx-ribbon-header-rtl"));c._items.addClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}else{c._header.removeClass(c.toThemeProperty("jqx-ribbon-header-rtl"));c._items.removeClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}c._positionSelectionToken(c.selectedIndex);break}}},_raiseEvent:function(g,e){var c=this.events[g];var f=new jQuery.Event(c);f.owner=this;f.args=e;var b;try{b=this.host.trigger(f)}catch(d){}return b},_render:function(c){var d=this;if(c!==true){d._removeHandlers()}d._selectionTokenOffsetY=0;switch(d._browser.browser){case"mozilla":d._browserWidthRtlFlag=0;d._browserScrollRtlFlag=1;d._selectionTokenOffsetX=1;break;case"msie":d._browserWidthRtlFlag=0;d._browserScrollRtlFlag=-1;if(d._browser.version==="8.0"){d._selectionTokenOffsetX=1}else{if(d._browser.version==="7.0"){d._selectionTokenOffsetX=0;if(d.mode==="popup"&&(d.position==="bottom"||d.position==="right")){d._selectionTokenOffsetY=2}}else{d._selectionTokenOffsetX=0}}break;default:d._browserWidthRtlFlag=1;d._browserScrollRtlFlag=1;d._selectionTokenOffsetX=0}if(c==true){var b=d.host.children();d._header=a(b[0]);d._content=a(b[1]);d._checkStructure(b)}d._header.css("float","none");d._content.css("padding","0px");d.host.width(d.width);d.host.height(d.height);if(d.position==="bottom"||d.position==="right"){d._content.after(d._header)}if(d.position==="top"||d.position==="bottom"){d._orientation="horizontal"}else{d._orientation="vertical"}if(d.position==="right"){d._header.css("float","right")}else{if(d.position==="left"){d._header.css("float","left")}}d._items=d._header.children();d._contentSections=d._content.children();a.each(d._contentSections,function(){if(a(this).attr("data-width")!==undefined){a(this).css("width",a(this).attr("data-width"));a(this).css("height",a(this).attr("data-height"));a(this).removeAttr("data-width");a(this).removeAttr("data-height")}});if(c==true){d._selectionToken=a('<div class="'+d.toThemeProperty("jqx-ribbon-selection-token")+" "+d.toThemeProperty("jqx-ribbon-selection-token-"+d.position)+" "+d.toThemeProperty("jqx-widget-content")+'"></div>');d.host.append(d._selectionToken)}d._updateItems();d._addClasses();if(c==true){d._appendScrollButtons();d._checkScrollButtons()}d._allowSelection=true;if(d.selectedIndex!==-1){a(d._items[d.selectedIndex]).addClass(d.toThemeProperty("jqx-widget-content")).addClass(d.toThemeProperty("jqx-ribbon-item-selected"));d._positionSelectionToken(d.selectedIndex);a(d._contentSections[d.selectedIndex]).css("display","block");if(d.initContent){d.initContent(d.selectedIndex);d._items[d.selectedIndex]._isInitialized=true}}if(!d.disabled){d._addHandlers()}else{d.host.addClass(d.toThemeProperty("jqx-fill-state-disabled"))}a.jqx.utilities.resize(d.host,function(){d._updateSize()})},_updateSize:function(){var b=this;if(b._browser.version==="7.0"&&b._browser.browser==="msie"){if(b._orientation==="horizontal"){b._header.css("width",(b.host.width()-parseInt(b._header.css("padding-left"),10)-parseInt(b._header.css("padding-right"),10)-parseInt(b._header.css("border-left-width"),10)-parseInt(b._header.css("border-right-width"),10)));b._contentSections.width(b._content.width()-parseInt(b._contentSections.css("border-left-width"),10)-parseInt(b._contentSections.css("border-right-width"),10)-parseInt(b._contentSections.css("padding-left"),10)-parseInt(b._contentSections.css("padding-right"),10));if(b.mode==="default"&&typeof b.height==="string"&&b.height.indexOf("%")!==-1){b._contentSections.height(b._content.height()-b._header.height()-parseInt(b._contentSections.css("border-bottom-width"),10)-parseInt(b._contentSections.css("border-top-width"),10)-1)}}else{b._header.css("height",(b.host.height()-parseInt(b._header.css("padding-top"),10)-parseInt(b._header.css("padding-bottom"),10)-parseInt(b._header.css("border-top-width"),10)-parseInt(b._header.css("border-bottom-width"),10)));b._contentSections.height(b._content.height()-parseInt(b._contentSections.css("border-top-width"),10)-parseInt(b._contentSections.css("border-bottom-width"),10)-parseInt(b._contentSections.css("padding-top"),10)-parseInt(b._contentSections.css("padding-bottom"),10));if(b.mode==="default"&&typeof b.width==="string"&&b.height.indexOf("%")!==-1){var c=b.position==="left"?parseInt(b._contentSections.css("border-left-width"),10)+parseInt(b._contentSections.css("border-right-width"),10)+1:0;b._contentSections.width(b._content.width()-b._header.width()-c)}}}b._checkScrollButtons(true);b._updatePositions();if(b.mode==="popup"){b._positionPopup()}},_stopAnimation:function(){var b=this;if(!b._allowSelection){b.selectedIndex=b._animatingIndex;a(b._contentSections[b._animatingIndex]).finish();b._clearSelection(true,b._animatingIndex);b._allowSelection=true}},_selectAt:function(b,e){var c=this;if(e===undefined){e=c.selectedIndex}if(b!==e){c._stopAnimation();if(c._allowSelection){c._animatingIndex=b;c._clearSelection(true,e);c._allowSelection=false;c._selecting=b;if(c.selectionMode==="click"){a(c._items[b]).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(c._items[b]).removeClass(c.toThemeProperty("jqx-ribbon-item-hover"))}if(c.mode=="popup"){c._header.removeClass(c.toThemeProperty("jqx-rc-all"));switch(c.position){case"top":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-t"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-b"));break;case"bottom":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-b"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-t"));break;case"left":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-l"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-r"));break;case"right":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-r"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-l"));break}}a(c._items[b]).addClass(c.toThemeProperty("jqx-widget-content")).addClass(c.toThemeProperty("jqx-ribbon-item-selected"));c._selectionToken.css("display","block");c._updatePositions(b);switch(c.animationType){case"fade":a(c._contentSections[b]).fadeToggle(c.animationDelay,function(){c._animationComplete(b,e)});break;case"slide":var d=c.position;if(d==="top"){d="up"}else{if(d==="bottom"){d="down"}}c.slideAnimation=c._slide(a(c._contentSections[b]),{mode:"show",direction:d,duration:c.animationDelay},b,e);break;case"none":a(c._contentSections[b]).css("display","block");c._animationComplete(b,e);break}}else{}}},_clearSelection:function(b,e){var c=this;if(c.mode=="popup"){c._header.addClass(c.toThemeProperty("jqx-rc-all"))}c._selecting=-1;if(e===undefined){e=c.selectedIndex}a(c._items[e]).removeClass(c.toThemeProperty("jqx-widget-content")).removeClass(c.toThemeProperty("jqx-ribbon-item-selected"));c._selectionToken.css("display","none");if(b!==true&&c.animationType!=="none"){if(c.animationType==="fade"){a(c._contentSections[e]).fadeOut(c.animationDelay,function(){c._clearSelectionComplete(e)})}else{if(c.animationType==="slide"){var d=c.position;if(d==="top"){d="up"}else{if(d==="bottom"){d="down"}}c._stopAnimation();e=c.selectedIndex;c.slideAnimation=c._slide(a(c._contentSections[e]),{mode:"hide",direction:d,duration:c.animationDelay},e);c.selectedIndex=-1}}}else{a(c._contentSections[e]).css("display","none");c._clearSelectionComplete(e,b)}},_addHandlers:function(){var c=this;var g=function(i){if(c.popupCloseMode=="click"&&c.mode==="popup"){if(i.target.className.indexOf("jqx-ribbon-content-popup")!=-1){c._clearSelection();return}if(a(i.target).ischildof(c.host)){return}var h=false;a.each(a(i.target).parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-ribbon")!=-1){h=true;return false}if(this.className.indexOf("jqx-ribbon")!=-1){if(self.element.id==this.id){h=true}return false}}}});if(!h){c._clearSelection()}}};if(c.selectionMode==="click"){c.addHandler(c._items,"click.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled){if(h!==c.selectedIndex){c._selectAt(h)}else{if(c.mode==="popup"){if(c.popupCloseMode!="none"){a(i.target).addClass(c.toThemeProperty("jqx-fill-state-hover"));a(i.target).addClass(c.toThemeProperty("jqx-ribbon-item-hover"));c._clearSelection()}}}}});var f=function(h){return((c._selecting!==h&&c._allowSelection===false)||((c._selecting===-1||c.selectedIndex!==h)&&c._allowSelection===true))&&!c._items[h]._disabled};c.addHandler(c._items,"mouseenter.ribbon"+c.element.id,function(h){if(f(h.target._index)){a(h.target).addClass(c.toThemeProperty("jqx-fill-state-hover"));a(h.target).addClass(c.toThemeProperty("jqx-ribbon-item-hover"))}});c.addHandler(c._items,"mouseleave.ribbon"+c.element.id,function(h){if(f(h.target._index)){a(h.target).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(h.target).removeClass(c.toThemeProperty("jqx-ribbon-item-hover"))}});if(c.mode==="popup"){c.addHandler(c.host,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(c._contentSections,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(a(document),"mousedown.ribbon"+c.element.id,function(h){g(h)})}}else{if(c.selectionMode==="hover"){c.addHandler(c._items,"mouseenter.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled&&h!==c.selectedIndex){c._selectAt(h)}});if(c.mode==="popup"){c.addHandler(c.host,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(c._contentSections,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(a(document),"mousedown.ribbon"+c.element.id,function(h){g(h)});c.addHandler(c._items,"click.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled){if(c.mode==="popup"){if(c.popupCloseMode!="none"){c._clearSelection()}}}})}}}var d=(c.rtl&&c._browser.browser==="msie")?-1:1;var b=a(c._scrollButtons[0]);c.addHandler(b,"mousedown.ribbon"+c.element.id,function(){if(c._orientation==="horizontal"){c._timeoutNear=setInterval(function(){var h=c._header.scrollLeft();c._header.scrollLeft(h-c.scrollStep*d);c._updatePositions()},c.scrollDelay)}else{c._timeoutNear=setInterval(function(){var h=c._header.scrollTop();c._header.scrollTop(h-c.scrollStep);c._updatePositions()},c.scrollDelay)}return false});c.addHandler(b,"mouseup.ribbon"+c.element.id,function(){clearInterval(c._timeoutNear)});var e=a(c._scrollButtons[1]);c.addHandler(e,"mousedown.ribbon"+c.element.id,function(){if(c._orientation==="horizontal"){c._timeoutFar=setInterval(function(){var h=c._header.scrollLeft();c._header.scrollLeft(h+c.scrollStep*d);c._updatePositions()},c.scrollDelay)}else{c._timeoutFar=setInterval(function(){var h=c._header.scrollTop();c._header.scrollTop(h+c.scrollStep);c._updatePositions()},c.scrollDelay)}return false});c.addHandler(e,"mouseup.ribbon"+c.element.id,function(){clearInterval(c._timeoutFar)})},_removeHandlers:function(f,e){var c=this;if(!f){f=c.selectionMode}if(!e){e=c.mode}if(f==="click"){c.removeHandler(c._items,"click.ribbon"+c.element.id);c.removeHandler(c._items,"mouseenter.ribbon"+c.element.id);c.removeHandler(c._items,"mouseleave.ribbon"+c.element.id)}else{if(f==="hover"){c.removeHandler(c._items,"mouseenter.ribbon"+c.element.id);if(e==="popup"){c.removeHandler(c.host,"mouseleave.ribbon"+c.element.id)}}}var b=a(c._scrollButtons[0]);c.removeHandler(b,"mousedown.ribbon"+c.element.id);c.removeHandler(b,"mouseup.ribbon"+c.element.id);var d=a(c._scrollButtons[1]);c.removeHandler(d,"mousedown.ribbon"+c.element.id);c.removeHandler(d,"mouseup.ribbon"+c.element.id)},_checkStructure:function(c){var d=this;var f=c.length;if(f!==2){throw new Error("jqxRibbon: Invalid HTML structure. You need to add a ul and a div to the widget container.")}var b=d._header.children().length;var e=d._content.children().length;if(b!==e){throw new Error("jqxRibbon: Invalid HTML structure. For each list item you must have a corresponding div element.")}},_addClasses:function(){var d=this;d._contentSections.removeClass();d._content.removeClass();d._header.removeClass();d._items.removeClass();d.host.removeClass();d.host.addClass(d.toThemeProperty("jqx-widget")+" "+d.toThemeProperty("jqx-ribbon"));d._header.addClass(d.toThemeProperty("jqx-widget-header")+" "+d.toThemeProperty("jqx-disableselect")+" "+d.toThemeProperty("jqx-ribbon-header")+" "+d.toThemeProperty("jqx-ribbon-header-"+d._orientation));d._items.addClass(d.toThemeProperty("jqx-ribbon-item")+" "+d.toThemeProperty("jqx-ribbon-item-"+d.position));d._content.addClass(d.toThemeProperty("jqx-widget-content")+" "+d.toThemeProperty("jqx-ribbon-content")+" "+d.toThemeProperty("jqx-ribbon-content-"+d._orientation));d._contentSections.addClass(d.toThemeProperty("jqx-widget-content")+" "+d.toThemeProperty("jqx-ribbon-content-section")+" "+d.toThemeProperty("jqx-ribbon-content-section-"+d.position));switch(d.position){case"top":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-t"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-b"));break;case"bottom":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-b"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-t"));break;case"left":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-l"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-r"));break;case"right":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-r"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-l"));break}var c,b;if(d.mode==="popup"){if(d.selectedIndex===-1){d.host.addClass(d.toThemeProperty("jqx-rc-all"));d._header.addClass(d.toThemeProperty("jqx-rc-all"))}d.host.addClass(d.toThemeProperty("jqx-ribbon-popup"));d._header.addClass(d.toThemeProperty("jqx-ribbon-header-"+d._orientation+"-popup"));d._content.addClass(d.toThemeProperty("jqx-ribbon-content-popup"));d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-popup"));d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-popup-"+d.position));if(d._orientation==="horizontal"){d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-horizontal-popup"))}else{d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-vertical-popup"))}d._positionPopup()}else{if(d._orientation==="horizontal"){if(d.height!=="auto"){b=d._header.outerHeight();if(d.position==="top"){d._content.css("padding-top",b)}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-bottom"));d._content.css("padding-bottom",b)}}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-auto"))}}else{if(d._orientation==="vertical"){if(d.width!=="auto"){c=d._header.outerWidth();if(d.position==="left"){d._content.css("padding-left",c)}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-right"));d._content.css("padding-right",c)}}else{d.host.addClass(d.toThemeProperty("jqx-ribbon-auto"));d._header.addClass(d.toThemeProperty("jqx-ribbon-header-auto"));d._content.addClass(d.toThemeProperty("jqx-ribbon-content-auto-width"))}}}}if(d._browser.version==="7.0"&&d._browser.browser==="msie"){if(d._orientation==="horizontal"){d._header.css("width",(d.host.width()-parseInt(d._header.css("padding-left"),10)-parseInt(d._header.css("padding-right"),10)-parseInt(d._header.css("border-left-width"),10)-parseInt(d._header.css("border-right-width"),10)));d._items.height(d._items.height()-parseInt(d._items.css("padding-top"),10)-parseInt(d._items.css("padding-bottom"),10)-parseInt(d._items.css("border-top-width"),10)-parseInt(d._items.css("border-bottom-width"),10));d._contentSections.width(d._contentSections.width()-parseInt(d._contentSections.css("border-left-width"),10)-parseInt(d._contentSections.css("border-right-width"),10)-parseInt(d._contentSections.css("padding-left"),10)-parseInt(d._contentSections.css("padding-right"),10));if(d.mode==="default"){if(d.height!=="auto"){if(d.position==="top"){d._contentSections.css("padding-top",b)}else{d._contentSections.css("padding-bottom",b)}d._contentSections.height(d._content.height()-d._header.height()-parseInt(d._contentSections.css("border-bottom-width"),10)-parseInt(d._contentSections.css("border-top-width"),10)-1)}}else{}}else{var e;if(d.position==="left"){d._content.addClass(d.toThemeProperty("jqx-ribbon-content-left"));e=parseInt(d._contentSections.css("border-left-width"),10)+parseInt(d._contentSections.css("border-right-width"),10)+1}else{d._content.addClass(d.toThemeProperty("jqx-ribbon-content-right"));e=0}d._header.css("height",(d.host.height()-parseInt(d._header.css("padding-top"),10)-parseInt(d._header.css("padding-bottom"),10)-parseInt(d._header.css("border-top-width"),10)-parseInt(d._header.css("border-bottom-width"),10)));d._items.width(d._items.width()-parseInt(d._items.css("padding-left"),10)-parseInt(d._items.css("padding-right"),10)-parseInt(d._items.css("border-left-width"),10)-parseInt(d._items.css("border-right-width"),10));d._contentSections.height(d._contentSections.height()-parseInt(d._contentSections.css("border-top-width"),10)-parseInt(d._contentSections.css("border-bottom-width"),10)-parseInt(d._contentSections.css("padding-top"),10)-parseInt(d._contentSections.css("padding-bottom"),10));if(d.mode==="default"){if(d.width!=="auto"){if(d.position==="left"){d._contentSections.css("padding-left",c)}else{d._contentSections.css("padding-right",c)}d._contentSections.width(d._content.width()-d._header.width()-e)}}else{}}}if(d.rtl===true){d._header.addClass(d.toThemeProperty("jqx-ribbon-header-rtl"));d._items.addClass(d.toThemeProperty("jqx-ribbon-item-rtl"))}},_positionPopup:function(){var c=this;var b=(c._browser.version==="7.0"&&c._browser.browser==="msie");switch(c.position){case"top":c._content.css("top",c._header.outerHeight());break;case"bottom":if(!b){c._content.css("bottom",c._header.outerHeight())}else{c._content.css("bottom",c._header.height())}break;case"left":c._content.css("left",c._header.outerWidth());break;case"right":c._content.css("right",c._header.outerWidth());break}},_appendScrollButtons:function(){var d=this;var e='<div class="'+d.toThemeProperty("jqx-ribbon-scrollbutton")+" "+d.toThemeProperty("jqx-ribbon-scrollbutton-"+d.position)+" "+d.toThemeProperty("jqx-ribbon-scrollbutton-"+d.scrollPosition)+" "+d.toThemeProperty("jqx-widget-header")+'"><div class="'+d.toThemeProperty("jqx-ribbon-scrollbutton-inner")+'"></div></div>';var b=a(e);var f=a(e);var c=(d._orientation==="horizontal")?["left","right"]:["top","bottom"];b.find(".jqx-ribbon-scrollbutton-inner").addClass(d.toThemeProperty("jqx-icon-arrow-"+c[0]));f.find(".jqx-ribbon-scrollbutton-inner").addClass(d.toThemeProperty("jqx-icon-arrow-"+c[1]));b.addClass(d.toThemeProperty("jqx-ribbon-scrollbutton-lt"));f.addClass(d.toThemeProperty("jqx-ribbon-scrollbutton-rb"));d._scrollButtons=b.add(f);d.host.append(d._scrollButtons);if(d._orientation==="horizontal"){d._scrollButtons.height(d._header.height())}else{d._scrollButtons.width(d._header.width())}d._scrollButtonRc(b,f)},_scrollButtonRc:function(b,d){var c=this;switch(c.position){case"top":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-tr"))}break;case"bottom":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-bl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-br"))}break;case"left":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-bl"))}break;case"right":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tr"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-br"))}break}},_updateItems:function(){var c=this;c._items=c._header.children();c._contentSections=c._content.children();for(var b=0;b<c._items.length;b++){if(c._items[b]._index===undefined){c._items[b]._disabled=false;c._items[b]._isInitialized=false;c._contentSections[b]._layout="default"}c._items[b]._index=b;c._contentSections[b]._index=b}},_positionContent:function(f){var g=this;var c,k,l,h,b,j;if(g._orientation==="horizontal"){c=g.host.outerWidth();k=g.host.offset().left;l=a(g._items[f]).outerWidth();h=a(g._items[f]).offset().left;b=a(g._contentSections[f]).outerWidth();j="left"}else{c=g.host.outerHeight();k=g.host.offset().top;l=a(g._items[f]).outerHeight();h=a(g._items[f]).offset().top;b=a(g._contentSections[f]).outerHeight();j="top"}var e=a(g._contentSections[f]);var d=function(m){if(m<0){m=0}else{if(m+b>c){m=c-b}}e.css(j,m)};var i;switch(e[0]._layout){case"near":i=h-k;d(i);break;case"far":i=h-k-(b-l);d(i);break;case"center":i=h-k-(b-l)/2;d(i);break;default:e.css(j,"")}},_checkScrollButtons:function(d){var f=this;var g=0;a.each(f._items,function(){var i=a(this);if(i.css("display")!=="none"){g+=(f._orientation==="horizontal")?i.outerWidth(true):i.outerHeight(true)}});var h=f._orientation==="horizontal"?["margin-left","margin-right"]:["margin-top","margin-bottom"];var b=(f._orientation==="horizontal")?f._header.width():f._header.height();if(!f._itemMargins){f._itemMargins=new Array();f._itemMargins.push(a(f._items[0]).css(h[0]));f._itemMargins.push(a(f._items[f._items.length-1]).css(h[1]))}if(g>b){f._scrollButtons.css("display","block");var e=17;var c=17;switch(f.scrollPosition){case"near":c=0;e=34;break;case"far":c=34;e=17;break}a(f._items[0]).css(h[0],e);a(f._items[f._items.length-1]).css(h[1],c)}else{a(f._items[0]).css(h[0],f._itemMargins[0]);a(f._items[f._items.length-1]).css(h[1],f._itemMargins[1]);f._scrollButtons.css("display","none")}if(d===true){if(f._orientation==="horizontal"){f._scrollButtons.height(f._header.height())}else{f._scrollButtons.width(f._header.width())}}},_positionSelectionToken:function(h){var i=this;if(h!==-1){var e=a(i._items[h]);var j,b,d,k,g;if(i._orientation==="horizontal"){var f,m;if(i.rtl===true){if(i._browserWidthRtlFlag===1){f=i._header[0].scrollWidth-i._header[0].clientWidth}else{f=0}m=i._browserScrollRtlFlag}else{f=0;m=1}d=e[0].offsetLeft+f-i._header[0].scrollLeft*m-i._selectionTokenOffsetX+2;g=i._header.outerHeight()-1;var c=e.width()+parseInt(e.css("padding-left"),10)+parseInt(e.css("padding-right"),10);if(i.position==="top"){j=g-i._selectionTokenOffsetY;b=""}else{j="";b=g-i._selectionTokenOffsetY}i._selectionToken.css({top:j,bottom:b,left:d,width:c})}else{j=e[0].offsetTop-i._header[0].scrollTop-i._selectionTokenOffsetX+2;g=i._header.outerWidth()-1;var l=e.height()+parseInt(e.css("padding-top"),10)+parseInt(e.css("padding-bottom"),10);if(i.position==="left"){d=g-i._selectionTokenOffsetY;k=""}else{d="";k=g-i._selectionTokenOffsetY}i._selectionToken.css({top:j,left:d,right:k,height:l})}}},_updatePositions:function(b){var c=this;if(isNaN(b)){b=c.selectedIndex}if(b!==-1){c._positionSelectionToken(b);if(c.mode==="popup"&&c._contentSections[b]._layout!=="default"){c._positionContent(b)}if(c.mode==="popup"&&(c.position==="left"||c.position==="right")){c._content.width("auto");var d=c._contentSections[b].style.width&&c._contentSections[b].style.width.toString().indexOf("%")>=0;if(d){c._content[0].style.width=c._contentSections[b].style.width;c._content.width(a(c._contentSections[b]).width()-c._header.width())}else{c._content.width(a(c._contentSections[b]).width())}}}},_animationComplete:function(c,e){var d=this;d._raiseEvent("0",{selectedIndex:c});var b=e!==-1?e:null;d._raiseEvent("2",{unselectedIndex:b,selectedIndex:c});d.selectedIndex=c;if(d.initContent&&d._items[c]._isInitialized===false){d.initContent(c);d._items[c]._isInitialized=true}d._allowSelection=true;d._selecting=null},_clearSelectionComplete:function(d,b){var c=this;c._selecting=null;if(d===undefined){d=c.selectedIndex}if(d!==-1){c._raiseEvent("1",{unselectedIndex:d})}if(b!==true){c.selectedIndex=-1}},_slide:function(f,e,m,s){var q=this;if(!q.activeAnimations){q.activeAnimations=new Array()}if(q.activeAnimations.length>0){for(var k=0;k<q.activeAnimations.length;k++){q.activeAnimations[k].clearQueue();q.activeAnimations[k].finish()}}else{f.clearQueue();f.finish()}var h="ui-effects-";var d={save:function(u,v){for(var o=0;o<v.length;o++){if(v[o]!==null&&u.length>0){u.data(h+v[o],u[0].style[v[o]])}}},restore:function(u,w){var v,o;for(o=0;o<w.length;o++){if(w[o]!==null){v=u.data(h+w[o]);if(v===undefined){v=""}u.css(w[o],v)}}},createWrapper:function(o){if(o.parent().is(".ui-effects-wrapper")){return o.parent()}var u={width:o.outerWidth(true),height:o.outerHeight(true),"float":o.css("float")},x=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:o.width(),height:o.height()},w=document.activeElement;try{w.id}catch(v){w=document.body}o.wrap(x);if(o[0]===w||a.contains(o[0],w)){a(w).focus()}x=o.parent();if(o.css("position")==="static"){x.css({position:"relative"});o.css({position:"relative"})}else{a.extend(u,{position:o.css("position"),zIndex:o.css("z-index")});a.each(["top","left","bottom","right"],function(y,z){u[z]=o.css(z);if(isNaN(parseInt(u[z],10))){u[z]="auto"}});o.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}o.css(i);return x.css(u).show()},removeWrapper:function(i){var o=document.activeElement;if(i.parent().is(".ui-effects-wrapper")){i.parent().replaceWith(i);if(i[0]===o||a.contains(i[0],o)){a(o).focus()}}return i}};var p=["position","top","bottom","left","right","width","height"],l=e.mode,t=l==="show",r=e.direction||"left",g=(r==="up"||r==="down")?"top":"left",c=(r==="up"||r==="left"),b,j={};d.save(f,p);f.show();b=e.distance||f[g==="top"?"outerHeight":"outerWidth"](true);d.createWrapper(f).css({overflow:"hidden"});if(t){f.css(g,c?(isNaN(b)?"-"+b:-b):b)}j[g]=(t?(c?"+=":"-="):(c?"-=":"+="))+b;var n=function(){f.clearQueue();f.stop(true,true)};q.activeAnimations.push(f);f.animate(j,{duration:e.duration,easing:e.easing,complete:function(){q.activeAnimations.pop(f);if(l==="show"){q._animationComplete(m,s)}else{if(l==="hide"){f.hide();q._clearSelectionComplete(m)}}d.restore(f,p);d.removeWrapper(f)}});return n}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxRibbon","",{});a.extend(a.jqx._jqxRibbon.prototype,{defineInstance:function(){var b={width:null,height:"auto",mode:"default",position:"top",selectedIndex:-1,selectionMode:"click",popupCloseMode:"click",animationType:"fade",animationDelay:400,scrollPosition:"both",disabled:false,rtl:false,scrollStep:10,scrollDelay:30,initContent:null,events:["select","unselect","change"]};a.extend(true,this,b)},createInstance:function(){var b=this;b._browser=a.jqx.browser;if(b.mode!="popup"&&b.selectedIndex===-1){b.selectedIndex=0}b._originalHTML=b.host.html();b._render(true)},render:function(){this._render()},refresh:function(b){if(b!==true){this._render()}},destroy:function(){var b=this;b._removeHandlers();b.host.remove()},selectAt:function(b){this._selectAt(b)},clearSelection:function(){this._clearSelection()},disableAt:function(b){var c=this;c._items[b]._disabled=true;a(c._items[b]).addClass(c.toThemeProperty("jqx-fill-state-disabled"));if(b===c.selectedIndex){c._clearSelection()}},enableAt:function(b){var c=this;c._items[b]._disabled=false;a(c._items[b]).removeClass(c.toThemeProperty("jqx-fill-state-disabled"))},hideAt:function(b){var c=this;a(c._items[b]).css("display","none");c._checkScrollButtons();if(b===c.selectedIndex){c._clearSelection()}else{c._updatePositions()}},showAt:function(b){var c=this;if(c._orientation==="horizontal"){a(c._items[b]).css("display","inline-block")}else{a(c._items[b]).css("display","inherit")}c._checkScrollButtons();c._updatePositions()},val:function(b){var c=this;if(b){c._selectAt(b)}else{return c.selectedIndex}},addAt:function(b,e){var c=this;c._removeHandlers();var f=a('<li class="'+c.toThemeProperty("jqx-ribbon-item")+" "+c.toThemeProperty("jqx-ribbon-item-"+c.position)+'">'+e.title+"</li>");var d=a('<div class="'+c.toThemeProperty("jqx-widget-content")+" "+c.toThemeProperty("jqx-ribbon-content-section")+" "+c.toThemeProperty("jqx-ribbon-content-section-"+c.position)+'">'+e.content+"</div>");switch(c.position){case"top":f.addClass(c.toThemeProperty("jqx-rc-t"));d.addClass(c.toThemeProperty("jqx-rc-b"));break;case"bottom":f.addClass(c.toThemeProperty("jqx-rc-b"));d.addClass(c.toThemeProperty("jqx-rc-t"));break;case"left":f.addClass(c.toThemeProperty("jqx-rc-l"));d.addClass(c.toThemeProperty("jqx-rc-r"));break;case"right":f.addClass(c.toThemeProperty("jqx-rc-r"));d.addClass(c.toThemeProperty("jqx-rc-l"));break}if(c.mode==="popup"){d.addClass(c.toThemeProperty("jqx-ribbon-content-section-popup"));if(c._orientation==="horizontal"){d.addClass(c.toThemeProperty("jqx-ribbon-content-section-horizontal-popup"))}else{d.addClass(c.toThemeProperty("jqx-ribbon-content-section-vertical-popup"))}}if(c.rtl===true){f.addClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}if(c._items.length-1>=b){a(c._items[b]).before(f);a(c._contentSections[b]).before(d)}else{c._header.append(f);c._content.append(d)}c._updateItems();c._addHandlers();c._checkScrollButtons();if(b<=c.selectedIndex){c.selectedIndex++}c._updatePositions()},removeAt:function(b){var c=this;if(b===c.selectedIndex){c._clearSelection()}a(c._items[b]).add(c._contentSections[b]).remove();c._updateItems();c._updatePositions()},updateAt:function(b,c){var d=this;a(d._items[b]).html(c.newTitle);a(d._contentSections[b]).html(c.newContent);d._items[b]._isInitialized=false;if(d.initContent&&b===d.selectedIndex){d.initContent(b);d._items[b]._isInitialized=true}d._updatePositions()},setPopupLayout:function(c,f,d,b){var e=this;if(e.mode==="popup"){if(!a(e._contentSections[c]).attr("data-width")){if(a(e._contentSections[c])[0].style.width){a(e._contentSections[c]).attr("data-width",a(e._contentSections[c])[0].style.width)}if(a(e._contentSections[c])[0].style.height){a(e._contentSections[c]).attr("data-height",a(e._contentSections[c])[0].style.height)}}if(d){a(e._contentSections[c]).css("width",d)}if(b){a(e._contentSections[c]).css("height",b)}e._contentSections[c]._layout=f;e._positionContent(c)}},propertyChangedHandler:function(c,d,f,e){if(e!==f){switch(d){case"width":case"height":c.host.css(d,e);c._updateSize();break;case"position":c._render();break;case"mode":c._content.width("auto");c._removeHandlers(null,f);c._render();break;case"selectedIndex":c._selectAt(e,f);break;case"selectionMode":c._removeHandlers(f);c._addHandlers();break;case"scrollPosition":c._scrollButtons.removeClass(c.toThemeProperty("jqx-ribbon-scrollbutton-"+f));c._scrollButtons.addClass(c.toThemeProperty("jqx-ribbon-scrollbutton-"+e));var b=a(c._scrollButtons[0]);var g=a(c._scrollButtons[1]);c._scrollButtons.removeClass(c.toThemeProperty("jqx-rc-tr"));c._scrollButtons.removeClass(c.toThemeProperty("jqx-rc-bl"));b.removeClass(c.toThemeProperty("jqx-rc-tl"));g.removeClass(c.toThemeProperty("jqx-rc-br"));c._scrollButtonRc(b,g);c._checkScrollButtons();c._updatePositions();break;case"disabled":if(e===true){c._removeHandlers();c.host.addClass(c.toThemeProperty("jqx-fill-state-disabled"))}else{c.host.removeClass(c.toThemeProperty("jqx-fill-state-disabled"));c._addHandlers()}break;case"theme":a.jqx.utilities.setTheme(f,e,c.host);break;case"rtl":if(e===true){c._header.addClass(c.toThemeProperty("jqx-ribbon-header-rtl"));c._items.addClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}else{c._header.removeClass(c.toThemeProperty("jqx-ribbon-header-rtl"));c._items.removeClass(c.toThemeProperty("jqx-ribbon-item-rtl"))}c._positionSelectionToken(c.selectedIndex);break}}},_raiseEvent:function(g,e){var c=this.events[g];var f=new jQuery.Event(c);f.owner=this;f.args=e;var b;try{b=this.host.trigger(f)}catch(d){}return b},_render:function(c){var d=this;if(c!==true){d._removeHandlers()}d._selectionTokenOffsetY=0;switch(d._browser.browser){case"mozilla":d._browserWidthRtlFlag=0;d._browserScrollRtlFlag=1;d._selectionTokenOffsetX=1;break;case"msie":d._browserWidthRtlFlag=0;d._browserScrollRtlFlag=-1;if(d._browser.version==="8.0"){d._selectionTokenOffsetX=1}else{if(d._browser.version==="7.0"){d._selectionTokenOffsetX=0;if(d.mode==="popup"&&(d.position==="bottom"||d.position==="right")){d._selectionTokenOffsetY=2}}else{d._selectionTokenOffsetX=0}}break;default:d._browserWidthRtlFlag=1;d._browserScrollRtlFlag=1;d._selectionTokenOffsetX=0}if(c==true){var b=d.host.children();d._header=a(b[0]);d._content=a(b[1]);d._checkStructure(b)}d._header.css("float","none");d._content.css("padding","0px");d.host.width(d.width);d.host.height(d.height);if(d.position==="bottom"||d.position==="right"){d._content.after(d._header)}if(d.position==="top"||d.position==="bottom"){d._orientation="horizontal"}else{d._orientation="vertical"}if(d.position==="right"){d._header.css("float","right")}else{if(d.position==="left"){d._header.css("float","left")}}d._items=d._header.children();d._contentSections=d._content.children();a.each(d._contentSections,function(){if(a(this).attr("data-width")!==undefined){a(this).css("width",a(this).attr("data-width"));a(this).css("height",a(this).attr("data-height"));a(this).removeAttr("data-width");a(this).removeAttr("data-height")}});if(c==true){d._selectionToken=a('<div class="'+d.toThemeProperty("jqx-ribbon-selection-token")+" "+d.toThemeProperty("jqx-ribbon-selection-token-"+d.position)+" "+d.toThemeProperty("jqx-widget-content")+'"></div>');d.host.append(d._selectionToken)}d._updateItems();d._addClasses();if(c==true){d._appendScrollButtons();d._checkScrollButtons()}d._allowSelection=true;if(d.selectedIndex!==-1){a(d._items[d.selectedIndex]).addClass(d.toThemeProperty("jqx-widget-content")).addClass(d.toThemeProperty("jqx-ribbon-item-selected"));d._positionSelectionToken(d.selectedIndex);a(d._contentSections[d.selectedIndex]).css("display","block");if(d.initContent){d.initContent(d.selectedIndex);d._items[d.selectedIndex]._isInitialized=true}}if(!d.disabled){d._addHandlers()}else{d.host.addClass(d.toThemeProperty("jqx-fill-state-disabled"))}a.jqx.utilities.resize(d.host,function(){d._updateSize()})},_updateSize:function(){var b=this;if(b._browser.version==="7.0"&&b._browser.browser==="msie"){if(b._orientation==="horizontal"){b._header.css("width",(b.host.width()-parseInt(b._header.css("padding-left"),10)-parseInt(b._header.css("padding-right"),10)-parseInt(b._header.css("border-left-width"),10)-parseInt(b._header.css("border-right-width"),10)));b._contentSections.width(b._content.width()-parseInt(b._contentSections.css("border-left-width"),10)-parseInt(b._contentSections.css("border-right-width"),10)-parseInt(b._contentSections.css("padding-left"),10)-parseInt(b._contentSections.css("padding-right"),10));if(b.mode==="default"&&typeof b.height==="string"&&b.height.indexOf("%")!==-1){b._contentSections.height(b._content.height()-b._header.height()-parseInt(b._contentSections.css("border-bottom-width"),10)-parseInt(b._contentSections.css("border-top-width"),10)-1)}}else{b._header.css("height",(b.host.height()-parseInt(b._header.css("padding-top"),10)-parseInt(b._header.css("padding-bottom"),10)-parseInt(b._header.css("border-top-width"),10)-parseInt(b._header.css("border-bottom-width"),10)));b._contentSections.height(b._content.height()-parseInt(b._contentSections.css("border-top-width"),10)-parseInt(b._contentSections.css("border-bottom-width"),10)-parseInt(b._contentSections.css("padding-top"),10)-parseInt(b._contentSections.css("padding-bottom"),10));if(b.mode==="default"&&typeof b.width==="string"&&b.height.indexOf("%")!==-1){var c=b.position==="left"?parseInt(b._contentSections.css("border-left-width"),10)+parseInt(b._contentSections.css("border-right-width"),10)+1:0;b._contentSections.width(b._content.width()-b._header.width()-c)}}}b._checkScrollButtons(true);b._updatePositions();if(b.mode==="popup"){b._positionPopup()}},_stopAnimation:function(){var b=this;if(!b._allowSelection){b.selectedIndex=b._animatingIndex;a(b._contentSections[b._animatingIndex]).finish();b._clearSelection(true,b._animatingIndex);b._allowSelection=true}},_selectAt:function(b,e){var c=this;if(e===undefined){e=c.selectedIndex}if(b!==e){c._stopAnimation();if(c._allowSelection){c._animatingIndex=b;c._clearSelection(true,e);c._allowSelection=false;c._selecting=b;if(c.selectionMode==="click"){a(c._items[b]).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(c._items[b]).removeClass(c.toThemeProperty("jqx-ribbon-item-hover"))}if(c.mode=="popup"){c._header.removeClass(c.toThemeProperty("jqx-rc-all"));switch(c.position){case"top":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-t"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-b"));break;case"bottom":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-b"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-t"));break;case"left":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-l"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-r"));break;case"right":c._header.add(c._items).addClass(c.toThemeProperty("jqx-rc-r"));c._contentSections.addClass(c.toThemeProperty("jqx-rc-l"));break}}a(c._items[b]).addClass(c.toThemeProperty("jqx-widget-content")).addClass(c.toThemeProperty("jqx-ribbon-item-selected"));c._selectionToken.css("display","block");c._updatePositions(b);switch(c.animationType){case"fade":a(c._contentSections[b]).fadeToggle(c.animationDelay,function(){c._animationComplete(b,e)});break;case"slide":var d=c.position;if(d==="top"){d="up"}else{if(d==="bottom"){d="down"}}c.slideAnimation=c._slide(a(c._contentSections[b]),{mode:"show",direction:d,duration:c.animationDelay},b,e);break;case"none":a(c._contentSections[b]).css("display","block");c._animationComplete(b,e);break}}else{}}},_clearSelection:function(b,e){var c=this;if(c.mode=="popup"){c._header.addClass(c.toThemeProperty("jqx-rc-all"))}c._selecting=-1;if(e===undefined){e=c.selectedIndex}a(c._items[e]).removeClass(c.toThemeProperty("jqx-widget-content")).removeClass(c.toThemeProperty("jqx-ribbon-item-selected"));c._selectionToken.css("display","none");if(b!==true&&c.animationType!=="none"){if(c.animationType==="fade"){a(c._contentSections[e]).fadeOut(c.animationDelay,function(){c._clearSelectionComplete(e)})}else{if(c.animationType==="slide"){var d=c.position;if(d==="top"){d="up"}else{if(d==="bottom"){d="down"}}c._stopAnimation();e=c.selectedIndex;c.slideAnimation=c._slide(a(c._contentSections[e]),{mode:"hide",direction:d,duration:c.animationDelay},e);c.selectedIndex=-1}}}else{a(c._contentSections[e]).css("display","none");c._clearSelectionComplete(e,b)}},_addHandlers:function(){var c=this;var g=function(i){if(c.popupCloseMode=="click"&&c.mode==="popup"){if(i.target.className.indexOf("jqx-ribbon-content-popup")!=-1){c._clearSelection();return}if(a(i.target).ischildof(c.host)){return}var h=false;a.each(a(i.target).parents(),function(){if(this.className!="undefined"){if(this.className.indexOf){if(this.className.indexOf("jqx-ribbon")!=-1){h=true;return false}if(this.className.indexOf("jqx-ribbon")!=-1){if(self.element.id==this.id){h=true}return false}}}});if(!h){c._clearSelection()}}};if(c.selectionMode==="click"){c.addHandler(c._items,"click.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled){if(h!==c.selectedIndex){c._selectAt(h)}else{if(c.mode==="popup"){if(c.popupCloseMode!="none"){a(i.target).addClass(c.toThemeProperty("jqx-fill-state-hover"));a(i.target).addClass(c.toThemeProperty("jqx-ribbon-item-hover"));c._clearSelection()}}}}});var f=function(h){return((c._selecting!==h&&c._allowSelection===false)||((c._selecting===-1||c.selectedIndex!==h)&&c._allowSelection===true))&&!c._items[h]._disabled};c.addHandler(c._items,"mouseenter.ribbon"+c.element.id,function(h){if(f(h.target._index)){a(h.target).addClass(c.toThemeProperty("jqx-fill-state-hover"));a(h.target).addClass(c.toThemeProperty("jqx-ribbon-item-hover"))}});c.addHandler(c._items,"mouseleave.ribbon"+c.element.id,function(h){if(f(h.target._index)){a(h.target).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(h.target).removeClass(c.toThemeProperty("jqx-ribbon-item-hover"))}});if(c.mode==="popup"){c.addHandler(c.host,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(c._contentSections,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(a(document),"mousedown.ribbon"+c.element.id,function(h){g(h)})}}else{if(c.selectionMode==="hover"){c.addHandler(c._items,"mouseenter.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled&&h!==c.selectedIndex){c._selectAt(h)}});if(c.mode==="popup"){c.addHandler(c.host,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(c._contentSections,"mouseleave.ribbon"+c.element.id,function(){if(c.popupCloseMode=="mouseLeave"&&c.mode==="popup"){c._clearSelection()}});c.addHandler(a(document),"mousedown.ribbon"+c.element.id,function(h){g(h)});c.addHandler(c._items,"click.ribbon"+c.element.id,function(i){var h=i.target._index;if(!c._items[h]._disabled){if(c.mode==="popup"){if(c.popupCloseMode!="none"){c._clearSelection()}}}})}}}var d=(c.rtl&&c._browser.browser==="msie")?-1:1;var b=a(c._scrollButtons[0]);c.addHandler(b,"mousedown.ribbon"+c.element.id,function(){if(c._orientation==="horizontal"){c._timeoutNear=setInterval(function(){var h=c._header.scrollLeft();c._header.scrollLeft(h-c.scrollStep*d);c._updatePositions()},c.scrollDelay)}else{c._timeoutNear=setInterval(function(){var h=c._header.scrollTop();c._header.scrollTop(h-c.scrollStep);c._updatePositions()},c.scrollDelay)}return false});c.addHandler(b,"mouseup.ribbon"+c.element.id,function(){clearInterval(c._timeoutNear)});var e=a(c._scrollButtons[1]);c.addHandler(e,"mousedown.ribbon"+c.element.id,function(){if(c._orientation==="horizontal"){c._timeoutFar=setInterval(function(){var h=c._header.scrollLeft();c._header.scrollLeft(h+c.scrollStep*d);c._updatePositions()},c.scrollDelay)}else{c._timeoutFar=setInterval(function(){var h=c._header.scrollTop();c._header.scrollTop(h+c.scrollStep);c._updatePositions()},c.scrollDelay)}return false});c.addHandler(e,"mouseup.ribbon"+c.element.id,function(){clearInterval(c._timeoutFar)})},_removeHandlers:function(f,e){var c=this;if(!f){f=c.selectionMode}if(!e){e=c.mode}if(f==="click"){c.removeHandler(c._items,"click.ribbon"+c.element.id);c.removeHandler(c._items,"mouseenter.ribbon"+c.element.id);c.removeHandler(c._items,"mouseleave.ribbon"+c.element.id)}else{if(f==="hover"){c.removeHandler(c._items,"mouseenter.ribbon"+c.element.id);if(e==="popup"){c.removeHandler(c.host,"mouseleave.ribbon"+c.element.id)}}}var b=a(c._scrollButtons[0]);c.removeHandler(b,"mousedown.ribbon"+c.element.id);c.removeHandler(b,"mouseup.ribbon"+c.element.id);var d=a(c._scrollButtons[1]);c.removeHandler(d,"mousedown.ribbon"+c.element.id);c.removeHandler(d,"mouseup.ribbon"+c.element.id)},_checkStructure:function(c){var d=this;var f=c.length;if(f!==2){throw new Error("jqxRibbon: Invalid HTML structure. You need to add a ul and a div to the widget container.")}var b=d._header.children().length;var e=d._content.children().length;if(b!==e){throw new Error("jqxRibbon: Invalid HTML structure. For each list item you must have a corresponding div element.")}},_addClasses:function(){var d=this;d._contentSections.removeClass();d._content.removeClass();d._header.removeClass();d._items.removeClass();d.host.removeClass();d.host.addClass(d.toThemeProperty("jqx-widget")+" "+d.toThemeProperty("jqx-ribbon"));d._header.addClass(d.toThemeProperty("jqx-widget-header")+" "+d.toThemeProperty("jqx-disableselect")+" "+d.toThemeProperty("jqx-ribbon-header")+" "+d.toThemeProperty("jqx-ribbon-header-"+d._orientation));d._items.addClass(d.toThemeProperty("jqx-ribbon-item")+" "+d.toThemeProperty("jqx-ribbon-item-"+d.position));d._content.addClass(d.toThemeProperty("jqx-widget-content")+" "+d.toThemeProperty("jqx-ribbon-content")+" "+d.toThemeProperty("jqx-ribbon-content-"+d._orientation));d._contentSections.addClass(d.toThemeProperty("jqx-widget-content")+" "+d.toThemeProperty("jqx-ribbon-content-section")+" "+d.toThemeProperty("jqx-ribbon-content-section-"+d.position));switch(d.position){case"top":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-t"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-b"));break;case"bottom":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-b"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-t"));break;case"left":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-l"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-r"));break;case"right":d._header.add(d._items).addClass(d.toThemeProperty("jqx-rc-r"));d._contentSections.addClass(d.toThemeProperty("jqx-rc-l"));break}var c,b;if(d.mode==="popup"){if(d.selectedIndex===-1){d.host.addClass(d.toThemeProperty("jqx-rc-all"));d._header.addClass(d.toThemeProperty("jqx-rc-all"))}d.host.addClass(d.toThemeProperty("jqx-ribbon-popup"));d._header.addClass(d.toThemeProperty("jqx-ribbon-header-"+d._orientation+"-popup"));d._content.addClass(d.toThemeProperty("jqx-ribbon-content-popup"));d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-popup"));d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-popup-"+d.position));if(d._orientation==="horizontal"){d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-horizontal-popup"))}else{d._contentSections.addClass(d.toThemeProperty("jqx-ribbon-content-section-vertical-popup"))}d._positionPopup()}else{if(d._orientation==="horizontal"){if(d.height!=="auto"){b=d._header.outerHeight();if(d.position==="top"){d._content.css("padding-top",b)}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-bottom"));d._content.css("padding-bottom",b)}}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-auto"))}}else{if(d._orientation==="vertical"){if(d.width!=="auto"){c=d._header.outerWidth();if(d.position==="left"){d._content.css("padding-left",c)}else{d._header.addClass(d.toThemeProperty("jqx-ribbon-header-right"));d._content.css("padding-right",c)}}else{d.host.addClass(d.toThemeProperty("jqx-ribbon-auto"));d._header.addClass(d.toThemeProperty("jqx-ribbon-header-auto"));d._content.addClass(d.toThemeProperty("jqx-ribbon-content-auto-width"))}}}}if(d._browser.version==="7.0"&&d._browser.browser==="msie"){if(d._orientation==="horizontal"){d._header.css("width",(d.host.width()-parseInt(d._header.css("padding-left"),10)-parseInt(d._header.css("padding-right"),10)-parseInt(d._header.css("border-left-width"),10)-parseInt(d._header.css("border-right-width"),10)));d._items.height(d._items.height()-parseInt(d._items.css("padding-top"),10)-parseInt(d._items.css("padding-bottom"),10)-parseInt(d._items.css("border-top-width"),10)-parseInt(d._items.css("border-bottom-width"),10));d._contentSections.width(d._contentSections.width()-parseInt(d._contentSections.css("border-left-width"),10)-parseInt(d._contentSections.css("border-right-width"),10)-parseInt(d._contentSections.css("padding-left"),10)-parseInt(d._contentSections.css("padding-right"),10));if(d.mode==="default"){if(d.height!=="auto"){if(d.position==="top"){d._contentSections.css("padding-top",b)}else{d._contentSections.css("padding-bottom",b)}d._contentSections.height(d._content.height()-d._header.height()-parseInt(d._contentSections.css("border-bottom-width"),10)-parseInt(d._contentSections.css("border-top-width"),10)-1)}}else{}}else{var e;if(d.position==="left"){d._content.addClass(d.toThemeProperty("jqx-ribbon-content-left"));e=parseInt(d._contentSections.css("border-left-width"),10)+parseInt(d._contentSections.css("border-right-width"),10)+1}else{d._content.addClass(d.toThemeProperty("jqx-ribbon-content-right"));e=0}d._header.css("height",(d.host.height()-parseInt(d._header.css("padding-top"),10)-parseInt(d._header.css("padding-bottom"),10)-parseInt(d._header.css("border-top-width"),10)-parseInt(d._header.css("border-bottom-width"),10)));d._items.width(d._items.width()-parseInt(d._items.css("padding-left"),10)-parseInt(d._items.css("padding-right"),10)-parseInt(d._items.css("border-left-width"),10)-parseInt(d._items.css("border-right-width"),10));d._contentSections.height(d._contentSections.height()-parseInt(d._contentSections.css("border-top-width"),10)-parseInt(d._contentSections.css("border-bottom-width"),10)-parseInt(d._contentSections.css("padding-top"),10)-parseInt(d._contentSections.css("padding-bottom"),10));if(d.mode==="default"){if(d.width!=="auto"){if(d.position==="left"){d._contentSections.css("padding-left",c)}else{d._contentSections.css("padding-right",c)}d._contentSections.width(d._content.width()-d._header.width()-e)}}else{}}}if(d.rtl===true){d._header.addClass(d.toThemeProperty("jqx-ribbon-header-rtl"));d._items.addClass(d.toThemeProperty("jqx-ribbon-item-rtl"))}},_positionPopup:function(){var c=this;var b=(c._browser.version==="7.0"&&c._browser.browser==="msie");switch(c.position){case"top":c._content.css("top",c._header.outerHeight());break;case"bottom":if(!b){c._content.css("bottom",c._header.outerHeight())}else{c._content.css("bottom",c._header.height())}break;case"left":c._content.css("left",c._header.outerWidth());break;case"right":c._content.css("right",c._header.outerWidth());break}},_appendScrollButtons:function(){var d=this;var e='<div class="'+d.toThemeProperty("jqx-ribbon-scrollbutton")+" "+d.toThemeProperty("jqx-ribbon-scrollbutton-"+d.position)+" "+d.toThemeProperty("jqx-ribbon-scrollbutton-"+d.scrollPosition)+" "+d.toThemeProperty("jqx-widget-header")+'"><div class="'+d.toThemeProperty("jqx-ribbon-scrollbutton-inner")+'"></div></div>';var b=a(e);var f=a(e);var c=(d._orientation==="horizontal")?["left","right"]:["top","bottom"];b.find(".jqx-ribbon-scrollbutton-inner").addClass(d.toThemeProperty("jqx-icon-arrow-"+c[0]));f.find(".jqx-ribbon-scrollbutton-inner").addClass(d.toThemeProperty("jqx-icon-arrow-"+c[1]));b.addClass(d.toThemeProperty("jqx-ribbon-scrollbutton-lt"));f.addClass(d.toThemeProperty("jqx-ribbon-scrollbutton-rb"));d._scrollButtons=b.add(f);d.host.append(d._scrollButtons);if(d._orientation==="horizontal"){d._scrollButtons.height(d._header.height())}else{d._scrollButtons.width(d._header.width())}d._scrollButtonRc(b,f)},_scrollButtonRc:function(b,d){var c=this;switch(c.position){case"top":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-tr"))}break;case"bottom":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-bl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-br"))}break;case"left":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tl"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-bl"))}break;case"right":if(c.scrollPosition!=="far"){b.addClass(c.toThemeProperty("jqx-rc-tr"))}if(c.scrollPosition!=="near"){d.addClass(c.toThemeProperty("jqx-rc-br"))}break}},_updateItems:function(){var c=this;c._items=c._header.children();c._contentSections=c._content.children();for(var b=0;b<c._items.length;b++){if(c._items[b]._index===undefined){c._items[b]._disabled=false;c._items[b]._isInitialized=false;c._contentSections[b]._layout="default"}c._items[b]._index=b;c._contentSections[b]._index=b}},_positionContent:function(f){var g=this;var c,k,l,h,b,j;if(g._orientation==="horizontal"){c=g.host.outerWidth();k=g.host.offset().left;l=a(g._items[f]).outerWidth();h=a(g._items[f]).offset().left;b=a(g._contentSections[f]).outerWidth();j="left"}else{c=g.host.outerHeight();k=g.host.offset().top;l=a(g._items[f]).outerHeight();h=a(g._items[f]).offset().top;b=a(g._contentSections[f]).outerHeight();j="top"}var e=a(g._contentSections[f]);var d=function(m){if(m<0){m=0}else{if(m+b>c){m=c-b}}e.css(j,m)};var i;switch(e[0]._layout){case"near":i=h-k;d(i);break;case"far":i=h-k-(b-l);d(i);break;case"center":i=h-k-(b-l)/2;d(i);break;default:e.css(j,"")}},_checkScrollButtons:function(d){var f=this;var g=0;a.each(f._items,function(){var i=a(this);if(i.css("display")!=="none"){g+=(f._orientation==="horizontal")?i.outerWidth(true):i.outerHeight(true)}});var h=f._orientation==="horizontal"?["margin-left","margin-right"]:["margin-top","margin-bottom"];var b=(f._orientation==="horizontal")?f._header.width():f._header.height();if(!f._itemMargins){f._itemMargins=new Array();f._itemMargins.push(a(f._items[0]).css(h[0]));f._itemMargins.push(a(f._items[f._items.length-1]).css(h[1]))}if(g>b){f._scrollButtons.css("display","block");var e=17;var c=17;switch(f.scrollPosition){case"near":c=0;e=34;break;case"far":c=34;e=17;break}a(f._items[0]).css(h[0],e);a(f._items[f._items.length-1]).css(h[1],c)}else{a(f._items[0]).css(h[0],f._itemMargins[0]);a(f._items[f._items.length-1]).css(h[1],f._itemMargins[1]);f._scrollButtons.css("display","none")}if(d===true){if(f._orientation==="horizontal"){f._scrollButtons.height(f._header.height())}else{f._scrollButtons.width(f._header.width())}}},_positionSelectionToken:function(h){var i=this;if(h!==-1){var e=a(i._items[h]);var j,b,d,k,g;if(i._orientation==="horizontal"){var f,m;if(i.rtl===true){if(i._browserWidthRtlFlag===1){f=i._header[0].scrollWidth-i._header[0].clientWidth}else{f=0}m=i._browserScrollRtlFlag}else{f=0;m=1}d=e[0].offsetLeft+f-i._header[0].scrollLeft*m-i._selectionTokenOffsetX+2;g=i._header.outerHeight()-1;var c=e.width()+parseInt(e.css("padding-left"),10)+parseInt(e.css("padding-right"),10);if(i.position==="top"){j=g-i._selectionTokenOffsetY;b=""}else{j="";b=g-i._selectionTokenOffsetY}i._selectionToken.css({top:j,bottom:b,left:d,width:c})}else{j=e[0].offsetTop-i._header[0].scrollTop-i._selectionTokenOffsetX+2;g=i._header.outerWidth()-1;var l=e.height()+parseInt(e.css("padding-top"),10)+parseInt(e.css("padding-bottom"),10);if(i.position==="left"){d=g-i._selectionTokenOffsetY;k=""}else{d="";k=g-i._selectionTokenOffsetY}i._selectionToken.css({top:j,left:d,right:k,height:l})}}},_updatePositions:function(b){var c=this;if(isNaN(b)){b=c.selectedIndex}if(b!==-1){c._positionSelectionToken(b);if(c.mode==="popup"&&c._contentSections[b]._layout!=="default"){c._positionContent(b)}if(c.mode==="popup"&&(c.position==="left"||c.position==="right")){c._content.width("auto");var d=c._contentSections[b].style.width&&c._contentSections[b].style.width.toString().indexOf("%")>=0;if(d){c._content[0].style.width=c._contentSections[b].style.width;c._content.width(a(c._contentSections[b]).width()-c._header.width())}else{c._content.width(a(c._contentSections[b]).width())}}}},_animationComplete:function(c,e){var d=this;d._content.css("pointer-events","auto");d._raiseEvent("0",{selectedIndex:c});var b=e!==-1?e:null;d._raiseEvent("2",{unselectedIndex:b,selectedIndex:c});d.selectedIndex=c;if(d.initContent&&d._items[c]._isInitialized===false){d.initContent(c);d._items[c]._isInitialized=true}d._allowSelection=true;d._selecting=null},_clearSelectionComplete:function(d,b){var c=this;c._selecting=null;if(d===undefined){d=c.selectedIndex}if(d!==-1){c._content.css("pointer-events","none");c._raiseEvent("1",{unselectedIndex:d})}if(b!==true){c.selectedIndex=-1}},_slide:function(f,e,m,s){var q=this;if(!q.activeAnimations){q.activeAnimations=new Array()}if(q.activeAnimations.length>0){for(var k=0;k<q.activeAnimations.length;k++){q.activeAnimations[k].clearQueue();q.activeAnimations[k].finish()}}else{f.clearQueue();f.finish()}var h="ui-effects-";var d={save:function(u,v){for(var o=0;o<v.length;o++){if(v[o]!==null&&u.length>0){u.data(h+v[o],u[0].style[v[o]])}}},restore:function(u,w){var v,o;for(o=0;o<w.length;o++){if(w[o]!==null){v=u.data(h+w[o]);if(v===undefined){v=""}u.css(w[o],v)}}},createWrapper:function(o){if(o.parent().is(".ui-effects-wrapper")){return o.parent()}var u={width:o.outerWidth(true),height:o.outerHeight(true),"float":o.css("float")},x=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:o.width(),height:o.height()},w=document.activeElement;try{w.id}catch(v){w=document.body}o.wrap(x);if(o[0]===w||a.contains(o[0],w)){a(w).focus()}x=o.parent();if(o.css("position")==="static"){x.css({position:"relative"});o.css({position:"relative"})}else{a.extend(u,{position:o.css("position"),zIndex:o.css("z-index")});a.each(["top","left","bottom","right"],function(y,z){u[z]=o.css(z);if(isNaN(parseInt(u[z],10))){u[z]="auto"}});o.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}o.css(i);return x.css(u).show()},removeWrapper:function(i){var o=document.activeElement;if(i.parent().is(".ui-effects-wrapper")){i.parent().replaceWith(i);if(i[0]===o||a.contains(i[0],o)){a(o).focus()}}return i}};var p=["position","top","bottom","left","right","width","height"],l=e.mode,t=l==="show",r=e.direction||"left",g=(r==="up"||r==="down")?"top":"left",c=(r==="up"||r==="left"),b,j={};d.save(f,p);f.show();b=e.distance||f[g==="top"?"outerHeight":"outerWidth"](true);d.createWrapper(f).css({overflow:"hidden"});if(t){f.css(g,c?(isNaN(b)?"-"+b:-b):b)}j[g]=(t?(c?"+=":"-="):(c?"-=":"+="))+b;var n=function(){f.clearQueue();f.stop(true,true)};q.activeAnimations.push(f);f.animate(j,{duration:e.duration,easing:e.easing,complete:function(){q.activeAnimations.pop(f);if(l==="show"){q._animationComplete(m,s)}else{if(l==="hide"){f.hide();q._clearSelectionComplete(m)}}d.restore(f,p);d.removeWrapper(f)}});return n}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxScrollBar","",{});a.extend(a.jqx._jqxScrollBar.prototype,{defineInstance:function(){var b={height:null,width:null,vertical:false,min:0,max:1000,value:0,step:10,largestep:50,thumbMinSize:10,thumbSize:0,thumbStep:"auto",roundedCorners:"all",showButtons:true,disabled:false,touchMode:"auto",touchModeStyle:"auto",thumbTouchSize:0,_triggervaluechanged:true,rtl:false,areaDownCapture:false,areaUpCapture:false,_initialLayout:false};a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this._mouseup=new Date();var c=this;var d="<div id='jqxScrollOuterWrap' style='box-sizing: content-box; width:100%; height: 100%; align:left; border: 0px; valign:top; position: relative;'><div id='jqxScrollWrap' style='box-sizing: content-box; width:100%; height: 100%; left: 0px; top: 0px; align:left; valign:top; position: absolute;'><div id='jqxScrollBtnUp' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'><div></div></div><div id='jqxScrollAreaUp' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollThumb' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollAreaDown' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollBtnDown' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'><div></div></div></div></div>";if(a.jqx.utilities&&a.jqx.utilities.scrollBarButtonsVisibility=="hidden"){this.showButtons=false}if(c.WinJS){MSApp.execUnsafeLocalFunction(function(){c.host.html(d)})}else{this.element.innerHTML=d}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.isPercentage=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width);this.isPercentage=true}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height);this.isPercentage=true}if(this.isPercentage){var e=this;a.jqx.utilities.resize(this.host,function(){e._arrange()},false)}this.thumbCapture=false;this.scrollOuterWrap=a(this.element.firstChild);this.scrollWrap=a(this.scrollOuterWrap[0].firstChild);this.btnUp=a(this.scrollWrap[0].firstChild);this.areaUp=a(this.btnUp[0].nextSibling);this.btnThumb=a(this.areaUp[0].nextSibling);this.arrowUp=a(this.btnUp[0].firstChild);this.areaDown=a(this.btnThumb[0].nextSibling);this.btnDown=a(this.areaDown[0].nextSibling);this.arrowDown=a(this.btnDown[0].firstChild);var b=this.element.id;this.btnUp[0].id="jqxScrollBtnUp"+b;this.btnDown[0].id="jqxScrollBtnDown"+b;this.btnThumb[0].id="jqxScrollThumb"+b;this.areaUp[0].id="jqxScrollAreaUp"+b;this.areaDown[0].id="jqxScrollAreaDown"+b;this.scrollWrap[0].id="jqxScrollWrap"+b;this.scrollOuterWrap[0].id="jqxScrollOuterWrap"+b;if(!this.host.jqxRepeatButton){throw new Error("jqxScrollBar: Missing reference to jqxbuttons.js.");return}this.btnUp.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDown.jqxRepeatButton({_ariaDisabled:true,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({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.areaDown.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.btnThumb.jqxButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.propertyChangeMap.value=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.setPosition(parseFloat(i),true)}}};this.propertyChangeMap.width=function(f,h,g,i){if(f.width!=undefined&&parseInt(f.width)>0){f.host.width(parseInt(f.width));f._arrange()}};this.propertyChangeMap.height=function(f,h,g,i){if(f.height!=undefined&&parseInt(f.height)>0){f.host.height(parseInt(f.height));f._arrange()}};this.propertyChangeMap.theme=function(f,h,g,i){f.setTheme()};this.propertyChangeMap.max=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.max=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.min=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.min=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.disabled=function(f,h,g,i){if(g!=i){if(i){f.host.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{f.host.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}f.btnUp.jqxRepeatButton("disabled",f.disabled);f.btnDown.jqxRepeatButton("disabled",f.disabled);f.btnThumb.jqxButton("disabled",f.disabled)}};this.propertyChangeMap.touchMode=function(f,h,g,i){if(g!=i){f._updateTouchBehavior();if(i===true){f.showButtons=false;f.refresh()}else{if(i===false){f.showButtons=true;f.refresh()}}}};this.buttonUpCapture=false;this.buttonDownCapture=false;this._updateTouchBehavior();this.setPosition(this.value);this._addHandlers();this.setTheme()},resize:function(c,b){this.width=c;this.height=b;this._arrange()},_updateTouchBehavior:function(){this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.setTheme();return}this.isTouchDevice=true;a.jqx.mobile.setMobileSimulator(this.btnThumb[0]);this._removeHandlers();this._addHandlers();this.setTheme()}else{if(this.touchMode==false){this.isTouchDevice=false}}},_addHandlers:function(){var j=this;var e=false;try{if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){e=true;this._touchSupport=true}}catch(f){}if(j.isTouchDevice||e){this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchend"),function(k){var l=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");var m=j.toThemeProperty("jqx-fill-state-pressed");j.btnThumb.removeClass(l);j.btnThumb.removeClass(m);if(!j.disabled){j.handlemouseup(j,k)}return false});this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchstart"),function(k){if(!j.disabled){if(j.touchMode==true){k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}else{var l=k;if(l.originalEvent.touches&&l.originalEvent.touches.length){k.clientX=l.originalEvent.touches[0].clientX;k.clientY=l.originalEvent.touches[0].clientY}else{k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}}j.handlemousedown(k);if(k.preventDefault){k.preventDefault()}}});a.jqx.mobile.touchScroll(this.element,j.max,function(q,p,l,k,m){if(j.host.css("visibility")=="visible"){if(j.touchMode==true){m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}else{var o=m;if(o.originalEvent.touches&&o.originalEvent.touches.length){m.clientX=o.originalEvent.touches[0].clientX;m.clientY=o.originalEvent.touches[0].clientY}else{m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}}var n=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");j.btnThumb.addClass(n);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.thumbCapture=true;j.handlemousemove(m)}},j.element.id)}if(!this.isTouchDevice){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var b=null;if(window.parent&&document.referrer){b=document.referrer}if(b&&b.indexOf(document.location.host)!=-1){var g=function(k){if(!j.disabled){j.handlemouseup(j,k)}};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}}catch(i){}var c="click mouseup mousedown";this.addHandler(this.btnDown,c,function(l){switch(l.type){case"click":var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}if(j.buttonDownCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value+k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value+k)}}break;case"mouseup":if(!j.btnDownInstance.base.disabled&&j.buttonDownCapture){j.buttonDownCapture=false;j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","down");j.handlemouseup(j,l);var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}j.setPosition(j.value+k);return false}break;case"mousedown":if(!j.btnDownInstance.base.disabled){j.buttonDownCapture=true;j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","down");return false}break}});this.addHandler(this.btnUp,c,function(l){switch(l.type){case"click":var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}if(j.buttonUpCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value-k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value-k)}}break;case"mouseup":if(!j.btnUpInstance.base.disabled&&j.buttonUpCapture){j.buttonUpCapture=false;j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","up");j.handlemouseup(j,l);var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}j.setPosition(j.value-k);return false}break;case"mousedown":if(!j.btnUpInstance.base.disabled){j.buttonUpCapture=true;j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","up");return false}break}})}var h="click";if(this.isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.areaUp,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value-k);return false}});this.addHandler(this.areaDown,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value+k);return false}});this.addHandler(this.areaUp,"mousedown",function(k){if(!j.disabled){j.areaUpCapture=true;return false}});this.addHandler(this.areaDown,"mousedown",function(k){if(!j.disabled){j.areaDownCapture=true;return false}});this.addHandler(this.btnThumb,"mousedown dragstart",function(k){if(k.type==="dragstart"){return false}if(!j.disabled){j.handlemousedown(k)}return false});this.addHandler(a(document),"mouseup."+this.element.id,function(k){if(!j.disabled){j.handlemouseup(j,k)}});if(!this.isTouchDevice){this.mousemoveFunc=function(k){if(!j.disabled){j.handlemousemove(k)}};this.addHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc);this.addHandler(a(document),"mouseleave."+this.element.id,function(k){if(!j.disabled){j.handlemouseleave(k)}});this.addHandler(a(document),"mouseenter."+this.element.id,function(k){if(!j.disabled){j.handlemouseenter(k)}});if(!j.disabled){this.addHandler(this.btnUp,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","up")}}else{if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","up")}}});var d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover");if(!j.vertical){d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover-horizontal")}this.addHandler(this.btnThumb,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&j.touchMode!=true){j.btnThumb.addClass(d);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-hover"))}}else{if(!j.disabled&&j.touchMode!=true){j.btnThumb.removeClass(d);j.btnThumb.removeClass(j.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.btnDown,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","down")}}else{if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","down")}}})}}},destroy:function(){var b=this.btnUp;var f=this.btnDown;var d=this.btnThumb;var c=this.scrollWrap;var h=this.areaUp;var e=this.areaDown;this.arrowUp.remove();delete this.arrowUp;this.arrowDown.remove();delete this.arrowDown;e.removeClass();h.removeClass();f.removeClass();b.removeClass();d.removeClass();b.jqxRepeatButton("destroy");f.jqxRepeatButton("destroy");h.jqxRepeatButton("destroy");e.jqxRepeatButton("destroy");d.jqxButton("destroy");var g=a.data(this.element,"jqxScrollBar");this._removeHandlers();this.btnUp=null;this.btnDown=null;this.scrollWrap=null;this.areaUp=null;this.areaDown=null;this.scrollOuterWrap=null;delete this.mousemoveFunc;delete this.btnDownInstance;delete this.btnUpInstance;delete this.scrollOuterWrap;delete this.scrollWrap;delete this.btnDown;delete this.areaDown;delete this.areaUp;delete this.btnDown;delete this.btnUp;delete this.btnThumb;delete this.propertyChangeMap.value;delete this.propertyChangeMap.min;delete this.propertyChangeMap.max;delete this.propertyChangeMap.touchMode;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;if(g){delete g.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_removeHandlers:function(){this.removeHandler(this.btnUp,"mouseenter");this.removeHandler(this.btnDown,"mouseenter");this.removeHandler(this.btnThumb,"mouseenter");this.removeHandler(this.btnUp,"mouseleave");this.removeHandler(this.btnDown,"mouseleave");this.removeHandler(this.btnThumb,"mouseleave");this.removeHandler(this.btnUp,"click");this.removeHandler(this.btnDown,"click");this.removeHandler(this.btnDown,"mouseup");this.removeHandler(this.btnUp,"mouseup");this.removeHandler(this.btnDown,"mousedown");this.removeHandler(this.btnUp,"mousedown");this.removeHandler(this.areaUp,"mousedown");this.removeHandler(this.areaDown,"mousedown");this.removeHandler(this.areaUp,"click");this.removeHandler(this.areaDown,"click");this.removeHandler(this.btnThumb,"mousedown");this.removeHandler(this.btnThumb,"dragstart");this.removeHandler(a(document),"mouseup."+this.element.id);if(!this.mousemoveFunc){this.removeHandler(a(document),"mousemove."+this.element.id)}else{this.removeHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc)}this.removeHandler(a(document),"mouseleave."+this.element.id);this.removeHandler(a(document),"mouseenter."+this.element.id);var b=this},_addArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},_removeArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},setTheme:function(){var o=this.btnUp;var m=this.btnDown;var p=this.btnThumb;var e=this.scrollWrap;var g=this.areaUp;var h=this.areaDown;var f=this.arrowUp;var i=this.arrowDown;this.scrollWrap[0].className=this.toThemeProperty("jqx-reset");this.scrollOuterWrap[0].className=this.toThemeProperty("jqx-reset");var k=this.toThemeProperty("jqx-reset");this.areaDown[0].className=k;this.areaUp[0].className=k;var d=this.toThemeProperty("jqx-scrollbar")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content");this.host.addClass(d);m[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");o[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");var q="";if(this.vertical){f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-up");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-down");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal")}else{f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-left");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-right");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal-horizontal")}q+=" "+this.toThemeProperty("jqx-fill-state-normal");p[0].className=q;if(this.disabled){e.addClass(this.toThemeProperty("jqx-fill-state-disabled"));e.removeClass(this.toThemeProperty("jqx-scrollbar-state-normal"))}else{e.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));e.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.roundedCorners=="all"){this.host.addClass(this.toThemeProperty("jqx-rc-all"));if(this.vertical){var j=a.jqx.cssroundedcorners("top");j=this.toThemeProperty(j);o.addClass(j);var c=a.jqx.cssroundedcorners("bottom");c=this.toThemeProperty(c);m.addClass(c)}else{var n=a.jqx.cssroundedcorners("left");n=this.toThemeProperty(n);o.addClass(n);var l=a.jqx.cssroundedcorners("right");l=this.toThemeProperty(l);m.addClass(l)}}else{var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);elBtnUp.addClass(b);elBtnDown.addClass(b)}var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);if(!p.hasClass(b)){p.addClass(b)}if(this.isTouchDevice&&this.touchModeStyle!=false){this.showButtons=false;p.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch"))}},isScrolling:function(){if(this.thumbCapture==undefined||this.buttonDownCapture==undefined||this.buttonUpCapture==undefined||this.areaDownCapture==undefined||this.areaUpCapture==undefined){return false}return this.thumbCapture||this.buttonDownCapture||this.buttonUpCapture||this.areaDownCapture||this.areaUpCapture},handlemousedown:function(c){if(this.thumbCapture==undefined||this.thumbCapture==false){this.thumbCapture=true;var b=this.btnThumb;if(b!=null){b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(this.vertical){b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}}}this.dragStartX=c.clientX;this.dragStartY=c.clientY;this.dragStartValue=this.value},toggleHover:function(c,b){},refresh:function(){this._arrange()},_setElementPosition:function(c,b,d){if(!isNaN(b)){if(parseInt(c[0].style.left)!=parseInt(b)){c[0].style.left=b+"px"}}if(!isNaN(d)){if(parseInt(c[0].style.top)!=parseInt(d)){c[0].style.top=d+"px"}}},_setElementTopPosition:function(b,c){if(!isNaN(c)){b[0].style.top=c+"px"}},_setElementLeftPosition:function(c,b){if(!isNaN(b)){c[0].style.left=b+"px"}},handlemouseleave:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonDownCapture||this.buttonUpCapture){b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));this._removeArrowClasses("pressed")}if(this.thumbCapture!=true){return}var c=this.btnThumb;var f=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");c.removeClass(f);c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemouseenter:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonUpCapture){b.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","up")}if(this.buttonDownCapture){d.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","down")}if(this.thumbCapture!=true){return}var c=this.btnThumb;if(this.vertical){c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}c.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemousemove:function(b){var i=this.btnUp;var e=this.btnDown;var d=0;if(e==null||i==null){return}if(i!=null&&e!=null&&this.buttonDownCapture!=undefined&&this.buttonUpCapture!=undefined){if(this.buttonDownCapture&&b.which==d){e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","down");this.buttonDownCapture=false}else{if(this.buttonUpCapture&&b.which==d){i.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));i.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","up");this.buttonUpCapture=false}}}if(this.thumbCapture!=true){return false}var k=this.btnThumb;if(b.which==d&&!this.isTouchDevice&&!this._touchSupport){this.thumbCapture=false;this._arrange();var j=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");k.removeClass(j);k.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));return true}if(b.preventDefault!=undefined){b.preventDefault()}if(b.originalEvent!=null){b.originalEvent.mouseHandled=true}if(b.stopPropagation!=undefined){b.stopPropagation()}var l=0;try{if(!this.vertical){l=b.clientX-this.dragStartX}else{l=b.clientY-this.dragStartY}var f=this._btnAndThumbSize;if(!this._btnAndThumbSize){f=(this.vertical)?i.height()+e.height()+k.height():i.width()+e.width()+k.width()}var g=(this.max-this.min)/(this.scrollBarSize-f);if(this.thumbStep=="auto"){l*=g}else{l*=g;if(Math.abs(this.dragStartValue+l-this.value)>=parseInt(this.thumbStep)){var c=Math.round(parseInt(l)/this.thumbStep)*this.thumbStep;if(this.rtl&&!this.vertical){this.setPosition(this.dragStartValue-c)}else{this.setPosition(this.dragStartValue+c)}return false}else{return false}}var c=l;if(this.rtl&&!this.vertical){c=-l}this.setPosition(this.dragStartValue+c)}catch(h){alert(h)}return false},handlemouseup:function(d,g){var c=false;if(this.thumbCapture){this.thumbCapture=false;var e=this.btnThumb;var h=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");e.removeClass(h);e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));c=true;this._mouseup=new Date()}this.areaDownCapture=this.areaUpCapture=false;if(this.buttonUpCapture||this.buttonDownCapture){var b=this.btnUp;var f=this.btnDown;this.buttonUpCapture=false;this.buttonDownCapture=false;b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));f.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));f.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed");c=true;this._mouseup=new Date()}if(c){if(g.preventDefault!=undefined){g.preventDefault()}if(g.originalEvent!=null){g.originalEvent.mouseHandled=true}if(g.stopPropagation!=undefined){g.stopPropagation()}}},setPosition:function(b,g){var d=this.element;if(b==undefined||b==NaN){b=this.min}if(b>=this.max){b=this.max}if(b<this.min){b=this.min}if(this.value!==b||g==true){if(b==this.max){var c=new a.Event("complete");this.host.trigger(c)}var f=this.value;if(this._triggervaluechanged){var e=new a.Event("valueChanged");e.previousValue=this.value;e.currentValue=b}this.value=b;this._positionelements();if(this._triggervaluechanged){this.host.trigger(e)}if(this.valueChanged){this.valueChanged({currentValue:this.value,previousvalue:f})}}return b},val:function(b){var c=function(e){for(var d in e){if(e.hasOwnProperty(d)){return false}}if(typeof b=="number"){return false}if(typeof b=="date"){return false}if(typeof b=="boolean"){return false}if(typeof b=="string"){return false}return true};if(c(b)||arguments.length==0){return this.value}else{this.setPosition(b);return b}},_getThumbSize:function(b){var d=this.max-this.min;var c=0;if(d>1){c=(b/(d+b)*b)}else{if(d==1){c=b}}if(this.thumbSize>0){c=this.thumbSize}if(c<this.thumbMinSize){c=this.thumbMinSize}return Math.min(c,b)},_positionelements:function(){var g=this.element;var n=this.areaUp;var e=this.areaDown;var h=this.btnUp;var f=this.btnDown;var o=this.btnThumb;var b=this.scrollWrap;var p=this._height?this._height:this.host.height();var c=this._width?this._width:this.host.width();var l=(!this.vertical)?p:c;if(!this.showButtons){l=0}var m=(!this.vertical)?c:p;this.scrollBarSize=m;var d=this._getThumbSize(m-2*l);d=Math.round(d);if(d<this.thumbMinSize){d=this.thumbMinSize}if(p==NaN||p<10){p=10}if(c==NaN||c<10){c=10}l+=2;this.btnSize=l;var i=this._btnAndThumbSize;if(!this._btnAndThumbSize){var i=(this.vertical)?2*this.btnSize+o.outerHeight():2*this.btnSize+o.outerWidth();i=Math.round(i)}var k=(m-i)/(this.max-this.min)*(this.value-this.min);if(this.rtl&&!this.vertical){k=(m-i)/(this.max-this.min)*(this.max-this.value-this.min)}k=Math.round(k);if(k<0){k=0}if(this.vertical){var j=m-k-i;if(j<0){j=0}e[0].style.height=j+"px";n[0].style.height=k+"px";this._setElementTopPosition(n,l);this._setElementTopPosition(o,l+k);this._setElementTopPosition(e,l+k+d)}else{n[0].style.width=k+"px";if(m-k-i>=0){e[0].style.width=m-k-i+"px"}else{e[0].style.width="0px"}this._setElementLeftPosition(n,l);this._setElementLeftPosition(o,l+k);this._setElementLeftPosition(e,2+l+k+d)}},_arrange:function(){if(this._initialLayout){this._initialLayout=false;return}var d=this.element;var g=this.areaUp;var r=this.areaDown;var c=this.btnUp;var k=this.btnDown;var s=this.btnThumb;var n=this.scrollWrap;var l=parseInt(this.element.style.height);var o=parseInt(this.element.style.width);if(this.isPercentage){var l=this.host.height();var o=this.host.width()}if(isNaN(l)){l=0}if(isNaN(o)){o=0}this._width=o;this._height=l;var b=(!this.vertical)?l:o;if(!this.showButtons){b=0}c[0].style.width=b+"px";c[0].style.height=b+"px";k[0].style.width=b+"px";k[0].style.height=b+"px";if(this.vertical){n[0].style.width=o+2+"px"}else{n[0].style.height=l+2+"px"}this._setElementPosition(c,0,0);var q=b+2;if(this.vertical){this._setElementPosition(k,0,l-q)}else{this._setElementPosition(k,o-q,0)}var e=(!this.vertical)?o:l;this.scrollBarSize=e;var h=this._getThumbSize(e-2*b);h=Math.round(h);if(h<this.thumbMinSize){h=this.thumbMinSize}var m=false;if(this.isTouchDevice&&this.touchModeStyle!=false){m=true}if(!this.vertical){s[0].style.width=h+"px";s[0].style.height=l+"px";if(m&&this.thumbTouchSize!==0){s.css({height:this.thumbTouchSize+"px"});s.css("margin-top",(this.host.height()-this.thumbTouchSize)/2)}}else{s[0].style.width=o+"px";s[0].style.height=h+"px";if(m&&this.thumbTouchSize!==0){s.css({width:this.thumbTouchSize+"px"});s.css("margin-left",(this.host.width()-this.thumbTouchSize)/2)}}if(l==NaN||l<10){l=10}if(o==NaN||o<10){o=10}b+=2;this.btnSize=b;var f=(this.vertical)?2*this.btnSize+(2+parseInt(s[0].style.height)):2*this.btnSize+(2+parseInt(s[0].style.width));f=Math.round(f);this._btnAndThumbSize=f;var u=(e-f)/(this.max-this.min)*(this.value-this.min);if(this.rtl&&!this.vertical){u=(e-f)/(this.max-this.min)*(this.max-this.value-this.min)}u=Math.round(u);if(u===-Infinity||u==Infinity){u=0}if(isNaN(u)){u=0}if(u<0){u=0}if(this.vertical){var t=(e-u-f);if(t<0){t=0}r[0].style.height=t+"px";r[0].style.width=o+"px";g[0].style.height=u+"px";g[0].style.width=o+"px";var i=parseInt(this.element.style.height);if(this.isPercentage){i=this.host.height()}s[0].style.visibility="inherit";if(i-3*parseInt(b)<0){s[0].style.visibility="hidden"}else{if(i<f){s[0].style.visibility="hidden"}else{if(this.element.style.visibility=="visible"){s[0].style.visibility="inherit"}}}this._setElementPosition(g,0,b);this._setElementPosition(s,0,b+u);this._setElementPosition(r,0,b+u+h)}else{if(u>0){g[0].style.width=u+"px"}if(l>0){g[0].style.height=l+"px"}var j=(e-u-f);if(j<0){j=0}r[0].style.width=j+"px";r[0].style.height=l+"px";var p=parseInt(this.element.style.width);if(this.isPercentage){p=this.host.width()}s[0].style.visibility="inherit";if(p-3*parseInt(b)<0){s[0].style.visibility="hidden"}else{if(p<f){s[0].style.visibility="hidden"}else{if(this.element.style.visibility=="visible"){s[0].style.visibility="inherit"}}}this._setElementPosition(g,b,0);this._setElementPosition(s,b+u,0);this._setElementPosition(r,2+b+u+h,0)}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxScrollBar","",{});a.extend(a.jqx._jqxScrollBar.prototype,{defineInstance:function(){var b={height:null,width:null,vertical:false,min:0,max:1000,value:0,step:10,largestep:50,thumbMinSize:10,thumbSize:0,thumbStep:"auto",roundedCorners:"all",showButtons:true,disabled:false,touchMode:"auto",touchModeStyle:"auto",thumbTouchSize:0,_triggervaluechanged:true,rtl:false,areaDownCapture:false,areaUpCapture:false,_initialLayout:false};a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this._mouseup=new Date();var c=this;var d="<div id='jqxScrollOuterWrap' style='box-sizing: content-box; width:100%; height: 100%; align:left; border: 0px; valign:top; position: relative;'><div id='jqxScrollWrap' style='box-sizing: content-box; width:100%; height: 100%; left: 0px; top: 0px; align:left; valign:top; position: absolute;'><div id='jqxScrollBtnUp' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'><div></div></div><div id='jqxScrollAreaUp' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollThumb' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollAreaDown' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='jqxScrollBtnDown' style='box-sizing: content-box; align:left; valign:top; left: 0px; top: 0px; position: absolute;'><div></div></div></div></div>";if(a.jqx.utilities&&a.jqx.utilities.scrollBarButtonsVisibility=="hidden"){this.showButtons=false}if(c.WinJS){MSApp.execUnsafeLocalFunction(function(){c.host.html(d)})}else{this.element.innerHTML=d}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.isPercentage=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width);this.isPercentage=true}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height);this.isPercentage=true}if(this.isPercentage){var e=this;a.jqx.utilities.resize(this.host,function(){e._arrange()},false)}this.thumbCapture=false;this.scrollOuterWrap=a(this.element.firstChild);this.scrollWrap=a(this.scrollOuterWrap[0].firstChild);this.btnUp=a(this.scrollWrap[0].firstChild);this.areaUp=a(this.btnUp[0].nextSibling);this.btnThumb=a(this.areaUp[0].nextSibling);this.arrowUp=a(this.btnUp[0].firstChild);this.areaDown=a(this.btnThumb[0].nextSibling);this.btnDown=a(this.areaDown[0].nextSibling);this.arrowDown=a(this.btnDown[0].firstChild);var b=this.element.id;this.btnUp[0].id="jqxScrollBtnUp"+b;this.btnDown[0].id="jqxScrollBtnDown"+b;this.btnThumb[0].id="jqxScrollThumb"+b;this.areaUp[0].id="jqxScrollAreaUp"+b;this.areaDown[0].id="jqxScrollAreaDown"+b;this.scrollWrap[0].id="jqxScrollWrap"+b;this.scrollOuterWrap[0].id="jqxScrollOuterWrap"+b;if(!this.host.jqxRepeatButton){throw new Error("jqxScrollBar: Missing reference to jqxbuttons.js.");return}this.btnUp.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDown.jqxRepeatButton({_ariaDisabled:true,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({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.areaDown.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.btnThumb.jqxButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.propertyChangeMap.value=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.setPosition(parseFloat(i),true)}}};this.propertyChangeMap.width=function(f,h,g,i){if(f.width!=undefined&&parseInt(f.width)>0){f.host.width(parseInt(f.width));f._arrange()}};this.propertyChangeMap.height=function(f,h,g,i){if(f.height!=undefined&&parseInt(f.height)>0){f.host.height(parseInt(f.height));f._arrange()}};this.propertyChangeMap.theme=function(f,h,g,i){f.setTheme()};this.propertyChangeMap.max=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.max=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.min=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.min=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.disabled=function(f,h,g,i){if(g!=i){if(i){f.host.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{f.host.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}f.btnUp.jqxRepeatButton("disabled",f.disabled);f.btnDown.jqxRepeatButton("disabled",f.disabled);f.btnThumb.jqxButton("disabled",f.disabled)}};this.propertyChangeMap.touchMode=function(f,h,g,i){if(g!=i){f._updateTouchBehavior();if(i===true){f.showButtons=false;f.refresh()}else{if(i===false){f.showButtons=true;f.refresh()}}}};this.propertyChangeMap.rtl=function(f,h,g,i){if(g!=i){f.refresh()}};this.buttonUpCapture=false;this.buttonDownCapture=false;this._updateTouchBehavior();this.setPosition(this.value);this._addHandlers();this.setTheme()},resize:function(c,b){this.width=c;this.height=b;this._arrange()},_updateTouchBehavior:function(){this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.setTheme();return}this.isTouchDevice=true;a.jqx.mobile.setMobileSimulator(this.btnThumb[0]);this._removeHandlers();this._addHandlers();this.setTheme()}else{if(this.touchMode==false){this.isTouchDevice=false}}},_addHandlers:function(){var j=this;var e=false;try{if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){e=true;this._touchSupport=true}}catch(f){}if(j.isTouchDevice||e){this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchend"),function(k){var l=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");var m=j.toThemeProperty("jqx-fill-state-pressed");j.btnThumb.removeClass(l);j.btnThumb.removeClass(m);if(!j.disabled){j.handlemouseup(j,k)}return false});this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchstart"),function(k){if(!j.disabled){if(j.touchMode==true){k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}else{var l=k;if(l.originalEvent.touches&&l.originalEvent.touches.length){k.clientX=l.originalEvent.touches[0].clientX;k.clientY=l.originalEvent.touches[0].clientY}else{k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}}j.handlemousedown(k);if(k.preventDefault){k.preventDefault()}}});a.jqx.mobile.touchScroll(this.element,j.max,function(q,p,l,k,m){if(j.host.css("visibility")=="visible"){if(j.touchMode==true){m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}else{var o=m;if(o.originalEvent.touches&&o.originalEvent.touches.length){m.clientX=o.originalEvent.touches[0].clientX;m.clientY=o.originalEvent.touches[0].clientY}else{m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}}var n=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");j.btnThumb.addClass(n);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.thumbCapture=true;j.handlemousemove(m)}},j.element.id)}if(!this.isTouchDevice){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var b=null;if(window.parent&&document.referrer){b=document.referrer}if(b&&b.indexOf(document.location.host)!=-1){var g=function(k){if(!j.disabled){j.handlemouseup(j,k)}};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}}catch(i){}var c="click mouseup mousedown";this.addHandler(this.btnDown,c,function(l){switch(l.type){case"click":var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}if(j.buttonDownCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value+k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value+k)}}break;case"mouseup":if(!j.btnDownInstance.base.disabled&&j.buttonDownCapture){j.buttonDownCapture=false;j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","down");j.handlemouseup(j,l);var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}j.setPosition(j.value+k);return false}break;case"mousedown":if(!j.btnDownInstance.base.disabled){j.buttonDownCapture=true;j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","down");return false}break}});this.addHandler(this.btnUp,c,function(l){switch(l.type){case"click":var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}if(j.buttonUpCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value-k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value-k)}}break;case"mouseup":if(!j.btnUpInstance.base.disabled&&j.buttonUpCapture){j.buttonUpCapture=false;j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","up");j.handlemouseup(j,l);var k=j.step;if(j.rtl&&!j.vertical){k=-j.step}j.setPosition(j.value-k);return false}break;case"mousedown":if(!j.btnUpInstance.base.disabled){j.buttonUpCapture=true;j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","up");return false}break}})}var h="click";if(this.isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.areaUp,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value-k);return false}});this.addHandler(this.areaDown,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value+k);return false}});this.addHandler(this.areaUp,"mousedown",function(k){if(!j.disabled){j.areaUpCapture=true;return false}});this.addHandler(this.areaDown,"mousedown",function(k){if(!j.disabled){j.areaDownCapture=true;return false}});this.addHandler(this.btnThumb,"mousedown dragstart",function(k){if(k.type==="dragstart"){return false}if(!j.disabled){j.handlemousedown(k)}if(k.preventDefault){k.preventDefault()}});this.addHandler(a(document),"mouseup."+this.element.id,function(k){if(!j.disabled){j.handlemouseup(j,k)}});if(!this.isTouchDevice){this.mousemoveFunc=function(k){if(!j.disabled){j.handlemousemove(k)}};this.addHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc);this.addHandler(a(document),"mouseleave."+this.element.id,function(k){if(!j.disabled){j.handlemouseleave(k)}});this.addHandler(a(document),"mouseenter."+this.element.id,function(k){if(!j.disabled){j.handlemouseenter(k)}});if(!j.disabled){this.addHandler(this.btnUp,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","up")}}else{if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","up")}}});var d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover");if(!j.vertical){d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover-horizontal")}this.addHandler(this.btnThumb,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&j.touchMode!=true){j.btnThumb.addClass(d);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-hover"))}}else{if(!j.disabled&&j.touchMode!=true){j.btnThumb.removeClass(d);j.btnThumb.removeClass(j.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.btnDown,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","down")}}else{if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","down")}}})}}},destroy:function(){var b=this.btnUp;var f=this.btnDown;var d=this.btnThumb;var c=this.scrollWrap;var h=this.areaUp;var e=this.areaDown;this.arrowUp.remove();delete this.arrowUp;this.arrowDown.remove();delete this.arrowDown;e.removeClass();h.removeClass();f.removeClass();b.removeClass();d.removeClass();b.jqxRepeatButton("destroy");f.jqxRepeatButton("destroy");h.jqxRepeatButton("destroy");e.jqxRepeatButton("destroy");d.jqxButton("destroy");var g=a.data(this.element,"jqxScrollBar");this._removeHandlers();this.btnUp=null;this.btnDown=null;this.scrollWrap=null;this.areaUp=null;this.areaDown=null;this.scrollOuterWrap=null;delete this.mousemoveFunc;delete this.btnDownInstance;delete this.btnUpInstance;delete this.scrollOuterWrap;delete this.scrollWrap;delete this.btnDown;delete this.areaDown;delete this.areaUp;delete this.btnDown;delete this.btnUp;delete this.btnThumb;delete this.propertyChangeMap.value;delete this.propertyChangeMap.min;delete this.propertyChangeMap.max;delete this.propertyChangeMap.touchMode;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;if(g){delete g.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_removeHandlers:function(){this.removeHandler(this.btnUp,"mouseenter");this.removeHandler(this.btnDown,"mouseenter");this.removeHandler(this.btnThumb,"mouseenter");this.removeHandler(this.btnUp,"mouseleave");this.removeHandler(this.btnDown,"mouseleave");this.removeHandler(this.btnThumb,"mouseleave");this.removeHandler(this.btnUp,"click");this.removeHandler(this.btnDown,"click");this.removeHandler(this.btnDown,"mouseup");this.removeHandler(this.btnUp,"mouseup");this.removeHandler(this.btnDown,"mousedown");this.removeHandler(this.btnUp,"mousedown");this.removeHandler(this.areaUp,"mousedown");this.removeHandler(this.areaDown,"mousedown");this.removeHandler(this.areaUp,"click");this.removeHandler(this.areaDown,"click");this.removeHandler(this.btnThumb,"mousedown");this.removeHandler(this.btnThumb,"dragstart");this.removeHandler(a(document),"mouseup."+this.element.id);if(!this.mousemoveFunc){this.removeHandler(a(document),"mousemove."+this.element.id)}else{this.removeHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc)}this.removeHandler(a(document),"mouseleave."+this.element.id);this.removeHandler(a(document),"mouseenter."+this.element.id);var b=this},_addArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},_removeArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},setTheme:function(){var o=this.btnUp;var m=this.btnDown;var p=this.btnThumb;var e=this.scrollWrap;var g=this.areaUp;var h=this.areaDown;var f=this.arrowUp;var i=this.arrowDown;this.scrollWrap[0].className=this.toThemeProperty("jqx-reset");this.scrollOuterWrap[0].className=this.toThemeProperty("jqx-reset");var k=this.toThemeProperty("jqx-reset");this.areaDown[0].className=k;this.areaUp[0].className=k;var d=this.toThemeProperty("jqx-scrollbar")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content");this.host.addClass(d);m[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");o[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");var q="";if(this.vertical){f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-up");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-down");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal")}else{f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-left");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-right");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal-horizontal")}q+=" "+this.toThemeProperty("jqx-fill-state-normal");p[0].className=q;if(this.disabled){e.addClass(this.toThemeProperty("jqx-fill-state-disabled"));e.removeClass(this.toThemeProperty("jqx-scrollbar-state-normal"))}else{e.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));e.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.roundedCorners=="all"){this.host.addClass(this.toThemeProperty("jqx-rc-all"));if(this.vertical){var j=a.jqx.cssroundedcorners("top");j=this.toThemeProperty(j);o.addClass(j);var c=a.jqx.cssroundedcorners("bottom");c=this.toThemeProperty(c);m.addClass(c)}else{var n=a.jqx.cssroundedcorners("left");n=this.toThemeProperty(n);o.addClass(n);var l=a.jqx.cssroundedcorners("right");l=this.toThemeProperty(l);m.addClass(l)}}else{var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);elBtnUp.addClass(b);elBtnDown.addClass(b)}var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);if(!p.hasClass(b)){p.addClass(b)}if(this.isTouchDevice&&this.touchModeStyle!=false){this.showButtons=false;p.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch"))}},isScrolling:function(){if(this.thumbCapture==undefined||this.buttonDownCapture==undefined||this.buttonUpCapture==undefined||this.areaDownCapture==undefined||this.areaUpCapture==undefined){return false}return this.thumbCapture||this.buttonDownCapture||this.buttonUpCapture||this.areaDownCapture||this.areaUpCapture},handlemousedown:function(c){if(this.thumbCapture==undefined||this.thumbCapture==false){this.thumbCapture=true;var b=this.btnThumb;if(b!=null){b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(this.vertical){b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}}}this.dragStartX=c.clientX;this.dragStartY=c.clientY;this.dragStartValue=this.value},toggleHover:function(c,b){},refresh:function(){this._arrange()},_setElementPosition:function(c,b,d){if(!isNaN(b)){if(parseInt(c[0].style.left)!=parseInt(b)){c[0].style.left=b+"px"}}if(!isNaN(d)){if(parseInt(c[0].style.top)!=parseInt(d)){c[0].style.top=d+"px"}}},_setElementTopPosition:function(b,c){if(!isNaN(c)){b[0].style.top=c+"px"}},_setElementLeftPosition:function(c,b){if(!isNaN(b)){c[0].style.left=b+"px"}},handlemouseleave:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonDownCapture||this.buttonUpCapture){b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));this._removeArrowClasses("pressed")}if(this.thumbCapture!=true){return}var c=this.btnThumb;var f=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");c.removeClass(f);c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemouseenter:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonUpCapture){b.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","up")}if(this.buttonDownCapture){d.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","down")}if(this.thumbCapture!=true){return}var c=this.btnThumb;if(this.vertical){c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}c.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemousemove:function(b){var i=this.btnUp;var e=this.btnDown;var d=0;if(e==null||i==null){return}if(i!=null&&e!=null&&this.buttonDownCapture!=undefined&&this.buttonUpCapture!=undefined){if(this.buttonDownCapture&&b.which==d){e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","down");this.buttonDownCapture=false}else{if(this.buttonUpCapture&&b.which==d){i.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));i.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","up");this.buttonUpCapture=false}}}if(this.thumbCapture!=true){return false}var k=this.btnThumb;if(b.which==d&&!this.isTouchDevice&&!this._touchSupport){this.thumbCapture=false;this._arrange();var j=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");k.removeClass(j);k.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));return true}if(b.preventDefault!=undefined){b.preventDefault()}if(b.originalEvent!=null){b.originalEvent.mouseHandled=true}if(b.stopPropagation!=undefined){b.stopPropagation()}var l=0;try{if(!this.vertical){l=b.clientX-this.dragStartX}else{l=b.clientY-this.dragStartY}var f=this._btnAndThumbSize;if(!this._btnAndThumbSize){f=(this.vertical)?i.height()+e.height()+k.height():i.width()+e.width()+k.width()}var g=(this.max-this.min)/(this.scrollBarSize-f);if(this.thumbStep=="auto"){l*=g}else{l*=g;if(Math.abs(this.dragStartValue+l-this.value)>=parseInt(this.thumbStep)){var c=Math.round(parseInt(l)/this.thumbStep)*this.thumbStep;if(this.rtl&&!this.vertical){this.setPosition(this.dragStartValue-c)}else{this.setPosition(this.dragStartValue+c)}return false}else{return false}}var c=l;if(this.rtl&&!this.vertical){c=-l}this.setPosition(this.dragStartValue+c)}catch(h){alert(h)}return false},handlemouseup:function(d,g){var c=false;if(this.thumbCapture){this.thumbCapture=false;var e=this.btnThumb;var h=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");e.removeClass(h);e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));c=true;this._mouseup=new Date()}this.areaDownCapture=this.areaUpCapture=false;if(this.buttonUpCapture||this.buttonDownCapture){var b=this.btnUp;var f=this.btnDown;this.buttonUpCapture=false;this.buttonDownCapture=false;b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));f.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));f.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed");c=true;this._mouseup=new Date()}if(c){if(g.preventDefault!=undefined){g.preventDefault()}if(g.originalEvent!=null){g.originalEvent.mouseHandled=true}if(g.stopPropagation!=undefined){g.stopPropagation()}}},setPosition:function(b,g){var d=this.element;if(b==undefined||b==NaN){b=this.min}if(b>=this.max){b=this.max}if(b<this.min){b=this.min}if(this.value!==b||g==true){if(b==this.max){var c=new a.Event("complete");this.host.trigger(c)}var f=this.value;if(this._triggervaluechanged){var e=new a.Event("valueChanged");e.previousValue=this.value;e.currentValue=b}this.value=b;this._positionelements();if(this._triggervaluechanged){this.host.trigger(e)}if(this.valueChanged){this.valueChanged({currentValue:this.value,previousvalue:f})}}return b},val:function(b){var c=function(e){for(var d in e){if(e.hasOwnProperty(d)){return false}}if(typeof b=="number"){return false}if(typeof b=="date"){return false}if(typeof b=="boolean"){return false}if(typeof b=="string"){return false}return true};if(c(b)||arguments.length==0){return this.value}else{this.setPosition(b);return b}},_getThumbSize:function(b){var d=this.max-this.min;var c=0;if(d>1){c=(b/(d+b)*b)}else{if(d==1){c=b}}if(this.thumbSize>0){c=this.thumbSize}if(c<this.thumbMinSize){c=this.thumbMinSize}return Math.min(c,b)},_positionelements:function(){var g=this.element;var n=this.areaUp;var e=this.areaDown;var h=this.btnUp;var f=this.btnDown;var o=this.btnThumb;var b=this.scrollWrap;var p=this._height?this._height:this.host.height();var c=this._width?this._width:this.host.width();var l=(!this.vertical)?p:c;if(!this.showButtons){l=0}var m=(!this.vertical)?c:p;this.scrollBarSize=m;var d=this._getThumbSize(m-2*l);d=Math.round(d);if(d<this.thumbMinSize){d=this.thumbMinSize}if(p==NaN||p<10){p=10}if(c==NaN||c<10){c=10}l+=2;this.btnSize=l;var i=this._btnAndThumbSize;if(!this._btnAndThumbSize){var i=(this.vertical)?2*this.btnSize+o.outerHeight():2*this.btnSize+o.outerWidth();i=Math.round(i)}var k=(m-i)/(this.max-this.min)*(this.value-this.min);if(this.rtl&&!this.vertical){k=(m-i)/(this.max-this.min)*(this.max-this.value-this.min)}k=Math.round(k);if(k<0){k=0}if(this.vertical){var j=m-k-i;if(j<0){j=0}e[0].style.height=j+"px";n[0].style.height=k+"px";this._setElementTopPosition(n,l);this._setElementTopPosition(o,l+k);this._setElementTopPosition(e,l+k+d)}else{n[0].style.width=k+"px";if(m-k-i>=0){e[0].style.width=m-k-i+"px"}else{e[0].style.width="0px"}this._setElementLeftPosition(n,l);this._setElementLeftPosition(o,l+k);this._setElementLeftPosition(e,2+l+k+d)}},_arrange:function(){if(this._initialLayout){this._initialLayout=false;return}var d=this.element;var g=this.areaUp;var r=this.areaDown;var c=this.btnUp;var k=this.btnDown;var s=this.btnThumb;var n=this.scrollWrap;var l=parseInt(this.element.style.height);var o=parseInt(this.element.style.width);if(this.isPercentage){var l=this.host.height();var o=this.host.width()}if(isNaN(l)){l=0}if(isNaN(o)){o=0}this._width=o;this._height=l;var b=(!this.vertical)?l:o;if(!this.showButtons){b=0}c[0].style.width=b+"px";c[0].style.height=b+"px";k[0].style.width=b+"px";k[0].style.height=b+"px";if(this.vertical){n[0].style.width=o+2+"px"}else{n[0].style.height=l+2+"px"}this._setElementPosition(c,0,0);var q=b+2;if(this.vertical){this._setElementPosition(k,0,l-q)}else{this._setElementPosition(k,o-q,0)}var e=(!this.vertical)?o:l;this.scrollBarSize=e;var h=this._getThumbSize(e-2*b);h=Math.round(h);if(h<this.thumbMinSize){h=this.thumbMinSize}var m=false;if(this.isTouchDevice&&this.touchModeStyle!=false){m=true}if(!this.vertical){s[0].style.width=h+"px";s[0].style.height=l+"px";if(m&&this.thumbTouchSize!==0){s.css({height:this.thumbTouchSize+"px"});s.css("margin-top",(this.host.height()-this.thumbTouchSize)/2)}}else{s[0].style.width=o+"px";s[0].style.height=h+"px";if(m&&this.thumbTouchSize!==0){s.css({width:this.thumbTouchSize+"px"});s.css("margin-left",(this.host.width()-this.thumbTouchSize)/2)}}if(l==NaN||l<10){l=10}if(o==NaN||o<10){o=10}b+=2;this.btnSize=b;var f=(this.vertical)?2*this.btnSize+(2+parseInt(s[0].style.height)):2*this.btnSize+(2+parseInt(s[0].style.width));f=Math.round(f);this._btnAndThumbSize=f;var u=(e-f)/(this.max-this.min)*(this.value-this.min);if(this.rtl&&!this.vertical){u=(e-f)/(this.max-this.min)*(this.max-this.value-this.min)}u=Math.round(u);if(u===-Infinity||u==Infinity){u=0}if(isNaN(u)){u=0}if(u<0){u=0}if(this.vertical){var t=(e-u-f);if(t<0){t=0}r[0].style.height=t+"px";r[0].style.width=o+"px";g[0].style.height=u+"px";g[0].style.width=o+"px";var i=parseInt(this.element.style.height);if(this.isPercentage){i=this.host.height()}s[0].style.visibility="inherit";if(i-3*parseInt(b)<0){s[0].style.visibility="hidden"}else{if(i<f){s[0].style.visibility="hidden"}else{if(this.element.style.visibility=="visible"){s[0].style.visibility="inherit"}}}this._setElementPosition(g,0,b);this._setElementPosition(s,0,b+u);this._setElementPosition(r,0,b+u+h)}else{if(u>0){g[0].style.width=u+"px"}if(l>0){g[0].style.height=l+"px"}var j=(e-u-f);if(j<0){j=0}r[0].style.width=j+"px";r[0].style.height=l+"px";var p=parseInt(this.element.style.width);if(this.isPercentage){p=this.host.width()}s[0].style.visibility="inherit";if(p-3*parseInt(b)<0){s[0].style.visibility="hidden"}else{if(p<f){s[0].style.visibility="hidden"}else{if(this.element.style.visibility=="visible"){s[0].style.visibility="inherit"}}}this._setElementPosition(g,b,0);this._setElementPosition(s,b+u,0);this._setElementPosition(r,2+b+u+h,0)}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxSlider","",{});a.extend(a.jqx._jqxSlider.prototype,{defineInstance:function(){var b={disabled:false,width:300,height:30,step:1,max:10,min:0,orientation:"horizontal",showTicks:true,ticksPosition:"both",ticksFrequency:2,showButtons:true,buttonsPosition:"both",mode:"default",showRange:true,rangeSlider:false,value:0,values:[0,10],tooltip:false,tooltipFormatFunction:null,tooltipPosition:"near",tooltipHideDelay:500,sliderButtonSize:14,tickSize:7,showTickLabels:false,tickLabelFormatFunction:null,layout:"normal",rtl:false,_settings:{vertical:{size:"height",oSize:"width",outerOSize:"outerWidth",outerSize:"outerHeight",left:"top",top:"left",start:"_startY",mouse:"_mouseStartY",page:"pageY",opposite:"horizontal"},horizontal:{size:"width",oSize:"height",outerOSize:"outerHeight",outerSize:"outerWidth",left:"left",top:"top",start:"_startX",mouse:"_mouseStartX",page:"pageX",opposite:"vertical"}},_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_events:["change","slide","slideEnd","slideStart","created"],_invalidArgumentExceptions:{invalidWidth:"Invalid width.",invalidHeight:"Invalid height.",invalidStep:"Invalid step.",invalidMaxValue:"Invalid maximum value.",invalidMinValue:"Invalid minimum value.",invalidTickFrequency:"Invalid tick frequency.",invalidValue:"Invalid value.",invalidValues:"Invalid values.",invalidTicksPosition:"Invalid ticksPosition",invalidButtonsPosition:"Invalid buttonsPosition"},_lastValue:[],_track:null,_leftButton:null,_rightButton:null,_slider:null,_rangeBar:null,_slideEvent:null,_capturedElement:null,_slideStarted:false,aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}}};a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this.element.innerHTML="";this.host.attr("role","slider");this.host.addClass(this.toThemeProperty("jqx-slider"));this.host.addClass(this.toThemeProperty("jqx-widget"));a.jqx.aria(this);this._isTouchDevice=a.jqx.mobile.isTouchDevice();this.host.width(this.width);this.host.height(this.height);this._refresh();this._raiseEvent(4,{value:this.getValue()});this._addInput();var c=this;var b=c.host.attr("tabindex")==null;if(b){c.host.attr("tabindex",0)}a.jqx.utilities.resize(this.host,function(){c.__trackSize=null;c.__thumbSize=null;c.host.width(c.width);c.host.height(c.height);c._performLayout();c._initialSettings()})},resize:function(c,b){this.width=c;this.height=b;this.refresh();this.host.width(me.width);this.host.height(me.height);this._performLayout();this._initialSettings()},focus:function(){try{this.host.focus()}catch(b){}},destroy:function(){this.host.remove()},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}if(!this.rangeSlider){this.input.val(this.value.toString())}else{if(this.values){this.input.val(this.value.rangeStart.toString()+"-"+this.value.rangeEnd.toString())}}},_getSetting:function(b){return this._settings[this.orientation][b]},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},refresh:function(b){if(!b){this._refresh()}},_refresh:function(){this._render();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initialSettings()},_render:function(){this._addTrack();this._addSliders();this._addTickContainers();this._addContentWrapper();this._addButtons();this._addRangeBar()},_addTrack:function(){if(this._track===null||this._track.length<1){this._track=a('<div class="'+this.toThemeProperty("jqx-slider-track")+'"></div>');this.host.append(this._track)}this._track.attr("style","");this._track.removeClass(this.toThemeProperty("jqx-slider-track-"+this._getSetting("opposite")));this._track.addClass(this.toThemeProperty("jqx-slider-track-"+this.orientation));this._track.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._track.addClass(this.toThemeProperty("jqx-rc-all"))},_addSliders:function(){if(this._slider===null||this._slider.length<1){this._slider={};this._slider.left=a('<div class="'+this.toThemeProperty("jqx-slider-slider")+'"></div>');this._track.append(this._slider.left);this._slider.right=a('<div class="'+this.toThemeProperty("jqx-slider-slider")+'"></div>');this._track.append(this._slider.right)}this._slider.left.removeClass(this.toThemeProperty("jqx-slider-slider-"+this._getSetting("opposite")));this._slider.left.addClass(this.toThemeProperty("jqx-slider-slider-"+this.orientation));this._slider.right.removeClass(this.toThemeProperty("jqx-slider-slider-"+this._getSetting("opposite")));this._slider.right.addClass(this.toThemeProperty("jqx-slider-slider-"+this.orientation));this._slider.right.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._slider.left.addClass(this.toThemeProperty("jqx-fill-state-normal"))},_addTickContainers:function(){if(this._bottomTicks!==null||this._bottomTicks.length<1||this._topTicks!==null||this._topTicks.length<1){this._addTickContainers()}var b="visible";if(!this.showTicks){b="hidden"}this._bottomTicks.css("visibility",b);this._topTicks.css("visibility",b)},_addTickContainers:function(){if(typeof this._bottomTicks==="undefined"||this._bottomTicks.length<1){this._bottomTicks=a('<div class="'+this.toThemeProperty("jqx-slider-tickscontainer")+'" style=""></div>');this.host.prepend(this._bottomTicks)}if(typeof this._topTicks==="undefined"||this._topTicks.length<1){this._topTicks=a('<div class="'+this.toThemeProperty("jqx-slider-tickscontainer")+'" style=""></div>');this.host.append(this._topTicks)}},_addButtons:function(){if(this._leftButton===null||this._leftButton.length<1||this._rightButton===null||this._rightButton.length<1){this._createButtons()}var b="block";if(!this.showButtons||this.rangeSlider){b="none"}this._rightButton.css("display",b);this._leftButton.css("display",b)},_createButtons:function(){this._leftButton=a('<div class="jqx-slider-left"><div style="width: 100%; height: 100%;"></div></div>');this._rightButton=a('<div class="jqx-slider-right"><div style="width: 100%; height: 100%;"></div></div>');this.host.prepend(this._rightButton);this.host.prepend(this._leftButton);if(!this.host.jqxRepeatButton){throw new Error("jqxSlider: Missing reference to jqxbuttons.js.")}this._leftButton.jqxRepeatButton({theme:this.theme,delay:50,width:this.sliderButtonSize,height:this.sliderButtonSize});this._rightButton.jqxRepeatButton({theme:this.theme,delay:50,width:this.sliderButtonSize,height:this.sliderButtonSize})},_addContentWrapper:function(){if(this._contentWrapper===undefined||this._contentWrapper.length===0){this.host.wrapInner("<div></div>");this._contentWrapper=this.host.children(0)}if(this.orientation==="horizontal"){this._contentWrapper.css("float","left")}else{this._contentWrapper.css("float","none")}},_addTicks:function(c){if(!this.showTicks){return}var k=this.max-this.min,d=c[this._getSetting("size")](),f=Math.round(k/this.ticksFrequency),b=d/f;c.empty();var m="";var e=this.tickLabelFormatFunction?this.tickLabelFormatFunction(this.min):this.min;var n=a("<span style='visibility: hidden;'></span>");n.addClass(this.toThemeProperty("jqx-widget jqx-widget-content jqx-slider"));n.appendTo(document.body);n.html("0");var j={width:n.width(),height:n.height()};n.detach();var o=c[this._getSetting("oSize")]();m+=this._addTick(c,0,this.min,o,e,j);for(var h=1;h<f;h++){var g=h*b;g=Math.floor(g);var l=this.min+this.ticksFrequency*h;var e=this.tickLabelFormatFunction?this.tickLabelFormatFunction(l):l;m+=this._addTick(c,g,h,o,e,j)}var e=this.tickLabelFormatFunction?this.tickLabelFormatFunction(this.max):this.max;m+=this._addTick(c,f*b,this.max,o,e,j);c.append(a(m))},_addTick:function(b,g,m,n,c,i){var o="";o=this.toThemeProperty("jqx-slider-tick");o+=" "+this.toThemeProperty("jqx-fill-state-pressed");var e;var k=this._getSetting("top");var d="2px";if(b[0]!==this._topTicks[0]){d=n-this.tickSize-2+"px"}if(this.orientation==="horizontal"){e='<div style="'+k+": "+d+"; "+this._getSetting("oSize")+": "+this.tickSize+"px; float: left; position:absolute; left:"+g+'px;" class="'+this.toThemeProperty("jqx-slider-tick-horizontal")+" "+o+'"></div>';if(this.showTickLabels){if(b[0]!==this._topTicks[0]){d=n-this.tickSize-i.height-2+"px"}else{d=2+this.tickSize+"px"}var l=i.width*c.toString().length;l=l/2;var j=g-l;e+='<div style="'+k+": "+d+"; float: left; position:absolute; left:"+j+'px;">'+c+"</div>"}}else{e='<div style="'+k+": "+d+"; "+this._getSetting("oSize")+": "+this.tickSize+"px; float: none; position:absolute; top:"+g+'px;" class="'+this.toThemeProperty("jqx-slider-tick-vertical")+" "+o+'"></div>';if(this.showTickLabels){if(b[0]!==this._topTicks[0]){d=n-this.tickSize-c.toString().length*i.width-6+"px"}else{d=6+this.tickSize+"px"}var f=i.height;f=f/2;var j=g-f;e+='<div style="'+k+": "+d+"; float: none; position:absolute; top:"+j+'px;">'+c+"</div>"}}return e},_addRangeBar:function(){if(this._rangeBar===null||this._rangeBar.length<1){this._rangeBar=a('<div class="'+this.toThemeProperty("jqx-slider-rangebar")+'"></div>');this._rangeBar.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._rangeBar.addClass(this.toThemeProperty("jqx-rc-all"));this._track.append(this._rangeBar)}if(!this.showRange){this._rangeBar.css("display","none")}else{this._rangeBar.css("display","block")}this._thumbSize=this._slider.left.outerWidth()},_getLeftDisplacement:function(){if(!this.showButtons){return 0}if(this.rangeSlider){return 0}switch(this.buttonsPosition){case"left":return this._leftButton[this._getSetting("outerSize")](true)+this._rightButton[this._getSetting("outerSize")](true);case"right":return 0;default:return this._leftButton[this._getSetting("outerSize")](true)}return 0},_performLayout:function(){this.host.width(this.width);this.host.height(this.height);var b=this.host.height();if(this._getSetting("size")=="width"){b=this.host.width()}this._performButtonsLayout();this._performTrackLayout(b-1);this._contentWrapper[this._getSetting("size")](this._track[this._getSetting("size")]());this._contentWrapper[this._getSetting("oSize")](this[this._getSetting("oSize")]);this._performTicksLayout();this._performRangeBarLayout();if(this.rangeSlider){this._slider.left.css("visibility","visible")}else{this._slider.left.css("visibility","hidden")}this._refreshRangeBar();if(this.orientation=="vertical"){if(this.showButtons){var c=parseInt((this._leftButton.width()-this._track.width())/2);this._track.css("margin-left",-3+c+"px")}}},_performTrackLayout:function(b){this._track[this._getSetting("size")](b-((this.showButtons&&!this.rangeSlider)?this._leftButton[this._getSetting("outerSize")](true)+this._rightButton[this._getSetting("outerSize")](true):0));this._slider.left.css("left",0);this._slider.left.css("top",0);this._slider.right.css("left",0);this._slider.right.css("top",0)},_performTicksLayout:function(){this._performTicksContainerLayout();this._addTicks(this._topTicks);this._addTicks(this._bottomTicks);this._topTicks.css("visibility","hidden");this._bottomTicks.css("visibility","hidden");if((this.ticksPosition==="top"||this.ticksPosition==="both")&&this.showTicks){this._bottomTicks.css("visibility","visible")}if((this.ticksPosition==="bottom"||this.ticksPosition==="both")&&this.showTicks){this._topTicks.css("visibility","visible")}},_performTicksContainerLayout:function(){var f=this._getSetting("size");var e=this._getSetting("oSize");var b=this._getSetting("outerOSize");this._topTicks[f](this._track[f]());this._bottomTicks[f](this._track[f]());var d=-2+(parseInt(this[e])-this._track[b](true))/2;this._topTicks[e](parseInt(d));var c=-2+(parseInt(this[e])-this._track[b](true))/2;this._bottomTicks[e](parseInt(c));if(this.orientation==="vertical"){this._topTicks.css("float","left");this._track.css("float","left");this._bottomTicks.css("float","left")}else{this._topTicks.css("float","none");this._track.css("float","none");this._bottomTicks.css("float","none")}},_performButtonsLayout:function(){this._addButtonsStyles();this._addButtonsClasses();this._addButtonsHover();this._orderButtons();this._centerElement(this._rightButton);this._centerElement(this._leftButton);this._layoutButtons()},_addButtonsStyles:function(){this._leftButton.css("background-position","center");this._rightButton.css("background-position","center");if(this.orientation==="vertical"){this._leftButton.css("float","none");this._rightButton.css("float","none")}else{this._leftButton.css("float","left");this._rightButton.css("float","left")}},_addButtonsClasses:function(){var b={prev:"left",next:"right"};if(this.orientation==="vertical"){b={prev:"up",next:"down"}}this._leftButton.addClass(this.toThemeProperty("jqx-rc-all"));this._rightButton.addClass(this.toThemeProperty("jqx-rc-all"));this._leftButton.addClass(this.toThemeProperty("jqx-slider-button"));this._rightButton.addClass(this.toThemeProperty("jqx-slider-button"));this._leftArrow=this._leftButton.find("div");this._rightArrow=this._rightButton.find("div");this._leftArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));this._rightArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));this._leftArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-up"));this._rightArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down"));this._leftArrow.addClass(this.toThemeProperty("jqx-icon-arrow-"+b.prev));this._rightArrow.addClass(this.toThemeProperty("jqx-icon-arrow-"+b.next))},_addButtonsHover:function(){var c=this,b={prev:"left",next:"right"};if(this.orientation==="vertical"){b={prev:"up",next:"down"}}this.addHandler(a(document),"mouseup.arrow"+this.element.id,function(){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"));c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"));if(c.sliderTooltip){if(c.sliderTooltipTimer){clearTimeout(c.sliderTooltipTimer)}c.sliderTooltipTimer=setTimeout(function(){c.sliderTooltip.fadeOut("fast");c._mouseDown=false},c.tooltipHideDelay)}else{c._mouseDown=false}});this.addHandler(this._leftButton,"mousedown",function(){if(!c.disabled){c._leftArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"));c._mouseDown=true}});this.addHandler(this._leftButton,"mouseup",function(){if(!c.disabled){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"))}});this.addHandler(this._rightButton,"mousedown",function(){if(!c.disabled){c._rightArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"));c._mouseDown=true}});this.addHandler(this._rightButton,"mouseup",function(){if(!c.disabled){c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"))}});this._leftButton.hover(function(){if(!c.disabled){c._leftArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-hover"))}},function(){if(!c.disabled){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-hover"))}});this._rightButton.hover(function(){if(!c.disabled){c._rightArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-hover"))}},function(){if(!c.disabled){c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-hover"))}})},_layoutButtons:function(){if(this.orientation==="horizontal"){this._horizontalButtonsLayout()}else{this._verticalButtonsLayout()}},_horizontalButtonsLayout:function(){var b=(2+Math.ceil(this.sliderButtonSize/2));if(this.buttonsPosition=="left"){this._leftButton.css("margin-right","0px");this._rightButton.css("margin-right",b)}else{if(this.buttonsPosition=="right"){this._leftButton.css("margin-left",2+b);this._rightButton.css("margin-right","0px")}else{this._leftButton.css("margin-right",b);this._rightButton.css("margin-left",2+b)}}},_verticalButtonsLayout:function(){var c=(2+Math.ceil(this.sliderButtonSize/2));if(this.buttonsPosition=="left"){this._leftButton.css("margin-bottom","0px");this._rightButton.css("margin-bottom",c)}else{if(this.buttonsPosition=="right"){this._leftButton.css("margin-top",2+c);this._rightButton.css("margin-bottom","0px")}else{this._leftButton.css("margin-bottom",c);this._rightButton.css("margin-top",2+c)}}var b=this._leftButton.css("margin-left");this._leftButton.css("margin-left",parseInt(b)-1);this._rightButton.css("margin-left",parseInt(b)-1)},_orderButtons:function(){this._rightButton.detach();this._leftButton.detach();switch(this.buttonsPosition){case"left":this.host.prepend(this._rightButton);this.host.prepend(this._leftButton);break;case"right":this.host.append(this._leftButton);this.host.append(this._rightButton);break;case"both":this.host.prepend(this._leftButton);this.host.append(this._rightButton);break}},_performRangeBarLayout:function(){this._rangeBar[this._getSetting("oSize")](this._track[this._getSetting("oSize")]());this._rangeBar[this._getSetting("size")](this._track[this._getSetting("size")]());this._rangeBar.css("position","absolute");this._rangeBar.css("left",0);this._rangeBar.css("top",0)},_centerElement:function(c){var b=-1+(a(c.parent())[this._getSetting("oSize")]()-c[this._getSetting("outerOSize")]())/2;c.css("margin-"+[this._getSetting("left")],0);c.css("margin-"+[this._getSetting("top")],b);return c},_raiseEvent:function(f,c){var d=this._events[f];var e=new a.Event(d);if(this._triggerEvents===false){return true}e.args=c;if(f===1){e.args.cancel=false;this._slideEvent=e}this._lastValue[f]=c.value;e.owner=this;var b=this.host.trigger(e);return b},_initialSettings:function(){if(this.rangeSlider){if(typeof this.value!=="number"){this.setValue(this.value)}else{this.setValue(this.values)}}else{if(this.value==undefined){this.value=0}this.setValue(this.value)}if(this.disabled){this.disable()}},_addEventHandlers:function(){var b=this;this.addHandler(this._slider.right,this._getEvent("mousedown"),this._startDrag,{self:this});this.addHandler(this._slider.left,this._getEvent("mousedown"),this._startDrag,{self:this});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.element.id,function(){b._stopDrag()});try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var d=function(g){b._stopDrag()};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!=-1){if(window.top.document){if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",d,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",d)}}}}}}}catch(c){}this.addHandler(a(document),this._getEvent("mousemove")+"."+this.element.id,this._performDrag,{self:this});var e=this;this.addHandler(this._slider.left,"mouseenter",function(){if(!e.disabled){b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.right,"mouseenter",function(){if(!e.disabled){b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.left,"mouseleave",function(){if(!e.disabled){b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.right,"mouseleave",function(){if(!e.disabled){b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.left,"mousedown",function(){if(!e.disabled){b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.right,"mousedown",function(){if(!e.disabled){b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.left,"mouseup",function(){if(!e.disabled){b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.right,"mouseup",function(){if(!e.disabled){b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._leftButton,this._getEvent("click"),this._leftButtonHandler,{self:this});this.addHandler(this._rightButton,this._getEvent("click"),this._rightButtonHandler,{self:this});this.addHandler(this._track,this._getEvent("mousedown"),this._trackMouseDownHandler,{self:this});this.addHandler(this.host,"focus",function(){b._track.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._leftButton.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._rightButton.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this.host,"blur",function(){b._leftButton.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._rightButton.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._track.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});this.element.onselectstart=function(){return false};this._addMouseWheelListeners();this._addKeyboardListeners()},_addMouseWheelListeners:function(){var b=this;this.addHandler(this.host,"mousewheel",function(d){if(b.disabled){return true}if(document.activeElement&&!a(document.activeElement).ischildof(b.host)){return true}var c=d.wheelDelta;if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(!("wheelDelta" in d)){c=d.detail*-40}if(c>0){b.incrementValue()}else{b.decrementValue()}d.preventDefault()})},_addKeyboardListeners:function(){var b=this;this.addHandler(this.host,"keydown",function(c){switch(c.keyCode){case 40:case 37:if(b.layout=="normal"&&!b.rtl){b.decrementValue()}else{b.incrementValue()}return false;case 38:case 39:if(b.layout=="normal"&&!b.rtl){b.incrementValue()}else{b.decrementValue()}return false;case 36:if(b.rangeSlider){b.setValue([b.values[0],b.max])}else{b.setValue(b.min)}return false;case 35:if(b.rangeSlider){b.setValue([b.min,b.values[1]])}else{b.setValue(b.max)}return false}})},_trackMouseDownHandler:function(b){var e=a.jqx.mobile.getTouches(b);var d=e[0];var i=b.data.self,b=(i._isTouchDevice)?d:b,f=i._track.coord()[i._getSetting("left")],h=b[i._getSetting("page")]-i._slider.left[i._getSetting("size")]()/2,c=i._getClosest(h),j=parseInt(i._track[i._getSetting("size")]());var g=i._getValueByPosition(h);i._mouseDown=true;i._setValue(g,c);if(i.input){a.jqx.aria(i,"aria-valuenow",i.input.val())}},_getClosest:function(b){if(!this.rangeSlider){return this._slider.right}else{b=b-this._track.coord()[this._getSetting("left")]-this._slider.left[this._getSetting("size")]()/2;if(Math.abs(parseInt(this._slider.left.css(this._getSetting("left")),10)-b)<Math.abs(parseInt(this._slider.right.css(this._getSetting("left")),10)-b)){return this._slider.left}else{return this._slider.right}}},_removeEventHandlers:function(){this.removeHandler(this._slider.right,this._getEvent("mousedown"),this._startDrag);this.removeHandler(this._slider.left,this._getEvent("mousedown"),this._startDrag);this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),this._stopDrag);this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),this._performDrag);this.removeHandler(this._leftButton,this._getEvent("click"),this._leftButtonHandler);this.removeHandler(this._rightButton,this._getEvent("click"),this._rightButtonHandler);this.removeHandler(this._track,this._getEvent("mousedown"),this._trackMouseDownHandler);this.element.onselectstart=null;this.removeHandler(this.host,this._getEvent("mousewheel"));this.removeHandler(this.host,this._getEvent("keydown"))},_rightButtonClick:function(){if(this.orientation=="horizontal"&&!this.rtl){this.incrementValue()}else{this.decrementValue()}},_leftButtonClick:function(){if(this.orientation=="horizontal"&&!this.rtl){this.decrementValue()}else{this.incrementValue()}},_rightButtonHandler:function(c){var b=c.data.self;if(b.layout=="normal"){b._rightButtonClick()}else{b._leftButtonClick()}return false},_leftButtonHandler:function(c){var b=c.data.self;if(b.layout=="normal"){b._leftButtonClick()}else{b._rightButtonClick()}return false},_startDrag:function(d){var e=a.jqx.mobile.getTouches(d);var f=e[0];var c=d.data.self;c._capturedElement=a(d.target);c._startX=a(d.target).coord().left;c._startY=a(d.target).coord().top;var b=a.jqx.position(d);c._mouseStartX=b.left;c._mouseStartY=b.top;c._mouseDown=true;if(c.tooltip){c._showTooltip(c._capturedElement,c.value)}if(c._isTouchDevice){return false}},_stopDrag:function(){var b=this;if(b._slideStarted){b._raiseEvent(2,{value:b.getValue()})}if(!b._slideStarted||b._capturedElement==null){b._capturedElement=null;return}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._slideStarted=false;b._capturedElement=null;if(b.sliderTooltip){b.sliderTooltip.fadeOut("fast")}},_performDrag:function(d){var c=d.data.self;if(c._capturedElement!==null){var f=a.jqx.mobile.getTouches(d);var g=f[0];if(d.which===0&&a.jqx.browser.msie&&a.jqx.browser.version<9){c._stopDrag();return false}var b=a.jqx.position(d);var e=c.orientation=="horizontal"?b.left:b.top;c._isDragged(e);if(c._slideStarted||c._isTouchDevice){return c._dragHandler(e)}}},_isDragged:function(b){if(Math.abs(b-this[this._getSetting("mouse")])>2&&!this._slideStarted){this._slideStarted=true;if(this._valueChanged(3)){this._raiseEvent(3,{value:this.getValue()})}}else{if(this._capturedElement===null){this._slideStarted=false}}},_dragHandler:function(b){b=(b-this[this._getSetting("mouse")])+this[this._getSetting("start")];var c=this._getValueByPosition(b);if(this.rangeSlider){var d=this._slider.right,f=this._slider.left;var e=this._getSetting("left");if(this._capturedElement[0]===f[0]){if(parseFloat(b)>d.coord()[e]){b=d.coord()[e]}}else{if(parseFloat(b)<f.coord()[e]){b=f.coord()[e]}}}this._setValue(c,this._capturedElement,b);return false},_getValueByPosition:function(b){if(this.mode==="default"){return this._getFloatingValueByPosition(b)}else{return this._getFixedValueByPosition(b)}},_getFloatingValueByPosition:function(b){var c=b-this._track.coord()[this._getSetting("left")]+this._slider.left.width()/2,d=c/this._track[this._getSetting("size")](),e=(this.max-this.min)*d+this.min;if(this.layout=="normal"){if(this.orientation==="horizontal"&&!this.rtl){return e}else{return(this.max+this.min)-e}}else{if(this.orientation==="horizontal"&&!this.rtl){return(this.max+this.min)-e}else{return e}}},_getThumbSize:function(){if(this.__thumbSize){return this.__thumbSize}var b=this._slider.left[this._getSetting("size")]();this.__thumbSize=b;return b},_getTrackSize:function(){if(this.__trackSize){return this.__trackSize}var b=this._track[this._getSetting("size")]();this.__trackSize=b;return b},_getFixedValueByPosition:function(e){var h=this._getTrackSize();var c=this._getThumbSize();var b=this.step,f=(this.max-this.min)/b,g=(h)/f,i=this._track.coord()[this._getSetting("left")]-c/2,j={number:-1,distance:Number.MAX_VALUE};for(var d=this.min;d<=this.max+this.step;d+=this.step){if(Math.abs(j.distance-e)>Math.abs(i-e)){j.distance=i;j.number=d}i+=g}if(this.layout=="normal"){if(this.orientation==="horizontal"&&!this.rtl){return j.number}else{return(this.max+this.min)-j.number}}else{if(this.orientation==="horizontal"&&!this.rtl){return(this.max+this.min)-j.number}else{return j.number}}},_setValue:function(e,d,b){if(!this._slideEvent||!this._slideEvent.args.cancel){e=this._handleValue(e,d);this._setSliderPosition(e,d,b);this._fixZIndexes();if(this._valueChanged(1)){var c=this._raiseEvent(1,{value:this.getValue()})}if(this._valueChanged(0)){this._raiseEvent(0,{value:this.getValue()})}if(this.input){if(!this.rangeSlider){this.input.val(this.value.toString())}else{if(this.values){if(this.value.rangeEnd!=undefined&&this.value.rangeStart!=undefined){this.input.val(this.value.rangeStart.toString()+"-"+this.value.rangeEnd.toString())}}}}}},_valueChanged:function(c){var b=this.getValue();return(!this.rangeSlider&&this._lastValue[c]!==b)||(this.rangeSlider&&(typeof this._lastValue[c]!=="object"||parseFloat(this._lastValue[c].rangeEnd)!==parseFloat(b.rangeEnd)||parseFloat(this._lastValue[c].rangeStart)!==parseFloat(b.rangeStart)))},_handleValue:function(c,b){c=this._validateValue(c,b);if(b[0]===this._slider.left[0]){this.values[0]=c}if(b[0]===this._slider.right[0]){this.values[1]=c}if(this.rangeSlider){this.value={rangeStart:this.values[0],rangeEnd:this.values[1]}}else{this.value=c}return c},_fixZIndexes:function(){if(this.values[1]-this.values[0]<0.5&&this.max-this.values[0]<0.5){this._slider.left.css("z-index",20);this._slider.right.css("z-index",15)}else{this._slider.left.css("z-index",15);this._slider.right.css("z-index",20)}},_refreshRangeBar:function(){var e=this._getSetting("left");var c=this._getSetting("size");var d=this.rtl&&this.orientation=="horizontal";if(this.layout=="normal"){var b=this._slider.left.position()[e];if(this.orientation==="vertical"||d){b=this._slider.right.position()[e]}}else{var b=this._slider.right.position()[e];if(this.orientation==="vertical"||d){var b=this._slider.left.position()[e]}}this._rangeBar.css(e,b+this._slider.left[c]()/2);this._rangeBar[c](Math.abs(this._slider.right.position()[e]-this._slider.left.position()[e]))},_validateValue:function(c,b){if(c>this.max){c=this.max}if(c<this.min){c=this.min}if(this.rangeSlider){if(b[0]===this._slider.left[0]){if(c>=this.values[1]){c=this.values[1]}}else{if(c<=this.values[0]){c=this.values[0]}}}return c},_setSliderPosition:function(f,c,b){var e=this._track[this._getSetting("size")](),d,g;if(b){b-=this._track.coord()[this._getSetting("left")]}if(this.layout=="normal"){var d=(f-this.min)/(this.max-this.min);if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){d=1-((f-this.min)/(this.max-this.min))}}else{var d=1-((f-this.min)/(this.max-this.min));if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){d=(f-this.min)/(this.max-this.min)}}g=e*d-this._slider.left[this._getSetting("size")]()/2;c.css(this._getSetting("left"),g);if(this.tooltip){this._showTooltip(c,f)}this._refreshRangeBar()},_showTooltip:function(s,n){var g=this;if(g._slideStarted||g._capturedElement!=null||g._mouseDown){if(g.tooltipFormatFunction){n=g.tooltipFormatFunction(n)}else{if(g.mode==="default"){n=new Number(n).toFixed(2)}}if(!g.toolTipCreated){var c="tooltip"+g.element.id;var d=a('<div id="'+c+'"><div id ="'+c+'Main"><div id="'+c+'Text"></div></div><div id="'+c+'Arrow"></div></div>');d.css("visibility","hidden");d.css("display","none");d.css("z-index",99999);d.css("box-shadow","none");g.sliderTooltip=d;g.sliderTooltip.appendTo(a(document.body));a("#"+c+"Text").html(n);var l="#"+c;var h=a(l+"Main");var p=a(l+"Text");var q=a(l+"Arrow");h.addClass(g.toThemeProperty("jqx-widget"));p.addClass(g.toThemeProperty("jqx-widget"));q.addClass(g.toThemeProperty("jqx-widget"));h.addClass(g.toThemeProperty("jqx-fill-state-normal"));p.addClass(g.toThemeProperty("jqx-fill-state-normal"));q.addClass(g.toThemeProperty("jqx-fill-state-normal"));a(l).addClass(g.toThemeProperty("jqx-tooltip"));a(l).addClass(g.toThemeProperty("jqx-popup"));h.addClass(g.toThemeProperty("jqx-tooltip-main"));p.addClass(g.toThemeProperty("jqx-tooltip-text"));q.addClass(g.toThemeProperty("jqx-tooltip-arrow"));g.sliderTooltipContent=p;g.sliderTooltipArrow=q;g.sliderTooltipMain=h;g.arrow_size=5;g.toolTipCreated=true;if(g.rangeSlider){g.sliderTooltipArrow.css("visibility","hidden")}}var j=s.coord();g.sliderTooltip[0].style.display="block";g.sliderTooltip[0].style.visibility="visible";var k=g.sliderButtonSize+g.tickSize;if(!g.rangeSlider){g.sliderTooltipContent[0].innerHTML=n}else{var o=g.value?g.value.rangeStart:"";var b=g.value?g.value.rangeEnd:"";if(o!==""){g.sliderTooltipContent[0].innerHTML=o+" - "+b}else{g.sliderTooltip[0].style.display="none";g.sliderTooltip[0].style.visibility="hidden"}}var r=g.sliderTooltip.width();if(g.orientation=="horizontal"){var f=j.left+g.sliderButtonSize/2-r/2;if(g.rangeSlider){var e=(g._slider.right.coord().left-g._slider.left.coord().left-g._thumbSize)/2;f=g._slider.left.coord().left-r/2+e+g._thumbSize}switch(g.tooltipPosition){case"far":var i=j.top+k+g.arrow_size;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-t-b"));g.sliderTooltipArrow.css({"border-width":"0 "+g.arrow_size+"px "+g.arrow_size+"px"});g.sliderTooltipArrow.offset({top:i-g.arrow_size,left:f-g.arrow_size/2-1+r/2});break;case"near":var i=j.top-g.arrow_size-g.sliderTooltip.height()-1;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-t-b"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px "+g.arrow_size+"px 0px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height(),left:f-g.arrow_size/2-1+r/2});break}}else{var m=g.sliderTooltip.height();var f=j.left-r-g.arrow_size-g.tickSize;var i=j.top+g._thumbSize/2-m/2-1;if(g.rangeSlider){var e=(g._slider.right.coord().top-g._slider.left.coord().top-g._thumbSize)/2;i=g._slider.left.coord().top-m/2+e+g._thumbSize}switch(g.tooltipPosition){case"far":var f=j.left+g._thumbSize+g.arrow_size+g.tickSize;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-l-r"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px "+g.arrow_size+"px "+g.arrow_size+"px 0px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height()/2-g.arrow_size/2-2,left:f-g.arrow_size});break;case"near":g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-l-r"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px 0px "+g.arrow_size+"px "+g.arrow_size+"px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height()/2-g.arrow_size/2-2,left:f+r+2});break}}}},_validateDropPosition:function(e,b){var c=this._track[this._getSetting("size")](),d=b[this._getSetting("size")]();if(e<-d/2){e=-d/2}if(e>c-d/2){e=c-d/2}return Math.floor(e)},propertyChangedHandler:function(b,c,e,d){b.__trackSize=null;b.__thumbSize=null;switch(c){case"theme":a.jqx.utilities.setTheme(e,d,b.host);b._leftButton.jqxRepeatButton({theme:d});b._rightButton.jqxRepeatButton({theme:d});break;case"disabled":if(d){b.disabled=true;b.disable()}else{b.disabled=false;b.enable()}break;case"width":case"height":b.__trackSize=null;b.__thumbSize=null;b._performLayout();b._initialSettings();break;case"min":case"max":b.__trackSize=null;b.__thumbSize=null;if(!b.rangeSlider){b._setValue(d,b._slider.left)}b._initialSettings();break;case"showTicks":case"ticksPosition":case"ticksFrequency":case"tickSize":b._performLayout();b._initialSettings();break;case"showRange":case"showButtons":case"orientation":case"rtl":b._render();b._performLayout();b._initialSettings();break;case"buttonsPosition":b._refresh();break;case"rangeSlider":if(!d){b.value=b.value.rangeEnd}else{b.value={rangeEnd:b.value,rangeStart:b.value}}b._render();b._performLayout();b._initialSettings();break;case"value":if(!b.rangeSlider){b.value=parseFloat(d)}b.setValue(d);break;case"values":b.setValue(d);break;case"tooltip":break;default:b._refresh()}},incrementValue:function(b){if(b==undefined||isNaN(parseFloat(b))){b=this.step}if(this.rangeSlider){if(this.values[1]<this.max){this._setValue(this.values[1]+b,this._slider.right)}}else{if(this.values[1]>=this.min&&this.values[1]<this.max){this._setValue(this.values[1]+b,this._slider.right)}}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},decrementValue:function(b){if(b==undefined||isNaN(parseFloat(b))){b=this.step}if(this.rangeSlider){if(this.values[0]>this.min){this._setValue(this.values[0]-b,this._slider.left)}}else{if(this.values[1]<=this.max&&this.values[1]>this.min){this._setValue(this.values[1]-b,this._slider.right)}}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},val:function(b){if(arguments.length==0||(!a.isArray(b)&&typeof(b)=="object")){return this.getValue()}if(a.isArray(b)){this.setValue(b);return}this.setValue(b)},setValue:function(d){if(this.rangeSlider){var c,b;if(arguments.length<2){if(d instanceof Array){c=d[0];b=d[1]}else{if(typeof d==="object"&&typeof d.rangeStart!=="undefined"&&typeof d.rangeEnd!=="undefined"){c=d.rangeStart;b=d.rangeEnd}}}else{c=arguments[0];b=arguments[1]}this._triggerEvents=false;this._setValue(b,this._slider.right);this._triggerEvents=true;this._setValue(c,this._slider.left)}else{this._triggerEvents=false;this._setValue(this.min,this._slider.left);this._triggerEvents=true;this._setValue(d,this._slider.right)}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},getValue:function(){return this.value},_enable:function(b){if(b){this._addEventHandlers();this.disabled=false;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{this._removeEventHandlers();this.disabled=true;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}this._leftButton.jqxRepeatButton({disabled:this.disabled});this._rightButton.jqxRepeatButton({disabled:this.disabled})},disable:function(){this._enable(false);a.jqx.aria(this,"aria-disabled",true)},enable:function(){this._enable(true);a.jqx.aria(this,"aria-disabled",false)}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxSlider","",{});a.extend(a.jqx._jqxSlider.prototype,{defineInstance:function(){var b={disabled:false,width:300,height:30,step:1,max:10,min:0,int64:false,orientation:"horizontal",showTicks:true,ticksPosition:"both",ticksFrequency:2,minorTicksFrequency:1,showMinorTicks:false,showButtons:true,buttonsPosition:"both",mode:"default",showRange:true,rangeSlider:false,value:0,values:[0,10],tooltip:false,tooltipFormatFunction:null,tooltipPosition:"near",tooltipHideDelay:500,sliderButtonSize:14,tickSize:7,minorTickSize:4,showTickLabels:false,tickLabelFormatFunction:null,layout:"normal",rtl:false,_settings:{vertical:{size:"height",oSize:"width",outerOSize:"outerWidth",outerSize:"outerHeight",left:"top",top:"left",start:"_startY",mouse:"_mouseStartY",page:"pageY",opposite:"horizontal"},horizontal:{size:"width",oSize:"height",outerOSize:"outerHeight",outerSize:"outerWidth",left:"left",top:"top",start:"_startX",mouse:"_mouseStartX",page:"pageX",opposite:"vertical"}},_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_events:["change","slide","slideEnd","slideStart","created"],_invalidArgumentExceptions:{invalidWidth:"Invalid width.",invalidHeight:"Invalid height.",invalidStep:"Invalid step.",invalidMaxValue:"Invalid maximum value.",invalidMinValue:"Invalid minimum value.",invalidTickFrequency:"Invalid tick frequency.",invalidValue:"Invalid value.",invalidValues:"Invalid values.",invalidTicksPosition:"Invalid ticksPosition",invalidButtonsPosition:"Invalid buttonsPosition"},_lastValue:[],_track:null,_leftButton:null,_rightButton:null,_slider:null,_rangeBar:null,_slideEvent:null,_capturedElement:null,_slideStarted:false,aria:{"aria-valuenow":{name:"value",type:"number"},"aria-valuemin":{name:"min",type:"number"},"aria-valuemax":{name:"max",type:"number"},"aria-disabled":{name:"disabled",type:"boolean"}}};a.extend(true,this,b);return b},createInstance:function(b){var c=this;if(c.int64===true){if(!a.jqx.longInt){throw new Error("jqxSlider: Missing reference to jqxdata.js")}a.jqx.longInt(c);c._value64=new a.jqx.math().fromString(c.value.toString(),10);c._values64=[new a.jqx.math().fromString(c.values[0].toString(),10),new a.jqx.math().fromString(c.values[1].toString(),10)];c._min64=new a.jqx.math().fromString(c.min.toString(),10);c._max64=new a.jqx.math().fromString(c.max.toString(),10);c._step64=new a.jqx.math().fromString(c.step.toString(),10);c._ticksFrequency64=new a.jqx.math().fromString(c.ticksFrequency.toString(),10);c._minorTicksFrequency64=new a.jqx.math().fromString(c.minorTicksFrequency.toString(),10)}this.render()},render:function(){this.element.innerHTML="";this.host.attr("role","slider");this.host.addClass(this.toThemeProperty("jqx-slider"));this.host.addClass(this.toThemeProperty("jqx-widget"));a.jqx.aria(this);this._isTouchDevice=a.jqx.mobile.isTouchDevice();this.host.width(this.width);this.host.height(this.height);this._refresh();this._raiseEvent(4,{value:this.getValue()});this._addInput();var c=this;var b=c.host.attr("tabindex")==null;if(b){c.host.attr("tabindex",0)}a.jqx.utilities.resize(this.host,function(){c.__trackSize=null;c.__thumbSize=null;c.host.width(c.width);c.host.height(c.height);c._performLayout();c._initialSettings()})},resize:function(c,b){this.width=c;this.height=b;this.refresh();this.host.width(me.width);this.host.height(me.height);this._performLayout();this._initialSettings()},focus:function(){try{this.host.focus()}catch(b){}},destroy:function(){this.host.remove()},_addInput:function(){var b=this.host.attr("name");this.input=a("<input type='hidden'/>");this.host.append(this.input);if(b){this.input.attr("name",b)}if(!this.rangeSlider){this.input.val(this.value.toString())}else{if(this.values){this.input.val(this.value.rangeStart.toString()+"-"+this.value.rangeEnd.toString())}}},_getSetting:function(b){return this._settings[this.orientation][b]},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},refresh:function(b){if(!b){this._refresh()}},_refresh:function(){this._render();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initialSettings()},_render:function(){this._addTrack();this._addSliders();this._addTickContainers();this._addContentWrapper();this._addButtons();this._addRangeBar()},_addTrack:function(){if(this._track===null||this._track.length<1){this._track=a('<div class="'+this.toThemeProperty("jqx-slider-track")+'"></div>');this.host.append(this._track)}this._track.attr("style","");this._track.removeClass(this.toThemeProperty("jqx-slider-track-"+this._getSetting("opposite")));this._track.addClass(this.toThemeProperty("jqx-slider-track-"+this.orientation));this._track.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._track.addClass(this.toThemeProperty("jqx-rc-all"))},_addSliders:function(){if(this._slider===null||this._slider.length<1){this._slider={};this._slider.left=a('<div class="'+this.toThemeProperty("jqx-slider-slider")+'"></div>');this._track.append(this._slider.left);this._slider.right=a('<div class="'+this.toThemeProperty("jqx-slider-slider")+'"></div>');this._track.append(this._slider.right)}this._slider.left.removeClass(this.toThemeProperty("jqx-slider-slider-"+this._getSetting("opposite")));this._slider.left.addClass(this.toThemeProperty("jqx-slider-slider-"+this.orientation));this._slider.right.removeClass(this.toThemeProperty("jqx-slider-slider-"+this._getSetting("opposite")));this._slider.right.addClass(this.toThemeProperty("jqx-slider-slider-"+this.orientation));this._slider.right.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._slider.left.addClass(this.toThemeProperty("jqx-fill-state-normal"))},_addTickContainers:function(){if(this._bottomTicks!==null||this._bottomTicks.length<1||this._topTicks!==null||this._topTicks.length<1){this._addTickContainers()}var b="visible";if(!this.showTicks){b="hidden"}this._bottomTicks.css("visibility",b);this._topTicks.css("visibility",b)},_addTickContainers:function(){if(typeof this._bottomTicks==="undefined"||this._bottomTicks.length<1){this._bottomTicks=a('<div class="'+this.toThemeProperty("jqx-slider-tickscontainer")+'" style=""></div>');this.host.prepend(this._bottomTicks)}if(typeof this._topTicks==="undefined"||this._topTicks.length<1){this._topTicks=a('<div class="'+this.toThemeProperty("jqx-slider-tickscontainer")+'" style=""></div>');this.host.append(this._topTicks)}},_addButtons:function(){if(this._leftButton===null||this._leftButton.length<1||this._rightButton===null||this._rightButton.length<1){this._createButtons()}var b="block";if(!this.showButtons||this.rangeSlider){b="none"}this._rightButton.css("display",b);this._leftButton.css("display",b)},_createButtons:function(){this._leftButton=a('<div class="jqx-slider-left"><div style="width: 100%; height: 100%;"></div></div>');this._rightButton=a('<div class="jqx-slider-right"><div style="width: 100%; height: 100%;"></div></div>');this.host.prepend(this._rightButton);this.host.prepend(this._leftButton);if(!this.host.jqxRepeatButton){throw new Error("jqxSlider: Missing reference to jqxbuttons.js.")}this._leftButton.jqxRepeatButton({theme:this.theme,delay:50,width:this.sliderButtonSize,height:this.sliderButtonSize});this._rightButton.jqxRepeatButton({theme:this.theme,delay:50,width:this.sliderButtonSize,height:this.sliderButtonSize})},_addContentWrapper:function(){if(this._contentWrapper===undefined||this._contentWrapper.length===0){this.host.wrapInner("<div></div>");this._contentWrapper=this.host.children(0)}if(this.orientation==="horizontal"){this._contentWrapper.css("float","left")}else{this._contentWrapper.css("float","none")}},_addTicks:function(c){if(!this.showTicks){return}var e=c[this._getSetting("size")](),m,f,n,k,h,o;if(this.int64===false){m=this.max-this.min;f=Math.round(m/this.ticksFrequency);n=Math.round(m/this.minorTicksFrequency);h=this.min;o=this.max}else{m=this._max64.subtract(this._min64);f=m.div(this._ticksFrequency64).toNumber();n=m.div(this._minorTicksFrequency64).toNumber();h=this._min64.toString();o=this._max64.toString()}var b=e/f,k=e/n;c.empty();var r="";var d=this.tickLabelFormatFunction?this.tickLabelFormatFunction(h):h;var q=a("<span style='visibility: hidden;'></span>");q.addClass(this.toThemeProperty("jqx-widget jqx-widget-content jqx-slider"));q.appendTo(document.body);q.html("0");var l={width:q.width(),height:q.height()};q.detach();var s=c[this._getSetting("oSize")]();r+=this._addTick(c,0,this.min,s,d,l);for(var j=1;j<f;j++){var g=j*b;g=Math.floor(g);var p;if(this.int64===false){p=this.min+this.ticksFrequency*j}else{p=this._min64.add(this._ticksFrequency64.multiply(new a.jqx.math().fromString(j.toString(),10))).toString()}var d=this.tickLabelFormatFunction?this.tickLabelFormatFunction(p):p;r+=this._addTick(c,g,j,s,d,l)}if(this.showMinorTicks){for(var j=1;j<n;j++){var g=j*k;g=Math.floor(g);var d="";r+=this._addTick(c,g,j,s,d,l,true)}}var d=this.tickLabelFormatFunction?this.tickLabelFormatFunction(o):o;r+=this._addTick(c,f*b,this.max,s,d,l);c.append(a(r))},_addTick:function(b,i,n,p,c,j,o){var q="";q=this.toThemeProperty("jqx-slider-tick");q+=" "+this.toThemeProperty("jqx-fill-state-pressed");var e;var l=this._getSetting("top");var d="2px";var f=this.tickSize;if(o){f=this.minorTickSize}if(b[0]!==this._topTicks[0]){d=p-f-2+"px"}if(this.orientation==="horizontal"){e='<div style="'+l+": "+d+"; "+this._getSetting("oSize")+": "+f+"px; float: left; position:absolute; left:"+i+'px;" class="'+this.toThemeProperty("jqx-slider-tick-horizontal")+" "+q+'"></div>';if(this.showTickLabels){if(b[0]!==this._topTicks[0]){d=p-f-j.height-2+"px"}else{d=2+f+"px"}var m=j.width*c.toString().length;m=m/2;var k=i-m;e+='<div style="'+l+": "+d+"; float: left; position:absolute; left:"+k+'px;">'+c+"</div>"}}else{e='<div style="'+l+": "+d+"; "+this._getSetting("oSize")+": "+f+"px; float: none; position:absolute; top:"+i+'px;" class="'+this.toThemeProperty("jqx-slider-tick-vertical")+" "+q+'"></div>';if(this.showTickLabels){if(b[0]!==this._topTicks[0]){d=p-f-c.toString().length*j.width-6+"px"}else{d=6+f+"px"}var g=j.height;g=g/2;var k=i-g;e+='<div style="'+l+": "+d+"; float: none; position:absolute; top:"+k+'px;">'+c+"</div>"}}return e},_addRangeBar:function(){if(this._rangeBar===null||this._rangeBar.length<1){this._rangeBar=a('<div class="'+this.toThemeProperty("jqx-slider-rangebar")+'"></div>');this._rangeBar.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._rangeBar.addClass(this.toThemeProperty("jqx-rc-all"));this._track.append(this._rangeBar)}if(!this.showRange){this._rangeBar.css("display","none")}else{this._rangeBar.css("display","block")}this._thumbSize=this._slider.left.outerWidth()},_getLeftDisplacement:function(){if(!this.showButtons){return 0}if(this.rangeSlider){return 0}switch(this.buttonsPosition){case"left":return this._leftButton[this._getSetting("outerSize")](true)+this._rightButton[this._getSetting("outerSize")](true);case"right":return 0;default:return this._leftButton[this._getSetting("outerSize")](true)}return 0},_performLayout:function(){this.host.width(this.width);this.host.height(this.height);var b=this.host.height();if(this._getSetting("size")=="width"){b=this.host.width()}this._performButtonsLayout();this._performTrackLayout(b-1);this._contentWrapper[this._getSetting("size")](this._track[this._getSetting("size")]());this._contentWrapper[this._getSetting("oSize")](this[this._getSetting("oSize")]);this._performTicksLayout();this._performRangeBarLayout();if(this.rangeSlider){this._slider.left.css("visibility","visible")}else{this._slider.left.css("visibility","hidden")}this._refreshRangeBar();if(this.orientation=="vertical"){if(this.showButtons){var c=parseInt((this._leftButton.width()-this._track.width())/2);this._track.css("margin-left",-3+c+"px")}}},_performTrackLayout:function(b){this._track[this._getSetting("size")](b-((this.showButtons&&!this.rangeSlider)?this._leftButton[this._getSetting("outerSize")](true)+this._rightButton[this._getSetting("outerSize")](true):0));this._slider.left.css("left",0);this._slider.left.css("top",0);this._slider.right.css("left",0);this._slider.right.css("top",0)},_performTicksLayout:function(){this._performTicksContainerLayout();this._addTicks(this._topTicks);this._addTicks(this._bottomTicks);this._topTicks.css("visibility","hidden");this._bottomTicks.css("visibility","hidden");if((this.ticksPosition==="top"||this.ticksPosition==="both")&&this.showTicks){this._bottomTicks.css("visibility","visible")}if((this.ticksPosition==="bottom"||this.ticksPosition==="both")&&this.showTicks){this._topTicks.css("visibility","visible")}},_performTicksContainerLayout:function(){var f=this._getSetting("size");var e=this._getSetting("oSize");var b=this._getSetting("outerOSize");this._topTicks[f](this._track[f]());this._bottomTicks[f](this._track[f]());var d=-2+(parseInt(this[e])-this._track[b](true))/2;this._topTicks[e](parseInt(d));var c=-2+(parseInt(this[e])-this._track[b](true))/2;this._bottomTicks[e](parseInt(c));if(this.orientation==="vertical"){this._topTicks.css("float","left");this._track.css("float","left");this._bottomTicks.css("float","left")}else{this._topTicks.css("float","none");this._track.css("float","none");this._bottomTicks.css("float","none")}},_performButtonsLayout:function(){this._addButtonsStyles();this._addButtonsClasses();this._addButtonsHover();this._orderButtons();this._centerElement(this._rightButton);this._centerElement(this._leftButton);this._layoutButtons()},_addButtonsStyles:function(){this._leftButton.css("background-position","center");this._rightButton.css("background-position","center");if(this.orientation==="vertical"){this._leftButton.css("float","none");this._rightButton.css("float","none")}else{this._leftButton.css("float","left");this._rightButton.css("float","left")}},_addButtonsClasses:function(){var b={prev:"left",next:"right"};if(this.orientation==="vertical"){b={prev:"up",next:"down"}}this._leftButton.addClass(this.toThemeProperty("jqx-rc-all"));this._rightButton.addClass(this.toThemeProperty("jqx-rc-all"));this._leftButton.addClass(this.toThemeProperty("jqx-slider-button"));this._rightButton.addClass(this.toThemeProperty("jqx-slider-button"));this._leftArrow=this._leftButton.find("div");this._rightArrow=this._rightButton.find("div");this._leftArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));this._rightArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));this._leftArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-up"));this._rightArrow.removeClass(this.toThemeProperty("jqx-icon-arrow-down"));this._leftArrow.addClass(this.toThemeProperty("jqx-icon-arrow-"+b.prev));this._rightArrow.addClass(this.toThemeProperty("jqx-icon-arrow-"+b.next))},_addButtonsHover:function(){var c=this,b={prev:"left",next:"right"};if(this.orientation==="vertical"){b={prev:"up",next:"down"}}this.addHandler(a(document),"mouseup.arrow"+this.element.id,function(){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"));c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"));if(c.sliderTooltip){if(c.sliderTooltipTimer){clearTimeout(c.sliderTooltipTimer)}c.sliderTooltipTimer=setTimeout(function(){c.sliderTooltip.fadeOut("fast");c._mouseDown=false},c.tooltipHideDelay)}else{c._mouseDown=false}});this.addHandler(this._leftButton,"mousedown",function(){if(!c.disabled){c._leftArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"));c._mouseDown=true}});this.addHandler(this._leftButton,"mouseup",function(){if(!c.disabled){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-selected"))}});this.addHandler(this._rightButton,"mousedown",function(){if(!c.disabled){c._rightArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"));c._mouseDown=true}});this.addHandler(this._rightButton,"mouseup",function(){if(!c.disabled){c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-selected"))}});this._leftButton.hover(function(){if(!c.disabled){c._leftArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-hover"))}},function(){if(!c.disabled){c._leftArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.prev+"-hover"))}});this._rightButton.hover(function(){if(!c.disabled){c._rightArrow.addClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-hover"))}},function(){if(!c.disabled){c._rightArrow.removeClass(c.toThemeProperty("jqx-icon-arrow-"+b.next+"-hover"))}})},_layoutButtons:function(){if(this.orientation==="horizontal"){this._horizontalButtonsLayout()}else{this._verticalButtonsLayout()}},_horizontalButtonsLayout:function(){var b=(2+Math.ceil(this.sliderButtonSize/2));if(this.buttonsPosition=="left"){this._leftButton.css("margin-right","0px");this._rightButton.css("margin-right",b)}else{if(this.buttonsPosition=="right"){this._leftButton.css("margin-left",2+b);this._rightButton.css("margin-right","0px")}else{this._leftButton.css("margin-right",b);this._rightButton.css("margin-left",2+b)}}},_verticalButtonsLayout:function(){var c=(2+Math.ceil(this.sliderButtonSize/2));if(this.buttonsPosition=="left"){this._leftButton.css("margin-bottom","0px");this._rightButton.css("margin-bottom",c)}else{if(this.buttonsPosition=="right"){this._leftButton.css("margin-top",2+c);this._rightButton.css("margin-bottom","0px")}else{this._leftButton.css("margin-bottom",c);this._rightButton.css("margin-top",2+c)}}var b=this._leftButton.css("margin-left");this._leftButton.css("margin-left",parseInt(b)-1);this._rightButton.css("margin-left",parseInt(b)-1)},_orderButtons:function(){this._rightButton.detach();this._leftButton.detach();switch(this.buttonsPosition){case"left":this.host.prepend(this._rightButton);this.host.prepend(this._leftButton);break;case"right":this.host.append(this._leftButton);this.host.append(this._rightButton);break;case"both":this.host.prepend(this._leftButton);this.host.append(this._rightButton);break}},_performRangeBarLayout:function(){this._rangeBar[this._getSetting("oSize")](this._track[this._getSetting("oSize")]());this._rangeBar[this._getSetting("size")](this._track[this._getSetting("size")]());this._rangeBar.css("position","absolute");this._rangeBar.css("left",0);this._rangeBar.css("top",0)},_centerElement:function(c){var b=-1+(a(c.parent())[this._getSetting("oSize")]()-c[this._getSetting("outerOSize")]())/2;c.css("margin-"+[this._getSetting("left")],0);c.css("margin-"+[this._getSetting("top")],b);return c},_raiseEvent:function(f,c){var d=this._events[f];var e=new a.Event(d);if(this._triggerEvents===false){return true}e.args=c;if(f===1){e.args.cancel=false;this._slideEvent=e}this._lastValue[f]=c.value;e.owner=this;var b=this.host.trigger(e);return b},_initialSettings:function(){if(this.int64===false){if(this.rangeSlider){if(typeof this.value!=="number"){this.setValue(this.value)}else{this.setValue(this.values)}}else{if(this.value==undefined){this.value=0}this.setValue(this.value)}}else{if(this.rangeSlider===false||Array.isArray(this._value64)===true){this.setValue(this._value64)}else{this.setValue(this._values64)}}if(this.disabled){this.disable()}},_addEventHandlers:function(){var b=this;this.addHandler(this._slider.right,this._getEvent("mousedown"),this._startDrag,{self:this});this.addHandler(this._slider.left,this._getEvent("mousedown"),this._startDrag,{self:this});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.element.id,function(){b._stopDrag()});try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var d=function(g){b._stopDrag()};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!=-1){if(window.top.document){if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",d,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",d)}}}}}}}catch(c){}this.addHandler(a(document),this._getEvent("mousemove")+"."+this.element.id,this._performDrag,{self:this});var e=this;this.addHandler(this._slider.left,"mouseenter",function(){if(!e.disabled){b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.right,"mouseenter",function(){if(!e.disabled){b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.left,"mouseleave",function(){if(!e.disabled){b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.right,"mouseleave",function(){if(!e.disabled){b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this._slider.left,"mousedown",function(){if(!e.disabled){b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.right,"mousedown",function(){if(!e.disabled){b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.left,"mouseup",function(){if(!e.disabled){b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._slider.right,"mouseup",function(){if(!e.disabled){b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}});this.addHandler(this._leftButton,this._getEvent("click"),this._leftButtonHandler,{self:this});this.addHandler(this._rightButton,this._getEvent("click"),this._rightButtonHandler,{self:this});this.addHandler(this._track,this._getEvent("mousedown"),this._trackMouseDownHandler,{self:this});this.addHandler(this.host,"focus",function(){b._track.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._leftButton.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._rightButton.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.right.addClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.left.addClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this.host,"blur",function(){b._leftButton.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._rightButton.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._track.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-focus"));b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});this.element.onselectstart=function(){return false};this._addMouseWheelListeners();this._addKeyboardListeners()},_addMouseWheelListeners:function(){var b=this;this.addHandler(this.host,"mousewheel",function(d){if(b.disabled){return true}if(document.activeElement&&!a(document.activeElement).ischildof(b.host)){return true}var c=d.wheelDelta;if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(!("wheelDelta" in d)){c=d.detail*-40}if(c>0){b.incrementValue()}else{b.decrementValue()}d.preventDefault()})},_addKeyboardListeners:function(){var b=this;this.addHandler(this.host,"keydown",function(c){switch(c.keyCode){case 40:case 37:if(b.layout=="normal"&&!b.rtl){b.decrementValue()}else{b.incrementValue()}return false;case 38:case 39:if(b.layout=="normal"&&!b.rtl){b.incrementValue()}else{b.decrementValue()}return false;case 36:if(b.rangeSlider){b.setValue([b.values[0],b.max])}else{b.setValue(b.min)}return false;case 35:if(b.rangeSlider){b.setValue([b.min,b.values[1]])}else{b.setValue(b.max)}return false}})},_trackMouseDownHandler:function(b){var e=a.jqx.mobile.getTouches(b);var d=e[0];var i=b.data.self,b=(i._isTouchDevice)?d:b,f=i._track.coord()[i._getSetting("left")],h=b[i._getSetting("page")]-i._slider.left[i._getSetting("size")]()/2,c=i._getClosest(h),j=parseInt(i._track[i._getSetting("size")]());var g=i._getValueByPosition(h);i._mouseDown=true;i._setValue(g,c);if(i.input){a.jqx.aria(i,"aria-valuenow",i.input.val())}},_getClosest:function(b){if(!this.rangeSlider){return this._slider.right}else{b=b-this._track.coord()[this._getSetting("left")]-this._slider.left[this._getSetting("size")]()/2;if(Math.abs(parseInt(this._slider.left.css(this._getSetting("left")),10)-b)<Math.abs(parseInt(this._slider.right.css(this._getSetting("left")),10)-b)){return this._slider.left}else{return this._slider.right}}},_removeEventHandlers:function(){this.removeHandler(this._slider.right,this._getEvent("mousedown"),this._startDrag);this.removeHandler(this._slider.left,this._getEvent("mousedown"),this._startDrag);this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),this._stopDrag);this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),this._performDrag);this.removeHandler(this._leftButton,this._getEvent("click"),this._leftButtonHandler);this.removeHandler(this._rightButton,this._getEvent("click"),this._rightButtonHandler);this.removeHandler(this._track,this._getEvent("mousedown"),this._trackMouseDownHandler);this.element.onselectstart=null;this.removeHandler(this.host,this._getEvent("mousewheel"));this.removeHandler(this.host,this._getEvent("keydown"))},_rightButtonClick:function(){if(this.orientation=="horizontal"&&!this.rtl){this.incrementValue()}else{this.decrementValue()}},_leftButtonClick:function(){if(this.orientation=="horizontal"&&!this.rtl){this.decrementValue()}else{this.incrementValue()}},_rightButtonHandler:function(c){var b=c.data.self;if(b.layout=="normal"){b._rightButtonClick()}else{b._leftButtonClick()}return false},_leftButtonHandler:function(c){var b=c.data.self;if(b.layout=="normal"){b._leftButtonClick()}else{b._rightButtonClick()}return false},_startDrag:function(d){var e=a.jqx.mobile.getTouches(d);var f=e[0];var c=d.data.self;c._capturedElement=a(d.target);c._startX=a(d.target).coord().left;c._startY=a(d.target).coord().top;var b=a.jqx.position(d);c._mouseStartX=b.left;c._mouseStartY=b.top;c._mouseDown=true;if(c.tooltip){c._showTooltip(c._capturedElement,c.value)}if(c._isTouchDevice){return false}},_stopDrag:function(){var b=this;if(b._slideStarted){b._raiseEvent(2,{value:b.getValue()})}if(!b._slideStarted||b._capturedElement==null){b._capturedElement=null;return}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}b._slider.left.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._slider.right.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._slideStarted=false;b._capturedElement=null;if(b.sliderTooltip){b.sliderTooltip.fadeOut("fast")}},_performDrag:function(d){var c=d.data.self;if(c._capturedElement!==null){var f=a.jqx.mobile.getTouches(d);var g=f[0];if(d.which===0&&a.jqx.browser.msie&&a.jqx.browser.version<9){c._stopDrag();return false}var b=a.jqx.position(d);var e=c.orientation=="horizontal"?b.left:b.top;c._isDragged(e);if(c._slideStarted||c._isTouchDevice){return c._dragHandler(e)}}},_isDragged:function(b){if(Math.abs(b-this[this._getSetting("mouse")])>2&&!this._slideStarted){this._slideStarted=true;if(this._valueChanged(3)){this._raiseEvent(3,{value:this.getValue()})}}else{if(this._capturedElement===null){this._slideStarted=false}}},_dragHandler:function(b){b=(b-this[this._getSetting("mouse")])+this[this._getSetting("start")];var c=this._getValueByPosition(b);if(this.rangeSlider){var d=this._slider.right,f=this._slider.left;var e=this._getSetting("left");if(this._capturedElement[0]===f[0]){if(parseFloat(b)>d.coord()[e]){b=d.coord()[e]}}else{if(parseFloat(b)<f.coord()[e]){b=f.coord()[e]}}}this._setValue(c,this._capturedElement,b);return false},_getValueByPosition:function(b){if(this.mode==="default"){return this._getFloatingValueByPosition(b)}else{return this._getFixedValueByPosition(b)}},_getFloatingValueByPosition:function(b){var c=b-this._track.coord()[this._getSetting("left")]+this._slider.left.width()/2,g=c/this._track[this._getSetting("size")](),h;if(this.int64===false){h=(this.max-this.min)*g+this.min}else{var f=new a.jqx.math().fromNumber(this._track[this._getSetting("size")](),10);var d=this._max64.subtract(this._min64);var e=Math.round(this._divide64(d,f)*c);h=new a.jqx.math().fromNumber(e,10).add(this._min64)}if(this.layout=="normal"){if(this.orientation==="horizontal"&&!this.rtl){return h}else{return(this.max+this.min)-h}}else{if(this.orientation==="horizontal"&&!this.rtl){if(this.int64===false){return(this.max+this.min)-h}else{return(this._max64.add(this._min64)).subtract(h)}}else{return h}}},_getThumbSize:function(){if(this.__thumbSize){return this.__thumbSize}var b=this._slider.left[this._getSetting("size")]();this.__thumbSize=b;return b},_getTrackSize:function(){if(this.__trackSize){return this.__trackSize}var b=this._track[this._getSetting("size")]();this.__trackSize=b;return b},_getFixedValueByPosition:function(f){var i=this._getTrackSize(),d=this._getThumbSize(),k={number:-1,distance:Number.MAX_VALUE},c,h,g,j;if(this.int64===false){c=this.step;g=(this.max-this.min)/c;h=(i)/g;j=this._track.coord()[this._getSetting("left")]-d/2;for(var e=this.min;e<=this.max+this.step;e+=this.step){if(Math.abs(k.distance-f)>Math.abs(j-f)){k.distance=j;k.number=e}j+=h}}else{c=this._step64;g=(this._max64.subtract(this._min64)).div(this._step64);h=new a.jqx.math().fromNumber(i,10).div(g).toNumber();j=this._track.coord()[this._getSetting("left")]-d/2;k={number:new a.jqx.math().fromString(this._min64.toString(),10),distance:j};for(var b=new a.jqx.math().fromString(this._min64.toString(),10);b.lessThanOrEqual(this._max64.add(this._step64));b=b.add(this._step64)){if(Math.abs(k.distance-f)>Math.abs(j-f)){k.distance=j;k.number=new a.jqx.math().fromString(b.toString(),10)}j+=h}}if(this.layout=="normal"){if(this.orientation==="horizontal"&&!this.rtl){return k.number}else{return(this.max+this.min)-k.number}}else{if(this.orientation==="horizontal"&&!this.rtl){return(this.max+this.min)-k.number}else{return k.number}}},_setValue:function(e,d,b){if(!this._slideEvent||!this._slideEvent.args.cancel){e=this._handleValue(e,d);this._setSliderPosition(e,d,b);this._fixZIndexes();if(this._valueChanged(1)){var c=this._raiseEvent(1,{value:this.getValue()})}if(this._valueChanged(0)){this._raiseEvent(0,{value:this.getValue()})}if(this.input){if(!this.rangeSlider){this.input.val(this.value.toString())}else{if(this.values){if(this.value.rangeEnd!=undefined&&this.value.rangeStart!=undefined){this.input.val(this.value.rangeStart.toString()+"-"+this.value.rangeEnd.toString())}}}}}},_valueChanged:function(c){var b=this.getValue();return(!this.rangeSlider&&this._lastValue[c]!==b)||(this.rangeSlider&&(typeof this._lastValue[c]!=="object"||parseFloat(this._lastValue[c].rangeEnd)!==parseFloat(b.rangeEnd)||parseFloat(this._lastValue[c].rangeStart)!==parseFloat(b.rangeStart)))},_handleValue:function(c,b){c=this._validateValue(c,b);if(b[0]===this._slider.left[0]){this.values[0]=this.int64?c.toString():c;if(this.int64===true){this._value64[0]=c}}if(b[0]===this._slider.right[0]){this.values[1]=this.int64?c.toString():c;if(this.int64===true){this._values64[1]=c}}if(this.rangeSlider){this.value={rangeStart:this.values[0],rangeEnd:this.values[1]};if(this.int64===true){this._value64={rangeStart:this._values64[0],rangeEnd:this._values64[1]}}}else{if(this.int64===false){this.value=c}else{this.value=c.toString();this._value64=c}}return c},_fixZIndexes:function(){if(this.values[1]-this.values[0]<0.5&&this.max-this.values[0]<0.5){this._slider.left.css("z-index",20);this._slider.right.css("z-index",15)}else{this._slider.left.css("z-index",15);this._slider.right.css("z-index",20)}},_refreshRangeBar:function(){var e=this._getSetting("left");var c=this._getSetting("size");var d=this.rtl&&this.orientation=="horizontal";if(this.layout=="normal"){var b=this._slider.left.position()[e];if(this.orientation==="vertical"||d){b=this._slider.right.position()[e]}}else{var b=this._slider.right.position()[e];if(this.orientation==="vertical"||d){var b=this._slider.left.position()[e]}}this._rangeBar.css(e,b+this._slider.left[c]()/2);this._rangeBar[c](Math.abs(this._slider.right.position()[e]-this._slider.left.position()[e]))},_validateValue:function(c,b){if(this.int64===false){if(c>this.max){c=this.max}if(c<this.min){c=this.min}if(this.rangeSlider){if(b[0]===this._slider.left[0]){if(c>=this.values[1]){c=this.values[1]}}else{if(c<=this.values[0]){c=this.values[0]}}}}else{if(c.greaterThan(this._max64)){c=this._max64}if(c.lessThan(this._min64)){c=this._min64}}return c},_setSliderPosition:function(h,c,b){var f=this._track[this._getSetting("size")](),e,i;if(b){b-=this._track.coord()[this._getSetting("left")]}if(this.int64){if(typeof h==="number"){h=new a.jqx.math().fromNumber(h,10)}else{if(typeof h==="string"){h=new a.jqx.math().fromString(h,10)}}if(h.greaterThan(this._max64)){h=new a.jqx.math().fromString(this._max64.toString(),10)}if(h.lessThan(this._min64)){h=new a.jqx.math().fromString(this._min64.toString(),10)}var g=this._divide64(h.subtract(this._min64),this._max64.subtract(this._min64));var d=1-g;if(this.layout=="normal"){var e=g;if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){e=d}}else{var e=d;if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){e=g}}i=f*e-this._slider.left[this._getSetting("size")]()/2;c.css(this._getSetting("left"),i)}else{if(this.layout=="normal"){var e=(h-this.min)/(this.max-this.min);if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){e=1-((h-this.min)/(this.max-this.min))}}else{var e=1-((h-this.min)/(this.max-this.min));if(this.orientation!="horizontal"||(this.orientation=="horizontal"&&this.rtl)){e=(h-this.min)/(this.max-this.min)}}i=f*e-this._slider.left[this._getSetting("size")]()/2;c.css(this._getSetting("left"),i)}if(this.tooltip){this._showTooltip(c,this.value)}this._refreshRangeBar()},_divide64:function(e,b){var h,j,c,k,m;h=e.toString();c=b.toString();if(c.length>15){var l=c.length-15;c=c.slice(0,15)+"."+c.slice(15);k=parseFloat(c);if(h.length>l){var g=h.length-l;h=h.slice(0,g)+"."+h.slice(g)}else{if(h.length===l){h="0."+h}else{var f="0.";for(var d=0;d<l-h.length;d++){f+="0"}h=f+""+h}}j=parseFloat(h)}else{j=e.toNumber();k=b.toNumber()}m=j/k;return m},_showTooltip:function(s,n){var g=this;if(g._slideStarted||g._capturedElement!=null||g._mouseDown){if(g.tooltipFormatFunction){n=g.tooltipFormatFunction(n)}else{if(g.mode==="default"){n=new Number(n).toFixed(2)}}if(!g.toolTipCreated){var c="tooltip"+g.element.id;var d=a('<div id="'+c+'"><div id ="'+c+'Main"><div id="'+c+'Text"></div></div><div id="'+c+'Arrow"></div></div>');d.css("visibility","hidden");d.css("display","none");d.css("z-index",99999);d.css("box-shadow","none");g.sliderTooltip=d;g.sliderTooltip.appendTo(a(document.body));a("#"+c+"Text").html(n);var l="#"+c;var h=a(l+"Main");var p=a(l+"Text");var q=a(l+"Arrow");h.addClass(g.toThemeProperty("jqx-widget"));p.addClass(g.toThemeProperty("jqx-widget"));q.addClass(g.toThemeProperty("jqx-widget"));h.addClass(g.toThemeProperty("jqx-fill-state-normal"));p.addClass(g.toThemeProperty("jqx-fill-state-normal"));q.addClass(g.toThemeProperty("jqx-fill-state-normal"));a(l).addClass(g.toThemeProperty("jqx-tooltip"));a(l).addClass(g.toThemeProperty("jqx-popup"));h.addClass(g.toThemeProperty("jqx-tooltip-main"));p.addClass(g.toThemeProperty("jqx-tooltip-text"));q.addClass(g.toThemeProperty("jqx-tooltip-arrow"));g.sliderTooltipContent=p;g.sliderTooltipArrow=q;g.sliderTooltipMain=h;g.arrow_size=5;g.toolTipCreated=true;if(g.rangeSlider){g.sliderTooltipArrow.css("visibility","hidden")}}var j=s.coord();g.sliderTooltip[0].style.display="block";g.sliderTooltip[0].style.visibility="visible";var k=g.sliderButtonSize+g.tickSize;if(!g.rangeSlider){g.sliderTooltipContent[0].innerHTML=n}else{var o=g.value?g.value.rangeStart:"";var b=g.value?g.value.rangeEnd:"";if(o!==""){g.sliderTooltipContent[0].innerHTML=o+" - "+b}else{g.sliderTooltip[0].style.display="none";g.sliderTooltip[0].style.visibility="hidden"}}var r=g.sliderTooltip.width();if(g.orientation=="horizontal"){var f=j.left+g.sliderButtonSize/2-r/2;if(g.rangeSlider){var e=(g._slider.right.coord().left-g._slider.left.coord().left-g._thumbSize)/2;f=g._slider.left.coord().left-r/2+e+g._thumbSize}switch(g.tooltipPosition){case"far":var i=j.top+k+g.arrow_size;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-t-b"));g.sliderTooltipArrow.css({"border-width":"0 "+g.arrow_size+"px "+g.arrow_size+"px"});g.sliderTooltipArrow.offset({top:i-g.arrow_size,left:f-g.arrow_size/2-1+r/2});break;case"near":var i=j.top-g.arrow_size-g.sliderTooltip.height()-1;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-t-b"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px "+g.arrow_size+"px 0px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height(),left:f-g.arrow_size/2-1+r/2});break}}else{var m=g.sliderTooltip.height();var f=j.left-r-g.arrow_size-g.tickSize;var i=j.top+g._thumbSize/2-m/2-1;if(g.rangeSlider){var e=(g._slider.right.coord().top-g._slider.left.coord().top-g._thumbSize)/2;i=g._slider.left.coord().top-m/2+e+g._thumbSize}switch(g.tooltipPosition){case"far":var f=j.left+g._thumbSize+g.arrow_size+g.tickSize;g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-l-r"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px "+g.arrow_size+"px "+g.arrow_size+"px 0px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height()/2-g.arrow_size/2-2,left:f-g.arrow_size});break;case"near":g.sliderTooltip.offset({top:i,left:f});g.sliderTooltipArrow.addClass(g.toThemeProperty("jqx-tooltip-arrow-l-r"));g.sliderTooltipArrow.css({"border-width":g.arrow_size+"px 0px "+g.arrow_size+"px "+g.arrow_size+"px"});g.sliderTooltipArrow.offset({top:i+g.sliderTooltip.height()/2-g.arrow_size/2-2,left:f+r+2});break}}}},_validateDropPosition:function(e,b){var c=this._track[this._getSetting("size")](),d=b[this._getSetting("size")]();if(e<-d/2){e=-d/2}if(e>c-d/2){e=c-d/2}return Math.floor(e)},propertyChangedHandler:function(b,c,f,e){b.__trackSize=null;b.__thumbSize=null;switch(c){case"theme":a.jqx.utilities.setTheme(f,e,b.host);b._leftButton.jqxRepeatButton({theme:e});b._rightButton.jqxRepeatButton({theme:e});break;case"disabled":if(e){b.disabled=true;b.disable()}else{b.disabled=false;b.enable()}break;case"width":case"height":b.__trackSize=null;b.__thumbSize=null;b._performLayout();b._initialSettings();break;case"min":case"max":b.__trackSize=null;b.__thumbSize=null;if(b.int64===true){b["_"+c+"64"]=new a.jqx.math().fromString(e.toString(),10)}b._initialSettings();break;case"showTicks":case"ticksPosition":case"tickSize":b._performLayout();b._initialSettings();break;case"ticksFrequency":case"minorTicksFrequency":if(b.int64===true){b["_"+c+"64"]=new a.jqx.math().fromString(e.toString(),10)}b._performLayout();b._initialSettings();break;case"showRange":case"showButtons":case"orientation":case"rtl":b._render();b._performLayout();b._initialSettings();break;case"buttonsPosition":b._refresh();break;case"rangeSlider":if(!e){b.value=b.value.rangeEnd}else{b.value={rangeEnd:b.value,rangeStart:b.value}}b._render();b._performLayout();b._initialSettings();break;case"value":var g=e;if(b.int64===true){g=new a.jqx.math().fromString(e.toString(),10);b._value64=g}else{if(!b.rangeSlider){b.value=parseFloat(e)}}b.setValue(g);break;case"values":var d=e;if(b.int64===true){d=[new a.jqx.math().fromString(e[0].toString(),10),new a.jqx.math().fromString(e[1].toString(),10)];b._values64=d}b.setValue(d);break;case"tooltip":break;case"step":b._step64=new a.jqx.math().fromString(e.toString(),10);break;default:b._refresh()}},incrementValue:function(b){if(this.int64===false){if(b==undefined||isNaN(parseFloat(b))){b=this.step}if(this.rangeSlider){if(this.values[1]<this.max){this._setValue(this.values[1]+b,this._slider.right)}}else{if(this.values[1]>=this.min&&this.values[1]<this.max){this._setValue(this.values[1]+b,this._slider.right)}}}else{if(b==undefined||isNaN(parseFloat(b))){b=this._step64}else{b=new a.jqx.math().fromString(b.toString(),10)}if(this.rangeSlider){if(this._values64[1].lessThan(this._max64)){this._setValue(this._values64[1].add(b),this._slider.right)}}else{if(this._values64[1].greaterThanOrEqual(this._min64)&&this._values64[1].lessThan(this._max64)){this._setValue(this._values64[1].add(b),this._slider.right)}}}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},decrementValue:function(b){if(this.int64===false){if(b==undefined||isNaN(parseFloat(b))){b=this.step}if(this.rangeSlider){if(this.values[0]>this.min){this._setValue(this.values[0]-b,this._slider.left)}}else{if(this.values[1]<=this.max&&this.values[1]>this.min){this._setValue(this.values[1]-b,this._slider.right)}}}else{if(b==undefined||isNaN(parseFloat(b))){b=this._step64}else{b=new a.jqx.math().fromString(b.toString(),10)}if(this.rangeSlider){if(this._values64[0].greaterThan(this._min64)){this._setValue(this._values64[0].subtract(b),this._slider.left)}}else{if(this._values64[1].lessThanOrEqual(this._max64)&&this._values64[1].greaterThan(this._min64)){this._setValue(this._values64[1].subtract(b),this._slider.right)}}}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},val:function(b){if(arguments.length==0||(!a.isArray(b)&&typeof(b)=="object")){return this.getValue()}if(this.int64===false){this.setValue(b)}else{value64=new a.jqx.math().fromString(b.toString(),10);this.setValue(value64)}},setValue:function(e){if(this.rangeSlider){var c,b;if(arguments.length<2){if(e instanceof Array){c=e[0];b=e[1]}else{if(typeof e==="object"&&typeof e.rangeStart!=="undefined"&&typeof e.rangeEnd!=="undefined"){c=e.rangeStart;b=e.rangeEnd}}}else{c=arguments[0];b=arguments[1]}this._triggerEvents=false;this._setValue(b,this._slider.right);this._triggerEvents=true;this._setValue(c,this._slider.left)}else{this._triggerEvents=false;var d=this.int64?this._min64:this.min;this._setValue(d,this._slider.left);this._triggerEvents=true;this._setValue(e,this._slider.right)}if(this.input){a.jqx.aria(this,"aria-valuenow",this.input.val())}},getValue:function(){var b=this.value;if(this.int64===true){b=this._value64.toString()}return b},_enable:function(b){if(b){this._addEventHandlers();this.disabled=false;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{this._removeEventHandlers();this.disabled=true;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}this._leftButton.jqxRepeatButton({disabled:this.disabled});this._rightButton.jqxRepeatButton({disabled:this.disabled})},disable:function(){this._enable(false);a.jqx.aria(this,"aria-disabled",true)},enable:function(){this._enable(true);a.jqx.aria(this,"aria-disabled",false)}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxTreeGrid","jqxDataTable",{});a.extend(a.jqx._jqxTreeGrid.prototype,{defineInstance:function(){this.base.treeGrid=this;this.base.exportSettings={recordsInView:false,columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,fileName:"jqxTreeGrid"};var b={pageSizeMode:"default",checkboxes:false,hierarchicalCheckboxes:false,icons:false,showSubAggregates:false,rowDetailsRenderer:null,virtualModeCreateRecords:null,virtualModeRecordCreating:null,loadingFailed:false};a.extend(true,this,b);return b},createInstance:function(b){this.theme=this.base.theme;var c=this},deleteRow:function(b){var c=this.base;c.deleterowbykey(b)},updateRow:function(b,d){var c=this.base;c.updaterowbykey(b,d)},setCellValue:function(c,b,e){var d=this.base;d.setCellValueByKey(c,b,e)},getCellValue:function(c,b){var d=this.base;return d.getCellValueByKey(c,b)},lockRow:function(b){var c=this.base;c.lockrowbykey(b)},unlockRow:function(b){var c=this.base;c.unlockrowbykey(b)},selectRow:function(b){var c=this.base;c.selectrowbykey(b)},unselectRow:function(b){var c=this.base;c.unselectrowbykey(b)},ensureRowVisible:function(b){var c=this.base;c.ensurerowvisiblebykey(b)},beginCellEdit:function(c,b){var e=this.base;var d=e.getColumn(b);e.beginroweditbykey(c,d)},beginRowEdit:function(b){var c=this.base;c.beginroweditbykey(b)},endCellEdit:function(c,b,e){var d=this.base;d.endroweditbykey(c,e)},endRowEdit:function(b,d){var c=this.base;c.endroweditbykey(b,d)},_showLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","visible");a(b.dataloadelement).css("display","block");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},_hideLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","hidden");a(b.dataloadelement).css("display","none");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},getKey:function(b){if(b){return b.uid}},getRows:function(){var b=this.base;if(b.source.hierarchy){if(b.source.hierarchy.length!=0){return b.source.hierarchy}}return b.source.records},getRow:function(d){var e=this.base;var b=e.source.records;if(e.source.hierarchy){var f=function(h){for(var j=0;j<h.length;j++){if(!h[j]){continue}if(h[j].uid==d){return h[j]}if(h[j].records){var k=f(h[j].records);if(k){return k}}}};var g=f(e.source.hierarchy);return g}else{for(var c=0;c<b.length;c++){if(!b[c]){continue}if(b[c].uid==d){return b[c]}}}},_renderrows:function(){var N=this.base;var ar=this;if(N._loading){return}if(N._updating){return}var J=N._names();if(N.source.hierarchy.length===0&&!N.loadingFailed){if(this.virtualModeCreateRecords){var am=function(c){if(c===false||(c&&c.length==0)){N._loading=false;N.loadingFailed=true;N.source.hierarchy=new Array();ar._hideLoadElement();N._renderrows();N._updateScrollbars();N._arrange();return}for(var j=0;j<c.length;j++){c[j].level=0;ar.virtualModeRecordCreating(c[j]);N.rowsByKey[c[j].uid]=c[j]}N.source.hierarchy=c;if(!N.source._source.hierarchy){N.source._source.hierarchy={}}N._loading=false;ar._hideLoadElement();N._renderrows();N._updateScrollbars();N._arrange()};N._loading=true;this.virtualModeCreateRecords(null,am);this._showLoadElement()}}if(N.rendering){N.rendering()}var ay=0;N.table[0].rows=new Array();var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-widget-content")+" "+N.toTP("jqx-item");if(N.rtl){aI+=" "+N.toTP("jqx-cell-rtl")}var b=N.columns.records.length;var O=a.jqx.browser.msie&&a.jqx.browser.version<8;if(O){N.host.attr("hideFocus","true")}var v=new Array();var aF=function(s,w){for(var aJ=0;aJ<s.length;aJ++){var c=s[aJ];if(!c){continue}var j=!N.rowinfo[c.uid]?c.expanded:N.rowinfo[c.uid].expanded;if(N.dataview.filters.length==0){c._visible=true}if(c._visible!==false){if(j||c[J.leaf]){w.push(c);if(c.records&&c.records.length>0){var aK=aF(c.records,new Array());for(var x=0;x<aK.length;x++){w.push(aK[x])}}}else{w.push(c)}}}return w};var ao=N.source.hierarchy.length===0?N.source.records:N.source.hierarchy;ao=N.dataview.evaluate(ao);N.dataViewRecords=ao;if(this.showSubAggregates){var p=function(s,c){if(s!=0){if(c.length>0){if(c[c.length-1]){if(!c[c.length-1].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(c[c.length-2]){if(!c[c.length-2].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}}}}}for(var j=0;j<c.length;j++){if(c[j]&&c[j].records){p(s+1,c[j].records)}}};p(0,ao)}var ap=function(s){var w=0;var i=new Array();for(var c=0;c<s.length;c++){var j=s[c];if(j[J.level]==0){w++}if(w>N.dataview.pagesize*N.dataview.pagenum&&w<=N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){i.push(j)}if(w>N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){break}}return i};if(N.source.hierarchy.length===0){if(N.dataview.pagesize=="all"||!N.pageable||N.serverProcessing){var ak=ao;if(N.pageable&&N.serverProcessing&&ao.length>N.dataview.pagesize){var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}var v=ak}else{var ao=aF.call(N,ao,new Array());if(N.dataview.pagesize=="all"||!N.pageable){var ak=ao}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){ak=ap(ao)}}var v=ak;var I=N.dataview.pagenum;N.updatepagerdetails();if(N.dataview.pagenum!=I){if(N.dataview.pagesize=="all"||!N.pageable){var ak=ao}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){ak=ap(ao)}}var v=ak}}N.renderedRecords=v;var D=v.length;var aG=N.tableZIndex;var k=0;var aq=0;if(O){for(var P=0;P<b;P++){var T=N.columns.records[P];var aw=T.width;if(aw<T.minwidth){aw=T.minwidth}if(aw>T.maxwidth){aw=T.maxwidth}var av=a('<table><tr><td role="gridcell" style="max-width: '+aw+"px; width:"+aw+'px;" class="'+aI+'"></td></tr></table>');a(document.body).append(av);var ag=av.find("td");k=1+parseInt(ag.css("padding-left"))+parseInt(ag.css("padding-right"));av.remove();break}}var B=N.rtl?" "+N.toTP("jqx-grid-table-rtl"):"";var y="<table cellspacing='0' class='"+N.toTP("jqx-grid-table")+B+"' id='table"+N.element.id+"'><colgroup>";var W="<table cellspacing='0' class='"+N.toTP("jqx-grid-table")+B+"' id='pinnedtable"+N.element.id+"'><colgroup>";var ab=null;for(var P=0;P<b;P++){var T=N.columns.records[P];if(T.hidden){continue}ab=T;var aw=T.width;if(aw<T.minwidth){aw=T.minwidth}if(aw>T.maxwidth){aw=T.maxwidth}aw-=k;if(aw<0){aw=0}if(O){var H=aw;if(P==0){H++}W+="<col style='max-width: "+aw+"px; width: "+H+"px;'>";y+="<col style='max-width: "+aw+"px; width: "+H+"px;'>"}else{W+="<col style='max-width: "+aw+"px; width: "+aw+"px;'>";y+="<col style='max-width: "+aw+"px; width: "+aw+"px;'>"}aq+=aw}y+="</colgroup>";W+="</colgroup>";N._hiddencolumns=false;var r=false;if(D===0){var n='<tr role="row">';var q=N.host.height();if(N.pageable){q-=N.pagerHeight;if(N.pagerPosition==="both"){q-=N.pagerHeight}}q-=N.columnsHeight;if(N.filterable){var aB=N.filter.find(".filterrow");var A=N.filter.find(".filterrow-hidden");var E=1;if(A.length>0){E=0}q-=N.filterHeight+N.filterHeight*aB.length*E}if(N.showStatusBar){q-=N.statusBarHeight}if(N.showAggregates){q-=N.aggregatesHeight}if(q<25){q=25}if(N.hScrollBar[0].style.visibility!="hidden"){q-=N.hScrollBar.outerHeight()}if(N.height==="auto"||N.height===null||N.autoheight){q=100}var aw=N.host.width()+2;var av='<td colspan="'+N.columns.records.length+'" role="gridcell" style="border-right-color: transparent; min-height: '+q+"px; height: "+q+"px; min-width:"+aq+"px; max-width:"+aq+"px; width:"+aq+"px;";var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");aI+=" "+N.toTP("jqx-center-align");av+='" class="'+aI+'">';if(!N._loading){av+=N.gridlocalization.emptydatastring}av+="</td>";n+=av;y+=n;W+=n;N.table[0].style.width=aq+2+"px";ay=aq}var m=N.source._source.hierarchy&&N.source._source.hierarchy.groupingDataFields?N.source._source.hierarchy.groupingDataFields.length:0;for(var Q=0;Q<v.length;Q++){var at=v[Q];var ac=at.uid;if(m>0){if(at[J.level]<m){ac=at.uid}}if(at.uid===undefined){at.uid=N.dataview.generatekey()}var n='<tr data-key="'+ac+'" role="row" id="row'+Q+N.element.id+'">';var an='<tr data-key="'+ac+'" role="row" id="row'+Q+N.element.id+'">';if(at.aggregate){var n='<tr data-role="summaryrow" role="row" id="row'+Q+N.element.id+'">';var an='<tr data-role="summaryrow" role="row" id="row'+Q+N.element.id+'">'}var U=0;if(!N.rowinfo[ac]){var z=at[J.checked];if(z===undefined){z=false}N.rowinfo[ac]={selected:at[J.selected],checked:z,icon:at[J.icon],aggregate:at.aggregate,row:at,leaf:at[J.leaf],expanded:at[J.expanded]}}else{if(N.rowinfo[ac].checked===undefined){N.rowinfo[ac].checked=at[J.checked]}if(N.rowinfo[ac].icon===undefined){N.rowinfo[ac].icon=at[J.icon]}if(N.rowinfo[ac].aggregate===undefined){N.rowinfo[ac].aggregate=at[J.aggregate]}if(N.rowinfo[ac].row===undefined){N.rowinfo[ac].row=at}if(N.rowinfo[ac].leaf===undefined){N.rowinfo[ac].leaf=at[J.leaf]}if(N.rowinfo[ac].expanded===undefined){N.rowinfo[ac].expanded=at[J.expanded]}}var h=N.rowinfo[ac];h.row=at;if(at.originalRecord){h.originalRecord=at.originalRecord}var o=0;for(var P=0;P<b;P++){var M=N.columns.records[P];if(M.pinned||(N.rtl&&N.columns.records[b-1].pinned)){r=true}var aw=M.width;if(aw<M.minwidth){aw=M.minwidth}if(aw>M.maxwidth){aw=M.maxwidth}aw-=k;if(aw<0){aw=0}var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");if(M.pinned){aI+=" "+N.toTP("jqx-grid-cell-pinned")}if(N.sortcolumn===M.displayfield){aI+=" "+N.toTP("jqx-grid-cell-sort")}if(N.altRows&&Q%2!=0){aI+=" "+N.toTP("jqx-grid-cell-alt")}if(N.rtl){aI+=" "+N.toTP("jqx-cell-rtl")}var R="";if(m>0&&!O&&!at.aggregate){if(at[J.level]<m){R+=' colspan="'+b+'"';var H=0;for(var K=0;K<b;K++){var S=N.columns.records[K];if(S.hidden){continue}var Z=S.width;if(Z<S.minwidth){aw=S.minwidth}if(Z>S.maxwidth){aw=S.maxwidth}Z-=k;if(Z<0){Z=0}H+=Z}aw=H}}var av='<td role="gridcell"'+R+' style="max-width:'+aw+"px; width:"+aw+"px;";var aj='<td role="gridcell"'+R+' style="pointer-events: none; visibility: hidden; border-color: transparent; max-width:'+aw+"px; width:"+aw+"px;";if(P==b-1&&b==1){av+="border-right-color: transparent;";aj+="border-right-color: transparent;"}if(m>0&&at[J.level]<m&&!at.aggregate){if(N.rtl){aI+=" "+N.toTP("jqx-right-align")}}else{if(M.cellsalign!="left"){if(M.cellsalign==="right"){aI+=" "+N.toTP("jqx-right-align")}else{aI+=" "+N.toTP("jqx-center-align")}}}if(h){if(h.selected){if(N.editKey!==ac){if(N.selectionMode!=="none"){aI+=" "+N.toTP("jqx-grid-cell-selected");aI+=" "+N.toTP("jqx-fill-state-pressed")}}}if(h.locked){aI+=" "+N.toTP("jqx-grid-cell-locked")}if(h.aggregate){aI+=" "+N.toTP("jqx-grid-cell-pinned")}}if(!(M.hidden)){if(o==0&&!N.rtl){av+="border-left-width: 0px;";aj+="border-left-width: 0px;"}else{av+="border-right-width: 0px;";aj+="border-right-width: 0px;"}o++;U+=k+aw}else{av+="display: none;";aj+="display: none;";N._hiddencolumns=true}if(M.pinned){av+="pointer-events: auto;";aj+="pointer-events: auto;"}var u="";if((N.source.hierarchy.length==0||(!at.records||(at.records&&at.records.length===0)))&&!this.virtualModeCreateRecords){h.leaf=true}if(at.records&&at.records.length>0){h.leaf=false}if(N.dataview.filters.length>0){if(at.records&&at.records.length>0){var aa=false;for(var L=0;L<at.records.length;L++){if(at.records[L]._visible!==false&&at.records[L].aggregate==undefined){aa=true;break}}if(!aa){h.leaf=true}else{h.leaf=false}}}if(h&&!h.leaf){if(h.expanded){u+=N.toTP("jqx-tree-grid-expand-button")+" ";if(!N.rtl){u+=N.toTP("jqx-grid-group-expand")}else{u+=N.toTP("jqx-grid-group-expand-rtl")}u+=" "+N.toTP("jqx-icon-arrow-down")}else{u+=N.toTP("jqx-tree-grid-collapse-button")+" ";if(!N.rtl){u+=N.toTP("jqx-grid-group-collapse");u+=" "+N.toTP("jqx-icon-arrow-right")}else{u+=N.toTP("jqx-grid-group-collapse-rtl");u+=" "+N.toTP("jqx-icon-arrow-left")}}}if(!N.autoRowHeight||o===1||(N.autoRowHeight&&!M.autoCellHeight)){aI+=" "+N.toTP("jqx-grid-cell-nowrap")}var V=N._getcellvalue(M,h.row);if(m>0&&!at.aggregate){if(at[J.level]<m){V=at.label}}if(M.cellsFormat!=""){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(V)){V=a.jqx.dataFormat.formatdate(V,M.cellsFormat,N.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(V)||(!isNaN(parseFloat(V))&&isFinite(V))){V=a.jqx.dataFormat.formatnumber(V,M.cellsFormat,N.gridlocalization)}}}}if(M.cellclassname!=""&&M.cellclassname){if(typeof M.cellclassname=="string"){aI+=" "+M.cellclassname}else{var aH=M.cellclassname(Q,M.datafield,N._getcellvalue(M,h.row),h.row,V);if(aH){aI+=" "+aH}}}if(M.cellsRenderer!=""&&M.cellsRenderer){var C=M.cellsRenderer(ac,M.datafield,N._getcellvalue(M,h.row),h.row,V);if(C!==undefined){V=C}}if(h.aggregate){if(M.aggregates){var au=at.siblings.slice(0,at.siblings.length-1);var X=N._calculateaggregate(M,null,true,au);at[M.displayfield]="";if(X){if(M.aggregatesRenderer){if(X){var G=M.aggregatesRenderer(X[M.datafield],M,null,N.getcolumnaggregateddata(M.datafield,M.aggregates,false,au),"subAggregates");V=G;at[M.displayfield]+=name+":"+X[M.datafield]+"\n"}}else{V="";at[M.displayfield]="";a.each(X,function(){var i=this;for(obj in i){var c=obj;c=N._getaggregatename(c);var j='<div style="position: relative; margin: 0px; overflow: hidden;">'+c+":"+i[obj]+"</div>";V+=j;at[M.displayfield]+=c+":"+i[obj]+"\n"}})}}else{V=""}}}if((o===1&&!N.rtl)||(M==ab&&N.rtl)||(m>0&&at[J.level]<m)){var ae="";var d=N.toThemeProperty("jqx-tree-grid-indent");var Y=h.leaf?1:0;for(var F=0;F<at[J.level]+Y;F++){ae+="<span class='"+d+"'></span>"}var al="<span class='"+u+"'></span>";var az="";var e="";if(this.checkboxes&&!at.aggregate){var aC=N.toThemeProperty("jqx-tree-grid-checkbox")+" "+d+" "+N.toThemeProperty("jqx-checkbox-default")+" "+N.toThemeProperty("jqx-fill-state-normal")+" "+N.toThemeProperty("jqx-rc-all");var g=true;if(a.isFunction(this.checkboxes)){g=this.checkboxes(ac,at);if(g==undefined){g=false}}if(g){if(h){var ax=h.checked;if(this.hierarchicalCheckboxes==false&&ax===null){ax=false}if(ax){az+="<span class='"+aC+"'><div class='"+N.toThemeProperty("jqx-tree-grid-checkbox-tick")+" "+N.toThemeProperty("jqx-checkbox-check-checked")+"'></div></span>"}else{if(ax===false){az+="<span class='"+aC+"'></span>"}else{az+="<span class='"+aC+"'><div class='"+N.toThemeProperty("jqx-tree-grid-checkbox-tick")+" "+N.toThemeProperty("jqx-checkbox-check-indeterminate")+"'></div></span>"}}}else{az+="<span class='"+aC+"'></span>"}}}if(this.icons&&!at.aggregate){var af=N.toThemeProperty("jqx-tree-grid-icon")+" "+d;if(N.rtl){var af=N.toThemeProperty("jqx-tree-grid-icon")+" "+N.toThemeProperty("jqx-tree-grid-icon-rtl")+" "+d}var aA=N.toThemeProperty("jqx-tree-grid-icon-size")+" "+d;var f=h.icon;if(a.isFunction(this.icons)){h.icon=this.icons(ac,at);if(h.icon){f=true}}if(f){if(h.icon){e+="<span class='"+af+"'><img class='"+aA+"' src='"+h.icon+"'/></span>"}else{e+="<span class='"+af+"'></span>"}}}var ad=N.autoRowHeight&&o===1&&M.autoCellHeight?" "+N.toTP("jqx-grid-cell-wrap"):"";var ai=ae+al+az+e+"<span class='"+N.toThemeProperty("jqx-tree-grid-title")+ad+"'>"+V+"</span>";if(!N.rtl){V=ai}else{V="<span class='"+N.toThemeProperty("jqx-tree-grid-title")+ad+"'>"+V+"</span>"+e+az+al+ae}}if(m>0&&O&&P>=m){if(at[J.level]<m){av+="padding-left: 5px; border-left-width: 0px;";aj+="padding-left: 5px; border-left-width: 0px;";V="<span style='visibility: hidden;'>-</span>"}}av+='" class="'+aI+'">';av+=V;av+="</td>";aj+='" class="'+aI+'">';aj+=V;aj+="</td>";if(!M.pinned){n+=av;if(r){an+=aj}}else{an+=av;n+=av}if(m>0&&!O){if(at[J.level]<m&&!at.aggregate){break}}}if(ay==0){N.table[0].style.width=U+2+"px";ay=U}n+="</tr>";an+="</tr>";y+=n;W+=an;if(N.rowDetails&&!at.aggregate&&this.rowDetailsRenderer){var l='<tr data-role="row-details"><td valign="top" align="left" style="pointer-events: auto; max-width:'+aw+"px; width:"+aw+'px; overflow: hidden; border-left: none; border-right: none;" colspan="'+N.columns.records.length+'" role="gridcell"';var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");aI+=" "+N.toTP("jqx-details");aI+=" "+N.toTP("jqx-reset");var ah=this.rowDetailsRenderer(ac,at);if(ah){l+='" class="'+aI+'"><div style="pointer-events: auto; overflow: hidden;"><div data-role="details">'+ah+"</div></div></td></tr>";y+=l;W+=l}}}y+="</table>";W+="</table>";if(r){if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(W+y)})}else{N.table[0].innerHTML=W+y}var aD=N.table.find("#table"+N.element.id);var aE=N.table.find("#pinnedtable"+N.element.id);aE.css("float","left");aE.css("pointer-events","none");aD.css("float","left");aE[0].style.position="absolute";aD[0].style.position="relative";aD[0].style.zIndex=aG-10;aE[0].style.zIndex=aG+10;N._table=aD;N._table[0].style.left="0px";N._pinnedTable=aE;if(O){aE[0].style.left="0px"}N._table[0].style.width=ay+"px";N._pinnedTable[0].style.width=ay+"px";if(N.rtl&&N._haspinned){N._pinnedTable[0].style.left=3-ay+parseInt(N.element.style.width)+"px"}}else{if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(y)})}else{N.table[0].innerHTML=y}var K=N.table.find("#table"+N.element.id);N._table=K;if(a.jqx.browser.msie&&a.jqx.browser.version<10){N._table[0].style.width=ay+"px"}if(D===0){N._table[0].style.width=(2+ay)+"px"}}if(D===0){N._table[0].style.tableLayout="auto";if(N._pinnedTable){N._pinnedTable[0].style.tableLayout="auto"}}if(N.showAggregates){N._updatecolumnsaggregates()}if(N._loading&&D==0){N._arrange();this._showLoadElement()}if(N.rendered){N.rendered()}},propertyChangedHandler:function(b,c,e,d){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="pageSizeMode"||c=="hierarchicalCheckboxes"){b._renderrows()}},checkRow:function(c,d,b){var e=this.base;var g=e._names();if(e._loading){return}var f=e.rowinfo[c];if(f){f.checked=true;f.row[g.checked]=true;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(f.row,f.row)}if(d!==false){e._renderrows()}e._raiseEvent("rowCheck",{key:c,row:f.row})}else{var h=this.getRow(c);if(h){e.rowinfo[c]={row:h,checked:true};e.rowinfo[c].row[g.checked]=true;e._raiseEvent("rowCheck",{key:c,row:h});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(h,h)}if(d!==false){e._renderrows()}}}},checkRows:function(d,n){var e=this.base;var j=this;var i=e._names();var l=function(o){var p=new Array();var q=function(s){for(var r=0;r<s.length;r++){p.push(s[r]);if(s[r].records){q(s[r].records)}}};if(o.records){q(o.records)}return p};if(d!=null){var f=0;var c=false;var g=0;var b=function(o){for(var p=0;p<o.length;p++){var q=o[p][i.checked];if(q===undefined){q=false}if(q!=false){if(o[p][i.checked]==null){c=true}if(o[p].records){b(o[p].records)}f++}g++}};if(d.records){b(d.records)}if(d!=n){if(f==g){this.checkRow(d.uid,false,"tree")}else{if(f>0){this.indeterminateRow(d.uid,false,"tree")}else{this.uncheckRow(d.uid,false,"tree")}}}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}var m=d[i.parent]?d[i.parent]:null;this.checkRows(m,n)}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}},indeterminateRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=null;g.row[h.checked]=null;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:null};f.rowinfo[c].row[h.checked]=null;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},uncheckRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=false;g.row[h.checked]=false;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}f._raiseEvent("rowUncheck",{key:c,row:g.row})}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:false};f.rowinfo[c].row[h.checked]=false;f._raiseEvent("rowUncheck",{key:c,row:i});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},expandRow:function(d){var f=this.base;if(f._loading){return}var i=f._names();var e=this;var h=f.rowinfo[d];if(h){if(h.expanded){h.row[i.expanded]=true;return}h.expanded=true;h.row[i.expanded]=true;if(h.originalRecord){h.originalRecord[i.expanded]=true}if(this.virtualModeCreateRecords&&!h.row._loadedOnDemand){var c=function(k){h.row._loadedOnDemand=true;if(k===false){f._loading=false;e._hideLoadElement();h.leaf=true;h.row[i.leaf]=true;f._renderrows();return}for(var l=0;l<k.length;l++){k[l][i.level]=h.row[i.level]+1;k[l][i.parent]=h.row;if(f.rowsByKey[k[l].uid]){f._loading=false;e._hideLoadElement();h.leaf=true;h.row[i.leaf]=true;f._renderrows();throw new Error("Please, check whether you Add Records with unique ID/Key. ")}f.rowsByKey[k[l].uid]=k[l];e.virtualModeRecordCreating(k[l])}if(!h.row.records){h.row.records=k}else{h.row.records=h.row.records.concat(k)}if((!k)||(k&&k.length==0)){h.leaf=true;h.row[i.leaf]=true}if(h.originalRecord){h.originalRecord.records=k;h.originalRecord[i.expanded]=true;if(k.length==0){h.originalRecord[i.leaf]=true}}f._loading=false;e._hideLoadElement();var j=f.vScrollBar.css("visibility");f._renderrows();f._updateScrollbars();var m=j!=f.vScrollBar.css("visibility");if(f.height==="auto"||f.height===null||f.autoheight||m){f._arrange()}f._renderhorizontalscroll()};if(!h.row[i.leaf]){f._loading=true;this._showLoadElement();this.virtualModeCreateRecords(h.row,c);return}}if(!f.updating()){var b=f.vScrollBar.css("visibility");f._renderrows();f._updateScrollbars();var g=b!=f.vScrollBar.css("visibility");if(f.height==="auto"||f.height===null||f.autoheight||g){f._arrange()}f._renderhorizontalscroll();f._raiseEvent("rowExpand",{row:h.row,key:d})}}},collapseRow:function(c){var d=this.base;var g=d._names();if(d._loading){return}var f=d.rowinfo[c];if(f){if(!f.expanded){f.row[g.expanded]=false;return}f.expanded=false;f.row[g.expanded]=false;if(f.originalRecord){f.originalRecord[g.expanded]=false}if(!d.updating()){var b=d.vScrollBar.css("visibility");d._renderrows();d._updateScrollbars();var e=b!=d.vScrollBar.css("visibility");if(d.height==="auto"||d.height===null||d.autoheight||e){d._arrange()}d._renderhorizontalscroll();d._raiseEvent("rowCollapse",{row:f.row,key:c})}}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxTreeGrid","jqxDataTable",{});a.extend(a.jqx._jqxTreeGrid.prototype,{defineInstance:function(){this.base.treeGrid=this;this.base.exportSettings={recordsInView:false,columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,fileName:"jqxTreeGrid"};var b={pageSizeMode:"default",checkboxes:false,hierarchicalCheckboxes:false,icons:false,showSubAggregates:false,rowDetailsRenderer:null,virtualModeCreateRecords:null,virtualModeRecordCreating:null,loadingFailed:false};a.extend(true,this,b);return b},createInstance:function(b){this.theme=this.base.theme;var c=this},deleteRow:function(b){var c=this.base;c.deleterowbykey(b)},updateRow:function(b,d){var c=this.base;c.updaterowbykey(b,d)},setCellValue:function(c,b,e){var d=this.base;d.setCellValueByKey(c,b,e)},getCellValue:function(c,b){var d=this.base;return d.getCellValueByKey(c,b)},lockRow:function(b){var c=this.base;c.lockrowbykey(b)},unlockRow:function(b){var c=this.base;c.unlockrowbykey(b)},selectRow:function(b){var c=this.base;c.selectrowbykey(b)},unselectRow:function(b){var c=this.base;c.unselectrowbykey(b)},ensureRowVisible:function(b){var c=this.base;c.ensurerowvisiblebykey(b)},beginCellEdit:function(c,b){var e=this.base;var d=e.getColumn(b);e.beginroweditbykey(c,d)},beginRowEdit:function(b){var c=this.base;c.beginroweditbykey(b)},endCellEdit:function(c,b,e){var d=this.base;d.endroweditbykey(c,e)},endRowEdit:function(b,d){var c=this.base;c.endroweditbykey(b,d)},_showLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","visible");a(b.dataloadelement).css("display","block");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},_hideLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","hidden");a(b.dataloadelement).css("display","none");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},getKey:function(b){if(b){return b.uid}},getRows:function(){var b=this.base;if(b.source.hierarchy){if(b.source.hierarchy.length!=0){return b.source.hierarchy}}return b.source.records},getRow:function(d){var e=this.base;var b=e.source.records;if(e.source.hierarchy){var f=function(h){for(var j=0;j<h.length;j++){if(!h[j]){continue}if(h[j].uid==d){return h[j]}if(h[j].records){var k=f(h[j].records);if(k){return k}}}};var g=f(e.source.hierarchy);return g}else{for(var c=0;c<b.length;c++){if(!b[c]){continue}if(b[c].uid==d){return b[c]}}}},_renderrows:function(){var N=this.base;var ar=this;if(N._loading){return}if(N._updating){return}var J=N._names();if(N.source.hierarchy.length===0&&!N.loadingFailed){if(this.virtualModeCreateRecords){var am=function(c){if(c===false||(c&&c.length==0)){N._loading=false;N.loadingFailed=true;N.source.hierarchy=new Array();ar._hideLoadElement();N._renderrows();N._updateScrollbars();N._arrange();return}for(var j=0;j<c.length;j++){c[j].level=0;ar.virtualModeRecordCreating(c[j]);N.rowsByKey[c[j].uid]=c[j]}N.source.hierarchy=c;if(!N.source._source.hierarchy){N.source._source.hierarchy={}}N._loading=false;ar._hideLoadElement();N._renderrows();N._updateScrollbars();N._arrange()};N._loading=true;this.virtualModeCreateRecords(null,am);this._showLoadElement()}}if(N.rendering){N.rendering()}var ay=0;N.table[0].rows=new Array();var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-widget-content")+" "+N.toTP("jqx-item");if(N.rtl){aI+=" "+N.toTP("jqx-cell-rtl")}var b=N.columns.records.length;var O=a.jqx.browser.msie&&a.jqx.browser.version<8;if(O){N.host.attr("hideFocus","true")}var v=new Array();var aF=function(s,w){for(var aJ=0;aJ<s.length;aJ++){var c=s[aJ];if(!c){continue}var j=!N.rowinfo[c.uid]?c.expanded:N.rowinfo[c.uid].expanded;if(N.dataview.filters.length==0){c._visible=true}if(c._visible!==false){if(j||c[J.leaf]){w.push(c);if(c.records&&c.records.length>0){var aK=aF(c.records,new Array());for(var x=0;x<aK.length;x++){w.push(aK[x])}}}else{w.push(c)}}}return w};var ao=N.source.hierarchy.length===0?N.source.records:N.source.hierarchy;ao=N.dataview.evaluate(ao);N.dataViewRecords=ao;if(this.showSubAggregates){var p=function(s,c){if(s!=0){if(c.length>0){if(c[c.length-1]){if(!c[c.length-1].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(c[c.length-2]){if(!c[c.length-2].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}}}}}for(var j=0;j<c.length;j++){if(c[j]&&c[j].records){p(s+1,c[j].records)}}};p(0,ao)}var ap=function(s){var w=0;var i=new Array();for(var c=0;c<s.length;c++){var j=s[c];if(j[J.level]==0){w++}if(w>N.dataview.pagesize*N.dataview.pagenum&&w<=N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){i.push(j)}if(w>N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){break}}return i};if(N.source.hierarchy.length===0){if(N.dataview.pagesize=="all"||!N.pageable||N.serverProcessing){var ak=ao;if(N.pageable&&N.serverProcessing&&ao.length>N.dataview.pagesize){var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}var v=ak}else{var ao=aF.call(N,ao,new Array());if(N.dataview.pagesize=="all"||!N.pageable){var ak=ao}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){ak=ap(ao)}}var v=ak;var I=N.dataview.pagenum;N.updatepagerdetails();if(N.dataview.pagenum!=I){if(N.dataview.pagesize=="all"||!N.pageable){var ak=ao}else{var ak=ao.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){ak=ap(ao)}}var v=ak}}N.renderedRecords=v;var D=v.length;var aG=N.tableZIndex;var k=0;var aq=0;if(O){for(var P=0;P<b;P++){var T=N.columns.records[P];var aw=T.width;if(aw<T.minwidth){aw=T.minwidth}if(aw>T.maxwidth){aw=T.maxwidth}var av=a('<table><tr><td role="gridcell" style="max-width: '+aw+"px; width:"+aw+'px;" class="'+aI+'"></td></tr></table>');a(document.body).append(av);var ag=av.find("td");k=1+parseInt(ag.css("padding-left"))+parseInt(ag.css("padding-right"));av.remove();break}}var B=N.rtl?" "+N.toTP("jqx-grid-table-rtl"):"";var y="<table cellspacing='0' class='"+N.toTP("jqx-grid-table")+B+"' id='table"+N.element.id+"'><colgroup>";var W="<table cellspacing='0' class='"+N.toTP("jqx-grid-table")+B+"' id='pinnedtable"+N.element.id+"'><colgroup>";var ab=null;for(var P=0;P<b;P++){var T=N.columns.records[P];if(T.hidden){continue}ab=T;var aw=T.width;if(aw<T.minwidth){aw=T.minwidth}if(aw>T.maxwidth){aw=T.maxwidth}aw-=k;if(aw<0){aw=0}if(O){var H=aw;if(P==0){H++}W+="<col style='max-width: "+aw+"px; width: "+H+"px;'>";y+="<col style='max-width: "+aw+"px; width: "+H+"px;'>"}else{W+="<col style='max-width: "+aw+"px; width: "+aw+"px;'>";y+="<col style='max-width: "+aw+"px; width: "+aw+"px;'>"}aq+=aw}y+="</colgroup>";W+="</colgroup>";N._hiddencolumns=false;var r=false;if(D===0){var n='<tr role="row">';var q=N.host.height();if(N.pageable){q-=N.pagerHeight;if(N.pagerPosition==="both"){q-=N.pagerHeight}}q-=N.columnsHeight;if(N.filterable){var aB=N.filter.find(".filterrow");var A=N.filter.find(".filterrow-hidden");var E=1;if(A.length>0){E=0}q-=N.filterHeight+N.filterHeight*aB.length*E}if(N.showStatusBar){q-=N.statusBarHeight}if(N.showAggregates){q-=N.aggregatesHeight}if(q<25){q=25}if(N.hScrollBar[0].style.visibility!="hidden"){q-=N.hScrollBar.outerHeight()}if(N.height==="auto"||N.height===null||N.autoheight){q=100}var aw=N.host.width()+2;var av='<td colspan="'+N.columns.records.length+'" role="gridcell" style="border-right-color: transparent; min-height: '+q+"px; height: "+q+"px; min-width:"+aq+"px; max-width:"+aq+"px; width:"+aq+"px;";var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");aI+=" "+N.toTP("jqx-center-align");av+='" class="'+aI+'">';if(!N._loading){av+=N.gridlocalization.emptydatastring}av+="</td>";n+=av;y+=n;W+=n;N.table[0].style.width=aq+2+"px";ay=aq}var m=N.source._source.hierarchy&&N.source._source.hierarchy.groupingDataFields?N.source._source.hierarchy.groupingDataFields.length:0;for(var Q=0;Q<v.length;Q++){var at=v[Q];var ac=at.uid;if(m>0){if(at[J.level]<m){ac=at.uid}}if(at.uid===undefined){at.uid=N.dataview.generatekey()}var n='<tr data-key="'+ac+'" role="row" id="row'+Q+N.element.id+'">';var an='<tr data-key="'+ac+'" role="row" id="row'+Q+N.element.id+'">';if(at.aggregate){var n='<tr data-role="summaryrow" role="row" id="row'+Q+N.element.id+'">';var an='<tr data-role="summaryrow" role="row" id="row'+Q+N.element.id+'">'}var U=0;if(!N.rowinfo[ac]){var z=at[J.checked];if(z===undefined){z=false}N.rowinfo[ac]={selected:at[J.selected],checked:z,icon:at[J.icon],aggregate:at.aggregate,row:at,leaf:at[J.leaf],expanded:at[J.expanded]}}else{if(N.rowinfo[ac].checked===undefined){N.rowinfo[ac].checked=at[J.checked]}if(N.rowinfo[ac].icon===undefined){N.rowinfo[ac].icon=at[J.icon]}if(N.rowinfo[ac].aggregate===undefined){N.rowinfo[ac].aggregate=at[J.aggregate]}if(N.rowinfo[ac].row===undefined){N.rowinfo[ac].row=at}if(N.rowinfo[ac].leaf===undefined){N.rowinfo[ac].leaf=at[J.leaf]}if(N.rowinfo[ac].expanded===undefined){N.rowinfo[ac].expanded=at[J.expanded]}}var h=N.rowinfo[ac];h.row=at;if(at.originalRecord){h.originalRecord=at.originalRecord}var o=0;for(var P=0;P<b;P++){var M=N.columns.records[P];if(M.pinned||(N.rtl&&N.columns.records[b-1].pinned)){r=true}var aw=M.width;if(aw<M.minwidth){aw=M.minwidth}if(aw>M.maxwidth){aw=M.maxwidth}aw-=k;if(aw<0){aw=0}var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");if(M.pinned){aI+=" "+N.toTP("jqx-grid-cell-pinned")}if(N.sortcolumn===M.displayfield){aI+=" "+N.toTP("jqx-grid-cell-sort")}if(N.altRows&&Q%2!=0){aI+=" "+N.toTP("jqx-grid-cell-alt")}if(N.rtl){aI+=" "+N.toTP("jqx-cell-rtl")}var R="";if(m>0&&!O&&!at.aggregate){if(at[J.level]<m){R+=' colspan="'+b+'"';var H=0;for(var K=0;K<b;K++){var S=N.columns.records[K];if(S.hidden){continue}var Z=S.width;if(Z<S.minwidth){aw=S.minwidth}if(Z>S.maxwidth){aw=S.maxwidth}Z-=k;if(Z<0){Z=0}H+=Z}aw=H}}var av='<td role="gridcell"'+R+' style="max-width:'+aw+"px; width:"+aw+"px;";var aj='<td role="gridcell"'+R+' style="pointer-events: none; visibility: hidden; border-color: transparent; max-width:'+aw+"px; width:"+aw+"px;";if(P==b-1&&b==1){av+="border-right-color: transparent;";aj+="border-right-color: transparent;"}if(m>0&&at[J.level]<m&&!at.aggregate){if(N.rtl){aI+=" "+N.toTP("jqx-right-align")}}else{if(M.cellsalign!="left"){if(M.cellsalign==="right"){aI+=" "+N.toTP("jqx-right-align")}else{aI+=" "+N.toTP("jqx-center-align")}}}if(h){if(h.selected){if(N.editKey!==ac){if(N.selectionMode!=="none"){aI+=" "+N.toTP("jqx-grid-cell-selected");aI+=" "+N.toTP("jqx-fill-state-pressed")}}}if(h.locked){aI+=" "+N.toTP("jqx-grid-cell-locked")}if(h.aggregate){aI+=" "+N.toTP("jqx-grid-cell-pinned")}}if(!(M.hidden)){if(o==0&&!N.rtl){av+="border-left-width: 0px;";aj+="border-left-width: 0px;"}else{av+="border-right-width: 0px;";aj+="border-right-width: 0px;"}o++;U+=k+aw}else{av+="display: none;";aj+="display: none;";N._hiddencolumns=true}if(M.pinned){av+="pointer-events: auto;";aj+="pointer-events: auto;"}var u="";if((N.source.hierarchy.length==0||(!at.records||(at.records&&at.records.length===0)))&&!this.virtualModeCreateRecords){h.leaf=true}if(at.records&&at.records.length>0){h.leaf=false}if(N.dataview.filters.length>0){if(at.records&&at.records.length>0){var aa=false;for(var L=0;L<at.records.length;L++){if(at.records[L]._visible!==false&&at.records[L].aggregate==undefined){aa=true;break}}if(!aa){h.leaf=true}else{h.leaf=false}}}if(h&&!h.leaf){if(h.expanded){u+=N.toTP("jqx-tree-grid-expand-button")+" ";if(!N.rtl){u+=N.toTP("jqx-grid-group-expand")}else{u+=N.toTP("jqx-grid-group-expand-rtl")}u+=" "+N.toTP("jqx-icon-arrow-down")}else{u+=N.toTP("jqx-tree-grid-collapse-button")+" ";if(!N.rtl){u+=N.toTP("jqx-grid-group-collapse");u+=" "+N.toTP("jqx-icon-arrow-right")}else{u+=N.toTP("jqx-grid-group-collapse-rtl");u+=" "+N.toTP("jqx-icon-arrow-left")}}}if(!N.autoRowHeight||o===1||(N.autoRowHeight&&!M.autoCellHeight)){aI+=" "+N.toTP("jqx-grid-cell-nowrap")}var V=N._getcellvalue(M,h.row);if(m>0&&!at.aggregate){if(at[J.level]<m){V=at.label}}if(M.cellsFormat!=""){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(V)){V=a.jqx.dataFormat.formatdate(V,M.cellsFormat,N.gridlocalization)}else{if(a.jqx.dataFormat.isNumber(V)||(!isNaN(parseFloat(V))&&isFinite(V))){V=a.jqx.dataFormat.formatnumber(V,M.cellsFormat,N.gridlocalization)}}}}if(M.cellclassname!=""&&M.cellclassname){if(typeof M.cellclassname=="string"){aI+=" "+M.cellclassname}else{var aH=M.cellclassname(Q,M.datafield,N._getcellvalue(M,h.row),h.row,V);if(aH){aI+=" "+aH}}}if(M.cellsRenderer!=""&&M.cellsRenderer){var C=M.cellsRenderer(ac,M.datafield,N._getcellvalue(M,h.row),h.row,V);if(C!==undefined){V=C}}if(h.aggregate){if(M.aggregates){var au=at.siblings.slice(0,at.siblings.length-1);var X=N._calculateaggregate(M,null,true,au);at[M.displayfield]="";if(X){if(M.aggregatesRenderer){if(X){var G=M.aggregatesRenderer(X[M.datafield],M,null,N.getcolumnaggregateddata(M.datafield,M.aggregates,false,au),"subAggregates");V=G;at[M.displayfield]+=name+":"+X[M.datafield]+"\n"}}else{V="";at[M.displayfield]="";a.each(X,function(){var i=this;for(obj in i){var c=obj;c=N._getaggregatename(c);var j='<div style="position: relative; margin: 0px; overflow: hidden;">'+c+":"+i[obj]+"</div>";V+=j;at[M.displayfield]+=c+":"+i[obj]+"\n"}})}}else{V=""}}}if((o===1&&!N.rtl)||(M==ab&&N.rtl)||(m>0&&at[J.level]<m)){var ae="";var d=N.toThemeProperty("jqx-tree-grid-indent");var Y=h.leaf?1:0;for(var F=0;F<at[J.level]+Y;F++){ae+="<span class='"+d+"'></span>"}var al="<span class='"+u+"'></span>";var az="";var e="";if(this.checkboxes&&!at.aggregate){var aC=N.toThemeProperty("jqx-tree-grid-checkbox")+" "+d+" "+N.toThemeProperty("jqx-checkbox-default")+" "+N.toThemeProperty("jqx-fill-state-normal")+" "+N.toThemeProperty("jqx-rc-all");var g=true;if(a.isFunction(this.checkboxes)){g=this.checkboxes(ac,at);if(g==undefined){g=false}}if(g){if(h){var ax=h.checked;if(this.hierarchicalCheckboxes==false&&ax===null){ax=false}if(ax){az+="<span class='"+aC+"'><div class='"+N.toThemeProperty("jqx-tree-grid-checkbox-tick")+" "+N.toThemeProperty("jqx-checkbox-check-checked")+"'></div></span>"}else{if(ax===false){az+="<span class='"+aC+"'></span>"}else{az+="<span class='"+aC+"'><div class='"+N.toThemeProperty("jqx-tree-grid-checkbox-tick")+" "+N.toThemeProperty("jqx-checkbox-check-indeterminate")+"'></div></span>"}}}else{az+="<span class='"+aC+"'></span>"}}}if(this.icons&&!at.aggregate){var af=N.toThemeProperty("jqx-tree-grid-icon")+" "+d;if(N.rtl){var af=N.toThemeProperty("jqx-tree-grid-icon")+" "+N.toThemeProperty("jqx-tree-grid-icon-rtl")+" "+d}var aA=N.toThemeProperty("jqx-tree-grid-icon-size")+" "+d;var f=h.icon;if(a.isFunction(this.icons)){h.icon=this.icons(ac,at);if(h.icon){f=true}}if(f){if(h.icon){e+="<span class='"+af+"'><img class='"+aA+"' src='"+h.icon+"'/></span>"}else{e+="<span class='"+af+"'></span>"}}}var ad=N.autoRowHeight&&o===1&&M.autoCellHeight?" "+N.toTP("jqx-grid-cell-wrap"):"";var ai=ae+al+az+e+"<span class='"+N.toThemeProperty("jqx-tree-grid-title")+ad+"'>"+V+"</span>";if(!N.rtl){V=ai}else{V="<span class='"+N.toThemeProperty("jqx-tree-grid-title")+ad+"'>"+V+"</span>"+e+az+al+ae}}if(m>0&&O&&P>=m){if(at[J.level]<m){av+="padding-left: 5px; border-left-width: 0px;";aj+="padding-left: 5px; border-left-width: 0px;";V="<span style='visibility: hidden;'>-</span>"}}av+='" class="'+aI+'">';av+=V;av+="</td>";aj+='" class="'+aI+'">';aj+=V;aj+="</td>";if(!M.pinned){n+=av;if(r){an+=aj}}else{an+=av;n+=av}if(m>0&&!O){if(at[J.level]<m&&!at.aggregate){break}}}if(ay==0){N.table[0].style.width=U+2+"px";ay=U}n+="</tr>";an+="</tr>";y+=n;W+=an;if(N.rowDetails&&!at.aggregate&&this.rowDetailsRenderer){var l='<tr data-role="row-details"><td valign="top" align="left" style="pointer-events: auto; max-width:'+aw+"px; width:"+aw+'px; overflow: hidden; border-left: none; border-right: none;" colspan="'+N.columns.records.length+'" role="gridcell"';var aI=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");aI+=" "+N.toTP("jqx-details");aI+=" "+N.toTP("jqx-reset");var ah=this.rowDetailsRenderer(ac,at);if(ah){l+='" class="'+aI+'"><div style="pointer-events: auto; overflow: hidden;"><div data-role="details">'+ah+"</div></div></td></tr>";y+=l;W+=l}}}y+="</table>";W+="</table>";if(r){if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(W+y)})}else{N.table[0].innerHTML=W+y}var aD=N.table.find("#table"+N.element.id);var aE=N.table.find("#pinnedtable"+N.element.id);aE.css("float","left");aE.css("pointer-events","none");aD.css("float","left");aE[0].style.position="absolute";aD[0].style.position="relative";aD[0].style.zIndex=aG-10;aE[0].style.zIndex=aG+10;N._table=aD;N._table[0].style.left="0px";N._pinnedTable=aE;if(O){aE[0].style.left="0px"}N._table[0].style.width=ay+"px";N._pinnedTable[0].style.width=ay+"px";if(N.rtl&&N._haspinned){N._pinnedTable[0].style.left=3-ay+parseInt(N.element.style.width)+"px"}}else{if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(y)})}else{N.table[0].innerHTML=y}var K=N.table.find("#table"+N.element.id);N._table=K;if(a.jqx.browser.msie&&a.jqx.browser.version<10){N._table[0].style.width=ay+"px"}if(D===0){N._table[0].style.width=(2+ay)+"px"}}if(D===0){N._table[0].style.tableLayout="auto";if(N._pinnedTable){N._pinnedTable[0].style.tableLayout="auto"}}if(N.showAggregates){N._updatecolumnsaggregates()}if(N._loading&&D==0){N._arrange();this._showLoadElement()}if(N.rendered){N.rendered()}},propertyChangedHandler:function(b,c,e,d){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="pageSizeMode"||c=="hierarchicalCheckboxes"){b._renderrows()}},checkRow:function(c,d,b){var e=this.base;var g=e._names();if(e._loading){return}var f=e.rowinfo[c];if(f){f.checked=true;f.row[g.checked]=true;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(f.row,f.row)}if(d!==false){e._renderrows()}e._raiseEvent("rowCheck",{key:c,row:f.row})}else{var h=this.getRow(c);if(h){e.rowinfo[c]={row:h,checked:true};e.rowinfo[c].row[g.checked]=true;if(h.originalRecord){e.rowinfo[c].originalRecord=h.originalRecord}e._raiseEvent("rowCheck",{key:c,row:h});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(h,h)}if(d!==false){e._renderrows()}}}},checkRows:function(d,n){var e=this.base;var j=this;var i=e._names();var l=function(o){var p=new Array();var q=function(s){for(var r=0;r<s.length;r++){p.push(s[r]);if(s[r].records){q(s[r].records)}}};if(o.records){q(o.records)}return p};if(d!=null){var f=0;var c=false;var g=0;var b=function(o){for(var p=0;p<o.length;p++){var q=o[p][i.checked];if(q===undefined){q=false}if(q!=false){if(o[p][i.checked]==null){c=true}if(o[p].records){b(o[p].records)}f++}g++}};if(d.records){b(d.records)}if(d!=n){if(f==g){this.checkRow(d.uid,false,"tree")}else{if(f>0){this.indeterminateRow(d.uid,false,"tree")}else{this.uncheckRow(d.uid,false,"tree")}}}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}var m=d[i.parent]?d[i.parent]:null;this.checkRows(m,n)}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}},indeterminateRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=null;g.row[h.checked]=null;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:null};f.rowinfo[c].row[h.checked]=null;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},uncheckRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=false;g.row[h.checked]=false;if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}f._raiseEvent("rowUncheck",{key:c,row:g.row})}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:false};f.rowinfo[c].row[h.checked]=false;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}f._raiseEvent("rowUncheck",{key:c,row:i});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},expandRows:function(c){var e=this;if(!c){return}if(e.virtualModeCreateRecords){a.each(c,function(){var f=this;var g=function(){e.base._loading=false;e.expandRows(f.records)};e.base._loading=false;e.expandRow(f.uid,g)})}else{for(var d=0;d<c.length;d++){var b=c[d];e.expandRow(b.uid);e.expandRows(b.records)}}},collapseRows:function(b){if(!b){return}for(var c=0;c<b.length;c++){this.collapseRow(b[c].uid);this.collapseRows(b[c].records)}},expandAll:function(){var b=this.base;b.beginUpdate();this.expandRows(this.getRows());b.endUpdate()},collapseAll:function(){var b=this.base;b.beginUpdate();this.collapseRows(this.getRows());b.endUpdate()},expandRow:function(h,j){var d=this.base;if(d._loading){return}var e=d._names();var f=this;var b=d.rowinfo[h];if(!b){var k=this.getRow(h);if(k){d.rowinfo[h]={row:k};if(k.originalRecord){d.rowinfo[h].originalRecord=k.originalRecord}b=d.rowinfo[h]}}if(b){if(b.expanded){b.row[e.expanded]=true;return}b.expanded=true;b.row[e.expanded]=true;if(b.originalRecord){b.originalRecord[e.expanded]=true}if(this.virtualModeCreateRecords&&!b.row._loadedOnDemand){var c=function(m){b.row._loadedOnDemand=true;if(m===false){d._loading=false;f._hideLoadElement();b.leaf=true;b.row[e.leaf]=true;d._renderrows();if(j){j()}return}for(var n=0;n<m.length;n++){m[n][e.level]=b.row[e.level]+1;m[n][e.parent]=b.row;if(d.rowsByKey[m[n].uid]){d._loading=false;f._hideLoadElement();b.leaf=true;b.row[e.leaf]=true;d._renderrows();if(j){j()}throw new Error("Please, check whether you Add Records with unique ID/Key. ")}d.rowsByKey[m[n].uid]=m[n];f.virtualModeRecordCreating(m[n])}if(!b.row.records){b.row.records=m}else{b.row.records=b.row.records.concat(m)}if((!m)||(m&&m.length==0)){b.leaf=true;b.row[e.leaf]=true}if(b.originalRecord){b.originalRecord.records=m;b.originalRecord[e.expanded]=true;if(m.length==0){b.originalRecord[e.leaf]=true}}d._loading=false;f._hideLoadElement();var l=d.vScrollBar.css("visibility");d._renderrows();d._updateScrollbars();var o=l!=d.vScrollBar.css("visibility");if(d.height==="auto"||d.height===null||d.autoheight||o){d._arrange()}d._renderhorizontalscroll();if(j){j()}};if(!b.row[e.leaf]){d._loading=true;this._showLoadElement();this.virtualModeCreateRecords(b.row,c);return}}if(!d.updating()){var g=d.vScrollBar.css("visibility");d._renderrows();d._updateScrollbars();var i=g!=d.vScrollBar.css("visibility");if(d.height==="auto"||d.height===null||d.autoheight||i){d._arrange()}d._renderhorizontalscroll();d._raiseEvent("rowExpand",{row:b.row,key:h})}}},collapseRow:function(c){var d=this.base;var g=d._names();if(d._loading){return}var f=d.rowinfo[c];if(!f){var h=this.getRow(c);if(h){d.rowinfo[c]={row:h};if(h.originalRecord){d.rowinfo[c].originalRecord=h.originalRecord}f=d.rowinfo[c]}}if(f){if(!f.expanded){f.row[g.expanded]=false;return}f.expanded=false;f.row[g.expanded]=false;if(f.originalRecord){f.originalRecord[g.expanded]=false}if(!d.updating()){var b=d.vScrollBar.css("visibility");d._renderrows();d._updateScrollbars();var e=b!=d.vScrollBar.css("visibility");if(d.height==="auto"||d.height===null||d.autoheight||e){d._arrange()}d._renderhorizontalscroll();d._raiseEvent("rowCollapse",{row:f.row,key:c})}}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -4,0 +4,0 @@ License: http://jqwidgets.com/license/ |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxValidator","",{});a.extend(a.jqx._jqxValidator.prototype,{defineInstance:function(){var b={rules:null,scroll:true,focus:true,scrollDuration:300,scrollCallback:null,position:"right",arrow:true,animation:"fade",animationDuration:150,closeOnClick:true,onError:null,onSuccess:null,ownerElement:null,_events:["validationError","validationSuccess"],hintPositionOffset:5,_inputHint:[],rtl:false,hintType:"tooltip"};a.extend(true,this,b);return b},createInstance:function(){if(this.hintType=="label"&&this.animationDuration==150){this.animationDuration=0}this._configureInputs();this._removeEventListeners();this._addEventListeners()},destroy:function(){this._removeEventListeners();this.hide()},validate:function(p){var b=true,o,e=Infinity,h,g,c,j=[],n;this.updatePosition();var k=this;var d=0;for(var f=0;f<this.rules.length;f+=1){if(typeof this.rules[f].rule==="function"){d++}}this.positions=new Array();for(var f=0;f<this.rules.length;f+=1){var m=a(this.rules[f].input);if(typeof this.rules[f].rule==="function"){var l=function(r,q){o=r;if(false==o){b=false;var i=a(q.input);c=a(q.input);j.push(c);h=c.offset().top;if(e>h){e=h;g=c}}d--;if(d==0){if(typeof p==="function"){k._handleValidation(b,e,g,j);if(p){p(b)}}}};this._validateRule(this.rules[f],l)}else{o=this._validateRule(this.rules[f])}if(false==o){b=false;c=a(this.rules[f].input);j.push(c);h=c.offset().top;if(e>h){e=h;g=c}}}if(d==0){this._handleValidation(b,e,g,j);return b}else{return undefined}},validateInput:function(b){var e=this._getRulesForInput(b),d=true;for(var c=0;c<e.length;c+=1){if(!this._validateRule(e[c])){d=false}}return d},hideHint:function(b){var d=this._getRulesForInput(b);for(var c=0;c<d.length;c+=1){this._hideHintByRule(d[c])}},hide:function(){var c;for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];this._hideHintByRule(this.rules[b])}},updatePosition:function(){var c;this.positions=new Array();for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];if(c.hint){this._hintLayout(c.hint,a(c.input),c.position,c)}}},_getRulesForInput:function(b){var d=[];for(var c=0;c<this.rules.length;c+=1){if(this.rules[c].input===b){d.push(this.rules[c])}}return d},_validateRule:function(f,i){var b=a(f.input),h,e=true;var d=this;var g=function(k){if(!k){var j=d.animation;d.animation=null;if(f.hint){d._hideHintByRule(f)}h=f.hintRender.apply(d,[f.message,b]);d._hintLayout(h,b,f.position,f);d._showHint(h);f.hint=h;d._removeLowPriorityHints(f);if(i){i(false,f)}d.animation=j}else{d._hideHintByRule(f);if(i){i(true,f)}}};var c=false;if(typeof f.rule==="function"){c=f.rule.call(this,b,g);if(c==true&&i){i(true,f)}}if(typeof f.rule==="function"&&c==false){if(typeof f.hintRender==="function"&&!f.hint&&!this._higherPriorityActive(f)&&b.is(":visible")){h=f.hintRender.apply(this,[f.message,b]);this._removeLowPriorityHints(f);this._hintLayout(h,b,f.position,f);this._showHint(h);f.hint=h}e=false;if(i){i(false,f)}}else{this._hideHintByRule(f)}return e},_hideHintByRule:function(e){var c=a(e.input);var b=this,f;var d=function(){if(b.hintType!="label"){return}var g=b;if(g.position=="top"||g.position=="left"){if(c.prev().hasClass(".jqx-validator-error-label")){return}}else{if(c.next().hasClass(".jqx-validator-error-label")){return}}if(c[0].nodeName.toLowerCase()!="input"){if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}};if(e){f=e.hint;if(f){if(this.positions){if(this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]){this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]=null}}if(this.animation==="fade"){f.fadeOut(this.animationDuration,function(){f.remove();d()})}else{f.remove();d()}}e.hint=null}},_handleValidation:function(b,e,d,c){if(!b){this._scrollHandler(e);if(this.focus){d.focus()}this._raiseEvent(0,{invalidInputs:c});if(typeof this.onError==="function"){this.onError(c)}}else{this._raiseEvent(1);if(typeof this.onSuccess==="function"){this.onSuccess()}}},_scrollHandler:function(c){if(this.scroll){var b=this;a("html,body").animate({scrollTop:c},this.scrollDuration,function(){if(typeof b.scrollCallback==="function"){b.scrollCallback.call(b)}})}},_higherPriorityActive:function(d){var e=false,c;for(var b=this.rules.length-1;b>=0;b-=1){c=this.rules[b];if(e&&c.input===d.input&&c.hint){return true}if(c===d){e=true}}return false},_removeLowPriorityHints:function(d){var e=false,c;for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];if(e&&c.input===d.input){this._hideHintByRule(c)}if(c===d){e=true}}},_getHintRuleByInput:function(b){var d;for(var c=0;c<this.rules.length;c+=1){d=this.rules[c];if(a(d.input)[0]===b[0]&&d.hint){return d}}return null},_removeEventListeners:function(){var f,b,e;for(var d=0;d<this.rules.length;d+=1){f=this.rules[d];e=f.action.split(",");b=a(f.input);for(var c=0;c<e.length;c+=1){this.removeHandler(b,a.trim(e[c])+".jqx-validator")}}},_addEventListeners:function(){var f,c;if(this.host.parents(".jqx-window").length>0){var b=this;var g=function(){b.updatePosition()};var e=this.host.parents(".jqx-window");this.addHandler(e,"closed",function(){b.hide()});this.addHandler(e,"moved",g);this.addHandler(e,"moving",g);this.addHandler(e,"resized",g);this.addHandler(e,"resizing",g);this.addHandler(a(document.parentWindow),"scroll",function(){if(b.scroll){g()}})}for(var d=0;d<this.rules.length;d+=1){f=this.rules[d];c=a(f.input);this._addListenerTo(c,f)}},_addListenerTo:function(c,h){var b=this,f=h.action.split(",");var e=false;if(this._isjQWidget(c)){e=true}for(var d=0;d<f.length;d+=1){var g=a.trim(f[d]);if(e&&(g=="blur"||g=="focus")){if(c&&c[0].nodeName.toLowerCase()!="input"){c=c.find("input")}}this.addHandler(c,g+".jqx-validator",function(i){b._validateRule(h)})}},_configureInputs:function(){var b,d;this.rules=this.rules||[];for(var c=0;c<this.rules.length;c+=1){this._handleInput(c)}},_handleInput:function(b){var c=this.rules[b];if(!c.position){c.position=this.position}if(!c.message){c.message="Validation Failed!"}if(!c.action){c.action="blur"}if(!c.hintRender){c.hintRender=this._hintRender}if(!c.rule){c.rule=null}else{this._handleRule(c)}},_handleRule:function(f){var c=f.rule,e,d,b=false;if(typeof c==="string"){if(c.indexOf("=")>=0){c=c.split("=");d=c[1].split(",");c=c[0]}e=this["_"+c];if(e){f.rule=function(g,h){return e.apply(this,[g].concat(d))}}else{b=true}}else{if(typeof c!=="function"){b=true}else{f.rule=c}}if(b){throw new Error("Wrong parameter!")}},_required:function(b){switch(this._getType(b)){case"textarea":case"password":case"jqx-input":case"text":var d=a.data(b[0]);if(d.jqxMaskedInput){var e=b.jqxMaskedInput("promptChar"),c=b.jqxMaskedInput("value");return c&&c.indexOf(e)<0}else{if(d.jqxNumberInput){return b.jqxNumberInput("inputValue")!==""}else{if(d.jqxDateTimeInput){return true}else{return a.trim(b.val())!==""}}}case"checkbox":return b.is(":checked");case"radio":return b.is(":checked");case"div":if(b.is(".jqx-checkbox")){return b.jqxCheckBox("checked")}if(b.is(".jqx-radiobutton")){return b.jqxRadioButton("checked")}return false}return false},_notNumber:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d)})},_startWithLetter:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d.substring(0,1))})},_number:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=new Number(d);return !isNaN(c)&&isFinite(c)})},_phone:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^\(\d{3}\)(\d){3}-(\d){4}$/;return c.test(d)})},_length:function(c,d,b){return this._minLength(c,d)&&this._maxLength(c,b)},_maxLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length<=b})},_minLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length>=b})},_email:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return c.test(d)})},_zipCode:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(^\d{5}$)|(^\d{5}-\d{4}$)|(\d{3}-\d{2}-\d{4})$/;return c.test(d)})},_ssn:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d{3}-\d{2}-\d{4}/;return c.test(d)})},_validateText:function(b,d){var c;if(this._isTextInput(b)){if(this._isjQWidget(b)){if(b.find("input").length>0){c=b.find("input").val()}else{c=b.val()}}else{c=b.val()}return d(c)}return false},_isjQWidget:function(b){var c=a.data(b[0]);if(c.jqxMaskedInput||c.jqxNumberInput||c.jqxDateTimeInput){return true}return false},_isTextInput:function(b){var c=this._getType(b);return c==="text"||c==="textarea"||c==="password"||b.is(".jqx-input")},_getType:function(c){var b=c[0].tagName.toLowerCase(),d;if(b==="textarea"){return"textarea"}else{if(c.is(".jqx-input")){return"jqx-input"}else{if(b==="input"){d=a(c).attr("type")?a(c).attr("type").toLowerCase():"text";return d}}}return b},_hintRender:function(e,c){if(this.hintType=="label"){var f=a('<label class="'+this.toThemeProperty("jqx-validator-error-label")+'"></label>');f.html(e);var d=this;if(this.closeOnClick){f.click(function(){d.hideHint(c.selector)})}if(this.position=="left"||this.position=="top"){f.insertBefore(a(c))}else{f.insertAfter(a(c))}return f}var f=a('<div class="'+this.toThemeProperty("jqx-validator-hint")+' jqx-rc-all"></div>'),b=this;f.html(e);if(this.closeOnClick){f.click(function(){b.hideHint(c.selector)})}if(this.ownerElement==null){f.appendTo(document.body)}else{if(this.ownerElement.innerHTML){f.appendTo(a(this.ownerElement))}else{f.appendTo(this.ownerElement)}}return f},_hintLayout:function(h,c,b,f){if(this._hintRender===f.hintRender){var i;i=this._getPosition(c,b,h,f);if(this.hintType=="label"){var e="2px";if(this.position=="left"||this.position=="top"){e="-2px"}if(c[0].nodeName.toLowerCase()!="input"){if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}}}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}var d=a("<span></span>");d.addClass(this.toThemeProperty("jqx-validator-hint"));d.html(h.text());d.appendTo(a(document.body));var g=d.outerWidth();d.remove();h.css({position:"relative",left:a(c).css("margin-left"),width:a(c).width(),top:e});if(b=="center"){h.css("width",g);h.css("left","0px");h.css("margin-left","auto");h.css("margin-right","auto")}return}h.css({position:"absolute",left:i.left,top:i.top});if(this.arrow){this._addArrow(c,h,b,i)}}},_showHint:function(b){if(b){if(this.animation==="fade"){b.fadeOut(0);b.fadeIn(this.animationDuration)}}},_getPosition:function(i,f,d,g){var e=i.offset(),h,c;var b=i.outerWidth();var j=i.outerHeight();if(this.rtl&&f.indexOf("left")>=0){f="right"}if(this.rtl&&f.indexOf("right")>=0){f="left"}if(this.ownerElement!=null){e={left:0,top:0};e.top=parseInt(e.top)+i.position().top;e.left=parseInt(e.left)+i.position().left}if(g&&g.hintPositionRelativeElement){var k=a(g.hintPositionRelativeElement);e=k.offset();b=k.width();j=k.height()}if(f.indexOf("top")>=0){h=e.top-j}else{if(f.indexOf("bottom")>=0){h=e.top+d.outerHeight()+this.hintPositionOffset+5}else{h=e.top}}if(f.indexOf("center")>=0){c=e.left+this.hintPositionOffset+(b-d.outerWidth())/2}else{if(f.indexOf("left")>=0){c=e.left-d.outerWidth()-this.hintPositionOffset}else{if(f.indexOf("right")>=0){c=e.left+b+this.hintPositionOffset}else{c=e.left+this.hintPositionOffset}}}if(f.indexOf(":")>=0){f=f.split(":")[1].split(",");c+=parseInt(f[0],10);h+=parseInt(f[1],10)}if(!this.positions){this.positions=new Array()}if(this.positions[Math.round(h)+"_"+Math.round(c)]){if(this.positions[Math.round(h)+"_"+Math.round(c)].top==h){h+=i.outerHeight()}}this.positions[Math.round(h)+"_"+Math.round(c)]={left:c,top:h};return{left:c,top:h}},_addArrow:function(j,e,g,k){var l=a('<div class="'+this.toThemeProperty("jqx-validator-hint-arrow")+'"></div>'),d,i;if(this.rtl&&g.indexOf("left")>=0){g="right"}if(this.rtl&&g.indexOf("right")>=0){g="left"}e.children(".jqx-validator-hint-arrow").remove();e.append(l);var c=l.outerHeight(),f=l.outerWidth(),h=e.outerHeight(),b=e.outerWidth();this._addImage(l);if(g.indexOf("top")>=0){i=h-c}else{if(g.indexOf("bottom")>=0){i=-c}else{i=(h-c)/2-c/2}}if(g.indexOf("center")>=0){d=(b-f)/2}else{if(g.indexOf("left")>=0){d=b-f/2-1}else{if(g.indexOf("right")>=0){d=-f/2}}}if(g.indexOf("topright")>=0||g.indexOf("bottomright")>=0){d=0}if(g.indexOf("topleft")>=0||g.indexOf("bottomleft")>=0){d=b-f}l.css({position:"absolute",left:d,top:i})},_addImage:function(b){var c=b.css("background-image");c=c.replace('url("',"");c=c.replace('")',"");c=c.replace("url(","");c=c.replace(")","");b.css("background-image","none");b.append('<img src="'+c+'" alt="Arrow" style="position: relative; top: 0px; left: 0px; width: '+b.width()+"px; height: "+b.height()+'px;" />')},_raiseEvent:function(b,d){var c=a.Event(this._events[b]);c.args=d;return this.host.trigger(c)},propertyChangedHandler:function(b,c,e,d){if(c==="rules"){this._configureInputs();this._removeEventListeners();this._addEventListeners()}}})})(jqxBaseFramework); | ||
(function(a){a.jqx.jqxWidget("jqxValidator","",{});a.extend(a.jqx._jqxValidator.prototype,{defineInstance:function(){var b={rules:null,scroll:true,focus:true,scrollDuration:300,scrollCallback:null,position:"right",arrow:true,animation:"fade",animationDuration:150,closeOnClick:true,onError:null,onSuccess:null,ownerElement:null,_events:["validationError","validationSuccess"],hintPositionOffset:5,_inputHint:[],rtl:false,hintType:"tooltip"};a.extend(true,this,b);return b},createInstance:function(){if(this.hintType=="label"&&this.animationDuration==150){this.animationDuration=0}this._configureInputs();this._removeEventListeners();this._addEventListeners()},destroy:function(){this._removeEventListeners();this.hide()},validate:function(q){var b=true,p,f=Infinity,j,h,c,k=[],o;this.updatePosition();var l=this;var d=0;for(var g=0;g<this.rules.length;g+=1){if(typeof this.rules[g].rule==="function"){d++}}this.positions=new Array();for(var g=0;g<this.rules.length;g+=1){var n=a(this.rules[g].input);if(typeof this.rules[g].rule==="function"){var m=function(s,r){p=s;if(false==p){b=false;var i=a(r.input);c=a(r.input);k.push(c);var t=c.offset();if(t){j=t.top;if(f>j){f=j;h=c}}}d--;if(d==0){if(typeof q==="function"){l._handleValidation(b,f,h,k);if(q){q(b)}}}};this._validateRule(this.rules[g],m)}else{p=this._validateRule(this.rules[g])}if(false==p){b=false;c=a(this.rules[g].input);k.push(c);var e=c.offset();if(e){j=e.top;if(f>j){f=j;h=c}}}}if(d==0){this._handleValidation(b,f,h,k);return b}else{return undefined}},validateInput:function(b){var e=this._getRulesForInput(b),d=true;for(var c=0;c<e.length;c+=1){if(!this._validateRule(e[c])){d=false}}return d},hideHint:function(b){var d=this._getRulesForInput(b);for(var c=0;c<d.length;c+=1){this._hideHintByRule(d[c])}},hide:function(){var c;for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];this._hideHintByRule(this.rules[b])}},updatePosition:function(){var c;this.positions=new Array();for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];if(c.hint){this._hintLayout(c.hint,a(c.input),c.position,c)}}},_getRulesForInput:function(b){var d=[];for(var c=0;c<this.rules.length;c+=1){if(this.rules[c].input===b){d.push(this.rules[c])}}return d},_validateRule:function(f,i){var b=a(f.input),h,e=true;var d=this;var g=function(k){if(!k){var j=d.animation;d.animation=null;if(f.hint){d._hideHintByRule(f)}if(a(b).css("display")=="none"){d._hideHintByRule(f);return}if(a(b).parents().length==0){d._hideHintByRule(f);return}h=f.hintRender.apply(d,[f.message,b]);d._hintLayout(h,b,f.position,f);d._showHint(h);f.hint=h;d._removeLowPriorityHints(f);if(i){i(false,f)}d.animation=j}else{d._hideHintByRule(f);if(i){i(true,f)}}};var c=false;if(typeof f.rule==="function"){c=f.rule.call(this,b,g);if(c==true&&i){i(true,f)}}if(typeof f.rule==="function"&&c==false){if(typeof f.hintRender==="function"&&!f.hint&&!this._higherPriorityActive(f)&&b.is(":visible")){h=f.hintRender.apply(this,[f.message,b]);this._removeLowPriorityHints(f);this._hintLayout(h,b,f.position,f);this._showHint(h);f.hint=h}e=false;if(i){i(false,f)}}else{this._hideHintByRule(f)}return e},_hideHintByRule:function(e){var c=a(e.input);var b=this,f;var d=function(){if(b.hintType!="label"){return}var g=b;if(g.position=="top"||g.position=="left"){if(c.prev().hasClass(".jqx-validator-error-label")){return}}else{if(c.next().hasClass(".jqx-validator-error-label")){return}}if(c[0].nodeName.toLowerCase()!="input"){if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}};if(e){f=e.hint;if(f){if(this.positions){if(this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]){this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]=null}}if(this.animation==="fade"){f.fadeOut(this.animationDuration,function(){f.remove();d()})}else{f.remove();d()}}e.hint=null}},_handleValidation:function(b,e,d,c){if(!b){this._scrollHandler(e);if(this.focus){d.focus()}this._raiseEvent(0,{invalidInputs:c});if(typeof this.onError==="function"){this.onError(c)}}else{this._raiseEvent(1);if(typeof this.onSuccess==="function"){this.onSuccess()}}},_scrollHandler:function(c){if(this.scroll){var b=this;a("html,body").animate({scrollTop:c},this.scrollDuration,function(){if(typeof b.scrollCallback==="function"){b.scrollCallback.call(b)}})}},_higherPriorityActive:function(d){var e=false,c;for(var b=this.rules.length-1;b>=0;b-=1){c=this.rules[b];if(e&&c.input===d.input&&c.hint){return true}if(c===d){e=true}}return false},_removeLowPriorityHints:function(d){var e=false,c;for(var b=0;b<this.rules.length;b+=1){c=this.rules[b];if(e&&c.input===d.input){this._hideHintByRule(c)}if(c===d){e=true}}},_getHintRuleByInput:function(b){var d;for(var c=0;c<this.rules.length;c+=1){d=this.rules[c];if(a(d.input)[0]===b[0]&&d.hint){return d}}return null},_removeEventListeners:function(){var f,b,e;for(var d=0;d<this.rules.length;d+=1){f=this.rules[d];e=f.action.split(",");b=a(f.input);for(var c=0;c<e.length;c+=1){this.removeHandler(b,a.trim(e[c])+".jqx-validator")}}},_addEventListeners:function(){var f,c;if(this.host.parents(".jqx-window").length>0){var b=this;var g=function(){b.updatePosition()};var e=this.host.parents(".jqx-window");this.addHandler(e,"closed",function(){b.hide()});this.addHandler(e,"moved",g);this.addHandler(e,"moving",g);this.addHandler(e,"resized",g);this.addHandler(e,"resizing",g);this.addHandler(a(document.parentWindow),"scroll",function(){if(b.scroll){g()}})}for(var d=0;d<this.rules.length;d+=1){f=this.rules[d];c=a(f.input);this._addListenerTo(c,f)}},_addListenerTo:function(c,h){var b=this,f=h.action.split(",");var e=false;if(this._isjQWidget(c)){e=true}for(var d=0;d<f.length;d+=1){var g=a.trim(f[d]);if(e&&(g=="blur"||g=="focus")){if(c&&c[0].nodeName.toLowerCase()!="input"){c=c.find("input")}}this.addHandler(c,g+".jqx-validator",function(i){b._validateRule(h)})}},_configureInputs:function(){var b,d;this.rules=this.rules||[];for(var c=0;c<this.rules.length;c+=1){this._handleInput(c)}},_handleInput:function(b){var c=this.rules[b];if(!c.position){c.position=this.position}if(!c.message){c.message="Validation Failed!"}if(!c.action){c.action="blur"}if(!c.hintRender){c.hintRender=this._hintRender}if(!c.rule){c.rule=null}else{this._handleRule(c)}},_handleRule:function(f){var c=f.rule,e,d,b=false;if(typeof c==="string"){if(c.indexOf("=")>=0){c=c.split("=");d=c[1].split(",");c=c[0]}e=this["_"+c];if(e){f.rule=function(g,h){return e.apply(this,[g].concat(d))}}else{b=true}}else{if(typeof c!=="function"){b=true}else{f.rule=c}}if(b){throw new Error("Wrong parameter!")}},_required:function(b){switch(this._getType(b)){case"textarea":case"password":case"jqx-input":case"text":var d=a.data(b[0]);if(d.jqxMaskedInput){var e=b.jqxMaskedInput("promptChar"),c=b.jqxMaskedInput("value");return c&&c.indexOf(e)<0}else{if(d.jqxNumberInput){return b.jqxNumberInput("inputValue")!==""}else{if(d.jqxDateTimeInput){return true}else{return a.trim(b.val())!==""}}}case"checkbox":return b.is(":checked");case"radio":return b.is(":checked");case"div":if(b.is(".jqx-checkbox")){return b.jqxCheckBox("checked")}if(b.is(".jqx-radiobutton")){return b.jqxRadioButton("checked")}return false}return false},_notNumber:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d)})},_startWithLetter:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d.substring(0,1))})},_number:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=new Number(d);return !isNaN(c)&&isFinite(c)})},_phone:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^\(\d{3}\)(\d){3}-(\d){4}$/;return c.test(d)})},_length:function(c,d,b){return this._minLength(c,d)&&this._maxLength(c,b)},_maxLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length<=b})},_minLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length>=b})},_email:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return c.test(d)})},_zipCode:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(^\d{5}$)|(^\d{5}-\d{4}$)|(\d{3}-\d{2}-\d{4})$/;return c.test(d)})},_ssn:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d{3}-\d{2}-\d{4}/;return c.test(d)})},_validateText:function(b,d){var c;if(this._isTextInput(b)){if(this._isjQWidget(b)){if(b.find("input").length>0){c=b.find("input").val()}else{c=b.val()}}else{c=b.val()}return d(c)}return false},_isjQWidget:function(b){var c=a.data(b[0]);if(c.jqxMaskedInput||c.jqxNumberInput||c.jqxDateTimeInput){return true}return false},_isTextInput:function(b){var c=this._getType(b);return c==="text"||c==="textarea"||c==="password"||b.is(".jqx-input")},_getType:function(c){if(!c[0]){return}var b=c[0].tagName.toLowerCase(),d;if(b==="textarea"){return"textarea"}else{if(c.is(".jqx-input")){return"jqx-input"}else{if(b==="input"){d=a(c).attr("type")?a(c).attr("type").toLowerCase():"text";return d}}}return b},_hintRender:function(e,c){if(this.hintType=="label"){var f=a('<label class="'+this.toThemeProperty("jqx-validator-error-label")+'"></label>');f.html(e);var d=this;if(this.closeOnClick){f.click(function(){d.hideHint(c.selector)})}if(this.position=="left"||this.position=="top"){f.insertBefore(a(c))}else{f.insertAfter(a(c))}return f}var f=a('<div class="'+this.toThemeProperty("jqx-validator-hint")+' jqx-rc-all"></div>'),b=this;f.html(e);if(this.closeOnClick){f.click(function(){b.hideHint(c.selector)})}if(this.ownerElement==null){f.appendTo(document.body)}else{if(this.ownerElement.innerHTML){f.appendTo(a(this.ownerElement))}else{f.appendTo(this.ownerElement)}}return f},_hintLayout:function(h,c,b,f){if(this._hintRender===f.hintRender){var i;i=this._getPosition(c,b,h,f);if(this.hintType=="label"){var e="2px";if(this.position=="left"||this.position=="top"){e="-2px"}if(c[0].nodeName.toLowerCase()!="input"){if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}}}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}var d=a("<span></span>");d.addClass(this.toThemeProperty("jqx-validator-hint"));d.html(h.text());d.appendTo(a(document.body));var g=d.outerWidth();d.remove();h.css({position:"relative",left:a(c).css("margin-left"),width:a(c).width(),top:e});if(b=="center"){h.css("width",g);h.css("left","0px");h.css("margin-left","auto");h.css("margin-right","auto")}return}h.css({position:"absolute",left:i.left,top:i.top});if(this.arrow){this._addArrow(c,h,b,i)}}},_showHint:function(b){if(b){if(this.animation==="fade"){b.fadeOut(0);b.fadeIn(this.animationDuration)}}},_getPosition:function(i,f,d,g){var e=i.offset(),h,c;var b=i.outerWidth();var j=i.outerHeight();if(this.rtl&&f.indexOf("left")>=0){f="right"}if(this.rtl&&f.indexOf("right")>=0){f="left"}if(this.ownerElement!=null){e={left:0,top:0};e.top=parseInt(e.top)+i.position().top;e.left=parseInt(e.left)+i.position().left}if(g&&g.hintPositionRelativeElement){var k=a(g.hintPositionRelativeElement);e=k.offset();b=k.width();j=k.height()}if(f.indexOf("top")>=0){h=e.top-j}else{if(f.indexOf("bottom")>=0){h=e.top+d.outerHeight()+this.hintPositionOffset+5}else{h=e.top}}if(f.indexOf("center")>=0){c=e.left+this.hintPositionOffset+(b-d.outerWidth())/2}else{if(f.indexOf("left")>=0){c=e.left-d.outerWidth()-this.hintPositionOffset}else{if(f.indexOf("right")>=0){c=e.left+b+this.hintPositionOffset}else{c=e.left+this.hintPositionOffset}}}if(f.indexOf(":")>=0){f=f.split(":")[1].split(",");c+=parseInt(f[0],10);h+=parseInt(f[1],10)}if(!this.positions){this.positions=new Array()}if(this.positions[Math.round(h)+"_"+Math.round(c)]){if(this.positions[Math.round(h)+"_"+Math.round(c)].top==h){h+=i.outerHeight()}}this.positions[Math.round(h)+"_"+Math.round(c)]={left:c,top:h};return{left:c,top:h}},_addArrow:function(j,e,g,k){var l=a('<div class="'+this.toThemeProperty("jqx-validator-hint-arrow")+'"></div>'),d,i;if(this.rtl&&g.indexOf("left")>=0){g="right"}if(this.rtl&&g.indexOf("right")>=0){g="left"}e.children(".jqx-validator-hint-arrow").remove();e.append(l);var c=l.outerHeight(),f=l.outerWidth(),h=e.outerHeight(),b=e.outerWidth();this._addImage(l);if(g.indexOf("top")>=0){i=h-c}else{if(g.indexOf("bottom")>=0){i=-c}else{i=(h-c)/2-c/2}}if(g.indexOf("center")>=0){d=(b-f)/2}else{if(g.indexOf("left")>=0){d=b-f/2-1}else{if(g.indexOf("right")>=0){d=-f/2}}}if(g.indexOf("topright")>=0||g.indexOf("bottomright")>=0){d=0}if(g.indexOf("topleft")>=0||g.indexOf("bottomleft")>=0){d=b-f}l.css({position:"absolute",left:d,top:i})},_addImage:function(b){var c=b.css("background-image");c=c.replace('url("',"");c=c.replace('")',"");c=c.replace("url(","");c=c.replace(")","");b.css("background-image","none");b.append('<img src="'+c+'" alt="Arrow" style="position: relative; top: 0px; left: 0px; width: '+b.width()+"px; height: "+b.height()+'px;" />')},_raiseEvent:function(b,d){var c=a.Event(this._events[b]);c.args=d;return this.host.trigger(c)},propertyChangedHandler:function(b,c,e,d){if(c==="rules"){this._configureInputs();this._removeEventListeners();this._addEventListeners()}}})})(jqxBaseFramework); |
/* | ||
jQWidgets v3.8.0 (2015-Apr) | ||
jQWidgets v3.8.1 (2015-June) | ||
Copyright (c) 2011-2015 jQWidgets. | ||
@@ -7,2 +7,2 @@ License: http://jqwidgets.com/license/ | ||
(function(a){a.jqx.jqxWidget("jqxWindow","",{});a.extend(a.jqx._jqxWindow.prototype,{defineInstance:function(){var e={height:"auto",width:200,minHeight:50,maxHeight:600,minWidth:50,maxWidth:800,showCloseButton:true,disabled:false,autoOpen:true,keyboardCloseKey:"esc",title:"",content:"",draggable:true,resizable:true,animationType:"fade",closeAnimationDuration:250,showAnimationDuration:250,isModal:false,position:"center",closeButtonSize:16,closeButtonAction:"hide",modalOpacity:0.3,dragArea:null,okButton:null,cancelButton:null,dialogResult:{OK:false,Cancel:false,None:true},collapsed:false,showCollapseButton:false,collapseAnimationDuration:150,collapseButtonSize:16,rtl:false,keyboardNavigation:true,headerHeight:null,_events:["created","closed","moving","moved","open","collapse","expand","open","close","resize"],initContent:null,enableResize:true,restricter:null,closing:null,_invalidArgumentExceptions:{invalidHeight:"Invalid height!",invalidWidth:"Invalid width!",invalidMinHeight:"Invalid minHeight!",invalidMaxHeight:"Invalid maxHeight!",invalidMinWidth:"Invalid minWidth!",invalidMaxWidth:"Invalid maxWidth",invalidKeyCode:"Invalid keyCode!",invalidAnimationType:"Invalid animationType!",invalidCloseAnimationDuration:"Invalid closeAnimationDuration!",invalidShowAnimationDuration:"Invalid showAnimationDuration!",invalidPosition:"Invalid position!",invalidCloseButtonSize:"Invalid closeButtonSize!",invalidCollapseButtonSize:"Invalid collapseButtonSize!",invalidCloseButtonAction:"Invalid cluseButtonAction!",invalidModalOpacity:"Invalid modalOpacity!",invalidDragArea:"Invalid dragArea!",invalidDialogResult:"Invalid dialogResult!",invalidIsModal:"You can have just one modal window!"},_enableResizeCollapseBackup:null,_enableResizeBackup:null,_heightBeforeCollapse:null,_minHeightBeforeCollapse:null,_mouseDown:false,_isDragging:false,_rightContentWrapper:null,_leftContentWrapper:null,_headerContentWrapper:null,_closeButton:null,_collapseButton:null,_title:null,_content:null,_mousePosition:{},_windowPosition:{},_modalBackground:null,_SCROLL_WIDTH:21,_visible:true,modalBackgroundZIndex:12990,modalZIndex:18000,zIndex:9001,_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave",click:a.jqx.mobile.getTouchEventName("touchstart")}};a.extend(true,this,e);return e},createInstance:function(){this.host.attr("role","dialog");this.host.removeAttr("data-bind");this.host.detach();a(document.body).append(this.host);var f=this;var g=function(){var i=parseInt(a(f.restricter).css("padding-top"));var h=parseInt(a(f.restricter).css("padding-left"));var k=parseInt(a(f.restricter).css("padding-bottom"));var m=parseInt(a(f.restricter).css("padding-right"));var l=a(f.restricter).coord();f.dragArea={left:h+l.left,top:i+l.top,width:1+m+a(f.restricter).width(),height:1+k+a(f.restricter).height()}};if(this.restricter){g()}if(this.restricter){this.addHandler(a(window),"resize."+this.element.id,function(){g()});this.addHandler(a(window),"orientationchanged."+this.element.id,function(){g()});this.addHandler(a(window),"orientationchange."+this.element.id,function(){g()})}this._isTouchDevice=a.jqx.mobile.isTouchDevice();this._validateProperties();this._createStructure();this._refresh();if(!this.autoOpen){this.host.css("display","none")}if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}if(!this.isModal){this._fixWindowZIndex()}this._setStartupSettings();this._positionWindow();this._raiseEvent(0);if(this.autoOpen){this._performLayout();var e=this;if(this.isModal){this._fixWindowZIndex("modal-show")}if(e.initContent){e.initContent();e._contentInitialized=true}this._raiseEvent(7);this._raiseEvent(9)}},refresh:function(){this._performLayout()},_setStartupSettings:function(){if(this.disabled){this.disable()}if(this.collapsed){this.collapsed=false;this.collapse(0)}if(!this.autoOpen){this.hide(null,0.001,true);this._visible=false}if(this.title!==null&&this.title!==""){this.setTitle(this.title)}if(this.content!==null&&this.content!==""){this.setContent(this.content)}this.title=this._headerContentWrapper.html();this.content=this._content.html()},_fixWindowZIndex:function(m){var e=a.data(document.body,"jqxwindows-list")||[],n=this.zIndex,h;if(!this.isModal){if(this._indexOf(this.host,e)<0){e.push(this.host)}a.data(document.body,"jqxwindows-list",e);if(e.length>1){var f=e[e.length-2];n=parseInt(f.css("z-index"),10)+1}}else{if(e){e=this._removeFromArray(this.host,e);a.data(document.body,"jqxwindows-list",e)}var g=a.data(document.body,"jqxwindows-modallist");if(!g){if(m=="modal-show"){var k=new Array();k.push(this.host);a.data(document.body,"jqxwindows-modallist",k);g=k}else{a.data(document.body,"jqxwindows-modallist",new Array());g=new Array()}}else{if(m=="modal-show"){g.push(this.host)}else{var i=g.indexOf(this.host);if(i!=-1){g.splice(i,1)}}}n=this.modalZIndex;var l=this;a.each(g,function(q){if(this.data()){if(this.data().jqxWindow){var o=this.data().jqxWindow.instance;o._modalBackground.css("z-index",n);o.host.css("z-index",n+1);n+=2}}});a.data(document.body,"jqxwindow-modal",this.host);return}this.host.css("z-index",n);this._sortByStyle("z-index",e)},_validateProperties:function(){try{this._validateSize();this._validateAnimationProperties();this._validateInteractionProperties();this._validateModalProperties();if(!this.position){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(isNaN(this.closeButtonSize)||parseInt(this.closeButtonSize)<0){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonSize)}if(isNaN(this.collapseButtonSize)||parseInt(this.collapseButtonSize)<0){throw new Error(this._invalidArgumentExceptions.invalidCollapseButtonSize)}}catch(e){alert(e)}},_validateModalProperties:function(){if(this.modalOpacity<0||this.modalOpacity>1){throw new Error(this._invalidArgumentExceptions.invalidModalOpacity)}if(this.isModal&&!this._singleModalCheck()){throw new Error(this._invalidArgumentExceptions.invalidIsModal)}},_validateSize:function(){this._validateSizeLimits();if(this.height!=="auto"&&isNaN(parseInt(this.height))){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.width!=="auto"&&isNaN(parseInt(this.width))){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(this.height!=="auto"&&this.height<this.minHeight){this.height=this.minHeight}if(this.width<this.minWidth){this.width=this.minWidth}if(this.height!=="auto"&&this.height>this.maxHeight){this.height=this.maxHeight}if(this.width>this.maxWidth){this.width=this.maxWidth}if(this.dragArea===null){return}if(this.dragArea&&((this.dragArea.height!==null&&this.host.height()>this.dragArea.height)||(parseInt(this.height,10)>this.dragArea.height))||(this.dragArea.width!==null&&this.width>this.dragArea.width)||(this.maxHeight>this.dragArea.height||this.maxWidth>this.dragArea.width)){}},_validateSizeLimits:function(){if(this.maxHeight==null){this.maxHeight=9999}if(this.minWidth==null){this.minWidth=0}if(this.maxWidth==null){this.maxWidth=9999}if(this.minHeight==null){this.minHeight=0}if(isNaN(parseInt(this.minHeight))){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(isNaN(parseInt(this.maxHeight))){throw new Error(this._invalidArgumentExceptions.invalidMaxHeight)}if(isNaN(parseInt(this.minWidth))){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}if(isNaN(parseInt(this.maxWidth))){throw new Error(this._invalidArgumentExceptions.invalidMaxWidth)}if(this.minHeight>this.maxHeight){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(this.minWidth>this.maxWidth){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}},_validateAnimationProperties:function(){if(this.animationType!=="fade"&&this.animationType!=="slide"&&this.animationType!=="combined"&&this.animationType!=="none"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(isNaN(parseInt(this.closeAnimationDuration),10)||this.closeAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidCloseAnimationDuration)}if(isNaN(parseInt(this.showAnimationDuration),10)||this.showAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidShowAnimationDuration)}},_validateInteractionProperties:function(){if(parseInt(this.keyCode,10)<0||parseInt(this.keyCode,10)>130&&this.keyCode!=="esc"){throw new Error(this._invalidArgumentExceptions.invalidKeyCode)}if(this.dragArea!==null&&(typeof this.dragArea.width==="undefined"||typeof this.dragArea.height==="undefined"||typeof this.dragArea.left==="undefined"||typeof this.dragArea.top==="undefined")){throw new Error(this._invalidArgumentExceptions.invalidDragArea)}if(!this.dialogResult||(!this.dialogResult.OK&&!this.dialogResult.Cancel&&!this.dialogResult.None)){throw new Error(this._invalidArgumentExceptions.invalidDialogResult)}if(this.closeButtonAction!=="hide"&&this.closeButtonAction!=="close"){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonAction)}},_singleModalCheck:function(){var e=a.data(document.body,"jqxwindows-list")||[],f=e.length;while(f){f-=1;if(a(e[f].attr("id")).length>0){if(a(e[f].attr("id")).jqxWindow("isModal")){return false}}}return true},_createStructure:function(){var e=this.host.children("DIV");if(e.length===1){this._header=a("<div>"+this.host.attr("caption")+"</div>");this.host.prepend(this._header);this.host.attr("caption","");this._content=a(e[0])}else{if(e.length===2){this._header=a(e[0]);this._content=a(e[1])}else{throw new Error("Invalid structure!")}}},_refresh:function(){this._render();this._addStyles();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initializeResize()},_render:function(){this._addHeaderWrapper();this._addCloseButton();this._addCollapseButton();this._removeModal();this._makeModal()},_addHeaderWrapper:function(){if(!this._headerContentWrapper){this._header.wrapInner('<div style="float:left;"></div>');this._headerContentWrapper=this._header.children(0);if(this.headerHeight!==null){this._header.height(this.headerHeight)}}},_addCloseButton:function(){if(!this._closeButton){this._closeButtonWrapper=a('<div class="'+this.toThemeProperty("jqx-window-close-button-background")+'"></div>');this._closeButton=a('<div style="width: 100%; height: 100%;" class="'+this.toThemeProperty("jqx-window-close-button")+" "+this.toThemeProperty("jqx-icon-close")+'"></div>');this._closeButtonWrapper.append(this._closeButton);this._header.append(this._closeButtonWrapper)}},_addCollapseButton:function(){if(!this._collapseButton){this._collapseButtonWrapper=a('<div class="'+this.toThemeProperty("jqx-window-collapse-button-background")+'"></div>');this._collapseButton=a('<div style="width: 100%; height: 100%;" class="'+this.toThemeProperty("jqx-window-collapse-button")+" "+this.toThemeProperty("jqx-icon-arrow-up")+'"></div>');this._collapseButtonWrapper.append(this._collapseButton);this._header.append(this._collapseButtonWrapper)}},_removeModal:function(){if(!this.isModal&&typeof this._modalBackground==="object"&&this._modalBackground!==null&&this._modalBackground.length>=1){a("."+this.toThemeProperty("jqx-window-modal")).remove();this._modalBackground=null}},focus:function(){try{this.host.focus();var f=this;setTimeout(function(){f.host.focus()},10)}catch(e){}},_makeModal:function(){if(this.isModal&&(!this._modalBackground||this._modalBackground.length<1)){var g=a.data(document.body,"jqxwindows-list");if(g){this._removeFromArray(this.host,g);a.data(document.body,"jqxwindows-list",g)}this._modalBackground=a("<div></div>");this._modalBackground.addClass(this.toThemeProperty("jqx-window-modal"));this._setModalBackgroundStyles();a(document.body).append(this._modalBackground);this.addHandler(this._modalBackground,this._getEvent("click"),function(){return false});var f=this;var e=function(i,k){var h=a(i).parents().get();for(j=0;j<h.length;j++){if(a(h[j]).is(k)){return true}}return false};this.addHandler(this._modalBackground,"mouseup",function(h){f._stopResizing(f);h.preventDefault()});this.addHandler(this._modalBackground,"mousedown",function(i){var h=f._getTabbables();if(h.length>0){h[0].focus(1);setTimeout(function(){h[0].focus(1)},100)}i.preventDefault();return false});this.addHandler(a(document),"keydown.window"+this.element.id,function(l){if(l.keyCode!==9){return}var h=a.data(document.body,"jqxwindows-modallist");if(h.length>1){if(h[h.length-1][0]!=f.element){return}}var k=f._getTabbables();var m=null;var i=null;if(k.length>0){m=k[0];i=k[k.length-1]}if(l.target==f.element){return}if(m==null){return}if(!e(l.target,f.host)){m.focus(1);return false}if(l.target===i&&!l.shiftKey){m.focus(1);return false}else{if(l.target===m&&l.shiftKey){i.focus(1);return false}}})}},_addStyles:function(){this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-window"));this.host.addClass(this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-window-header"));this._content.addClass(this.toThemeProperty("jqx-window-content"));this._header.addClass(this.toThemeProperty("jqx-widget-header"));this._content.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-disableselect"));this._header.addClass(this.toThemeProperty("jqx-rc-t"));this._content.addClass(this.toThemeProperty("jqx-rc-b"));if(!this.host.attr("tabindex")){this.element.tabIndex=0;this.host.children().css("tab-index",0)}this.host.attr("hideFocus","true").css("outline","none")},_performHeaderLayout:function(){this._handleHeaderButtons();this._header.css("position","relative");if(this.rtl){this._headerContentWrapper.css("direction","rtl");this._headerContentWrapper.css("float","right")}else{this._headerContentWrapper.css("direction","ltr");this._headerContentWrapper.css("float","left")}this._performHeaderCloseButtonLayout();this._performHeaderCollapseButtonLayout();this._centerElement(this._headerContentWrapper,this._header,"y","margin");if(this.headerHeight){this._centerElement(this._closeButtonWrapper,this._header,"y","margin");this._centerElement(this._collapseButtonWrapper,this._header,"y","margin")}},_handleHeaderButtons:function(){if(!this._closeButtonWrapper){return}if(!this.showCloseButton){this._closeButtonWrapper.css("visibility","hidden")}else{this._closeButtonWrapper.css("visibility","visible");this._closeButtonWrapper.width(this.closeButtonSize);this._closeButtonWrapper.height(this.closeButtonSize)}if(!this.showCollapseButton){this._collapseButtonWrapper.css("visibility","hidden")}else{this._collapseButtonWrapper.css("visibility","visible");this._collapseButtonWrapper.width(this.collapseButtonSize);this._collapseButtonWrapper.height(this.collapseButtonSize)}},_performHeaderCloseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._closeButtonWrapper.width(this._closeButton.width());if(!this.rtl){this._closeButtonWrapper.css("margin-right",e);this._closeButtonWrapper.css("margin-left","0px")}else{this._closeButtonWrapper.css("margin-left",e);this._closeButtonWrapper.css("margin-right","0px")}}if(!this.rtl){this._closeButtonWrapper.css({position:"absolute",right:"0px",left:""})}else{this._closeButtonWrapper.css({position:"absolute",left:"0px",right:""})}},_performHeaderCollapseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._collapseButtonWrapper.width(this.collapseButtonSize);this._collapseButtonWrapper.height(this.collapseButtonSize);if(!this.rtl){this._collapseButtonWrapper.css("margin-right",e);this._collapseButtonWrapper.css("margin-left","0px")}else{this._collapseButtonWrapper.css("margin-left",e);this._collapseButtonWrapper.css("margin-right","0px")}}if(!this.rtl){this._collapseButtonWrapper.css({position:"absolute",right:(this.showCloseButton)?this._closeButton.outerWidth(true):0,left:""})}else{this._collapseButtonWrapper.css({position:"absolute",left:(this.showCloseButton)?this._closeButton.outerWidth(true):0,right:""})}this._centerElement(this._collapseButton,this._collapseButton.parent(),"y")},_performWidgetLayout:function(){var e;if(this.width!=="auto"){this.host.css("width",this.width)}if(!this.collapsed){if(this.height!=="auto"){this.host.height(this.height)}else{this.host.height(this.host.height())}this.host.css("min-height",this.minHeight)}this._setChildrenLayout();e=this._validateMinSize();this.host.css({"max-height":this.maxHeight,"min-width":this.minWidth,"max-width":this.maxWidth});if(!e){this._setChildrenLayout()}},_setChildrenLayout:function(){this._header.width(this.host.width()-(this._header.outerWidth(true)-this._header.width()));this._content.width(this.host.width()-(this._content.outerWidth(true)-this._content.width()));this._content.height(this.host.height()-this._header.outerHeight(true)-(this._content.outerHeight(true)-this._content.height()))},_validateMinSize:function(){var f=true;if(this.minHeight<this._header.height()){this.minHeight=this._header.height();f=false}var h=this._header.children(0).outerWidth(true),e=this._header.children(1).outerWidth(true),g=h+e;if(this.minWidth<100){this.minWidth=Math.min(g,100);f=false}return f},_centerElement:function(h,f,e,g){if(typeof f.left==="number"&&typeof f.top==="number"&&typeof f.height==="number"&&typeof f.width==="number"){this._centerElementInArea(h,f,e)}else{this._centerElementInParent(h,f,e,g)}},_centerElementInParent:function(e,m,h,f){h=h.toLowerCase();if(f){f+="-"}else{f=""}if(h.indexOf("y")>=0){var g=e.outerHeight(true),k=m.height(),i=(Math.max(0,k-g))/2;e.css(f+"top",i+"px")}if(h.indexOf("x")>=0){var o=e.outerWidth(true);var n=m.width();var l=(Math.max(0,n-o))/2;e.css(f+"left",l+"px")}},_centerElementInArea:function(f,e,h){h=h.toLowerCase();if(h.indexOf("y")>=0){var g=f.outerHeight(true);var k=e.height;var i=(k-g)/2;f.css("top",i+e.top+"px")}if(h.indexOf("x")>=0){var n=f.outerWidth(true);var m=e.width;var l=(m-n)/2;f.css("left",l+e.left+"px")}},_removeEventHandlers:function(){this.removeHandler(this._header,this._getEvent("mousedown"));this.removeHandler(this._header,this._getEvent("mousemove"));this.removeHandler(this._header,"focus");this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"));this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"));this.removeHandler(this.host,"keydown");this.removeHandler(this._closeButton,this._getEvent("click"));this.removeHandler(this._closeButton,this._getEvent("mouseenter"));this.removeHandler(this._closeButton,this._getEvent("mouseleave"));this.removeHandler(this._collapseButton,this._getEvent("click"));this.removeHandler(this._collapseButton,this._getEvent("mouseenter"));this.removeHandler(this._collapseButton,this._getEvent("mouseleave"));this.removeHandler(this.host,this._getEvent("mousedown"));this.removeHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(this._header,this._getEvent("mouseenter"));this.removeHandler(this._header,this._getEvent("mouseleave"));this.removeHandler(this.host,"resizing",this._windowResizeHandler)},_removeFromArray:function(e,g){var f=this._indexOf(e,g);if(f>=0){return g.splice(this._indexOf(e,g),1)}else{return g}},_sortByStyle:function(e,l){for(var h=0;h<l.length;h++){for(var f=l.length-1;f>h;f--){var m=l[f],k=l[f-1],g;if(parseInt(m.css(e),10)<parseInt(k.css(e),10)){g=m;l[f]=k;l[f-1]=g}}}},_initializeResize:function(){if(this.resizable){var e=this;this.initResize({target:this.host,alsoResize:e._content,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,minHeight:e.minHeight,indicatorSize:10,resizeParent:e.dragArea})}},_removeResize:function(){this.removeResize()},_getEvent:function(e){if(this._isTouchDevice){return this._touchEvents[e]}else{return e}},_addEventHandlers:function(){this._addDragDropHandlers();this._addCloseHandlers();this._addCollapseHandlers();this._addFocusHandlers();this._documentResizeHandlers();this._closeButtonHover();this._collapseButtonHover();this._addDialogButtonsHandlers();this._addHeaderHoverEffect();this._addResizeHandlers();var e=this;this.addHandler(this._header,this._getEvent("mousemove"),function(f){e._addHeaderCursorHandlers(e)})},_addResizeHandlers:function(){var e=this;this.addHandler(this.host,"resizing",this._windowResizeHandler,{self:this})},_windowResizeHandler:function(f){var e=f.data.self;e._header.width(e.host.width()-(e._header.outerWidth(true)-e._header.width()));e.width=f.args.width;e.height=f.args.height},_addHeaderHoverEffect:function(){var e=this;this.addHandler(this._header,this._getEvent("mouseenter"),function(){a(this).addClass(e.toThemeProperty("jqx-window-header-hover"))});this.addHandler(this._header,this._getEvent("mouseleave"),function(){a(this).removeClass(e.toThemeProperty("jqx-window-header-hover"))})},_addDialogButtonsHandlers:function(){if(this.okButton){this.addHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"ok"})}if(this.cancelButton){this.addHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"cancel"})}},_documentResizeHandlers:function(){var e=this;if(this.isModal){this.addHandler(a(window),"resize.window"+this.element.id,function(){if(typeof e._modalBackground==="object"&&e._modalBackground!==null){if(e.isOpen()){e._modalBackground.hide()}if(!e.restricter){e._modalBackground.width(e._getDocumentSize().width);e._modalBackground.height(e._getDocumentSize().height)}else{e._modalBackground.css("left",e.dragArea.left);e._modalBackground.css("top",e.dragArea.top);e._modalBackground.width(e.dragArea.width);e._modalBackground.height(e.dragArea.height)}if(e.isOpen()){e._modalBackground.show()}}})}},_setDialogResultHandler:function(f){var e=f.data.self;e._setDialogResult(f.data.result);e.closeWindow()},_setDialogResult:function(e){this.dialogResult.OK=false;this.dialogResult.None=false;this.dialogResult.Cancel=false;e=e.toLowerCase();switch(e){case"ok":this.dialogResult.OK=true;break;case"cancel":this.dialogResult.Cancel=true;break;default:this.dialogResult.None=true}},_getDocumentSize:function(){var e=a.jqx.browser.msie&&a.jqx.browser.version<9;var f=e?4:0;var g=f;if(document.body.scrollHeight>document.body.clientHeight&&e){f=this._SCROLL_WIDTH}if(document.body.scrollWidth>document.body.clientWidth&&e){g=this._SCROLL_WIDTH}return{width:a(document).width()-f,height:a(document).height()-g}},_closeButtonHover:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("mouseenter"),function(){e._closeButton.addClass(e.toThemeProperty("jqx-window-close-button-hover"))});this.addHandler(this._closeButton,this._getEvent("mouseleave"),function(){e._closeButton.removeClass(e.toThemeProperty("jqx-window-close-button-hover"))})},_collapseButtonHover:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("mouseenter"),function(){e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-hover"))});this.addHandler(this._collapseButton,this._getEvent("mouseleave"),function(){e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-hover"))})},_setModalBackgroundStyles:function(){if(this.isModal){this._modalBackground.fadeTo(0,this.modalOpacity);this._modalBackground.css({position:"absolute",top:"0px",left:"0px",width:this._getDocumentSize().width,height:this._getDocumentSize().height,"z-index":this.modalBackgroundZIndex});if(!this.autoOpen){this._modalBackground.css("display","none")}}},_addFocusHandlers:function(){var e=this;this.addHandler(this.host,this._getEvent("mousedown"),function(){if(!e.isModal){e.bringToFront()}})},_indexOf:function(f,g){for(var e=0;e<g.length;e++){if(g[e][0]===f[0]){return e}}return -1},_addCloseHandlers:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("click"),function(f){return e._closeWindow(f)});if(this.keyboardCloseKey!=="none"){if(typeof this.keyboardCloseKey!=="number"&&this.keyboardCloseKey.toLowerCase()==="esc"){this.keyboardCloseKey=27}}this.addHandler(this.host,"keydown",function(f){if(f.keyCode===e.keyboardCloseKey&&e.keyboardCloseKey!=null&&e.keyboardCloseKey!="none"){e._closeWindow(f)}else{e._handleKeys(f)}},{self:this});this.addHandler(this.host,"keyup",function(f){if(!e.keyboardNavigation){return}if(e._moved){var i=e.host.coord();var h=i.left;var g=i.top;e._raiseEvent(3,h,g,h,g);e._moved=false}})},_handleKeys:function(f){if(!this.keyboardNavigation){return}if(!this._headerFocused){return}if(a(document.activeElement).ischildof(this._content)){return}var e=f.ctrlKey;var n=f.keyCode;var l=this.host.coord();var k=l.left;var m=l.top;var g=this._getDraggingArea();var h=this.host.width();var o=this.host.height();var p=true;var i=10;switch(n){case 37:if(!e){if(this.draggable){if(k-i>=0){this.move(k-i,m)}}}else{if(this.resizable){this.resize(h-i,o)}}p=false;break;case 38:if(!e){if(this.draggable){if(m-i>=0){this.move(k,m-i)}}}else{if(this.resizable){this.resize(h,o-i)}}p=false;break;case 39:if(!e){if(this.draggable){if(k+h+i<=g.width){this.move(k+i,m)}}}else{if(this.resizable){this.resize(h+i,o)}}p=false;break;case 40:if(!e){if(this.draggable){if(m+o+i<=g.height){this.move(k,m+i)}}}else{if(this.resizable){this.resize(h,o+i)}}p=false;break}if(!p){if(f.preventDefault){f.preventDefault()}if(f.stopPropagation){f.stopPropagation()}}return p},_addCollapseHandlers:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("click"),function(){if(!e.collapsed){e.collapse()}else{e.expand()}})},_closeWindow:function(e){this.closeWindow();return false},_addHeaderCursorHandlers:function(e){if(e.resizeArea&&e.resizable&&!e.collapsed){e._header.css("cursor",e._resizeWrapper.css("cursor"));return}else{if(e.draggable){e._header.css("cursor","move");return}}e._header.css("cursor","default");if(e._resizeWrapper&&e._resizeWrapper.length>0){e._resizeWrapper.css("cursor","default")}},_addDragDropHandlers:function(){if(this.draggable){var e=this;this.addHandler(this.host,"focus",function(){e._headerFocused=true});this.addHandler(this.host,"blur",function(){e._headerFocused=false});this.addHandler(this._header,"focus",function(){e._headerFocused=true;return false});this.addHandler(this._header,this._getEvent("mousedown"),function(i){e._headerMouseDownHandler(e,i);return true});this.addHandler(this._header,"dragstart",function(i){if(i.preventDefault){i.preventDefault()}return false});this.addHandler(this._header,this._getEvent("mousemove"),function(i){return e._headerMouseMoveHandler(e,i)});this.addHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),function(i){return e._dragHandler(e,i)});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),function(i){return e._dropHandler(e,i)});try{if(document.referrer!=""||window.frameElement){var h=null;if(window.top!=null&&window.top!=window.self){if(window.parent&&document.referrer){h=document.referrer}}if(h&&h.indexOf(document.location.host)!=-1){var g=function(i){e._dropHandler(e,i)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}catch(f){}}},_headerMouseDownHandler:function(f,g){if(!f.isModal){f.bringToFront()}if(f._resizeDirection==null){var h=a.jqx.mobile.getTouches(g);var i=h[0];var e=a.jqx.position(g);f._mousePosition.x=e.left;f._mousePosition.y=e.top;f._mouseDown=true;f._isDragging=false}},_headerMouseMoveHandler:function(f,i){if(f._mouseDown&&!f._isDragging){var k=a.jqx.mobile.getTouches(i);var l=k[0];var h=l.pageX,g=l.pageY;var e=a.jqx.position(i);h=e.left;g=e.top;if((h+3<f._mousePosition.x||h-3>f._mousePosition.x)||(g+3<f._mousePosition.y||g-3>f._mousePosition.y)){f._isDragging=true;f._mousePosition={x:h,y:g};f._windowPosition={x:f.host.coord().left,y:f.host.coord().top};a(document.body).addClass(f.toThemeProperty("jqx-disableselect"))}if(f._isTouchDevice){i.preventDefault();return true}return false}if(f._isDragging){if(f._isTouchDevice){i.preventDefault();return true}return false}return true},_dropHandler:function(g,k){var f=true;if(g._isDragging&&!g.isResizing&&!g._resizeDirection){var e=parseInt(g.host.css("left"),10),l=parseInt(g.host.css("top"),10),i=(g._isTouchDevice)?0:k.pageX,h=(g._isTouchDevice)?0:k.pageY;g.enableResize=g._enableResizeBackup;g._enableResizeBackup="undefined";g._raiseEvent(3,e,l,i,h);f=false;if(k.preventDefault!="undefined"){k.preventDefault()}if(k.originalEvent!=null){k.originalEvent.mouseHandled=true}if(k.stopPropagation!="undefined"){k.stopPropagation()}}g._isDragging=false;g._mouseDown=false;a(document.body).removeClass(g.toThemeProperty("jqx-disableselect"));return f},_dragHandler:function(p,h){if(p._isDragging&&!p.isResizing&&!p._resizeDirection){var o=(p._isTouchDevice)?h.originalEvent.which:h.which;if(typeof p._enableResizeBackup==="undefined"){p._enableResizeBackup=p.enableResize}p.enableResize=false;if(o===0&&a.jqx.browser.msie&&a.jqx.browser.version<8){return p._dropHandler(p,h)}var m=a.jqx.mobile.getTouches(h);var l=m[0];var n=a.jqx.position(h);var k=n.left,i=n.top,g=k-p._mousePosition.x,f=i-p._mousePosition.y,e=p._windowPosition.x+g,q=p._windowPosition.y+f;p.move(e,q,h);h.preventDefault();return false}return true},_validateCoordinates:function(e,l,i,k){var h=this._getDraggingArea();e=(e<h.left)?h.left:e;l=(l<h.top)?h.top:l;var f=this.host.outerWidth(true);var g=this.host.outerHeight(true);if(e+f>=h.width+h.left-2*k){e=h.width+h.left-f-k}if(l+g>=h.height+h.top-i){l=h.height+h.top-g-i}return{x:e,y:l}},_performLayout:function(){this._performHeaderLayout();this._performWidgetLayout()},_parseDragAreaAttributes:function(){if(this.dragArea!==null){this.dragArea.height=parseInt(this.dragArea.height,10);this.dragArea.width=parseInt(this.dragArea.width,10);this.dragArea.top=parseInt(this.dragArea.top,10);this.dragArea.left=parseInt(this.dragArea.left,10)}},_positionWindow:function(){this._parseDragAreaAttributes();if(this.position instanceof Array&&this.position.length===2&&typeof this.position[0]==="number"&&typeof this.position[1]==="number"){this.host.css({left:this.position[0],top:this.position[1]})}else{if(this.position instanceof Object){if(this.position.left){this.host.offset(this.position)}else{if(this.position.x!==undefined&&this.position.y!=undefined){this.host.css({left:this.position.x,top:this.position.y})}else{if(this.position.center){this._centerElement(this.host,this.position.center,"xy");var g=this.position.center.coord();var f=parseInt(this.host.css("left"));var e=parseInt(this.host.css("top"));this.host.css({left:f+g.left,top:e+g.top})}}}}else{this._positionFromLiteral()}}},_getDraggingArea:function(){var e={};e.left=((this.dragArea&&this.dragArea.left)?this.dragArea.left:0);e.top=((this.dragArea&&this.dragArea.top)?this.dragArea.top:0);e.width=((this.dragArea&&this.dragArea.width)?this.dragArea.width:this._getDocumentSize().width);e.height=((this.dragArea&&this.dragArea.height)?this.dragArea.height:this._getDocumentSize().height);return e},_positionFromLiteral:function(){if(!(this.position instanceof Array)){this.position=this.position.split(",")}var e=this.position.length,f=this._getDraggingArea();while(e){e-=1;this.position[e]=this.position[e].replace(/ /g,"");switch(this.position[e]){case"top":this.host.css("top",f.top);break;case"left":this.host.css("left",f.left);break;case"bottom":this.host.css("top",f.height-this.host.height()+f.top);break;case"right":this.host.css("left",f.left+f.width-this.host.width());break;default:if(!this.dragArea){f=a(window)}this._centerElement(this.host,f,"xy");break}}},_raiseEvent:function(g){var f=this._events[g],h=a.Event(f),e={};if(g===2||g===3){e.x=arguments[1];e.y=arguments[2];e.pageX=arguments[3];e.pageY=arguments[4]}if(f==="closed"||f==="close"){e.dialogResult=this.dialogResult}h.args=e;return this.host.trigger(h)},destroy:function(){this.removeHandler(a(window),"resize.window"+this.element.id);this._removeEventHandlers();this._destroy()},_destroy:function(){if(this.restricter){this.removeHandler(a(window),"resize."+this.element.id);this.removeHandler(a(window),"orientationchanged."+this.element.id);this.removeHandler(a(window),"orientationchange."+this.element.id)}this.host.remove();if(this._modalBackground!==null){this._modalBackground.remove()}},_toClose:function(f,e){return((f&&e[0]===this.element)||(e[0]!==this.element&&typeof e[0]==="object"))},propertyChangedHandler:function(e,f,h,g){this._validateProperties();switch(f){case"rtl":this._performLayout();break;case"dragArea":this._positionWindow();break;case"collapseButtonSize":this._performLayout();break;case"closeButtonSize":this._performLayout();break;case"isModal":this._refresh();this._fixWindowZIndex();break;case"keyboardCloseKey":this._removeEventHandlers();this._addEventHandlers();break;case"disabled":if(g){this.disable()}else{this.disabled=true;this.enable()}break;case"showCloseButton":case"showCollapseButton":this._performLayout();break;case"height":this._performLayout();break;case"width":this._performLayout();break;case"title":this.setTitle(g);this.title=g;break;case"content":this.setContent(g);break;case"draggable":this._removeEventHandlers();this._addEventHandlers();this._initializeResize();break;case"resizable":this.enableResize=g;if(g){this._initializeResize()}else{this._removeResize()}break;case"position":this._positionWindow();break;case"modalOpacity":this._setModalBackgroundStyles();break;case"okButton":if(g){this._addDialogButtonsHandlers()}else{this.removeHandler(this.okButton)}break;case"cancelButton":if(g){this._addDialogButtonsHandlers()}else{this.removeHandler(this.cancelButton)}break;case"collapsed":if(g){if(!h){this.collapsed=false;this.collapse(0)}}else{if(h){this.collapsed=true;this.expand(0)}}case"theme":a.jqx.utilities.setTheme(h,g,this.host);break;case"enableResize":return;case"maxWidth":case"maxHeight":case"minWidth":case"minHeight":e._performLayout();e._removeResize();e._initializeResize();return;default:return}},collapse:function(g){if(!this.collapsed&&!this.host.is(":animated")){if(this.host.css("display")=="none"){return}var e=this,h=this._header.outerHeight(true),i=parseInt(this._header.css("border-bottom-width"),10),f=parseInt(this._header.css("margin-bottom"),10),g=!isNaN(parseInt(g))?g:this.collapseAnimationDuration;if(!isNaN(i)){h-=2*i}if(!isNaN(f)){h+=f}this._heightBeforeCollapse=this.host.height();this._minHeightBeforeCollapse=this.host.css("min-height");this.host.css("min-height",h);this.host.animate({height:h},g,function(){e.collapsed=true;e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-collapsed"));e._collapseButton.addClass(e.toThemeProperty("jqx-icon-arrow-down"));e._content.css("display","none");e._raiseEvent(5);e._raiseEvent(9);a.jqx.aria(e,"aria-expanded",false)})}},expand:function(f){if(this.collapsed&&!this.host.is(":animated")){var e=this,f=!isNaN(parseInt(f))?f:this.collapseAnimationDuration;this.host.animate({height:this._heightBeforeCollapse},f,function(){e.collapsed=false;e.host.css("min-height",e._minHeightBeforeCollapse);e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-collapsed"));e._collapseButton.removeClass(e.toThemeProperty("jqx-icon-arrow-down"));e._content.css("display","block");e._raiseEvent(6);e._performWidgetLayout();e._raiseEvent(9);a.jqx.aria(e,"aria-expanded",true)})}},closeAll:function(h){var h=true;var g=a.data(document.body,"jqxwindows-list"),f=g.length,e=a.data(document.body,"jqxwindow-modal")||[];while(f){f-=1;if(this._toClose(h,g[f])){g[f].jqxWindow("closeWindow","close");g.splice(f,1)}}if(this._toClose(h,e)){e.jqxWindow("closeWindow","close");a.data(document.body,"jqxwindow-modal",[])}a.data(document.body,"jqxwindows-list",g)},setTitle:function(e){a.jqx.utilities.html(this._headerContentWrapper,e);this.title=e;this._performLayout()},setContent:function(f){this._contentInitialized=false;var e=this._content,g=false;while(!g){e.css("height","auto");e.css("width","auto");if(e.is(".jqx-window")){g=true}else{e=e.parent()}}a.jqx.utilities.html(this._content,f);this._performLayout()},disable:function(){this.disabled=true;this._removeEventHandlers();this._header.addClass(this.toThemeProperty("jqx-window-header-disabled"));this._closeButton.addClass(this.toThemeProperty("jqx-window-close-button-disabled"));this._collapseButton.addClass(this.toThemeProperty("jqx-window-collapse-button-disabled"));this._content.addClass(this.toThemeProperty("jqx-window-content-disabled"));this.host.addClass(this.toThemeProperty("jqx-window-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this._removeResize()},enable:function(){if(this.disabled){this._addEventHandlers();this._header.removeClass(this.toThemeProperty("jqx-window-header-disabled"));this._content.removeClass(this.toThemeProperty("jqx-window-content-disabled"));this._closeButton.removeClass(this.toThemeProperty("jqx-window-close-button-disabled"));this._collapseButton.removeClass(this.toThemeProperty("jqx-window-collapse-button-disabled"));this.host.removeClass(this.toThemeProperty("jqx-window-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.disabled=false;this._initializeResize()}},isOpen:function(){return this._visible},closeWindow:function(f){var e=this;f=(typeof f==="undefined")?this.closeButtonAction:f;this.hide(function(){if(f==="close"){e._destroy()}})},bringToFront:function(){var f=a.data(document.body,"jqxwindows-list");if(this.isModal){f=a.data(document.body,"jqxwindows-modallist");this._fixWindowZIndex("modal-hide");this._fixWindowZIndex("modal-show");return}var l=f[f.length-1],k=parseInt(l.css("z-index"),10),g=this._indexOf(this.host,f);for(var e=f.length-1;e>g;e-=1){var h=parseInt(f[e].css("z-index"),10)-1;f[e].css("z-index",h)}this.host.css("z-index",k);this._sortByStyle("z-index",f)},hide:function(h,g,e){if(this.closing){var f=this.closing();if(f==false){return}}g=g||this.closeAnimationDuration;switch(this.animationType){case"none":this.host.css("display","none");break;case"fade":this.host.fadeOut(g,function(){if(h instanceof Function){h()}});case"slide":this.host.slideUp(g,function(){if(h instanceof Function){h()}});case"combined":this.host.hide(g,function(){if(h instanceof Function){h()}})}this._visible=false;if(this.isModal){this._modalBackground.hide();this._fixWindowZIndex("modal-hide")}if(e!==true){this._raiseEvent(1);this._raiseEvent(8)}},open:function(f,e){this.show(f,e)},close:function(g,f,e){this.hide(g,f,e)},show:function(h,g){this._setDialogResult("none");g=g||this.showAnimationDuration;switch(this.animationType){case"none":this.host.css("display","block");break;case"fade":this.host.fadeIn(g,function(){if(h instanceof Function){h()}});break;case"slide":this.host.slideDown(g,function(){if(h instanceof Function){h()}});break;case"combined":this.host.show(g,function(){if(h instanceof Function){h()}});break}if(this.isModal){this._modalBackground.show();this._fixWindowZIndex("modal-show")}var f=this;if(!this._visible){if(g>150&&this.animationType!="none"){setTimeout(function(){if(!f._contentInitialized){if(f.initContent){f.initContent();f._contentInitialized=true}}f._raiseEvent(7);f._raiseEvent(9)},g-150)}else{if(!f._contentInitialized){if(f.initContent){f.initContent();f._contentInitialized=true}}this._raiseEvent(7);f._raiseEvent(9)}}this._visible=true;this._performLayout();var e=function(){if(!f._isTouchDevice){f._content.focus()}};e();setTimeout(function(){e()},100)},_getTabbables:function(){var f=this._content.find("*");var e=new Array();a.each(f,function(){if(d(this)){e[e.length]=this}});return e},move:function(q,p,e,h){var g=0,f=0,n,k,i,q=parseInt(q,10),p=parseInt(p,10);if(a.jqx.browser.msie){if(a(window).width()>a(document).width()&&!this.dragArea){f=this._SCROLL_WIDTH}if(a(window).height()<a(document).height()&&document.documentElement.clientWidth>document.documentElement.scrollWidth&&!this.dragArea){g=this._SCROLL_WIDTH}}n=this._validateCoordinates(q,p,f,g);if(parseInt(this.host.css("left"),10)!==n.x||parseInt(this.host.css("top"),10)!==n.y){if(e){var m=a.jqx.mobile.getTouches(e);var l=m[0];var o=a.jqx.position(e);k=o.left;i=o.top}if(k==undefined){k=q}if(i==undefined){i=p}if(h!==false){this._raiseEvent(2,n.x,n.y,k,i)}}this.element.style.left=n.x+"px";this.element.style.top=n.y+"px";this._moved=true}});function c(g,e){var k=g.nodeName.toLowerCase();if("area"===k){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(k)?!g.disabled:"a"==k?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.css(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function d(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}}(jqxBaseFramework));(function(b){var a=(function(c){return{resizeConfig:function(){this.resizeTarget=null;this.resizeIndicatorSize=5;this.resizeTargetChildren=null;this.isResizing=false;this.resizeArea=false;this.minWidth=1;this.maxWidth=100;this.minHeight=1;this.maxHeight=100;this.resizeParent=null;this.enableResize=true;this._cursorBackup;this._resizeEvents=["resizing","resized","resize"];this._resizeMouseDown=false;this._resizeCurrentMode=null;this._mouseResizePosition={};this._resizeMethods=null;this._SCROLL_WIDTH=21},_resizeExceptions:{invalidTarget:"Invalid target!",invalidMinHeight:"Invalid minimal height!",invalidMaxHeight:"Invalid maximum height!",invalidMinWidth:"Invalid minimum width!",invalidMaxWidth:"Invalid maximum width!",invalidIndicatorSize:"Invalid indicator size!",invalidSize:"Invalid size!"},removeResize:function(){if(this.resizeTarget){var f=c(this.resizeTarget.children(".jqx-resize"));f.detach();var e=f.children();this._removeResizeEventListeners();for(var d=0;d<e.length;d+=1){c(e[d]).detach();this.resizeTarget.append(e[d])}f.remove()}},initResize:function(d){this.resizeConfig();this.resizeTarget=c(d.target);this.resizeIndicatorSize=d.indicatorSize||10;this.maxWidth=d.maxWidth||100;this.minWidth=d.minWidth||1;this.maxHeight=d.maxHeight||100;this.minHeight=d.minHeight||1;this.resizeParent=d.resizeParent;this._parseResizeParentProperties();this._validateResizeProperties();this._validateResizeTargetDimensions();this._getChildren(this.resizeTarget.maxWidth,this.resizeTarget.minWidth,this.resizeTarget.maxHeight,this.resizeTarget.minHeight,d.alsoResize);this._refreshResize();this._cursorBackup=this.resizeTarget.css("cursor");if(this._cursorBackup==="auto"){this._cursorBackup="default"}},_validateResizeTargetDimensions:function(){this.resizeTarget.maxWidth=this.maxWidth;this.resizeTarget.minWidth=((3*this.resizeIndicatorSize>this.minWidth)?3*this.resizeIndicatorSize:this.minWidth);this.resizeTarget.maxHeight=this.maxHeight;this.resizeTarget.minHeight=((3*this.resizeIndicatorSize>this.minHeight)?3*this.resizeIndicatorSize:this.minHeight)},_parseResizeParentProperties:function(){if(this.resizeParent){this.resizeParent.left=parseInt(this.resizeParent.left,10);this.resizeParent.top=parseInt(this.resizeParent.top,10);this.resizeParent.width=parseInt(this.resizeParent.width,10);this.resizeParent.height=parseInt(this.resizeParent.height,10)}},_getChildren:function(h,e,g,i,d){this.resizeTargetChildren=c(d);this.resizeTargetChildren.toArray();var f=this.resizeTargetChildren.length;while(f){f-=1;this.resizeTargetChildren[f]=c(this.resizeTargetChildren[f])}},_refreshResize:function(){this._renderResize();this._performResizeLayout();this._removeResizeEventListeners();this._addResizeEventHandlers()},_renderResize:function(){this.resizeTarget.wrapInner(c("<div></div>"));this._resizeWrapper=this.resizeTarget.children(0);this._resizeWrapper.addClass("jqx-resize");this._resizeWrapper.addClass("jqx-rc-all");this._resizeWrapper.css("z-index",8000)},_performResizeLayout:function(){this._resizeWrapper.height(this.resizeTarget.height());this._resizeWrapper.width(this.resizeTarget.width())},_removeResizeEventListeners:function(){var d=this.resizeTarget.attr("id");this.removeHandler(this._resizeWrapper,"mousemove.resize"+d);this.removeHandler(this._resizeWrapper,"mousedown.resize"+d);this.removeHandler(c(document),"mousemove.resize"+d);this.removeHandler(c(document),"mouseup.resize"+d)},_addResizeEventHandlers:function(){var g=this.resizeTarget.attr("id");var d=this;this.addHandler(this._resizeWrapper,"mousemove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"mousedown.resize."+g,function(h){d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"mousemove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"mouseup.resize."+g,function(h){d._stopResizing(d,h)});try{if(document.referrer!=""||window.frameElement){var f=function(h){d._stopResizing(d,h)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",f,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",f)}}}}catch(e){}},_stopResizing:function(d,e){if(d.enableResize){if(d.isResizing){d._raiseResizeEvent(1)}d._resizeMouseDown=false;d.isResizing=false;d._resizeDirection=null;if(d.resizeTarget){d.resizeTarget.removeClass("jqx-disableselect")}}if(d._cursorBackup=="undefined"){d._cursorBackup="default"}if(d._resizeWrapper){d._resizeWrapper.css("cursor",d._cursorBackup)}},_resizeHandler:function(d,e){if(d.enableResize&&!d.collapsed){if(d.isResizing&&d._resizeDirection){if(e.which===0&&c.jqx.browser.msie&&c.jqx.browser.version<9){d._stopResizing(e)}d._performResize(e.pageX,e.pageY);return false}else{return d._resizeCaptureCursor(e.pageX,e.pageY)}}},_resizeCaptureCursor:function(e,d){if(this._resizeMouseDown&&!this.isResizing&&this._resizeDirection){if((e+3<this._mouseResizePosition.x||e-3>this._mouseResizePosition.x)||(d+3<this._mouseResizePosition.y||d-3>this._mouseResizePosition.y)){this._changeCursor(e-parseInt(this.resizeTarget.css("left")),d-parseInt(this.resizeTarget.css("top")));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}}},_resizeBackupData:function(){this.resizeTarget.lastWidth=this.resizeTarget.width();this.resizeTarget.lastHeight=this.resizeTarget.height();this.resizeTarget.x=parseInt(this.resizeTarget.css("left"),10);this.resizeTarget.y=parseInt(this.resizeTarget.css("top"),10);this._resizeBackupChildrenSize()},_resizeBackupChildrenSize:function(){var d=this.resizeTargetChildren.length,e;while(d){d-=1;e=this.resizeTargetChildren[d];this.resizeTargetChildren[d].lastWidth=e.width();this.resizeTargetChildren[d].lastHeight=e.height()}},_performResize:function(g,f){var e=g-this._mouseResizePosition.x,d=f-this._mouseResizePosition.y;if(this._resizeDirection){this._resize(this.resizeTarget,e,d)}},_resizeCursorChangeHandler:function(d,e){if(d.enableResize&&!d.collapsed){if(!d.isResizing){d._changeCursor(e.pageX-parseInt(d.resizeTarget.css("left")),e.pageY-parseInt(d.resizeTarget.css("top")))}}},_resizeMouseDownHandler:function(d,e){if(d.enableResize){if(d._resizeDirection!==null){d._resizeMouseDown=true;d._mouseResizePosition.x=e.pageX;d._mouseResizePosition.y=e.pageY;e.preventDefault()}}},_validateResizeProperties:function(){try{if(!this.resizeTarget||this.resizeTarget.length!==1){throw new Error(this._resizeExceptions.invalidTarget)}if(this.minHeight<0||isNaN(parseInt(this.minHeight))){throw new Error(this._resizeExceptions.invalidMinHeight)}if(this.maxHeight<=0||isNaN(parseInt(this.maxHeight))){throw new Error(this._resizeExceptions.invalidMaxHeight)}if(this.minWidth<0||isNaN(parseInt(this.minWidth))){throw new Error(this._resizeExceptions.invalidMinWidth)}if(this.maxWidth<0||isNaN(parseInt(this.maxWidth))){throw new Error(this._resizeExceptions.invalidMaxWidth)}if(this.resizeIndicatorSize<0||isNaN(parseInt(this.resizeIndicatorSize))){throw new Error(this._resizeExceptions.invalidIndicatorSize)}if(this.minHeight>this.maxHeight||this.minWidth>this.maxWidth){throw new Error(this._resizeExceptions.invalidSize)}}catch(d){alert(d)}},_changeCursor:function(d,e){if(this.isResizing||this._resizeMouseDown){return}this.resizeArea=true;if(d<=this.resizeIndicatorSize&&d>=0&&e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.css("cursor","nw-resize");this._resizeDirection="topleft"}else{if(e<=this.resizeIndicatorSize&&e>0&&d>=this.resizeTarget.width()-this.resizeIndicatorSize){this._resizeWrapper.css("cursor","ne-resize");this._resizeDirection="topright"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()&&d<=this.resizeIndicatorSize&&d>=0){this._resizeWrapper.css("cursor","sw-resize");this._resizeDirection="bottomleft"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()&&d>=this.resizeTarget.width()-this.resizeIndicatorSize&&d<this.resizeTarget.width()){this._resizeWrapper.css("cursor","se-resize");this._resizeDirection="bottomright"}else{if(d<=this.resizeIndicatorSize&&d>=0){this._resizeWrapper.css("cursor","e-resize");this._resizeDirection="left"}else{if(e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.css("cursor","n-resize");this._resizeDirection="top"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()){this._resizeWrapper.css("cursor","n-resize");this._resizeDirection="bottom"}else{if(d>=this.resizeTarget.width()-this.resizeIndicatorSize&&d<this.resizeTarget.width()){this._resizeWrapper.css("cursor","e-resize");this._resizeDirection="right"}else{this._resizeWrapper.css("cursor",this._cursorBackup);this._resizeDirection=null;this.resizeArea=false}}}}}}}}},_prepareResizeMethods:function(d){this._resizeMethods=[];if(d.indexOf("left")>=0){this._resizeMethods.push(this._resizeLeft)}if(d.indexOf("top")>=0){this._resizeMethods.push(this._resizeTop)}if(d.indexOf("right")>=0){this._resizeMethods.push(this._resizeRight)}if(d.indexOf("bottom")>=0){this._resizeMethods.push(this._resizeBottom)}},_validateResize:function(g,d,h,f,e){if(h==="horizontal"||h==="both"){return this._validateWidth(g,f,e)}else{if(h==="vertical"||h==="both"){return this._validateHeight(d,f,e)}}return{result:false,fix:0}},_getParent:function(){if(this.resizeParent!==null&&this.resizeParent!=="undefined"&&this.resizeParent.height&&this.resizeParent.width&&this.resizeParent.top&&this.resizeParent.left){return this.resizeParent}return{left:0,top:0,width:c(document).width(),height:c(document).height()}},_validateHeight:function(f,k,i){var l=0,e=2,d=false,h=f,g=this._getParent();if(c(window).width()>c(document).width()&&c.jqx.browser.msie&&g.height===c(document).height()){l=this._SCROLL_WIDTH}if(i==="bottom"&&(f+k.position().top+l+e>g.height+g.top)){return{fix:g.height-k.position().top-l-e+g.top,result:false}}if(i==="top"&&k.lastHeight-f+k.y<g.top){return{fix:f+(k.lastHeight-f+k.y)-g.top,result:false}}if(f<k.minHeight){return{fix:k.minHeight,result:false}}if(f>k.maxHeight){return{fix:k.maxHeight,result:false}}return{result:true,fix:f}},_validateWidth:function(k,i,h){var l=0,e=2,d=false,g=k,f=this._getParent();if(c(window).height()<c(document).height()&&c.jqx.browser.msie&&document.documentElement.clientWidth>=document.documentElement.scrollWidth&&f.width===c(document).width()){l=this._SCROLL_WIDTH}if(h==="right"&&(k+i.position().left+l+e>f.width+f.left)){return{fix:f.width-i.position().left-l-e+f.left,result:false}}if(h==="left"&&(i.lastWidth-k+i.x<f.left)){return{fix:k+(i.lastWidth-k+i.x)-f.left,result:false}}if(k<i.minWidth){return{fix:i.minWidth,result:false}}if(k>i.maxWidth){return{fix:i.maxWidth,result:false}}return{result:true,fix:k}},_resize:function(h,e,d){var l=this._resizeDirection;var k=this._resizeMethods.length;for(var g=0;g<k;g++){if(this._resizeMethods[g] instanceof Function){var f={element:h,x:e,y:d,self:this};this._resizeMethods[g](f)}}this._performResizeLayout()},resize:function(g,d){if(this.resizable){var f=g-this.host.width();var e=d-this.host.height();var h="right";if(e!=0){h="bottom"}this._resizeDirection=h;this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this._resize(this.resizeTarget,f,e);this.isResizing=false}},_setResizeChildrenSize:function(e,f){var h=this.resizeTargetChildren.length;while(h){h--;if(f==="width"){var g=this.resizeTargetChildren[h].lastWidth-(this.resizeTarget.lastWidth-e);if(g<this.resizeTarget.maxWidth&&g>0){this.resizeTargetChildren[h].width(g)}}else{var d=this.resizeTargetChildren[h].lastHeight-(this.resizeTarget.lastHeight-e);if(d<this.resizeTarget.maxHeight&&d>0){this.resizeTargetChildren[h].height(d)}}}},_resizeRight:function(e){var f=e.element.lastWidth+e.x,d=e.self._validateResize(f,0,"horizontal",e.element,"right");if(!d.result){f=d.fix}if(e.element.width()!==f){e.self._setResizeChildrenSize(f,"width");e.element.width(f);e.self._raiseResizeEvent(0)}return f},_resizeLeft:function(f){var g=f.element.lastWidth-f.x,e=f.self._validateResize(g,0,"horizontal",f.element,"left"),d=f.element.x+f.x;if(!e.result){d=f.element.x+(f.element.lastWidth-e.fix);g=e.fix;return}if(f.element.width()!==g){f.self._setResizeChildrenSize(g,"width");f.element.width(g);f.element.css("left",d);f.self._raiseResizeEvent(0)}return g},_resizeBottom:function(f){var e=f.element.lastHeight+f.y,d=f.self._validateResize(0,e,"vertical",f.element,"bottom");if(!d.result){e=d.fix}if(f.element.height()!==e){f.self._setResizeChildrenSize(e,"height");f.element.height(e);f.self._raiseResizeEvent(0)}return e},_resizeTop:function(f){var e=f.element.lastHeight-f.y,d=f.self._validateResize(0,e,"vertical",f.element,"top"),g=f.element.y+f.y;if(!d.result){g=f.element.y+(f.element.lastHeight-d.fix);e=d.fix;return}if(f.element.height()!==e){f.self._setResizeChildrenSize(e,"height");f.element.height(e);f.element.css("top",g);f.self._raiseResizeEvent(0)}return e},_raiseResizeEvent:function(f){var e=this._resizeEvents[f],g=c.Event(e),d={};d.width=parseInt(this.resizeTarget[0].style.width);d.height=parseInt(this.resizeTarget[0].style.height);g.args=d;if(f==0){var e=this._resizeEvents[2],h=c.Event(e);h.args=d;this.resizeTarget.trigger(h)}return this.resizeTarget.trigger(g)}}}(jqxBaseFramework));b.extend(b.jqx._jqxWindow.prototype,a)}(jqxBaseFramework)); | ||
(function(a){a.jqx.jqxWidget("jqxWindow","",{});a.extend(a.jqx._jqxWindow.prototype,{defineInstance:function(){var e={height:"auto",width:200,minHeight:50,maxHeight:600,minWidth:50,maxWidth:800,showCloseButton:true,disabled:false,autoOpen:true,keyboardCloseKey:"esc",title:"",content:"",draggable:true,resizable:true,animationType:"fade",closeAnimationDuration:250,showAnimationDuration:250,isModal:false,position:"center",closeButtonSize:16,closeButtonAction:"hide",modalOpacity:0.3,dragArea:null,okButton:null,cancelButton:null,dialogResult:{OK:false,Cancel:false,None:true},collapsed:false,showCollapseButton:false,collapseAnimationDuration:150,collapseButtonSize:16,rtl:false,keyboardNavigation:true,headerHeight:null,_events:["created","closed","moving","moved","open","collapse","expand","open","close","resize"],initContent:null,enableResize:true,restricter:null,closing:null,_invalidArgumentExceptions:{invalidHeight:"Invalid height!",invalidWidth:"Invalid width!",invalidMinHeight:"Invalid minHeight!",invalidMaxHeight:"Invalid maxHeight!",invalidMinWidth:"Invalid minWidth!",invalidMaxWidth:"Invalid maxWidth",invalidKeyCode:"Invalid keyCode!",invalidAnimationType:"Invalid animationType!",invalidCloseAnimationDuration:"Invalid closeAnimationDuration!",invalidShowAnimationDuration:"Invalid showAnimationDuration!",invalidPosition:"Invalid position!",invalidCloseButtonSize:"Invalid closeButtonSize!",invalidCollapseButtonSize:"Invalid collapseButtonSize!",invalidCloseButtonAction:"Invalid cluseButtonAction!",invalidModalOpacity:"Invalid modalOpacity!",invalidDragArea:"Invalid dragArea!",invalidDialogResult:"Invalid dialogResult!",invalidIsModal:"You can have just one modal window!"},_enableResizeCollapseBackup:null,_enableResizeBackup:undefined,_heightBeforeCollapse:null,_minHeightBeforeCollapse:null,_mouseDown:false,_isDragging:false,_rightContentWrapper:null,_leftContentWrapper:null,_headerContentWrapper:null,_closeButton:null,_collapseButton:null,_title:null,_content:null,_mousePosition:{},_windowPosition:{},_modalBackground:null,_SCROLL_WIDTH:21,_visible:true,modalBackgroundZIndex:12990,modalZIndex:18000,zIndex:9001,_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave",click:a.jqx.mobile.getTouchEventName("touchstart")}};a.extend(true,this,e);return e},createInstance:function(){this.host.attr("role","dialog");this.host.removeAttr("data-bind");this.host.detach();a(document.body).append(this.host);var f=this;var g=function(){var i=parseInt(a(f.restricter).css("padding-top"));var h=parseInt(a(f.restricter).css("padding-left"));var k=parseInt(a(f.restricter).css("padding-bottom"));var m=parseInt(a(f.restricter).css("padding-right"));var l=a(f.restricter).coord();f.dragArea={left:h+l.left,top:i+l.top,width:1+m+a(f.restricter).width(),height:1+k+a(f.restricter).height()}};if(this.restricter){g()}if(this.restricter){this.addHandler(a(window),"resize."+this.element.id,function(){g()});this.addHandler(a(window),"orientationchanged."+this.element.id,function(){g()});this.addHandler(a(window),"orientationchange."+this.element.id,function(){g()})}this._isTouchDevice=a.jqx.mobile.isTouchDevice();this._validateProperties();this._createStructure();this._refresh();if(!this.autoOpen){this.host.css("display","none")}if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}if(!this.isModal){this._fixWindowZIndex()}this._setStartupSettings();this._positionWindow();this._raiseEvent(0);if(this.autoOpen){this._performLayout();var e=this;if(this.isModal){this._fixWindowZIndex("modal-show")}if(e.initContent){e.initContent();e._contentInitialized=true}this._raiseEvent(7);this._raiseEvent(9)}},refresh:function(){this._performLayout()},_setStartupSettings:function(){if(this.disabled){this.disable()}if(this.collapsed){this.collapsed=false;this.collapse(0)}if(!this.autoOpen){this.hide(null,0.001,true);this._visible=false}if(this.title!==null&&this.title!==""){this.setTitle(this.title)}if(this.content!==null&&this.content!==""){this.setContent(this.content)}this.title=this._headerContentWrapper.html();this.content=this._content.html()},_fixWindowZIndex:function(m){var e=a.data(document.body,"jqxwindows-list")||[],n=this.zIndex,h;if(!this.isModal){if(this._indexOf(this.host,e)<0){e.push(this.host)}a.data(document.body,"jqxwindows-list",e);if(e.length>1){var f=e[e.length-2];n=parseInt(f.css("z-index"),10)+1}}else{if(e){e=this._removeFromArray(this.host,e);a.data(document.body,"jqxwindows-list",e)}var g=a.data(document.body,"jqxwindows-modallist");if(!g){if(m=="modal-show"){var k=new Array();k.push(this.host);a.data(document.body,"jqxwindows-modallist",k);g=k}else{a.data(document.body,"jqxwindows-modallist",new Array());g=new Array()}}else{if(m=="modal-show"){g.push(this.host)}else{var i=g.indexOf(this.host);if(i!=-1){g.splice(i,1)}}}n=this.modalZIndex;var l=this;a.each(g,function(q){if(this.data()){if(this.data().jqxWindow){var o=this.data().jqxWindow.instance;o._modalBackground.css("z-index",n);o.host.css("z-index",n+1);n+=2}}});a.data(document.body,"jqxwindow-modal",this.host);return}this.host.css("z-index",n);this._sortByStyle("z-index",e)},_validateProperties:function(){try{this._validateSize();this._validateAnimationProperties();this._validateInteractionProperties();this._validateModalProperties();if(!this.position){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(isNaN(this.closeButtonSize)||parseInt(this.closeButtonSize)<0){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonSize)}if(isNaN(this.collapseButtonSize)||parseInt(this.collapseButtonSize)<0){throw new Error(this._invalidArgumentExceptions.invalidCollapseButtonSize)}}catch(e){alert(e)}},_validateModalProperties:function(){if(this.modalOpacity<0||this.modalOpacity>1){throw new Error(this._invalidArgumentExceptions.invalidModalOpacity)}if(this.isModal&&!this._singleModalCheck()){throw new Error(this._invalidArgumentExceptions.invalidIsModal)}},_validateSize:function(){this._validateSizeLimits();if(this.height!=="auto"&&isNaN(parseInt(this.height))){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.width!=="auto"&&isNaN(parseInt(this.width))){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(this.height!=="auto"&&this.height<this.minHeight){this.height=this.minHeight}if(this.width<this.minWidth){this.width=this.minWidth}if(this.height!=="auto"&&this.height>this.maxHeight){this.height=this.maxHeight}if(this.width>this.maxWidth){this.width=this.maxWidth}if(this.dragArea===null){return}if(this.dragArea&&((this.dragArea.height!==null&&this.host.height()>this.dragArea.height)||(parseInt(this.height,10)>this.dragArea.height))||(this.dragArea.width!==null&&this.width>this.dragArea.width)||(this.maxHeight>this.dragArea.height||this.maxWidth>this.dragArea.width)){}},_validateSizeLimits:function(){if(this.maxHeight==null){this.maxHeight=9999}if(this.minWidth==null){this.minWidth=0}if(this.maxWidth==null){this.maxWidth=9999}if(this.minHeight==null){this.minHeight=0}if(isNaN(parseInt(this.minHeight))){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(isNaN(parseInt(this.maxHeight))){throw new Error(this._invalidArgumentExceptions.invalidMaxHeight)}if(isNaN(parseInt(this.minWidth))){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}if(isNaN(parseInt(this.maxWidth))){throw new Error(this._invalidArgumentExceptions.invalidMaxWidth)}if(this.minHeight>this.maxHeight){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(this.minWidth>this.maxWidth){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}},_validateAnimationProperties:function(){if(this.animationType!=="fade"&&this.animationType!=="slide"&&this.animationType!=="combined"&&this.animationType!=="none"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(isNaN(parseInt(this.closeAnimationDuration),10)||this.closeAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidCloseAnimationDuration)}if(isNaN(parseInt(this.showAnimationDuration),10)||this.showAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidShowAnimationDuration)}},_validateInteractionProperties:function(){if(parseInt(this.keyCode,10)<0||parseInt(this.keyCode,10)>130&&this.keyCode!=="esc"){throw new Error(this._invalidArgumentExceptions.invalidKeyCode)}if(this.dragArea!==null&&(typeof this.dragArea.width==="undefined"||typeof this.dragArea.height==="undefined"||typeof this.dragArea.left==="undefined"||typeof this.dragArea.top==="undefined")){throw new Error(this._invalidArgumentExceptions.invalidDragArea)}if(!this.dialogResult||(!this.dialogResult.OK&&!this.dialogResult.Cancel&&!this.dialogResult.None)){throw new Error(this._invalidArgumentExceptions.invalidDialogResult)}if(this.closeButtonAction!=="hide"&&this.closeButtonAction!=="close"){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonAction)}},_singleModalCheck:function(){var e=a.data(document.body,"jqxwindows-list")||[],f=e.length;while(f){f-=1;if(a(e[f].attr("id")).length>0){if(a(e[f].attr("id")).jqxWindow("isModal")){return false}}}return true},_createStructure:function(){var e=this.host.children("DIV");if(e.length===1){this._header=a("<div>"+this.host.attr("caption")+"</div>");this.host.prepend(this._header);this.host.attr("caption","");this._content=a(e[0])}else{if(e.length===2){this._header=a(e[0]);this._content=a(e[1])}else{throw new Error("Invalid structure!")}}},_refresh:function(){this._render();this._addStyles();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initializeResize()},_render:function(){this._addHeaderWrapper();this._addCloseButton();this._addCollapseButton();this._removeModal();this._makeModal()},_addHeaderWrapper:function(){if(!this._headerContentWrapper){this._header.wrapInner('<div style="float:left;"></div>');this._headerContentWrapper=this._header.children(0);if(this.headerHeight!==null){this._header.height(this.headerHeight)}}},_addCloseButton:function(){if(!this._closeButton){this._closeButtonWrapper=a('<div class="'+this.toThemeProperty("jqx-window-close-button-background")+'"></div>');this._closeButton=a('<div style="width: 100%; height: 100%;" class="'+this.toThemeProperty("jqx-window-close-button")+" "+this.toThemeProperty("jqx-icon-close")+'"></div>');this._closeButtonWrapper.append(this._closeButton);this._header.append(this._closeButtonWrapper)}},_addCollapseButton:function(){if(!this._collapseButton){this._collapseButtonWrapper=a('<div class="'+this.toThemeProperty("jqx-window-collapse-button-background")+'"></div>');this._collapseButton=a('<div style="width: 100%; height: 100%;" class="'+this.toThemeProperty("jqx-window-collapse-button")+" "+this.toThemeProperty("jqx-icon-arrow-up")+'"></div>');this._collapseButtonWrapper.append(this._collapseButton);this._header.append(this._collapseButtonWrapper)}},_removeModal:function(){if(!this.isModal&&typeof this._modalBackground==="object"&&this._modalBackground!==null&&this._modalBackground.length>=1){a("."+this.toThemeProperty("jqx-window-modal")).remove();this._modalBackground=null}},focus:function(){try{this.host.focus();var f=this;setTimeout(function(){f.host.focus()},10)}catch(e){}},_makeModal:function(){if(this.isModal&&(!this._modalBackground||this._modalBackground.length<1)){var g=a.data(document.body,"jqxwindows-list");if(g){this._removeFromArray(this.host,g);a.data(document.body,"jqxwindows-list",g)}this._modalBackground=a("<div></div>");this._modalBackground.addClass(this.toThemeProperty("jqx-window-modal"));this._setModalBackgroundStyles();a(document.body).append(this._modalBackground);this.addHandler(this._modalBackground,this._getEvent("click"),function(){return false});var f=this;var e=function(i,k){var h=a(i).parents().get();for(j=0;j<h.length;j++){if(a(h[j]).is(k)){return true}}return false};this.addHandler(this._modalBackground,"mouseup",function(h){f._stopResizing(f);h.preventDefault()});this.addHandler(this._modalBackground,"mousedown",function(i){var h=f._getTabbables();if(h.length>0){h[0].focus(1);setTimeout(function(){h[0].focus(1)},100)}i.preventDefault();return false});this.addHandler(a(document),"keydown.window"+this.element.id,function(l){if(l.keyCode!==9){return}var h=a.data(document.body,"jqxwindows-modallist");if(h.length>1){if(h[h.length-1][0]!=f.element){return}}var k=f._getTabbables();var m=null;var i=null;if(k.length>0){m=k[0];i=k[k.length-1]}if(l.target==f.element){return}if(m==null){return}if(!e(l.target,f.host)){m.focus(1);return false}if(l.target===i&&!l.shiftKey){m.focus(1);return false}else{if(l.target===m&&l.shiftKey){i.focus(1);return false}}})}},_addStyles:function(){this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-window"));this.host.addClass(this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-window-header"));this._content.addClass(this.toThemeProperty("jqx-window-content"));this._header.addClass(this.toThemeProperty("jqx-widget-header"));this._content.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-disableselect"));this._header.addClass(this.toThemeProperty("jqx-rc-t"));this._content.addClass(this.toThemeProperty("jqx-rc-b"));if(!this.host.attr("tabindex")){this.element.tabIndex=0;this.host.children().css("tab-index",0)}this.host.attr("hideFocus","true").css("outline","none")},_performHeaderLayout:function(){this._handleHeaderButtons();this._header.css("position","relative");if(this.rtl){this._headerContentWrapper.css("direction","rtl");this._headerContentWrapper.css("float","right")}else{this._headerContentWrapper.css("direction","ltr");this._headerContentWrapper.css("float","left")}this._performHeaderCloseButtonLayout();this._performHeaderCollapseButtonLayout();this._centerElement(this._headerContentWrapper,this._header,"y","margin");if(this.headerHeight){this._centerElement(this._closeButtonWrapper,this._header,"y","margin");this._centerElement(this._collapseButtonWrapper,this._header,"y","margin")}},_handleHeaderButtons:function(){if(!this._closeButtonWrapper){return}if(!this.showCloseButton){this._closeButtonWrapper.css("visibility","hidden")}else{this._closeButtonWrapper.css("visibility","visible");this._closeButtonWrapper.width(this.closeButtonSize);this._closeButtonWrapper.height(this.closeButtonSize)}if(!this.showCollapseButton){this._collapseButtonWrapper.css("visibility","hidden")}else{this._collapseButtonWrapper.css("visibility","visible");this._collapseButtonWrapper.width(this.collapseButtonSize);this._collapseButtonWrapper.height(this.collapseButtonSize)}},_performHeaderCloseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._closeButtonWrapper.width(this._closeButton.width());if(!this.rtl){this._closeButtonWrapper.css("margin-right",e);this._closeButtonWrapper.css("margin-left","0px")}else{this._closeButtonWrapper.css("margin-left",e);this._closeButtonWrapper.css("margin-right","0px")}}if(!this.rtl){this._closeButtonWrapper.css({position:"absolute",right:"0px",left:""})}else{this._closeButtonWrapper.css({position:"absolute",left:"0px",right:""})}},_performHeaderCollapseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._collapseButtonWrapper.width(this.collapseButtonSize);this._collapseButtonWrapper.height(this.collapseButtonSize);if(!this.rtl){this._collapseButtonWrapper.css("margin-right",e);this._collapseButtonWrapper.css("margin-left","0px")}else{this._collapseButtonWrapper.css("margin-left",e);this._collapseButtonWrapper.css("margin-right","0px")}}if(!this.rtl){this._collapseButtonWrapper.css({position:"absolute",right:(this.showCloseButton)?this._closeButton.outerWidth(true):0,left:""})}else{this._collapseButtonWrapper.css({position:"absolute",left:(this.showCloseButton)?this._closeButton.outerWidth(true):0,right:""})}this._centerElement(this._collapseButton,this._collapseButton.parent(),"y")},_performWidgetLayout:function(){var e;if(this.width!=="auto"){this.host.css("width",this.width)}if(!this.collapsed){if(this.height!=="auto"){this.host.height(this.height)}else{this.host.height(this.host.height())}this.host.css("min-height",this.minHeight)}this._setChildrenLayout();e=this._validateMinSize();this.host.css({"max-height":this.maxHeight,"min-width":this.minWidth,"max-width":this.maxWidth});if(!e){this._setChildrenLayout()}},_setChildrenLayout:function(){this._header.width(this.host.width()-(this._header.outerWidth(true)-this._header.width()));this._content.width(this.host.width()-(this._content.outerWidth(true)-this._content.width()));this._content.height(this.host.height()-this._header.outerHeight(true)-(this._content.outerHeight(true)-this._content.height()))},_validateMinSize:function(){var f=true;if(this.minHeight<this._header.height()){this.minHeight=this._header.height();f=false}var h=this._header.children(0).outerWidth(true),e=this._header.children(1).outerWidth(true),g=h+e;if(this.minWidth<100){this.minWidth=Math.min(g,100);f=false}return f},_centerElement:function(h,f,e,g){if(typeof f.left==="number"&&typeof f.top==="number"&&typeof f.height==="number"&&typeof f.width==="number"){this._centerElementInArea(h,f,e)}else{this._centerElementInParent(h,f,e,g)}},_centerElementInParent:function(e,m,h,f){h=h.toLowerCase();if(f){f+="-"}else{f=""}if(h.indexOf("y")>=0){var g=e.outerHeight(true),k=m.height(),i=(Math.max(0,k-g))/2;e.css(f+"top",i+"px")}if(h.indexOf("x")>=0){var o=e.outerWidth(true);var n=m.width();var l=(Math.max(0,n-o))/2;e.css(f+"left",l+"px")}},_centerElementInArea:function(f,e,h){h=h.toLowerCase();if(h.indexOf("y")>=0){var g=f.outerHeight(true);var k=e.height;var i=(k-g)/2;f.css("top",i+e.top+"px")}if(h.indexOf("x")>=0){var n=f.outerWidth(true);var m=e.width;var l=(m-n)/2;f.css("left",l+e.left+"px")}},_removeEventHandlers:function(){this.removeHandler(this._header,this._getEvent("mousedown"));this.removeHandler(this._header,this._getEvent("mousemove"));this.removeHandler(this._header,"focus");this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"));this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"));this.removeHandler(this.host,"keydown");this.removeHandler(this._closeButton,this._getEvent("click"));this.removeHandler(this._closeButton,this._getEvent("mouseenter"));this.removeHandler(this._closeButton,this._getEvent("mouseleave"));this.removeHandler(this._collapseButton,this._getEvent("click"));this.removeHandler(this._collapseButton,this._getEvent("mouseenter"));this.removeHandler(this._collapseButton,this._getEvent("mouseleave"));this.removeHandler(this.host,this._getEvent("mousedown"));this.removeHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(this._header,this._getEvent("mouseenter"));this.removeHandler(this._header,this._getEvent("mouseleave"));this.removeHandler(this.host,"resizing",this._windowResizeHandler)},_removeFromArray:function(e,g){var f=this._indexOf(e,g);if(f>=0){return g.splice(this._indexOf(e,g),1)}else{return g}},_sortByStyle:function(e,l){for(var h=0;h<l.length;h++){for(var f=l.length-1;f>h;f--){var m=l[f],k=l[f-1],g;if(parseInt(m.css(e),10)<parseInt(k.css(e),10)){g=m;l[f]=k;l[f-1]=g}}}},_initializeResize:function(){if(this.resizable){var e=this;this.initResize({target:this.host,alsoResize:e._content,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,minHeight:e.minHeight,indicatorSize:10,resizeParent:e.dragArea})}},_removeResize:function(){this.removeResize()},_getEvent:function(e){if(this._isTouchDevice){return this._touchEvents[e]}else{return e}},_addEventHandlers:function(){this._addDragDropHandlers();this._addCloseHandlers();this._addCollapseHandlers();this._addFocusHandlers();this._documentResizeHandlers();this._closeButtonHover();this._collapseButtonHover();this._addDialogButtonsHandlers();this._addHeaderHoverEffect();this._addResizeHandlers();var e=this;this.addHandler(this._header,this._getEvent("mousemove"),function(f){e._addHeaderCursorHandlers(e)})},_addResizeHandlers:function(){var e=this;this.addHandler(this.host,"resizing",this._windowResizeHandler,{self:this})},_windowResizeHandler:function(f){var e=f.data.self;e._header.width(e.host.width()-(e._header.outerWidth(true)-e._header.width()));e.width=f.args.width;e.height=f.args.height},_addHeaderHoverEffect:function(){var e=this;this.addHandler(this._header,this._getEvent("mouseenter"),function(){a(this).addClass(e.toThemeProperty("jqx-window-header-hover"))});this.addHandler(this._header,this._getEvent("mouseleave"),function(){a(this).removeClass(e.toThemeProperty("jqx-window-header-hover"))})},_addDialogButtonsHandlers:function(){if(this.okButton){this.addHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"ok"})}if(this.cancelButton){this.addHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"cancel"})}},_documentResizeHandlers:function(){var e=this;if(this.isModal){this.addHandler(a(window),"resize.window"+this.element.id,function(){if(typeof e._modalBackground==="object"&&e._modalBackground!==null){if(e.isOpen()){e._modalBackground.hide()}if(!e.restricter){e._modalBackground.width(e._getDocumentSize().width);e._modalBackground.height(e._getDocumentSize().height)}else{e._modalBackground.css("left",e.dragArea.left);e._modalBackground.css("top",e.dragArea.top);e._modalBackground.width(e.dragArea.width);e._modalBackground.height(e.dragArea.height)}if(e.isOpen()){e._modalBackground.show()}}})}},_setDialogResultHandler:function(f){var e=f.data.self;e._setDialogResult(f.data.result);e.closeWindow()},_setDialogResult:function(e){this.dialogResult.OK=false;this.dialogResult.None=false;this.dialogResult.Cancel=false;e=e.toLowerCase();switch(e){case"ok":this.dialogResult.OK=true;break;case"cancel":this.dialogResult.Cancel=true;break;default:this.dialogResult.None=true}},_getDocumentSize:function(){var e=a.jqx.browser.msie&&a.jqx.browser.version<9;var f=e?4:0;var g=f;if(document.body.scrollHeight>document.body.clientHeight&&e){f=this._SCROLL_WIDTH}if(document.body.scrollWidth>document.body.clientWidth&&e){g=this._SCROLL_WIDTH}return{width:a(document).width()-f,height:a(document).height()-g}},_closeButtonHover:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("mouseenter"),function(){e._closeButton.addClass(e.toThemeProperty("jqx-window-close-button-hover"))});this.addHandler(this._closeButton,this._getEvent("mouseleave"),function(){e._closeButton.removeClass(e.toThemeProperty("jqx-window-close-button-hover"))})},_collapseButtonHover:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("mouseenter"),function(){e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-hover"))});this.addHandler(this._collapseButton,this._getEvent("mouseleave"),function(){e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-hover"))})},_setModalBackgroundStyles:function(){if(this.isModal){this._modalBackground.fadeTo(0,this.modalOpacity);this._modalBackground.css({position:"absolute",top:"0px",left:"0px",width:this._getDocumentSize().width,height:this._getDocumentSize().height,"z-index":this.modalBackgroundZIndex});if(!this.autoOpen){this._modalBackground.css("display","none")}}},_addFocusHandlers:function(){var e=this;this.addHandler(this.host,this._getEvent("mousedown"),function(){if(!e.isModal){e.bringToFront()}})},_indexOf:function(f,g){for(var e=0;e<g.length;e++){if(g[e][0]===f[0]){return e}}return -1},_addCloseHandlers:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("click"),function(f){return e._closeWindow(f)});if(this.keyboardCloseKey!=="none"){if(typeof this.keyboardCloseKey!=="number"&&this.keyboardCloseKey.toLowerCase()==="esc"){this.keyboardCloseKey=27}}this.addHandler(this.host,"keydown",function(f){if(f.keyCode===e.keyboardCloseKey&&e.keyboardCloseKey!=null&&e.keyboardCloseKey!="none"){e._closeWindow(f)}else{e._handleKeys(f)}},{self:this});this.addHandler(this.host,"keyup",function(f){if(!e.keyboardNavigation){return}if(e._moved){var i=e.host.coord();var h=i.left;var g=i.top;e._raiseEvent(3,h,g,h,g);e._moved=false}})},_handleKeys:function(f){if(!this.keyboardNavigation){return}if(!this._headerFocused){return}if(a(document.activeElement).ischildof(this._content)){return}var e=f.ctrlKey;var n=f.keyCode;var l=this.host.coord();var k=l.left;var m=l.top;var g=this._getDraggingArea();var h=this.host.width();var o=this.host.height();var p=true;var i=10;switch(n){case 37:if(!e){if(this.draggable){if(k-i>=0){this.move(k-i,m)}}}else{if(this.resizable){this.resize(h-i,o)}}p=false;break;case 38:if(!e){if(this.draggable){if(m-i>=0){this.move(k,m-i)}}}else{if(this.resizable){this.resize(h,o-i)}}p=false;break;case 39:if(!e){if(this.draggable){if(k+h+i<=g.width){this.move(k+i,m)}}}else{if(this.resizable){this.resize(h+i,o)}}p=false;break;case 40:if(!e){if(this.draggable){if(m+o+i<=g.height){this.move(k,m+i)}}}else{if(this.resizable){this.resize(h,o+i)}}p=false;break}if(!p){if(f.preventDefault){f.preventDefault()}if(f.stopPropagation){f.stopPropagation()}}return p},_addCollapseHandlers:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("click"),function(){if(!e.collapsed){e.collapse()}else{e.expand()}})},_closeWindow:function(e){this.closeWindow();return false},_addHeaderCursorHandlers:function(e){if(e.resizeArea&&e.resizable&&!e.collapsed){e._header.css("cursor",e._resizeWrapper.css("cursor"));return}else{if(e.draggable){e._header.css("cursor","move");return}}e._header.css("cursor","default");if(e._resizeWrapper&&e._resizeWrapper.length>0){e._resizeWrapper.css("cursor","default")}},_addDragDropHandlers:function(){if(this.draggable){var e=this;this.addHandler(this.host,"focus",function(){e._headerFocused=true});this.addHandler(this.host,"blur",function(){e._headerFocused=false});this.addHandler(this._header,"focus",function(){e._headerFocused=true;return false});this.addHandler(this._header,this._getEvent("mousedown"),function(i){e._headerMouseDownHandler(e,i);return true});this.addHandler(this._header,"dragstart",function(i){if(i.preventDefault){i.preventDefault()}return false});this.addHandler(this._header,this._getEvent("mousemove"),function(i){return e._headerMouseMoveHandler(e,i)});this.addHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),function(i){return e._dragHandler(e,i)});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),function(i){return e._dropHandler(e,i)});try{if(document.referrer!=""||window.frameElement){var h=null;if(window.top!=null&&window.top!=window.self){if(window.parent&&document.referrer){h=document.referrer}}if(h&&h.indexOf(document.location.host)!=-1){var g=function(i){e._dropHandler(e,i)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}catch(f){}}},_headerMouseDownHandler:function(f,g){if(!f.isModal){f.bringToFront()}if(f._resizeDirection==null){var h=a.jqx.mobile.getTouches(g);var i=h[0];var e=a.jqx.position(g);f._mousePosition.x=e.left;f._mousePosition.y=e.top;f._mouseDown=true;f._isDragging=false}},_headerMouseMoveHandler:function(f,i){if(f._mouseDown&&!f._isDragging){var k=a.jqx.mobile.getTouches(i);var l=k[0];var h=l.pageX,g=l.pageY;var e=a.jqx.position(i);h=e.left;g=e.top;if((h+3<f._mousePosition.x||h-3>f._mousePosition.x)||(g+3<f._mousePosition.y||g-3>f._mousePosition.y)){f._isDragging=true;f._mousePosition={x:h,y:g};f._windowPosition={x:f.host.coord().left,y:f.host.coord().top};a(document.body).addClass(f.toThemeProperty("jqx-disableselect"))}if(f._isTouchDevice){i.preventDefault();return true}return false}if(f._isDragging){if(f._isTouchDevice){i.preventDefault();return true}return false}return true},_dropHandler:function(g,k){var f=true;if(g._isDragging&&!g.isResizing&&!g._resizeDirection){var e=parseInt(g.host.css("left"),10),l=parseInt(g.host.css("top"),10),i=(g._isTouchDevice)?0:k.pageX,h=(g._isTouchDevice)?0:k.pageY;g.enableResize=g._enableResizeBackup;g._enableResizeBackup="undefined";g._raiseEvent(3,e,l,i,h);f=false;if(k.preventDefault!="undefined"){k.preventDefault()}if(k.originalEvent!=null){k.originalEvent.mouseHandled=true}if(k.stopPropagation!="undefined"){k.stopPropagation()}}g._isDragging=false;g._mouseDown=false;a(document.body).removeClass(g.toThemeProperty("jqx-disableselect"));return f},_dragHandler:function(p,h){if(p._isDragging&&!p.isResizing&&!p._resizeDirection){var o=(p._isTouchDevice)?h.originalEvent.which:h.which;if(typeof p._enableResizeBackup==="undefined"){p._enableResizeBackup=p.enableResize}p.enableResize=false;if(o===0&&a.jqx.browser.msie&&a.jqx.browser.version<8){return p._dropHandler(p,h)}var m=a.jqx.mobile.getTouches(h);var l=m[0];var n=a.jqx.position(h);var k=n.left,i=n.top,g=k-p._mousePosition.x,f=i-p._mousePosition.y,e=p._windowPosition.x+g,q=p._windowPosition.y+f;p.move(e,q,h);h.preventDefault();return false}return true},_validateCoordinates:function(e,l,i,k){var h=this._getDraggingArea();e=(e<h.left)?h.left:e;l=(l<h.top)?h.top:l;var f=this.host.outerWidth(true);var g=this.host.outerHeight(true);if(e+f>=h.width+h.left-2*k){e=h.width+h.left-f-k}if(l+g>=h.height+h.top-i){l=h.height+h.top-g-i}return{x:e,y:l}},_performLayout:function(){this._performHeaderLayout();this._performWidgetLayout()},_parseDragAreaAttributes:function(){if(this.dragArea!==null){this.dragArea.height=parseInt(this.dragArea.height,10);this.dragArea.width=parseInt(this.dragArea.width,10);this.dragArea.top=parseInt(this.dragArea.top,10);this.dragArea.left=parseInt(this.dragArea.left,10)}},_positionWindow:function(){this._parseDragAreaAttributes();if(this.position instanceof Array&&this.position.length===2&&typeof this.position[0]==="number"&&typeof this.position[1]==="number"){this.host.css({left:this.position[0],top:this.position[1]})}else{if(this.position instanceof Object){if(this.position.left){this.host.offset(this.position)}else{if(this.position.x!==undefined&&this.position.y!=undefined){this.host.css({left:this.position.x,top:this.position.y})}else{if(this.position.center){this._centerElement(this.host,this.position.center,"xy");var g=this.position.center.coord();var f=parseInt(this.host.css("left"));var e=parseInt(this.host.css("top"));this.host.css({left:f+g.left,top:e+g.top})}}}}else{this._positionFromLiteral()}}},_getDraggingArea:function(){var e={};e.left=((this.dragArea&&this.dragArea.left)?this.dragArea.left:0);e.top=((this.dragArea&&this.dragArea.top)?this.dragArea.top:0);e.width=((this.dragArea&&this.dragArea.width)?this.dragArea.width:this._getDocumentSize().width);e.height=((this.dragArea&&this.dragArea.height)?this.dragArea.height:this._getDocumentSize().height);return e},_positionFromLiteral:function(){if(!(this.position instanceof Array)){this.position=this.position.split(",")}var e=this.position.length,f=this._getDraggingArea();while(e){e-=1;this.position[e]=this.position[e].replace(/ /g,"");switch(this.position[e]){case"top":this.host.css("top",f.top);break;case"left":this.host.css("left",f.left);break;case"bottom":this.host.css("top",f.height-this.host.height()+f.top);break;case"right":this.host.css("left",f.left+f.width-this.host.width());break;default:if(!this.dragArea){f=a(window)}this._centerElement(this.host,f,"xy");break}}},_raiseEvent:function(g){var f=this._events[g],h=a.Event(f),e={};if(g===2||g===3){e.x=arguments[1];e.y=arguments[2];e.pageX=arguments[3];e.pageY=arguments[4]}if(f==="closed"||f==="close"){e.dialogResult=this.dialogResult}h.args=e;return this.host.trigger(h)},destroy:function(){this.removeHandler(a(window),"resize.window"+this.element.id);this._removeEventHandlers();this._destroy()},_destroy:function(){if(this.restricter){this.removeHandler(a(window),"resize."+this.element.id);this.removeHandler(a(window),"orientationchanged."+this.element.id);this.removeHandler(a(window),"orientationchange."+this.element.id)}this.host.remove();if(this._modalBackground!==null){this._modalBackground.remove()}},_toClose:function(f,e){return((f&&e[0]===this.element)||(e[0]!==this.element&&typeof e[0]==="object"))},propertyChangedHandler:function(e,f,h,g){this._validateProperties();switch(f){case"rtl":this._performLayout();break;case"dragArea":this._positionWindow();break;case"collapseButtonSize":this._performLayout();break;case"closeButtonSize":this._performLayout();break;case"isModal":this._refresh();this._fixWindowZIndex();break;case"keyboardCloseKey":this._removeEventHandlers();this._addEventHandlers();break;case"disabled":if(g){this.disable()}else{this.disabled=true;this.enable()}break;case"showCloseButton":case"showCollapseButton":this._performLayout();break;case"height":this._performLayout();break;case"width":this._performLayout();break;case"title":this.setTitle(g);this.title=g;break;case"content":this.setContent(g);break;case"draggable":this._removeEventHandlers();this._addEventHandlers();this._removeResize();this._initializeResize();break;case"resizable":this.enableResize=g;if(g){this._initializeResize()}else{this._removeResize()}break;case"position":this._positionWindow();break;case"modalOpacity":this._setModalBackgroundStyles();break;case"okButton":if(g){this._addDialogButtonsHandlers()}else{this.removeHandler(this.okButton)}break;case"cancelButton":if(g){this._addDialogButtonsHandlers()}else{this.removeHandler(this.cancelButton)}break;case"collapsed":if(g){if(!h){this.collapsed=false;this.collapse(0)}}else{if(h){this.collapsed=true;this.expand(0)}}case"theme":a.jqx.utilities.setTheme(h,g,this.host);break;case"enableResize":return;case"maxWidth":case"maxHeight":case"minWidth":case"minHeight":e._performLayout();e._removeResize();e._initializeResize();return;default:return}},collapse:function(g){if(!this.collapsed&&!this.host.is(":animated")){if(this.host.css("display")=="none"){return}var e=this,h=this._header.outerHeight(true),i=parseInt(this._header.css("border-bottom-width"),10),f=parseInt(this._header.css("margin-bottom"),10),g=!isNaN(parseInt(g))?g:this.collapseAnimationDuration;if(!isNaN(i)){h-=2*i}if(!isNaN(f)){h+=f}this._heightBeforeCollapse=this.host.height();this._minHeightBeforeCollapse=this.host.css("min-height");this.host.css("min-height",h);this.host.animate({height:h},g,function(){e.collapsed=true;e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-collapsed"));e._collapseButton.addClass(e.toThemeProperty("jqx-icon-arrow-down"));e._content.css("display","none");e._raiseEvent(5);e._raiseEvent(9);a.jqx.aria(e,"aria-expanded",false)})}},expand:function(f){if(this.collapsed&&!this.host.is(":animated")){var e=this,f=!isNaN(parseInt(f))?f:this.collapseAnimationDuration;this.host.animate({height:this._heightBeforeCollapse},f,function(){e.collapsed=false;e.host.css("min-height",e._minHeightBeforeCollapse);e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-collapsed"));e._collapseButton.removeClass(e.toThemeProperty("jqx-icon-arrow-down"));e._content.css("display","block");e._raiseEvent(6);e._performWidgetLayout();e._raiseEvent(9);a.jqx.aria(e,"aria-expanded",true)})}},closeAll:function(h){var h=true;var g=a.data(document.body,"jqxwindows-list"),f=g.length,e=a.data(document.body,"jqxwindow-modal")||[];while(f){f-=1;if(this._toClose(h,g[f])){g[f].jqxWindow("closeWindow","close");g.splice(f,1)}}if(this._toClose(h,e)){e.jqxWindow("closeWindow","close");a.data(document.body,"jqxwindow-modal",[])}a.data(document.body,"jqxwindows-list",g)},setTitle:function(e){a.jqx.utilities.html(this._headerContentWrapper,e);this.title=e;this._performLayout()},setContent:function(f){this._contentInitialized=false;var e=this._content,g=false;while(!g){e.css("height","auto");e.css("width","auto");if(e.is(".jqx-window")){g=true}else{e=e.parent()}}a.jqx.utilities.html(this._content,f);this._performLayout()},disable:function(){this.disabled=true;this._removeEventHandlers();this._header.addClass(this.toThemeProperty("jqx-window-header-disabled"));this._closeButton.addClass(this.toThemeProperty("jqx-window-close-button-disabled"));this._collapseButton.addClass(this.toThemeProperty("jqx-window-collapse-button-disabled"));this._content.addClass(this.toThemeProperty("jqx-window-content-disabled"));this.host.addClass(this.toThemeProperty("jqx-window-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this._removeResize()},enable:function(){if(this.disabled){this._addEventHandlers();this._header.removeClass(this.toThemeProperty("jqx-window-header-disabled"));this._content.removeClass(this.toThemeProperty("jqx-window-content-disabled"));this._closeButton.removeClass(this.toThemeProperty("jqx-window-close-button-disabled"));this._collapseButton.removeClass(this.toThemeProperty("jqx-window-collapse-button-disabled"));this.host.removeClass(this.toThemeProperty("jqx-window-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.disabled=false;this._initializeResize()}},isOpen:function(){return this._visible},closeWindow:function(f){var e=this;f=(typeof f==="undefined")?this.closeButtonAction:f;this.hide(function(){if(f==="close"){e._destroy()}})},bringToFront:function(){var f=a.data(document.body,"jqxwindows-list");if(this.isModal){f=a.data(document.body,"jqxwindows-modallist");this._fixWindowZIndex("modal-hide");this._fixWindowZIndex("modal-show");return}var l=f[f.length-1],k=parseInt(l.css("z-index"),10),g=this._indexOf(this.host,f);for(var e=f.length-1;e>g;e-=1){var h=parseInt(f[e].css("z-index"),10)-1;f[e].css("z-index",h)}this.host.css("z-index",k);this._sortByStyle("z-index",f)},hide:function(h,g,e){if(this.closing){var f=this.closing();if(f==false){return}}g=g||this.closeAnimationDuration;switch(this.animationType){case"none":this.host.css("display","none");break;case"fade":this.host.fadeOut(g,function(){if(h instanceof Function){h()}});case"slide":this.host.slideUp(g,function(){if(h instanceof Function){h()}});case"combined":this.host.hide(g,function(){if(h instanceof Function){h()}})}this._visible=false;if(this.isModal){this._modalBackground.hide();this._fixWindowZIndex("modal-hide")}if(e!==true){this._raiseEvent(1);this._raiseEvent(8)}},open:function(f,e){this.show(f,e)},close:function(g,f,e){this.hide(g,f,e)},show:function(h,g){this._setDialogResult("none");g=g||this.showAnimationDuration;switch(this.animationType){case"none":this.host.css("display","block");break;case"fade":this.host.fadeIn(g,function(){if(h instanceof Function){h()}});break;case"slide":this.host.slideDown(g,function(){if(h instanceof Function){h()}});break;case"combined":this.host.show(g,function(){if(h instanceof Function){h()}});break}if(this.isModal){this._modalBackground.show();this._fixWindowZIndex("modal-show")}var f=this;if(!this._visible){if(g>150&&this.animationType!="none"){setTimeout(function(){if(!f._contentInitialized){if(f.initContent){f.initContent();f._contentInitialized=true}}f._raiseEvent(7);f._raiseEvent(9)},g-150)}else{if(!f._contentInitialized){if(f.initContent){f.initContent();f._contentInitialized=true}}this._raiseEvent(7);f._raiseEvent(9)}}this._visible=true;this._performLayout();var e=function(){if(!f._isTouchDevice){f._content.focus()}};e();setTimeout(function(){e()},100)},_getTabbables:function(){var f=this._content.find("*");var e=new Array();a.each(f,function(){if(d(this)){e[e.length]=this}});return e},move:function(q,p,e,h){var g=0,f=0,n,k,i,q=parseInt(q,10),p=parseInt(p,10);if(a.jqx.browser.msie){if(a(window).width()>a(document).width()&&!this.dragArea){f=this._SCROLL_WIDTH}if(a(window).height()<a(document).height()&&document.documentElement.clientWidth>document.documentElement.scrollWidth&&!this.dragArea){g=this._SCROLL_WIDTH}}n=this._validateCoordinates(q,p,f,g);if(parseInt(this.host.css("left"),10)!==n.x||parseInt(this.host.css("top"),10)!==n.y){if(e){var m=a.jqx.mobile.getTouches(e);var l=m[0];var o=a.jqx.position(e);k=o.left;i=o.top}if(k==undefined){k=q}if(i==undefined){i=p}if(h!==false){this._raiseEvent(2,n.x,n.y,k,i)}}this.element.style.left=n.x+"px";this.element.style.top=n.y+"px";this._moved=true}});function c(g,e){var k=g.nodeName.toLowerCase();if("area"===k){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(k)?!g.disabled:"a"==k?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.css(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function d(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}}(jqxBaseFramework));(function(b){var a=(function(c){return{resizeConfig:function(){this.resizeTarget=null;this.resizeIndicatorSize=5;this.resizeTargetChildren=null;this.isResizing=false;this.resizeArea=false;this.minWidth=1;this.maxWidth=100;this.minHeight=1;this.maxHeight=100;this.resizeParent=null;this.enableResize=true;this._cursorBackup;this._resizeEvents=["resizing","resized","resize"];this._resizeMouseDown=false;this._resizeCurrentMode=null;this._mouseResizePosition={};this._resizeMethods=null;this._SCROLL_WIDTH=21},_resizeExceptions:{invalidTarget:"Invalid target!",invalidMinHeight:"Invalid minimal height!",invalidMaxHeight:"Invalid maximum height!",invalidMinWidth:"Invalid minimum width!",invalidMaxWidth:"Invalid maximum width!",invalidIndicatorSize:"Invalid indicator size!",invalidSize:"Invalid size!"},removeResize:function(){if(this.resizeTarget){var f=c(this.resizeTarget.children(".jqx-resize"));f.detach();var e=f.children();this._removeResizeEventListeners();for(var d=0;d<e.length;d+=1){c(e[d]).detach();this.resizeTarget.append(e[d])}f.remove()}},initResize:function(d){this.resizeConfig();this.resizeTarget=c(d.target);this.resizeIndicatorSize=d.indicatorSize||10;this.maxWidth=d.maxWidth||100;this.minWidth=d.minWidth||1;this.maxHeight=d.maxHeight||100;this.minHeight=d.minHeight||1;this.resizeParent=d.resizeParent;this._parseResizeParentProperties();this._validateResizeProperties();this._validateResizeTargetDimensions();this._getChildren(this.resizeTarget.maxWidth,this.resizeTarget.minWidth,this.resizeTarget.maxHeight,this.resizeTarget.minHeight,d.alsoResize);this._refreshResize();this._cursorBackup=this.resizeTarget.css("cursor");if(this._cursorBackup==="auto"){this._cursorBackup="default"}},_validateResizeTargetDimensions:function(){this.resizeTarget.maxWidth=this.maxWidth;this.resizeTarget.minWidth=((3*this.resizeIndicatorSize>this.minWidth)?3*this.resizeIndicatorSize:this.minWidth);this.resizeTarget.maxHeight=this.maxHeight;this.resizeTarget.minHeight=((3*this.resizeIndicatorSize>this.minHeight)?3*this.resizeIndicatorSize:this.minHeight)},_parseResizeParentProperties:function(){if(this.resizeParent){this.resizeParent.left=parseInt(this.resizeParent.left,10);this.resizeParent.top=parseInt(this.resizeParent.top,10);this.resizeParent.width=parseInt(this.resizeParent.width,10);this.resizeParent.height=parseInt(this.resizeParent.height,10)}},_getChildren:function(h,e,g,i,d){this.resizeTargetChildren=c(d);this.resizeTargetChildren.toArray();var f=this.resizeTargetChildren.length;while(f){f-=1;this.resizeTargetChildren[f]=c(this.resizeTargetChildren[f])}},_refreshResize:function(){this._renderResize();this._performResizeLayout();this._removeResizeEventListeners();this._addResizeEventHandlers()},_renderResize:function(){this.resizeTarget.wrapInner(c("<div></div>"));this._resizeWrapper=this.resizeTarget.children(0);this._resizeWrapper.addClass("jqx-resize");this._resizeWrapper.addClass("jqx-rc-all");this._resizeWrapper.css("z-index",8000)},_performResizeLayout:function(){this._resizeWrapper.height(this.resizeTarget.height());this._resizeWrapper.width(this.resizeTarget.width())},_removeResizeEventListeners:function(){var d=this.resizeTarget.attr("id");this.removeHandler(this._resizeWrapper,"mousemove.resize"+d);this.removeHandler(this._resizeWrapper,"mousedown.resize"+d);this.removeHandler(c(document),"mousemove.resize"+d);this.removeHandler(c(document),"mouseup.resize"+d)},_addResizeEventHandlers:function(){var g=this.resizeTarget.attr("id");var d=this;this.addHandler(this._resizeWrapper,"mousemove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"mousedown.resize."+g,function(h){d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"mousemove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"mouseup.resize."+g,function(h){d._stopResizing(d,h)});try{if(document.referrer!=""||window.frameElement){var f=function(h){d._stopResizing(d,h)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",f,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",f)}}}}catch(e){}},_stopResizing:function(d,e){if(d.enableResize){if(d.isResizing){d._raiseResizeEvent(1)}d._resizeMouseDown=false;d.isResizing=false;d._resizeDirection=null;if(d.resizeTarget){d.resizeTarget.removeClass("jqx-disableselect")}}if(d._cursorBackup=="undefined"){d._cursorBackup="default"}if(d._resizeWrapper){d._resizeWrapper.css("cursor",d._cursorBackup)}},_resizeHandler:function(d,e){if(d.enableResize&&!d.collapsed){if(d.isResizing&&d._resizeDirection){if(e.which===0&&c.jqx.browser.msie&&c.jqx.browser.version<9){d._stopResizing(e)}d._performResize(e.pageX,e.pageY);return false}else{return d._resizeCaptureCursor(e.pageX,e.pageY)}}},_resizeCaptureCursor:function(e,d){if(this._resizeMouseDown&&!this.isResizing&&this._resizeDirection){if((e+3<this._mouseResizePosition.x||e-3>this._mouseResizePosition.x)||(d+3<this._mouseResizePosition.y||d-3>this._mouseResizePosition.y)){this._changeCursor(e-parseInt(this.resizeTarget.css("left")),d-parseInt(this.resizeTarget.css("top")));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}}},_resizeBackupData:function(){this.resizeTarget.lastWidth=this.resizeTarget.width();this.resizeTarget.lastHeight=this.resizeTarget.height();this.resizeTarget.x=parseInt(this.resizeTarget.css("left"),10);this.resizeTarget.y=parseInt(this.resizeTarget.css("top"),10);this._resizeBackupChildrenSize()},_resizeBackupChildrenSize:function(){var d=this.resizeTargetChildren.length,e;while(d){d-=1;e=this.resizeTargetChildren[d];this.resizeTargetChildren[d].lastWidth=e.width();this.resizeTargetChildren[d].lastHeight=e.height()}},_performResize:function(g,f){var e=g-this._mouseResizePosition.x,d=f-this._mouseResizePosition.y;if(this._resizeDirection){this._resize(this.resizeTarget,e,d)}},_resizeCursorChangeHandler:function(d,e){if(d.enableResize&&!d.collapsed){if(!d.isResizing){d._changeCursor(e.pageX-parseInt(d.resizeTarget.css("left")),e.pageY-parseInt(d.resizeTarget.css("top")))}}},_resizeMouseDownHandler:function(d,e){if(d.enableResize){if(d._resizeDirection!==null){d._resizeMouseDown=true;d._mouseResizePosition.x=e.pageX;d._mouseResizePosition.y=e.pageY;e.preventDefault()}}},_validateResizeProperties:function(){try{if(!this.resizeTarget||this.resizeTarget.length!==1){throw new Error(this._resizeExceptions.invalidTarget)}if(this.minHeight<0||isNaN(parseInt(this.minHeight))){throw new Error(this._resizeExceptions.invalidMinHeight)}if(this.maxHeight<=0||isNaN(parseInt(this.maxHeight))){throw new Error(this._resizeExceptions.invalidMaxHeight)}if(this.minWidth<0||isNaN(parseInt(this.minWidth))){throw new Error(this._resizeExceptions.invalidMinWidth)}if(this.maxWidth<0||isNaN(parseInt(this.maxWidth))){throw new Error(this._resizeExceptions.invalidMaxWidth)}if(this.resizeIndicatorSize<0||isNaN(parseInt(this.resizeIndicatorSize))){throw new Error(this._resizeExceptions.invalidIndicatorSize)}if(this.minHeight>this.maxHeight||this.minWidth>this.maxWidth){throw new Error(this._resizeExceptions.invalidSize)}}catch(d){alert(d)}},_changeCursor:function(d,e){if(this.isResizing||this._resizeMouseDown){return}this.resizeArea=true;if(d<=this.resizeIndicatorSize&&d>=0&&e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.css("cursor","nw-resize");this._resizeDirection="topleft"}else{if(e<=this.resizeIndicatorSize&&e>0&&d>=this.resizeTarget.width()-this.resizeIndicatorSize){this._resizeWrapper.css("cursor","ne-resize");this._resizeDirection="topright"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()&&d<=this.resizeIndicatorSize&&d>=0){this._resizeWrapper.css("cursor","sw-resize");this._resizeDirection="bottomleft"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()&&d>=this.resizeTarget.width()-this.resizeIndicatorSize&&d<this.resizeTarget.width()){this._resizeWrapper.css("cursor","se-resize");this._resizeDirection="bottomright"}else{if(d<=this.resizeIndicatorSize&&d>=0){this._resizeWrapper.css("cursor","e-resize");this._resizeDirection="left"}else{if(e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.css("cursor","n-resize");this._resizeDirection="top"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e<this.resizeTarget.height()){this._resizeWrapper.css("cursor","n-resize");this._resizeDirection="bottom"}else{if(d>=this.resizeTarget.width()-this.resizeIndicatorSize&&d<this.resizeTarget.width()){this._resizeWrapper.css("cursor","e-resize");this._resizeDirection="right"}else{this._resizeWrapper.css("cursor",this._cursorBackup);this._resizeDirection=null;this.resizeArea=false}}}}}}}}},_prepareResizeMethods:function(d){this._resizeMethods=[];if(d.indexOf("left")>=0){this._resizeMethods.push(this._resizeLeft)}if(d.indexOf("top")>=0){this._resizeMethods.push(this._resizeTop)}if(d.indexOf("right")>=0){this._resizeMethods.push(this._resizeRight)}if(d.indexOf("bottom")>=0){this._resizeMethods.push(this._resizeBottom)}},_validateResize:function(g,d,h,f,e){if(h==="horizontal"||h==="both"){return this._validateWidth(g,f,e)}else{if(h==="vertical"||h==="both"){return this._validateHeight(d,f,e)}}return{result:false,fix:0}},_getParent:function(){if(this.resizeParent!==null&&this.resizeParent!=="undefined"&&this.resizeParent.height&&this.resizeParent.width&&this.resizeParent.top&&this.resizeParent.left){return this.resizeParent}return{left:0,top:0,width:c(document).width(),height:c(document).height()}},_validateHeight:function(f,k,i){var l=0,e=2,d=false,h=f,g=this._getParent();if(c(window).width()>c(document).width()&&c.jqx.browser.msie&&g.height===c(document).height()){l=this._SCROLL_WIDTH}if(i==="bottom"&&(f+k.position().top+l+e>g.height+g.top)){return{fix:g.height-k.position().top-l-e+g.top,result:false}}if(i==="top"&&k.lastHeight-f+k.y<g.top){return{fix:f+(k.lastHeight-f+k.y)-g.top,result:false}}if(f<k.minHeight){return{fix:k.minHeight,result:false}}if(f>k.maxHeight){return{fix:k.maxHeight,result:false}}return{result:true,fix:f}},_validateWidth:function(k,i,h){var l=0,e=2,d=false,g=k,f=this._getParent();if(c(window).height()<c(document).height()&&c.jqx.browser.msie&&document.documentElement.clientWidth>=document.documentElement.scrollWidth&&f.width===c(document).width()){l=this._SCROLL_WIDTH}if(h==="right"&&(k+i.position().left+l+e>f.width+f.left)){return{fix:f.width-i.position().left-l-e+f.left,result:false}}if(h==="left"&&(i.lastWidth-k+i.x<f.left)){return{fix:k+(i.lastWidth-k+i.x)-f.left,result:false}}if(k<i.minWidth){return{fix:i.minWidth,result:false}}if(k>i.maxWidth){return{fix:i.maxWidth,result:false}}return{result:true,fix:k}},_resize:function(h,e,d){var l=this._resizeDirection;var k=this._resizeMethods.length;for(var g=0;g<k;g++){if(this._resizeMethods[g] instanceof Function){var f={element:h,x:e,y:d,self:this};this._resizeMethods[g](f)}}this._performResizeLayout()},resize:function(g,d){if(this.resizable){var f=g-this.host.width();var e=d-this.host.height();var h="right";if(e!=0){h="bottom"}this._resizeDirection=h;this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this._resize(this.resizeTarget,f,e);this.isResizing=false}},_setResizeChildrenSize:function(e,f){var h=this.resizeTargetChildren.length;while(h){h--;if(f==="width"){var g=this.resizeTargetChildren[h].lastWidth-(this.resizeTarget.lastWidth-e);if(g<this.resizeTarget.maxWidth&&g>0){this.resizeTargetChildren[h].width(g)}}else{var d=this.resizeTargetChildren[h].lastHeight-(this.resizeTarget.lastHeight-e);if(d<this.resizeTarget.maxHeight&&d>0){this.resizeTargetChildren[h].height(d)}}}},_resizeRight:function(e){var f=e.element.lastWidth+e.x,d=e.self._validateResize(f,0,"horizontal",e.element,"right");if(!d.result){f=d.fix}if(e.element.width()!==f){e.self._setResizeChildrenSize(f,"width");e.element.width(f);e.self._raiseResizeEvent(0)}return f},_resizeLeft:function(f){var g=f.element.lastWidth-f.x,e=f.self._validateResize(g,0,"horizontal",f.element,"left"),d=f.element.x+f.x;if(!e.result){d=f.element.x+(f.element.lastWidth-e.fix);g=e.fix;return}if(f.element.width()!==g){f.self._setResizeChildrenSize(g,"width");f.element.width(g);f.element.css("left",d);f.self._raiseResizeEvent(0)}return g},_resizeBottom:function(f){var e=f.element.lastHeight+f.y,d=f.self._validateResize(0,e,"vertical",f.element,"bottom");if(!d.result){e=d.fix}if(f.element.height()!==e){f.self._setResizeChildrenSize(e,"height");f.element.height(e);f.self._raiseResizeEvent(0)}return e},_resizeTop:function(f){var e=f.element.lastHeight-f.y,d=f.self._validateResize(0,e,"vertical",f.element,"top"),g=f.element.y+f.y;if(!d.result){g=f.element.y+(f.element.lastHeight-d.fix);e=d.fix;return}if(f.element.height()!==e){f.self._setResizeChildrenSize(e,"height");f.element.height(e);f.element.css("top",g);f.self._raiseResizeEvent(0)}return e},_raiseResizeEvent:function(f){var e=this._resizeEvents[f],g=c.Event(e),d={};d.width=parseInt(this.resizeTarget[0].style.width);d.height=parseInt(this.resizeTarget[0].style.height);g.args=d;if(f==0){var e=this._resizeEvents[2],h=c.Event(e);h.args=d;this.resizeTarget.trigger(h)}return this.resizeTarget.trigger(g)}}}(jqxBaseFramework));b.extend(b.jqx._jqxWindow.prototype,a)}(jqxBaseFramework)); |
{ | ||
"name": "jqwidgets-framework", | ||
"version": "3.8.0", | ||
"version": "3.8.1", | ||
"description": "jQWidgets is an advanced jQuery and HTML5 UI framework.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6509181
410
14169