diff --git a/js/grid.subgrid.js b/js/grid.subgrid.js index 6586a35ee..980a79602 100644 --- a/js/grid.subgrid.js +++ b/js/grid.subgrid.js @@ -226,7 +226,7 @@ addSubGrid : function( pos, sind ) { var tr = $(this).parent("tr")[0]; pID = ts.p.id; _id = tr.id; - $r = $("#" + pID + "_" + _id + "_expandedContent"); + $r = $("#" + $.jgrid.jqID( pID + "_" + _id + "_expandedContent" ) ); if($(this).hasClass("sgcollapsed")) { bfsc = $(ts).triggerHandler("jqGridSubGridBeforeExpand", [pID + "_" + _id, _id]); bfsc = (bfsc === false || bfsc === 'stop') ? false : true; diff --git a/js/jquery.jqGrid.js b/js/jquery.jqGrid.js index 580e2c092..b3f23d2de 100644 --- a/js/jquery.jqGrid.js +++ b/js/jquery.jqGrid.js @@ -1,6 +1,6 @@ /** * -* @license Guriddo jqGrid JS - v5.8.8 - 2024-08-05 +* @license Guriddo jqGrid JS - v5.8.8 - 2024-08-20 * Copyright(c) 2008, Tony Tomov, tony@trirand.com * * License: http://guriddo.net/?page_id=103334 @@ -18358,7 +18358,7 @@ addSubGrid : function( pos, sind ) { var tr = $(this).parent("tr")[0]; pID = ts.p.id; _id = tr.id; - $r = $("#" + pID + "_" + _id + "_expandedContent"); + $r = $("#" + $.jgrid.jqID( pID + "_" + _id + "_expandedContent" ) ); if($(this).hasClass("sgcollapsed")) { bfsc = $(ts).triggerHandler("jqGridSubGridBeforeExpand", [pID + "_" + _id, _id]); bfsc = (bfsc === false || bfsc === 'stop') ? false : true; diff --git a/js/jquery.jqGrid.min.js b/js/jquery.jqGrid.min.js index 06c18fcd9..47acdb884 100644 --- a/js/jquery.jqGrid.min.js +++ b/js/jquery.jqGrid.min.js @@ -1,9 +1,9 @@ /** * -* @license Guriddo jqGrid JS - v5.8.8 - 2024-08-05 +* @license Guriddo jqGrid JS - v5.8.8 - 2024-08-20 * Copyright(c) 2008, Tony Tomov, tony@trirand.com * * License: http://guriddo.net/?page_id=103334 */ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(Oe){Oe.jgrid=Oe.jgrid||{},Oe.jgrid.hasOwnProperty("defaults")||(Oe.jgrid.defaults={}),Oe.extend(Oe.jgrid,{version:"5.8.8",isNull:function(e,t){return t&&!0===t?null===e:null==e},trim:function(e){return"string"==typeof e?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e},isFunction:function(e){return"function"==typeof e},type:function(e,t){return t?null===e?"[object Null]":Object.prototype.toString.call(e):null==e?(e+"").toLowerCase():"generatorfunction"===(t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase())?"function":t.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/)?t:"object"==typeof e||"function"==typeof e?"object":typeof e},floatNum:function(e,t){return void 0===t&&(t=0),e=parseFloat(e),isNaN(e)?t:e},htmlDecode:function(e){return e&&(" "===e||" "===e||1===e.length&&160===e.charCodeAt(0))?"":e&&String(e).replace(/>/g,">").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},htmlEncode:function(e){return e&&String(e).replace(/&/g,"&").replace(/\"/g,""").replace(//g,">")},template:function(e){var o,a=Oe.makeArray(arguments).slice(1),n=a.length;return(e=Oe.jgrid.isNull(e)?"":e).replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){if(!isNaN(parseInt(t,10)))return a[parseInt(t,10)];for(o=0;o])*>/gi,""))&&" "!==e&&" "!==e?e.replace(/\"/g,"'"):"")},stripPref:function(e,t){var r=Oe.jgrid.type(e);return t="string"!==r&&"number"!==r?t:""!==(e=String(e))?String(t).replace(String(e),""):t},stripScript:function(e){return e.replace(/)<[^<]*)*<\/script>/gi," ")},useJSON:!0,runCode:function(e){return Function('"use strict";return ('+e+")")()},parse:function(e){e=(e="/*"===(e="while(1);"===(e=e).slice(0,9)?e.slice(9):e).slice(0,2)?e.slice(2,e.length-2):e)||"{}";return!0===Oe.jgrid.useJSON&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(e):Oe.jgrid.runCode(e)},dateToOADate:function(e){var t=new Date(e);return Math.round((t.setHours(0,0,0,0)-new Date(1899,11,30))/864e5)+(Math.abs((e-t)%864e5)/864e5).toFixed(10).slice(1)},parseDate:function(e,t,r,i){function o(e,t){for(e=String(e),t=parseInt(t,10)||2;e.length?@\[\\\]\^`{|}~]/g,"\\$&")},guid:1,uidPref:"jqg",randId:function(e){return(e||Oe.jgrid.uidPref)+Oe.jgrid.guid++},getAccessor:function(e,t){var r,i,o=[];if("function"==typeof t)return t(e);if(void 0===(r=e[t]))try{if(i=(o="string"==typeof t?t.split("."):o).length)for(r=e;r&&i--;)r=r[o.shift()]}catch(e){}return r},getXmlData:function(e,t,r){var i="string"==typeof t?t.match(/^(.*)\[(\w+)\]$/):null;return"function"==typeof t?t(e):i&&i[2]?(i[1]?Oe(i[1],e):Oe(e)).attr(i[2]):(i=Oe(t,e),r?i:0
"),t=e.appendTo("body").find("td").width();return e.remove(),.1
'),t=(Oe("body").append(e),Oe("div",e).innerWidth()),r=(e.css("overflow-y","scroll"),Oe("div",e).innerWidth());return Oe(e).remove(),t-r<0?18:t-r},scrollbarHeight:function(){var e=Oe('
1234567890
'),t=(Oe("body").append(e),Oe(e).outerHeight()),r=Oe(e)[0].scrollHeight;return Oe(e).remove(),t-r<0?18:t-r},ajaxOptions:{},from:function(e){var v=this;return new function(e,t){"string"==typeof e&&(e=Oe.data(e));var g=this,o=e,f=!0,r=!1,i=t,m=/[\$,%]/g,a=null,n=null,l=0,s=!1,d="",u=[],p=!0;if("object"==typeof e&&e.push)return 0",r)},this.less=function(e,t,r){return g._compareValues(g.less,e,t,"<",r)},this.greaterOrEquals=function(e,t,r){return g._compareValues(g.greaterOrEquals,e,t,">=",r)},this.lessOrEquals=function(e,t,r){return g._compareValues(g.lessOrEquals,e,t,"<=",r)},this.startsWith=function(e,t){return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".startsWith("+g._getStr('"'+g._toStr(t)+'"')+")"):g._append(g._getStr("this")+".startsWith("+g._getStr('"'+g._toStr(e)+'"')+")"),g._setCommand(g.startsWith,e),g._resetNegate(),g},this.endsWith=function(e,t){return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".endsWith("+g._getStr('"'+g._toStr(t)+'"')+")"):g._append(g._getStr("this")+".endsWith("+g._getStr('"'+g._toStr(e)+'"')+")"),g._setCommand(g.endsWith,e),g._resetNegate(),g},this.contains=function(e,t){return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+'.indexOf("'+g._toStr(t)+'",0) > -1'):g._append(g._getStr("this")+'.indexOf("'+g._toStr(e)+'",0) > -1'),g._setCommand(g.contains,e),g._resetNegate(),g},this.user=function(e,t,r){var i='$("#'+v.p.id+'")[0]';return g._append(i+".p.customFilterDef."+e+".action.call("+i+' ,{rowItem: this, searchName:"'+t+'",searchValue:"'+r+'"})'),g._setCommand(g.user,t),g._resetNegate(),g},this.inData=function(e,t,r){t=void 0===t?"":g._getStr('"'+g._toStr(t)+'"');return p?g._append(t+".split(',').indexOf( jQuery.jgrid.getAccessor(this,'"+e+"') ) > -1"):g._append(t+".split(',').indexOf(this."+e+") > -1"),g._setCommand(g.inData,e),g._resetNegate(),g},this.groupBy=function(e,t,r,i){return g._hasData()?g._getGroup(o,e,t,r,i):null},this.orderBy=function(e,t,r,i,o){return t=Oe.jgrid.isNull(t)?"a":Oe.jgrid.trim(t.toString().toLowerCase()),Oe.jgrid.isNull(r)&&(r="text"),Oe.jgrid.isNull(i)&&(i="Y-m-d"),Oe.jgrid.isNull(o)&&(o=!1),u.push({by:e,dir:t="asc"!==(t="desc"!==t&&"descending"!==t?t:"d")&&"ascending"!==t?t:"a",type:r,datefmt:i,sfunc:o}),g},g;throw"data provides is not an array"}(e,null)},getMethod:function(e){return this.getAccessor(Oe.fn.jqGrid,e)},extend:function(e){Oe.extend(Oe.fn.jqGrid,e),this.no_legacy_api||Oe.fn.extend(e)},clearBeforeUnload:function(e){var t,r=Oe("#"+Oe.jgrid.jqID(e))[0];if(r.grid){Oe.jgrid.isFunction((t=r.grid).emptyRows)&&t.emptyRows.call(r,!0,!0),Oe(document).off("mouseup.jqGrid"+r.p.id),Oe(t.hDiv).off("mousemove"),Oe(r).off();for(var i=t.headers.length,o=["formatCol","sortData","updatepager","refreshIndex","setHeadCheckBox","constructTr","formatter","addXmlData","addJSONData","grid","p","addLocalData"],a=0;ainput#jqs_"+n.p.id+"_"+t).focus().val(s),e=!0),!n.p._ftsc){for(n.p._ftsc=!0,n.p._fthc=[],n.p._avc=[],o=0;oinput#jqs_"+n.p.id+"_"+t).val("").focus().val(s),n.p.frozenRows&&(e&&(n.p.frozenColumns=!1),Oe(n).trigger("jqGridAfterGridComplete.setFrozenRows"),e)&&(n.p.frozenColumns=!0)}function g(e){var t,r=Oe(n).jqGrid("getRowData",e),i=[];if(r&&s){for(var o in r)if(!p.has(o)&&r.hasOwnProperty(o)){if(t=s,d.useCase||(r[o]=r[o].toLowerCase(),t=s.toLowerCase()),d.aOperands.includes(d.operand))switch(d.operand){case"cn":l=-1!==r[o].search(t);break;case"eq":l=r[o]===t;break;case"ne":l=r[o]!==t;break;case"bw":l=r[o].substring(0,t.length)===t;break;case"ew":var a=r[o].length;l=r[o].substring(a-t.length,a)===t}l&&i.push(o)}n.p._results[e]={v:s,r:i}}else r&&""===s&&n.p._results[e]&&delete n.p._results[e]}},searchColOnKey:function(e,t,r,i){switch(i.key){case"ArrowRight":case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"PageUp":case"PageDown":case"Alt":case"Control":case"Tab":case"Escape":case"Shift":return}setTimeout(function(){Oe.jgrid.searchColOnEnter(e,t,r,i)},50)},comboGrid:function(l,s,e){var t=Oe.jgrid.randId("combo"),r="div"+t,i=e.datatype,d=(e.datatype="local",e.onSelectRow=function(e){var e=Oe("#"+t).jqGrid("getRowData",e);Oe.isEmptyObject(e)||(e=Oe.jgrid.isFunction(s.return_fld)?s.return_fld.call(this,e):e[s.return_fld],Oe("#"+l).val(e),Oe("#"+r).hide())},e.data=[],e.scrollrows=!0,Oe("body").append("
"),e.pager&&Oe("body").append("
"),Oe("body").append("
"),Oe("#"+t).jqGrid(e),Oe("#"+t).jqGrid("bindKeys",{onSelectRow:!1}),Oe("#"+l).attr("autocomplete","off").data("comboGrid",{grid:t,divgrid:r}),document.getElementById(l).getBoundingClientRect());Oe("#"+r).css({"background-color":"inherit",position:"absolute",top:d.top+50+"px",left:d.left+10+"px",zIndex:2e4}).hide(),Oe("#"+l).on("keydown",function(e){var t,r=Oe(this).data("comboGrid").grid,i=Oe(this).data("comboGrid").divgrid,o=this;if(Oe("#"+i).is(":hidden")&&(d=document.getElementById(l).getBoundingClientRect(),Oe("#"+i).show().css({top:d.top+50+"px",left:d.left+10+"px"})),-1this.resizing.minW)&&(this.curGbox.css({left:this.resizing.sOL+e}),!0===b.forceFit?(i=this.headers[this.resizing.idx+b.nv],(o="ltr"===b.direction?i.width-e:i.width+e)>this.resizing.minW&&(t.newWidth=r,i.newWidth=o)):(this.newWidth="ltr"===b.direction?b.tblwidth+e:b.tblwidth-e,t.newWidth=r))},dragEnd:function(e,t){var r,i;this.hDiv.style.cursor="default",void 0===t&&(t=!0),this.resizing&&(r=this.resizing.idx,i=this.headers[r].newWidth||this.headers[r].width,i=parseFloat(i),this.resizing=!1,Oe("#rs_m"+Oe.jgrid.jqID(b.id)).css("display","none"),b.colModel[r].width=i,this.headers[r].width=i,this.headers[r].el.style.width=i+"px",this.cols[r].style.width=i+"px",0b.lastpage||1===b.lastpage||l===b.page&&l===b.lastpage)||(j.hDiv.loading?j.timer=setTimeout(j.populateVisible,b.scrollTimeout):(b.page=l,(d=0b.scrollMaxBuffer-(0"),i=(Q.p.direction=Oe.jgrid.trim(Q.p.direction.toLowerCase()),Q.p._ald=!1,-1===Oe.inArray(Q.p.direction,["ltr","rtl"])&&(Q.p.direction="ltr"),v=Q.p.direction,Oe(r).insertBefore(this),Oe(this).appendTo(r),Oe("
")),M=(Oe(i).attr({id:"gbox_"+this.id,dir:v}).insertBefore(r),Oe(r).attr("id","gview_"+this.id).appendTo(i),Oe("
").insertBefore(r),Oe("
"+Oe.jgrid.getRegional(Q,"defaults.loadtext",this.p.loadtext)+"
").insertBefore(r),Oe(this).attr({role:"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id}),"indexeddb"===Q.p.datatype&&Oe(Q).jqGrid("dbInit",Q.p.datatype),Oe.jgrid.getFont(Q)),J=function(e,t){return void 0===t&&(t=0),e=parseInt(e,10),isNaN(e)?t:e},l=function(e,t,r,i,o,a){var n=Q.p.colModel[e],l=n.align,s='style="',d=n.classes,p=n.name,c=[];return l&&(s+="text-align:"+l+";"),!0===n.hidden&&(s+="display:none;"),0===t?s+="width: "+j.headers[e].width+"px;":(Oe.jgrid.isFunction(n.cellattr)||"string"==typeof n.cellattr&&!Oe.jgrid.isNull(Oe.jgrid.cellattr)&&Oe.jgrid.isFunction(Oe.jgrid.cellattr[n.cellattr]))&&(l=(Oe.jgrid.isFunction(n.cellattr)?n.cellattr:Oe.jgrid.cellattr[n.cellattr]).call(Q,o,r,i,n,a))&&"string"==typeof l&&(-1"+t+""},te=function(e,t,r,i,o,a){var n=Oe.jgrid.getRegional(Q,"defaults.selectLine"),n='",o=Q.p.colModel[t];return void 0!==o.formatter&&Oe.jgrid.isFunction(o.formatter)&&(n=o.formatter.call(Q,n,{rowId:e,colModel:o,gid:Q.p.id,pos:t,styleUI:Q.p.styleUI},a,"add")),'"+n+""},re=function(e,t,r,i,o){r=(parseInt(r,10)-1)*parseInt(i,10)+1+t;return'"+r+""},ie=function(e,t,r,i){var o=Q.p.searchColOptions.searchOnEnter?" onchange=\"$.jgrid.searchColOnEnter('"+Q.p.id+"',"+e+', this)"':" onkeydown=\"$.jgrid.searchColOnKey('"+Q.p.id+"',"+e+',this, event)"',i='";return'"+i+""},oe=function(e){for(var t,r=[],i=0,o=0;o"},P=function(e,r,t,i){var A=new Date,o="local"!==Q.p.datatype&&Q.p.loadonce||"xmlstring"===Q.p.datatype,a="_id_",n=Q.p.xmlReader,l=[],T="local"===Q.p.datatype?"local":"xml";if(o&&(Q.p.data=[],Q.p._index={},Q.p.localReader.id=a),Q.p.reccount=0,Oe.isXMLDoc(e)){r=-1!==Q.p.treeANode||Q.p.scroll?1"),Q.p.grouping&&(S.push(_),Q.p.groupingView._locgr||m.call(j,x,F),_=[]),(o||!0===Q.p.treeGrid&&!Q.p._ald)&&(x[a]=Oe.jgrid.stripPref(Q.p.idPrefix,f),Q.p.data.push(x),Q.p._index[x[a]]=Q.p.data.length-1,-1"),Q.p.grouping&&(R.push(k),Q.p.groupingView._locgr||f.call(b,S,n),k=[]),(j||!0===Q.p.treeGrid&&!Q.p._ald)&&(S[v]=Oe.jgrid.stripPref(Q.p.idPrefix,N),Q.p.data.push(S),Q.p._index[S[v]]=Q.p.data.length-1,-1{f&&(e.data=e.data.toLowerCase()),e.type="text";var t=Oe(Q).jqGrid("getColProp",e.field),t=t.sorttype||t.stype,r=!("bt"===e.op||"in"===e.op||"ni"===e.op);switch(t){case"int":case"integer":r&&(e.data=parseInt(e.data,10)),e.type="num";break;case"float":case"number":case"numeric":r&&(e.data=parseFloat(e.data)),e.type="num"}}));var m={eq:function(e,t,r){return(r?t[e.field].toLowerCase():t[e.field])===e.data},ne:function(e,t,r){return(r?t[e.field].toLowerCase():t[e.field])!==e.data},lt:function(e,t,r){return(r?t[e.field].toLowerCase():t[e.field])e.data},ge:function(e,t,r){return(r?t[e.field].toLowerCase():t[e.field])>=e.data},bw:function(e,t,r){return 0===(r?t[e.field].toLowerCase():t[e.field]).indexOf(e.data)},bn:function(e,t,r){return!(0===(r?t[e.field].toLowerCase():t[e.field]).indexOf(e.data))},ew:function(e,t,r){return(r?t[e.field].toLowerCase():t[e.field]).endsWith(e.data)},en:function(e,t,r){return!(r?t[e.field].toLowerCase():t[e.field]).endsWith(e.data)},cn:function(e,t,r){return-1<(r?t[e.field].toLowerCase():t[e.field]).indexOf(e.data)},nc:function(e,t,r){return-1r?e.trim().toLowerCase():e.trim()).indexOf(t[e.field])},ni:function(e,t,r){return-1===e.data.split(",").map(e=>r?e.trim().toLowerCase():e.trim()).indexOf(t[e.field].trim())},nu:function(e,t,r){return null===t[e.field]},nn:function(e,t,r){return null!==t[e.field]},bt:function(t,e,r){var i=t.data.split("...").map(e=>"num"===t.type?+e:e.trim());try{var o=r?e[t.field].toLowerCase():e[t.field];return o>=i[0]&&o<=i[1]}catch(e){return!1}}};let v=window.indexedDB.open(Q.p.dbconfig.dbname);v.onsuccess=function(e){var t=v.result.transaction(Q.p.dbconfig.dbtable,"readonly");let i={};i[Q.p.localReader.root]=[],t.oncomplete=function(e){"desc"!==s&&!Q.p.grouping||i[Q.p.localReader.root].sort(function(t,r){var i=[],o=[];if(Q.p.grouping){for(let e=0;e{p=Q.p.search&&h.rules.length?0:e.target.result},Math.pow(2,32)-1),o=(!1!==Q.p.search||"asc"!==s||Q.p.grouping||(r=u*d),t.getAll(null,r));o.onsuccess=e=>{if(!0===Q.p.search&&h.hasOwnProperty("rules")&&h.rules.length)for(var t=o.result.length,r=0;r",a="",n="",d="";if(l+="_"+e,t="pg_"+e,m=e+"_left",g=e+"_center",f=e+"_right",Oe("#"+Oe.jgrid.jqID(e)).append("
").attr("dir",v),0';for(d+=""}"rtl"===v&&(n+=d,Oe("#"+f).attr("align","left")),!0===Q.p.pginput&&(a=""+Oe.jgrid.template(Oe.jgrid.getRegional(Q,"defaults.pgtext",Q.p.pgtext)||"","","")+"");var c,u,h,g,f,m=["first"+l,"prev"+l,"next"+l,"last"+l];!0===Q.p.pgbuttons?(g=K($,"pgButtonBox",!0,"ui-pg-button"),f=[Oe.jgrid.getRegional(Q,"defaults.pgfirst",Q.p.pgfirst)||"",Oe.jgrid.getRegional(Q,"defaults.pgprev",Q.p.pgprev)||"",Oe.jgrid.getRegional(Q,"defaults.pgnext",Q.p.pgnext)||"",Oe.jgrid.getRegional(Q,"defaults.pglast",Q.p.pglast)||""],"rtl"===v&&(m.reverse(),f.reverse()),c="",u="",h="",g="",f=""!==a?o+a+o:"",n+="ltr"===v?c+u+f+h+g:g+h+f+u+c):""!==a&&(n+=a),"ltr"===v&&(n+=d),n+="",e=Oe.jgrid.jqID(e),t=Oe.jgrid.jqID(t),!0===Q.p.viewrecords&&Oe("td#"+e+"_"+Q.p.recordpos,"#"+t).append("
"),Oe("td#"+e+"_"+Q.p.pagerpos,"#"+t).append(n),o=Oe("#gbox_"+Oe.jgrid.jqID(Q.p.id)).css("font-size")||"11px",Oe("#gbox_"+Oe.jgrid.jqID(Q.p.id)).append(""),g=Oe(n).clone().appendTo("#testpg").width(),Oe("#testpg").remove(),0Oe("td#"+e+"_"+Q.p.pagerpos,"#"+t).innerWidth(),Oe("td#"+e+"_"+Q.p.pagerpos,"#"+t).width(g)),Q.p._nvtd=[],Q.p._nvtd[0]=g?Math.floor((Q.p.width-g)/2):Math.floor(Q.p.width/3),Q.p._nvtd[1]=0,n=null,Oe(".ui-pg-selbox","#"+t).on("change",function(){return s("records",this)&&(Q.p.page=Math.round(Q.p.rowNum*(Q.p.page-1)/this.value-.5)+1,Q.p.rowNum=this.value,Q.p.pager&&Oe(".ui-pg-selbox",Q.p.pager).val(this.value),Q.p.toppager&&Oe(".ui-pg-selbox",Q.p.toppager).val(this.value),x()),!1}),!0===Q.p.pgbuttons&&(Oe(".ui-pg-button","#"+t).hover(function(){Oe(this).hasClass(y)?this.style.cursor="default":(Oe(this).addClass(C),this.style.cursor="pointer")},function(){Oe(this).hasClass(y)||(Oe(this).removeClass(C),this.style.cursor="default")}),Oe("#first"+Oe.jgrid.jqID(l)+", #prev"+Oe.jgrid.jqID(l)+", #next"+Oe.jgrid.jqID(l)+", #last"+Oe.jgrid.jqID(l)).click(function(){var e,t,r,i,o,a,n;return Oe(this).hasClass(y)||(e=J(Q.p.page,1),n=a=o=i=!(r=!1),0===(t=J(Q.p.lastpage,1))||1===t?n=a=o=i=!1:1';if(i.columns_selectAll&&(g+=''),Q.p.colSpanHeader.length)for(var f=0;f
",l.push(o),w||d.push(_),s&&!x&&(s=!1)}g+="",Oe(r).append(g),Oe("#col_menu").addClass("ui-menu "+D.menu_widget),Oe("#chk_all","#col_menu").prop("checked",s),Oe.jgrid.isElementInViewport(Oe("#col_menu")[0])||Oe("#col_menu").css("left",-parseInt(Oe("#column_menu").innerWidth(),10)+"px"),Oe.fn.html5sortable()&&Oe("#col_menu").html5sortable({handle:"span",items:":not(.disabled)",forcePlaceholderSize:!0}).on("sortupdate",function(e,t){for(l.splice(t.startindex,1),l.splice(t.endindex,0,t.startindex),Oe(Q).jqGrid("destroyFrozenColumns"),Oe(Q).jqGrid("remapColumns",l,!0),Oe(Q).triggerHandler("jqGridColMenuColumnDone",[l,null,null]),Oe.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,null,null),Oe(Q).jqGrid("setFrozenColumns"),o=0;o li > a").on("click",function(e){var t;Oe(e.target).hasClass("notclick")||(Oe(e.target).is(":input")?t=Oe(e.target).is(":checked"):(t=!Oe("input",this).is(":checked"),Oe("input",this).prop("checked",t)),"check_all"===(e=Oe("input",this).attr("name"))?t?(Oe("input","#col_menu").prop("checked",!0),Oe(Q).jqGrid("showCol",d)):(Oe("input","#col_menu").prop("checked",!1),Oe(Q).jqGrid("hideCol",d)):(Oe(Q).triggerHandler("jqGridColMenuColumnDone",[l,e,t]),Oe.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,e,t),t?(Oe(Q).jqGrid("showCol",e),Oe(this).parent().attr("draggable","true")):(Oe(Q).jqGrid("hideCol",e),Oe(this).parent().attr("draggable","false")),i.columns_selectAll&&Oe("#chk_all","#col_menu").prop("checked",Oe(".chk_selected:checked","#col_menu").length===Oe(".chk_selected","#col_menu").length),Oe("#column_menu").remove()))}).hover(function(){Oe(this).addClass(C)},function(){Oe(this).removeClass(C)})},ce=function(e,t,r,i){var o,a,n,l,s,d,p=Q.p.colModel[e],c="",e="",u="",h="",g="",f="",m=Oe.jgrid.getRegional(Q,"search"),v=Oe.jgrid.styleUI[Q.p.styleUI||"jQueryUI"].common,j=Oe.jgrid.styleUI[b.styleUI||"jQueryUI"].modal;p&&((n=!(!Q.p.colFilters||!Q.p.colFilters[p.name])&&Q.p.colFilters[p.name])&&!Oe.isEmptyObject(n)&&(c=n.oper1,e=n.value1,u=n.rule,h=n.oper2,g=n.value2),p.searchoptions||(p.searchoptions={}),a=p.searchoptions.sopt||(-1!==Oe.inArray(p.sorttype,["text","string","blob"])?["eq","ne","bw","bn","ew","en","cn","nc","nu","nn","in","ni"]:["eq","ne","lt","le","gt","ge","nu","nn","in","ni"]),n=p.searchoptions.groupOps||m.groupOps,l=Oe("
"),s="",s=(s+="
"+Oe.jgrid.getRegional(Q,"colmenu.searchTitle")+"
")+'
",l.append(s),d="",p.searchoptions.defaultValue&&(d=Oe.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),e&&(d=e),j=Oe.extend(p.searchoptions,{name:p.index||p.name,id:"sval1_"+Q.p.idPrefix+p.name,oper:"search"}),e=Oe.jgrid.createEl.call(Q,p.stype,j,d,!1,Oe.extend({},Oe.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),Oe(e).addClass(D.filter_input),s=Oe("
").append(e),l.append(s),s='
",l.append(s),f="",Oe.each(m.odata,function(e,t){o=t.oper===h?'selected="selected"':"",-1!==Oe.inArray(t.oper,a)&&(f+='")}),s='
",l.append(s),d=g||"",j=Oe.extend(p.searchoptions,{name:p.index||p.name,id:"sval2_"+Q.p.idPrefix+p.name,oper:"search"}),e=Oe.jgrid.createEl.call(Q,p.stype,j,d,!1,Oe.extend({},Oe.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),Oe(e).addClass(D.filter_input),s=Oe("
").append(e),l.append(s),s="",l.append(s),l=Oe('').append(l),l=Oe('').append(l),Oe(i).append(l),Oe("#search_menu").addClass("ui-menu "+D.menu_widget),Oe.jgrid.isElementInViewport(Oe("#search_menu")[0])||Oe("#search_menu").css("left",-parseInt(Oe("#column_menu").innerWidth(),10)+"px"),Oe("#bs_reset, #bs_search","#search_menu","#bs_close").hover(function(){Oe(this).addClass(C)},function(){Oe(this).removeClass(C)}),Oe("#bs_reset",l).on("click",function(e){Q.p.colFilters[p.name]={},!0===Q.p.mergeSearch&&Q.p.searchModules.hasOwnProperty("colMenuSearch")&&!1!==Q.p.searchModules.colMenuSearch?(Q.p.searchModules.colMenuSearch=ue(),Oe.extend(Q.p.postData,{filters:Oe.jgrid.splitSearch(Q.p.searchModules)}),Q.p.search=!0):(Q.p.postData.filters=ue(),Q.p.search=!1,Q.p.resetsearch=!0),d="",p.searchoptions.defaultValue&&(d=Oe.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),Oe("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(d),Oe("#sval2_"+Q.p.idPrefix+p.name,"#search_menu").val(""),Oe.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"reset",column:p.name}),Oe(Q).trigger("reloadGrid")}),Oe("#bs_search",l).on("click",function(e){Q.p.colFilters[p.name]={oper1:Oe("#oper1","#search_menu").val(),value1:Oe("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(),rule:Oe("#operand","#search_menu").val(),oper2:Oe("#oper2","#search_menu").val(),value2:Oe("#sval2_"+Q.p.idPrefix+p.name,"#search_menu").val()},!0===Q.p.mergeSearch&&Q.p.searchModules.hasOwnProperty("colMenuSearch")&&!1!==Q.p.searchModules.colMenuSearch?(Q.p.searchModules.colMenuSearch=ue(),Oe.extend(Q.p.postData,{filters:Oe.jgrid.splitSearch(Q.p.searchModules)})):Q.p.postData.filters=ue(),Q.p.search=!0,Oe.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"search",column:p.name}),Oe(Q).trigger("reloadGrid"),Oe("#column_menu").remove()}),Oe("#bs_close",l).on("click",function(){Oe("#column_menu").remove()}))},ue=function(){var e,t="",r=0;for(e in Q.p.colFilters)if(Q.p.colFilters.hasOwnProperty(e)){var i=Q.p.colFilters[e];if(!Oe.isEmptyObject(i)){if(""===i.value1&&""===i.value2)break;0';l.forEach(e=>{e.icon||(e.icon=n.icon_new_item),s+="separator"==e.id?'':'"}),s+="",Oe(r).append(s),Oe("#col_menu").addClass("ui-menu "+D.menu_widget),Oe.jgrid.isElementInViewport(Oe("#col_menu")[0])||Oe("#col_menu").css("left",-parseInt(Oe("#column_menu").innerWidth(),10)+"px"),Oe("#col_menu > li > a").on("click",function(e){var t=Oe(this).attr("data-value"),r=l.find(e=>e.id===t);r&&Oe.jgrid.isFunction(r.funcname)&&(r.funcname.call(Q,o),r.closeOnRun)&&Oe(this).remove()}).hover(function(){Oe(this).addClass(C)},function(){Oe(this).removeClass(C)})};for((Q.p.colMenu||Q.p.menubar)&&Oe("body").on("click",function(e){if(!Oe(e.target).closest("#column_menu").length)try{Oe("#column_menu").remove()}catch(e){}if(!Oe(e.target).closest(".ui-jqgrid-menubar").length)try{Oe("#"+Q.p.id+"_menubar").hide()}catch(e){}}),this.p.id=this.id,!0===Q.p.autowidth&&(d=Oe(i).parent().width(),a=Oe(window).width(),Q.p.width=31").addClass(K($,"rowTable",!0,"ui-jqgrid-btable ui-common-table"));if(Oe(i).append(o),Q.p.cellLayout=Oe.jgrid.floatNum(Oe("td",o).css("padding-left"))+Oe.jgrid.floatNum(Oe("td",o).css("padding-right"),10)+1,Q.p.cellLayout<=0&&(Q.p.cellLayout=5),Oe(o).remove(),!null===Q.p.grouping&&(Q.p.scroll=!1,Q.p.rownumbers=!1,Q.p.treeGrid=!1,Q.p.gridview=!0),!0===this.p.treeGrid){try{Oe(this).jqGrid("setTreeGrid")}catch(e){}"local"!==Q.p.datatype?Q.p.localReader={id:"_id_"}:!1!==Q.p.keyName&&(Q.p.localReader={id:Q.p.keyName})}if(this.p.subGrid)try{Oe(Q).jqGrid("setSubGrid")}catch(e){}this.p.searchCols&&(this.p.colNames.unshift(Q.p.searchColOptions.colName),this.p.colModel.unshift({name:"sc",width:Q.p.searchColOptions.colWidth,sortable:!1,hidedlg:!0,search:!1,align:"left",fixed:!0,frozen:!0,colmenu:Q.p.searchColOptions.colmenu,classes:"jqgrid-searchcol",labelClasses:"jqgrid-searchcolumn",coloptions:{sorting:!1,columns:!1,filtering:!1,seraching:!1,grouping:!1,freeze:!1}})),this.p.multiselect&&(d=(d=Oe.jgrid.getRegional(Q,"defaults.selectAllLines"))||Oe.jgrid.regional.en.defaults.selectAllLines,this.p.colNames.unshift(""),this.p.colModel.unshift({name:"cb",width:Oe.jgrid.cell_width?Q.p.multiselectWidth+Q.p.cellLayout:Q.p.multiselectWidth,sortable:!1,resizable:!1,hidedlg:!0,search:!1,align:"center",fixed:!0,frozen:!0,classes:"jqgrid-multibox",labelClasses:"jqgrid-multibox"})),this.p.rownumbers&&(this.p.colNames.unshift(""),this.p.colModel.unshift({name:"rn",width:Q.p.rownumWidth,sortable:!1,resizable:!1,hidedlg:!0,search:!1,align:"center",fixed:!0,frozen:!0,labelClasses:"jqgrid-rownumber"})),Q.p.xmlReader=Oe.extend(!0,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:!0,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:!0,cell:"cell"}},Q.p.xmlReader),Q.p.jsonReader=Oe.extend(!0,{root:"rows",page:"page",total:"total",records:"records",repeatitems:!0,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:!0,cell:"cell"}},Q.p.jsonReader),Q.p.localReader=Oe.extend(!0,{root:"rows",page:"page",total:"total",records:"records",repeatitems:!1,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:!0,cell:"cell"}},Q.p.localReader),Q.p.scroll&&(Q.p.pgbuttons=!1,Q.p.pginput=!1,Q.p.rowList=[]),Q.p.data.length&&(T(),le());var me,ve,je,p,c,be,a,ye,n,s="",we="",d="",u="";if(!0===Q.p.shrinkToFit&&!0===Q.p.forceFit)for(e=Q.p.colModel.length-1;0<=e;e--)if(!Q.p.colModel[e].hidden){Q.p.colModel[e].resizable=!1;break}if("horizontal"===Q.p.viewsortcols[1]?(d=" ui-i-asc",u=" ui-i-desc"):"single"===Q.p.viewsortcols[1]&&(d=" ui-single-sort-asc",we=" style='display:none'",Q.p.viewsortcols[0]=!(u=" ui-single-sort-desc")),me=N?"class='ui-th-div-ie'":"",be=""),Q.p.multiSort&&Q.p.sortname)for(G=Q.p.sortname.split(","),e=0;e",xe=a.index||a.name,s+="
"+Q.p.colNames[e],a.width?a.width=parseInt(a.width,10):a.width=Q.p.defaultColWidth,"boolean"!=typeof a.title&&(a.title=!0),a.lso="",xe===Q.p.sortname&&(Q.p.lastsort=e),Q.p.multiSort&&-1!==(t=Oe.inArray(xe,G))&&(a.lso=F[t]),s+=be,Q.p.colMenu&&a.colmenu&&(s+=""),s+="
"}s+="",a=be=null,Oe(this).append(s),Oe("thead tr",this).first().find("th").hover(function(){Oe(this).addClass(C)},function(){Oe(this).removeClass(C)}),this.p.multiselect&&(ye=[],Oe("#cb_"+Oe.jgrid.jqID(Q.p.id),this).on("click",function(){Q.p.preserveSelection||(Q.p.selarrrow=[]);var t=!0===Q.p.frozenColumns?Q.p.id+"_frozen":"";this.checked?(Oe(Q.rows).each(function(e){0e&&(this.hidden=!Q.p.groupingView.groupColumnShow[e]),this.widthOrg=J(this.width,0),this.maxWidth&&J(this.width,0)>J(this.maxWidth,0)&&(this.width=this.maxWidth),r=J(this.width,0),!1===this.hidden&&(a+=r+n,this.fixed?p+=r+n:l++)}),isNaN(Q.p.width)&&(Q.p.width=a+(!1!==Q.p.shrinkToFit||isNaN(Q.p.height)?0:s)),j.width=parseInt(Q.p.width,10),Q.p.tblwidth=a,!1===Q.p.shrinkToFit&&!0===Q.p.forceFit&&(Q.p.forceFit=!1),!0===Q.p.shrinkToFit&&0this.maxWidth?(c++,u+=r,this.width=this.maxWidth,o=e):(this.width=r,g+=r,h.push(e+"")),a+=this.width,t=e)}),a+=u,-1);if((e=0)Q.p.width?(Q.p.colModel[t].width-=Q.p.tblwidth-parseInt(Q.p.width,10),Q.p.tblwidth=Q.p.width):d||Q.p.tblwidth!==Q.p.width||(Q.p.colModel[t].width-=_,Q.p.tblwidth-=_)}}(),o=-1!==Q.p.styleUI.search("Bootstrap"),Oe(i).css("width",j.width+"px").append("
 
"),Q.p.scrollPopUp&&Oe(i).append("
"),Oe(r).css("width",j.width+"px"),s=Oe(Q).find("thead").first().get(0),Q.p.footerrow&&(_e+=""),Q.p.headerrow&&(qe+="
"),Oe(s).find("tr").first()),Ce="",Ie=0,De=Oe.jgrid.getFont(Oe("th",d).first()[0]);if(Q.p.disableClick=!1,Oe("th",d).each(function(e){a=Q.p.colModel[e],ve=a.width,void 0===a.resizable&&(a.resizable=!0),a.resizable?(je=document.createElement("span"),Oe(je).html(" ").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+v).css("cursor","col-resize"),Oe(this).addClass(Q.p.resizeclass)):je="",Oe(this).css("width",ve+"px").prepend(je),je=null;var t="",r="",r=(a.hidden&&(Oe(this).css("display","none"),t="display:none;"),a.labelClasses&&(r="class='"+a.labelClasses+"'"),Ce+="",j.headers[e]={width:ve,el:this},"boolean"!=typeof(we=a.sortable)&&(a.sortable=!0,we=!0),a.name);"cb"!==r&&"subgrid"!==r&&"rn"!==r&&"sc"!==r&&Q.p.viewsortcols[2]&&Oe(">div",this).addClass("ui-jqgrid-sortable"),a.canvas_width=a.autosize_headers?Oe.jgrid.getTextWidth(Oe("div",this)[0].outerText,De)+(a.colmenu?Oe.jgrid.floatNum(Oe(".colmenuspan",this).parent().width()):0)+Oe.jgrid.floatNum(Oe("div",this).css("padding-left"))+Oe.jgrid.floatNum(Oe("div",this).css("padding-right"))+Oe.jgrid.floatNum(Oe(".ui-jqgrid-resize",this).width()):0,we&&(Q.p.multiSort?Q.p.viewsortcols[0]?(Oe("div span.s-ico",this).show(),a.lso&&Oe("div span.ui-icon-"+a.lso,this).removeClass(y).css("display","")):a.lso&&(Oe("div span.s-ico",this).show(),Oe("div span.ui-icon-"+a.lso,this).removeClass(y).css("display","")):Q.p.viewsortcols[0]?(Oe("div span.s-ico",this).show(),e===Q.p.lastsort&&Oe("div span.ui-icon-"+Q.p.sortorder,this).removeClass(y).css("display","")):e===Q.p.lastsort&&""!==Q.p.sortname&&(Oe("div span.s-ico",this).show(),Oe("div span.ui-icon-"+Q.p.sortorder,this).removeClass(y).css("display",""))),Q.p.footerrow&&(_e+=""),Q.p.headerrow&&(qe+="")}).mousedown(function(e){if(1===Oe(e.target).closest("th>span.ui-jqgrid-resize").length){var t,r=de(this);if(e.preventDefault(),Ie++,setTimeout(function(){Ie=0},400),2!==Ie)return!0===Q.p.forceFit&&(Q.p.nv=function(e){for(var t=e,r=e,i=e+1;idiv>span>span.ui-grid-ico-sort"),Oe(e.target).closest(a));if(1===a.length){if(i=Q.p.frozenColumns?(i=Oe(this)[0].id.substring(Q.p.id.length+1),Oe.jgrid.getElemByAttrVal(Q.p.colModel,"name",i,!0)):de(this),Oe(e.target).hasClass("colmenuspan"))return Oe.jgrid.isNull(Oe("#column_menu")[0])||Oe("#column_menu").remove(),void 0===i?void 0:(o=Oe("#gbox_"+Q.p.id).offset(),o=Oe(this).offset().left-o.left,"ltr"===Q.p.direction&&(o+=Oe(this).outerWidth()),function(r,e,t){var i,o,a,n,l,s=Oe(j.hDiv).height(),d=(Oe(".ui-search-toolbar",j.hDiv)[0]&&!isNaN(Oe(".ui-search-toolbar",j.hDiv).height())&&(s-=Oe(".ui-search-toolbar",j.hDiv).height()),Oe(j.cDiv).is(":hidden")||(s+=Oe(j.cDiv).outerHeight()),Q.p.toolbar[1]&&"bottom"!==Q.p.toolbar[2]&&!Oe.jgrid.isNull(Oe(j.uDiv),!0)&&(s+=Oe(j.uDiv).outerHeight()),Q.p.toppager&&(s+=Oe("#"+Oe.jgrid.jqID(Q.p.id)+"_toppager").outerHeight()),e=parseInt(e,10),t=s,""),p="",c=Q.p.colModel[r],u=Oe.extend({sorting:!0,columns:!0,filtering:!0,seraching:!0,grouping:!0,freeze:!0},c.coloptions),s=Oe.jgrid.styleUI[Q.p.styleUI||"jQueryUI"].common,h=Oe.jgrid.getRegional(Q,"colmenu"),g=Q.p.colNames[r],f=[],m=Oe.jgrid.trim(c.name);for(a in f.push(d),c.sortable&&u.sorting&&(d='
  
",d+='",f.push(d)),u.columns&&(d='',d+='",f.push(d)),u.filtering&&(d='',d+='",f.push(d)),u.grouping&&(i=Oe.inArray(c.name,Q.p.groupingView.groupField),d='',d+='",f.push(d)),!u.freeze||Q.p.subGrid||Q.p.treeGrid||Q.p.cellEdit||(o=!c.frozen||!Q.p.frozenColumns,d='',d+='",f.push(d)),Q.p.colMenuCustom)Q.p.colMenuCustom.hasOwnProperty(a)&&(n=Q.p.colMenuCustom[a],Oe.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"custom",action:n,column:n.colname}),Oe(Q).triggerHandler("jqGridcolMenuBeforeProcess",[{module:"custom",action:n,column:n.colname}]),l=n.exclude.split(","),l=Oe.map(l,function(e){return Oe.jgrid.trim(e)}),n.colname===m||"_all_"===n.colname&&-1===Oe.inArray(m,l))&&(l=n.items.length?"submenu":n.id,p='',d='","last"===n.position?(n.separator&&f.push(p),f.push(d)):"first"===n.position&&(n.separator&&f.unshift(p),f.unshift(d)));f.unshift('"),Oe("#gbox_"+Q.p.id).append(f.join("")),Oe("#column_menu").addClass("ui-search-menu modal-content column-menu jqgrid-column-menu ui-menu "+s.shadow+" "+D.menu_widget).css({left:e,top:t}),"ltr"===Q.p.direction&&(g=Oe("#column_menu").width()+26,Oe("#column_menu").css("left",e-g+"px")),Oe("#column_menu > li > a").hover(function(){var e,t;Oe("#col_menu").remove(),Oe("#search_menu").remove(),"columns"===Oe(this).attr("data-value")&&(e=Oe(this).parent().width()+8,t=Oe(this).parent().position().top-5,pe(t,e,Oe(this).parent(),u)),"filtering"===Oe(this).attr("data-value")&&(e=Oe(this).parent().width()+8,t=Oe(this).parent().position().top-5,ce(r,t,e,Oe(this).parent())),"submenu"===Oe(this).attr("data-value")&&(e=Oe(this).parent().width()+8,t=Oe(this).parent().position().top-5,fe(t,e,Oe(this).parent(),Oe(this).attr("id"),m)),Oe(this).addClass(C)},function(){Oe(this).removeClass(C)}).click(function(){var e=Oe(this).attr("data-value"),t=Q.grid.headers[r].el;"sortasc"===e||"sortdesc"===e?(Oe.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"sorting",action:"sortasc"===e?"asc":"desc",column:c.name}),W("jqgh_"+Q.p.id+"_"+c.name,r,!0,"sortasc"===e?"asc":"desc",t)):"grouping"===e?he(r,i):"freeze"===e&&ge(r,o),"grouping"!==e&&"freeze"!==e||Oe(this).remove(),Q.p.colMenuCustom.hasOwnProperty(e)&&(t=Q.p.colMenuCustom[e],Oe.jgrid.isFunction(t.funcname))&&(t.funcname.call(Q,m),t.closeOnRun)&&Oe(this).remove()}),parseFloat(Oe("#column_menu").css("left"))<0&&Oe("#column_menu").css("left",Oe(Q).css("left"))}(i,o),!0===Q.p.menubar&&Oe("#"+Q.p.id+"_menubar").hide(),void e.stopPropagation());Q.p.viewsortcols[2]||(t=!0,r=a.attr("sort")),Oe.jgrid.isNull(i)||W(Oe("div",this)[0].id,i,t,r,this),void 0!==Q.p.selHeadInd&&Oe(j.headers[Q.p.selHeadInd].el).attr("tabindex","-1"),Q.p.selHeadInd=i,Oe(this).attr("tabindex","0")}}),a=null,jQuery._cacheCanvas=null,Q.p.sortable&&Oe.fn.sortable)try{Oe(Q).jqGrid("sortableColumns",d)}catch(e){}Q.p.footerrow&&(_e+=""),Q.p.headerrow&&(qe+=""),Ce+="",u=document.createElement("tbody"),Oe(u).attr({role:"rowgroup"}),this.appendChild(u),Oe(this).addClass(K($,"rowTable",!0,"ui-jqgrid-btable ui-common-table")).append(Ce),Q.p.altRows&&Oe(this).addClass(K($,"stripedTable",!0,""));var h,g,Ge,Fe,Ce=null,r=Oe("
").append(s),m=!(!Q.p.caption||!0!==Q.p.hiddengrid),d=Oe("
"),s=null,Se=(j.hDiv=document.createElement("div"),j.hDiv.style.width=j.width-_+"px",j.hDiv.className=K($,"headerDiv",!0,"ui-jqgrid-hdiv"),Oe(j.hDiv).append(d),Oe(d).append(r),m&&Oe(j.hDiv).hide(),Q.p.pager&&("string"==typeof Q.p.pager?"#"===Q.p.pager.slice(0,1)&&(Q.p.pager=Q.p.pager.substring(1)):Q.p.pager=Oe(Q.p.pager).attr("id"),Oe("#"+Oe.jgrid.jqID(Q.p.pager)).css({width:j.width-_+"px"}).addClass(K($,"pagerBox",!0,"ui-jqgrid-pager")).appendTo(i),m&&Oe("#"+Oe.jgrid.jqID(Q.p.pager)).hide(),L(Q.p.pager,""),Q.p.pager="#"+Oe.jgrid.jqID(Q.p.pager)),!1===Q.p.cellEdit&&!0===Q.p.hoverrows&&Oe(Q).on({mouseover:function(e){c=Oe(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Oe(c).attr("class")&&Oe(c).addClass(C)},mouseout:function(e){c=Oe(e.target).closest("tr.jqgrow"),Oe(c).removeClass(C)}}),Oe(Q).before(j.hDiv).on({click:function(e){if(p=e.target,c=Oe(p,Q.rows).closest("tr.jqgrow"),0===Oe(c).length||-1td")).length&&(g=Oe.jgrid.getCellIndex(p)),!0!==Q.p.cellEdit||Q.p.ariaBody){if(0Q.p.lastpage&&(r=Q.p.lastpage),Q.p.page=r=r<1?1:r,Q.grid.prevRowHeight?Q.grid.bDiv.scrollTop=(r-1)*Q.grid.prevRowHeight*Q.p.rowNum:Q.grid.bDiv.scrollTop=0),Q.grid.prevRowHeight&&Q.p.scroll&&void 0===t.page?(delete Q.p.lastpage,Q.grid.populateVisible()):Q.grid.populate(),!0===Q.p.inlineNav&&Oe(Q).jqGrid("showAddEditButtons"),Q.p.searchCols&&!Oe.isEmptyObject(Q.p._results)&&(Q.p._results={},Oe.jgrid.searchColOnEnter(Q.p.id,null)),!1},dblclick:function(e){var t;if(p=e.target,c=Oe(p,Q.rows).closest("tr.jqgrow"),0!==Oe(c).length)return h=c[0].rowIndex,g=Oe.jgrid.getCellIndex(p),t=Oe(Q).triggerHandler("jqGridDblClickRow",[Oe(c).attr("id"),h,g,e]),!Oe.jgrid.isNull(t)||Oe.jgrid.isFunction(Q.p.ondblClickRow)&&(t=Q.p.ondblClickRow.call(Q,Oe(c).attr("id"),h,g,e),!Oe.jgrid.isNull(t))?t:void 0},contextmenu:function(e){var t;if(p=e.target,c=Oe(p,Q.rows).closest("tr.jqgrow"),0!==Oe(c).length)return Q.p.multiselect||Oe(Q).jqGrid("setSelection",c[0].id,!0,e),h=c[0].rowIndex,g=Oe.jgrid.getCellIndex(p),t=Oe(Q).triggerHandler("jqGridRightClickRow",[Oe(c).attr("id"),h,g,e]),!Oe.jgrid.isNull(t)||Oe.jgrid.isFunction(Q.p.onRightClickRow)&&(t=Q.p.onRightClickRow.call(Q,Oe(c).attr("id"),h,g,e),!Oe.jgrid.isNull(t))?t:void 0}}),j.bDiv=document.createElement("div"),N&&"auto"===String(Q.p.height).toLowerCase()&&(Q.p.height="100%"),Oe(j.bDiv).append(Oe('
').append("
").append(this)).addClass("ui-jqgrid-bdiv").css({height:Q.p.height+(isNaN(Q.p.height)?"":"px"),width:j.width-_+"px"}).on("scroll",j.scrollGrid),Oe(j.bDiv).find("table").first().css({width:Q.p.tblwidth+"px"}),Oe.support.tbody||2===Oe("tbody",this).length&&Oe("tbody",this).slice(1).remove(),Q.p.multikey&&(Oe.jgrid.msie()?Oe(j.bDiv).on("selectstart",function(){return!1}):Oe(j.bDiv).on("mousedown",function(){return!1})),m&&Oe(j.bDiv).hide(),I+" "+K($,"icon_caption_open",!0)),ke=I+" "+K($,"icon_caption_close",!0),Re=(j.cDiv=document.createElement("div"),!0===Q.p.hidegrid?Oe("").hover(function(){Re.addClass(C)},function(){Re.removeClass(C)}).append("").css("rtl"===v?"left":"right","0px"):"");Oe(j.cDiv).append(Re).append(""+Q.p.caption+"").addClass("ui-jqgrid-titlebar ui-jqgrid-caption"+("rtl"===v?"-rtl":"")+" "+K($,"gridtitleBox",!0)),!0===Q.p.menubar&&(u='',Oe("#gbox_"+Q.p.id).append(u),Oe(j.cDiv).append(""),Oe(".ui-jqgrid-menubar",j.cDiv).hover(function(){Oe(this).addClass(C)},function(){Oe(this).removeClass(C)}).on("click",function(e){e=Oe(e.target).position();Oe("#"+Q.p.id+"_menubar").show(),"rtl"===Q.p.direction&&Oe("#"+Q.p.id+"_menubar").css({left:e.left-Oe("#"+Q.p.id+"_menubar").width()-20})})),Oe(j.cDiv).insertBefore(j.hDiv),Q.p.toolbar[0]&&(r=K($,"customtoolbarBox",!0,"ui-userdata"),j.uDiv=document.createElement("div"),"top"===Q.p.toolbar[1]?Oe(j.uDiv).insertBefore(j.hDiv):"bottom"===Q.p.toolbar[1]&&Oe(j.uDiv).insertAfter(j.hDiv),"both"===Q.p.toolbar[1]?(j.ubDiv=document.createElement("div"),Oe(j.uDiv).addClass(r+" ui-userdata-top").attr("id","t_"+this.id).insertBefore(j.hDiv).width(j.width-_),Oe(j.ubDiv).addClass(r+" ui-userdata-bottom").attr("id","tb_"+this.id).insertAfter(j.hDiv).width(j.width-_),m&&Oe(j.ubDiv).hide()):Oe(j.uDiv).width(j.width-_).addClass(r+" ui-userdata-top").attr("id","t_"+this.id),m)&&Oe(j.uDiv).hide(),Q.p.toppager&&(Q.p.toppager=Oe.jgrid.jqID(Q.p.id)+"_toppager",j.topDiv=Oe("
")[0],Oe(j.topDiv).addClass(K($,"toppagerBox",!0,"ui-jqgrid-toppager")).width(j.width-_).insertBefore(j.hDiv),L(Q.p.toppager,"_t"),Q.p.toppager="#"+Q.p.toppager),Q.p.footerrow&&(j.sDiv=Oe("
")[0],d=Oe("
"),Oe(j.sDiv).append(d).width(j.width-_).insertAfter(j.hDiv),Oe(d).append(_e),j.footers=Oe(".ui-jqgrid-ftable",j.sDiv)[0].rows[0].cells,Q.p.rownumbers&&(j.footers[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),m)&&Oe(j.sDiv).hide(),Q.p.headerrow&&(j.hrDiv=Oe("
")[0],d=Oe("
"),Oe(j.hrDiv).append(d).width(j.width-_).insertAfter(j.hDiv),Oe(d).append(qe),j.hrheaders=Oe(".ui-jqgrid-hrtable",j.hrDiv)[0].rows[0].cells,Q.p.rownumbers&&(j.hrheaders[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),m)&&Oe(j.nDiv).hide(),d=null,Q.p.caption?(Fe=Q.p.datatype,!0===Q.p.hidegrid&&(Oe(".ui-jqgrid-titlebar-close",j.cDiv).click(function(e){var t,r=Oe.jgrid.isFunction(Q.p.onHeaderClick),i=".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-toppager, .ui-jqgrid-pager, .ui-jqgrid-sdiv, .ui-jqgrid-hrdiv",o=this;return!0===Q.p.toolbar[0]&&("both"===Q.p.toolbar[1]&&(i+=", #"+Oe(j.ubDiv).attr("id")),i+=", #"+Oe(j.uDiv).attr("id")),t=Oe(i,"#gview_"+Oe.jgrid.jqID(Q.p.id)).length,"visible"===Q.p.gridstate?Oe(i,"#gbox_"+Oe.jgrid.jqID(Q.p.id)).slideUp("fast",function(){0===--t&&(Oe("span",o).removeClass(Se).addClass(ke),Q.p.gridstate="hidden",Oe("#gbox_"+Oe.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&Oe(".ui-resizable-handle","#gbox_"+Oe.jgrid.jqID(Q.p.id)).hide(),Oe(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),r)&&!m&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}):"hidden"===Q.p.gridstate&&Oe(i,"#gbox_"+Oe.jgrid.jqID(Q.p.id)).slideDown("fast",function(){0===--t&&(Oe("span",o).removeClass(ke).addClass(Se),m&&(Q.p.datatype=Fe,x(),m=!1),Q.p.gridstate="visible",Oe("#gbox_"+Oe.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&Oe(".ui-resizable-handle","#gbox_"+Oe.jgrid.jqID(Q.p.id)).show(),Oe(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),r)&&!m&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}),!1}),m)&&(Q.p.datatype="local",Oe(".ui-jqgrid-titlebar-close",j.cDiv).trigger("click"))):(Oe(j.cDiv).hide(),Q.p.toppager||Oe(j.hDiv).addClass(K(Q.p.styleUI+".common","cornertop",!0))),(Q.p.headerrow?Oe(j.hrDiv):Oe(j.hDiv)).after(j.bDiv),Oe(j.hDiv).mousemove(function(e){if(j.resizing)return j.dragMove(e),!1}),Oe(".ui-jqgrid-labels",j.hDiv).on("selectstart",function(){return!1}),Oe(document).on("mouseup.jqGrid"+Q.p.id,function(){return!j.resizing||(j.dragEnd(!0),!1)}),"rtl"===Q.p.direction&&Oe(Q).on("jqGridAfterGridComplete.setRTLPadding",function(){var e=j.bDiv.offsetWidth-j.bDiv.clientWidth;0 tr").slice(1),r>Q.p.records&&(r=Q.p.records),c=r-a.length,Q.p.reccount=a.length,(a=a.outerHeight()||Q.grid.prevRowHeight)&&(s=c*a,l=parseInt(Q.p.records,10)*a,Oe(Q.grid.bDiv).find(">div").first().css({height:l}).children("div").first().css({height:s,display:s?"":"none"}),0===Q.grid.bDiv.scrollTop)&&1td.jqgrid-rownum",Q.rows).each(function(e){Oe(this).html(c+1+e)}),0===Q.p.reccount&&(l=Q.p.emptyRecordRow?K($,"rowBox",!0,"jqgrow ui-row-"+Q.p.direction+" not-editable-row not-editable-cell "+y):"jqgfirstrow not-editable-row not-editable-cell",s=(s=se("norecs",!1,l,{},""))+(Q.p.emptyRecordRow?""+Oe.jgrid.getRegional(Q,"defaults.emptyrecords",Q.p.emptyrecords)+"":" ")+"",Oe(j.bDiv).find("table").first().append(s)),t&&Q.p.jqgdnd&&Oe(Q).jqGrid("gridDnD","updateDnD"),Oe(Q).triggerHandler("jqGridGridComplete"),Oe.jgrid.isFunction(Q.p.gridComplete)&&Q.p.gridComplete.call(Q),Oe(Q).triggerHandler("jqGridAfterGridComplete")},Q.refreshIndex=le,Q.setHeadCheckBox=Z,Q.constructTr=se,Q.formatter=function(e,t,r,i,o){return A(e,t,r,i,o)},Oe.extend(j,{populate:x,emptyRows:ne,beginReq:f,endReq:w}),this.grid=j,Q.addXmlData=function(e){P(e)},Q.addJSONData=function(e){B(e)},Q.addLocalData=function(e){return z(e)},Q.addIndexedDBData=function(e){return E(e)},Q.treeGrid_beforeRequest=function(){Q.p.treeGrid&&Q.p.treeGrid_bigData&&void 0!==Q.p.postData.nodeid&&"string"==typeof Q.p.postData.nodeid&&(""!==Q.p.postData.nodeid||00"),c&&(m='",C=e.formatCol(h,1,"",null,n,!0),p[p.length]='"+m+""),u&&(p[p.length]=Oe(e).jqGrid("addSubGridCell",c+h,1)),f=c+u+h;f"+m+"";if(p.unshift(e.constructTr(n,!1,i,o,b)),p[p.length]="",0===e.rows.length)Oe(e.grid.bDiv).find("table").first().append(p.join(""));else switch(s){case"last":Oe(e.rows[e.rows.length-1]).after(p.join("")),g=e.rows.length-1;break;case"first":Oe(e.rows[0]).after(p.join("")),g=1;break;case"after":(g=Oe(e).jqGrid("getGridRowById",d))&&(Oe(e.rows[g.rowIndex+1]).hasClass("ui-subgrid")?Oe(e.rows[g.rowIndex+1]).after(p):Oe(g).after(p.join("")),g=g.rowIndex+1);break;case"before":(g=Oe(e).jqGrid("getGridRowById",d))&&(Oe(g).before(p.join("")),g=g.rowIndex-1)}if(!0===e.p.subGrid&&Oe(e).jqGrid("addSubGrid",c+h,g),e.p.records++,e.p.reccount++,Oe(e).triggerHandler("jqGridAfterInsertRow",[n,b,b]),a&&e.p.afterInsertRow.call(e,n,b,b),r++,"local"===e.p.datatype)switch(o[e.p.localReader.id]=w,s){case"first":e.p.data.unshift(o);break;case"last":e.p.data.push(o);break;case"before":case"after":e.p.data.splice(g-1,0,o)}o={},1===e.p.reccount&&(g=Oe(e).jqGrid("getGridRowById","norecs"))&&g.rowIndex&&0tr"+(t||""),e).each(function(){var t=this,r=Oe.makeArray(t.cells);Oe.each(i,function(){var e=r[this];e&&t.appendChild(e)})})}r(o.p.colModel),r(o.p.colNames),r(o.grid.headers),a(Oe(o.grid.hDiv).find("thead").first(),t&&":not(.ui-jqgrid-labels)"),e&&a(Oe("#"+Oe.jgrid.jqID(o.p.id)+" tbody").first(),".jqgfirstrow, tr.jqgrow, tr.jqfoot, tr.jqgroup"),o.p.footerrow&&a(Oe(o.grid.sDiv).find("tbody").first()),o.p.headerrow&&a(Oe(o.grid.hrDiv).find("tbody").first()),o.p.remapColumns&&(o.p.remapColumns.length?r(o.p.remapColumns):o.p.remapColumns=Oe.makeArray(i)),o.p.lastsort=Oe.inArray(o.p.lastsort,i),o.p.treeGrid&&(o.p.expColInd=Oe.inArray(o.p.expColInd,i)),Oe(o).triggerHandler("jqGridRemapColumns",[i,e,t])},setGridWidth:function(v,j,b){return this.each(function(){if(this.grid){var e,t,r=this,i=!1,o=0,a=Oe.jgrid.cell_width?0:r.p.cellLayout,n=0,l=!1,s=r.p.scrollOffset,d=0,p=-1!==r.p.styleUI.search("Bootstrap")?2:0;if("boolean"!=typeof j&&(j=r.p.shrinkToFit),"boolean"!=typeof b&&(b=!0),!isNaN(v)&&!((v=parseInt(v,10))r.p.maxGridWidth)){if(r.grid.width=r.p.width=v,Oe("#gbox_"+Oe.jgrid.jqID(r.p.id)).css("width",v+"px"),Oe("#gview_"+Oe.jgrid.jqID(r.p.id)).css("width",v+"px"),Oe(r.grid.bDiv).css("width",v-p+"px"),Oe(r.grid.hDiv).css("width",v-p+"px"),r.p.pager&&Oe(r.p.pager).css("width",v-p+"px"),r.p.toppager&&Oe(r.p.toppager).css("width",v-p+"px"),!0===r.p.toolbar[0]&&(Oe(r.grid.uDiv).css("width",v-p+"px"),"both"===r.p.toolbar[1])&&Oe(r.grid.ubDiv).css("width",v-p+"px"),r.p.footerrow&&Oe(r.grid.sDiv).css("width",v-p+"px"),r.p.headerrow&&Oe(r.grid.hrDiv).css("width",v-p+"px"),(e=Oe(r).jqGrid("isGroupHeaderOn"))&&Oe(r).jqGrid("destroyGroupHeader",!1),r.p.frozenColumns&&b&&(Oe(r).jqGrid("destroyFrozenColumns"),i=!0),!1===j&&!0===r.p.forceFit&&(r.p.forceFit=!1),!0===j){if(Oe.each(r.p.colModel,function(){!1===this.hidden&&(g=this.widthOrg,o+=g+a,this.fixed?d+=g+a:n++)}),0===n)return;r.p.tblwidth=o;var c=v-a*n-d,u=Oe("#norecs","#"+Oe.jgrid.jqID(r.p.id)).eq(0),h=(isNaN(r.p.height)||(Oe(r.grid.bDiv)[0].clientHeight<=Oe(r.grid.bDiv)[0].scrollHeight||r.rows.length===u.length+1||"scroll"===Oe(r.grid.bDiv).css("overflow-y"))&&(l=!0,c-=s),(o=0)v?(l=r.p.tblwidth-parseInt(v,10),r.p.tblwidth=v,g=r.p.colModel[t].width=r.p.colModel[t].width-l):r.p.tblwidth===v?(g=r.p.colModel[t].width=r.p.colModel[t].width-p,r.p.tblwidth=v-p):g=r.p.colModel[t].width;var s=Oe(r.grid.bDiv)[0].scrollWidth>Oe(r.grid.bDiv).width()&&0!=p?-1:0,g=r.p.colModel[t].width+=s;r.grid.headers[t].width=g,r.grid.headers[t].el.style.width=g+"px",h&&(r.grid.cols[t].style.width=g+"px"),r.p.footerrow&&(r.grid.footers[t].style.width=g+"px"),r.p.headerrow&&(r.grid.hrheaders[t].style.width=g+"px")}if(Oe(r.grid.bDiv).find("table").first().css("width",r.p.tblwidth+"px"),Oe(r.grid.hDiv).find("table").first().css("width",r.p.tblwidth+"px"),r.grid.hDiv.scrollLeft=r.grid.bDiv.scrollLeft,r.p.footerrow&&Oe(r.grid.sDiv).find("table").first().css("width",r.p.tblwidth+"px"),r.p.headerrow&&Oe(r.grid.hrDiv).find("table").first().css("width",r.p.tblwidth+"px"),e){var f=Oe.extend([],r.p.groupHeader);r.p.groupHeader=null;for(var m=0;mparseFloat(a)&&(e.css("max-height",o),["100%","auto"].includes(r.p.height))&&Oe(r.grid.bDiv).height()"+l+"").find("span").first().html())}}),l},getCol:function(n,l,s){var d,p,c,u,h=[],g=0,f=("boolean"!=typeof l&&(l=!1),void 0===s&&(s=!1),Oe.jgrid.getFont(this[0]));return this.each(function(){var t=this,r=-1,e=t.p.colModel;if(t.grid&&0<=(r=isNaN(n)?Oe.jgrid.getElemByAttrVal(t.p.colModel,"name",n,!0):parseInt(n,10))){var i=t.rows.length,o=0,a=0;if(i&&0'),l.grid.fbDiv=Oe('
'),Oe("#gview_"+Oe.jgrid.jqID(l.p.id)).append(l.grid.fhDiv),t=Oe(".ui-jqgrid-htable","#gview_"+Oe.jgrid.jqID(l.p.id)).clone(!0),Oe(t).width(1),Oe(l.grid.fhDiv).append(t),Oe(l).jqGrid("isGroupHeaderOn")?(Oe("tr.jqg-third-row-header",l.grid.hDiv).height(),Oe("tr.jqg-first-row-header, tr.jqg-third-row-header",t).each(function(){Oe("th",this).slice(l.p.frozenColCount+1).remove()}),i=r=-1,Oe("tr.jqg-second-row-header th",t).each(function(){if(o=parseInt(Oe(this).attr("colspan"),10),parseInt(Oe(this).attr("rowspan"),10)&&(r++,i++),o&&(r+=o,i++),r===l.p.frozenColCount)return i=l.p.frozenColCount,!1}),r!==l.p.frozenColCount&&(i=l.p.frozenColCount),Oe("tr.jqg-second-row-header",t).each(function(){Oe("th",this).slice(i+1).remove()}),a=Oe("tr.jqg-second-row-header th",t).filter(function(){return"none"!==Oe(this).css("display")}).first(),"object"===Oe.jgrid.type(a)&&a.length&&"hidden"!==a.css("visibility")&&""===Oe.jgrid.trim(a[0].outerText)&&a.html(" "),a=Oe("tr.jqg-third-row-header th",t).filter(function(){return"none"!==Oe(this).css("display")}).first(),"object"===Oe.jgrid.type(a)&&a.length&&"hidden"!==a.css("visibility")&&""===Oe.jgrid.trim(a[0].outerText)&&Oe("div",a).prepend(" ")):(n=[],Oe("#gview_"+Oe.jgrid.jqID(l.p.id)+" .ui-jqgrid-htable > thead >tr").each(function(e,t){n.push(parseInt(Oe(this).height(),10))}),Oe("thead >tr",t).each(function(){Oe("th",this).slice(l.p.frozenColCount+1).remove()}),Oe("thead >tr",t).each(function(e){0===e&&--n[e],Oe(this).height(n[e])})),Oe.jgrid.msie()||Oe(t).css("height","100%"),Oe(l.grid.fhDiv).mousemove(function(e){if(l.grid.resizing)return l.grid.dragMove(e),!1}),l.p.sortable&&Oe.fn.sortable&&Oe(l.grid.fhDiv).find("tr.ui-jqgrid-labels th").addClass("sortable-disabled"),l.p.headerrow&&(l.grid.fhrDiv=Oe('
'),Oe("#gview_"+Oe.jgrid.jqID(l.p.id)).append(l.grid.fhrDiv)),l.p.footerrow&&(l.grid.fsDiv=Oe('
'),Oe("#gview_"+Oe.jgrid.jqID(l.p.id)).append(l.grid.fsDiv)),Oe("#gview_"+Oe.jgrid.jqID(l.p.id)).append(l.grid.fbDiv),Oe(l.grid.fbDiv).on("mousewheel DOMMouseScroll",function(e){l.grid.bDiv.scrollTop+="mousewheel"===e.type?-e.originalEvent.wheelDelta/10:6*e.originalEvent.detail}),!0===l.p.hoverrows&&Oe("#"+Oe.jgrid.jqID(l.p.id)).off("mouseover mouseout"),Oe(l).on("jqGridAfterGridComplete.setFrozenColumns",function(){Oe("#"+Oe.jgrid.jqID(l.p.id)+"_frozen").remove(),Oe(l.grid.fbDiv).height(Oe(l.grid.bDiv)[0].clientHeight);var e,i=[],t=(Oe("#"+Oe.jgrid.jqID(l.p.id)+" tr[role=row].jqgrow").each(function(){i.push(Oe(this).height())}),Oe("#"+Oe.jgrid.jqID(l.p.id)).clone(!0));Oe("tr[role=row]",t).each(function(){Oe("td[role=gridcell]",this).slice(l.p.frozenColCount+1).remove()}),Oe(t).width(1).attr("id",l.p.id+"_frozen"),Oe(l.grid.fbDiv).append(t),Oe("tr[role=row].jqgrow",t).each(function(e,t){var r;Oe(this).height(i[e]),.3<=Math.abs(Oe(this).height()-i[e])&&(r=Oe("td:visible",this).first()).height(i[e]-Math.round(parseFloat(r.css("border-bottom-width"))))}),l.rows[1]&&"norecs"===l.rows[1].id&&Oe("#norecs td",t).html(""),Oe(l.grid.fbDiv)[0].scrollTop=Oe(l.grid.bDiv)[0].scrollTop,!0===l.p.hoverrows&&(Oe("tr.jqgrow",t).hover(function(){Oe(this).addClass(u),Oe("#"+Oe.jgrid.jqID(this.id),"#"+Oe.jgrid.jqID(l.p.id)).addClass(u)},function(){Oe(this).removeClass(u),Oe("#"+Oe.jgrid.jqID(this.id),"#"+Oe.jgrid.jqID(l.p.id)).removeClass(u)}),Oe("tr.jqgrow","#"+Oe.jgrid.jqID(l.p.id)).hover(function(){Oe(this).addClass(u),Oe("#"+Oe.jgrid.jqID(this.id),"#"+Oe.jgrid.jqID(l.p.id)+"_frozen").addClass(u)},function(){Oe(this).removeClass(u),Oe("#"+Oe.jgrid.jqID(this.id),"#"+Oe.jgrid.jqID(l.p.id)+"_frozen").removeClass(u)})),l.p.headerrow&&(t=Oe(l.grid.hrDiv).position(),Oe("table",l.grid.fhrDiv).remove(),e=Oe(".ui-jqgrid-hrtable","#gview_"+Oe.jgrid.jqID(l.p.id)).clone(!0),Oe("tr",e).each(function(){Oe("td",this).slice(l.p.frozenColCount+1).remove()}),Oe(e).width(1),Oe(l.grid.fhrDiv).css("top",t.top+"px").append(e)),l.p.footerrow&&(t=Oe(l.grid.sDiv).position(),Oe("table",l.grid.fsDiv).remove(),e=Oe(".ui-jqgrid-ftable","#gview_"+Oe.jgrid.jqID(l.p.id)).clone(!0),Oe("tr",e).each(function(){Oe("td",this).slice(l.p.frozenColCount+1).remove()}),Oe(e).width(1),Oe(l.grid.fsDiv).css("top",t.top+"px").append(e))}),l.grid.hDiv.loading||Oe(l).triggerHandler("jqGridAfterGridComplete.setFrozenColumns"),l.p.frozenColumns=!0,Oe(l).triggerHandler("onFrozenColumnsCall"))}}})},destroyFrozenColumns:function(){return this.each(function(){var e,t,r;this.grid&&!0===this.p.frozenColumns&&(t=Oe(e=this).jqGrid("getStyleUI",e.p.styleUI+".common","hover",!0),Oe(e.grid.fhDiv).remove(),Oe(e.grid.fbDiv).remove(),e.grid.fhDiv=null,e.grid.fbDiv=null,e.p.footerrow&&(Oe(e.grid.fsDiv).remove(),e.grid.fsDiv=null),e.p.headerrow&&(Oe(e.grid.fhrDiv).remove(),e.grid.fhrDiv=null),Oe(this).off(".setFrozenColumns"),!0===e.p.hoverrows&&Oe("#"+Oe.jgrid.jqID(e.p.id)).on({mouseover:function(e){r=Oe(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Oe(r).attr("class")&&Oe(r).addClass(t)},mouseout:function(e){r=Oe(e.target).closest("tr.jqgrow"),Oe(r).removeClass(t)}}),this.p.frozenColumns=!1,this.p.frozenColCount=-1)})},resizeColumn:function(n,l,s,d){return this.each(function(){var e,t,r=this.grid,i=this.p,o=i.colModel,a=o.length;if("boolean"!=typeof s&&(s=!1),"boolean"!=typeof d&&(d=!0),"string"==typeof n){for(e=0;eo.length-1||"number"!=typeof l))){if(l'),r.position||(r.position="last"),r.closeoncall||(r.closeoncall=!0),r.divider?(a='',r.cick=null):a='","last"===r.position?Oe("#"+this.p.id+"_menubar").append(a):Oe("#"+this.p.id+"_menubar").prepend(a)}Oe("li a","#"+this.p.id+"_menubar").each(function(e,r){Oe(o).each(function(e,t){if(t.id===r.id&&Oe.jgrid.isFunction(t.click))return Oe(r).on("click",function(e){t.click.call(i,e)}),!1}),Oe(this).hover(function(e){Oe(this).addClass(n.hover),e.stopPropagation()},function(e){Oe(this).removeClass(n.hover)})})})},menubarDelete:function(e){return this.each(function(){Oe("#"+e,"#"+this.p.id+"_menubar").remove()})},addColSearchMenu:function(){return this.each(function(){var e=this;Oe(e).colMenuAdd("sc",{title:"Reset",position:"first",id:"reset",funcname:function(){Oe("input[id^='jqs_']","#"+this.p.id).each(function(e){Oe(this).val("")}),Oe(this)[0].p._results={},Oe(this).jqGrid("showCol",this.p._avc)}}),Oe(e).colMenuAdd("sc",{separator:!0,id:"groupOp"}),Oe(e).colMenuAdd("sc",{separator:!0,id:"operOp"}),Oe(e).colMenuAdd("sc",{separator:!0,id:"close",funcname:function(){return!0}}),Oe(e).on("jqGridcolMenuBeforeProcess.custom",function(e,t){if("custom"===t.module&&"sc"===t.column){var r,i,o,a=Oe.jgrid.getRegional(this,"search"),n=this.p.searchColOptions,l=Oe.jgrid.getMethod("getStyleUI"),s=this.p.styleUI+".base";if("reset"===t.action.id&&(t.action.title=a.Reset||"Reset",t.action.icon=l(this.p.styleUI+".colmenu","icon_reset",!0,"")),"close"===t.action.id&&(t.action.title=a.Close||"Close",t.action.icon=l(this.p.styleUI+".colmenu","icon_close",!0,"")),"groupOp"===t.action.id){for(r=l(s,"searchSelect",!1,"search-col-input"),t.action.title=""+(a.Operand||"Operand: "),t.action.title+="",setTimeout(function(){Oe("#opselect").on("change",function(){var e=Oe("#"+Oe(this).attr("data-grid-id"))[0];e.p.searchColOptions.searchOp=Oe(this).val(),Oe.jgrid.myfunc(e.p.id)})},200)}if("operOp"===t.action.id){for(r=l(s,"searchSelect",!1,"search-col-input"),t.action.title=a.Operation||"Oper : ",t.action.title+="",setTimeout(function(){Oe("#selectoper").on("change",function(){var e=Oe("#"+Oe(this).attr("data-grid-id"))[0];e.p.searchColOptions.operand=Oe(this).val(),Oe.jgrid.myfunc(e.p.id)})},200)}}})})},disableColMenu:function(e){return this.each(function(){Oe(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","none")})},enableColMenu:function(e){return this.each(function(){Oe(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","inline")})}}),Oe.jgrid.extend({editCell:function(c,u,h,g,f){return this.each(function(){var e,t,r,i=this,o=Oe(this).jqGrid("getStyleUI",i.p.styleUI+".common","highlight",!0),a=Oe(this).jqGrid("getStyleUI",i.p.styleUI+".common","disabled",!0),n=i.p.ariaBody?"":Oe(this).jqGrid("getStyleUI",i.p.styleUI+".common","hover",!0),l=Oe(this).jqGrid("getStyleUI",i.p.styleUI+".celledit","inputClass",!0),s=Oe(this).jqGrid("getStyleUI",i.p.styleUI+".celledit","selectClass",!0);if(i.grid&&!0===i.p.cellEdit&&!Oe(i.rows[c]).hasClass(a)){if(u=parseInt(u,10),i.p.selrow=i.rows[c].id,i.p.knv||i.p.ariaBody||Oe(i).jqGrid("GridNav"),0"+t,p.bClose,{styleUI:o.p.styleUI,top:u.top+30,left:u.left,onClose:function(){o.p.restoreCellonFail||Oe("#"+w+"_"+c,n).focus()}}),o.p.restoreCellonFail&&Oe(o).jqGrid("restoreCell",w,x)}},Oe.jgrid.ajaxOptions,o.p.ajaxCellOptions||{}))}else try{Oe.jgrid.info_dialog(d.errcap,d.nourl,p.bClose,{styleUI:o.p.styleUI}),o.p.restoreCellonFail&&Oe(o).jqGrid("restoreCell",w,x)}catch(e){}"clientArray"===o.p.cellsubmit?(Oe(l).empty(),Oe(o).jqGrid("setCell",o.p.savedRow[s].rowId,x,g,!1,!1,!0),l=Oe("td",n).eq(x),Oe(l).addClass("dirty-cell"),Oe(n).addClass("edited"),Oe(o).triggerHandler("jqGridAfterSaveCell",[o.p.savedRow[s].rowId,a,h,w,x]),Oe.jgrid.isFunction(o.p.afterSaveCell)&&o.p.afterSaveCell.call(o,o.p.savedRow[s].rowId,a,h,w,x),o.p.savedRow.splice(0,1)):"storage"===o.p.cellsubmit&&((j=o.p.savedRow[s])[a]=h,j[o.p.keyName]=Oe.jgrid.stripPref(o.p.idPrefix,o.p.savedRow[s].rowId),Oe(o).jqGrid("updateStorageRecord",j).then(function(e){"complete"===e.type&&(Oe(l).empty(),Oe(o).jqGrid("setCell",o.p.savedRow[s].rowId,x,g,!1,!1,!0),l=Oe("td",n).eq(x),Oe(l).addClass("dirty-cell"),Oe(n).addClass("edited"),Oe(o).triggerHandler("jqGridAfterSaveCell",[o.p.savedRow[s].rowId,a,h,w,x]),Oe.jgrid.isFunction(o.p.afterSaveCell)&&o.p.afterSaveCell.call(o,o.p.savedRow[s].rowId,a,h,w,x),o.p.savedRow.splice(0,1))}).catch(function(e){Oe.jgrid.info_dialog("Error",e.target.error.name+" : "+e.target.error.message,"Close")}))}else try{Oe.jgrid.isFunction(o.p.validationCell)?o.p.validationCell.call(o,Oe("#"+w+"_"+c,n),f[1],w,x):(window.setTimeout(function(){Oe.jgrid.info_dialog(d.errcap,h+" "+f[1],p.bClose,{styleUI:o.p.styleUI,top:u.top+30,left:u.left,onClose:function(){o.p.restoreCellonFail||Oe("#"+w+"_"+c,n).focus()}})},50),o.p.restoreCellonFail&&Oe(o).jqGrid("restoreCell",w,x))}catch(e){alert(f[1])}}else Oe(o).jqGrid("restoreCell",w,x)}window.setTimeout(function(){Oe("#"+Oe.jgrid.jqID(o.p.knv)).attr("tabindex","-1").focus(),o.p.ariaBody&&Oe(o).jqGrid("focusBodyCell",o.p.iRow,o.p.iCol)},0)}})},restoreCell:function(i,o){return this.each(function(){var e=this,t=1<=e.p.savedRow.length?0:null;if(e.grid&&!0===e.p.cellEdit){if(null!==t){var r=Oe(e).jqGrid("getGridRowById",e.p.savedRow[t].rowId),r=Oe("td",r).eq(o);if(Oe.jgrid.isFunction(Oe.fn.datepicker))try{Oe("input.hasDatepicker",r).datepicker("hide")}catch(e){}Oe(r).empty().attr("tabindex","-1"),Oe(e).jqGrid("setCell",e.p.savedRow[0].rowId,o,e.p.savedRow[t].v,!1,!1,!0),Oe(e).triggerHandler("jqGridAfterRestoreCell",[e.p.savedRow[t].rowId,e.p.savedRow[t].v,i,o]),Oe.jgrid.isFunction(e.p.afterRestoreCell)&&e.p.afterRestoreCell.call(e,e.p.savedRow[t].rowId,e.p.savedRow[t].v,i,o),e.p.savedRow.splice(0,1)}window.setTimeout(function(){Oe("#"+e.p.knv).attr("tabindex","-1").focus(),e.p.ariaBody&&Oe(e).jqGrid("focusBodyCell",e.p.iRow,e.p.iCol)},0)}})},nextCell:function(i,o,a){var n;return this.each(function(){var e,t=this,r=!1;if(t.grid&&!0===t.p.cellEdit){for(e=o+1;e=i+parseInt(o,10)?Oe(l.grid.bDiv)[0].scrollLeft=Oe(l.grid.bDiv)[0].scrollLeft+l.rows[e].cells[t].clientWidth:n
"),Oe(e).insertBefore(l.grid.cDiv),Oe("#"+l.p.knv).focus().keydown(function(e){switch(r=e.keyCode,"rtl"===l.p.direction&&(37===r?r=39:39===r&&(r=37)),r){case 38:0"+i.caption+""),Oe("").hover(function(){h.addClass(p.hover)},function(){h.removeClass(p.hover)}).append("")),g=(Oe(u).append(h),s?(c.dir="rtl",Oe(".ui-jqdialog-title",u).css("float","right"),Oe(".ui-jqdialog-titlebar-close",u).css("left","0.3em")):(c.dir="ltr",Oe(".ui-jqdialog-title",u).css("float","left"),Oe(".ui-jqdialog-titlebar-close",u).css("right","0.3em")),document.createElement("div")),e=(Oe(g).addClass("ui-jqdialog-content "+d.content).attr("id",r.modalcontent),Oe(g).append(e),c.appendChild(g),Oe(c).prepend(u),!0===a?Oe("body").append(c):"string"==typeof a?Oe(a).append(c):Oe(c).insertBefore(t),Oe(c).css(n),void 0===i.jqModal&&(i.jqModal=!0),{});if(Oe.fn.jqm&&!0===i.jqModal?(0===i.left&&0===i.top&&i.overlay&&(g=[],g=Oe.jgrid.findPos(o),i.left=g[0]+4,i.top=g[1]+4,s)&&!a&&(i.left=Oe(i.gbox).outerWidth()-(isNaN(i.width)?300:parseInt(i.width,10))),e.top=i.top+"px",e.left=i.left+"px"):0===i.left&&0===i.top||(e.left=i.left+"px",e.top=i.top+"px"),Oe("a.ui-jqdialog-titlebar-close",u).click(function(){var e=Oe("#"+Oe.jgrid.jqID(r.themodal)).data("onClose")||i.onClose,t=Oe("#"+Oe.jgrid.jqID(r.themodal)).data("gbox")||i.gbox;return l.hideModal("#"+Oe.jgrid.jqID(r.themodal),{gb:t,jqm:i.jqModal,onClose:e,removemodal:i.removemodal||!1,formprop:!i.recreateForm||!1,form:i.form||""}),!1}),0!==i.width&&i.width||(i.width=300),0!==i.height&&i.height||(i.height=200),i.zIndex||(n=Oe(t).parents("*[role=dialog]").first().css("z-index"),i.zIndex=n?parseInt(n,10)+2:950),Oe(c).css(Oe.extend({width:isNaN(i.width)?"auto":i.width+"px",height:isNaN(i.height)?"auto":i.height+"px",zIndex:i.zIndex,overflow:"hidden"},e)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":r.modalhead,"aria-hidden":"true"}),void 0===i.drag&&(i.drag=!0),void 0===i.resize&&(i.resize=!0),i.drag)if(Oe(u).css("cursor","move"),Oe.fn.tinyDraggable)Oe(c).tinyDraggable({handle:"#"+Oe.jgrid.jqID(u.id)});else try{Oe(c).draggable({handle:Oe("#"+Oe.jgrid.jqID(u.id))})}catch(e){}if(i.resize)if(Oe.fn.jqResize)Oe(c).append("
"),Oe("#"+Oe.jgrid.jqID(r.themodal)).jqResize(".jqResize",!!r.scrollelm&&"#"+Oe.jgrid.jqID(r.scrollelm));else try{Oe(c).resizable({handles:"se, sw",alsoResize:!!r.scrollelm&&"#"+Oe.jgrid.jqID(r.scrollelm)})}catch(e){}!0===i.closeOnEscape&&Oe(c).keydown(function(e){27===e.which&&(e=Oe("#"+Oe.jgrid.jqID(r.themodal)).data("onClose")||i.onClose,l.hideModal("#"+Oe.jgrid.jqID(r.themodal),{gb:i.gbox,jqm:i.jqModal,onClose:e,removemodal:i.removemodal||!1,formprop:!i.recreateForm||!1,form:i.form||""}))})},viewModal:function(e,t){var r="";if((t=Oe.extend({toTop:!0,overlay:10,modal:!1,overlayClass:"ui-widget-overlay",onShow:Oe.jgrid.showModal,onHide:Oe.jgrid.closeModal,gbox:"",jqm:!0,jqM:!0},t||{})).gbox){var i=Oe("#"+t.gbox.substring(6))[0];try{r=Oe(i).jqGrid("getStyleUI",i.p.styleUI+".common","overlay",!1,"jqgrid-overlay-modal"),t.overlayClass=Oe(i).jqGrid("getStyleUI",i.p.styleUI+".common","overlay",!0)}catch(e){}}if(void 0===t.focusField&&(t.focusField=0),t.focusField="number"==typeof t.focusField&&0<=t.focusField?parseInt(t.focusField,10):!("boolean"==typeof t.focusField&&!t.focusField)&&0,Oe.fn.jqm&&!0===t.jqm)(t.jqM?Oe(e).attr("aria-hidden","false").jqm(t):Oe(e).attr("aria-hidden","false")).jqmShow();else if(""!==t.gbox&&(i=parseInt(Oe(e).css("z-index"))-1,t.modal?(Oe(".jqgrid-overlay-modal")[0]||Oe("body").prepend("
"),Oe(".jqgrid-overlay-modal").css("z-index",i).show()):(Oe(t.gbox).find(".jqgrid-overlay").first().css("z-index",i).show(),Oe(e).data("gbox",t.gbox))),Oe(e).show().attr("aria-hidden","false"),0<=t.focusField)try{Oe(":input:visible",e)[t.focusField].focus()}catch(e){}},info_dialog:function(e,t,r,i){var o,a={width:350,height:"auto",dataheight:"auto",drag:!0,resize:!1,left:window.innerWidth/2-145,top:window.innerHeight/2-150,zIndex:1e3,jqModal:!0,modal:!1,closeOnEscape:!0,align:"center",buttonalign:"center",buttons:[],overlay:10,overlayClass:""},n=(Oe.extend(!0,a,Oe.jgrid.jqModal||{},{caption:""+e+""},i||{}),a.jqModal),l=this,e=Oe.jgrid.styleUI[a.styleUI||Oe.jgrid.defaults.styleUI||"jQueryUI"].modal,s=Oe.jgrid.styleUI[a.styleUI||Oe.jgrid.defaults.styleUI||"jQueryUI"].common,d=(a.overlayClass||(a.overlayClass=s.overlay),Oe.fn.jqm&&!n&&(n=!1),"");if(0"+a.buttons[o].text+"";var i=isNaN(a.dataheight)?a.dataheight:a.dataheight+"px",p="text-align:"+a.align+";",c="
",c=(c+="
"+t+"
")+(r?"
"+r+""+d+"
":""!==d?"
"+d+"
":"")+"
";try{"false"===Oe("#info_dialog").attr("aria-hidden")&&Oe.jgrid.hideModal("#info_dialog",{jqm:n}),Oe("#info_dialog").remove()}catch(e){}i=Oe(".ui-jqgrid").css("font-size")||"11px";Oe.jgrid.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},c,a,"","",!0,{"font-size":i}),d&&Oe.each(a.buttons,function(e){Oe("#"+Oe.jgrid.jqID(this.id),"#info_id").on("click",function(){return a.buttons[e].onClick.call(Oe("#info_dialog")),!1})}),Oe("#closedialog","#info_id").on("click",function(){return l.hideModal("#info_dialog",{jqm:n,onClose:Oe("#info_dialog").data("onClose")||a.onClose,gb:Oe("#info_dialog").data("gbox")||a.gbox}),!1}),Oe(".fm-button","#info_dialog").hover(function(){Oe(this).addClass(s.hover)},function(){Oe(this).removeClass(s.hover)}),Oe.jgrid.isFunction(a.beforeOpen)&&a.beforeOpen(),Oe.jgrid.viewModal("#info_dialog",{onHide:function(e){e.w.hide().remove(),e.o&&e.o.remove()},modal:a.modal,jqm:n,overlay:a.overlay,overlayClass:a.overlayClass}),Oe.jgrid.isFunction(a.afterOpen)&&a.afterOpen();try{Oe("#info_dialog").focus()}catch(e){}},bindEv:function(e,r){Oe.jgrid.isFunction(r.dataInit)&&r.dataInit.call(this,e,r),r.dataEvents&&Oe.each(r.dataEvents,function(){var t=this.fn;void 0!==this.data?Oe(e).on(this.type,this.data,function(e){t.call(this,e,r)}):Oe(e).on(this.type,function(e){t.call(this,e,r)})})},createEl:function(e,t,r,i,o){var a="",c=this;function u(r,e,t){var i=(i=["dataInit","dataEvents","dataUrl","buildSelect","sopt","searchhidden","defaultValue","attr","custom_element","custom_value","oper"]).concat(["cacheUrlData","delimiter","separator"]);void 0!==t&&Array.isArray(t)&&Oe.merge(i,t),Oe.each(e,function(e,t){-1===Oe.inArray(e,i)&&Oe(r).attr(e,t)}),e.hasOwnProperty("id")||Oe(r).attr("id",Oe.jgrid.randId())}switch(e){case"textarea":a=document.createElement("textarea"),i?t.cols||Oe(a).css({width:"98%"}):t.cols||(t.cols=20),t.rows||(t.rows=2),(" "===r||" "===r||1===r.length&&160===r.charCodeAt(0))&&(r=""),a.value=r,Oe(a).attr({role:"textbox",multiline:"true"}),u(a,t);break;case"checkbox":(a=document.createElement("input")).type="checkbox",t.value?(r===(d=t.value.split(":"))[0]&&(a.checked=!0,a.defaultChecked=!0),a.value=d[0],Oe(a).attr("offval",d[1])):((d=(r+"").toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0&&""!==d?(a.checked=!0,a.defaultChecked=!0,a.value=r):a.value="on",Oe(a).attr("offval","off")),Oe(a).attr("role","checkbox"),u(a,t,["value"]);break;case"select":(a=document.createElement("select")).setAttribute("role","listbox");var n,l,s=[];if(!0===t.multiple?(n=!0,a.multiple="multiple",Oe(a).attr("aria-multiselectable","true")):n=!1,null!=t.dataUrl){var d=null,h=t.postData||o.postData;try{d=t.rowId}catch(e){}c.p&&c.p.idPrefix&&(d=Oe.jgrid.stripPref(c.p.idPrefix,d)),Oe.ajax(Oe.extend({url:Oe.jgrid.isFunction(t.dataUrl)?t.dataUrl.call(c,d,r,String(t.name)):t.dataUrl,type:"GET",dataType:"html",data:Oe.jgrid.isFunction(h)?h.call(c,d,r,String(t.name)):h,context:{elem:a,options:t,vl:r},success:function(e){var t,r,i=[],o=this.elem,a=this.vl,n=Oe.extend({},this.options),l=!0===n.multiple,s=!0===n.cacheUrlData,d="",p=[],e=Oe.jgrid.isFunction(n.buildSelect)?n.buildSelect.call(c,e):e;(e="string"==typeof e?Oe(Oe.jgrid.trim(e)).html():e)&&(Oe(o).append(e),u(o,n,h?["postData"]:void 0),void 0===n.size&&(n.size=l?3:1),l?(e=void 0===n.multiseparator?",":n.multiseparator,i=a.split(e),i=Oe.map(i,function(e){return Oe.jgrid.trim(e)})):i[0]=Oe.jgrid.trim(a),Oe("option",o).each(function(e){t=Oe(this).text(),a=Oe(this).val(),s&&(d+=(0!==e?";":"")+a+":"+t),0===e&&o.multiple&&(this.selected=!1),Oe(this).attr("role","option"),(-1((i=r[e[o]])%4!=0||i%100==0&&i%400!=0?28:29)||r[e[a]]>[0,31,29,31,30,31,30,31,31,30,31,30,31][r[e[n]]])},isEmpty:function(e){return!(void 0!==e&&!e.match(/^\s+$/)&&""!==e)},checkTime:function(e){if(!Oe.jgrid.isEmpty(e)){if(!(e=e.match(/^(\d{1,2}):(\d{2})([apAP][Mm])?$/)))return!1;if(e[3]){if(e[1]<1||12Oe.jgrid.floatNum(a.maxValue))return[!1,l+": "+u.maxValue+" "+a.maxValue,""];if(!0===a.email&&!(!1==r&&Oe.jgrid.isEmpty(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e)))return[!1,l+": "+u.email,""];if(!0===a.integer&&(!1!=r||!Oe.jgrid.isEmpty(e))){if(!o(e))return[!1,l+": "+u.integer,""];if(e%1!=0||-1!==e.indexOf("."))return[!1,l+": "+u.integer,""]}if(!0===a.date&&!(!1==r&&Oe.jgrid.isEmpty(e)||(c[t].formatoptions&&c[t].formatoptions.newformat?(s=c[t].formatoptions.newformat,(i=Oe.jgrid.getRegional(p,"formatter.date.masks"))&&i.hasOwnProperty(s)&&(s=i[s])):s=c[t].datefmt||"Y-m-d",Oe.jgrid.checkDate(s,e))))return[!1,l+": "+u.date+" - "+s,""];if(!0===a.time&&!(!1==r&&Oe.jgrid.isEmpty(e)||Oe.jgrid.checkTime(e)))return[!1,l+": "+u.date+" - hh:mm (am/pm)",""];if(!0===a.url&&!(!1==r&&Oe.jgrid.isEmpty(e)||/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i.test(e)))return[!1,l+": "+u.url,""];if(!0===a.custom)if(!1!=r||!Oe.jgrid.isEmpty(e))return Oe.jgrid.isFunction(a.custom_func)?(i=a.custom_func.call(p,e,l,t),Array.isArray(i)?i:[!1,u.customarray,""]):[!1,u.customfcheck,""]}return[!0,"",""]},validateForm:function(e){for(var t,r=!0,i=0;i=a)&&(!n||r.length<=n)))&&l&&(t=(l=new RegExp(l)).test(r)),t},buildButtons:function(e,r,i){var o;return Oe.each(e,function(e,t){t.id||(t.id=Oe.jgrid.randId()),t.position||(t.position="last"),t.side||(t.side="left"),o=t.icon?" fm-button-icon-"+t.side+"'>":"'>",o=""),function(e,t){var r=[!0,""],i=w();if(Oe.jgrid.isFunction(t.searchrules))r=t.searchrules.call(i,e,t);else if(Oe.jgrid&&Oe.jgrid.checkValues)try{r=Oe.jgrid.checkValues.call(i,e,-1,t.searchrules,t.label)}catch(e){}r&&r.length&&!1===r[0]&&(q.error=!r[0],q.errmsg=r[1])});this.onchange=function(){return this.p.error=!1,this.p.errmsg="",!!Oe.jgrid.isFunction(this.p.onChange)&&this.p.onChange.call(this,this.p)},this.reDraw=function(){Oe(this).find("table.group").first().remove();var e=this.createTableForGroup(q.filter,null);Oe(this).append(e),Oe.jgrid.isFunction(this.p.afterRedraw)&&this.p.afterRedraw.call(this,this.p)},this.createTableForGroup=function(i,e){var o=this,t=Oe("
"),r="left",a=("rtl"===this.p.direction&&(r="right",t.attr("dir","rtl")),null===e&&t.append(""),Oe("")),r=(t.append(a),Oe(""));if(a.append(r),!0===this.p.ruleButtons){for(var n,l=Oe(""),s=(r.append(l),""),d=0;d"+o.p.groupOps[d].text+"";l.append(s).on("change",function(){i.groupOp=Oe(l).val(),o.onchange()})}var p,a="";if(this.p.groupButton&&(a=Oe("")).on("click",function(){return void 0===i.groups&&(i.groups=[]),i.groups.push({groupOp:q.groupOps[0].op,rules:[],groups:[]}),o.reDraw(),o.onchange(),!1}),r.append(a),!0===this.p.ruleButtons&&((a=Oe("")).on("click",function(){for(void 0===i.rules&&(i.rules=[]),d=0;d"),r.append(a),a.on("click",function(){for(d=0;d"),u=(t.append(c),Oe("")),u=(c.append(u),Oe(""));u.append(this.createTableForGroup(i.groups[d],i)),c.append(u)}void 0===i.groupOp&&(i.groupOp=o.p.groupOps[0].op);var h=o.p.ruleButtons&&o.p.uniqueSearchFields;if(h)for(f=0;f"),i="",o=(r.append(""),Oe("")),u=(r.append(o),Oe("")),h=[],g=(o.append(u),u.on("change",function(){var e;for(p.p.ruleButtons&&p.p.uniqueSearchFields&&(t=parseInt(Oe(this).data("curr"),10),e=this.selectedIndex,0<=t)&&(p.p.columns[t].search=!0,Oe(this).data("curr",e),p.p.columns[e].search=!1),a.field=Oe(u).val(),l=Oe(this).parents("tr").first(),Oe(".data",l).empty(),f=0;f"+p.p.ops[d].text+"",o++);Oe(".selectopts",l).empty().append(i),Oe(".selectopts",l)[0].selectedIndex=0,Oe.jgrid.msie()&&Oe.jgrid.msiever()<9&&(t=parseInt(Oe("select.selectopts",l)[0].offsetWidth,10)+1,Oe(".selectopts",l).width(t),Oe(".selectopts",l).css("width","auto")),Oe(".data",l).append(r),Oe.jgrid.bindEv.call(c,r,s.searchoptions),Oe(".input-elm",l).on("change",function(e){e=e.target;"custom"===s.inputtype&&Oe.jgrid.isFunction(s.searchoptions.custom_value)?a.data=s.searchoptions.custom_value.call(c,Oe(".customelement",this),"get"):a.data=Oe(e).val(),"select"===s.inputtype&&s.searchoptions.multiple&&(a.data=a.data.join(",")),p.onchange()}),setTimeout(function(){a.data=Oe(r).val(),("nu"===a.op||"nn"===a.op||0<=Oe.inArray(a.op,p.p.unaryOperations))&&(Oe(r).attr("readonly","true"),Oe(r).attr("disabled","true")),"select"===s.inputtype&&s.searchoptions.multiple&&Array.isArray(a.data)&&(a.data=a.data.join(",")),p.onchange()},0)}}),0),f=0;f"+p.p.columns[f].label+"")}u.append(i),u.data("curr",g);var o=Oe(""),j=(r.append(o),(s=q.columns[g]).searchoptions.id=Oe.jgrid.randId(),!y||"text"!==s.inputtype||s.searchoptions.size||(s.searchoptions.size=10),s.searchoptions.name=a.field,s.searchoptions.oper="filter",Oe.jgrid.createEl.call(c,s.inputtype,s.searchoptions,a.data,!0,p.p.ajaxSelectOptions||{},!0)),b=(("nu"===a.op||"nn"===a.op||0<=Oe.inArray(a.op,p.p.unaryOperations))&&(Oe(j).attr("readonly","true"),Oe(j).attr("disabled","true")),Oe(""));for(o.append(b),b.on("change",function(){a.op=Oe(b).val(),l=Oe(this).parents("tr").first();var e=Oe(".input-elm",l)[0];"nu"===a.op||"nn"===a.op||0<=Oe.inArray(a.op,p.p.unaryOperations)?(a.data="","SELECT"!==e.tagName.toUpperCase()&&(e.value=""),e.setAttribute("readonly","true"),e.setAttribute("disabled","true")):("SELECT"===e.tagName.toUpperCase()&&(a.data=e.value),e.removeAttribute("readonly"),e.removeAttribute("disabled")),p.onchange()}),n=s.searchoptions.sopt||p.p.sopt||(-1!==Oe.inArray(s.searchtype,p.p.strarr)?p.p.stropts:p.p.numopts),i="",Oe.each(p.p.ops,function(){h.push(this.oper)}),f=0;f"+p.p.ops[d].text+"");b.append(i);o=Oe(""),r.append(o),o.append(j),Oe.jgrid.bindEv.call(c,j,s.searchoptions),Oe(j).addClass("input-elm "+("select"===s.inputtype?x.srSelect:x.srInput)).on("change",function(){a.data="custom"===s.inputtype?s.searchoptions.custom_value.call(c,Oe(".customelement",this),"get"):Oe(this).val(),p.onchange()}),o=Oe("");return r.append(o),!0===this.p.ruleButtons&&(j=Oe(""),o.append(j),j.on("click",function(){for(f=0;f",ge:">=",bw:"^",bn:"!^",in:"=",ni:"!=",ew:"|",en:"!@",cn:"~",nc:"!~",nu:"#",nn:"!#",bt:"..."},disabledKeys:[9,16,17,18,19,20,33,34,35,36,37,38,39,40,30,45,112,113,114,115,116,117,118,119,120,121,122,123,144,145]},i,k||{}),this.each(function(){var G=this,F=[];if(!G.p.filterToolbar){if(Oe(G).data("filterToolbar")||Oe(G).data("filterToolbar",k),G.p.force_regional&&(k=Oe.extend(k,i)),void 0!==G.p.customFilterDef)for(var e in G.p.customFilterDef)G.p.customFilterDef.hasOwnProperty(e)&&!k.operands.hasOwnProperty(e)&&(k.odata.push({oper:e,text:G.p.customFilterDef[e].text}),k.operands[e]=G.p.customFilterDef[e].operand,!0===G.p.customFilterDef[e].unary)&&F.push(e);var u,h,t,g,f=Oe.jgrid.styleUI[G.p.styleUI||"jQueryUI"].filter,d=Oe.jgrid.styleUI[G.p.styleUI||"jQueryUI"].common,m=Oe.jgrid.styleUI[G.p.styleUI||"jQueryUI"].base,v=function(e){void 0===e&&(e=1);var r,i,o,a,n={},l=0,s={},d=!1,p=[],c=[],u={},h=[],g=!1,f=[!0,"",""],m=!1;if(Oe.each(G.p.colModel,function(){var e,t=!1;if(i=this.index||this.name,a=this.searchoptions||{},!0===this.frozen&&!0===G.p.frozenColumns?(e=Oe("#gs_"+G.p.idPrefix+Oe.jgrid.jqID(this.name),G.grid.fhDiv),t=!0):e=Oe("#gs_"+G.p.idPrefix+Oe.jgrid.jqID(this.name),G.grid.hDiv),void 0===e[0]&&(e=Oe("#gs_"+G.p.idPrefix+Oe.jgrid.jqID(this.name),G.grid.hDiv)),o=k.searchOperators&&a.searchOperMenu?e.parents("table.ui-search-table").find("td.ui-search-oper").children("a").attr("soper")||k.defaultSearch:a.sopt?a.sopt[0]:"select"===this.stype?"eq":k.defaultSearch,"custom"===this.stype&&Oe.jgrid.isFunction(a.custom_value)&&0"),b=(k.restoreFromFilters&&(t=!0===G.p.mergeSearch&&G.p.searchModules.hasOwnProperty("filterToolbar")&&!1!==G.p.searchModules.filterToolbar?G.p.searchModules.filterToolbar:G.p.postData.filters)&&("string"==typeof t&&(t=Oe.jgrid.parse(t)),h=!(!t.rules||!t.rules.length)&&t.rules),new Set(k.disabledKeys));if(b.size!==k.disabledKeys.length)for(var r=0;r"),s=Oe('
empty
'),d=Oe("
");if(!0===this.hidden&&Oe(l).css("display","none"),this.search=!1!==this.search,void 0===this.stype&&(this.stype="text"),this.searchoptions=this.searchoptions||{},void 0===this.searchoptions.searchOperMenu&&(this.searchoptions.searchOperMenu=!0),e=void 0!==g?g+" "+G.p.colNames[e]:G.p.colNames[e],t=Oe.extend({},this.searchoptions,{name:o.index||o.name,id:"gs_"+G.p.idPrefix+o.name,oper:"search",title:e}),this.search){if(k.restoreFromFilters&&h)for(var p=!1,c=0;c"+n+"
":""}switch(Oe("td",d).eq(0).attr("columname",o.name).append(a),void 0===t.clearSearch&&(t.clearSearch=!0),t.clearSearch?(e=k.resetTitle||"Clear Search Value",Oe("td",d).eq(2).append(""+k.resetIcon+"")):Oe("td",d).eq(2).hide(),this.surl&&(t.dataUrl=this.surl),e="",t.defaultValue&&(e=Oe.jgrid.isFunction(t.defaultValue)?t.defaultValue.call(G):t.defaultValue),k.restoreFromFilters&&p&&(e=p.data),e=Oe.jgrid.createEl.call(G,this.stype,t,e,!1,Oe.extend({},Oe.jgrid.ajaxOptions,G.p.ajaxSelectOptions||{})),"custom"!==this.stype&&("select"===this.stype?Oe(e).addClass(f.srSelect):Oe(e).addClass(f.srInput)),Oe("td",d).eq(1).append(e),Oe(s).append(d),null==t.dataEvents&&(t.dataEvents=[]),this.stype){case"select":!0===k.autosearch&&t.dataEvents.push({type:"change",fn:function(){return v(),!1}});break;case"text":case"custom":!0===k.autosearch&&(k.searchOnEnter?t.dataEvents.push({type:"keypress",fn:function(e){return 13===(e.charCode||e.keyCode||0)?(e.preventDefault(),v(),!1):this}}):t.dataEvents.push({type:"keydown",fn:function(e){var t=e.which;if(!b.has(t)){if(13===t)return e.preventDefault(),!1;u&&clearTimeout(u),u=setTimeout(function(){v()},k.autosearchDelay)}}}))}Oe.jgrid.bindEv.call(G,e,t)}Oe(l).append(s),Oe(j).append(l),k.searchOperators&&""!==a||Oe("td",d).eq(0).hide()}),Oe("table thead",G.grid.hDiv).append(j),k.searchOperators&&(Oe(".soptclass",j).click(function(e){var t=Oe(this).offset();!function(i,e,t){Oe("#sopt_menu").remove(),e=parseInt(e,10),t=parseInt(t,10)+18;var r,o='",Oe("body").append(o),Oe("#sopt_menu").addClass("ui-menu "+f.menu_widget),Oe("#sopt_menu > li > a").hover(function(){Oe(this).addClass(d.hover)},function(){Oe(this).removeClass(d.hover)}).click(function(){var e,t=Oe(this).attr("value"),r=Oe(this).attr("oper");Oe(G).triggerHandler("jqGridToolbarSelectOper",[t,r,i]),Oe("#sopt_menu").hide(),Oe(i).text(r).attr("soper",t),G.p.frozenColumns&&Oe(i).parents("div.frozen-div").length&&0<=(e=Oe(i).parents("th").index())&&Oe("#gview_"+Oe.jgrid.jqID(G.p.id)+" .ui-jqgrid-hdiv .ui-search-toolbar th").eq(e).find("a.soptclass").text(r).attr("soper",t),!0===k.autosearch&&(e=Oe(i).parent().next().children()[0],Oe(e).val()||"nu"===t||"nn"===t||0<=Oe.inArray(t,F))&&v()})}}(this,t.left,t.top),e.stopPropagation()}),Oe("body").on("click",function(e){"soptclass"!==e.target.className&&Oe("#sopt_menu").remove()})),Oe(".clearsearchclass",j).click(function(){var e,t=Oe(this).parents("tr").first(),r=Oe("td.ui-search-oper",t).attr("columname"),i=Oe("td.ui-search-oper a",t).attr("soper");if(-1===(r=Oe.jgrid.getElemByAttrVal(G.p.colModel,"name",r,!0)))return!1;var o=G.p.colModel[r],a=Oe.extend({},o.searchoptions||{}),n=a.defaultValue||"",l=("select"===o.stype?(l=Oe("td.ui-search-input select",t),n?l.val(n):l[0].selectedIndex=0):(l=Oe("td.ui-search-input input",t)).val(n),Oe(G).triggerHandler("jqGridToolbarClearVal",[l[0],r,a,n]),Oe.jgrid.isFunction(k.onClearSearchValue)&&k.onClearSearchValue.call(G,l[0],r,a,n),"");("nu"===i||"nn"===i||0<=Oe.inArray(i,F))&&(e=a.sopt?a.sopt[0]:"select"===o.stype?"eq":k.defaultSearch,l=null!=G.p.customFilterDef&&null!=G.p.customFilterDef[e]?G.p.customFilterDef[e].operand:k.operands[e]||"",(e===i?Oe("td.ui-search-oper a",t).attr("soper","dummy"):Oe("td.ui-search-oper a",t).attr("soper",e)).text(l)),!0===k.autosearch&&(v(),e===i)&&Oe("td.ui-search-oper a",t).attr("soper",e).text(l)}),Oe(".clearsearchclass",j).keydown(function(e){13===e.keyCode&&(e.preventDefault(),Oe(".clearsearchclass",j).trigger("click"))}),Oe(G.grid.hDiv).on("scroll",function(e){G.grid.hScroll||(G.grid.bScroll=!0,G.grid.bDiv.scrollLeft=G.grid.hDiv.scrollLeft,G.p.footerrow&&(G.grid.sDiv.scrollLeft=G.grid.bDiv.scrollLeft),G.p.headerrow&&(G.grid.hrDiv.scrollLeft=G.grid.bDiv.scrollLeft)),G.grid.hScroll=!1}),G.p.colSpanHeader.length&&setTimeout(function(){Oe(G).jqGrid("setColSpanHeader")},0),this.p.filterToolbar=!0,this.triggerToolbar=v,this.clearToolbar=function(e){var t,r,i,o,a,n,l={},s={},d=0,p=(e="boolean"!=typeof e||e,Oe.each(G.p.colModel,function(){switch(r=Oe("#gs_"+G.p.idPrefix+Oe.jgrid.jqID(this.name),!0===this.frozen&&!0===G.p.frozenColumns?G.grid.fhDiv:G.grid.hDiv),i=this.searchoptions&&void 0!==this.searchoptions.defaultValue?this.searchoptions.defaultValue:void 0,t=this.index||this.name,s[t]=this.searchoptions&&this.searchoptions.sopt?this.searchoptions.sopt[0]:k.defaultSearch||"eq",this.stype){case"select":if(r.find("option").each(function(e){if(0===e&&(this.selected=!0),Oe(this).val()===i)return!(this.selected=!0)}),void 0!==i)l[t]=i,d++;else try{delete G.p.postData[t]}catch(e){}break;case"text":if(r.val(i||""),void 0!==i)l[t]=i,d++;else try{delete G.p.postData[t]}catch(e){}break;case"custom":Oe.jgrid.isFunction(this.searchoptions.custom_value)&&0",lt:"<",le:"<=",gt:">",ge:">=",bw:"LIKE",bn:"NOT LIKE",in:"IN",ni:"NOT IN",ew:"LIKE",en:"NOT LIKE",cn:"LIKE",nc:"NOT LIKE",nu:"IS NULL",nn:"ISNOT NULL"},buttons:[]},e,k||{}),this.each(function(){var i=this;if(i.grid){var t,r,o="fbox_"+i.p.id,a=!0,n=!0,l={themodal:"searchmod"+o,modalhead:"searchhd"+o,modalcontent:"searchcnt"+o,scrollelm:o},e=[],s=Oe.jgrid.styleUI[i.p.styleUI||"jQueryUI"].filter,d=Oe.jgrid.styleUI[i.p.styleUI||"jQueryUI"].common;if(k.styleUI=i.p.styleUI,"string"==typeof(t=Oe.isPlainObject(i.p._savedFilter)&&!Oe.isEmptyObject(i.p._savedFilter)?i.p._savedFilter:(!0===i.p.mergeSearch&&i.p.searchModules.hasOwnProperty("searchGrid")&&!1!==i.p.searchModules.searchGrid&&Oe.extend(i.p.postData,{filters:Oe.jgrid.splitSearch(i.p.searchModules)}),i.p.postData[k.sFilter]))&&(t=Oe.jgrid.parse(t)),!0===k.recreateFilter&&Oe("#"+Oe.jgrid.jqID(l.themodal)).remove(),void 0!==Oe("#"+Oe.jgrid.jqID(l.themodal))[0])S(Oe("#fbox_"+Oe.jgrid.jqID(i.p.id)));else{var p,c,u=Oe("
").insertBefore("#gview_"+Oe.jgrid.jqID(i.p.id)),h="left",g="",f=("rtl"===i.p.direction&&(h="right",g=" style='text-align:left'",u.attr("dir","rtl")),Oe.extend([],i.p.colModel)),m=""+k.Find+"",v=""+k.Reset+"",j="",b="",y=!1,w=-1,x=!1,_=[],m=(k.showQuery&&(j="Query"),Oe.jgrid.buildButtons(k.buttons,j+m,d)),q=null;if(Oe(i).jqGrid("isGroupHeaderOn")&&(F=Oe("table.ui-jqgrid-htable",i.grid.hDiv).find(".jqg-second-row-header"),c=i.p.groupHeader.length,void 0!==F[0])&&(q=i.p.groupHeader[c-1]),k.columns.length)f=k.columns,p=f[w=0].index||f[0].name;else{if(null!==q)for(var C=0;C"+k.tmplLabel+"")+""),void 0!==i.p.customFilterDef)for(var G in i.p.customFilterDef)i.p.customFilterDef.hasOwnProperty(G)&&!k.operands.hasOwnProperty(G)&&(k.odata.push({oper:G,text:i.p.customFilterDef[G].text}),k.operands[G]=i.p.customFilterDef[G].operand,!0===i.p.customFilterDef[G].unary)&&e.push(G);c=""+b+"

"+v+""+m+"
",o=Oe.jgrid.jqID(o),Oe("#"+o).jqFilter({columns:f,sortStrategy:k.sortStrategy,filter:k.loadDefaults?t:null,showQuery:k.showQuery,errorcheck:k.errorcheck,sopt:k.sopt,groupButton:k.multipleGroup,ruleButtons:k.multipleSearch,uniqueSearchFields:k.uniqueSearchFields,afterRedraw:k.afterRedraw,ops:k.odata,operands:k.operands,ajaxSelectOptions:i.p.ajaxSelectOptions,groupOps:k.groupOps,addsubgrup:k.addsubgrup,addrule:k.addrule,delgroup:k.delgroup,delrule:k.delrule,autoencode:i.p.autoencode,unaryOperations:e,onChange:function(){this.p.showQuery&&Oe(".query",this).text(this.toUserFriendlyString()),Oe.jgrid.isFunction(k.afterChange)&&k.afterChange.call(i,Oe("#"+o),k)},direction:i.p.direction,id:i.p.id}),u.append(c),Oe("#"+o+"_2").find("[data-index]").each(function(){var t=parseInt(Oe(this).attr("data-index"),10);0<=t&&Oe(this).on("click",function(e){k.buttons[t].click.call(i,Oe("#"+o),k,e)})}),y&&k.tmplFilters&&k.tmplFilters.length&&Oe(".ui-template",u).on("change",function(){var e=Oe(this).val();return"default"===e?Oe("#"+o).jqFilter("addFilter",t):Oe("#"+o).jqFilter("addFilter",k.tmplFilters[parseInt(e,10)]),!1}),!0===k.multipleGroup&&(k.multipleSearch=!0),Oe(i).triggerHandler("jqGridFilterInitialize",[Oe("#"+o)]),Oe.jgrid.isFunction(k.onInitializeSearch)&&k.onInitializeSearch.call(i,Oe("#"+o)),k.gbox="#gbox_"+Oe.jgrid.jqID(i.p.id);var F=Oe(".ui-jqgrid").css("font-size")||"11px";k.layer?Oe.jgrid.createModal(l,u,k,"#gview_"+Oe.jgrid.jqID(i.p.id),Oe("#gbox_"+Oe.jgrid.jqID(i.p.id))[0],"string"==typeof k.layer?"#"+Oe.jgrid.jqID(k.layer):k.layer,"string"==typeof k.layer?{position:"relative","font-size":F}:{"font-size":F}):Oe.jgrid.createModal(l,u,k,"#gview_"+Oe.jgrid.jqID(i.p.id),Oe("#gbox_"+Oe.jgrid.jqID(i.p.id))[0],null,{"font-size":F}),(k.searchOnEnter||k.closeOnEscape)&&Oe("#"+Oe.jgrid.jqID(l.themodal)).keydown(function(e){var t=Oe(e.target);return!k.searchOnEnter||13!==e.which||t.hasClass("add-group")||t.hasClass("add-rule")||t.hasClass("delete-group")||t.hasClass("delete-rule")||t.hasClass("fm-button")&&t.is("[id$=_query]")?k.closeOnEscape&&27===e.which?(Oe("#"+Oe.jgrid.jqID(l.modalhead)).find(".ui-jqdialog-titlebar-close").click(),!1):void 0:(e.preventDefault(),Oe("#"+o+"_search").click(),!1)}),j&&Oe("#"+o+"_query").on("click",function(){return Oe(".queryresult",u).toggle(),!1}),void 0===k.stringResult&&(k.stringResult=k.multipleSearch),Oe("#"+o+"_search").on("click",function(){var e,t={};return(r=Oe("#"+o)).find(".input-elm:focus").change(),x&&k.multipleSearch?(i.p._savedFilter={},e=Oe.jgrid.filterRefactor({ruleGroup:Oe.extend(!0,{},r.jqFilter("filterData")),ssfield:_,splitSelect:k.splitSelect,groupOpSelect:k.groupOpSelect}),i.p._savedFilter=Oe.extend(!0,{},r.jqFilter("filterData"))):e=r.jqFilter("filterData"),k.errorcheck&&(r[0].hideError(),k.showQuery||r.jqFilter("toSQLString"),r[0].p.error)?r[0].showError():(k.stringResult?(t[k.sFilter]=JSON.stringify(e),Oe.each([k.sField,k.sValue,k.sOper],function(){t[this]=""})):k.multipleSearch?(t[k.sFilter]=e,Oe.each([k.sField,k.sValue,k.sOper],function(){t[this]=""})):(t[k.sField]=e.rules[0].field,t[k.sValue]=e.rules[0].data,t[k.sOper]=e.rules[0].op,t[k.sFilter]=""),"string"!=typeof t[k.sFilter]&&(t[k.sFilter]=JSON.stringify(t[k.sFilter])),(i.p.search=!0)===i.p.mergeSearch&&i.p.searchModules.hasOwnProperty("searchGrid")&&!1!==i.p.searchModules.searchGrid&&k.multipleSearch?(""!==t[k.sFilter]?i.p.searchModules.searchGrid=t[k.sFilter]:i.p.searchModules.searchGrid=null,Oe.extend(i.p.postData,{filters:Oe.jgrid.splitSearch(i.p.searchModules)})):Oe.extend(i.p.postData,t),!1!==(n=(n=void 0===(n=Oe(i).triggerHandler("jqGridFilterSearch"))?!0:n)&&Oe.jgrid.isFunction(k.onSearch)?k.onSearch.call(i,i.p.filters):n)&&Oe(i).trigger("reloadGrid",[{page:1}]),k.closeAfterSearch&&Oe.jgrid.hideModal("#"+Oe.jgrid.jqID(l.themodal),{gb:"#gbox_"+Oe.jgrid.jqID(i.p.id),jqm:k.jqModal,onClose:k.onClose})),!1}),Oe("#"+o+"_reset").on("click",function(){var e={},t=Oe("#"+o);return i.p.search=!1,!(i.p.resetsearch=!0)===k.multipleSearch?e[k.sField]=e[k.sValue]=e[k.sOper]="":e[k.sFilter]="",t[0].resetFilter(),y&&Oe(".ui-template",u).val("default"),!0===i.p.mergeSearch&&i.p.searchModules.hasOwnProperty("searchGrid")&&!1!==i.p.searchModules.searchGrid?(i.p.searchModules.searchGrid=null,Oe.extend(i.p.postData,{filters:Oe.jgrid.splitSearch(i.p.searchModules)}),i.p.search=!0):Oe.extend(i.p.postData,e),!1!==(n=(n=void 0===(n=Oe(i).triggerHandler("jqGridFilterReset"))?!0:n)&&Oe.jgrid.isFunction(k.onReset)?k.onReset.call(i):n)&&Oe(i).trigger("reloadGrid",[{page:1}]),k.closeAfterReset&&Oe.jgrid.hideModal("#"+Oe.jgrid.jqID(l.themodal),{gb:"#gbox_"+Oe.jgrid.jqID(i.p.id),jqm:k.jqModal,onClose:k.onClose}),!1}),S(Oe("#"+o)),Oe(".fm-button:not(."+d.disabled+")",u).hover(function(){Oe(this).addClass(d.hover)},function(){Oe(this).removeClass(d.hover)})}}function S(e){(a=(a=void 0===(a=Oe(i).triggerHandler("jqGridFilterBeforeShow",[e]))?!0:a)&&Oe.jgrid.isFunction(k.beforeShowSearch)?k.beforeShowSearch.call(i,e):a)&&(Oe.jgrid.viewModal("#"+Oe.jgrid.jqID(l.themodal),{gbox:"#gbox_"+Oe.jgrid.jqID(i.p.id),jqm:k.jqModal,modal:k.modal,overlay:k.overlay,toTop:k.toTop}),Oe(i).triggerHandler("jqGridFilterAfterShow",[e]),Oe.jgrid.isFunction(k.afterShowSearch))&&k.afterShowSearch.call(i,e)}})},filterInput:function(n,l){return l=Oe.extend(!0,{defaultSearch:"cn",groupOp:"OR",searchAll:!1,beforeSearch:null,afterSearch:null,selectFirstFound:!1,firstFoundTimeout:30},l||{}),this.each(function(){var e,t,r,i,o,a=this;a.grid&&(t='{"groupOp":"'+l.groupOp+'","rules":[',r=0,n+="",Oe.each(a.p.colModel,function(){e=this.index||this.name,i=this.searchoptions||{},i=l.defaultSearch||(i.sopt?i.sopt[0]:l.defaultSearch),(void 0===this.search||this.search||l.searchAll)&&""!==n&&(0 select"),n=a.length,s.allValues&&(r="",l.push(":"+s.allValues));n--;)e=a[n],i=s.count_item?" ("+e.items.length+")":"",r+="",l.push(e.unique+":"+e.unique+i);o.append(r),o.on("change",function(){t.triggerToolbar()}),s.create_value&&(o=Oe.jgrid.getElemByAttrVal(t.p.colModel,"name",s.field,!1),Oe.isEmptyObject(o)||(o.searchoptions?Oe.extend(o.searchoptions,{value:l.join(";")}):(o.searchoptions={},o.searchoptions.value=l.join(";"))))}}})}});var i,J={};Oe.jgrid.extend({editGridRow:function(X,K){var e=Oe.jgrid.getRegional(this[0],"edit"),t=this[0].p.styleUI,$=Oe.jgrid.styleUI[t].formedit,Y=Oe.jgrid.styleUI[t].common;return K=Oe.extend(!0,{top:0,left:0,width:"500",datawidth:"auto",height:"auto",dataheight:"auto",modal:!1,overlay:30,drag:!0,resize:!0,url:null,mtype:"POST",clearAfterAdd:!0,closeAfterEdit:!1,reloadAfterSubmit:!0,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:!1,jqModal:!0,closeOnEscape:!1,addedrow:"first",topinfo:"",bottominfo:"",saveicon:[],closeicon:[],savekey:[!1,13],navkeys:[!1,38,40],checkOnSubmit:!1,checkOnUpdate:!1,processing:!1,onClose:null,ajaxEditOptions:{},serializeEditData:null,viewPagerButtons:!0,overlayClass:Y.overlay,removemodal:!0,form:"edit",template:null,focusField:!0,editselected:!1,html5Check:!1,buttons:[]},e,K||{}),J[Oe(this)[0].p.id]=K,this.each(function(){var u=this;if(u.grid&&X){u.p.savedData={};var h,g,r,e,f=u.p.id,m="FrmGrid_"+f,t="TblGrid_"+f,v="#"+Oe.jgrid.jqID(t),j={themodal:"editmod"+f,modalhead:"edithd"+f,modalcontent:"editcnt"+f,scrollelm:m},i=!0,o=1,a=0,n="string"==typeof J[u.p.id].template&&0").data("disabled",!1),d=n?(s=J[Oe(this)[0].p.id].template,l="",r=l="string"==typeof s?s.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){return''}):l,v):(r=Oe("
"),v+"_2"),m="#"+Oe.jgrid.jqID(m);if(Oe(y).append(""),Oe(y).append("
"+J[u.p.id].topinfo+"
"),Oe(u.p.colModel).each(function(){var e=this.formoptions;o=Math.max(o,e&&e.colpos||0),a=Math.max(a,e&&e.rowpos||0)}),Oe(y).append(r),!1!==(i=(i=void 0===(i=Oe(u).triggerHandler("jqGridAddEditBeforeInitData",[y,g]))?!0:i)&&Oe.jgrid.isFunction(J[u.p.id].beforeInitData)?J[u.p.id].beforeInitData.call(u,y,g):i)){if("_empty"!==X&&void 0!==u.p.savedRow&&0";"_empty"!==q&&(F=Oe(C).jqGrid("getInd",q)),Oe(C.p.colModel).each(function(t){if(p=this.name,c=(!this.editrules||!0!==this.editrules.edithidden)&&!0===this.hidden,T=c?"style='display:none'":"","cb"!==p&&"subgrid"!==p&&!0===this.editable&&"rn"!==p&&"sc"!==p){if(!1===F)x="";else if(p===C.p.ExpandColumn&&!0===C.p.treeGrid)x=Oe("td[role='gridcell']",C.rows[F]).eq(t).text();else{try{x=Oe.unformat.call(C,Oe("td[role='gridcell']",C.rows[F]).eq(t),{rowId:q,colModel:this},t)}catch(e){x=this.edittype&&"textarea"===this.edittype?Oe("td[role='gridcell']",C.rows[F]).eq(t).text():Oe("td[role='gridcell']",C.rows[F]).eq(t).html()}x&&" "!==x&&" "!==x&&(1!==x.length||160!==x.charCodeAt(0))||(x="")}var e,r=Oe.extend({},this.editoptions||{},{id:p,name:p,rowId:q,oper:g,module:"form",checkUpdate:J[u.p.id].checkOnSubmit||J[u.p.id].checkOnUpdate}),i=Oe.extend({},{elmprefix:"",elmsuffix:"",rowabove:!1,rowcontent:""},this.formoptions||{}),o=parseInt(i.rowpos,10)||G+1,a=parseInt(2*(parseInt(i.colpos,10)||1),10);"_empty"===q&&r.defaultValue&&(x=Oe.jgrid.isFunction(r.defaultValue)?r.defaultValue.call(u):r.defaultValue),this.edittype||(this.edittype="text"),u.p.autoencode&&(x=Oe.jgrid.htmlDecode(x)),_=Oe.jgrid.createEl.call(u,this.edittype,r,x,!1,Oe.extend({},Oe.jgrid.ajaxOptions,C.p.ajaxSelectOptions||{})),"select"===this.edittype&&(x=Oe(_).val(),"select-multiple"===Oe(_).get(0).type)&&(x=x&&x.join(",")),"checkbox"===this.edittype&&(x=Oe(_).is(":checked")?Oe(_).val():Oe(_).attr("offval")),Oe(_).addClass("FormElement"),"select"===this.edittype?Oe(_).addClass($.selectClass):-1"+i.rowcontent+""),Oe(I).append(e),e[0].rp=o),0===w.length&&(w=Oe(1":"").addClass("FormData").attr("id","tr_"+p),Oe(w).append(B),Oe(I).append(w),w[0].rp=o),Oe("td",w[0]).eq(a-2).html(""),Oe("td",w[0]).eq(a-1).append(i.elmprefix).append(_).append(i.elmsuffix),1