incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1356336 [9/34] - in /incubator/ambari/trunk: ./ mon_dashboard/src/addOns/nagios/plugins/ mon_dashboard/src/ui/libs/ mon_dashboard/src/ui/libs/html5shiv/ mon_dashboard/src/ui/libs/jqgrid/css/ mon_dashboard/src/ui/libs/jqgrid/js/ mon_dashboa...
Date Mon, 02 Jul 2012 16:46:24 GMT
Modified: incubator/ambari/trunk/mon_dashboard/src/ui/libs/jqgrid/js/jquery.jqGrid.min.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/mon_dashboard/src/ui/libs/jqgrid/js/jquery.jqGrid.min.js?rev=1356336&r1=1356335&r2=1356336&view=diff
==============================================================================
--- incubator/ambari/trunk/mon_dashboard/src/ui/libs/jqgrid/js/jquery.jqGrid.min.js (original)
+++ incubator/ambari/trunk/mon_dashboard/src/ui/libs/jqgrid/js/jquery.jqGrid.min.js Mon Jul  2 16:45:55 2012
@@ -1,3 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
 /* 
 * jqGrid  4.3.1 - jQuery Grid 
 * Copyright (c) 2008, Tony Tomov, tony@trirand.com 
@@ -7,504 +28,504 @@
 * Date:2011-12-20 
 * Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; grid.filter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.tbltogrid.js; grid.jqueryui.js; 
 */
-/*
- jqGrid  4.3.1  - jQuery Grid
- Copyright (c) 2008, Tony Tomov, tony@trirand.com
- Dual licensed under the MIT and GPL licenses
- http://www.opensource.org/licenses/mit-license.php
- http://www.gnu.org/licenses/gpl-2.0.html
- Date: 2011-12-20
-*/
-(function(b){b.jgrid=b.jgrid||{};b.extend(b.jgrid,{htmlDecode:function(d){if(d&&(d=="&nbsp;"||d=="&#160;"||d.length===1&&d.charCodeAt(0)===160))return"";return!d?d:String(d).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},htmlEncode:function(d){return!d?d:String(d).replace(/&/g,"&amp;").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},format:function(d){var i=b.makeArray(arguments).slice(1);if(d===undefined)d="";return d.replace(/\{(\d+)\}/g,
-function(g,c){return i[c]})},getCellIndex:function(d){d=b(d);if(d.is("tr"))return-1;d=(!d.is("td")&&!d.is("th")?d.closest("td,th"):d)[0];if(b.browser.msie)return b.inArray(d,d.parentNode.cells);return d.cellIndex},stripHtml:function(d){d+="";var i=/<("[^"]*"|'[^']*'|[^'">])*>/gi;if(d)return(d=d.replace(i,""))&&d!=="&nbsp;"&&d!=="&#160;"?d.replace(/\"/g,"'"):"";else return d},realType:function(d){return Object.prototype.toString.call(d).slice(8,-1)},stripPref:function(d,i){var g=this.realType(d);if(g==
-"String"||g=="Number"){d=String(d);i=d!==""?String(i).replace(String(d),""):i}return i},stringToDoc:function(d){var i;if(typeof d!=="string")return d;try{i=(new DOMParser).parseFromString(d,"text/xml")}catch(g){i=new ActiveXObject("Microsoft.XMLDOM");i.async=false;i.loadXML(d)}return i&&i.documentElement&&i.documentElement.tagName!="parsererror"?i:null},parse:function(d){if(d.substr(0,9)=="while(1);")d=d.substr(9);if(d.substr(0,2)=="/*")d=d.substr(2,d.length-4);d||(d="{}");return b.jgrid.useJSON===
-true&&typeof JSON==="object"&&typeof JSON.parse==="function"?JSON.parse(d):eval("("+d+")")},parseDate:function(d,i){var g={m:1,d:1,y:1970,h:0,i:0,s:0,u:0},c,h,k;c=/[\\\/:_;.,\t\T\s-]/;if(i&&i!==null&&i!==undefined){i=b.trim(i);i=i.split(c);d=d.split(c);var l=b.jgrid.formatter.date.monthNames,a=b.jgrid.formatter.date.AmPm,q=function(x,y){if(x===0){if(y===12)y=0}else if(y!==12)y+=12;return y};c=0;for(h=d.length;c<h;c++){if(d[c]=="M"){k=b.inArray(i[c],l);if(k!==-1&&k<12)i[c]=k+1}if(d[c]=="F"){k=b.inArray(i[c],
-l);if(k!==-1&&k>11)i[c]=k+1-12}if(d[c]=="a"){k=b.inArray(i[c],a);if(k!==-1&&k<2&&i[c]==a[k]){i[c]=k;g.h=q(i[c],g.h)}}if(d[c]=="A"){k=b.inArray(i[c],a);if(k!==-1&&k>1&&i[c]==a[k]){i[c]=k-2;g.h=q(i[c],g.h)}}if(i[c]!==undefined)g[d[c].toLowerCase()]=parseInt(i[c],10)}g.m=parseInt(g.m,10)-1;c=g.y;if(c>=70&&c<=99)g.y=1900+g.y;else if(c>=0&&c<=69)g.y=2E3+g.y}return new Date(g.y,g.m,g.d,g.h,g.i,g.s,g.u)},jqID:function(d){return String(d).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},guid:1,uidPref:"jqg",
-randId:function(d){return(d?d:b.jgrid.uidPref)+b.jgrid.guid++},getAccessor:function(d,i){var g,c,h=[],k;if(typeof i==="function")return i(d);g=d[i];if(g===undefined)try{if(typeof i==="string")h=i.split(".");if(k=h.length)for(g=d;g&&k--;){c=h.shift();g=g[c]}}catch(l){}return g},getXmlData:function(d,i,g){var c=typeof i==="string"?i.match(/^(.*)\[(\w+)\]$/):null;if(typeof i==="function")return i(d);if(c&&c[2])return c[1]?b(c[1],d).attr(c[2]):b(d).attr(c[2]);else{d=b(i,d);if(g)return d;return d.length>
-0?b(d).text():undefined}},ajaxOptions:{},from:function(d){return new function(i,g){if(typeof i=="string")i=b.data(i);var c=this,h=i,k=true,l=false,a=g,q=/[\$,%]/g,x=null,y=null,E=0,I=false,M="",N=[],V=true;if(typeof i=="object"&&i.push){if(i.length>0)V=typeof i[0]!="object"?false:true}else throw"data provides is not an array";this._hasData=function(){return h===null?false:h.length===0?false:true};this._getStr=function(o){var n=[];l&&n.push("jQuery.trim(");n.push("String("+o+")");l&&n.push(")");k||
-n.push(".toLowerCase()");return n.join("")};this._strComp=function(o){return typeof o=="string"?".toString()":""};this._group=function(o,n){return{field:o.toString(),unique:n,items:[]}};this._toStr=function(o){if(l)o=b.trim(o);k||(o=o.toLowerCase());return o=o.toString().replace(/\\/g,"\\\\").replace(/\"/g,'\\"')};this._funcLoop=function(o){var n=[];b.each(h,function(t,F){n.push(o(F))});return n};this._append=function(o){var n;if(a===null)a="";else a+=M===""?" && ":M;for(n=0;n<E;n++)a+="(";if(I)a+=
-"!";a+="("+o+")";I=false;M="";E=0};this._setCommand=function(o,n){x=o;y=n};this._resetNegate=function(){I=false};this._repeatCommand=function(o,n){if(x===null)return c;if(o!==null&&n!==null)return x(o,n);if(y===null)return x(o);if(!V)return x(o);return x(y,o)};this._equals=function(o,n){return c._compare(o,n,1)===0};this._compare=function(o,n,t){if(t===undefined)t=1;if(o===undefined)o=null;if(n===undefined)n=null;if(o===null&&n===null)return 0;if(o===null&&n!==null)return 1;if(o!==null&&n===null)return-1;
-if(!k&&typeof o!=="number"&&typeof n!=="number"){o=String(o).toLowerCase();n=String(n).toLowerCase()}if(o<n)return-t;if(o>n)return t;return 0};this._performSort=function(){if(N.length!==0)h=c._doSort(h,0)};this._doSort=function(o,n){var t=N[n].by,F=N[n].dir,T=N[n].type,J=N[n].datefmt;if(n==N.length-1)return c._getOrder(o,t,F,T,J);n++;t=c._getGroup(o,t,F,T,J);F=[];for(T=0;T<t.length;T++){J=c._doSort(t[T].items,n);for(var D=0;D<J.length;D++)F.push(J[D])}return F};this._getOrder=function(o,n,t,F,T){var J=
-[],D=[],ca=t=="a"?1:-1,X,fa;if(F===undefined)F="text";fa=F=="float"||F=="number"||F=="currency"||F=="numeric"?function(R){R=parseFloat(String(R).replace(q,""));return isNaN(R)?0:R}:F=="int"||F=="integer"?function(R){return R?parseFloat(String(R).replace(q,"")):0}:F=="date"||F=="datetime"?function(R){return b.jgrid.parseDate(T,R).getTime()}:b.isFunction(F)?F:function(R){R||(R="");return b.trim(String(R).toUpperCase())};b.each(o,function(R,aa){X=n!==""?b.jgrid.getAccessor(aa,n):aa;if(X===undefined)X=
-"";X=fa(X,aa);D.push({vSort:X,index:R})});D.sort(function(R,aa){R=R.vSort;aa=aa.vSort;return c._compare(R,aa,ca)});F=0;for(var pa=o.length;F<pa;){t=D[F].index;J.push(o[t]);F++}return J};this._getGroup=function(o,n,t,F,T){var J=[],D=null,ca=null,X;b.each(c._getOrder(o,n,t,F,T),function(fa,pa){X=b.jgrid.getAccessor(pa,n);if(X===undefined)X="";if(!c._equals(ca,X)){ca=X;D!==null&&J.push(D);D=c._group(n,X)}D.items.push(pa)});D!==null&&J.push(D);return J};this.ignoreCase=function(){k=false;return c};this.useCase=
-function(){k=true;return c};this.trim=function(){l=true;return c};this.noTrim=function(){l=false;return c};this.execute=function(){var o=a,n=[];if(o===null)return c;b.each(h,function(){eval(o)&&n.push(this)});h=n;return c};this.data=function(){return h};this.select=function(o){c._performSort();if(!c._hasData())return[];c.execute();if(b.isFunction(o)){var n=[];b.each(h,function(t,F){n.push(o(F))});return n}return h};this.hasMatch=function(){if(!c._hasData())return false;c.execute();return h.length>
-0};this.andNot=function(o,n,t){I=!I;return c.and(o,n,t)};this.orNot=function(o,n,t){I=!I;return c.or(o,n,t)};this.not=function(o,n,t){return c.andNot(o,n,t)};this.and=function(o,n,t){M=" && ";if(o===undefined)return c;return c._repeatCommand(o,n,t)};this.or=function(o,n,t){M=" || ";if(o===undefined)return c;return c._repeatCommand(o,n,t)};this.orBegin=function(){E++;return c};this.orEnd=function(){if(a!==null)a+=")";return c};this.isNot=function(o){I=!I;return c.is(o)};this.is=function(o){c._append("this."+
-o);c._resetNegate();return c};this._compareValues=function(o,n,t,F,T){var J;J=V?"jQuery.jgrid.getAccessor(this,'"+n+"')":"this";if(t===undefined)t=null;var D=t,ca=T.stype===undefined?"text":T.stype;if(t!==null)switch(ca){case "int":case "integer":D=isNaN(Number(D))||D===""?"0":D;J="parseInt("+J+",10)";D="parseInt("+D+",10)";break;case "float":case "number":case "numeric":D=String(D).replace(q,"");D=isNaN(Number(D))||D===""?"0":D;J="parseFloat("+J+")";D="parseFloat("+D+")";break;case "date":case "datetime":D=
-String(b.jgrid.parseDate(T.newfmt||"Y-m-d",D).getTime());J='jQuery.jgrid.parseDate("'+T.srcfmt+'",'+J+").getTime()";break;default:J=c._getStr(J);D=c._getStr('"'+c._toStr(D)+'"')}c._append(J+" "+F+" "+D);c._setCommand(o,n);c._resetNegate();return c};this.equals=function(o,n,t){return c._compareValues(c.equals,o,n,"==",t)};this.notEquals=function(o,n,t){return c._compareValues(c.equals,o,n,"!==",t)};this.isNull=function(o,n,t){return c._compareValues(c.equals,o,null,"===",t)};this.greater=function(o,
-n,t){return c._compareValues(c.greater,o,n,">",t)};this.less=function(o,n,t){return c._compareValues(c.less,o,n,"<",t)};this.greaterOrEquals=function(o,n,t){return c._compareValues(c.greaterOrEquals,o,n,">=",t)};this.lessOrEquals=function(o,n,t){return c._compareValues(c.lessOrEquals,o,n,"<=",t)};this.startsWith=function(o,n){var t=n===undefined||n===null?o:n;t=l?b.trim(t.toString()).length:t.toString().length;if(V)c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+o+"')")+".substr(0,"+t+") == "+
-c._getStr('"'+c._toStr(n)+'"'));else{t=l?b.trim(n.toString()).length:n.toString().length;c._append(c._getStr("this")+".substr(0,"+t+") == "+c._getStr('"'+c._toStr(o)+'"'))}c._setCommand(c.startsWith,o);c._resetNegate();return c};this.endsWith=function(o,n){var t=n===undefined||n===null?o:n;t=l?b.trim(t.toString()).length:t.toString().length;V?c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+o+"')")+".substr("+c._getStr("jQuery.jgrid.getAccessor(this,'"+o+"')")+".length-"+t+","+t+') == "'+c._toStr(n)+
-'"'):c._append(c._getStr("this")+".substr("+c._getStr("this")+'.length-"'+c._toStr(o)+'".length,"'+c._toStr(o)+'".length) == "'+c._toStr(o)+'"');c._setCommand(c.endsWith,o);c._resetNegate();return c};this.contains=function(o,n){V?c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+o+"')")+'.indexOf("'+c._toStr(n)+'",0) > -1'):c._append(c._getStr("this")+'.indexOf("'+c._toStr(o)+'",0) > -1');c._setCommand(c.contains,o);c._resetNegate();return c};this.groupBy=function(o,n,t,F){if(!c._hasData())return null;
-return c._getGroup(h,o,n,t,F)};this.orderBy=function(o,n,t,F){n=n===undefined||n===null?"a":b.trim(n.toString().toLowerCase());if(t===null||t===undefined)t="text";if(F===null||F===undefined)F="Y-m-d";if(n=="desc"||n=="descending")n="d";if(n=="asc"||n=="ascending")n="a";N.push({by:o,dir:n,type:t,datefmt:F});return c};return c}(d,null)},extend:function(d){b.extend(b.fn.jqGrid,d);this.no_legacy_api||b.fn.extend(d)}});b.fn.jqGrid=function(d){if(typeof d=="string"){var i=b.jgrid.getAccessor(b.fn.jqGrid,
-d);if(!i)throw"jqGrid - No such method: "+d;var g=b.makeArray(arguments).slice(1);return i.apply(this,g)}return this.each(function(){if(!this.grid){var c=b.extend(true,{url:"",height:150,page:1,rowNum:20,rowTotal:null,records:0,pager:"",pgbuttons:true,pginput:true,colModel:[],rowList:[],colNames:[],sortorder:"asc",sortname:"",datatype:"xml",mtype:"GET",altRows:false,selarrrow:[],savedRow:[],shrinkToFit:true,xmlReader:{},jsonReader:{},subGrid:false,subGridModel:[],reccount:0,lastpage:0,lastsort:0,
-selrow:null,beforeSelectRow:null,onSelectRow:null,onSortCol:null,ondblClickRow:null,onRightClickRow:null,onPaging:null,onSelectAll:null,loadComplete:null,gridComplete:null,loadError:null,loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,beforeProcessing:null,onHeaderClick:null,viewrecords:false,loadonce:false,multiselect:false,multikey:false,editurl:null,search:false,caption:"",hidegrid:true,hiddengrid:false,postData:{},userData:{},treeGrid:false,treeGridModel:"nested",treeReader:{},treeANode:-1,
-ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord",search:"_search",nd:"nd",id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del",subgridid:"id",npage:null,totalrows:"totalrows"},forceFit:false,gridstate:"visible",cellEdit:false,cellsubmit:"remote",nv:0,loadui:"enable",toolbar:[false,""],scroll:false,multiboxonly:false,deselectAfterSort:true,scrollrows:false,autowidth:false,scrollOffset:18,cellLayout:5,subGridWidth:20,multiselectWidth:20,gridview:false,
-rownumWidth:25,rownumbers:false,pagerpos:"center",recordpos:"right",footerrow:false,userDataOnFooter:false,hoverrows:true,altclass:"ui-priority-secondary",viewsortcols:[false,"vertical",true],resizeclass:"",autoencode:false,remapColumns:[],ajaxGridOptions:{},direction:"ltr",toppager:false,headertitles:false,scrollTimeout:40,data:[],_index:{},grouping:false,groupingView:{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:false,sortitems:[],sortnames:[],groupDataSorted:false,
-summary:[],summaryval:[],plusicon:"ui-icon-circlesmall-plus",minusicon:"ui-icon-circlesmall-minus"},ignoreCase:false,cmTemplate:{},idPrefix:""},b.jgrid.defaults,d||{}),h={headers:[],cols:[],footers:[],dragStart:function(e,f,j){this.resizing={idx:e,startX:f.clientX,sOL:j[0]};this.hDiv.style.cursor="col-resize";this.curGbox=b("#rs_m"+b.jgrid.jqID(c.id),"#gbox_"+b.jgrid.jqID(c.id));this.curGbox.css({display:"block",left:j[0],top:j[1],height:j[2]});b.isFunction(c.resizeStart)&&c.resizeStart.call(this,
-f,e);document.onselectstart=function(){return false}},dragMove:function(e){if(this.resizing){var f=e.clientX-this.resizing.startX;e=this.headers[this.resizing.idx];var j=c.direction==="ltr"?e.width+f:e.width-f,m;if(j>33){this.curGbox.css({left:this.resizing.sOL+f});if(c.forceFit===true){m=this.headers[this.resizing.idx+c.nv];f=c.direction==="ltr"?m.width-f:m.width+f;if(f>33){e.newWidth=j;m.newWidth=f}}else{this.newWidth=c.direction==="ltr"?c.tblwidth+f:c.tblwidth-f;e.newWidth=j}}}},dragEnd:function(){this.hDiv.style.cursor=
-"default";if(this.resizing){var e=this.resizing.idx,f=this.headers[e].newWidth||this.headers[e].width;f=parseInt(f,10);this.resizing=false;b("#rs_m"+b.jgrid.jqID(c.id)).css("display","none");c.colModel[e].width=f;this.headers[e].width=f;this.headers[e].el.style.width=f+"px";this.cols[e].style.width=f+"px";if(this.footers.length>0)this.footers[e].style.width=f+"px";if(c.forceFit===true){f=this.headers[e+c.nv].newWidth||this.headers[e+c.nv].width;this.headers[e+c.nv].width=f;this.headers[e+c.nv].el.style.width=
-f+"px";this.cols[e+c.nv].style.width=f+"px";if(this.footers.length>0)this.footers[e+c.nv].style.width=f+"px";c.colModel[e+c.nv].width=f}else{c.tblwidth=this.newWidth||c.tblwidth;b("table:first",this.bDiv).css("width",c.tblwidth+"px");b("table:first",this.hDiv).css("width",c.tblwidth+"px");this.hDiv.scrollLeft=this.bDiv.scrollLeft;if(c.footerrow){b("table:first",this.sDiv).css("width",c.tblwidth+"px");this.sDiv.scrollLeft=this.bDiv.scrollLeft}}b.isFunction(c.resizeStop)&&c.resizeStop.call(this,f,e)}this.curGbox=
-null;document.onselectstart=function(){return true}},populateVisible:function(){h.timer&&clearTimeout(h.timer);h.timer=null;var e=b(h.bDiv).height();if(e){var f=b("table:first",h.bDiv),j,m;if(f[0].rows.length)try{m=(j=f[0].rows[1])?b(j).outerHeight()||h.prevRowHeight:h.prevRowHeight}catch(p){m=h.prevRowHeight}if(m){h.prevRowHeight=m;var C=c.rowNum;j=h.scrollTop=h.bDiv.scrollTop;var s=Math.round(f.position().top)-j,A=s+f.height();m*=C;var z,u,w;if(A<e&&s<=0&&(c.lastpage===undefined||parseInt((A+j+
-m-1)/m,10)<=c.lastpage)){u=parseInt((e-A+m-1)/m,10);if(A>=0||u<2||c.scroll===true){z=Math.round((A+j)/m)+1;s=-1}else s=1}if(s>0){z=parseInt(j/m,10)+1;u=parseInt((j+e)/m,10)+2-z;w=true}if(u)if(!(c.lastpage&&z>c.lastpage||c.lastpage==1||z===c.page&&z===c.lastpage))if(h.hDiv.loading)h.timer=setTimeout(h.populateVisible,c.scrollTimeout);else{c.page=z;if(w){h.selectionPreserver(f[0]);h.emptyRows(h.bDiv,false,false)}h.populate(u)}}}},scrollGrid:function(e){if(c.scroll){var f=h.bDiv.scrollTop;if(h.scrollTop===
-undefined)h.scrollTop=0;if(f!=h.scrollTop){h.scrollTop=f;h.timer&&clearTimeout(h.timer);h.timer=setTimeout(h.populateVisible,c.scrollTimeout)}}h.hDiv.scrollLeft=h.bDiv.scrollLeft;if(c.footerrow)h.sDiv.scrollLeft=h.bDiv.scrollLeft;e&&e.stopPropagation()},selectionPreserver:function(e){var f=e.p,j=f.selrow,m=f.selarrrow?b.makeArray(f.selarrrow):null,p=e.grid.bDiv.scrollLeft,C=f.gridComplete;f.gridComplete=function(){f.selrow=null;f.selarrrow=[];if(f.multiselect&&m&&m.length>0)for(var s=0;s<m.length;s++)m[s]!=
-j&&b(e).jqGrid("setSelection",m[s],false);j&&b(e).jqGrid("setSelection",j,false);e.grid.bDiv.scrollLeft=p;f.gridComplete=C;f.gridComplete&&C()}}};if(this.tagName.toUpperCase()!="TABLE")alert("Element is not a table");else{b(this).empty().attr("tabindex","1");this.p=c;this.p.useProp=!!b.fn.prop;var k,l,a;if(this.p.colNames.length===0)for(k=0;k<this.p.colModel.length;k++)this.p.colNames[k]=this.p.colModel[k].label||this.p.colModel[k].name;if(this.p.colNames.length!==this.p.colModel.length)alert(b.jgrid.errors.model);
-else{var q=b("<div class='ui-jqgrid-view'></div>"),x,y=b.browser.msie?true:false,E=b.browser.webkit||b.browser.safari?true:false;a=this;a.p.direction=b.trim(a.p.direction.toLowerCase());if(b.inArray(a.p.direction,["ltr","rtl"])==-1)a.p.direction="ltr";l=a.p.direction;b(q).insertBefore(this);b(this).appendTo(q).removeClass("scroll");var I=b("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>");b(I).insertBefore(q).attr({id:"gbox_"+this.id,dir:l});b(q).appendTo(I).attr("id","gview_"+
-this.id);x=y&&b.browser.version<=6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':"";b("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+this.id+"'></div>").append(x).insertBefore(q);b("<div class='loading ui-state-default ui-state-active' id='load_"+this.id+"'>"+this.p.loadtext+"</div>").insertBefore(q);b(this).attr({cellspacing:"0",cellpadding:"0",border:"0",role:"grid","aria-multiselectable":!!this.p.multiselect,
-"aria-labelledby":"gbox_"+this.id});var M=function(e,f){e=parseInt(e,10);return isNaN(e)?f?f:0:e},N=function(e,f,j,m,p,C){var s=a.p.colModel[e],A=s.align,z='style="',u=s.classes,w=s.name,r=[];if(A)z+="text-align:"+A+";";if(s.hidden===true)z+="display:none;";if(f===0)z+="width: "+h.headers[e].width+"px;";else if(s.cellattr&&b.isFunction(s.cellattr))if((e=s.cellattr.call(a,p,j,m,s,C))&&typeof e==="string"){e=e.replace(/style/i,"style").replace(/title/i,"title");if(e.indexOf("title")>-1)s.title=false;
-if(e.indexOf("class")>-1)u=undefined;r=e.split("style");if(r.length===2){r[1]=b.trim(r[1].replace("=",""));if(r[1].indexOf("'")===0||r[1].indexOf('"')===0)r[1]=r[1].substring(1);z+=r[1].replace(/'/gi,'"')}else z+='"'}if(!r.length){r[0]="";z+='"'}z+=(u!==undefined?' class="'+u+'"':"")+(s.title&&j?' title="'+b.jgrid.stripHtml(j)+'"':"");z+=' aria-describedby="'+a.p.id+"_"+w+'"';return z+r[0]},V=function(e){return e===undefined||e===null||e===""?"&#160;":a.p.autoencode?b.jgrid.htmlEncode(e):e+""},o=
-function(e,f,j,m,p){var C=a.p.colModel[j];if(typeof C.formatter!=="undefined"){e={rowId:e,colModel:C,gid:a.p.id,pos:j};f=b.isFunction(C.formatter)?C.formatter.call(a,f,e,m,p):b.fmatter?b.fn.fmatter(C.formatter,f,e,m,p):V(f)}else f=V(f);return f},n=function(e,f,j,m,p){f=o(e,f,j,p,"add");return'<td role="gridcell" '+N(j,m,f,p,e,true)+">"+f+"</td>"},t=function(e,f,j){var m='<input role="checkbox" type="checkbox" id="jqg_'+a.p.id+"_"+e+'" class="cbox" name="jqg_'+a.p.id+"_"+e+'"/>';return'<td role="gridcell" '+
-N(f,j,"",null,e,true)+">"+m+"</td>"},F=function(e,f,j,m){j=(parseInt(j,10)-1)*parseInt(m,10)+1+f;return'<td role="gridcell" class="ui-state-default jqgrid-rownum" '+N(e,f,j,null,f,true)+">"+j+"</td>"},T=function(e){var f,j=[],m=0,p;for(p=0;p<a.p.colModel.length;p++){f=a.p.colModel[p];if(f.name!=="cb"&&f.name!=="subgrid"&&f.name!=="rn"){j[m]=e=="local"?f.name:e=="xml"||e==="xmlstring"?f.xmlmap||f.name:f.jsonmap||f.name;m++}}return j},J=function(e){var f=a.p.remapColumns;if(!f||!f.length)f=b.map(a.p.colModel,
-function(j,m){return m});if(e)f=b.map(f,function(j){return j<e?null:j-e});return f},D=function(e,f,j){if(a.p.deepempty)b("#"+b.jgrid.jqID(a.p.id)+" tbody:first tr:gt(0)").remove();else{var m=b("#"+b.jgrid.jqID(a.p.id)+" tbody:first tr:first")[0];b("#"+b.jgrid.jqID(a.p.id)+" tbody:first").empty().append(m)}if(f&&a.p.scroll){b(">div:first",e).css({height:"auto"}).children("div:first").css({height:0,display:"none"});e.scrollTop=0}if(j===true)if(a.p.treeGrid===true){a.p.data=[];a.p._index={}}},ca=function(){var e=
-a.p.data.length,f,j,m;f=a.p.rownumbers===true?1:0;j=a.p.multiselect===true?1:0;m=a.p.subGrid===true?1:0;f=a.p.keyIndex===false||a.p.loadonce===true?a.p.localReader.id:a.p.colModel[a.p.keyIndex+j+m+f].name;for(j=0;j<e;j++){m=b.jgrid.getAccessor(a.p.data[j],f);a.p._index[m]=j}},X=function(e,f,j,m,p){var C=new Date,s=a.p.datatype!="local"&&a.p.loadonce||a.p.datatype=="xmlstring",A=a.p.xmlReader,z=a.p.datatype=="local"?"local":"xml";if(s){a.p.data=[];a.p._index={};a.p.localReader.id="_id_"}a.p.reccount=
-0;if(b.isXMLDoc(e)){if(a.p.treeANode===-1&&!a.p.scroll){D(f,false,true);j=1}else j=j>1?j:1;var u,w,r=0,G,O=0,S=0,K=0,L,Z=[],P,v={},B,H,U=[],ia=a.p.altRows===true?" "+a.p.altclass:"";A.repeatitems||(Z=T(z));L=a.p.keyIndex===false?A.id:a.p.keyIndex;if(Z.length>0&&!isNaN(L)){if(a.p.remapColumns&&a.p.remapColumns.length)L=b.inArray(L,a.p.remapColumns);L=Z[L]}z=(L+"").indexOf("[")===-1?Z.length?function(ga,ba){return b(L,ga).text()||ba}:function(ga,ba){return b(A.cell,ga).eq(L).text()||ba}:function(ga,
-ba){return ga.getAttribute(L.replace(/[\[\]]/g,""))||ba};a.p.userData={};a.p.page=b.jgrid.getXmlData(e,A.page)||0;a.p.lastpage=b.jgrid.getXmlData(e,A.total);if(a.p.lastpage===undefined)a.p.lastpage=1;a.p.records=b.jgrid.getXmlData(e,A.records)||0;if(b.isFunction(A.userdata))a.p.userData=A.userdata.call(a,e)||{};else b.jgrid.getXmlData(e,A.userdata,true).each(function(){a.p.userData[this.getAttribute("name")]=b(this).text()});e=b.jgrid.getXmlData(e,A.root,true);(e=b.jgrid.getXmlData(e,A.row,true))||
-(e=[]);var $=e.length,W=0,ha={},ja=parseInt(a.p.rowNum,10);if($>0&&a.p.page<=0)a.p.page=1;if(e&&$){var qa=a.p.scroll?b.jgrid.randId():1;if(p)ja*=p+1;p=b.isFunction(a.p.afterInsertRow);var ya="";if(a.p.grouping&&a.p.groupingView.groupCollapse===true)ya=' style="display:none;"';for(;W<$;){B=e[W];H=z(B,qa+W);H=a.p.idPrefix+H;u=j===0?0:j+1;u=(u+W)%2==1?ia:"";U.push("<tr"+ya+' id="'+H+'" tabindex="-1" role="row" class ="ui-widget-content jqgrow ui-row-'+a.p.direction+""+u+'">');if(a.p.rownumbers===true){U.push(F(0,
-W,a.p.page,a.p.rowNum));K=1}if(a.p.multiselect===true){U.push(t(H,K,W));O=1}if(a.p.subGrid===true){U.push(b(a).jqGrid("addSubGridCell",O+K,W+j));S=1}if(A.repeatitems){P||(P=J(O+S+K));var Ca=b.jgrid.getXmlData(B,A.cell,true);b.each(P,function(ga){var ba=Ca[this];if(!ba)return false;G=ba.textContent||ba.text;v[a.p.colModel[ga+O+S+K].name]=G;U.push(n(H,G,ga+O+S+K,W+j,B))})}else for(u=0;u<Z.length;u++){G=b.jgrid.getXmlData(B,Z[u]);v[a.p.colModel[u+O+S+K].name]=G;U.push(n(H,G,u+O+S+K,W+j,B))}U.push("</tr>");
-if(a.p.grouping){u=a.p.groupingView.groupField.length;for(var Da=[],za=0;za<u;za++)Da.push(v[a.p.groupingView.groupField[za]]);ha=b(a).jqGrid("groupingPrepare",U,Da,ha,v);U=[]}if(s||a.p.treeGrid===true){v._id_=H;a.p.data.push(v);a.p._index[H]=a.p.data.length-1}if(a.p.gridview===false){b("tbody:first",f).append(U.join(""));p&&a.p.afterInsertRow.call(a,H,v,B);U=[]}v={};r++;W++;if(r==ja)break}}if(a.p.gridview===true){w=a.p.treeANode>-1?a.p.treeANode:0;if(a.p.grouping){b(a).jqGrid("groupingRender",ha,
-a.p.colModel.length);ha=null}else a.p.treeGrid===true&&w>0?b(a.rows[w]).after(U.join("")):b("tbody:first",f).append(U.join(""))}if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",O+K)}catch(Ka){}a.p.totaltime=new Date-C;if(r>0)if(a.p.records===0)a.p.records=$;U=null;if(a.p.treeGrid===true)try{b(a).jqGrid("setTreeNode",w+1,r+w+1)}catch(La){}if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=r;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);if(s){a.p.records=
-$;a.p.lastpage=Math.ceil($/ja)}m||a.updatepager(false,true);if(s)for(;r<$;){B=e[r];H=z(B,r);H=a.p.idPrefix+H;if(A.repeatitems){P||(P=J(O+S+K));var Ha=b.jgrid.getXmlData(B,A.cell,true);b.each(P,function(ga){var ba=Ha[this];if(!ba)return false;G=ba.textContent||ba.text;v[a.p.colModel[ga+O+S+K].name]=G})}else for(u=0;u<Z.length;u++){G=b.jgrid.getXmlData(B,Z[u]);v[a.p.colModel[u+O+S+K].name]=G}v._id_=H;a.p.data.push(v);a.p._index[H]=a.p.data.length-1;v={};r++}}},fa=function(e,f,j,m,p){var C=new Date;
-if(e){if(a.p.treeANode===-1&&!a.p.scroll){D(f,false,true);j=1}else j=j>1?j:1;var s,A=a.p.datatype!="local"&&a.p.loadonce||a.p.datatype=="jsonstring";if(A){a.p.data=[];a.p._index={};a.p.localReader.id="_id_"}a.p.reccount=0;if(a.p.datatype=="local"){f=a.p.localReader;s="local"}else{f=a.p.jsonReader;s="json"}var z=0,u,w,r=[],G,O=0,S=0,K=0,L,Z,P={},v,B,H=[],U=a.p.altRows===true?" "+a.p.altclass:"";a.p.page=b.jgrid.getAccessor(e,f.page)||0;L=b.jgrid.getAccessor(e,f.total);a.p.lastpage=L===undefined?1:
-L;a.p.records=b.jgrid.getAccessor(e,f.records)||0;a.p.userData=b.jgrid.getAccessor(e,f.userdata)||{};f.repeatitems||(G=r=T(s));s=a.p.keyIndex===false?f.id:a.p.keyIndex;if(r.length>0&&!isNaN(s)){if(a.p.remapColumns&&a.p.remapColumns.length)s=b.inArray(s,a.p.remapColumns);s=r[s]}(Z=b.jgrid.getAccessor(e,f.root))||(Z=[]);L=Z.length;e=0;if(L>0&&a.p.page<=0)a.p.page=1;var ia=parseInt(a.p.rowNum,10),$=a.p.scroll?b.jgrid.randId():1;if(p)ia*=p+1;var W=b.isFunction(a.p.afterInsertRow),ha={},ja="";if(a.p.grouping&&
-a.p.groupingView.groupCollapse===true)ja=' style="display:none;"';for(;e<L;){p=Z[e];B=b.jgrid.getAccessor(p,s);if(B===undefined){B=$+e;if(r.length===0)if(f.cell){u=b.jgrid.getAccessor(p,f.cell);B=u!==undefined?u[s]||B:B}}B=a.p.idPrefix+B;u=j===1?0:j;u=(u+e)%2==1?U:"";H.push("<tr"+ja+' id="'+B+'" tabindex="-1" role="row" class= "ui-widget-content jqgrow ui-row-'+a.p.direction+""+u+'">');if(a.p.rownumbers===true){H.push(F(0,e,a.p.page,a.p.rowNum));K=1}if(a.p.multiselect){H.push(t(B,K,e));O=1}if(a.p.subGrid){H.push(b(a).jqGrid("addSubGridCell",
-O+K,e+j));S=1}if(f.repeatitems){if(f.cell)p=b.jgrid.getAccessor(p,f.cell);G||(G=J(O+S+K))}for(w=0;w<G.length;w++){u=b.jgrid.getAccessor(p,G[w]);H.push(n(B,u,w+O+S+K,e+j,p));P[a.p.colModel[w+O+S+K].name]=u}H.push("</tr>");if(a.p.grouping){u=a.p.groupingView.groupField.length;w=[];for(var qa=0;qa<u;qa++)w.push(P[a.p.groupingView.groupField[qa]]);ha=b(a).jqGrid("groupingPrepare",H,w,ha,P);H=[]}if(A||a.p.treeGrid===true){P._id_=B;a.p.data.push(P);a.p._index[B]=a.p.data.length-1}if(a.p.gridview===false){b("#"+
-b.jgrid.jqID(a.p.id)+" tbody:first").append(H.join(""));W&&a.p.afterInsertRow.call(a,B,P,p);H=[]}P={};z++;e++;if(z==ia)break}if(a.p.gridview===true){v=a.p.treeANode>-1?a.p.treeANode:0;if(a.p.grouping)b(a).jqGrid("groupingRender",ha,a.p.colModel.length);else a.p.treeGrid===true&&v>0?b(a.rows[v]).after(H.join("")):b("#"+b.jgrid.jqID(a.p.id)+" tbody:first").append(H.join(""))}if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",O+K)}catch(ya){}a.p.totaltime=new Date-C;if(z>0)if(a.p.records===0)a.p.records=
-L;if(a.p.treeGrid===true)try{b(a).jqGrid("setTreeNode",v+1,z+v+1)}catch(Ca){}if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=z;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);if(A){a.p.records=L;a.p.lastpage=Math.ceil(L/ia)}m||a.updatepager(false,true);if(A)for(;z<L&&Z[z];){p=Z[z];B=b.jgrid.getAccessor(p,s);if(B===undefined){B=$+z;if(r.length===0)if(f.cell)B=b.jgrid.getAccessor(p,f.cell)[s]||B}if(p){B=a.p.idPrefix+B;if(f.repeatitems){if(f.cell)p=
-b.jgrid.getAccessor(p,f.cell);G||(G=J(O+S+K))}for(w=0;w<G.length;w++){u=b.jgrid.getAccessor(p,G[w]);P[a.p.colModel[w+O+S+K].name]=u}P._id_=B;a.p.data.push(P);a.p._index[B]=a.p.data.length-1;P={}}z++}}},pa=function(){function e(v){var B=0,H,U,ia,$,W;if(v.groups!==undefined){(U=v.groups.length&&v.groupOp.toString().toUpperCase()==="OR")&&r.orBegin();for(H=0;H<v.groups.length;H++){B>0&&U&&r.or();try{e(v.groups[H])}catch(ha){alert(ha)}B++}U&&r.orEnd()}if(v.rules!==undefined){if(B>0){U=r.select();r=b.jgrid.from(U);
-if(a.p.ignoreCase)r=r.ignoreCase()}try{(ia=v.rules.length&&v.groupOp.toString().toUpperCase()==="OR")&&r.orBegin();for(H=0;H<v.rules.length;H++){W=v.rules[H];$=v.groupOp.toString().toUpperCase();if(w[W.op]&&W.field){if(B>0&&$&&$==="OR")r=r.or();r=w[W.op](r,$)(W.field,W.data,m[W.field])}B++}ia&&r.orEnd()}catch(ja){alert(ja)}}}var f,j=false,m={},p=[],C=[],s,A,z;if(b.isArray(a.p.data)){var u=a.p.grouping?a.p.groupingView:false;b.each(a.p.colModel,function(){A=this.sorttype||"text";if(A=="date"||A=="datetime"){if(this.formatter&&
-typeof this.formatter==="string"&&this.formatter=="date"){s=this.formatoptions&&this.formatoptions.srcformat?this.formatoptions.srcformat:b.jgrid.formatter.date.srcformat;z=this.formatoptions&&this.formatoptions.newformat?this.formatoptions.newformat:b.jgrid.formatter.date.newformat}else s=z=this.datefmt||"Y-m-d";m[this.name]={stype:A,srcfmt:s,newfmt:z}}else m[this.name]={stype:A,srcfmt:"",newfmt:""};if(a.p.grouping&&this.name==u.groupField[0]){var v=this.name;if(typeof this.index!="undefined")v=
-this.index;p[0]=m[v];C.push(v)}if(!j&&(this.index==a.p.sortname||this.name==a.p.sortname)){f=this.name;j=true}});if(a.p.treeGrid)b(a).jqGrid("SortTree",f,a.p.sortorder,m[f].stype,m[f].srcfmt);else{var w={eq:function(v){return v.equals},ne:function(v){return v.notEquals},lt:function(v){return v.less},le:function(v){return v.lessOrEquals},gt:function(v){return v.greater},ge:function(v){return v.greaterOrEquals},cn:function(v){return v.contains},nc:function(v,B){return B==="OR"?v.orNot().contains:v.andNot().contains},
-bw:function(v){return v.startsWith},bn:function(v,B){return B==="OR"?v.orNot().startsWith:v.andNot().startsWith},en:function(v,B){return B==="OR"?v.orNot().endsWith:v.andNot().endsWith},ew:function(v){return v.endsWith},ni:function(v,B){return B==="OR"?v.orNot().equals:v.andNot().equals},"in":function(v){return v.equals},nu:function(v){return v.isNull},nn:function(v,B){return B==="OR"?v.orNot().isNull:v.andNot().isNull}},r=b.jgrid.from(a.p.data);if(a.p.ignoreCase)r=r.ignoreCase();if(a.p.search===
-true){var G=a.p.postData.filters;if(G){if(typeof G=="string")G=b.jgrid.parse(G);e(G)}else try{r=w[a.p.postData.searchOper](r)(a.p.postData.searchField,a.p.postData.searchString,m[a.p.postData.searchField])}catch(O){}}if(a.p.grouping){r.orderBy(C,u.groupOrder[0],p[0].stype,p[0].srcfmt);u.groupDataSorted=true}if(f&&a.p.sortorder&&j)a.p.sortorder.toUpperCase()=="DESC"?r.orderBy(a.p.sortname,"d",m[f].stype,m[f].srcfmt):r.orderBy(a.p.sortname,"a",m[f].stype,m[f].srcfmt);G=r.select();var S=parseInt(a.p.rowNum,
-10),K=G.length,L=parseInt(a.p.page,10),Z=Math.ceil(K/S),P={};G=G.slice((L-1)*S,L*S);m=r=null;P[a.p.localReader.total]=Z;P[a.p.localReader.page]=L;P[a.p.localReader.records]=K;P[a.p.localReader.root]=G;P[a.p.localReader.userdata]=a.p.userData;G=null;return P}}},R=function(){a.grid.hDiv.loading=true;if(!a.p.hiddengrid)switch(a.p.loadui){case "enable":b("#load_"+b.jgrid.jqID(a.p.id)).show();break;case "block":b("#lui_"+b.jgrid.jqID(a.p.id)).show();b("#load_"+b.jgrid.jqID(a.p.id)).show()}},aa=function(){a.grid.hDiv.loading=
-false;switch(a.p.loadui){case "enable":b("#load_"+b.jgrid.jqID(a.p.id)).hide();break;case "block":b("#lui_"+b.jgrid.jqID(a.p.id)).hide();b("#load_"+b.jgrid.jqID(a.p.id)).hide()}},ka=function(e){if(!a.grid.hDiv.loading){var f=a.p.scroll&&e===false,j={},m,p=a.p.prmNames;if(a.p.page<=0)a.p.page=1;if(p.search!==null)j[p.search]=a.p.search;if(p.nd!==null)j[p.nd]=(new Date).getTime();if(p.rows!==null)j[p.rows]=a.p.rowNum;if(p.page!==null)j[p.page]=a.p.page;if(p.sort!==null)j[p.sort]=a.p.sortname;if(p.order!==
-null)j[p.order]=a.p.sortorder;if(a.p.rowTotal!==null&&p.totalrows!==null)j[p.totalrows]=a.p.rowTotal;var C=a.p.loadComplete,s=b.isFunction(C);s||(C=null);var A=0;e=e||1;if(e>1)if(p.npage!==null){j[p.npage]=e;A=e-1;e=1}else C=function(u){a.p.page++;a.grid.hDiv.loading=false;s&&a.p.loadComplete.call(a,u);ka(e-1)};else p.npage!==null&&delete a.p.postData[p.npage];if(a.p.grouping){b(a).jqGrid("groupingSetup");if(a.p.groupingView.groupDataSorted===true)j[p.sort]=a.p.groupingView.groupField[0]+" "+a.p.groupingView.groupOrder[0]+
-", "+j[p.sort]}b.extend(a.p.postData,j);var z=!a.p.scroll?1:a.rows.length-1;if(b.isFunction(a.p.datatype))a.p.datatype.call(a,a.p.postData,"load_"+a.p.id);else{if(b.isFunction(a.p.beforeRequest)){j=a.p.beforeRequest.call(a);if(j===undefined)j=true;if(j===false)return}m=a.p.datatype.toLowerCase();switch(m){case "json":case "jsonp":case "xml":case "script":b.ajax(b.extend({url:a.p.url,type:a.p.mtype,dataType:m,data:b.isFunction(a.p.serializeGridData)?a.p.serializeGridData.call(a,a.p.postData):a.p.postData,
-success:function(u,w,r){b.isFunction(a.p.beforeProcessing)&&a.p.beforeProcessing.call(a,u,w,r);m==="xml"?X(u,a.grid.bDiv,z,e>1,A):fa(u,a.grid.bDiv,z,e>1,A);C&&C.call(a,u);f&&a.grid.populateVisible();if(a.p.loadonce||a.p.treeGrid)a.p.datatype="local";e===1&&aa()},error:function(u,w,r){b.isFunction(a.p.loadError)&&a.p.loadError.call(a,u,w,r);e===1&&aa()},beforeSend:function(u,w){var r=true;if(b.isFunction(a.p.loadBeforeSend))r=a.p.loadBeforeSend.call(a,u,w);if(r===undefined)r=true;if(r===false)return false;
-else R()}},b.jgrid.ajaxOptions,a.p.ajaxGridOptions));break;case "xmlstring":R();j=b.jgrid.stringToDoc(a.p.datastr);X(j,a.grid.bDiv);s&&a.p.loadComplete.call(a,j);a.p.datatype="local";a.p.datastr=null;aa();break;case "jsonstring":R();j=typeof a.p.datastr=="string"?b.jgrid.parse(a.p.datastr):a.p.datastr;fa(j,a.grid.bDiv);s&&a.p.loadComplete.call(a,j);a.p.datatype="local";a.p.datastr=null;aa();break;case "local":case "clientside":R();a.p.datatype="local";j=pa();fa(j,a.grid.bDiv,z,e>1,A);C&&C.call(a,
-j);f&&a.grid.populateVisible();aa()}}}},sa=function(e){b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv)[a.p.useProp?"prop":"attr"]("checked",e);if(a.p.frozenColumns&&a.p.id+"_frozen")b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.fhDiv)[a.p.useProp?"prop":"attr"]("checked",e)};x=function(e,f){var j="",m="<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>",p="",C,s,A,z,u=function(w){var r;if(b.isFunction(a.p.onPaging))r=a.p.onPaging.call(a,w);a.p.selrow=null;
-if(a.p.multiselect){a.p.selarrrow=[];sa(false)}a.p.savedRow=[];if(r=="stop")return false;return true};e=e.substr(1);f+="_"+e;C="pg_"+e;s=e+"_left";A=e+"_center";z=e+"_right";b("#"+b.jgrid.jqID(e)).append("<div id='"+C+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;height:100%;' role='row'><tbody><tr><td id='"+s+"' align='left'></td><td id='"+A+"' align='center' style='white-space:pre;'></td><td id='"+
-z+"' align='right'></td></tr></tbody></table></div>").attr("dir","ltr");if(a.p.rowList.length>0){p="<td dir='"+l+"'>";p+="<select class='ui-pg-selbox' role='listbox'>";for(s=0;s<a.p.rowList.length;s++)p+='<option role="option" value="'+a.p.rowList[s]+'"'+(a.p.rowNum==a.p.rowList[s]?' selected="selected"':"")+">"+a.p.rowList[s]+"</option>";p+="</select></td>"}if(l=="rtl")m+=p;if(a.p.pginput===true)j="<td dir='"+l+"'>"+b.jgrid.format(a.p.pgtext||"","<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>",
-"<span id='sp_1_"+b.jgrid.jqID(e)+"'></span>")+"</td>";if(a.p.pgbuttons===true){s=["first"+f,"prev"+f,"next"+f,"last"+f];l=="rtl"&&s.reverse();m+="<td id='"+s[0]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>";m+="<td id='"+s[1]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>";m+=j!==""?"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>"+j+"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>":
-"";m+="<td id='"+s[2]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>";m+="<td id='"+s[3]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>"}else if(j!=="")m+=j;if(l=="ltr")m+=p;m+="</tr></tbody></table>";a.p.viewrecords===true&&b("td#"+e+"_"+a.p.recordpos,"#"+C).append("<div dir='"+l+"' style='text-align:"+a.p.recordpos+"' class='ui-paging-info'></div>");b("td#"+e+"_"+a.p.pagerpos,"#"+C).append(m);p=b(".ui-jqgrid").css("font-size")||
-"11px";b(document.body).append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+p+";visibility:hidden;' ></div>");m=b(m).clone().appendTo("#testpg").width();b("#testpg").remove();if(m>0){if(j!=="")m+=50;b("td#"+e+"_"+a.p.pagerpos,"#"+C).width(m)}a.p._nvtd=[];a.p._nvtd[0]=m?Math.floor((a.p.width-m)/2):Math.floor(a.p.width/3);a.p._nvtd[1]=0;m=null;b(".ui-pg-selbox","#"+C).bind("change",function(){a.p.page=Math.round(a.p.rowNum*(a.p.page-1)/this.value-0.5)+1;a.p.rowNum=
-this.value;if(f)b(".ui-pg-selbox",a.p.pager).val(this.value);else a.p.toppager&&b(".ui-pg-selbox",a.p.toppager).val(this.value);if(!u("records"))return false;ka();return false});if(a.p.pgbuttons===true){b(".ui-pg-button","#"+C).hover(function(){if(b(this).hasClass("ui-state-disabled"))this.style.cursor="default";else{b(this).addClass("ui-state-hover");this.style.cursor="pointer"}},function(){if(!b(this).hasClass("ui-state-disabled")){b(this).removeClass("ui-state-hover");this.style.cursor="default"}});
-b("#first"+b.jgrid.jqID(f)+", #prev"+b.jgrid.jqID(f)+", #next"+b.jgrid.jqID(f)+", #last"+b.jgrid.jqID(f)).click(function(){var w=M(a.p.page,1),r=M(a.p.lastpage,1),G=false,O=true,S=true,K=true,L=true;if(r===0||r===1)L=K=S=O=false;else if(r>1&&w>=1)if(w===1)S=O=false;else{if(w===r)L=K=false}else if(r>1&&w===0){L=K=false;w=r-1}if(this.id==="first"+f&&O){a.p.page=1;G=true}if(this.id==="prev"+f&&S){a.p.page=w-1;G=true}if(this.id==="next"+f&&K){a.p.page=w+1;G=true}if(this.id==="last"+f&&L){a.p.page=r;G=
-true}if(G){if(!u(this.id))return false;ka()}return false})}a.p.pginput===true&&b("input.ui-pg-input","#"+C).keypress(function(w){if((w.charCode?w.charCode:w.keyCode?w.keyCode:0)==13){a.p.page=b(this).val()>0?b(this).val():a.p.page;if(!u("user"))return false;ka();return false}return this})};var Ea=function(e,f,j,m){if(a.p.colModel[f].sortable)if(!(a.p.savedRow.length>0)){if(!j){if(a.p.lastsort==f)if(a.p.sortorder=="asc")a.p.sortorder="desc";else{if(a.p.sortorder=="desc")a.p.sortorder="asc"}else a.p.sortorder=
-a.p.colModel[f].firstsortorder||"asc";a.p.page=1}if(m)if(a.p.lastsort==f&&a.p.sortorder==m&&!j)return;else a.p.sortorder=m;j=a.grid.headers[a.p.lastsort].el;m=a.grid.headers[f].el;b("span.ui-grid-ico-sort",j).addClass("ui-state-disabled");b(j).attr("aria-selected","false");b("span.ui-icon-"+a.p.sortorder,m).removeClass("ui-state-disabled");b(m).attr("aria-selected","true");if(!a.p.viewsortcols[0])if(a.p.lastsort!=f){b("span.s-ico",j).hide();b("span.s-ico",m).show()}e=e.substring(5+a.p.id.length+1);
-a.p.sortname=a.p.colModel[f].index||e;j=a.p.sortorder;if(b.isFunction(a.p.onSortCol))if(a.p.onSortCol.call(a,e,f,j)=="stop"){a.p.lastsort=f;return}if(a.p.datatype=="local")a.p.deselectAfterSort&&b(a).jqGrid("resetSelection");else{a.p.selrow=null;a.p.multiselect&&sa(false);a.p.selarrrow=[];a.p.savedRow=[]}if(a.p.scroll){j=a.grid.bDiv.scrollLeft;D(a.grid.bDiv,true,false);a.grid.hDiv.scrollLeft=j}a.p.subGrid&&a.p.datatype=="local"&&b("td.sgexpanded","#"+b.jgrid.jqID(a.p.id)).each(function(){b(this).trigger("click")});
-ka();a.p.lastsort=f;if(a.p.sortname!=e&&f)a.p.lastsort=f}},Ia=function(e){var f,j={},m=E?0:a.p.cellLayout;for(f=j[0]=j[1]=j[2]=0;f<=e;f++)if(a.p.colModel[f].hidden===false)j[0]+=a.p.colModel[f].width+m;if(a.p.direction=="rtl")j[0]=a.p.width-j[0];j[0]-=a.grid.bDiv.scrollLeft;if(b(a.grid.cDiv).is(":visible"))j[1]+=b(a.grid.cDiv).height()+parseInt(b(a.grid.cDiv).css("padding-top"),10)+parseInt(b(a.grid.cDiv).css("padding-bottom"),10);if(a.p.toolbar[0]===true&&(a.p.toolbar[1]=="top"||a.p.toolbar[1]==
-"both"))j[1]+=b(a.grid.uDiv).height()+parseInt(b(a.grid.uDiv).css("border-top-width"),10)+parseInt(b(a.grid.uDiv).css("border-bottom-width"),10);if(a.p.toppager)j[1]+=b(a.grid.topDiv).height()+parseInt(b(a.grid.topDiv).css("border-bottom-width"),10);j[2]+=b(a.grid.bDiv).height()+b(a.grid.hDiv).height();return j},Fa=function(e){var f,j=a.grid.headers,m=b.jgrid.getCellIndex(e);for(f=0;f<j.length;f++)if(e===j[f].el){m=f;break}return m};this.p.id=this.id;if(b.inArray(a.p.multikey,["shiftKey","altKey",
-"ctrlKey"])==-1)a.p.multikey=false;a.p.keyIndex=false;for(k=0;k<a.p.colModel.length;k++){a.p.colModel[k]=b.extend(true,{},a.p.cmTemplate,a.p.colModel[k].template||{},a.p.colModel[k]);if(a.p.keyIndex===false&&a.p.colModel[k].key===true)a.p.keyIndex=k}a.p.sortorder=a.p.sortorder.toLowerCase();if(a.p.grouping===true){a.p.scroll=false;a.p.rownumbers=false;a.p.subGrid=false;a.p.treeGrid=false;a.p.gridview=true}if(this.p.treeGrid===true){try{b(this).jqGrid("setTreeGrid")}catch(Ma){}if(a.p.datatype!="local")a.p.localReader=
-{id:"_id_"}}if(this.p.subGrid)try{b(a).jqGrid("setSubGrid")}catch(Na){}if(this.p.multiselect){this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");this.p.colModel.unshift({name:"cb",width:E?a.p.multiselectWidth+a.p.cellLayout:a.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}if(this.p.rownumbers){this.p.colNames.unshift("");this.p.colModel.unshift({name:"rn",width:a.p.rownumWidth,sortable:false,
-resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}a.p.xmlReader=b.extend(true,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:true,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:true,cell:"cell"}},a.p.xmlReader);a.p.jsonReader=b.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:true,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},
-a.p.jsonReader);a.p.localReader=b.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:false,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},a.p.localReader);if(a.p.scroll){a.p.pgbuttons=false;a.p.pginput=false;a.p.rowList=[]}a.p.data.length&&ca();var da="<thead><tr class='ui-jqgrid-labels' role='rowheader'>",Ga,na,ta,ra,ua,Y,Q,oa;na=oa="";if(a.p.shrinkToFit===true&&a.p.forceFit===true)for(k=a.p.colModel.length-1;k>=0;k--)if(!a.p.colModel[k].hidden){a.p.colModel[k].resizable=
-false;break}if(a.p.viewsortcols[1]=="horizontal"){oa=" ui-i-asc";na=" ui-i-desc"}Ga=y?"class='ui-th-div-ie'":"";oa="<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc"+oa+" ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-"+l+"'></span>";oa+="<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+na+" ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-"+l+"'></span></span>";for(k=0;k<this.p.colNames.length;k++){na=a.p.headertitles?' title="'+b.jgrid.stripHtml(a.p.colNames[k])+
-'"':"";da+="<th id='"+a.p.id+"_"+a.p.colModel[k].name+"' role='columnheader' class='ui-state-default ui-th-column ui-th-"+l+"'"+na+">";na=a.p.colModel[k].index||a.p.colModel[k].name;da+="<div id='jqgh_"+a.p.id+"_"+a.p.colModel[k].name+"' "+Ga+">"+a.p.colNames[k];a.p.colModel[k].width=a.p.colModel[k].width?parseInt(a.p.colModel[k].width,10):150;if(typeof a.p.colModel[k].title!=="boolean")a.p.colModel[k].title=true;if(na==a.p.sortname)a.p.lastsort=k;da+=oa+"</div></th>"}da+="</tr></thead>";oa=null;
-b(this).append(da);b("thead tr:first th",this).hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});if(this.p.multiselect){var Aa=[],va;b("#cb_"+b.jgrid.jqID(a.p.id),this).bind("click",function(){a.p.selarrrow=[];var e=a.p.frozenColumns===true?a.p.id+"_frozen":"";if(this.checked){b(a.rows).each(function(f){if(f>0)if(!b(this).hasClass("ui-subgrid")&&!b(this).hasClass("jqgroup")&&!b(this).hasClass("ui-state-disabled")){b("#jqg_"+b.jgrid.jqID(a.p.id)+
-"_"+b.jgrid.jqID(this.id))[a.p.useProp?"prop":"attr"]("checked",true);b(this).addClass("ui-state-highlight").attr("aria-selected","true");a.p.selarrrow.push(this.id);a.p.selrow=this.id;if(e){b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(this.id),a.grid.fbDiv)[a.p.useProp?"prop":"attr"]("checked",true);b("#"+b.jgrid.jqID(this.id),a.grid.fbDiv).addClass("ui-state-highlight")}}});va=true;Aa=[]}else{b(a.rows).each(function(f){if(f>0)if(!b(this).hasClass("ui-subgrid")&&!b(this).hasClass("ui-state-disabled")){b("#jqg_"+
-b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(this.id))[a.p.useProp?"prop":"attr"]("checked",false);b(this).removeClass("ui-state-highlight").attr("aria-selected","false");Aa.push(this.id);if(e){b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(this.id),a.grid.fbDiv)[a.p.useProp?"prop":"attr"]("checked",false);b("#"+b.jgrid.jqID(this.id),a.grid.fbDiv).removeClass("ui-state-highlight")}}});a.p.selrow=null;va=false}if(b.isFunction(a.p.onSelectAll))a.p.onSelectAll.call(a,va?a.p.selarrrow:Aa,va)})}if(a.p.autowidth===
-true){da=b(I).innerWidth();a.p.width=da>0?da:"nw"}(function(){var e=0,f=E?0:a.p.cellLayout,j=0,m,p=a.p.scrollOffset,C,s=false,A,z=0,u=0,w;b.each(a.p.colModel,function(){if(typeof this.hidden==="undefined")this.hidden=false;this.widthOrg=C=M(this.width,0);if(this.hidden===false){e+=C+f;if(this.fixed)z+=C+f;else j++;u++}});if(isNaN(a.p.width))a.p.width=h.width=e;else h.width=a.p.width;a.p.tblwidth=e;if(a.p.shrinkToFit===false&&a.p.forceFit===true)a.p.forceFit=false;if(a.p.shrinkToFit===true&&j>0){A=
-h.width-f*j-z;if(!isNaN(a.p.height)){A-=p;s=true}e=0;b.each(a.p.colModel,function(r){if(this.hidden===false&&!this.fixed){this.width=C=Math.round(A*this.width/(a.p.tblwidth-f*j-z));e+=C;m=r}});w=0;if(s){if(h.width-z-(e+f*j)!==p)w=h.width-z-(e+f*j)-p}else if(!s&&Math.abs(h.width-z-(e+f*j))!==1)w=h.width-z-(e+f*j);a.p.colModel[m].width+=w;a.p.tblwidth=e+w+f*j+z;if(a.p.tblwidth>a.p.width){a.p.colModel[m].width-=a.p.tblwidth-parseInt(a.p.width,10);a.p.tblwidth=a.p.width}}})();b(I).css("width",h.width+
-"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+a.p.id+"'>&#160;</div>");b(q).css("width",h.width+"px");da=b("thead:first",a).get(0);var wa="";if(a.p.footerrow)wa+="<table role='grid' style='width:"+a.p.tblwidth+"px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-"+l+"'>";q=b("tr:first",da);var xa="<tr class='jqgfirstrow' role='row' style='height:auto'>";a.p.disableClick=false;b("th",q).each(function(e){ta=
-a.p.colModel[e].width;if(typeof a.p.colModel[e].resizable==="undefined")a.p.colModel[e].resizable=true;if(a.p.colModel[e].resizable){ra=document.createElement("span");b(ra).html("&#160;").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+l);b.browser.opera||b(ra).css("cursor","col-resize");b(this).addClass(a.p.resizeclass)}else ra="";b(this).css("width",ta+"px").prepend(ra);var f="";if(a.p.colModel[e].hidden){b(this).css("display","none");f="display:none;"}xa+="<td role='gridcell' style='height:0px;width:"+
-ta+"px;"+f+"'></td>";h.headers[e]={width:ta,el:this};ua=a.p.colModel[e].sortable;if(typeof ua!=="boolean")ua=a.p.colModel[e].sortable=true;f=a.p.colModel[e].name;f=="cb"||f=="subgrid"||f=="rn"||a.p.viewsortcols[2]&&b(">div",this).addClass("ui-jqgrid-sortable");if(ua)if(a.p.viewsortcols[0]){b("div span.s-ico",this).show();e==a.p.lastsort&&b("div span.ui-icon-"+a.p.sortorder,this).removeClass("ui-state-disabled")}else if(e==a.p.lastsort){b("div span.s-ico",this).show();b("div span.ui-icon-"+a.p.sortorder,
-this).removeClass("ui-state-disabled")}if(a.p.footerrow)wa+="<td role='gridcell' "+N(e,0,"",null,"",false)+">&#160;</td>"}).mousedown(function(e){if(b(e.target).closest("th>span.ui-jqgrid-resize").length==1){var f=Fa(this);if(a.p.forceFit===true){var j=a.p,m=f,p;for(p=f+1;p<a.p.colModel.length;p++)if(a.p.colModel[p].hidden!==true){m=p;break}j.nv=m-f}h.dragStart(f,e,Ia(f));return false}}).click(function(e){if(a.p.disableClick)return a.p.disableClick=false;var f="th>div.ui-jqgrid-sortable",j,m;a.p.viewsortcols[2]||
-(f="th>div>span>span.ui-grid-ico-sort");e=b(e.target).closest(f);if(e.length==1){f=Fa(this);if(!a.p.viewsortcols[2]){j=true;m=e.attr("sort")}Ea(b("div",this)[0].id,f,j,m);return false}});if(a.p.sortable&&b.fn.sortable)try{b(a).jqGrid("sortableColumns",q)}catch(Oa){}if(a.p.footerrow)wa+="</tr></tbody></table>";xa+="</tr>";this.appendChild(document.createElement("tbody"));b(this).addClass("ui-jqgrid-btable").append(xa);xa=null;q=b("<table class='ui-jqgrid-htable' style='width:"+a.p.tblwidth+"px' role='grid' aria-labelledby='gbox_"+
-this.id+"' cellspacing='0' cellpadding='0' border='0'></table>").append(da);var ea=a.p.caption&&a.p.hiddengrid===true?true:false;k=b("<div class='ui-jqgrid-hbox"+(l=="rtl"?"-rtl":"")+"'></div>");da=null;h.hDiv=document.createElement("div");b(h.hDiv).css({width:h.width+"px"}).addClass("ui-state-default ui-jqgrid-hdiv").append(k);b(k).append(q);q=null;ea&&b(h.hDiv).hide();if(a.p.pager){if(typeof a.p.pager=="string"){if(a.p.pager.substr(0,1)!="#")a.p.pager="#"+a.p.pager}else a.p.pager="#"+b(a.p.pager).attr("id");
-b(a.p.pager).css({width:h.width+"px"}).appendTo(I).addClass("ui-state-default ui-jqgrid-pager ui-corner-bottom");ea&&b(a.p.pager).hide();x(a.p.pager,"")}a.p.cellEdit===false&&a.p.hoverrows===true&&b(a).bind("mouseover",function(e){Q=b(e.target).closest("tr.jqgrow");b(Q).attr("class")!=="ui-subgrid"&&b(Q).addClass("ui-state-hover")}).bind("mouseout",function(e){Q=b(e.target).closest("tr.jqgrow");b(Q).removeClass("ui-state-hover")});var la,ma;b(a).before(h.hDiv).click(function(e){Y=e.target;Q=b(Y,a.rows).closest("tr.jqgrow");
-if(b(Q).length===0||Q[0].className.indexOf("ui-state-disabled")>-1||b(Y,a).closest("table.ui-jqgrid-btable")[0].id.replace("_frozen","")!==a.id)return this;var f=b(Y).hasClass("cbox"),j=true;if(b.isFunction(a.p.beforeSelectRow))j=a.p.beforeSelectRow.call(a,Q[0].id,e);if(Y.tagName=="A"||(Y.tagName=="INPUT"||Y.tagName=="TEXTAREA"||Y.tagName=="OPTION"||Y.tagName=="SELECT")&&!f)return this;if(j===true){if(a.p.cellEdit===true)if(a.p.multiselect&&f)b(a).jqGrid("setSelection",Q[0].id,true);else{la=Q[0].rowIndex;
-ma=b.jgrid.getCellIndex(Y);try{b(a).jqGrid("editCell",la,ma,true)}catch(m){}}else if(a.p.multikey)if(e[a.p.multikey])b(a).jqGrid("setSelection",Q[0].id,true);else{if(a.p.multiselect&&f){f=b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+Q[0].id).is(":checked");b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+Q[0].id)[a.p.useProp?"prop":"attr"]("checked",f)}}else{if(a.p.multiselect&&a.p.multiboxonly)if(!f){var p=a.p.frozenColumns?a.p.id+"_frozen":"";b(a.p.selarrrow).each(function(C,s){var A=a.rows.namedItem(s);b(A).removeClass("ui-state-highlight");
-b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(s))[a.p.useProp?"prop":"attr"]("checked",false);if(p){b("#"+b.jgrid.jqID(s),"#"+b.jgrid.jqID(p)).removeClass("ui-state-highlight");b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(s),"#"+b.jgrid.jqID(p))[a.p.useProp?"prop":"attr"]("checked",false)}});a.p.selarrrow=[]}b(a).jqGrid("setSelection",Q[0].id,true)}if(b.isFunction(a.p.onCellSelect)){la=Q[0].id;ma=b.jgrid.getCellIndex(Y);a.p.onCellSelect.call(a,la,ma,b(Y).html(),e)}}return this}).bind("reloadGrid",
-function(e,f){if(a.p.treeGrid===true)a.p.datatype=a.p.treedatatype;f&&f.current&&a.grid.selectionPreserver(a);if(a.p.datatype=="local"){b(a).jqGrid("resetSelection");a.p.data.length&&ca()}else if(!a.p.treeGrid){a.p.selrow=null;if(a.p.multiselect){a.p.selarrrow=[];sa(false)}a.p.savedRow=[]}a.p.scroll&&D(a.grid.bDiv,true,false);if(f&&f.page){var j=f.page;if(j>a.p.lastpage)j=a.p.lastpage;if(j<1)j=1;a.p.page=j;a.grid.bDiv.scrollTop=a.grid.prevRowHeight?(j-1)*a.grid.prevRowHeight*a.p.rowNum:0}if(a.grid.prevRowHeight&&
-a.p.scroll){delete a.p.lastpage;a.grid.populateVisible()}else a.grid.populate();return false});b.isFunction(this.p.ondblClickRow)&&b(this).dblclick(function(e){Y=e.target;Q=b(Y,a.rows).closest("tr.jqgrow");if(b(Q).length===0)return false;la=Q[0].rowIndex;ma=b.jgrid.getCellIndex(Y);a.p.ondblClickRow.call(a,b(Q).attr("id"),la,ma,e);return false});b.isFunction(this.p.onRightClickRow)&&b(this).bind("contextmenu",function(e){Y=e.target;Q=b(Y,a.rows).closest("tr.jqgrow");if(b(Q).length===0)return false;
-a.p.multiselect||b(a).jqGrid("setSelection",Q[0].id,true);la=Q[0].rowIndex;ma=b.jgrid.getCellIndex(Y);a.p.onRightClickRow.call(a,b(Q).attr("id"),la,ma,e);return false});h.bDiv=document.createElement("div");if(y)if(String(a.p.height).toLowerCase()==="auto")a.p.height="100%";b(h.bDiv).append(b('<div style="position:relative;'+(y&&b.browser.version<8?"height:0.01%;":"")+'"></div>').append("<div></div>").append(this)).addClass("ui-jqgrid-bdiv").css({height:a.p.height+(isNaN(a.p.height)?"":"px"),width:h.width+
-"px"}).scroll(h.scrollGrid);b("table:first",h.bDiv).css({width:a.p.tblwidth+"px"});if(y){b("tbody",this).size()==2&&b("tbody:gt(0)",this).remove();a.p.multikey&&b(h.bDiv).bind("selectstart",function(){return false})}else a.p.multikey&&b(h.bDiv).bind("mousedown",function(){return false});ea&&b(h.bDiv).hide();h.cDiv=document.createElement("div");var Ba=a.p.hidegrid===true?b("<a role='link' href='javascript:void(0)'/>").addClass("ui-jqgrid-titlebar-close HeaderButton").hover(function(){Ba.addClass("ui-state-hover")},
-function(){Ba.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css(l=="rtl"?"left":"right","0px"):"";b(h.cDiv).append(Ba).append("<span class='ui-jqgrid-title"+(l=="rtl"?"-rtl":"")+"'>"+a.p.caption+"</span>").addClass("ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix");b(h.cDiv).insertBefore(h.hDiv);if(a.p.toolbar[0]){h.uDiv=document.createElement("div");if(a.p.toolbar[1]=="top")b(h.uDiv).insertBefore(h.hDiv);else a.p.toolbar[1]==
-"bottom"&&b(h.uDiv).insertAfter(h.hDiv);if(a.p.toolbar[1]=="both"){h.ubDiv=document.createElement("div");b(h.uDiv).insertBefore(h.hDiv).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);b(h.ubDiv).insertAfter(h.hDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id);ea&&b(h.ubDiv).hide()}else b(h.uDiv).width(h.width).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);ea&&b(h.uDiv).hide()}if(a.p.toppager){a.p.toppager=b.jgrid.jqID(a.p.id)+"_toppager";h.topDiv=
-b("<div id='"+a.p.toppager+"'></div>")[0];a.p.toppager="#"+a.p.toppager;b(h.topDiv).insertBefore(h.hDiv).addClass("ui-state-default ui-jqgrid-toppager").width(h.width);x(a.p.toppager,"_t")}if(a.p.footerrow){h.sDiv=b("<div class='ui-jqgrid-sdiv'></div>")[0];k=b("<div class='ui-jqgrid-hbox"+(l=="rtl"?"-rtl":"")+"'></div>");b(h.sDiv).append(k).insertAfter(h.hDiv).width(h.width);b(k).append(wa);h.footers=b(".ui-jqgrid-ftable",h.sDiv)[0].rows[0].cells;if(a.p.rownumbers)h.footers[0].className="ui-state-default jqgrid-rownum";
-ea&&b(h.sDiv).hide()}k=null;if(a.p.caption){var Ja=a.p.datatype;if(a.p.hidegrid===true){b(".ui-jqgrid-titlebar-close",h.cDiv).click(function(e){var f=b.isFunction(a.p.onHeaderClick),j=".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-pager, .ui-jqgrid-sdiv",m,p=this;if(a.p.toolbar[0]===true){if(a.p.toolbar[1]=="both")j+=", #"+b(h.ubDiv).attr("id");j+=", #"+b(h.uDiv).attr("id")}m=b(j,"#gview_"+b.jgrid.jqID(a.p.id)).length;if(a.p.gridstate=="visible")b(j,"#gbox_"+b.jgrid.jqID(a.p.id)).slideUp("fast",function(){m--;
-if(m===0){b("span",p).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");a.p.gridstate="hidden";b("#gbox_"+b.jgrid.jqID(a.p.id)).hasClass("ui-resizable")&&b(".ui-resizable-handle","#gbox_"+b.jgrid.jqID(a.p.id)).hide();if(f)ea||a.p.onHeaderClick.call(a,a.p.gridstate,e)}});else a.p.gridstate=="hidden"&&b(j,"#gbox_"+b.jgrid.jqID(a.p.id)).slideDown("fast",function(){m--;if(m===0){b("span",p).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");if(ea){a.p.datatype=
-Ja;ka();ea=false}a.p.gridstate="visible";b("#gbox_"+b.jgrid.jqID(a.p.id)).hasClass("ui-resizable")&&b(".ui-resizable-handle","#gbox_"+b.jgrid.jqID(a.p.id)).show();if(f)ea||a.p.onHeaderClick.call(a,a.p.gridstate,e)}});return false});if(ea){a.p.datatype="local";b(".ui-jqgrid-titlebar-close",h.cDiv).trigger("click")}}}else b(h.cDiv).hide();b(h.hDiv).after(h.bDiv).mousemove(function(e){if(h.resizing){h.dragMove(e);return false}});b(".ui-jqgrid-labels",h.hDiv).bind("selectstart",function(){return false});
-b(document).mouseup(function(){if(h.resizing){h.dragEnd();return false}return true});a.formatCol=N;a.sortData=Ea;a.updatepager=function(e,f){var j,m,p,C,s,A,z,u="",w=a.p.pager?"_"+b.jgrid.jqID(a.p.pager.substr(1)):"",r=a.p.toppager?"_"+a.p.toppager.substr(1):"";p=parseInt(a.p.page,10)-1;if(p<0)p=0;p*=parseInt(a.p.rowNum,10);s=p+a.p.reccount;if(a.p.scroll){j=b("tbody:first > tr:gt(0)",a.grid.bDiv);p=s-j.length;a.p.reccount=j.length;if(m=j.outerHeight()||a.grid.prevRowHeight){j=p*m;m*=parseInt(a.p.records,
-10);b(">div:first",a.grid.bDiv).css({height:m}).children("div:first").css({height:j,display:j?"":"none"})}a.grid.bDiv.scrollLeft=a.grid.hDiv.scrollLeft}u=a.p.pager?a.p.pager:"";u+=a.p.toppager?u?","+a.p.toppager:a.p.toppager:"";if(u){z=b.jgrid.formatter.integer||{};j=M(a.p.page);m=M(a.p.lastpage);b(".selbox",u)[this.p.useProp?"prop":"attr"]("disabled",false);if(a.p.pginput===true){b(".ui-pg-input",u).val(a.p.page);C=a.p.toppager?"#sp_1"+w+",#sp_1"+r:"#sp_1"+w;b(C).html(b.fmatter?b.fmatter.util.NumberFormat(a.p.lastpage,
-z):a.p.lastpage)}if(a.p.viewrecords)if(a.p.reccount===0)b(".ui-paging-info",u).html(a.p.emptyrecords);else{C=p+1;A=a.p.records;if(b.fmatter){C=b.fmatter.util.NumberFormat(C,z);s=b.fmatter.util.NumberFormat(s,z);A=b.fmatter.util.NumberFormat(A,z)}b(".ui-paging-info",u).html(b.jgrid.format(a.p.recordtext,C,s,A))}if(a.p.pgbuttons===true){if(j<=0)j=m=0;if(j==1||j===0){b("#first"+w+", #prev"+w).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#first_t"+r+", #prev_t"+r).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#first"+
-w+", #prev"+w).removeClass("ui-state-disabled");a.p.toppager&&b("#first_t"+r+", #prev_t"+r).removeClass("ui-state-disabled")}if(j==m||j===0){b("#next"+w+", #last"+w).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#next_t"+r+", #last_t"+r).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#next"+w+", #last"+w).removeClass("ui-state-disabled");a.p.toppager&&b("#next_t"+r+", #last_t"+r).removeClass("ui-state-disabled")}}}e===true&&a.p.rownumbers===true&&
-b("td.jqgrid-rownum",a.rows).each(function(G){b(this).html(p+1+G)});f&&a.p.jqgdnd&&b(a).jqGrid("gridDnD","updateDnD");b.isFunction(a.p.gridComplete)&&a.p.gridComplete.call(a);b.isFunction(a.p._complete)&&a.p._complete.call(a)};a.refreshIndex=ca;a.setHeadCheckBox=sa;a.formatter=function(e,f,j,m,p){return o(e,f,j,m,p)};b.extend(h,{populate:ka,emptyRows:D});this.grid=h;a.addXmlData=function(e){X(e,a.grid.bDiv)};a.addJSONData=function(e){fa(e,a.grid.bDiv)};this.grid.cols=this.rows[0].cells;ka();a.p.hiddengrid=
-false;b(window).unload(function(){a=null})}}}})};b.jgrid.extend({getGridParam:function(d){var i=this[0];if(i&&i.grid)return d?typeof i.p[d]!="undefined"?i.p[d]:null:i.p},setGridParam:function(d){return this.each(function(){this.grid&&typeof d==="object"&&b.extend(true,this.p,d)})},getDataIDs:function(){var d=[],i=0,g,c=0;this.each(function(){if((g=this.rows.length)&&g>0)for(;i<g;){if(b(this.rows[i]).hasClass("jqgrow")){d[c]=this.rows[i].id;c++}i++}});return d},setSelection:function(d,i){return this.each(function(){function g(x){var y=
-b(c.grid.bDiv)[0].clientHeight,E=b(c.grid.bDiv)[0].scrollTop,I=c.rows[x].offsetTop;x=c.rows[x].clientHeight;if(I+x>=y+E)b(c.grid.bDiv)[0].scrollTop=I-(y+E)+x+E;else if(I<y+E)if(I<E)b(c.grid.bDiv)[0].scrollTop=I}var c=this,h,k,l,a,q;if(d!==undefined){i=i===false?false:true;k=c.rows.namedItem(d+"");if(!(!k||!k.className||k.className.indexOf("ui-state-disabled")>-1)){if(c.p.scrollrows===true){h=c.rows.namedItem(d).rowIndex;h>=0&&g(h)}if(c.p.frozenColumns===true)q=c.p.id+"_frozen";if(c.p.multiselect){c.setHeadCheckBox(false);
-c.p.selrow=k.id;l=b.inArray(c.p.selrow,c.p.selarrrow);if(l===-1){k.className!=="ui-subgrid"&&b(k).addClass("ui-state-highlight").attr("aria-selected","true");h=true;b("#jqg_"+b.jgrid.jqID(c.p.id)+"_"+b.jgrid.jqID(c.p.selrow))[c.p.useProp?"prop":"attr"]("checked",h);c.p.selarrrow.push(c.p.selrow)}else{k.className!=="ui-subgrid"&&b(k).removeClass("ui-state-highlight").attr("aria-selected","false");h=false;b("#jqg_"+b.jgrid.jqID(c.p.id)+"_"+b.jgrid.jqID(c.p.selrow))[c.p.useProp?"prop":"attr"]("checked",
-h);c.p.selarrrow.splice(l,1);a=c.p.selarrrow[0];c.p.selrow=a===undefined?null:a}if(q){l===-1?b("#"+b.jgrid.jqID(d),"#"+b.jgrid.jqID(q)).addClass("ui-state-highlight"):b("#"+b.jgrid.jqID(d),"#"+b.jgrid.jqID(q)).removeClass("ui-state-highlight");b("#jqg_"+b.jgrid.jqID(c.p.id)+"_"+b.jgrid.jqID(d),"#"+b.jgrid.jqID(q))[c.p.useProp?"prop":"attr"]("checked",h)}c.p.onSelectRow&&i&&c.p.onSelectRow.call(c,k.id,h)}else if(k.className!=="ui-subgrid"){if(c.p.selrow!=k.id){b(c.rows.namedItem(c.p.selrow)).removeClass("ui-state-highlight").attr({"aria-selected":"false",
-tabindex:"-1"});b(k).addClass("ui-state-highlight").attr({"aria-selected":"true",tabindex:"0"});if(q){b("#"+b.jgrid.jqID(c.p.selrow),"#"+b.jgrid.jqID(q)).removeClass("ui-state-highlight");b("#"+b.jgrid.jqID(d),"#"+b.jgrid.jqID(q)).addClass("ui-state-highlight")}h=true}else h=false;c.p.selrow=k.id;c.p.onSelectRow&&i&&c.p.onSelectRow.call(c,k.id,h)}}}})},resetSelection:function(d){return this.each(function(){var i=this,g,c;if(typeof d!=="undefined"){c=d===i.p.selrow?i.p.selrow:d;b("#"+b.jgrid.jqID(i.p.id)+
-" tbody:first tr#"+b.jgrid.jqID(c)).removeClass("ui-state-highlight").attr("aria-selected","false");if(i.p.multiselect){b("#jqg_"+b.jgrid.jqID(i.p.id)+"_"+b.jgrid.jqID(c))[i.p.useProp?"prop":"attr"]("checked",false);i.setHeadCheckBox(false)}c=null}else if(i.p.multiselect){b(i.p.selarrrow).each(function(h,k){g=i.rows.namedItem(k);b(g).removeClass("ui-state-highlight").attr("aria-selected","false");b("#jqg_"+b.jgrid.jqID(i.p.id)+"_"+b.jgrid.jqID(k))[i.p.useProp?"prop":"attr"]("checked",false)});i.setHeadCheckBox(false);
-i.p.selarrrow=[]}else if(i.p.selrow){b("#"+b.jgrid.jqID(i.p.id)+" tbody:first tr#"+b.jgrid.jqID(i.p.selrow)).removeClass("ui-state-highlight").attr("aria-selected","false");i.p.selrow=null}if(i.p.cellEdit===true)if(parseInt(i.p.iCol,10)>=0&&parseInt(i.p.iRow,10)>=0){b("td:eq("+i.p.iCol+")",i.rows[i.p.iRow]).removeClass("edit-cell ui-state-highlight");b(i.rows[i.p.iRow]).removeClass("selected-row ui-state-hover")}i.p.savedRow=[]})},getRowData:function(d){var i={},g,c=false,h,k=0;this.each(function(){var l=
-this,a,q;if(typeof d=="undefined"){c=true;g=[];h=l.rows.length}else{q=l.rows.namedItem(d);if(!q)return i;h=2}for(;k<h;){if(c)q=l.rows[k];if(b(q).hasClass("jqgrow")){b("td",q).each(function(x){a=l.p.colModel[x].name;if(a!=="cb"&&a!=="subgrid"&&a!=="rn")if(l.p.treeGrid===true&&a==l.p.ExpandColumn)i[a]=b.jgrid.htmlDecode(b("span:first",this).html());else try{i[a]=b.unformat(this,{rowId:q.id,colModel:l.p.colModel[x]},x)}catch(y){i[a]=b.jgrid.htmlDecode(b(this).html())}});if(c){g.push(i);i={}}}k++}});
-return g?g:i},delRowData:function(d){var i=false,g,c;this.each(function(){if(g=this.rows.namedItem(d)){b(g).remove();this.p.records--;this.p.reccount--;this.updatepager(true,false);i=true;if(this.p.multiselect){c=b.inArray(d,this.p.selarrrow);c!=-1&&this.p.selarrrow.splice(c,1)}if(d==this.p.selrow)this.p.selrow=null}else return false;if(this.p.datatype=="local"){var h=this.p._index[d];if(typeof h!="undefined"){this.p.data.splice(h,1);this.refreshIndex()}}if(this.p.altRows===true&&i){var k=this.p.altclass;
-b(this.rows).each(function(l){l%2==1?b(this).addClass(k):b(this).removeClass(k)})}});return i},setRowData:function(d,i,g){var c,h=true,k;this.each(function(){if(!this.grid)return false;var l=this,a,q,x=typeof g,y={};q=l.rows.namedItem(d);if(!q)return false;if(i)try{b(this.p.colModel).each(function(N){c=this.name;if(i[c]!==undefined){y[c]=this.formatter&&typeof this.formatter==="string"&&this.formatter=="date"?b.unformat.date(i[c],this):i[c];a=l.formatter(d,i[c],N,i,"edit");k=this.title?{title:b.jgrid.stripHtml(a)}:
-{};l.p.treeGrid===true&&c==l.p.ExpandColumn?b("td:eq("+N+") > span:first",q).html(a).attr(k):b("td:eq("+N+")",q).html(a).attr(k)}});if(l.p.datatype=="local"){var E=l.p._index[d];if(l.p.treeGrid)for(var I in l.p.treeReader)y.hasOwnProperty(l.p.treeReader[I])&&delete y[l.p.treeReader[I]];if(typeof E!="undefined")l.p.data[E]=b.extend(true,l.p.data[E],y);y=null}}catch(M){h=false}if(h){if(x==="string")b(q).addClass(g);else x==="object"&&b(q).css(g);b.isFunction(l.p._complete)&&l.p._complete.call(l)}});
-return h},addRowData:function(d,i,g,c){g||(g="last");var h=false,k,l,a,q,x,y,E,I,M="",N,V,o,n,t;if(i){if(b.isArray(i)){N=true;g="last";V=d}else{i=[i];N=false}this.each(function(){var F=i.length;x=this.p.rownumbers===true?1:0;a=this.p.multiselect===true?1:0;q=this.p.subGrid===true?1:0;if(!N)if(typeof d!="undefined")d+="";else{d=b.jgrid.randId();if(this.p.keyIndex!==false){V=this.p.colModel[this.p.keyIndex+a+q+x].name;if(typeof i[0][V]!="undefined")d=i[0][V]}}o=this.p.altclass;for(var T=0,J="",D={},
-ca=b.isFunction(this.p.afterInsertRow)?true:false;T<F;){n=i[T];l="";if(N){try{d=n[V]}catch(X){d=b.jgrid.randId()}J=this.p.altRows===true?(this.rows.length-1)%2===0?o:"":""}d=this.p.idPrefix+d;if(x){M=this.formatCol(0,1,"",null,d,true);l+='<td role="gridcell" aria-describedby="'+this.p.id+'_rn" class="ui-state-default jqgrid-rownum" '+M+">0</td>"}if(a){I='<input role="checkbox" type="checkbox" id="jqg_'+this.p.id+"_"+d+'" class="cbox"/>';M=this.formatCol(x,1,"",null,d,true);l+='<td role="gridcell" aria-describedby="'+
-this.p.id+'_cb" '+M+">"+I+"</td>"}if(q)l+=b(this).jqGrid("addSubGridCell",a+x,1);for(E=a+q+x;E<this.p.colModel.length;E++){t=this.p.colModel[E];k=t.name;D[k]=t.formatter&&typeof t.formatter==="string"&&t.formatter=="date"?b.unformat.date(n[k],t):n[k];I=this.formatter(d,b.jgrid.getAccessor(n,k),E,n,"edit");M=this.formatCol(E,1,I,n,d,true);l+='<td role="gridcell" aria-describedby="'+this.p.id+"_"+k+'" '+M+">"+I+"</td>"}l='<tr id="'+d+'" role="row" tabindex="-1" class="ui-widget-content jqgrow ui-row-'+
-this.p.direction+" "+J+'">'+l+"</tr>";if(this.rows.length===0)b("table:first",this.grid.bDiv).append(l);else switch(g){case "last":b(this.rows[this.rows.length-1]).after(l);y=this.rows.length-1;break;case "first":b(this.rows[0]).after(l);y=1;break;case "after":if(y=this.rows.namedItem(c))b(this.rows[y.rowIndex+1]).hasClass("ui-subgrid")?b(this.rows[y.rowIndex+1]).after(l):b(y).after(l);y++;break;case "before":if(y=this.rows.namedItem(c)){b(y).before(l);y=y.rowIndex}y--}this.p.subGrid===true&&b(this).jqGrid("addSubGrid",
-a+x,y);this.p.records++;this.p.reccount++;ca&&this.p.afterInsertRow.call(this,d,n,n);T++;if(this.p.datatype=="local"){D[this.p.localReader.id]=d;this.p._index[d]=this.p.data.length;this.p.data.push(D);D={}}}if(this.p.altRows===true&&!N)if(g=="last")(this.rows.length-1)%2==1&&b(this.rows[this.rows.length-1]).addClass(o);else b(this.rows).each(function(fa){fa%2==1?b(this).addClass(o):b(this).removeClass(o)});this.updatepager(true,true);h=true})}return h},footerData:function(d,i,g){function c(q){for(var x in q)if(q.hasOwnProperty(x))return false;
-return true}var h,k=false,l={},a;if(typeof d=="undefined")d="get";if(typeof g!="boolean")g=true;d=d.toLowerCase();this.each(function(){var q=this,x;if(!q.grid||!q.p.footerrow)return false;if(d=="set")if(c(i))return false;k=true;b(this.p.colModel).each(function(y){h=this.name;if(d=="set"){if(i[h]!==undefined){x=g?q.formatter("",i[h],y,i,"edit"):i[h];a=this.title?{title:b.jgrid.stripHtml(x)}:{};b("tr.footrow td:eq("+y+")",q.grid.sDiv).html(x).attr(a);k=true}}else if(d=="get")l[h]=b("tr.footrow td:eq("+
-y+")",q.grid.sDiv).html()})});return d=="get"?l:k},showHideCol:function(d,i){return this.each(function(){var g=this,c=false,h=b.browser.webkit||b.browser.safari?0:g.p.cellLayout,k;if(g.grid){if(typeof d==="string")d=[d];i=i!="none"?"":"none";var l=i===""?true:false,a=g.p.groupHeader&&(typeof g.p.groupHeader==="object"||b.isFunction(g.p.groupHeader));a&&b(g).jqGrid("destroyGroupHeader",false);b(this.p.colModel).each(function(q){if(b.inArray(this.name,d)!==-1&&this.hidden===l){if(g.p.frozenColumns===
-true&&this.frozen===true)return true;b("tr",g.grid.hDiv).each(function(){b(this.cells[q]).css("display",i)});b(g.rows).each(function(){b(this.cells[q]).css("display",i)});g.p.footerrow&&b("tr.footrow td:eq("+q+")",g.grid.sDiv).css("display",i);k=this.widthOrg?this.widthOrg:parseInt(this.width,10);if(i==="none")g.p.tblwidth-=k+h;else g.p.tblwidth+=k+h;this.hidden=!l;c=true}});if(c===true)b(g).jqGrid("setGridWidth",g.p.shrinkToFit===true?g.p.tblwidth:g.p.width);a&&b(g).jqGrid("setGroupHeaders",g.p.groupHeader)}})},
-hideCol:function(d){return this.each(function(){b(this).jqGrid("showHideCol",d,"none")})},showCol:function(d){return this.each(function(){b(this).jqGrid("showHideCol",d,"")})},remapColumns:function(d,i,g){function c(l){var a;a=l.length?b.makeArray(l):b.extend({},l);b.each(d,function(q){l[q]=a[this]})}function h(l,a){b(">tr"+(a||""),l).each(function(){var q=this,x=b.makeArray(q.cells);b.each(d,function(){var y=x[this];y&&q.appendChild(y)})})}var k=this.get(0);c(k.p.colModel);c(k.p.colNames);c(k.grid.headers);
-h(b("thead:first",k.grid.hDiv),g&&":not(.ui-jqgrid-labels)");i&&h(b("#"+b.jgrid.jqID(k.p.id)+" tbody:first"),".jqgfirstrow, tr.jqgrow, tr.jqfoot");k.p.footerrow&&h(b("tbody:first",k.grid.sDiv));if(k.p.remapColumns)if(k.p.remapColumns.length)c(k.p.remapColumns);else k.p.remapColumns=b.makeArray(d);k.p.lastsort=b.inArray(k.p.lastsort,d);if(k.p.treeGrid)k.p.expColInd=b.inArray(k.p.expColInd,d)},setGridWidth:function(d,i){return this.each(function(){if(this.grid){var g=this,c,h=0,k=b.browser.webkit||
-b.browser.safari?0:g.p.cellLayout,l,a=0,q=false,x=g.p.scrollOffset,y,E=0,I=0,M;if(typeof i!="boolean")i=g.p.shrinkToFit;if(!isNaN(d)){d=parseInt(d,10);g.grid.width=g.p.width=d;b("#gbox_"+b.jgrid.jqID(g.p.id)).css("width",d+"px");b("#gview_"+b.jgrid.jqID(g.p.id)).css("width",d+"px");b(g.grid.bDiv).css("width",d+"px");b(g.grid.hDiv).css("width",d+"px");g.p.pager&&b(g.p.pager).css("width",d+"px");g.p.toppager&&b(g.p.toppager).css("width",d+"px");if(g.p.toolbar[0]===true){b(g.grid.uDiv).css("width",d+
-"px");g.p.toolbar[1]=="both"&&b(g.grid.ubDiv).css("width",d+"px")}g.p.footerrow&&b(g.grid.sDiv).css("width",d+"px");if(i===false&&g.p.forceFit===true)g.p.forceFit=false;if(i===true){b.each(g.p.colModel,function(){if(this.hidden===false){c=this.widthOrg?this.widthOrg:parseInt(this.width,10);h+=c+k;if(this.fixed)E+=c+k;else a++;I++}});if(a===0)return;g.p.tblwidth=h;y=d-k*a-E;if(!isNaN(g.p.height))if(b(g.grid.bDiv)[0].clientHeight<b(g.grid.bDiv)[0].scrollHeight||g.rows.length===1){q=true;y-=x}h=0;var N=
-g.grid.cols.length>0;b.each(g.p.colModel,function(V){if(this.hidden===false&&!this.fixed){c=this.widthOrg?this.widthOrg:parseInt(this.width,10);c=Math.round(y*c/(g.p.tblwidth-k*a-E));if(!(c<0)){this.width=c;h+=c;g.grid.headers[V].width=c;g.grid.headers[V].el.style.width=c+"px";if(g.p.footerrow)g.grid.footers[V].style.width=c+"px";if(N)g.grid.cols[V].style.width=c+"px";l=V}}});if(!l)return;M=0;if(q){if(d-E-(h+k*a)!==x)M=d-E-(h+k*a)-x}else if(Math.abs(d-E-(h+k*a))!==1)M=d-E-(h+k*a);g.p.colModel[l].width+=
-M;g.p.tblwidth=h+M+k*a+E;if(g.p.tblwidth>d){q=g.p.tblwidth-parseInt(d,10);g.p.tblwidth=d;c=g.p.colModel[l].width-=q}else c=g.p.colModel[l].width;g.grid.headers[l].width=c;g.grid.headers[l].el.style.width=c+"px";if(N)g.grid.cols[l].style.width=c+"px";if(g.p.footerrow)g.grid.footers[l].style.width=c+"px"}if(g.p.tblwidth){b("table:first",g.grid.bDiv).css("width",g.p.tblwidth+"px");b("table:first",g.grid.hDiv).css("width",g.p.tblwidth+"px");g.grid.hDiv.scrollLeft=g.grid.bDiv.scrollLeft;g.p.footerrow&&
-b("table:first",g.grid.sDiv).css("width",g.p.tblwidth+"px")}}}})},setGridHeight:function(d){return this.each(function(){if(this.grid){var i=b(this.grid.bDiv);i.css({height:d+(isNaN(d)?"":"px")});this.p.frozenColumns===true&&b("#"+this.p.id+"_frozen").parent().height(i.height()-16);this.p.height=d;this.p.scroll&&this.grid.populateVisible()}})},setCaption:function(d){return this.each(function(){this.p.caption=d;b("span.ui-jqgrid-title, span.ui-jqgrid-title-rtl",this.grid.cDiv).html(d);b(this.grid.cDiv).show()})},
-setLabel:function(d,i,g,c){return this.each(function(){var h=-1;if(this.grid)if(typeof d!="undefined"){b(this.p.colModel).each(function(a){if(this.name==d){h=a;return false}});if(h>=0){var k=b("tr.ui-jqgrid-labels th:eq("+h+")",this.grid.hDiv);if(i){var l=b(".s-ico",k);b("[id^=jqgh_]",k).empty().html(i).append(l);this.p.colNames[h]=i}if(g)typeof g==="string"?b(k).addClass(g):b(k).css(g);typeof c==="object"&&b(k).attr(c)}}})},setCell:function(d,i,g,c,h,k){return this.each(function(){var l=-1,a,q;if(this.grid){if(isNaN(i))b(this.p.colModel).each(function(y){if(this.name==
-i){l=y;return false}});else l=parseInt(i,10);if(l>=0)if(a=this.rows.namedItem(d)){var x=b("td:eq("+l+")",a);if(g!==""||k===true){a=this.formatter(d,g,l,a,"edit");q=this.p.colModel[l].title?{title:b.jgrid.stripHtml(a)}:{};this.p.treeGrid&&b(".tree-wrap",b(x)).length>0?b("span",b(x)).html(a).attr(q):b(x).html(a).attr(q);if(this.p.datatype=="local"){a=this.p.colModel[l];g=a.formatter&&typeof a.formatter==="string"&&a.formatter=="date"?b.unformat.date(g,a):g;q=this.p._index[d];if(typeof q!="undefined")this.p.data[q][a.name]=
-g}}if(typeof c==="string")b(x).addClass(c);else c&&b(x).css(c);typeof h==="object"&&b(x).attr(h)}}})},getCell:function(d,i){var g=false;this.each(function(){var c=-1;if(this.grid){if(isNaN(i))b(this.p.colModel).each(function(l){if(this.name===i){c=l;return false}});else c=parseInt(i,10);if(c>=0){var h=this.rows.namedItem(d);if(h)try{g=b.unformat(b("td:eq("+c+")",h),{rowId:h.id,colModel:this.p.colModel[c]},c)}catch(k){g=b.jgrid.htmlDecode(b("td:eq("+c+")",h).html())}}}});return g},getCol:function(d,
-i,g){var c=[],h,k=0,l,a,q;i=typeof i!="boolean"?false:i;if(typeof g=="undefined")g=false;this.each(function(){var x=-1;if(this.grid){if(isNaN(d))b(this.p.colModel).each(function(M){if(this.name===d){x=M;return false}});else x=parseInt(d,10);if(x>=0){var y=this.rows.length,E=0;if(y&&y>0){for(;E<y;){if(b(this.rows[E]).hasClass("jqgrow")){try{h=b.unformat(b(this.rows[E].cells[x]),{rowId:this.rows[E].id,colModel:this.p.colModel[x]},x)}catch(I){h=b.jgrid.htmlDecode(this.rows[E].cells[x].innerHTML)}if(g){q=
-parseFloat(h);k+=q;if(E===0)a=l=q;else{l=Math.min(l,q);a=Math.max(a,q)}}else i?c.push({id:this.rows[E].id,value:h}):c.push(h)}E++}if(g)switch(g.toLowerCase()){case "sum":c=k;break;case "avg":c=k/y;break;case "count":c=y;break;case "min":c=l;break;case "max":c=a}}}}});return c},clearGridData:function(d){return this.each(function(){if(this.grid){if(typeof d!="boolean")d=false;if(this.p.deepempty)b("#"+b.jgrid.jqID(this.p.id)+" tbody:first tr:gt(0)").remove();else{var i=b("#"+b.jgrid.jqID(this.p.id)+
-" tbody:first tr:first")[0];b("#"+b.jgrid.jqID(this.p.id)+" tbody:first").empty().append(i)}this.p.footerrow&&d&&b(".ui-jqgrid-ftable td",this.grid.sDiv).html("&#160;");this.p.selrow=null;this.p.selarrrow=[];this.p.savedRow=[];this.p.records=0;this.p.page=1;this.p.lastpage=0;this.p.reccount=0;this.p.data=[];this.p._index={};this.updatepager(true,false)}})},getInd:function(d,i){var g=false,c;this.each(function(){if(c=this.rows.namedItem(d))g=i===true?c:c.rowIndex});return g},bindKeys:function(d){var i=
-b.extend({onEnter:null,onSpace:null,onLeftKey:null,onRightKey:null,scrollingRows:true},d||{});return this.each(function(){var g=this;b("body").is("[role]")||b("body").attr("role","application");g.p.scrollrows=i.scrollingRows;b(g).keydown(function(c){var h=b(g).find("tr[tabindex=0]")[0],k,l,a,q=g.p.treeReader.expanded_field;if(h){a=g.p._index[h.id];if(c.keyCode===37||c.keyCode===38||c.keyCode===39||c.keyCode===40){if(c.keyCode===38){l=h.previousSibling;k="";if(l)if(b(l).is(":hidden"))for(;l;){l=l.previousSibling;
-if(!b(l).is(":hidden")&&b(l).hasClass("jqgrow")){k=l.id;break}}else k=l.id;b(g).jqGrid("setSelection",k)}if(c.keyCode===40){l=h.nextSibling;k="";if(l)if(b(l).is(":hidden"))for(;l;){l=l.nextSibling;if(!b(l).is(":hidden")&&b(l).hasClass("jqgrow")){k=l.id;break}}else k=l.id;b(g).jqGrid("setSelection",k)}if(c.keyCode===37){g.p.treeGrid&&g.p.data[a][q]&&b(h).find("div.treeclick").trigger("click");b.isFunction(i.onLeftKey)&&i.onLeftKey.call(g,g.p.selrow)}if(c.keyCode===39){g.p.treeGrid&&!g.p.data[a][q]&&
-b(h).find("div.treeclick").trigger("click");b.isFunction(i.onRightKey)&&i.onRightKey.call(g,g.p.selrow)}}else if(c.keyCode===13)b.isFunction(i.onEnter)&&i.onEnter.call(g,g.p.selrow);else c.keyCode===32&&b.isFunction(i.onSpace)&&i.onSpace.call(g,g.p.selrow)}})})},unbindKeys:function(){return this.each(function(){b(this).unbind("keydown")})},getLocalRow:function(d){var i=false,g;this.each(function(){if(typeof d!=="undefined"){g=this.p._index[d];if(g>=0)i=this.p.data[g]}});return i}})})(jQuery);
-(function(b){b.fmatter={};b.extend(b.fmatter,{isBoolean:function(a){return typeof a==="boolean"},isObject:function(a){return a&&(typeof a==="object"||b.isFunction(a))||false},isString:function(a){return typeof a==="string"},isNumber:function(a){return typeof a==="number"&&isFinite(a)},isNull:function(a){return a===null},isUndefined:function(a){return typeof a==="undefined"},isValue:function(a){return this.isObject(a)||this.isString(a)||this.isNumber(a)||this.isBoolean(a)},isEmpty:function(a){if(!this.isString(a)&&
-this.isValue(a))return false;else if(!this.isValue(a))return true;a=b.trim(a).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,"");return a===""}});b.fn.fmatter=function(a,c,d,f,g){var e=c;d=b.extend({},b.jgrid.formatter,d);if(b.fn.fmatter[a])e=b.fn.fmatter[a](c,d,f,g);return e};b.fmatter.util={NumberFormat:function(a,c){b.fmatter.isNumber(a)||(a*=1);if(b.fmatter.isNumber(a)){var d=a<0,f=a+"",g=c.decimalSeparator?c.decimalSeparator:".",e;if(b.fmatter.isNumber(c.decimalPlaces)){var h=c.decimalPlaces;
-f=Math.pow(10,h);f=Math.round(a*f)/f+"";e=f.lastIndexOf(".");if(h>0){if(e<0){f+=g;e=f.length-1}else if(g!==".")f=f.replace(".",g);for(;f.length-1-e<h;)f+="0"}}if(c.thousandsSeparator){h=c.thousandsSeparator;e=f.lastIndexOf(g);e=e>-1?e:f.length;g=f.substring(e);for(var i=-1,j=e;j>0;j--){i++;if(i%3===0&&j!==e&&(!d||j>1))g=h+g;g=f.charAt(j-1)+g}f=g}f=c.prefix?c.prefix+f:f;return f=c.suffix?f+c.suffix:f}else return a},DateFormat:function(a,c,d,f){var g=/^\/Date\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\)\/$/,
-e=typeof c==="string"?c.match(g):null;g=function(m,r){m=String(m);for(r=parseInt(r,10)||2;m.length<r;)m="0"+m;return m};var h={m:1,d:1,y:1970,h:0,i:0,s:0,u:0},i=0,j,k=["i18n"];k.i18n={dayNames:f.dayNames,monthNames:f.monthNames};if(a in f.masks)a=f.masks[a];if(!isNaN(c-0)&&String(a).toLowerCase()=="u")i=new Date(parseFloat(c)*1E3);else if(c.constructor===Date)i=c;else if(e!==null){i=new Date(parseInt(e[1],10));if(e[3]){a=Number(e[5])*60+Number(e[6]);a*=e[4]=="-"?1:-1;a-=i.getTimezoneOffset();i.setTime(Number(Number(i)+
-a*6E4))}}else{c=String(c).split(/[\\\/:_;.,\t\T\s-]/);a=a.split(/[\\\/:_;.,\t\T\s-]/);e=0;for(j=a.length;e<j;e++){if(a[e]=="M"){i=b.inArray(c[e],k.i18n.monthNames);if(i!==-1&&i<12)c[e]=i+1}if(a[e]=="F"){i=b.inArray(c[e],k.i18n.monthNames);if(i!==-1&&i>11)c[e]=i+1-12}if(c[e])h[a[e].toLowerCase()]=parseInt(c[e],10)}if(h.f)h.m=h.f;if(h.m===0&&h.y===0&&h.d===0)return"&#160;";h.m=parseInt(h.m,10)-1;i=h.y;if(i>=70&&i<=99)h.y=1900+h.y;else if(i>=0&&i<=69)h.y=2E3+h.y;i=new Date(h.y,h.m,h.d,h.h,h.i,h.s,h.u)}if(d in
-f.masks)d=f.masks[d];else d||(d="Y-m-d");a=i.getHours();c=i.getMinutes();h=i.getDate();e=i.getMonth()+1;j=i.getTimezoneOffset();var l=i.getSeconds(),n=i.getMilliseconds(),o=i.getDay(),p=i.getFullYear(),q=(o+6)%7+1,s=(new Date(p,e-1,h)-new Date(p,0,1))/864E5,t={d:g(h),D:k.i18n.dayNames[o],j:h,l:k.i18n.dayNames[o+7],N:q,S:f.S(h),w:o,z:s,W:q<5?Math.floor((s+q-1)/7)+1:Math.floor((s+q-1)/7)||(((new Date(p-1,0,1)).getDay()+6)%7<4?53:52),F:k.i18n.monthNames[e-1+12],m:g(e),M:k.i18n.monthNames[e-1],n:e,t:"?",
-L:"?",o:"?",Y:p,y:String(p).substring(2),a:a<12?f.AmPm[0]:f.AmPm[1],A:a<12?f.AmPm[2]:f.AmPm[3],B:"?",g:a%12||12,G:a,h:g(a%12||12),H:g(a),i:g(c),s:g(l),u:n,e:"?",I:"?",O:(j>0?"-":"+")+g(Math.floor(Math.abs(j)/60)*100+Math.abs(j)%60,4),P:"?",T:(String(i).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g)||[""]).pop().replace(/[^-+\dA-Z]/g,""),Z:"?",c:"?",r:"?",U:Math.floor(i/1E3)};return d.replace(/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,
-function(m){return m in t?t[m]:m.substring(1)})}};b.fn.fmatter.defaultFormat=function(a,c){return b.fmatter.isValue(a)&&a!==""?a:c.defaultValue?c.defaultValue:"&#160;"};b.fn.fmatter.email=function(a,c){return b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):'<a href="mailto:'+a+'">'+a+"</a>"};b.fn.fmatter.checkbox=function(a,c){var d=b.extend({},c.checkbox),f;b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));f=d.disabled===true?'disabled="disabled"':
-"";if(b.fmatter.isEmpty(a)||b.fmatter.isUndefined(a))a=b.fn.fmatter.defaultFormat(a,d);a+="";a=a.toLowerCase();return'<input type="checkbox" '+(a.search(/(false|0|no|off)/i)<0?" checked='checked' ":"")+' value="'+a+'" offval="no" '+f+"/>"};b.fn.fmatter.link=function(a,c){var d={target:c.target},f="";b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(d.target)f="target="+d.target;return b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):"<a "+f+' href="'+
-a+'">'+a+"</a>"};b.fn.fmatter.showlink=function(a,c){var d={baseLinkUrl:c.baseLinkUrl,showAction:c.showAction,addParam:c.addParam||"",target:c.target,idName:c.idName},f="";b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(d.target)f="target="+d.target;d=d.baseLinkUrl+d.showAction+"?"+d.idName+"="+c.rowId+d.addParam;return b.fmatter.isString(a)||b.fmatter.isNumber(a)?"<a "+f+' href="'+d+'">'+a+"</a>":b.fn.fmatter.defaultFormat(a,c)};b.fn.fmatter.integer=
-function(a,c){var d=b.extend({},c.integer);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.number=function(a,c){var d=b.extend({},c.number);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.currency=function(a,c){var d=
-b.extend({},c.currency);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.date=function(a,c,d,f){d=b.extend({},c.date);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));return!d.reformatAfterEdit&&f=="edit"?b.fn.fmatter.defaultFormat(a,c):b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):b.fmatter.util.DateFormat(d.srcformat,
-a,d.newformat,d)};b.fn.fmatter.select=function(a,c){a+="";var d=false,f=[],g;if(b.fmatter.isUndefined(c.colModel.formatoptions)){if(!b.fmatter.isUndefined(c.colModel.editoptions)){d=c.colModel.editoptions.value;g=c.colModel.editoptions.separator===undefined?":":c.colModel.editoptions.separator}}else{d=c.colModel.formatoptions.value;g=c.colModel.formatoptions.separator===undefined?":":c.colModel.formatoptions.separator}if(d){var e=c.colModel.editoptions.multiple===true?true:false,h=[],i;if(e){h=a.split(",");
-h=b.map(h,function(n){return b.trim(n)})}if(b.fmatter.isString(d))for(var j=d.split(";"),k=0,l=0;l<j.length;l++){i=j[l].split(g);if(i.length>2)i[1]=jQuery.map(i,function(n,o){if(o>0)return n}).join(":");if(e){if(jQuery.inArray(i[0],h)>-1){f[k]=i[1];k++}}else if(b.trim(i[0])==b.trim(a)){f[0]=i[1];break}}else if(b.fmatter.isObject(d))if(e)f=jQuery.map(h,function(n){return d[n]});else f[0]=d[a]||""}a=f.join(", ");return a===""?b.fn.fmatter.defaultFormat(a,c):a};b.fn.fmatter.rowactions=function(a,c,d,
-f){var g={keys:false,onEdit:null,onSuccess:null,afterSave:null,onError:null,afterRestore:null,extraparam:{},url:null,delOptions:{},editOptions:{}};a=b.jgrid.jqID(a);c=b.jgrid.jqID(c);f=b("#"+c)[0].p.colModel[f];b.fmatter.isUndefined(f.formatoptions)||(g=b.extend(g,f.formatoptions));if(!b.fmatter.isUndefined(b("#"+c)[0].p.editOptions))g.editOptions=b("#"+c)[0].p.editOptions;if(!b.fmatter.isUndefined(b("#"+c)[0].p.delOptions))g.delOptions=b("#"+c)[0].p.delOptions;var e=b("#"+c)[0];f=function(j,k){g.afterSave&&
-g.afterSave.call(e,j,k);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide()};var h=function(j){g.afterRestore&&g.afterRestore.call(e,j);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide()};if(b("#"+a,
-"#"+c).hasClass("jqgrid-new-row")){var i=e.p.prmNames;g.extraparam[i.oper]=i.addoper}switch(d){case "edit":b("#"+c).jqGrid("editRow",a,g.keys,g.onEdit,g.onSuccess,g.url,g.extraparam,f,g.onError,h);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").hide();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").show();b.isFunction(e.p._complete)&&e.p._complete.call(e);break;case "save":if(b("#"+c).jqGrid("saveRow",a,g.onSuccess,
-g.url,g.extraparam,f,g.onError,h)){b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide();b.isFunction(e.p._complete)&&e.p._complete.call(e)}break;case "cancel":b("#"+c).jqGrid("restoreRow",a,h);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel",
-"#"+c+".ui-jqgrid-btable:first").hide();b.isFunction(e.p._complete)&&e.p._complete.call(e);break;case "del":b("#"+c).jqGrid("delGridRow",a,g.delOptions);break;case "formedit":b("#"+c).jqGrid("setSelection",a);b("#"+c).jqGrid("editGridRow",a,g.editOptions)}};b.fn.fmatter.actions=function(a,c){var d={keys:false,editbutton:true,delbutton:true,editformbutton:false};b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend(d,c.colModel.formatoptions));var f=c.rowId,g="",e;if(typeof f=="undefined"||
-b.fmatter.isEmpty(f))return"";if(d.editformbutton){e="onclick=jQuery.fn.fmatter.rowactions('"+f+"','"+c.gid+"','formedit',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";g=g+"<div title='"+b.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+e+"><span class='ui-icon ui-icon-pencil'></span></div>"}else if(d.editbutton){e="onclick=jQuery.fn.fmatter.rowactions('"+f+"','"+c.gid+"','edit',"+
-c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover') ";g=g+"<div title='"+b.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+e+"><span class='ui-icon ui-icon-pencil'></span></div>"}if(d.delbutton){e="onclick=jQuery.fn.fmatter.rowactions('"+f+"','"+c.gid+"','del',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";g=g+"<div title='"+

[... 825 lines stripped ...]


Mime
View raw message