From f78e00b80fd29c9f9960f3831493db4515de7640 Mon Sep 17 00:00:00 2001 From: Tony Tomov Date: Wed, 19 Jul 2023 09:41:09 +0300 Subject: [PATCH] Publishing version 5.8.5 --- jqGrid.jquery.json | 2 +- js/grid.base.js | 2 +- js/jquery.jqGrid.js | 4 ++-- js/jquery.jqGrid.min.js | 4 ++-- js/minified/grid.base.js | 2 +- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jqGrid.jquery.json b/jqGrid.jquery.json index 43348e51b..761a2a96b 100644 --- a/jqGrid.jquery.json +++ b/jqGrid.jquery.json @@ -16,7 +16,7 @@ "forzen rows", "frozen columns" ], - "version": "5.8.4", + "version": "5.8.5", "author": { "name": "Tony Tomov", "email": "tony@trirand.com", diff --git a/js/grid.base.js b/js/grid.base.js index 0d9be644e..7220b6080 100644 --- a/js/grid.base.js +++ b/js/grid.base.js @@ -19,7 +19,7 @@ if(!$.jgrid.hasOwnProperty("defaults")) { $.jgrid.defaults = {}; } $.extend($.jgrid,{ - version : "5.8.4", + version : "5.8.5", isNull : function( p, strict_eq) { if(strict_eq && strict_eq === true) { return p === null; diff --git a/js/jquery.jqGrid.js b/js/jquery.jqGrid.js index 0452282f5..d302bf0fd 100644 --- a/js/jquery.jqGrid.js +++ b/js/jquery.jqGrid.js @@ -1,6 +1,6 @@ /** * -* @license Guriddo jqGrid JS - v5.8.4 - 2023-07-14 +* @license Guriddo jqGrid JS - v5.8.5 - 2023-07-19 * Copyright(c) 2008, Tony Tomov, tony@trirand.com * * License: http://guriddo.net/?page_id=103334 @@ -24,7 +24,7 @@ if(!$.jgrid.hasOwnProperty("defaults")) { $.jgrid.defaults = {}; } $.extend($.jgrid,{ - version : "5.8.4", + version : "5.8.5", isNull : function( p, strict_eq) { if(strict_eq && strict_eq === true) { return p === null; diff --git a/js/jquery.jqGrid.min.js b/js/jquery.jqGrid.min.js index 9805c3f95..cb1d68a2f 100644 --- a/js/jquery.jqGrid.min.js +++ b/js/jquery.jqGrid.min.js @@ -1,9 +1,9 @@ /** * -* @license Guriddo jqGrid JS - v5.8.4 - 2023-07-14 +* @license Guriddo jqGrid JS - v5.8.5 - 2023-07-19 * Copyright(c) 2008, Tony Tomov, tony@trirand.com * * License: http://guriddo.net/?page_id=103334 */ -!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(Ye){"use strict";Ye.jgrid=Ye.jgrid||{},Ye.jgrid.hasOwnProperty("defaults")||(Ye.jgrid.defaults={}),Ye.extend(Ye.jgrid,{version:"5.8.4",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=Ye.makeArray(arguments).slice(1),n=a.length;return(e=Ye.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=Ye.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).substr(0,9)?e.substr(9):e).substr(0,2)?e.substr(2,e.length-4):e)||"{}";return!0===Ye.jgrid.useJSON&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(e):Ye.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).substr(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||Ye.jgrid.uidPref)+Ye.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]?Ye(i[1],e):Ye(e)).attr(i[2]):(i=Ye(t,e),r?i:0
"),t=e.appendTo("body").find("td").width();return e.remove(),.1
'),t=(Ye("body").append(e),Ye("div",e).innerWidth()),r=(e.css("overflow-y","scroll"),Ye("div",e).innerWidth());return Ye(e).remove(),t-r<0?18:t-r},ajaxOptions:{},from:function(e){var v=this;return new function(e,t){"string"==typeof e&&(e=Ye.data(e));var g=this,o=e,f=!0,i=!1,r=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){var r=Ye.jgrid.isNull(t)?e:t,r=(i?Ye.jgrid.trim(r.toString()):r.toString()).length;return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr(0,"+r+") == "+g._getStr('"'+g._toStr(t)+'"')):(Ye.jgrid.isNull(t)||(r=(i?Ye.jgrid.trim(t.toString()):t.toString()).length),g._append(g._getStr("this")+".substr(0,"+r+") == "+g._getStr('"'+g._toStr(e)+'"'))),g._setCommand(g.startsWith,e),g._resetNegate(),g},this.endsWith=function(e,t){var r=Ye.jgrid.isNull(t)?e:t,r=(i?Ye.jgrid.trim(r.toString()):r.toString()).length;return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr("+g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".length-"+r+","+r+') == "'+g._toStr(t)+'"'):g._append(g._getStr("this")+".substr("+g._getStr("this")+'.length-"'+g._toStr(e)+'".length,"'+g._toStr(e)+'".length) == "'+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=Ye.jgrid.isNull(t)?"a":Ye.jgrid.trim(t.toString().toLowerCase()),Ye.jgrid.isNull(r)&&(r="text"),Ye.jgrid.isNull(i)&&(i="Y-m-d"),Ye.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(Ye.fn.jqGrid,e)},extend:function(e){Ye.extend(Ye.fn.jqGrid,e),this.no_legacy_api||Ye.fn.extend(e)},clearBeforeUnload:function(e){var t,r=Ye("#"+Ye.jgrid.jqID(e))[0];if(r.grid){t=r.grid,Ye.jgrid.isFunction(t.emptyRows)&&t.emptyRows.call(r,!0,!0),Ye(document).off("mouseup.jqGrid"+r.p.id),Ye(t.hDiv).off("mousemove"),Ye(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),Ye(n).trigger("jqGridAfterGridComplete.setFrozenRows"),e)&&(n.p.frozenColumns=!0)}function g(e){var t,r=Ye(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(){Ye.jgrid.searchColOnEnter(e,t,r,i)},50)},comboGrid:function(l,s,e){var t=Ye.jgrid.randId("combo"),r="div"+t,i=e.datatype,d=(e.datatype="local",e.onSelectRow=function(e){var e=Ye("#"+t).jqGrid("getRowData",e);Ye.isEmptyObject(e)||(e=Ye.jgrid.isFunction(s.return_fld)?s.return_fld.call(this,e):e[s.return_fld],Ye("#"+l).val(e),Ye("#"+r).hide())},e.data=[],e.scrollrows=!0,Ye("body").append("
"),e.pager&&Ye("body").append("
"),Ye("body").append("
"),Ye("#"+t).jqGrid(e),Ye("#"+t).jqGrid("bindKeys",{onSelectRow:!1}),Ye("#"+l).attr("autocomplete","off").data("comboGrid",{grid:t,divgrid:r}),document.getElementById(l).getBoundingClientRect());Ye("#"+r).css({"background-color":"inherit",position:"absolute",top:d.top+50+"px",left:d.left+10+"px",zIndex:2e4}).hide(),Ye("#"+l).on("keydown",function(e){var t,r=Ye(this).data("comboGrid").grid,i=Ye(this).data("comboGrid").divgrid,o=this;if(Ye("#"+i).is(":hidden")&&(d=document.getElementById(l).getBoundingClientRect(),Ye("#"+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,Ye("#rs_m"+Ye.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)||(w.hDiv.loading?w.timer=setTimeout(w.populateVisible,b.scrollTimeout):(b.page=l,(d=0b.scrollMaxBuffer-(0"),r=(Q.p.direction=Ye.jgrid.trim(Q.p.direction.toLowerCase()),Q.p._ald=!1,-1===Ye.inArray(Q.p.direction,["ltr","rtl"])&&(Q.p.direction="ltr"),v=Q.p.direction,Ye(t).insertBefore(this),Ye(this).appendTo(t),Ye("
")),A=(Ye(r).attr({id:"gbox_"+this.id,dir:v}).insertBefore(t),Ye(t).attr("id","gview_"+this.id).appendTo(r),Ye("
").insertBefore(t),Ye("
"+Ye.jgrid.getRegional(Q,"defaults.loadtext",this.p.loadtext)+"
").insertBefore(t),Ye(this).attr({role:"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id}),"indexeddb"===Q.p.datatype&&Ye(Q).jqGrid("dbInit",Q.p.datatype),Ye.jgrid.getFont(Q)),J=function(e,t){return void 0===t&&(t=0),e=parseInt(e,10),isNaN(e)?t:e},n=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: "+w.headers[e].width+"px;":(Ye.jgrid.isFunction(n.cellattr)||"string"==typeof n.cellattr&&!Ye.jgrid.isNull(Ye.jgrid.cellattr)&&Ye.jgrid.isFunction(Ye.jgrid.cellattr[n.cellattr]))&&(l=(Ye.jgrid.isFunction(n.cellattr)?n.cellattr:Ye.jgrid.cellattr[n.cellattr]).call(Q,o,r,i,n,a))&&"string"==typeof l&&(-1"+t+""},ee=function(e,t,r,i,o){var a=Ye.jgrid.getRegional(Q,"defaults.selectLine"),a='";return'"+a+""},te=function(e,t,r,i,o){r=(parseInt(r,10)-1)*parseInt(i,10)+1+t;return'"+r+""},re=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+""},ie=function(e){for(var t,r=[],i=0,o=0;o"},E=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,Ye.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]=Ye.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]=Ye.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=Ye(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}}};const 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",Ye("#"+Ye.jgrid.jqID(e)).append("
").attr("dir",v),0';for(d+=""}"rtl"===v&&(n+=d,Ye("#"+f).attr("align","left")),!0===Q.p.pginput&&(a=""+Ye.jgrid.template(Ye.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=[Ye.jgrid.getRegional(Q,"defaults.pgfirst",Q.p.pgfirst)||"",Ye.jgrid.getRegional(Q,"defaults.pgprev",Q.p.pgprev)||"",Ye.jgrid.getRegional(Q,"defaults.pgnext",Q.p.pgnext)||"",Ye.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=Ye.jgrid.jqID(e),t=Ye.jgrid.jqID(t),!0===Q.p.viewrecords&&Ye("td#"+e+"_"+Q.p.recordpos,"#"+t).append("
"),Ye("td#"+e+"_"+Q.p.pagerpos,"#"+t).append(n),o=Ye("#gbox_"+Ye.jgrid.jqID(Q.p.id)).css("font-size")||"11px",Ye("#gbox_"+Ye.jgrid.jqID(Q.p.id)).append(""),g=Ye(n).clone().appendTo("#testpg").width(),Ye("#testpg").remove(),0Ye("td#"+e+"_"+Q.p.pagerpos,"#"+t).innerWidth(),Ye("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,Ye(".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&&Ye(".ui-pg-selbox",Q.p.pager).val(this.value),Q.p.toppager&&Ye(".ui-pg-selbox",Q.p.toppager).val(this.value),x()),!1}),!0===Q.p.pgbuttons&&(Ye(".ui-pg-button","#"+t).hover(function(){Ye(this).hasClass(j)?this.style.cursor="default":(Ye(this).addClass(q),this.style.cursor="pointer")},function(){Ye(this).hasClass(j)||(Ye(this).removeClass(q),this.style.cursor="default")}),Ye("#first"+Ye.jgrid.jqID(l)+", #prev"+Ye.jgrid.jqID(l)+", #next"+Ye.jgrid.jqID(l)+", #last"+Ye.jgrid.jqID(l)).click(function(){var e,t,r,i,o,a,n;return Ye(this).hasClass(j)||(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&&(h+=''),Q.p.colSpanHeader.length)for(var g=0;g
",l.push(o),w||d.push(x),s&&!y&&(s=!1)}h+="",Ye(r).append(h),Ye("#col_menu").addClass("ui-menu "+I.menu_widget),Ye("#chk_all","#col_menu").prop("checked",s),Ye.jgrid.isElementInViewport(Ye("#col_menu")[0])||Ye("#col_menu").css("left",-parseInt(Ye("#column_menu").innerWidth(),10)+"px"),Ye.fn.html5sortable()&&Ye("#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),Ye(Q).jqGrid("destroyFrozenColumns"),Ye(Q).jqGrid("remapColumns",l,!0),Ye(Q).triggerHandler("jqGridColMenuColumnDone",[l,null,null]),Ye.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,null,null),Ye(Q).jqGrid("setFrozenColumns"),o=0;o li > a").on("click",function(e){var t;Ye(e.target).hasClass("notclick")||(Ye(e.target).is(":input")?t=Ye(e.target).is(":checked"):(t=!Ye("input",this).is(":checked"),Ye("input",this).prop("checked",t)),"check_all"===(e=Ye("input",this).attr("name"))?t?(Ye("input","#col_menu").prop("checked",!0),Ye(Q).jqGrid("showCol",d)):(Ye("input","#col_menu").prop("checked",!1),Ye(Q).jqGrid("hideCol",d)):(Ye(Q).triggerHandler("jqGridColMenuColumnDone",[l,e,t]),Ye.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,e,t),t?(Ye(Q).jqGrid("showCol",e),Ye(this).parent().attr("draggable","true")):(Ye(Q).jqGrid("hideCol",e),Ye(this).parent().attr("draggable","false")),i.columns_selectAll&&Ye("#chk_all","#col_menu").prop("checked",Ye(".chk_selected:checked","#col_menu").length===Ye(".chk_selected","#col_menu").length),Ye("#column_menu").remove()))}).hover(function(){Ye(this).addClass(q)},function(){Ye(this).removeClass(q)})},ge=function(e,t,r,i){var o,a,n,l,s,d,p=Q.p.colModel[e],c="",e="",u="",h="",g="",f="",m=Ye.jgrid.getRegional(Q,"search"),v=Ye.jgrid.styleUI[Q.p.styleUI||"jQueryUI"].common,j=Ye.jgrid.styleUI[b.styleUI||"jQueryUI"].modal;p&&((n=!(!Q.p.colFilters||!Q.p.colFilters[p.name])&&Q.p.colFilters[p.name])&&!Ye.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!==Ye.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=Ye("
"),s="",s=(s+="
"+Ye.jgrid.getRegional(Q,"colmenu.searchTitle")+"
")+'
",l.append(s),d="",p.searchoptions.defaultValue&&(d=Ye.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),e&&(d=e),j=Ye.extend(p.searchoptions,{name:p.index||p.name,id:"sval1_"+Q.p.idPrefix+p.name,oper:"search"}),e=Ye.jgrid.createEl.call(Q,p.stype,j,d,!1,Ye.extend({},Ye.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),Ye(e).addClass(I.filter_input),s=Ye("
").append(e),l.append(s),s='
",l.append(s),f="",Ye.each(m.odata,function(e,t){o=t.oper===h?'selected="selected"':"",-1!==Ye.inArray(t.oper,a)&&(f+='")}),s='
",l.append(s),d=g||"",j=Ye.extend(p.searchoptions,{name:p.index||p.name,id:"sval2_"+Q.p.idPrefix+p.name,oper:"search"}),e=Ye.jgrid.createEl.call(Q,p.stype,j,d,!1,Ye.extend({},Ye.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),Ye(e).addClass(I.filter_input),s=Ye("
").append(e),l.append(s),s="",l.append(s),l=Ye('').append(l),l=Ye('').append(l),Ye(i).append(l),Ye("#search_menu").addClass("ui-menu "+I.menu_widget),Ye.jgrid.isElementInViewport(Ye("#search_menu")[0])||Ye("#search_menu").css("left",-parseInt(Ye("#column_menu").innerWidth(),10)+"px"),Ye("#bs_reset, #bs_search","#search_menu","#bs_close").hover(function(){Ye(this).addClass(q)},function(){Ye(this).removeClass(q)}),Ye("#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=fe(),Ye.extend(Q.p.postData,{filters:Ye.jgrid.splitSearch(Q.p.searchModules)}),Q.p.search=!0):(Q.p.postData.filters=fe(),Q.p.search=!1,Q.p.resetsearch=!0),d="",p.searchoptions.defaultValue&&(d=Ye.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),Ye("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(d),Ye("#sval2_"+Q.p.idPrefix+p.name,"#search_menu").val(""),Ye.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"reset",column:p.name}),Ye(Q).trigger("reloadGrid")}),Ye("#bs_search",l).on("click",function(e){Q.p.colFilters[p.name]={oper1:Ye("#oper1","#search_menu").val(),value1:Ye("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(),rule:Ye("#operand","#search_menu").val(),oper2:Ye("#oper2","#search_menu").val(),value2:Ye("#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=fe(),Ye.extend(Q.p.postData,{filters:Ye.jgrid.splitSearch(Q.p.searchModules)})):Q.p.postData.filters=fe(),Q.p.search=!0,Ye.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"search",column:p.name}),Ye(Q).trigger("reloadGrid"),Ye("#column_menu").remove()}),Ye("#bs_close",l).on("click",function(){Ye("#column_menu").remove()}))},fe=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(!Ye.isEmptyObject(i)){if(""===i.value1&&""===i.value2)break;01"),this.p.colModel.unshift({name:"cb",width:Ye.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=Ye.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=Ye.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=Ye.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&&(B(),ne());var be,we,ye,p,c,xe,_e,qe,i="",Ce="",o="",a="";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]?(o=" ui-i-asc",a=" ui-i-desc"):"single"===Q.p.viewsortcols[1]&&(o=" ui-single-sort-asc",Ce=" style='display:none'",Q.p.viewsortcols[0]=!(a=" ui-single-sort-desc")),be=M?"class='ui-th-div-ie'":"",xe=""),Q.p.multiSort&&Q.p.sortname)for(D=Q.p.sortname.split(","),e=0;e",Ie=l.index||l.name,i+="
"+Q.p.colNames[e],l.width?l.width=parseInt(l.width,10):l.width=Q.p.defaultColWidth,"boolean"!=typeof l.title&&(l.title=!0),l.lso="",Ie===Q.p.sortname&&(Q.p.lastsort=e),Q.p.multiSort&&-1!==(O=Ye.inArray(Ie,D))&&(l.lso=G[O]),i+=xe,Q.p.colMenu&&l.colmenu&&(i+=""),i+="
"}i+="",l=xe=null,Ye(this).append(i),Ye("thead tr",this).first().find("th").hover(function(){Ye(this).addClass(q)},function(){Ye(this).removeClass(q)}),this.p.multiselect&&(_e=[],Ye("#cb_"+Ye.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?(Ye(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),s=J(this.width,0),!1===this.hidden&&(d+=s+u,this.fixed?g+=s+u:h++)}),isNaN(Q.p.width)&&(Q.p.width=d+(!1!==Q.p.shrinkToFit||isNaN(Q.p.height)?0:o)),w.width=parseInt(Q.p.width,10),Q.p.tblwidth=d,!1===Q.p.shrinkToFit&&!0===Q.p.forceFit&&(Q.p.forceFit=!1),!0===Q.p.shrinkToFit&&0this.maxWidth?(Me++,Oe+=s,this.width=this.maxWidth,Se=e):(this.width=s,Te+=s,Ae.push(e+"")),d+=this.width,De=e)}),Fe=(Ve=0)===a?-1:0,d+=Oe,-1);if(0Q.p.width&&(Q.p.colModel[De].width-=Q.p.tblwidth-parseInt(Q.p.width,10),Q.p.tblwidth=Q.p.width)}je=-1!==Q.p.styleUI.search("Bootstrap"),Ye(r).css("width",w.width+"px").append("
 
"),Q.p.scrollPopUp&&Ye(r).append("
"),Ye(t).css("width",w.width+"px"),i=Ye(Q).find("thead").first().get(0),Q.p.footerrow&&(ke+=""),Q.p.headerrow&&(Re+="
");var Ne=Ye(i).find("tr").first(),Ee="",ze=0,He=Ye.jgrid.getFont(Ye("th",Ne).first()[0]);if(Q.p.disableClick=!1,Ye("th",Ne).each(function(e){l=Q.p.colModel[e],we=l.width,void 0===l.resizable&&(l.resizable=!0),l.resizable?(ye=document.createElement("span"),Ye(ye).html(" ").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+v).css("cursor","col-resize"),Ye(this).addClass(Q.p.resizeclass)):ye="",Ye(this).css("width",we+"px").prepend(ye),ye=null;var t="",r="",r=(l.hidden&&(Ye(this).css("display","none"),t="display:none;"),l.labelClasses&&(r="class='"+l.labelClasses+"'"),Ee+="",w.headers[e]={width:we,el:this},"boolean"!=typeof(Ce=l.sortable)&&(l.sortable=!0,Ce=!0),l.name);"cb"!==r&&"subgrid"!==r&&"rn"!==r&&"sc"!==r&&Q.p.viewsortcols[2]&&Ye(">div",this).addClass("ui-jqgrid-sortable"),l.canvas_width=l.autosize_headers?Ye.jgrid.getTextWidth(Ye("div",this)[0].outerText,He)+(l.colmenu?Ye.jgrid.floatNum(Ye(".colmenuspan",this).parent().width()):0)+Ye.jgrid.floatNum(Ye("div",this).css("padding-left"))+Ye.jgrid.floatNum(Ye("div",this).css("padding-right"))+Ye.jgrid.floatNum(Ye(".ui-jqgrid-resize",this).width()):0,Ce&&(Q.p.multiSort?Q.p.viewsortcols[0]?(Ye("div span.s-ico",this).show(),l.lso&&Ye("div span.ui-icon-"+l.lso,this).removeClass(j).css("display","")):l.lso&&(Ye("div span.s-ico",this).show(),Ye("div span.ui-icon-"+l.lso,this).removeClass(j).css("display","")):Q.p.viewsortcols[0]?(Ye("div span.s-ico",this).show(),e===Q.p.lastsort&&Ye("div span.ui-icon-"+Q.p.sortorder,this).removeClass(j).css("display","")):e===Q.p.lastsort&&""!==Q.p.sortname&&(Ye("div span.s-ico",this).show(),Ye("div span.ui-icon-"+Q.p.sortorder,this).removeClass(j).css("display",""))),Q.p.footerrow&&(ke+=""),Q.p.headerrow&&(Re+="")}).mousedown(function(e){if(1===Ye(e.target).closest("th>span.ui-jqgrid-resize").length){var t,r=ue(this);if(e.preventDefault(),ze++,setTimeout(function(){ze=0},400),2!==ze)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"),Ye(e.target).closest(o));if(1===o.length)if(i=Q.p.frozenColumns?(i=Ye(this)[0].id.substring(Q.p.id.length+1),Ye.jgrid.getElemByAttrVal(Q.p.colModel,"name",i,!0)):ue(this),Ye(e.target).hasClass("colmenuspan")){if(Ye.jgrid.isNull(Ye("#column_menu")[0])||Ye("#column_menu").remove(),void 0!==i){var a,n,l,s,d,p=Ye("#gbox_"+Q.p.id).offset(),p=Ye(this).offset().left-p.left,c=("ltr"===Q.p.direction&&(p+=Ye(this).outerWidth()),i),u=void 0,h=Ye(w.hDiv).height(),g=(Ye(".ui-search-toolbar",w.hDiv)[0]&&!isNaN(Ye(".ui-search-toolbar",w.hDiv).height())&&(h-=Ye(".ui-search-toolbar",w.hDiv).height()),Ye(w.cDiv).is(":hidden")||(h+=Ye(w.cDiv).outerHeight()),Q.p.toolbar[1]&&"bottom"!==Q.p.toolbar[2]&&!Ye.jgrid.isNull(Ye(w.uDiv),!0)&&(h+=Ye(w.uDiv).outerHeight()),Q.p.toppager&&(h+=Ye("#"+Ye.jgrid.jqID(Q.p.id)+"_toppager").outerHeight()),p=parseInt(p,10),u=h,""),f=Q.p.colModel[c],m=Ye.extend({sorting:!0,columns:!0,filtering:!0,seraching:!0,grouping:!0,freeze:!0},f.coloptions),h=Ye.jgrid.getRegional(Q,"colmenu"),v=Q.p.colNames[c],j=[],b=Ye.jgrid.trim(f.name);for(l in j.push(g),f.sortable&&m.sorting&&(g='
  
",g+='",j.push(g)),m.columns&&(g='',g+='",j.push(g)),m.filtering&&(g='',g+='",j.push(g)),m.grouping&&(a=Ye.inArray(f.name,Q.p.groupingView.groupField),g='',g+='",j.push(g)),!m.freeze||Q.p.subGrid||Q.p.treeGrid||Q.p.cellEdit||(n=!f.frozen||!Q.p.frozenColumns,g='',g+='",j.push(g)),Q.p.colMenuCustom)Q.p.colMenuCustom.hasOwnProperty(l)&&(s=Q.p.colMenuCustom[l],Ye.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"custom",action:s,column:s.colname}),Ye(Q).triggerHandler("jqGridcolMenuBeforeProcess",[{module:"custom",action:s,column:s.colname}]),d=s.exclude.split(","),d=Ye.map(d,function(e){return Ye.jgrid.trim(e)}),s.colname===b||"_all_"===s.colname&&-1===Ye.inArray(b,d))&&(d='',g='","last"===s.position?(s.separator&&j.push(d),j.push(g)):"first"===s.position&&(s.separator&&j.unshift(d),j.unshift(g)));j.unshift('"),Ye("#gbox_"+Q.p.id).append(j.join("")),Ye("#column_menu").addClass("ui-search-menu modal-content column-menu jqgrid-column-menu ui-menu "+I.menu_widget).css({left:p,top:u}),"ltr"===Q.p.direction&&(v=Ye("#column_menu").width()+26,Ye("#column_menu").css("left",p-v+"px")),Ye("#column_menu > li > a").hover(function(){var e,t;Ye("#col_menu").remove(),Ye("#search_menu").remove(),"columns"===Ye(this).attr("data-value")&&(e=Ye(this).parent().width()+8,t=Ye(this).parent().position().top-5,he(t,e,Ye(this).parent(),m)),"filtering"===Ye(this).attr("data-value")&&(e=Ye(this).parent().width()+8,t=Ye(this).parent().position().top-5,ge(c,t,e,Ye(this).parent())),Ye(this).addClass(q)},function(){Ye(this).removeClass(q)}).click(function(){var e=Ye(this).attr("data-value"),t=Q.grid.headers[c].el;"sortasc"===e||"sortdesc"===e?(Ye.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"sorting",action:"sortasc"===e?"asc":"desc",column:f.name}),ce("jqgh_"+Q.p.id+"_"+f.name,c,!0,"sortasc"===e?"asc":"desc",t)):"grouping"===e?me(c,a):"freeze"===e&&ve(c,n),"grouping"!==e&&"freeze"!==e||Ye(this).remove(),Q.p.colMenuCustom.hasOwnProperty(e)&&(t=Q.p.colMenuCustom[e],Ye.jgrid.isFunction(t.funcname))&&(t.funcname.call(Q,b),t.closeOnRun)&&Ye(this).remove()}),parseFloat(Ye("#column_menu").css("left"))<0&&Ye("#column_menu").css("left",Ye(Q).css("left")),!0===Q.p.menubar&&Ye("#"+Q.p.id+"_menubar").hide(),e.stopPropagation()}}else Q.p.viewsortcols[2]||(t=!0,r=o.attr("sort")),Ye.jgrid.isNull(i)||ce(Ye("div",this)[0].id,i,t,r,this),void 0!==Q.p.selHeadInd&&Ye(w.headers[Q.p.selHeadInd].el).attr("tabindex","-1"),Q.p.selHeadInd=i,Ye(this).attr("tabindex","0")}),l=null,jQuery._cacheCanvas=null,Q.p.sortable&&Ye.fn.sortable)try{Ye(Q).jqGrid("sortableColumns",Ne)}catch(e){}Q.p.footerrow&&(ke+=""),Q.p.headerrow&&(Re+=""),Ee+="",Fe=document.createElement("tbody"),Ye(Fe).attr({role:"rowgroup"}),this.appendChild(Fe),Ye(this).addClass(K($,"rowTable",!0,"ui-jqgrid-btable ui-common-table")).append(Ee),Q.p.altRows&&Ye(this).addClass(K($,"stripedTable",!0,""));var m,_,Ue,Le,Ee=null,Ve=Ye("
").append(i),F=!(!Q.p.caption||!0!==Q.p.hiddengrid),t=Ye("
"),i=null,We=(w.hDiv=document.createElement("div"),w.hDiv.style.width=w.width-a+"px",w.hDiv.className=K($,"headerDiv",!0,"ui-jqgrid-hdiv"),Ye(w.hDiv).append(t),Ye(t).append(Ve),F&&Ye(w.hDiv).hide(),Q.p.pager&&("string"==typeof Q.p.pager?"#"===Q.p.pager.substr(0,1)&&(Q.p.pager=Q.p.pager.substring(1)):Q.p.pager=Ye(Q.p.pager).attr("id"),Ye("#"+Ye.jgrid.jqID(Q.p.pager)).css({width:w.width-a+"px"}).addClass(K($,"pagerBox",!0,"ui-jqgrid-pager")).appendTo(r),F&&Ye("#"+Ye.jgrid.jqID(Q.p.pager)).hide(),de(Q.p.pager,""),Q.p.pager="#"+Ye.jgrid.jqID(Q.p.pager)),!1===Q.p.cellEdit&&!0===Q.p.hoverrows&&Ye(Q).on({mouseover:function(e){c=Ye(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Ye(c).attr("class")&&Ye(c).addClass(q)},mouseout:function(e){c=Ye(e.target).closest("tr.jqgrow"),Ye(c).removeClass(q)}}),Ye(Q).before(w.hDiv).on({click:function(e){if(p=e.target,c=Ye(p,Q.rows).closest("tr.jqgrow"),0===Ye(c).length||-1td")).length&&(_=Ye.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&&Ye(Q).jqGrid("showAddEditButtons"),Q.p.searchCols&&!Ye.isEmptyObject(Q.p._results)&&(Q.p._results={},Ye.jgrid.searchColOnEnter(Q.p.id,null)),!1},dblclick:function(e){var t;if(p=e.target,c=Ye(p,Q.rows).closest("tr.jqgrow"),0!==Ye(c).length)return m=c[0].rowIndex,_=Ye.jgrid.getCellIndex(p),t=Ye(Q).triggerHandler("jqGridDblClickRow",[Ye(c).attr("id"),m,_,e]),!Ye.jgrid.isNull(t)||Ye.jgrid.isFunction(Q.p.ondblClickRow)&&(t=Q.p.ondblClickRow.call(Q,Ye(c).attr("id"),m,_,e),!Ye.jgrid.isNull(t))?t:void 0},contextmenu:function(e){var t;if(p=e.target,c=Ye(p,Q.rows).closest("tr.jqgrow"),0!==Ye(c).length)return Q.p.multiselect||Ye(Q).jqGrid("setSelection",c[0].id,!0,e),m=c[0].rowIndex,_=Ye.jgrid.getCellIndex(p),t=Ye(Q).triggerHandler("jqGridRightClickRow",[Ye(c).attr("id"),m,_,e]),!Ye.jgrid.isNull(t)||Ye.jgrid.isFunction(Q.p.onRightClickRow)&&(t=Q.p.onRightClickRow.call(Q,Ye(c).attr("id"),m,_,e),!Ye.jgrid.isNull(t))?t:void 0}}),w.bDiv=document.createElement("div"),M&&"auto"===String(Q.p.height).toLowerCase()&&(Q.p.height="100%"),Ye(w.bDiv).append(Ye('
').append("
").append(this)).addClass("ui-jqgrid-bdiv").css({height:Q.p.height+(isNaN(Q.p.height)?"":"px"),width:w.width-a+"px"}).on("scroll",w.scrollGrid),Ye(w.bDiv).find("table").first().css({width:Q.p.tblwidth+"px"}),Ye.support.tbody||2===Ye("tbody",this).length&&Ye("tbody",this).slice(1).remove(),Q.p.multikey&&(Ye.jgrid.msie()?Ye(w.bDiv).on("selectstart",function(){return!1}):Ye(w.bDiv).on("mousedown",function(){return!1})),F&&Ye(w.bDiv).hide(),C+" "+K($,"icon_caption_open",!0)),Qe=C+" "+K($,"icon_caption_close",!0),Xe=(w.cDiv=document.createElement("div"),!0===Q.p.hidegrid?Ye("").hover(function(){Xe.addClass(q)},function(){Xe.removeClass(q)}).append("").css("rtl"===v?"left":"right","0px"):"");Ye(w.cDiv).append(Xe).append(""+Q.p.caption+"").addClass("ui-jqgrid-titlebar ui-jqgrid-caption"+("rtl"===v?"-rtl":"")+" "+K($,"gridtitleBox",!0)),!0===Q.p.menubar&&(Ne='',Ye("#gbox_"+Q.p.id).append(Ne),Ye(w.cDiv).append(""),Ye(".ui-jqgrid-menubar",w.cDiv).hover(function(){Ye(this).addClass(q)},function(){Ye(this).removeClass(q)}).on("click",function(e){e=Ye(e.target).position();Ye("#"+Q.p.id+"_menubar").show(),"rtl"===Q.p.direction&&Ye("#"+Q.p.id+"_menubar").css({left:e.left-Ye("#"+Q.p.id+"_menubar").width()-20})})),Ye(w.cDiv).insertBefore(w.hDiv),Q.p.toolbar[0]&&(r=K($,"customtoolbarBox",!0,"ui-userdata"),w.uDiv=document.createElement("div"),"top"===Q.p.toolbar[1]?Ye(w.uDiv).insertBefore(w.hDiv):"bottom"===Q.p.toolbar[1]&&Ye(w.uDiv).insertAfter(w.hDiv),"both"===Q.p.toolbar[1]?(w.ubDiv=document.createElement("div"),Ye(w.uDiv).addClass(r+" ui-userdata-top").attr("id","t_"+this.id).insertBefore(w.hDiv).width(w.width-a),Ye(w.ubDiv).addClass(r+" ui-userdata-bottom").attr("id","tb_"+this.id).insertAfter(w.hDiv).width(w.width-a),F&&Ye(w.ubDiv).hide()):Ye(w.uDiv).width(w.width-a).addClass(r+" ui-userdata-top").attr("id","t_"+this.id),F)&&Ye(w.uDiv).hide(),Q.p.toppager&&(Q.p.toppager=Ye.jgrid.jqID(Q.p.id)+"_toppager",w.topDiv=Ye("
")[0],Ye(w.topDiv).addClass(K($,"toppagerBox",!0,"ui-jqgrid-toppager")).width(w.width-a).insertBefore(w.hDiv),de(Q.p.toppager,"_t"),Q.p.toppager="#"+Q.p.toppager),Q.p.footerrow&&(w.sDiv=Ye("
")[0],t=Ye("
"),Ye(w.sDiv).append(t).width(w.width-a).insertAfter(w.hDiv),Ye(t).append(ke),w.footers=Ye(".ui-jqgrid-ftable",w.sDiv)[0].rows[0].cells,Q.p.rownumbers&&(w.footers[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),F)&&Ye(w.sDiv).hide(),Q.p.headerrow&&(w.hrDiv=Ye("
")[0],t=Ye("
"),Ye(w.hrDiv).append(t).width(w.width-a).insertAfter(w.hDiv),Ye(t).append(Re),w.hrheaders=Ye(".ui-jqgrid-hrtable",w.hrDiv)[0].rows[0].cells,Q.p.rownumbers&&(w.hrheaders[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),F)&&Ye(w.nDiv).hide(),t=null,Q.p.caption?(Le=Q.p.datatype,!0===Q.p.hidegrid&&(Ye(".ui-jqgrid-titlebar-close",w.cDiv).click(function(e){var t,r=Ye.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+=", #"+Ye(w.ubDiv).attr("id")),i+=", #"+Ye(w.uDiv).attr("id")),t=Ye(i,"#gview_"+Ye.jgrid.jqID(Q.p.id)).length,"visible"===Q.p.gridstate?Ye(i,"#gbox_"+Ye.jgrid.jqID(Q.p.id)).slideUp("fast",function(){0===--t&&(Ye("span",o).removeClass(We).addClass(Qe),Q.p.gridstate="hidden",Ye("#gbox_"+Ye.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&Ye(".ui-resizable-handle","#gbox_"+Ye.jgrid.jqID(Q.p.id)).hide(),Ye(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),r)&&!F&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}):"hidden"===Q.p.gridstate&&Ye(i,"#gbox_"+Ye.jgrid.jqID(Q.p.id)).slideDown("fast",function(){0===--t&&(Ye("span",o).removeClass(Qe).addClass(We),F&&(Q.p.datatype=Le,x(),F=!1),Q.p.gridstate="visible",Ye("#gbox_"+Ye.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&Ye(".ui-resizable-handle","#gbox_"+Ye.jgrid.jqID(Q.p.id)).show(),Ye(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),r)&&!F&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}),!1}),F)&&(Q.p.datatype="local",Ye(".ui-jqgrid-titlebar-close",w.cDiv).trigger("click"))):(Ye(w.cDiv).hide(),Q.p.toppager||Ye(w.hDiv).addClass(K(Q.p.styleUI+".common","cornertop",!0))),(Q.p.headerrow?Ye(w.hrDiv):Ye(w.hDiv)).after(w.bDiv),Ye(w.hDiv).mousemove(function(e){if(w.resizing)return w.dragMove(e),!1}),Ye(".ui-jqgrid-labels",w.hDiv).on("selectstart",function(){return!1}),Ye(document).on("mouseup.jqGrid"+Q.p.id,function(){return!w.resizing||(w.dragEnd(!0),!1)}),"rtl"===Q.p.direction&&Ye(Q).on("jqGridAfterGridComplete.setRTLPadding",function(){var e=w.bDiv.offsetWidth-w.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,Ye(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){Ye(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 "+j):"jqgfirstrow not-editable-row not-editable-cell",s=(s=le("norecs",!1,l,{},""))+(Q.p.emptyRecordRow?""+Ye.jgrid.getRegional(Q,"defaults.emptyrecords",Q.p.emptyrecords)+"":" ")+"",Ye(w.bDiv).find("table").first().append(s)),t&&Q.p.jqgdnd&&Ye(Q).jqGrid("gridDnD","updateDnD"),Ye(Q).triggerHandler("jqGridGridComplete"),Ye.jgrid.isFunction(Q.p.gridComplete)&&Q.p.gridComplete.call(Q),Ye(Q).triggerHandler("jqGridAfterGridComplete")},Q.refreshIndex=ne,Q.setHeadCheckBox=se,Q.constructTr=le,Q.formatter=function(e,t,r,i,o){return P(e,t,r,i,o)},Ye.extend(w,{populate:x,emptyRows:ae,beginReq:L,endReq:y}),this.grid=w,Q.addXmlData=function(e){E(e)},Q.addJSONData=function(e){z(e)},Q.addLocalData=function(e){return U(e)},Q.addIndexedDBData=function(e){return H(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]=Ye(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)Ye(e.grid.bDiv).find("table").first().append(p.join(""));else switch(s){case"last":Ye(e.rows[e.rows.length-1]).after(p.join("")),g=e.rows.length-1;break;case"first":Ye(e.rows[0]).after(p.join("")),g=1;break;case"after":(g=Ye(e).jqGrid("getGridRowById",d))&&(Ye(e.rows[g.rowIndex+1]).hasClass("ui-subgrid")?Ye(e.rows[g.rowIndex+1]).after(p):Ye(g).after(p.join("")),g=g.rowIndex+1);break;case"before":(g=Ye(e).jqGrid("getGridRowById",d))&&(Ye(g).before(p.join("")),g=g.rowIndex-1)}if(!0===e.p.subGrid&&Ye(e).jqGrid("addSubGrid",c+h,g),e.p.records++,e.p.reccount++,Ye(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]=y,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=Ye(e).jqGrid("getGridRowById","norecs"))&&g.rowIndex&&0tr"+(t||""),e).each(function(){var t=this,r=Ye.makeArray(t.cells);Ye.each(i,function(){var e=r[this];e&&t.appendChild(e)})})}r(o.p.colModel),r(o.p.colNames),r(o.grid.headers),a(Ye(o.grid.hDiv).find("thead").first(),t&&":not(.ui-jqgrid-labels)"),e&&a(Ye("#"+Ye.jgrid.jqID(o.p.id)+" tbody").first(),".jqgfirstrow, tr.jqgrow, tr.jqfoot, tr.jqgroup"),o.p.footerrow&&a(Ye(o.grid.sDiv).find("tbody").first()),o.p.headerrow&&a(Ye(o.grid.hrDiv).find("tbody").first()),o.p.remapColumns&&(o.p.remapColumns.length?r(o.p.remapColumns):o.p.remapColumns=Ye.makeArray(i)),o.p.lastsort=Ye.inArray(o.p.lastsort,i),o.p.treeGrid&&(o.p.expColInd=Ye.inArray(o.p.expColInd,i)),Ye(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=Ye.jgrid.cell_width?0:r.p.cellLayout,n=0,l=!1,s=r.p.scrollOffset,d=0,p=-1===r.p.styleUI.search("Bootstrap")||isNaN(r.p.height)?0:2;if("boolean"!=typeof j&&(j=r.p.shrinkToFit),"boolean"!=typeof b&&(b=!0),!isNaN(v)){if(v=parseInt(v,10),r.grid.width=r.p.width=v,Ye("#gbox_"+Ye.jgrid.jqID(r.p.id)).css("width",v+"px"),Ye("#gview_"+Ye.jgrid.jqID(r.p.id)).css("width",v+"px"),Ye(r.grid.bDiv).css("width",v-p+"px"),Ye(r.grid.hDiv).css("width",v-p+"px"),r.p.pager&&Ye(r.p.pager).css("width",v-p+"px"),r.p.toppager&&Ye(r.p.toppager).css("width",v-p+"px"),!0===r.p.toolbar[0]&&(Ye(r.grid.uDiv).css("width",v-p+"px"),"both"===r.p.toolbar[1])&&Ye(r.grid.ubDiv).css("width",v-p+"px"),r.p.footerrow&&Ye(r.grid.sDiv).css("width",v-p+"px"),r.p.headerrow&&Ye(r.grid.hrDiv).css("width",v-p+"px"),(e=Ye(r).jqGrid("isGroupHeaderOn"))&&Ye(r).jqGrid("destroyGroupHeader",!1),r.p.frozenColumns&&b&&(Ye(r).jqGrid("destroyFrozenColumns"),i=!0),!1===j&&!0===r.p.forceFit&&(r.p.forceFit=!1),!0===j){if(Ye.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=Ye("#norecs","#"+Ye.jgrid.jqID(r.p.id)).eq(0),h=(isNaN(r.p.height)||(Ye(r.grid.bDiv)[0].clientHeight<=Ye(r.grid.bDiv)[0].scrollHeight||r.rows.length===u.length+1||"scroll"===Ye(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=Ye(r.grid.bDiv)[0].scrollWidth>Ye(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(Ye(r.grid.bDiv).find("table").first().css("width",r.p.tblwidth+"px"),Ye(r.grid.hDiv).find("table").first().css("width",r.p.tblwidth+"px"),r.grid.hDiv.scrollLeft=r.grid.bDiv.scrollLeft,r.p.footerrow&&Ye(r.grid.sDiv).find("table").first().css("width",r.p.tblwidth+"px"),r.p.headerrow&&Ye(r.grid.hrDiv).find("table").first().css("width",r.p.tblwidth+"px"),e){var f=Ye.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))&&Ye(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),Ye.jgrid.getFont(this[0]));return this.each(function(){var t=this,r=-1,e=t.p.colModel;if(t.grid&&0<=(r=isNaN(n)?Ye.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=Ye('
'),Ye("#gview_"+Ye.jgrid.jqID(l.p.id)).append(l.grid.fhDiv),t=Ye(".ui-jqgrid-htable","#gview_"+Ye.jgrid.jqID(l.p.id)).clone(!0),Ye(t).width(1),Ye(l.grid.fhDiv).append(t),Ye(l).jqGrid("isGroupHeaderOn")?(Ye("tr.jqg-third-row-header",l.grid.hDiv).height(),Ye("tr.jqg-first-row-header, tr.jqg-third-row-header",t).each(function(){Ye("th",this).slice(l.p.frozenColCount+1).remove()}),i=r=-1,Ye("tr.jqg-second-row-header th",t).each(function(){if(o=parseInt(Ye(this).attr("colspan"),10),parseInt(Ye(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),Ye("tr.jqg-second-row-header",t).each(function(){Ye("th",this).slice(i+1).remove()}),a=Ye("tr.jqg-second-row-header th",t).filter(function(){return"none"!==Ye(this).css("display")}).first(),"object"===Ye.jgrid.type(a)&&a.length&&""===Ye.jgrid.trim(a[0].outerText)&&a.html(" "),a=Ye("tr.jqg-third-row-header th",t).filter(function(){return"none"!==Ye(this).css("display")}).first(),"object"===Ye.jgrid.type(a)&&a.length&&""===Ye.jgrid.trim(a[0].outerText)&&Ye("div",a).prepend(" ")):(n=[],Ye("#gview_"+Ye.jgrid.jqID(l.p.id)+" .ui-jqgrid-htable > thead >tr").each(function(e,t){n.push(parseInt(Ye(this).height(),10))}),Ye("thead >tr",t).each(function(){Ye("th",this).slice(l.p.frozenColCount+1).remove()}),Ye("thead >tr",t).each(function(e){0===e&&--n[e],Ye(this).height(n[e])})),Ye.jgrid.msie()||Ye(t).css("height","100%"),Ye(l.grid.fhDiv).mousemove(function(e){if(l.grid.resizing)return l.grid.dragMove(e),!1}),l.p.sortable&&Ye.fn.sortable&&Ye(l.grid.fhDiv).find("tr.ui-jqgrid-labels th").addClass("sortable-disabled"),l.p.headerrow&&(l.grid.fhrDiv=Ye('
'),Ye("#gview_"+Ye.jgrid.jqID(l.p.id)).append(l.grid.fhrDiv)),l.p.footerrow&&(l.grid.fsDiv=Ye('
'),Ye("#gview_"+Ye.jgrid.jqID(l.p.id)).append(l.grid.fsDiv)),Ye("#gview_"+Ye.jgrid.jqID(l.p.id)).append(l.grid.fbDiv),Ye(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&&Ye("#"+Ye.jgrid.jqID(l.p.id)).off("mouseover mouseout"),Ye(l).on("jqGridAfterGridComplete.setFrozenColumns",function(){Ye("#"+Ye.jgrid.jqID(l.p.id)+"_frozen").remove(),Ye(l.grid.fbDiv).height(Ye(l.grid.bDiv)[0].clientHeight);var e,i=[],t=(Ye("#"+Ye.jgrid.jqID(l.p.id)+" tr[role=row].jqgrow").each(function(){i.push(Ye(this).height())}),Ye("#"+Ye.jgrid.jqID(l.p.id)).clone(!0));Ye("tr[role=row]",t).each(function(){Ye("td[role=gridcell]",this).slice(l.p.frozenColCount+1).remove()}),Ye(t).width(1).attr("id",l.p.id+"_frozen"),Ye(l.grid.fbDiv).append(t),Ye("tr[role=row].jqgrow",t).each(function(e,t){var r;Ye(this).height(i[e]),.3<=Math.abs(Ye(this).height()-i[e])&&(r=Ye("td:visible",this).first()).height(i[e]-Math.round(parseFloat(r.css("border-bottom-width"))))}),l.rows[1]&&"norecs"===l.rows[1].id&&Ye("#norecs td",t).html(""),Ye(l.grid.fbDiv)[0].scrollTop=Ye(l.grid.bDiv)[0].scrollTop,!0===l.p.hoverrows&&(Ye("tr.jqgrow",t).hover(function(){Ye(this).addClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(l.p.id)).addClass(u)},function(){Ye(this).removeClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(l.p.id)).removeClass(u)}),Ye("tr.jqgrow","#"+Ye.jgrid.jqID(l.p.id)).hover(function(){Ye(this).addClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(l.p.id)+"_frozen").addClass(u)},function(){Ye(this).removeClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(l.p.id)+"_frozen").removeClass(u)})),l.p.headerrow&&(t=Ye(l.grid.hrDiv).position(),Ye("table",l.grid.fhrDiv).remove(),e=Ye(".ui-jqgrid-hrtable","#gview_"+Ye.jgrid.jqID(l.p.id)).clone(!0),Ye("tr",e).each(function(){Ye("td",this).slice(l.p.frozenColCount+1).remove()}),Ye(e).width(1),Ye(l.grid.fhrDiv).css("top",t.top+"px").append(e)),l.p.footerrow&&(t=Ye(l.grid.sDiv).position(),Ye("table",l.grid.fsDiv).remove(),e=Ye(".ui-jqgrid-ftable","#gview_"+Ye.jgrid.jqID(l.p.id)).clone(!0),Ye("tr",e).each(function(){Ye("td",this).slice(l.p.frozenColCount+1).remove()}),Ye(e).width(1),Ye(l.grid.fsDiv).css("top",t.top+"px").append(e))}),l.grid.hDiv.loading||Ye(l).triggerHandler("jqGridAfterGridComplete.setFrozenColumns"),l.p.frozenColumns=!0,Ye(l).triggerHandler("onFrozenColumnsCall"))}}})},destroyFrozenColumns:function(){return this.each(function(){var e,t,r;this.grid&&!0===this.p.frozenColumns&&(t=Ye(e=this).jqGrid("getStyleUI",e.p.styleUI+".common","hover",!0),Ye(e.grid.fhDiv).remove(),Ye(e.grid.fbDiv).remove(),e.grid.fhDiv=null,e.grid.fbDiv=null,e.p.footerrow&&(Ye(e.grid.fsDiv).remove(),e.grid.fsDiv=null),e.p.headerrow&&(Ye(e.grid.fhrDiv).remove(),e.grid.fhrDiv=null),Ye(this).off(".setFrozenColumns"),!0===e.p.hoverrows&&Ye("#"+Ye.jgrid.jqID(e.p.id)).on({mouseover:function(e){r=Ye(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Ye(r).attr("class")&&Ye(r).addClass(t)},mouseout:function(e){r=Ye(e.target).closest("tr.jqgrow"),Ye(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?Ye("#"+this.p.id+"_menubar").append(a):Ye("#"+this.p.id+"_menubar").prepend(a)}Ye("li a","#"+this.p.id+"_menubar").each(function(e,r){Ye(o).each(function(e,t){if(t.id===r.id&&Ye.jgrid.isFunction(t.click))return Ye(r).on("click",function(e){t.click.call(i,e)}),!1}),Ye(this).hover(function(e){Ye(this).addClass(n.hover),e.stopPropagation()},function(e){Ye(this).removeClass(n.hover)})})})},menubarDelete:function(e){return this.each(function(){Ye("#"+e,"#"+this.p.id+"_menubar").remove()})},addColSearchMenu:function(){return this.each(function(){var e=this;Ye(e).colMenuAdd("sc",{title:"Reset",position:"first",id:"reset",funcname:function(){Ye("input[id^='jqs_']","#"+this.p.id).each(function(e){Ye(this).val("")}),Ye(this)[0].p._results={},Ye(this).jqGrid("showCol",this.p._avc)}}),Ye(e).colMenuAdd("sc",{separator:!0,id:"groupOp"}),Ye(e).colMenuAdd("sc",{separator:!0,id:"operOp"}),Ye(e).colMenuAdd("sc",{separator:!0,id:"close",funcname:function(){return!0}}),Ye(e).on("jqGridcolMenuBeforeProcess.custom",function(e,t){if("custom"===t.module&&"sc"===t.column){var r,i,o,a=Ye.jgrid.getRegional(this,"search"),n=this.p.searchColOptions,l=Ye.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(){Ye("#opselect").on("change",function(){var e=Ye("#"+Ye(this).attr("data-grid-id"))[0];e.p.searchColOptions.searchOp=Ye(this).val(),Ye.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(){Ye("#selectoper").on("change",function(){var e=Ye("#"+Ye(this).attr("data-grid-id"))[0];e.p.searchColOptions.operand=Ye(this).val(),Ye.jgrid.myfunc(e.p.id)})},200)}}})})},disableColMenu:function(e){return this.each(function(){Ye(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","none")})},enableColMenu:function(e){return this.each(function(){Ye(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","inline")})}}),Ye.jgrid.extend({editCell:function(c,u,h,g,f){return this.each(function(){var e,t,r,i,o=this,a=Ye(this).jqGrid("getStyleUI",o.p.styleUI+".common","highlight",!0),n=o.p.ariaBody?"":Ye(this).jqGrid("getStyleUI",o.p.styleUI+".common","hover",!0),l=Ye(this).jqGrid("getStyleUI",o.p.styleUI+".celledit","inputClass",!0),s=Ye(this).jqGrid("getStyleUI",o.p.styleUI+".celledit","selectClass",!0);if(o.grid&&!0===o.p.cellEdit){if(u=parseInt(u,10),o.p.selrow=o.rows[c].id,o.p.knv||o.p.ariaBody||Ye(o).jqGrid("GridNav"),0"+t,d.bClose,{styleUI:i.p.styleUI,top:c.top+30,left:c.left,onClose:function(){i.p.restoreCellonFail||Ye("#"+y+"_"+p,a).focus()}}),i.p.restoreCellonFail&&Ye(i).jqGrid("restoreCell",y,x)}},Ye.jgrid.ajaxOptions,i.p.ajaxCellOptions||{}))}else try{Ye.jgrid.info_dialog(s.errcap,s.nourl,d.bClose,{styleUI:i.p.styleUI}),i.p.restoreCellonFail&&Ye(i).jqGrid("restoreCell",y,x)}catch(e){}"clientArray"===i.p.cellsubmit?(Ye(n).empty(),Ye(i).jqGrid("setCell",i.p.savedRow[l].rowId,x,h,!1,!1,!0),n=Ye("td",a).eq(x),Ye(n).addClass("dirty-cell"),Ye(a).addClass("edited"),Ye(i).triggerHandler("jqGridAfterSaveCell",[i.p.savedRow[l].rowId,o,u,y,x]),Ye.jgrid.isFunction(i.p.afterSaveCell)&&i.p.afterSaveCell.call(i,i.p.savedRow[l].rowId,o,u,y,x),i.p.savedRow.splice(0,1)):"storage"===i.p.cellsubmit&&((j=i.p.savedRow[l])[o]=u,j[i.p.keyName]=Ye.jgrid.stripPref(i.p.idPrefix,i.p.savedRow[l].rowId),Ye(i).jqGrid("updateStorageRecord",j).then(function(e){"complete"===e.type&&(Ye(n).empty(),Ye(i).jqGrid("setCell",i.p.savedRow[l].rowId,x,h,!1,!1,!0),n=Ye("td",a).eq(x),Ye(n).addClass("dirty-cell"),Ye(a).addClass("edited"),Ye(i).triggerHandler("jqGridAfterSaveCell",[i.p.savedRow[l].rowId,o,u,y,x]),Ye.jgrid.isFunction(i.p.afterSaveCell)&&i.p.afterSaveCell.call(i,i.p.savedRow[l].rowId,o,u,y,x),i.p.savedRow.splice(0,1))}).catch(function(e){Ye.jgrid.info_dialog("Error",e.target.error.name+" : "+e.target.error.message,"Close")}))}else try{Ye.jgrid.isFunction(i.p.validationCell)?i.p.validationCell.call(i,Ye("#"+y+"_"+p,a),f[1],y,x):(window.setTimeout(function(){Ye.jgrid.info_dialog(s.errcap,u+" "+f[1],d.bClose,{styleUI:i.p.styleUI,top:c.top+30,left:c.left,onClose:function(){i.p.restoreCellonFail||Ye("#"+y+"_"+p,a).focus()}})},50),i.p.restoreCellonFail&&Ye(i).jqGrid("restoreCell",y,x))}catch(e){alert(f[1])}}else Ye(i).jqGrid("restoreCell",y,x)}window.setTimeout(function(){Ye("#"+Ye.jgrid.jqID(i.p.knv)).attr("tabindex","-1").focus(),i.p.ariaBody&&Ye(i).jqGrid("focusBodyCell",i.p.iRow,i.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=Ye(e).jqGrid("getGridRowById",e.p.savedRow[t].rowId),r=Ye("td",r).eq(o);if(Ye.jgrid.isFunction(Ye.fn.datepicker))try{Ye("input.hasDatepicker",r).datepicker("hide")}catch(e){}Ye(r).empty().attr("tabindex","-1"),Ye(e).jqGrid("setCell",e.p.savedRow[0].rowId,o,e.p.savedRow[t].v,!1,!1,!0),Ye(e).triggerHandler("jqGridAfterRestoreCell",[e.p.savedRow[t].rowId,e.p.savedRow[t].v,i,o]),Ye.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(){Ye("#"+e.p.knv).attr("tabindex","-1").focus(),e.p.ariaBody&&Ye(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)?Ye(l.grid.bDiv)[0].scrollLeft=Ye(l.grid.bDiv)[0].scrollLeft+l.rows[e].cells[t].clientWidth:n
"),Ye(e).insertBefore(l.grid.cDiv),Ye("#"+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+""),Ye("").hover(function(){h.addClass(p.hover)},function(){h.removeClass(p.hover)}).append("")),g=(Ye(u).append(h),s?(c.dir="rtl",Ye(".ui-jqdialog-title",u).css("float","right"),Ye(".ui-jqdialog-titlebar-close",u).css("left","0.3em")):(c.dir="ltr",Ye(".ui-jqdialog-title",u).css("float","left"),Ye(".ui-jqdialog-titlebar-close",u).css("right","0.3em")),document.createElement("div")),e=(Ye(g).addClass("ui-jqdialog-content "+d.content).attr("id",r.modalcontent),Ye(g).append(e),c.appendChild(g),Ye(c).prepend(u),!0===a?Ye("body").append(c):"string"==typeof a?Ye(a).append(c):Ye(c).insertBefore(t),Ye(c).css(n),void 0===i.jqModal&&(i.jqModal=!0),{});Ye.fn.jqm&&!0===i.jqModal?(0===i.left&&0===i.top&&i.overlay&&(g=[],g=Ye.jgrid.findPos(o),i.left=g[0]+4,i.top=g[1]+4),e.top=i.top+"px",e.left=i.left):0===i.left&&0===i.top||(e.left=i.left,e.top=i.top+"px"),Ye("a.ui-jqdialog-titlebar-close",u).click(function(){var e=Ye("#"+Ye.jgrid.jqID(r.themodal)).data("onClose")||i.onClose,t=Ye("#"+Ye.jgrid.jqID(r.themodal)).data("gbox")||i.gbox;return l.hideModal("#"+Ye.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=Ye(t).parents("*[role=dialog]").first().css("z-index"),i.zIndex=n?parseInt(n,10)+2:950);if(s&&e.hasOwnProperty("left")&&!a&&(o=Ye(i.gbox).outerWidth()-(isNaN(i.width)?0:parseInt(i.width,10))+12,e.left=parseInt(e.left,10)+parseInt(o,10)),e.hasOwnProperty("left")&&(e.left+="px"),Ye(c).css(Ye.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(Ye(u).css("cursor","move"),Ye.fn.tinyDraggable)Ye(c).tinyDraggable({handle:"#"+Ye.jgrid.jqID(u.id)});else try{Ye(c).draggable({handle:Ye("#"+Ye.jgrid.jqID(u.id))})}catch(e){}if(i.resize)if(Ye.fn.jqResize)Ye(c).append("
"),Ye("#"+Ye.jgrid.jqID(r.themodal)).jqResize(".jqResize",!!r.scrollelm&&"#"+Ye.jgrid.jqID(r.scrollelm));else try{Ye(c).resizable({handles:"se, sw",alsoResize:!!r.scrollelm&&"#"+Ye.jgrid.jqID(r.scrollelm)})}catch(e){}!0===i.closeOnEscape&&Ye(c).keydown(function(e){27===e.which&&(e=Ye("#"+Ye.jgrid.jqID(r.themodal)).data("onClose")||i.onClose,l.hideModal("#"+Ye.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=Ye.extend({toTop:!0,overlay:10,modal:!1,overlayClass:"ui-widget-overlay",onShow:Ye.jgrid.showModal,onHide:Ye.jgrid.closeModal,gbox:"",jqm:!0,jqM:!0},t||{})).gbox){var i=Ye("#"+t.gbox.substring(6))[0];try{r=Ye(i).jqGrid("getStyleUI",i.p.styleUI+".common","overlay",!1,"jqgrid-overlay-modal"),t.overlayClass=Ye(i).jqGrid("getStyleUI",i.p.styleUI+".common","overlay",!0)}catch(e){}}if(void 0===t.focusField&&(t.focusField=0),"number"==typeof t.focusField&&0<=t.focusField?t.focusField=parseInt(t.focusField,10):"boolean"!=typeof t.focusField||t.focusField?t.focusField=0:t.focusField=!1,Ye.fn.jqm&&!0===t.jqm)(t.jqM?Ye(e).attr("aria-hidden","false").jqm(t):Ye(e).attr("aria-hidden","false")).jqmShow();else if(""!==t.gbox&&(i=parseInt(Ye(e).css("z-index"))-1,t.modal?(Ye(".jqgrid-overlay-modal")[0]||Ye("body").prepend("
"),Ye(".jqgrid-overlay-modal").css("z-index",i).show()):(Ye(t.gbox).find(".jqgrid-overlay").first().css("z-index",i).show(),Ye(e).data("gbox",t.gbox))),Ye(e).show().attr("aria-hidden","false"),0<=t.focusField)try{Ye(":input:visible",e)[t.focusField].focus()}catch(e){}},info_dialog:function(e,t,r,i){var o,a={width:290,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:[]},n=(Ye.extend(!0,a,Ye.jgrid.jqModal||{},{caption:""+e+""},i||{}),a.jqModal),l=this,e=Ye.jgrid.styleUI[a.styleUI||"jQueryUI"].modal,s=Ye.jgrid.styleUI[a.styleUI||"jQueryUI"].common,d=(Ye.fn.jqm&&!n&&(n=!1),"");if(0"+a.buttons[o].text+"";i="
",i=(i+="
"+t+"
")+(r?"
"+r+""+d+"
":""!==d?"
"+d+"
":"")+"
";try{"false"===Ye("#info_dialog").attr("aria-hidden")&&Ye.jgrid.hideModal("#info_dialog",{jqm:n}),Ye("#info_dialog").remove()}catch(e){}t=Ye(".ui-jqgrid").css("font-size")||"11px";Ye.jgrid.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},i,a,"","",!0,{"font-size":t}),d&&Ye.each(a.buttons,function(e){Ye("#"+Ye.jgrid.jqID(this.id),"#info_id").on("click",function(){return a.buttons[e].onClick.call(Ye("#info_dialog")),!1})}),Ye("#closedialog","#info_id").on("click",function(){return l.hideModal("#info_dialog",{jqm:n,onClose:Ye("#info_dialog").data("onClose")||a.onClose,gb:Ye("#info_dialog").data("gbox")||a.gbox}),!1}),Ye(".fm-button","#info_dialog").hover(function(){Ye(this).addClass(s.hover)},function(){Ye(this).removeClass(s.hover)}),Ye.jgrid.isFunction(a.beforeOpen)&&a.beforeOpen(),Ye.jgrid.viewModal("#info_dialog",{onHide:function(e){e.w.hide().remove(),e.o&&e.o.remove()},modal:a.modal,jqm:n}),Ye.jgrid.isFunction(a.afterOpen)&&a.afterOpen();try{Ye("#info_dialog").focus()}catch(e){}},bindEv:function(e,r){Ye.jgrid.isFunction(r.dataInit)&&r.dataInit.call(this,e,r),r.dataEvents&&Ye.each(r.dataEvents,function(){var t=this.fn;void 0!==this.data?Ye(e).on(this.type,this.data,function(e){t.call(this,e,r)}):Ye(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)&&Ye.merge(i,t),Ye.each(e,function(e,t){-1===Ye.inArray(e,i)&&Ye(r).attr(e,t)}),e.hasOwnProperty("id")||Ye(r).attr("id",Ye.jgrid.randId())}switch(e){case"textarea":a=document.createElement("textarea"),i?t.cols||Ye(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,Ye(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],Ye(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",Ye(a).attr("offval","off")),Ye(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",Ye(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=Ye.jgrid.stripPref(c.p.idPrefix,d)),Ye.ajax(Ye.extend({url:Ye.jgrid.isFunction(t.dataUrl)?t.dataUrl.call(c,d,r,String(t.name)):t.dataUrl,type:"GET",dataType:"html",data:Ye.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=Ye.extend({},this.options),l=!0===n.multiple,s=!0===n.cacheUrlData,d="",p=[],e=Ye.jgrid.isFunction(n.buildSelect)?n.buildSelect.call(c,e):e;(e="string"==typeof e?Ye(Ye.jgrid.trim(e)).html():e)&&(Ye(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=Ye.map(i,function(e){return Ye.jgrid.trim(e)})):i[0]=Ye.jgrid.trim(a),Ye("option",o).each(function(e){t=Ye(this).text(),a=Ye(this).val(),s&&(d+=(0!==e?";":"")+a+":"+t),0===e&&o.multiple&&(this.selected=!1),Ye(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(!Ye.jgrid.isEmpty(e)){if(!(e=e.match(/^(\d{1,2}):(\d{2})([apAP][Mm])?$/)))return!1;if(e[3]){if(e[1]<1||12Ye.jgrid.floatNum(a.maxValue))return[!1,l+": "+u.maxValue+" "+a.maxValue,""];if(!0===a.email&&!(!1==r&&Ye.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||!Ye.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&&Ye.jgrid.isEmpty(e)||(c[t].formatoptions&&c[t].formatoptions.newformat?(s=c[t].formatoptions.newformat,(i=Ye.jgrid.getRegional(p,"formatter.date.masks"))&&i.hasOwnProperty(s)&&(s=i[s])):s=c[t].datefmt||"Y-m-d",Ye.jgrid.checkDate(s,e))))return[!1,l+": "+u.date+" - "+s,""];if(!0===a.time&&!(!1==r&&Ye.jgrid.isEmpty(e)||Ye.jgrid.checkTime(e)))return[!1,l+": "+u.date+" - hh:mm (am/pm)",""];if(!0===a.url&&!(!1==r&&Ye.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||!Ye.jgrid.isEmpty(e))return Ye.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 Ye.each(e,function(e,t){t.id||(t.id=Ye.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=y();if(Ye.jgrid.isFunction(t.searchrules))r=t.searchrules.call(i,e,t);else if(Ye.jgrid&&Ye.jgrid.checkValues)try{r=Ye.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="",!!Ye.jgrid.isFunction(this.p.onChange)&&this.p.onChange.call(this,this.p)},this.reDraw=function(){Ye(this).find("table.group").first().remove();var e=this.createTableForGroup(q.filter,null);Ye(this).append(e),Ye.jgrid.isFunction(this.p.afterRedraw)&&this.p.afterRedraw.call(this,this.p)},this.createTableForGroup=function(i,e){var o=this,t=Ye("
"),r="left",a=("rtl"===this.p.direction&&(r="right",t.attr("dir","rtl")),null===e&&t.append(""),Ye("")),r=(t.append(a),Ye(""));if(a.append(r),!0===this.p.ruleButtons){for(var n,l=Ye(""),s=(r.append(l),""),d=0;d"+o.p.groupOps[d].text+"";l.append(s).on("change",function(){i.groupOp=Ye(l).val(),o.onchange()})}var p,a="";if(this.p.groupButton&&(a=Ye("")).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=Ye("")).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),Ye("")),u=(c.append(u),Ye(""));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(""),Ye("")),u=(r.append(o),Ye("")),h=[],g=(o.append(u),u.on("change",function(){var e;for(p.p.ruleButtons&&p.p.uniqueSearchFields&&(t=parseInt(Ye(this).data("curr"),10),e=this.selectedIndex,0<=t)&&(p.p.columns[t].search=!0,Ye(this).data("curr",e),p.p.columns[e].search=!1),a.field=Ye(u).val(),l=Ye(this).parents("tr").first(),Ye(".data",l).empty(),f=0;f"+p.p.ops[d].text+"",o++);Ye(".selectopts",l).empty().append(i),Ye(".selectopts",l)[0].selectedIndex=0,Ye.jgrid.msie()&&Ye.jgrid.msiever()<9&&(t=parseInt(Ye("select.selectopts",l)[0].offsetWidth,10)+1,Ye(".selectopts",l).width(t),Ye(".selectopts",l).css("width","auto")),Ye(".data",l).append(r),Ye.jgrid.bindEv.call(c,r,s.searchoptions),Ye(".input-elm",l).on("change",function(e){e=e.target;"custom"===s.inputtype&&Ye.jgrid.isFunction(s.searchoptions.custom_value)?a.data=s.searchoptions.custom_value.call(c,Ye(".customelement",this),"get"):a.data=Ye(e).val(),"select"===s.inputtype&&s.searchoptions.multiple&&(a.data=a.data.join(",")),p.onchange()}),setTimeout(function(){a.data=Ye(r).val(),("nu"===a.op||"nn"===a.op||0<=Ye.inArray(a.op,p.p.unaryOperations))&&(Ye(r).attr("readonly","true"),Ye(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=Ye(""),j=(r.append(o),(s=q.columns[g]).searchoptions.id=Ye.jgrid.randId(),!w||"text"!==s.inputtype||s.searchoptions.size||(s.searchoptions.size=10),s.searchoptions.name=a.field,s.searchoptions.oper="filter",Ye.jgrid.createEl.call(c,s.inputtype,s.searchoptions,a.data,!0,p.p.ajaxSelectOptions||{},!0)),b=(("nu"===a.op||"nn"===a.op||0<=Ye.inArray(a.op,p.p.unaryOperations))&&(Ye(j).attr("readonly","true"),Ye(j).attr("disabled","true")),Ye(""));for(o.append(b),b.on("change",function(){a.op=Ye(b).val(),l=Ye(this).parents("tr").first();var e=Ye(".input-elm",l)[0];"nu"===a.op||"nn"===a.op||0<=Ye.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!==Ye.inArray(s.searchtype,p.p.strarr)?p.p.stropts:p.p.numopts),i="",Ye.each(p.p.ops,function(){h.push(this.oper)}),f=0;f"+p.p.ops[d].text+"");b.append(i);o=Ye(""),r.append(o),o.append(j),Ye.jgrid.bindEv.call(c,j,s.searchoptions),Ye(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,Ye(".customelement",this),"get"):Ye(this).val(),p.onchange()}),o=Ye("");return r.append(o),!0===this.p.ruleButtons&&(j=Ye(""),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,S||{}),this.each(function(){var D=this,G=[];if(!D.p.filterToolbar){if(Ye(D).data("filterToolbar")||Ye(D).data("filterToolbar",S),D.p.force_regional&&(S=Ye.extend(S,i)),void 0!==D.p.customFilterDef)for(var e in D.p.customFilterDef)D.p.customFilterDef.hasOwnProperty(e)&&!S.operands.hasOwnProperty(e)&&(S.odata.push({oper:e,text:D.p.customFilterDef[e].text}),S.operands[e]=D.p.customFilterDef[e].operand,!0===D.p.customFilterDef[e].unary)&&G.push(e);var u,h,t,g,f=Ye.jgrid.styleUI[D.p.styleUI||"jQueryUI"].filter,p=Ye.jgrid.styleUI[D.p.styleUI||"jQueryUI"].common,m=Ye.jgrid.styleUI[D.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(Ye.each(D.p.colModel,function(){var e,t=!1;if(i=this.index||this.name,a=this.searchoptions||{},!0===this.frozen&&!0===D.p.frozenColumns?(e=Ye("#gs_"+D.p.idPrefix+Ye.jgrid.jqID(this.name),D.grid.fhDiv),t=!0):e=Ye("#gs_"+D.p.idPrefix+Ye.jgrid.jqID(this.name),D.grid.hDiv),void 0===e[0]&&(e=Ye("#gs_"+D.p.idPrefix+Ye.jgrid.jqID(this.name),D.grid.hDiv)),o=S.searchOperators&&a.searchOperMenu?e.parents("table.ui-search-table").find("td.ui-search-oper").children("a").attr("soper")||S.defaultSearch:a.sopt?a.sopt[0]:"select"===this.stype?"eq":S.defaultSearch,"custom"===this.stype&&Ye.jgrid.isFunction(a.custom_value)&&0"),b=(S.restoreFromFilters&&(t=!0===D.p.mergeSearch&&D.p.searchModules.hasOwnProperty("filterToolbar")&&!1!==D.p.searchModules.filterToolbar?D.p.searchModules.filterToolbar:D.p.postData.filters)&&("string"==typeof t&&(t=Ye.jgrid.parse(t)),h=!(!t.rules||!t.rules.length)&&t.rules),new Set(S.disabledKeys));if(b.size!==S.disabledKeys.length)for(var r=0;r"),s=Ye('
empty
'),d=Ye("
");if(!0===this.hidden&&Ye(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+" "+D.p.colNames[e]:D.p.colNames[e],t=Ye.extend({},this.searchoptions,{name:o.index||o.name,id:"gs_"+D.p.idPrefix+o.name,oper:"search",title:e}),this.search){if(S.restoreFromFilters&&h)for(var p=!1,c=0;c"+n+"
":""}switch(Ye("td",d).eq(0).attr("columname",o.name).append(a),void 0===t.clearSearch&&(t.clearSearch=!0),t.clearSearch?(e=S.resetTitle||"Clear Search Value",Ye("td",d).eq(2).append(""+S.resetIcon+"")):Ye("td",d).eq(2).hide(),this.surl&&(t.dataUrl=this.surl),e="",t.defaultValue&&(e=Ye.jgrid.isFunction(t.defaultValue)?t.defaultValue.call(D):t.defaultValue),S.restoreFromFilters&&p&&(e=p.data),e=Ye.jgrid.createEl.call(D,this.stype,t,e,!1,Ye.extend({},Ye.jgrid.ajaxOptions,D.p.ajaxSelectOptions||{})),"custom"!==this.stype&&("select"===this.stype?Ye(e).addClass(f.srSelect):Ye(e).addClass(f.srInput)),Ye("td",d).eq(1).append(e),Ye(s).append(d),null==t.dataEvents&&(t.dataEvents=[]),this.stype){case"select":!0===S.autosearch&&t.dataEvents.push({type:"change",fn:function(){return v(),!1}});break;case"text":case"custom":!0===S.autosearch&&(S.searchOnEnter?t.dataEvents.push({type:"keypress",fn:function(e){return 13===(e.charCode||e.keyCode||0)?(v(),!1):this}}):t.dataEvents.push({type:"keydown",fn:function(e){e=e.which;if(!b.has(e)){if(13===e)return!1;u&&clearTimeout(u),u=setTimeout(function(){v()},S.autosearchDelay)}}}))}Ye.jgrid.bindEv.call(D,e,t)}Ye(l).append(s),Ye(j).append(l),S.searchOperators&&""!==a||Ye("td",d).eq(0).hide()}),Ye("table thead",D.grid.hDiv).append(j),S.searchOperators&&(Ye(".soptclass",j).click(function(e){var t=Ye(this).offset(),r=t.left,t=t.top,i=this;Ye("#sopt_menu").remove(),r=parseInt(r,10),t=parseInt(t,10)+18;var o,a='",Ye("body").append(a),Ye("#sopt_menu").addClass("ui-menu "+f.menu_widget),Ye("#sopt_menu > li > a").hover(function(){Ye(this).addClass(p.hover)},function(){Ye(this).removeClass(p.hover)}).click(function(){var e=Ye(this).attr("value"),t=Ye(this).attr("oper");Ye(D).triggerHandler("jqGridToolbarSelectOper",[e,t,i]),Ye("#sopt_menu").hide(),Ye(i).text(t).attr("soper",e),!0===S.autosearch&&(t=Ye(i).parent().next().children()[0],Ye(t).val()||"nu"===e||"nn"===e||0<=Ye.inArray(e,G))&&v()})}e.stopPropagation()}),Ye("body").on("click",function(e){"soptclass"!==e.target.className&&Ye("#sopt_menu").remove()})),Ye(".clearsearchclass",j).click(function(){var e,t=Ye(this).parents("tr").first(),r=Ye("td.ui-search-oper",t).attr("columname"),i=Ye("td.ui-search-oper a",t).attr("soper");if(-1===(r=Ye.jgrid.getElemByAttrVal(D.p.colModel,"name",r,!0)))return!1;var o=D.p.colModel[r],a=Ye.extend({},o.searchoptions||{}),n=a.defaultValue||"",l=("select"===o.stype?(l=Ye("td.ui-search-input select",t),n?l.val(n):l[0].selectedIndex=0):(l=Ye("td.ui-search-input input",t)).val(n),Ye(D).triggerHandler("jqGridToolbarClearVal",[l[0],r,a,n]),Ye.jgrid.isFunction(S.onClearSearchValue)&&S.onClearSearchValue.call(D,l[0],r,a,n),"");("nu"===i||"nn"===i||0<=Ye.inArray(i,G))&&(e=a.sopt?a.sopt[0]:"select"===o.stype?"eq":S.defaultSearch,l=null!=D.p.customFilterDef&&null!=D.p.customFilterDef[e]?D.p.customFilterDef[e].operand:S.operands[e]||"",(e===i?Ye("td.ui-search-oper a",t).attr("soper","dummy"):Ye("td.ui-search-oper a",t).attr("soper",e)).text(l)),!0===S.autosearch&&(v(),e===i)&&Ye("td.ui-search-oper a",t).attr("soper",e).text(l)}),Ye(".clearsearchclass",j).keydown(function(e){13===e.keyCode&&Ye(".clearsearchclass",j).trigger("click")}),Ye(D.grid.hDiv).on("scroll",function(e){D.grid.hScroll||(D.grid.bScroll=!0,D.grid.bDiv.scrollLeft=D.grid.hDiv.scrollLeft,D.p.footerrow&&(D.grid.sDiv.scrollLeft=D.grid.bDiv.scrollLeft),D.p.headerrow&&(D.grid.hrDiv.scrollLeft=D.grid.bDiv.scrollLeft)),D.grid.hScroll=!1}),D.p.colSpanHeader.length&&setTimeout(function(){Ye(D).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,Ye.each(D.p.colModel,function(){switch(r=Ye("#gs_"+D.p.idPrefix+Ye.jgrid.jqID(this.name),!0===this.frozen&&!0===D.p.frozenColumns?D.grid.fhDiv:D.grid.hDiv),this.searchoptions&&void 0!==this.searchoptions.defaultValue&&(i=this.searchoptions.defaultValue),t=this.index||this.name,s[t]=this.searchoptions&&this.searchoptions.sopt?this.searchoptions.sopt[0]:S.defaultSearch||"eq",this.stype){case"select":if(r.find("option").each(function(e){if(0===e&&(this.selected=!0),Ye(this).val()===i)return!(this.selected=!0)}),void 0!==i)l[t]=i,d++;else try{delete D.p.postData[t]}catch(e){}break;case"text":if(r.val(i||""),void 0!==i)l[t]=i,d++;else try{delete D.p.postData[t]}catch(e){}break;case"custom":Ye.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 o=this;if(o.grid){var t,r,i="fbox_"+o.p.id,a=!0,n=!0,l={themodal:"searchmod"+i,modalhead:"searchhd"+i,modalcontent:"searchcnt"+i,scrollelm:i},e=[],s=Ye.jgrid.styleUI[o.p.styleUI||"jQueryUI"].filter,d=Ye.jgrid.styleUI[o.p.styleUI||"jQueryUI"].common;if(k.styleUI=o.p.styleUI,"string"==typeof(t=Ye.isPlainObject(o.p._savedFilter)&&!Ye.isEmptyObject(o.p._savedFilter)?o.p._savedFilter:(!0===o.p.mergeSearch&&o.p.searchModules.hasOwnProperty("searchGrid")&&!1!==o.p.searchModules.searchGrid&&Ye.extend(o.p.postData,{filters:Ye.jgrid.splitSearch(o.p.searchModules)}),o.p.postData[k.sFilter]))&&(t=Ye.jgrid.parse(t)),!0===k.recreateFilter&&Ye("#"+Ye.jgrid.jqID(l.themodal)).remove(),void 0!==Ye("#"+Ye.jgrid.jqID(l.themodal))[0])S(Ye("#fbox_"+Ye.jgrid.jqID(o.p.id)));else{var p,c,u=Ye("
").insertBefore("#gview_"+Ye.jgrid.jqID(o.p.id)),h="left",g="",f=("rtl"===o.p.direction&&(h="right",g=" style='text-align:left'",u.attr("dir","rtl")),Ye.extend([],o.p.colModel)),m=""+k.Find+"",v=""+k.Reset+"",j="",b="",w=!1,y=-1,x=!1,_=[],m=(k.showQuery&&(j="Query"),Ye.jgrid.buildButtons(k.buttons,j+m,d)),q=null;if(Ye(o).jqGrid("isGroupHeaderOn")&&(F=Ye("table.ui-jqgrid-htable",o.grid.hDiv).find(".jqg-second-row-header"),c=o.p.groupHeader.length,void 0!==F[0])&&(q=o.p.groupHeader[c-1]),k.columns.length)f=k.columns,p=f[y=0].index||f[0].name;else{if(null!==q)for(var C=0;C"+k.tmplLabel+"")+""),void 0!==o.p.customFilterDef)for(var G in o.p.customFilterDef)o.p.customFilterDef.hasOwnProperty(G)&&!k.operands.hasOwnProperty(G)&&(k.odata.push({oper:G,text:o.p.customFilterDef[G].text}),k.operands[G]=o.p.customFilterDef[G].operand,!0===o.p.customFilterDef[G].unary)&&e.push(G);c=""+b+"

"+v+""+m+"
",i=Ye.jgrid.jqID(i),Ye("#"+i).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:o.p.ajaxSelectOptions,groupOps:k.groupOps,addsubgrup:k.addsubgrup,addrule:k.addrule,delgroup:k.delgroup,delrule:k.delrule,autoencode:o.p.autoencode,unaryOperations:e,onChange:function(){this.p.showQuery&&Ye(".query",this).text(this.toUserFriendlyString()),Ye.jgrid.isFunction(k.afterChange)&&k.afterChange.call(o,Ye("#"+i),k)},direction:o.p.direction,id:o.p.id}),u.append(c),Ye("#"+i+"_2").find("[data-index]").each(function(){var t=parseInt(Ye(this).attr("data-index"),10);0<=t&&Ye(this).on("click",function(e){k.buttons[t].click.call(o,Ye("#"+i),k,e)})}),w&&k.tmplFilters&&k.tmplFilters.length&&Ye(".ui-template",u).on("change",function(){var e=Ye(this).val();return"default"===e?Ye("#"+i).jqFilter("addFilter",t):Ye("#"+i).jqFilter("addFilter",k.tmplFilters[parseInt(e,10)]),!1}),!0===k.multipleGroup&&(k.multipleSearch=!0),Ye(o).triggerHandler("jqGridFilterInitialize",[Ye("#"+i)]),Ye.jgrid.isFunction(k.onInitializeSearch)&&k.onInitializeSearch.call(o,Ye("#"+i)),k.gbox="#gbox_"+Ye.jgrid.jqID(o.p.id);var F=Ye(".ui-jqgrid").css("font-size")||"11px";k.layer?Ye.jgrid.createModal(l,u,k,"#gview_"+Ye.jgrid.jqID(o.p.id),Ye("#gbox_"+Ye.jgrid.jqID(o.p.id))[0],"string"==typeof k.layer?"#"+Ye.jgrid.jqID(k.layer):k.layer,"string"==typeof k.layer?{position:"relative","font-size":F}:{"font-size":F}):Ye.jgrid.createModal(l,u,k,"#gview_"+Ye.jgrid.jqID(o.p.id),Ye("#gbox_"+Ye.jgrid.jqID(o.p.id))[0],null,{"font-size":F}),(k.searchOnEnter||k.closeOnEscape)&&Ye("#"+Ye.jgrid.jqID(l.themodal)).keydown(function(e){var t=Ye(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?(Ye("#"+Ye.jgrid.jqID(l.modalhead)).find(".ui-jqdialog-titlebar-close").click(),!1):void 0:(Ye("#"+i+"_search").click(),!1)}),j&&Ye("#"+i+"_query").on("click",function(){return Ye(".queryresult",u).toggle(),!1}),void 0===k.stringResult&&(k.stringResult=k.multipleSearch),Ye("#"+i+"_search").on("click",function(){var e,t={};return(r=Ye("#"+i)).find(".input-elm:focus").change(),x&&k.multipleSearch?(o.p._savedFilter={},e=Ye.jgrid.filterRefactor({ruleGroup:Ye.extend(!0,{},r.jqFilter("filterData")),ssfield:_,splitSelect:k.splitSelect,groupOpSelect:k.groupOpSelect}),o.p._savedFilter=Ye.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),Ye.each([k.sField,k.sValue,k.sOper],function(){t[this]=""})):k.multipleSearch?(t[k.sFilter]=e,Ye.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])),(o.p.search=!0)===o.p.mergeSearch&&o.p.searchModules.hasOwnProperty("searchGrid")&&!1!==o.p.searchModules.searchGrid&&k.multipleSearch?(""!==t[k.sFilter]?o.p.searchModules.searchGrid=t[k.sFilter]:o.p.searchModules.searchGrid=null,Ye.extend(o.p.postData,{filters:Ye.jgrid.splitSearch(o.p.searchModules)})):Ye.extend(o.p.postData,t),!1!==(n=(n=void 0===(n=Ye(o).triggerHandler("jqGridFilterSearch"))?!0:n)&&Ye.jgrid.isFunction(k.onSearch)?k.onSearch.call(o,o.p.filters):n)&&Ye(o).trigger("reloadGrid",[{page:1}]),k.closeAfterSearch&&Ye.jgrid.hideModal("#"+Ye.jgrid.jqID(l.themodal),{gb:"#gbox_"+Ye.jgrid.jqID(o.p.id),jqm:k.jqModal,onClose:k.onClose})),!1}),Ye("#"+i+"_reset").on("click",function(){var e={},t=Ye("#"+i);return o.p.search=!1,!(o.p.resetsearch=!0)===k.multipleSearch?e[k.sField]=e[k.sValue]=e[k.sOper]="":e[k.sFilter]="",t[0].resetFilter(),w&&Ye(".ui-template",u).val("default"),!0===o.p.mergeSearch&&o.p.searchModules.hasOwnProperty("searchGrid")&&!1!==o.p.searchModules.searchGrid?(o.p.searchModules.searchGrid=null,Ye.extend(o.p.postData,{filters:Ye.jgrid.splitSearch(o.p.searchModules)}),o.p.search=!0):Ye.extend(o.p.postData,e),!1!==(n=(n=void 0===(n=Ye(o).triggerHandler("jqGridFilterReset"))?!0:n)&&Ye.jgrid.isFunction(k.onReset)?k.onReset.call(o):n)&&Ye(o).trigger("reloadGrid",[{page:1}]),k.closeAfterReset&&Ye.jgrid.hideModal("#"+Ye.jgrid.jqID(l.themodal),{gb:"#gbox_"+Ye.jgrid.jqID(o.p.id),jqm:k.jqModal,onClose:k.onClose}),!1}),S(Ye("#"+i)),Ye(".fm-button:not(."+d.disabled+")",u).hover(function(){Ye(this).addClass(d.hover)},function(){Ye(this).removeClass(d.hover)})}}function S(e){(a=(a=void 0===(a=Ye(o).triggerHandler("jqGridFilterBeforeShow",[e]))?!0:a)&&Ye.jgrid.isFunction(k.beforeShowSearch)?k.beforeShowSearch.call(o,e):a)&&(Ye.jgrid.viewModal("#"+Ye.jgrid.jqID(l.themodal),{gbox:"#gbox_"+Ye.jgrid.jqID(o.p.id),jqm:k.jqModal,modal:k.modal,overlay:k.overlay,toTop:k.toTop}),Ye(o).triggerHandler("jqGridFilterAfterShow",[e]),Ye.jgrid.isFunction(k.afterShowSearch))&&k.afterShowSearch.call(o,e)}})},filterInput:function(n,l){return l=Ye.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+="",Ye.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=Ye.jgrid.getElemByAttrVal(t.p.colModel,"name",s.field,!1),Ye.isEmptyObject(o)||(o.searchoptions?Ye.extend(o.searchoptions,{value:l.join(";")}):(o.searchoptions={},o.searchoptions.value=l.join(";"))))}}})}});var i,J={};Ye.jgrid.extend({editGridRow:function(X,K){var e=Ye.jgrid.getRegional(this[0],"edit"),t=this[0].p.styleUI,$=Ye.jgrid.styleUI[t].formedit,Y=Ye.jgrid.styleUI[t].common;return K=Ye.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[Ye(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="#"+Ye.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[Ye(this)[0].p.id].template,l="",r=l="string"==typeof s?s.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){return''}):l,v):(r=Ye("
"),v+"_2"),m="#"+Ye.jgrid.jqID(m);if(Ye(w).append(""),Ye(w).append("
"+J[u.p.id].topinfo+"
"),Ye(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)}),Ye(w).append(r),!1!==(i=(i=void 0===(i=Ye(u).triggerHandler("jqGridAddEditBeforeInitData",[w,g]))?!0:i)&&Ye.jgrid.isFunction(J[u.p.id].beforeInitData)?J[u.p.id].beforeInitData.call(u,w,g):i)){if("_empty"!==X&&void 0!==u.p.savedRow&&0";"_empty"!==q&&(F=Ye(C).jqGrid("getInd",q)),Ye(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=Ye("td[role='gridcell']",C.rows[F]).eq(t).text();else{try{x=Ye.unformat.call(C,Ye("td[role='gridcell']",C.rows[F]).eq(t),{rowId:q,colModel:this},t)}catch(e){x=this.edittype&&"textarea"===this.edittype?Ye("td[role='gridcell']",C.rows[F]).eq(t).text():Ye("td[role='gridcell']",C.rows[F]).eq(t).html()}x&&" "!==x&&" "!==x&&(1!==x.length||160!==x.charCodeAt(0))||(x="")}var e,r=Ye.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=Ye.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=Ye.jgrid.isFunction(r.defaultValue)?r.defaultValue.call(u):r.defaultValue),this.edittype||(this.edittype="text"),u.p.autoencode&&(x=Ye.jgrid.htmlDecode(x)),_=Ye.jgrid.createEl.call(u,this.edittype,r,x,!1,Ye.extend({},Ye.jgrid.ajaxOptions,C.p.ajaxSelectOptions||{})),"select"===this.edittype&&(x=Ye(_).val(),"select-multiple"===Ye(_).get(0).type)&&(x=x&&x.join(",")),"checkbox"===this.edittype&&(x=Ye(_).is(":checked")?Ye(_).val():Ye(_).attr("offval")),Ye(_).addClass("FormElement"),"select"===this.edittype?Ye(_).addClass($.selectClass):-1"+i.rowcontent+""),Ye(I).append(e),e[0].rp=o),0===y.length&&(y=Ye(1":"").addClass("FormData").attr("id","tr_"+p),Ye(y).append(B),Ye(I).append(y),y[0].rp=o),Ye("td",y[0]).eq(a-2).html(""),Ye("td",y[0]).eq(a-1).append(i.elmprefix).append(_).append(i.elmsuffix),1