From 076b3ed90f91984b567b2994acd84fa483326f90 Mon Sep 17 00:00:00 2001 From: Tony Tomov Date: Mon, 30 Jan 2023 12:58:44 +0200 Subject: [PATCH] Publishing version 5.8.2 --- 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 f3aa6f58a..ae467dce9 100644 --- a/jqGrid.jquery.json +++ b/jqGrid.jquery.json @@ -16,7 +16,7 @@ "forzen rows", "frozen columns" ], - "version": "5.7.0", + "version": "5.8.2", "author": { "name": "Tony Tomov", "email": "tony@trirand.com", diff --git a/js/grid.base.js b/js/grid.base.js index a18779ecf..7d48365f2 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.1", + version : "5.8.2", 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 32199284f..217ec403e 100644 --- a/js/jquery.jqGrid.js +++ b/js/jquery.jqGrid.js @@ -1,6 +1,6 @@ /** * -* @license Guriddo jqGrid JS - v5.8.1 - 2023-01-30 +* @license Guriddo jqGrid JS - v5.8.2 - 2023-01-30 * 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.1", + version : "5.8.2", 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 1f4f34394..6d5916df6 100644 --- a/js/jquery.jqGrid.min.js +++ b/js/jquery.jqGrid.min.js @@ -1,9 +1,9 @@ /** * -* @license Guriddo jqGrid JS - v5.8.1 - 2023-01-30 +* @license Guriddo jqGrid JS - v5.8.2 - 2023-01-30 * 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($e){"use strict";$e.jgrid=$e.jgrid||{},$e.jgrid.hasOwnProperty("defaults")||($e.jgrid.defaults={}),$e.extend($e.jgrid,{version:"5.8.1",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=$e.makeArray(arguments).slice(1),n=a.length;return(e=$e.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 i=$e.jgrid.type(e);return t="string"!==i&&"number"!==i?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===$e.jgrid.useJSON&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(e):$e.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,i,r){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||$e.jgrid.uidPref)+$e.jgrid.guid++},getAccessor:function(e,t){var i,r,o=[];if("function"==typeof t)return t(e);if(void 0===(i=e[t]))try{if(r=(o="string"==typeof t?t.split("."):o).length)for(i=e;i&&r--;)i=i[o.shift()]}catch(e){}return i},getXmlData:function(e,t,i){var r="string"==typeof t?t.match(/^(.*)\[(\w+)\]$/):null;return"function"==typeof t?t(e):r&&r[2]?(r[1]?$e(r[1],e):$e(e)).attr(r[2]):(r=$e(t,e),i?r:0
"),t=e.appendTo("body").find("td").width();return e.remove(),.1
'),t=($e("body").append(e),$e("div",e).innerWidth()),i=(e.css("overflow-y","scroll"),$e("div",e).innerWidth());return $e(e).remove(),t-i<0?18:t-i},ajaxOptions:{},from:function(e){var v=this;return new function(e,t){"string"==typeof e&&(e=$e.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",i)},this.less=function(e,t,i){return g._compareValues(g.less,e,t,"<",i)},this.greaterOrEquals=function(e,t,i){return g._compareValues(g.greaterOrEquals,e,t,">=",i)},this.lessOrEquals=function(e,t,i){return g._compareValues(g.lessOrEquals,e,t,"<=",i)},this.startsWith=function(e,t){var i=$e.jgrid.isNull(t)?e:t,i=(r?$e.jgrid.trim(i.toString()):i.toString()).length;return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr(0,"+i+") == "+g._getStr('"'+g._toStr(t)+'"')):($e.jgrid.isNull(t)||(i=(r?$e.jgrid.trim(t.toString()):t.toString()).length),g._append(g._getStr("this")+".substr(0,"+i+") == "+g._getStr('"'+g._toStr(e)+'"'))),g._setCommand(g.startsWith,e),g._resetNegate(),g},this.endsWith=function(e,t){var i=$e.jgrid.isNull(t)?e:t,i=(r?$e.jgrid.trim(i.toString()):i.toString()).length;return p?g._append(g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr("+g._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".length-"+i+","+i+') == "'+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,i){var r='$("#'+v.p.id+'")[0]';return g._append(r+".p.customFilterDef."+e+".action.call("+r+' ,{rowItem: this, searchName:"'+t+'",searchValue:"'+i+'"})'),g._setCommand(g.user,t),g._resetNegate(),g},this.inData=function(e,t,i){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,i,r){return g._hasData()?g._getGroup(o,e,t,i,r):null},this.orderBy=function(e,t,i,r,o){return t=$e.jgrid.isNull(t)?"a":$e.jgrid.trim(t.toString().toLowerCase()),$e.jgrid.isNull(i)&&(i="text"),$e.jgrid.isNull(r)&&(r="Y-m-d"),$e.jgrid.isNull(o)&&(o=!1),u.push({by:e,dir:t="asc"!==(t="desc"!==t&&"descending"!==t?t:"d")&&"ascending"!==t?t:"a",type:i,datefmt:r,sfunc:o}),g},g;throw"data provides is not an array"}(e,null)},getMethod:function(e){return this.getAccessor($e.fn.jqGrid,e)},extend:function(e){$e.extend($e.fn.jqGrid,e),this.no_legacy_api||$e.fn.extend(e)},clearBeforeUnload:function(e){var t,i=$e("#"+$e.jgrid.jqID(e))[0];if(i.grid){t=i.grid,$e.jgrid.isFunction(t.emptyRows)&&t.emptyRows.call(i,!0,!0),$e(document).off("mouseup.jqGrid"+i.p.id),$e(t.hDiv).off("mousemove"),$e(i).off();for(var r=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){n.p._ftsc=!0,n.p._fthc=[],n.p._avc=[];for(var o=0;oinput#jqs_"+n.p.id+"_"+t).val("").focus().val(s),n.p.frozenRows&&(e&&(n.p.frozenColumns=!1),$e(n).trigger("jqGridAfterGridComplete.setFrozenRows"),e)&&(n.p.frozenColumns=!0)}function g(e){var t,i=$e(n).jqGrid("getRowData",e),r=[];if(i&&s){for(var o in i)if(!p.has(o)&&i.hasOwnProperty(o)){if(t=s,d.useCase||(i[o]=i[o].toLowerCase(),t=s.toLowerCase()),d.aOperands.includes(d.operand))switch(d.operand){case"cn":l=-1!==i[o].search(t);break;case"eq":l=i[o]===t;break;case"ne":l=i[o]!==t;break;case"bw":l=i[o].substring(0,t.length)===t;break;case"ew":var a=i[o].length;l=i[o].substring(a-t.length,a)===t}l&&r.push(o)}n.p._results[e]={v:s,r:r}}else i&&""===s&&n.p._results[e]&&delete n.p._results[e]}},searchColOnKey:function(e,t,i,r){switch(r.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(){$e.jgrid.searchColOnEnter(e,t,i,r)},50)},comboGrid:function(l,s,e){var t=$e.jgrid.randId("combo"),i="div"+t,r=e.datatype,d=(e.datatype="local",e.onSelectRow=function(e){var e=$e("#"+t).jqGrid("getRowData",e);$e.isEmptyObject(e)||(e=$e.jgrid.isFunction(s.return_fld)?s.return_fld.call(this,e):e[s.return_fld],$e("#"+l).val(e),$e("#"+i).hide())},e.data=[],e.scrollrows=!0,$e("body").append("
"),e.pager&&$e("body").append("
"),$e("body").append("
"),$e("#"+t).jqGrid(e),$e("#"+t).jqGrid("bindKeys",{onSelectRow:!1}),$e("#"+l).attr("autocomplete","off").data("comboGrid",{grid:t,divgrid:i}),document.getElementById(l).getBoundingClientRect());$e("#"+i).css({"background-color":"inherit",position:"absolute",top:d.top+50+"px",left:d.left+10+"px",zIndex:2e4}).hide(),$e("#"+l).on("keydown",function(e){var t,i=$e(this).data("comboGrid").grid,r=$e(this).data("comboGrid").divgrid,o=this;if($e("#"+r).is(":hidden")&&(d=document.getElementById(l).getBoundingClientRect(),$e("#"+r).show().css({top:d.top+50+"px",left:d.left+10+"px"})),-1<$e.inArray(e.key,["Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"])){var a=$e.Event("keydown");switch(e.key){case"Enter":var n=$e("#"+i).jqGrid("getRowData",$e("#"+i)[0].p.selrow);$e.isEmptyObject(n)||(this.value=n[s.return_fld],$e("#"+r).hide());break;case"Escape":$e("#"+r).hide();break;case"ArrowUp":a.keyCode=38,$e("#"+i).trigger(a);break;case"ArrowDown":a.keyCode=40,$e("#"+i).trigger(a)}}else t&&clearTimeout(t),setTimeout(function(){$e("#"+i).jqGrid("filterInput",o.value,{defaultSearch:s.defaultSearch||"bw",selectFirstFound:!0})},100)}),s.data&&("string"==typeof s.data?$e("#"+t).jqGrid("setGridParam",{url:s.data}):Array.isArray(s.data)&&$e("#"+t).jqGrid("setGridParam",{data:s.data})),$e("#"+t).jqGrid("setGridParam",{datatype:r})},inColumnHeader:function(e,t){for(var i=t.length,r=0;rthis.resizing.minW)&&(this.curGbox.css({left:this.resizing.sOL+e}),!0===b.forceFit?(r=this.headers[this.resizing.idx+b.nv],(o="ltr"===b.direction?r.width-e:r.width+e)>this.resizing.minW&&(t.newWidth=i,r.newWidth=o)):(this.newWidth="ltr"===b.direction?b.tblwidth+e:b.tblwidth-e,t.newWidth=i))},dragEnd:function(e,t){var i,r;this.hDiv.style.cursor="default",void 0===t&&(t=!0),this.resizing&&(i=this.resizing.idx,r=this.headers[i].newWidth||this.headers[i].width,r=parseInt(r,10),this.resizing=!1,$e("#rs_m"+$e.jgrid.jqID(b.id)).css("display","none"),b.colModel[i].width=r,this.headers[i].width=r,this.headers[i].el.style.width=r+"px",this.cols[i].style.width=r+"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"),A=(Q.p.direction=$e.jgrid.trim(Q.p.direction.toLowerCase()),Q.p._ald=!1,-1===$e.inArray(Q.p.direction,["ltr","rtl"])&&(Q.p.direction="ltr"),v=Q.p.direction,$e(t).insertBefore(this),$e(this).appendTo(t),$e("
")),T=($e(A).attr({id:"gbox_"+this.id,dir:v}).insertBefore(t),$e(t).attr("id","gview_"+this.id).appendTo(A),$e("
").insertBefore(t),$e("
"+$e.jgrid.getRegional(Q,"defaults.loadtext",this.p.loadtext)+"
").insertBefore(t),$e(this).attr({role:"presentation","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id}),$e.jgrid.getFont(Q)),J=function(e,t){return void 0===t&&(t=0),e=parseInt(e,10),isNaN(e)?t:e},P=function(e,t,i,r,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;":($e.jgrid.isFunction(n.cellattr)||"string"==typeof n.cellattr&&!$e.jgrid.isNull($e.jgrid.cellattr)&&$e.jgrid.isFunction($e.jgrid.cellattr[n.cellattr]))&&(l=($e.jgrid.isFunction(n.cellattr)?n.cellattr:$e.jgrid.cellattr[n.cellattr]).call(Q,o,i,r,n,a))&&"string"==typeof l&&(-1"+t+""},ee=function(e,t,i,r,o){o='";return'"+o+""},te=function(e,t,i,r,o){i=(parseInt(i,10)-1)*parseInt(r,10)+1+t;return'"+i+""},ie=function(e,t,i,r){var o=Q.p.searchColOptions.searchOnEnter?" onchange=\"$.jgrid.searchColOnEnter('"+Q.p.id+"',"+e+', this)"':" onkeydown=\"$.jgrid.searchColOnKey('"+Q.p.id+"',"+e+',this, event)"',r='";return'"+r+""},re=function(e){for(var t,i=[],r=0,o=0;o"},H=function(e,i,t,r){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,$e.isXMLDoc(e)){i=-1!==Q.p.treeANode||Q.p.scroll?1"),Q.p.grouping&&(S.push(_),Q.p.groupingView._locgr||m.call(j,x,G),_=[]),(o||!0===Q.p.treeGrid&&!Q.p._ald)&&(x[a]=$e.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]=$e.jgrid.stripPref(Q.p.idPrefix,N),Q.p.data.push(S),Q.p._index[S[v]]=Q.p.data.length-1,-1",h="",g="",f="";if(l+="_"+e,t="pg_"+e,p=e+"_left",c=e+"_center",a=e+"_right",$e("#"+$e.jgrid.jqID(e)).append("
").attr("dir",v),0';for(f+=""}"rtl"===v&&(g+=f,$e("#"+a).attr("align","left")),!0===Q.p.pginput&&(h=""+$e.jgrid.template($e.jgrid.getRegional(Q,"defaults.pgtext",Q.p.pgtext)||"","","")+""),!0===Q.p.pgbuttons?(o=["first"+l,"prev"+l,"next"+l,"last"+l],p=K($,"pgButtonBox",!0,"ui-pg-button"),c=[$e.jgrid.getRegional(Q,"defaults.pgfirst",Q.p.pgfirst)||"",$e.jgrid.getRegional(Q,"defaults.pgprev",Q.p.pgprev)||"",$e.jgrid.getRegional(Q,"defaults.pgnext",Q.p.pgnext)||"",$e.jgrid.getRegional(Q,"defaults.pglast",Q.p.pglast)||""],"rtl"===v&&(o.reverse(),c.reverse()),a="",n="",d="",p="",c=""!==h?u+h+u:"",g+="ltr"===v?a+n+c+d+p:p+d+c+n+a):""!==h&&(g+=h),"ltr"===v&&(g+=f),g+="",e=$e.jgrid.jqID(e),t=$e.jgrid.jqID(t),!0===Q.p.viewrecords&&$e("td#"+e+"_"+Q.p.recordpos,"#"+t).append("
"),$e("td#"+e+"_"+Q.p.pagerpos,"#"+t).append(g),u=$e("#gbox_"+$e.jgrid.jqID(Q.p.id)).css("font-size")||"11px",$e("#gbox_"+$e.jgrid.jqID(Q.p.id)).append(""),p=$e(g).clone().appendTo("#testpg").width(),$e("#testpg").remove(),0$e("td#"+e+"_"+Q.p.pagerpos,"#"+t).innerWidth(),$e("td#"+e+"_"+Q.p.pagerpos,"#"+t).width(p)),Q.p._nvtd=[],Q.p._nvtd[0]=p?Math.floor((Q.p.width-p)/2):Math.floor(Q.p.width/3),Q.p._nvtd[1]=0,g=null,$e(".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&&$e(".ui-pg-selbox",Q.p.pager).val(this.value),Q.p.toppager&&$e(".ui-pg-selbox",Q.p.toppager).val(this.value),y()),!1}),!0===Q.p.pgbuttons&&($e(".ui-pg-button","#"+t).hover(function(){$e(this).hasClass(j)?this.style.cursor="default":($e(this).addClass(q),this.style.cursor="pointer")},function(){$e(this).hasClass(j)||($e(this).removeClass(q),this.style.cursor="default")}),$e("#first"+$e.jgrid.jqID(l)+", #prev"+$e.jgrid.jqID(l)+", #next"+$e.jgrid.jqID(l)+", #last"+$e.jgrid.jqID(l)).click(function(){var e,t,i,r,o,a,n;return $e(this).hasClass(j)||(e=J(Q.p.page,1),n=a=o=r=!(i=!1),0===(t=J(Q.p.lastpage,1))||1===t?n=a=o=r=!1:1';if(r.columns_selectAll&&(h+=''),Q.p.colSpanHeader.length)for(var g=0;g
",l.push(o),w||d.push(x),s&&!y&&(s=!1)}h+="",$e(i).append(h),$e("#col_menu").addClass("ui-menu "+I.menu_widget),$e("#chk_all","#col_menu").prop("checked",s),$e.jgrid.isElementInViewport($e("#col_menu")[0])||$e("#col_menu").css("left",-parseInt($e("#column_menu").innerWidth(),10)+"px"),$e.fn.html5sortable()&&$e("#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),$e(Q).jqGrid("destroyFrozenColumns"),$e(Q).jqGrid("remapColumns",l,!0),$e(Q).triggerHandler("jqGridColMenuColumnDone",[l,null,null]),$e.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,null,null),$e(Q).jqGrid("setFrozenColumns"),o=0;o li > a").on("click",function(e){var t;$e(e.target).hasClass("notclick")||($e(e.target).is(":input")?t=$e(e.target).is(":checked"):(t=!$e("input",this).is(":checked"),$e("input",this).prop("checked",t)),"check_all"===(e=$e("input",this).attr("name"))?t?($e("input","#col_menu").prop("checked",!0),$e(Q).jqGrid("showCol",d)):($e("input","#col_menu").prop("checked",!1),$e(Q).jqGrid("hideCol",d)):($e(Q).triggerHandler("jqGridColMenuColumnDone",[l,e,t]),$e.jgrid.isFunction(Q.p.colMenuColumnDone)&&Q.p.colMenuColumnDone.call(Q,l,e,t),t?($e(Q).jqGrid("showCol",e),$e(this).parent().attr("draggable","true")):($e(Q).jqGrid("hideCol",e),$e(this).parent().attr("draggable","false")),r.columns_selectAll&&$e("#chk_all","#col_menu").prop("checked",$e(".chk_selected:checked","#col_menu").length===$e(".chk_selected","#col_menu").length),$e("#column_menu").remove()))}).hover(function(){$e(this).addClass(q)},function(){$e(this).removeClass(q)})},fe=function(e,t,i,r){var o,a,n,l,s,d,p=Q.p.colModel[e],c="",e="",u="",h="",g="",f="",m=$e.jgrid.getRegional(Q,"search"),v=$e.jgrid.styleUI[Q.p.styleUI||"jQueryUI"].common,j=$e.jgrid.styleUI[b.styleUI||"jQueryUI"].modal;p&&((n=!(!Q.p.colFilters||!Q.p.colFilters[p.name])&&Q.p.colFilters[p.name])&&!$e.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!==$e.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=$e("
"),s="",s=(s+="
"+$e.jgrid.getRegional(Q,"colmenu.searchTitle")+"
")+'
",l.append(s),d="",p.searchoptions.defaultValue&&(d=$e.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),e&&(d=e),j=$e.extend(p.searchoptions,{name:p.index||p.name,id:"sval1_"+Q.p.idPrefix+p.name,oper:"search"}),e=$e.jgrid.createEl.call(Q,p.stype,j,d,!1,$e.extend({},$e.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),$e(e).addClass(I.filter_input),s=$e("
").append(e),l.append(s),s='
",l.append(s),f="",$e.each(m.odata,function(e,t){o=t.oper===h?'selected="selected"':"",-1!==$e.inArray(t.oper,a)&&(f+='")}),s='
",l.append(s),d=g||"",j=$e.extend(p.searchoptions,{name:p.index||p.name,id:"sval2_"+Q.p.idPrefix+p.name,oper:"search"}),e=$e.jgrid.createEl.call(Q,p.stype,j,d,!1,$e.extend({},$e.jgrid.ajaxOptions,Q.p.ajaxSelectOptions||{})),$e(e).addClass(I.filter_input),s=$e("
").append(e),l.append(s),s="",l.append(s),l=$e('').append(l),l=$e('').append(l),$e(r).append(l),$e("#search_menu").addClass("ui-menu "+I.menu_widget),$e.jgrid.isElementInViewport($e("#search_menu")[0])||$e("#search_menu").css("left",-parseInt($e("#column_menu").innerWidth(),10)+"px"),$e("#bs_reset, #bs_search","#search_menu","#bs_close").hover(function(){$e(this).addClass(q)},function(){$e(this).removeClass(q)}),$e("#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=me(),$e.extend(Q.p.postData,{filters:$e.jgrid.splitSearch(Q.p.searchModules)}),Q.p.search=!0):(Q.p.postData.filters=me(),Q.p.search=!1,Q.p.resetsearch=!0),d="",p.searchoptions.defaultValue&&(d=$e.jgrid.isFunction(p.searchoptions.defaultValue)?p.searchoptions.defaultValue.call(Q):p.searchoptions.defaultValue),$e("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(d),$e("#sval2_"+Q.p.idPrefix+p.name,"#search_menu").val(""),$e.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"reset",column:p.name}),$e(Q).trigger("reloadGrid")}),$e("#bs_search",l).on("click",function(e){Q.p.colFilters[p.name]={oper1:$e("#oper1","#search_menu").val(),value1:$e("#sval1_"+Q.p.idPrefix+p.name,"#search_menu").val(),rule:$e("#operand","#search_menu").val(),oper2:$e("#oper2","#search_menu").val(),value2:$e("#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=me(),$e.extend(Q.p.postData,{filters:$e.jgrid.splitSearch(Q.p.searchModules)})):Q.p.postData.filters=me(),Q.p.search=!0,$e.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"filtering",action:"search",column:p.name}),$e(Q).trigger("reloadGrid"),$e("#column_menu").remove()}),$e("#bs_close",l).on("click",function(){$e("#column_menu").remove()}))},me=function(){var e,t="",i=0;for(e in Q.p.colFilters)if(Q.p.colFilters.hasOwnProperty(e)){var r=Q.p.colFilters[e];if(!$e.isEmptyObject(r)){if(""===r.value1&&""===r.value2)break;01"),this.p.colModel.unshift({name:"cb",width:$e.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=$e.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=$e.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=$e.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&&(z(),ne());var we,ye,xe,p,c,_e,qe,Ce,i="",Ie="",r="",o="";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]?(r=" ui-i-asc",o=" ui-i-desc"):"single"===Q.p.viewsortcols[1]&&(r=" ui-single-sort-asc",Ie=" style='display:none'",Q.p.viewsortcols[0]=!(o=" ui-single-sort-desc")),we=M?"class='ui-th-div-ie'":"",_e=""),Q.p.multiSort&&Q.p.sortname)for(D=Q.p.sortname.split(","),e=0;e",De=a.index||a.name,i+="
"+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="",De===Q.p.sortname&&(Q.p.lastsort=e),Q.p.multiSort&&-1!==(O=$e.inArray(De,D))&&(a.lso=F[O]),i+=_e,Q.p.colMenu&&a.colmenu&&(i+=""),i+="
"}i+="",a=_e=null,$e(this).append(i),$e("thead tr",this).first().find("th").hover(function(){$e(this).addClass(q)},function(){$e(this).removeClass(q)}),this.p.multiselect&&(qe=[],$e("#cb_"+$e.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?($e(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),n=J(this.width,0),!1===this.hidden&&(l+=n+s,this.fixed?h+=n+s:d++)}),isNaN(Q.p.width)&&(Q.p.width=l+(!1!==Q.p.shrinkToFit||isNaN(Q.p.height)?0:r)),w.width=parseInt(Q.p.width,10),Q.p.tblwidth=l,!1===Q.p.shrinkToFit&&!0===Q.p.forceFit&&(Q.p.forceFit=!1),!0===Q.p.shrinkToFit&&0this.maxWidth?(Ne++,Me+=n,this.width=this.maxWidth,Se=e):(this.width=n,Ae+=n,Oe.push(e+"")),l+=this.width,Fe=e)}),Le=(G=0)===o?-1:0,l+=Me,-1);if(0Q.p.width&&(Q.p.colModel[Fe].width-=Q.p.tblwidth-parseInt(Q.p.width,10),Q.p.tblwidth=Q.p.width)}be=-1!==Q.p.styleUI.search("Bootstrap"),$e(A).css("width",w.width+"px").append("
 
"),Q.p.scrollPopUp&&$e(A).append("
"),$e(t).css("width",w.width+"px"),i=$e(Q).find("thead").first().get(0),Q.p.footerrow&&(ke+=""),Q.p.headerrow&&(Re+="
");var u=$e(i).find("tr").first(),Be="",Ee=0,ze=$e.jgrid.getFont($e("th",u).first()[0]);if(Q.p.disableClick=!1,$e("th",u).each(function(e){a=Q.p.colModel[e],ye=a.width,void 0===a.resizable&&(a.resizable=!0),a.resizable?(xe=document.createElement("span"),$e(xe).html(" ").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+v).css("cursor","col-resize"),$e(this).addClass(Q.p.resizeclass)):xe="",$e(this).css("width",ye+"px").prepend(xe),xe=null;var t="",i="",i=(a.hidden&&($e(this).css("display","none"),t="display:none;"),a.labelClasses&&(i="class='"+a.labelClasses+"'"),Be+="",w.headers[e]={width:ye,el:this},"boolean"!=typeof(Ie=a.sortable)&&(a.sortable=!0,Ie=!0),a.name);"cb"!==i&&"subgrid"!==i&&"rn"!==i&&"sc"!==i&&Q.p.viewsortcols[2]&&$e(">div",this).addClass("ui-jqgrid-sortable"),a.canvas_width=a.autosize_headers?$e.jgrid.getTextWidth($e("div",this).html(),ze)+(a.colmenu?$e.jgrid.floatNum($e(".colmenuspan",this).parent().width()):0)+$e.jgrid.floatNum($e("div",this).css("padding-left"))+$e.jgrid.floatNum($e("div",this).css("padding-right"))+$e.jgrid.floatNum($e(".ui-jqgrid-resize",this).width()):0,Ie&&(Q.p.multiSort?Q.p.viewsortcols[0]?($e("div span.s-ico",this).show(),a.lso&&$e("div span.ui-icon-"+a.lso,this).removeClass(j).css("display","")):a.lso&&($e("div span.s-ico",this).show(),$e("div span.ui-icon-"+a.lso,this).removeClass(j).css("display","")):Q.p.viewsortcols[0]?($e("div span.s-ico",this).show(),e===Q.p.lastsort&&$e("div span.ui-icon-"+Q.p.sortorder,this).removeClass(j).css("display","")):e===Q.p.lastsort&&""!==Q.p.sortname&&($e("div span.s-ico",this).show(),$e("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===$e(e.target).closest("th>span.ui-jqgrid-resize").length){var t,i=he(this);if(e.preventDefault(),Ee++,setTimeout(function(){Ee=0},400),2!==Ee)return!0===Q.p.forceFit&&(Q.p.nv=function(e){for(var t=e,i=e,r=e+1;rdiv>span>span.ui-grid-ico-sort"),$e(e.target).closest(o));if(1===o.length)if(r=Q.p.frozenColumns?(r=$e(this)[0].id.substring(Q.p.id.length+1),$e.jgrid.getElemByAttrVal(Q.p.colModel,"name",r,!0)):he(this),$e(e.target).hasClass("colmenuspan")){if($e.jgrid.isNull($e("#column_menu")[0])||$e("#column_menu").remove(),void 0!==r){var a,n,l,s,d,p=$e("#gbox_"+Q.p.id).offset(),p=$e(this).offset().left-p.left,c=("ltr"===Q.p.direction&&(p+=$e(this).outerWidth()),r),u=void 0,h=$e(w.hDiv).height(),g=($e(".ui-search-toolbar",w.hDiv)[0]&&!isNaN($e(".ui-search-toolbar",w.hDiv).height())&&(h-=$e(".ui-search-toolbar",w.hDiv).height()),$e(w.cDiv).is(":hidden")||(h+=$e(w.cDiv).outerHeight()),Q.p.toolbar[1]&&"bottom"!==Q.p.toolbar[2]&&!$e.jgrid.isNull($e(w.uDiv),!0)&&(h+=$e(w.uDiv).outerHeight()),Q.p.toppager&&(h+=$e("#"+$e.jgrid.jqID(Q.p.id)+"_toppager").outerHeight()),p=parseInt(p,10),u=h,""),f=Q.p.colModel[c],m=$e.extend({sorting:!0,columns:!0,filtering:!0,seraching:!0,grouping:!0,freeze:!0},f.coloptions),h=$e.jgrid.getRegional(Q,"colmenu"),v=Q.p.colNames[c],j=[],b=$e.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=$e.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],$e.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"custom",action:s,column:s.colname}),$e(Q).triggerHandler("jqGridcolMenuBeforeProcess",[{module:"custom",action:s,column:s.colname}]),d=s.exclude.split(","),d=$e.map(d,function(e){return $e.jgrid.trim(e)}),s.colname===b||"_all_"===s.colname&&-1===$e.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('"),$e("#gbox_"+Q.p.id).append(j.join("")),$e("#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=$e("#column_menu").width()+26,$e("#column_menu").css("left",p-v+"px")),$e("#column_menu > li > a").hover(function(){var e,t;$e("#col_menu").remove(),$e("#search_menu").remove(),"columns"===$e(this).attr("data-value")&&(e=$e(this).parent().width()+8,t=$e(this).parent().position().top-5,ge(t,e,$e(this).parent(),m)),"filtering"===$e(this).attr("data-value")&&(e=$e(this).parent().width()+8,t=$e(this).parent().position().top-5,fe(c,t,e,$e(this).parent())),$e(this).addClass(q)},function(){$e(this).removeClass(q)}).click(function(){var e=$e(this).attr("data-value"),t=Q.grid.headers[c].el;"sortasc"===e||"sortdesc"===e?($e.jgrid.isFunction(Q.p.colMenuBeforeProcess)&&Q.p.colMenuBeforeProcess.call(Q,{module:"sorting",action:"sortasc"===e?"asc":"desc",column:f.name}),ue("jqgh_"+Q.p.id+"_"+f.name,c,!0,"sortasc"===e?"asc":"desc",t)):"grouping"===e?ve(c,a):"freeze"===e&&je(c,n),"grouping"!==e&&"freeze"!==e||$e(this).remove(),Q.p.colMenuCustom.hasOwnProperty(e)&&(t=Q.p.colMenuCustom[e],$e.jgrid.isFunction(t.funcname))&&(t.funcname.call(Q,b),t.closeOnRun)&&$e(this).remove()}),parseFloat($e("#column_menu").css("left"))<0&&$e("#column_menu").css("left",$e(Q).css("left")),!0===Q.p.menubar&&$e("#"+Q.p.id+"_menubar").hide(),e.stopPropagation()}}else Q.p.viewsortcols[2]||(t=!0,i=o.attr("sort")),$e.jgrid.isNull(r)||ue($e("div",this)[0].id,r,t,i,this),void 0!==Q.p.selHeadInd&&$e(w.headers[Q.p.selHeadInd].el).attr("tabindex","-1"),Q.p.selHeadInd=r,$e(this).attr("tabindex","0")}),a=null,jQuery._cacheCanvas=null,Q.p.sortable&&$e.fn.sortable)try{$e(Q).jqGrid("sortableColumns",u)}catch(e){}Q.p.footerrow&&(ke+=""),Q.p.headerrow&&(Re+=""),Be+="",r=document.createElement("tbody"),this.appendChild(r),$e(this).addClass(K($,"rowTable",!0,"ui-jqgrid-btable ui-common-table")).append(Be),Q.p.altRows&&$e(this).addClass(K($,"stripedTable",!0,""));var m,x,He,Ue,Be=null,Le=$e("
").append(i),_=!(!Q.p.caption||!0!==Q.p.hiddengrid),G=$e("
"),i=null,Ve=(w.hDiv=document.createElement("div"),w.hDiv.style.width=w.width-o+"px",w.hDiv.className=K($,"headerDiv",!0,"ui-jqgrid-hdiv"),$e(w.hDiv).append(G),$e(G).append(Le),_&&$e(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=$e(Q.p.pager).attr("id"),$e("#"+$e.jgrid.jqID(Q.p.pager)).css({width:w.width-o+"px"}).addClass(K($,"pagerBox",!0,"ui-jqgrid-pager")).appendTo(A),_&&$e("#"+$e.jgrid.jqID(Q.p.pager)).hide(),pe(Q.p.pager,""),Q.p.pager="#"+$e.jgrid.jqID(Q.p.pager)),!1===Q.p.cellEdit&&!0===Q.p.hoverrows&&$e(Q).on({mouseover:function(e){c=$e(e.target).closest("tr.jqgrow"),"ui-subgrid"!==$e(c).attr("class")&&$e(c).addClass(q)},mouseout:function(e){c=$e(e.target).closest("tr.jqgrow"),$e(c).removeClass(q)}}),$e(Q).before(w.hDiv).on({click:function(e){if(p=e.target,c=$e(p,Q.rows).closest("tr.jqgrow"),0===$e(c).length||-1td")).length&&(x=$e.jgrid.getCellIndex(p)),!0!==Q.p.cellEdit||Q.p.ariaBody){if(0Q.p.lastpage&&(i=Q.p.lastpage),Q.p.page=i=i<1?1:i,Q.grid.prevRowHeight?Q.grid.bDiv.scrollTop=(i-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&&$e(Q).jqGrid("showAddEditButtons"),Q.p.searchCols&&!$e.isEmptyObject(Q.p._results)&&(Q.p._results={},$e.jgrid.searchColOnEnter(Q.p.id,null)),!1},dblclick:function(e){var t;if(p=e.target,c=$e(p,Q.rows).closest("tr.jqgrow"),0!==$e(c).length)return m=c[0].rowIndex,x=$e.jgrid.getCellIndex(p),t=$e(Q).triggerHandler("jqGridDblClickRow",[$e(c).attr("id"),m,x,e]),!$e.jgrid.isNull(t)||$e.jgrid.isFunction(Q.p.ondblClickRow)&&(t=Q.p.ondblClickRow.call(Q,$e(c).attr("id"),m,x,e),!$e.jgrid.isNull(t))?t:void 0},contextmenu:function(e){var t;if(p=e.target,c=$e(p,Q.rows).closest("tr.jqgrow"),0!==$e(c).length)return Q.p.multiselect||$e(Q).jqGrid("setSelection",c[0].id,!0,e),m=c[0].rowIndex,x=$e.jgrid.getCellIndex(p),t=$e(Q).triggerHandler("jqGridRightClickRow",[$e(c).attr("id"),m,x,e]),!$e.jgrid.isNull(t)||$e.jgrid.isFunction(Q.p.onRightClickRow)&&(t=Q.p.onRightClickRow.call(Q,$e(c).attr("id"),m,x,e),!$e.jgrid.isNull(t))?t:void 0}}),w.bDiv=document.createElement("div"),M&&"auto"===String(Q.p.height).toLowerCase()&&(Q.p.height="100%"),$e(w.bDiv).append($e('
').append("
").append(this)).addClass("ui-jqgrid-bdiv").css({height:Q.p.height+(isNaN(Q.p.height)?"":"px"),width:w.width-o+"px"}).on("scroll",w.scrollGrid),$e(w.bDiv).find("table").first().css({width:Q.p.tblwidth+"px"}),$e.support.tbody||2===$e("tbody",this).length&&$e("tbody",this).slice(1).remove(),Q.p.multikey&&($e.jgrid.msie()?$e(w.bDiv).on("selectstart",function(){return!1}):$e(w.bDiv).on("mousedown",function(){return!1})),_&&$e(w.bDiv).hide(),C+" "+K($,"icon_caption_open",!0)),We=C+" "+K($,"icon_caption_close",!0),Qe=(w.cDiv=document.createElement("div"),!0===Q.p.hidegrid?$e("").hover(function(){Qe.addClass(q)},function(){Qe.removeClass(q)}).append("").css("rtl"===v?"left":"right","0px"):"");$e(w.cDiv).append(Qe).append(""+Q.p.caption+"").addClass("ui-jqgrid-titlebar ui-jqgrid-caption"+("rtl"===v?"-rtl":"")+" "+K($,"gridtitleBox",!0)),!0===Q.p.menubar&&(t='',$e("#gbox_"+Q.p.id).append(t),$e(w.cDiv).append(""),$e(".ui-jqgrid-menubar",w.cDiv).hover(function(){$e(this).addClass(q)},function(){$e(this).removeClass(q)}).on("click",function(e){e=$e(e.target).position();$e("#"+Q.p.id+"_menubar").show(),"rtl"===Q.p.direction&&$e("#"+Q.p.id+"_menubar").css({left:e.left-$e("#"+Q.p.id+"_menubar").width()-20})})),$e(w.cDiv).insertBefore(w.hDiv),Q.p.toolbar[0]&&(u=K($,"customtoolbarBox",!0,"ui-userdata"),w.uDiv=document.createElement("div"),"top"===Q.p.toolbar[1]?$e(w.uDiv).insertBefore(w.hDiv):"bottom"===Q.p.toolbar[1]&&$e(w.uDiv).insertAfter(w.hDiv),"both"===Q.p.toolbar[1]?(w.ubDiv=document.createElement("div"),$e(w.uDiv).addClass(u+" ui-userdata-top").attr("id","t_"+this.id).insertBefore(w.hDiv).width(w.width-o),$e(w.ubDiv).addClass(u+" ui-userdata-bottom").attr("id","tb_"+this.id).insertAfter(w.hDiv).width(w.width-o),_&&$e(w.ubDiv).hide()):$e(w.uDiv).width(w.width-o).addClass(u+" ui-userdata-top").attr("id","t_"+this.id),_)&&$e(w.uDiv).hide(),Q.p.toppager&&(Q.p.toppager=$e.jgrid.jqID(Q.p.id)+"_toppager",w.topDiv=$e("
")[0],$e(w.topDiv).addClass(K($,"toppagerBox",!0,"ui-jqgrid-toppager")).width(w.width-o).insertBefore(w.hDiv),pe(Q.p.toppager,"_t"),Q.p.toppager="#"+Q.p.toppager),Q.p.footerrow&&(w.sDiv=$e("
")[0],G=$e("
"),$e(w.sDiv).append(G).width(w.width-o).insertAfter(w.hDiv),$e(G).append(ke),w.footers=$e(".ui-jqgrid-ftable",w.sDiv)[0].rows[0].cells,Q.p.rownumbers&&(w.footers[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),_)&&$e(w.sDiv).hide(),Q.p.headerrow&&(w.hrDiv=$e("
")[0],G=$e("
"),$e(w.hrDiv).append(G).width(w.width-o).insertAfter(w.hDiv),$e(G).append(Re),w.hrheaders=$e(".ui-jqgrid-hrtable",w.hrDiv)[0].rows[0].cells,Q.p.rownumbers&&(w.hrheaders[0].className=K($,"rownumBox",!0,"jqgrid-rownum")),_)&&$e(w.nDiv).hide(),G=null,Q.p.caption?(Ue=Q.p.datatype,!0===Q.p.hidegrid&&($e(".ui-jqgrid-titlebar-close",w.cDiv).click(function(e){var t,i=$e.jgrid.isFunction(Q.p.onHeaderClick),r=".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]&&(r+=", #"+$e(w.ubDiv).attr("id")),r+=", #"+$e(w.uDiv).attr("id")),t=$e(r,"#gview_"+$e.jgrid.jqID(Q.p.id)).length,"visible"===Q.p.gridstate?$e(r,"#gbox_"+$e.jgrid.jqID(Q.p.id)).slideUp("fast",function(){0===--t&&($e("span",o).removeClass(Ve).addClass(We),Q.p.gridstate="hidden",$e("#gbox_"+$e.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&$e(".ui-resizable-handle","#gbox_"+$e.jgrid.jqID(Q.p.id)).hide(),$e(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),i)&&!_&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}):"hidden"===Q.p.gridstate&&$e(r,"#gbox_"+$e.jgrid.jqID(Q.p.id)).slideDown("fast",function(){0===--t&&($e("span",o).removeClass(We).addClass(Ve),_&&(Q.p.datatype=Ue,y(),_=!1),Q.p.gridstate="visible",$e("#gbox_"+$e.jgrid.jqID(Q.p.id)).hasClass("ui-resizable")&&$e(".ui-resizable-handle","#gbox_"+$e.jgrid.jqID(Q.p.id)).show(),$e(Q).triggerHandler("jqGridHeaderClick",[Q.p.gridstate,e]),i)&&!_&&Q.p.onHeaderClick.call(Q,Q.p.gridstate,e)}),!1}),_)&&(Q.p.datatype="local",$e(".ui-jqgrid-titlebar-close",w.cDiv).trigger("click"))):($e(w.cDiv).hide(),Q.p.toppager||$e(w.hDiv).addClass(K(Q.p.styleUI+".common","cornertop",!0))),(Q.p.headerrow?$e(w.hrDiv):$e(w.hDiv)).after(w.bDiv),$e(w.hDiv).mousemove(function(e){if(w.resizing)return w.dragMove(e),!1}),$e(".ui-jqgrid-labels",w.hDiv).on("selectstart",function(){return!1}),$e(document).on("mouseup.jqGrid"+Q.p.id,function(){return!w.resizing||(w.dragEnd(!0),!1)}),"rtl"===Q.p.direction&&$e(Q).on("jqGridAfterGridComplete.setRTLPadding",function(){var e=w.bDiv.offsetWidth-w.bDiv.clientWidth;0 tr").slice(1),i>Q.p.records&&(i=Q.p.records),c=i-a.length,Q.p.reccount=a.length,(a=a.outerHeight()||Q.grid.prevRowHeight)&&(s=c*a,l=parseInt(Q.p.records,10)*a,$e(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){$e(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?""+$e.jgrid.getRegional(Q,"defaults.emptyrecords",Q.p.emptyrecords)+"":" ")+"",$e(w.bDiv).find("table").first().append(s)),t&&Q.p.jqgdnd&&$e(Q).jqGrid("gridDnD","updateDnD"),$e(Q).triggerHandler("jqGridGridComplete"),$e.jgrid.isFunction(Q.p.gridComplete)&&Q.p.gridComplete.call(Q),$e(Q).triggerHandler("jqGridAfterGridComplete")},Q.refreshIndex=ne,Q.setHeadCheckBox=de,Q.constructTr=le,Q.formatter=function(e,t,i,r,o){return E(e,t,i,r,o)},$e.extend(w,{populate:y,emptyRows:ae,beginReq:V,endReq:f}),this.grid=w,Q.addXmlData=function(e){H(e)},Q.addJSONData=function(e){U(e)},Q.addLocalData=function(e){return L(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]=$e(e).jqGrid("addSubGridCell",c+h,1)),f=c+u+h;f"+m+"";if(p.unshift(e.constructTr(n,!1,r,o,b)),p[p.length]="",0===e.rows.length)$e(e.grid.bDiv).find("table").first().append(p.join(""));else switch(s){case"last":$e(e.rows[e.rows.length-1]).after(p.join("")),g=e.rows.length-1;break;case"first":$e(e.rows[0]).after(p.join("")),g=1;break;case"after":(g=$e(e).jqGrid("getGridRowById",d))&&($e(e.rows[g.rowIndex+1]).hasClass("ui-subgrid")?$e(e.rows[g.rowIndex+1]).after(p):$e(g).after(p.join("")),g=g.rowIndex+1);break;case"before":(g=$e(e).jqGrid("getGridRowById",d))&&($e(g).before(p.join("")),g=g.rowIndex-1)}if(!0===e.p.subGrid&&$e(e).jqGrid("addSubGrid",c+h,g),e.p.records++,e.p.reccount++,$e(e).triggerHandler("jqGridAfterInsertRow",[n,b,b]),a&&e.p.afterInsertRow.call(e,n,b,b),i++,"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=$e(e).jqGrid("getGridRowById","norecs"))&&g.rowIndex&&0tr"+(t||""),e).each(function(){var t=this,i=$e.makeArray(t.cells);$e.each(r,function(){var e=i[this];e&&t.appendChild(e)})})}i(o.p.colModel),i(o.p.colNames),i(o.grid.headers),a($e(o.grid.hDiv).find("thead").first(),t&&":not(.ui-jqgrid-labels)"),e&&a($e("#"+$e.jgrid.jqID(o.p.id)+" tbody").first(),".jqgfirstrow, tr.jqgrow, tr.jqfoot, tr.jqgroup"),o.p.footerrow&&a($e(o.grid.sDiv).find("tbody").first()),o.p.headerrow&&a($e(o.grid.hrDiv).find("tbody").first()),o.p.remapColumns&&(o.p.remapColumns.length?i(o.p.remapColumns):o.p.remapColumns=$e.makeArray(r)),o.p.lastsort=$e.inArray(o.p.lastsort,r),o.p.treeGrid&&(o.p.expColInd=$e.inArray(o.p.expColInd,r)),$e(o).triggerHandler("jqGridRemapColumns",[r,e,t])},setGridWidth:function(v,j,b){return this.each(function(){if(this.grid){var e,t,i=this,r=!1,o=0,a=$e.jgrid.cell_width?0:i.p.cellLayout,n=0,l=!1,s=i.p.scrollOffset,d=0,p=-1===i.p.styleUI.search("Bootstrap")||isNaN(i.p.height)?0:2;if("boolean"!=typeof j&&(j=i.p.shrinkToFit),"boolean"!=typeof b&&(b=!0),!isNaN(v)){if(v=parseInt(v,10),i.grid.width=i.p.width=v,$e("#gbox_"+$e.jgrid.jqID(i.p.id)).css("width",v+"px"),$e("#gview_"+$e.jgrid.jqID(i.p.id)).css("width",v+"px"),$e(i.grid.bDiv).css("width",v-p+"px"),$e(i.grid.hDiv).css("width",v-p+"px"),i.p.pager&&$e(i.p.pager).css("width",v-p+"px"),i.p.toppager&&$e(i.p.toppager).css("width",v-p+"px"),!0===i.p.toolbar[0]&&($e(i.grid.uDiv).css("width",v-p+"px"),"both"===i.p.toolbar[1])&&$e(i.grid.ubDiv).css("width",v-p+"px"),i.p.footerrow&&$e(i.grid.sDiv).css("width",v-p+"px"),i.p.headerrow&&$e(i.grid.hrDiv).css("width",v-p+"px"),(e=$e(i).jqGrid("isGroupHeaderOn"))&&$e(i).jqGrid("destroyGroupHeader",!1),i.p.frozenColumns&&b&&($e(i).jqGrid("destroyFrozenColumns"),r=!0),!1===j&&!0===i.p.forceFit&&(i.p.forceFit=!1),!0===j){if($e.each(i.p.colModel,function(){!1===this.hidden&&(g=this.widthOrg,o+=g+a,this.fixed?d+=g+a:n++)}),0===n)return;i.p.tblwidth=o;var c=v-a*n-d,u=$e("#norecs","#"+$e.jgrid.jqID(i.p.id)).eq(0),h=(isNaN(i.p.height)||($e(i.grid.bDiv)[0].clientHeight<=$e(i.grid.bDiv)[0].scrollHeight||i.rows.length===u.length+1||"scroll"===$e(i.grid.bDiv).css("overflow-y"))&&(l=!0,c-=s),(o=0)v?(l=i.p.tblwidth-parseInt(v,10),i.p.tblwidth=v,g=i.p.colModel[t].width=i.p.colModel[t].width-l):i.p.tblwidth===v?(g=i.p.colModel[t].width=i.p.colModel[t].width-p,i.p.tblwidth=v-p):g=i.p.colModel[t].width;var s=$e(i.grid.bDiv)[0].scrollWidth>$e(i.grid.bDiv).width()&&0!=p?-1:0,g=i.p.colModel[t].width+=s;i.grid.headers[t].width=g,i.grid.headers[t].el.style.width=g+"px",h&&(i.grid.cols[t].style.width=g+"px"),i.p.footerrow&&(i.grid.footers[t].style.width=g+"px"),i.p.headerrow&&(i.grid.hrheaders[t].style.width=g+"px")}if($e(i.grid.bDiv).find("table").first().css("width",i.p.tblwidth+"px"),$e(i.grid.hDiv).find("table").first().css("width",i.p.tblwidth+"px"),i.grid.hDiv.scrollLeft=i.grid.bDiv.scrollLeft,i.p.footerrow&&$e(i.grid.sDiv).find("table").first().css("width",i.p.tblwidth+"px"),i.p.headerrow&&$e(i.grid.hrDiv).find("table").first().css("width",i.p.tblwidth+"px"),e){var f=$e.extend([],i.p.groupHeader);i.p.groupHeader=null;for(var m=0;mparseFloat(a)&&(e.css("max-height",o),["100%","auto"].includes(i.p.height))&&$e(i.grid.bDiv).height()<$e(i).height()&&$e("#"+$e.jgrid.jqID(i.p.id)).jqGrid("setGridWidth",i.p.width+i.p.scrollOffset-2,!1,!1))})},setCaption:function(t){return this.each(function(){var e=$e(this).jqGrid("getStyleUI",this.p.styleUI+".common","cornertop",!0);this.p.caption=t,$e(".ui-jqgrid-title, .ui-jqgrid-title-rtl",this.grid.cDiv).html(t),$e(this.grid.cDiv).show(),$e(this.grid.hDiv).removeClass(e)})},setLabel:function(a,n,l,s){return this.each(function(){var e=this,t=-1;if(e.grid&&!$e.jgrid.isNull(a)&&0<=(t=isNaN(a)?$e.jgrid.getElemByAttrVal(e.p.colModel,"name",a,!0):parseInt(a,10))){var i=$e("tr.ui-jqgrid-labels th",e.grid.hDiv).eq(t);if(n){var r=$e(".s-ico",i),o=$e(".colmenu",i);try{$e("[id^=jqgh_]",i).empty().html(n).append(r).append(o)}catch(e){}e.p.colNames[t]=n,e.p.frozenColumns&&(i=$e("tr.ui-jqgrid-labels th",e.grid.fhDiv).eq(t),r=$e(".s-ico",i),$e("[id^=jqgh_]",i).empty().html(n).append(r))}l&&("string"==typeof l?$e(i).addClass(l):$e(i).css(l)),"object"==typeof s&&$e(i).attr(s)}})},setSortIcon:function(l,s){return this.each(function(){var e,t,i,r=this,o=-1,a=1;if(r.grid){$e.jgrid.isNull(s)?a=r.p.colNames.length:o=isNaN(s)?$e.jgrid.getElemByAttrVal(r.p.colModel,"name",s,!0):parseInt(s,10);for(var n=0;n"+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),$e.jgrid.getFont(this[0]));return this.each(function(){var t=this,i=-1,e=t.p.colModel;if(t.grid&&0<=(i=isNaN(n)?$e.jgrid.getElemByAttrVal(t.p.colModel,"name",n,!0):parseInt(n,10))){var r=t.rows.length,o=0,a=0;if(r&&0'),l.grid.fbDiv=$e('
'),$e("#gview_"+$e.jgrid.jqID(l.p.id)).append(l.grid.fhDiv),t=$e(".ui-jqgrid-htable","#gview_"+$e.jgrid.jqID(l.p.id)).clone(!0),$e(t).width(1),$e(l.grid.fhDiv).append(t),$e(l).jqGrid("isGroupHeaderOn")?($e("tr.jqg-third-row-header",l.grid.hDiv).height(),$e("tr.jqg-first-row-header, tr.jqg-third-row-header",t).each(function(){$e("th",this).slice(l.p.frozenColCount+1).remove()}),r=i=-1,$e("tr.jqg-second-row-header th",t).each(function(){if(o=parseInt($e(this).attr("colspan"),10),parseInt($e(this).attr("rowspan"),10)&&(i++,r++),o&&(i+=o,r++),i===l.p.frozenColCount)return r=l.p.frozenColCount,!1}),i!==l.p.frozenColCount&&(r=l.p.frozenColCount),$e("tr.jqg-second-row-header",t).each(function(){$e("th",this).slice(r+1).remove()})):(a=[],$e("#gview_"+$e.jgrid.jqID(l.p.id)+" .ui-jqgrid-htable > thead >tr").each(function(e,t){a.push(parseInt($e(this).height(),10))}),$e("thead >tr",t).each(function(){$e("th",this).slice(l.p.frozenColCount+1).remove()}),$e("thead >tr",t).each(function(e){0===e&&--a[e],$e(this).height(a[e])})),(n=$e("tr.jqg-second-row-header th",t).filter(function(){return"none"!==$e(this).css("display")}).first())&&""===$e.jgrid.trim(n.text())&&n.html(" "),(n=$e("tr.jqg-third-row-header th",t).filter(function(){return"none"!==$e(this).css("display")}).first())&&""===$e.jgrid.trim(n.text())&&$e("div",n).prepend(" "),$e.jgrid.msie()||$e(t).css("height","100%"),$e(l.grid.fhDiv).mousemove(function(e){if(l.grid.resizing)return l.grid.dragMove(e),!1}),l.p.sortable&&$e.fn.sortable&&$e(l.grid.fhDiv).find("tr.ui-jqgrid-labels th").addClass("sortable-disabled"),l.p.headerrow&&(l.grid.fhrDiv=$e('
'),$e("#gview_"+$e.jgrid.jqID(l.p.id)).append(l.grid.fhrDiv)),l.p.footerrow&&(l.grid.fsDiv=$e('
'),$e("#gview_"+$e.jgrid.jqID(l.p.id)).append(l.grid.fsDiv)),$e("#gview_"+$e.jgrid.jqID(l.p.id)).append(l.grid.fbDiv),$e(l.grid.fbDiv).on("mousewheel DOMMouseScroll",function(e){var t=$e(l.grid.bDiv).scrollTop();0o.length-1||"number"!=typeof l||l'),i.position||(i.position="last"),i.closeoncall||(i.closeoncall=!0),i.divider?(a='',i.cick=null):a='","last"===i.position?$e("#"+this.p.id+"_menubar").append(a):$e("#"+this.p.id+"_menubar").prepend(a)}$e("li a","#"+this.p.id+"_menubar").each(function(e,i){$e(o).each(function(e,t){if(t.id===i.id&&$e.jgrid.isFunction(t.click))return $e(i).on("click",function(e){t.click.call(r,e)}),!1}),$e(this).hover(function(e){$e(this).addClass(n.hover),e.stopPropagation()},function(e){$e(this).removeClass(n.hover)})})})},menubarDelete:function(e){return this.each(function(){$e("#"+e,"#"+this.p.id+"_menubar").remove()})},addColSearchMenu:function(){return this.each(function(){var e=this;$e(e).colMenuAdd("sc",{title:"Reset",position:"first",id:"reset",funcname:function(){$e("input[id^='jqs_']","#"+this.p.id).each(function(e){$e(this).val("")}),$e(this)[0].p._results={},$e(this).jqGrid("showCol",this.p._avc)}}),$e(e).colMenuAdd("sc",{separator:!0,id:"groupOp"}),$e(e).colMenuAdd("sc",{separator:!0,id:"operOp"}),$e(e).colMenuAdd("sc",{separator:!0,id:"close",funcname:function(){return!0}}),$e(e).on("jqGridcolMenuBeforeProcess.custom",function(e,t){if("custom"===t.module&&"sc"===t.column){var i,r=$e.jgrid.getRegional(this,"search"),o=this.p.searchColOptions,a=$e.jgrid.getMethod("getStyleUI"),n=this.p.styleUI+".base";if("reset"===t.action.id&&(t.action.title=r.Reset||"Reset",t.action.icon=a(this.p.styleUI+".colmenu","icon_reset",!0,"")),"close"===t.action.id&&(t.action.title=r.Close||"Close",t.action.icon=a(this.p.styleUI+".colmenu","icon_close",!0,"")),"groupOp"===t.action.id){i=a(n,"searchSelect",!1,"search-col-input"),t.action.title=""+(r.Operand||"Operand: "),t.action.title+="",setTimeout(function(){$e("#opselect").on("change",function(){var e=$e("#"+$e(this).attr("data-grid-id"))[0];e.p.searchColOptions.searchOp=$e(this).val(),$e.jgrid.myfunc(e.p.id)})},200)}if("operOp"===t.action.id){i=a(n,"searchSelect",!1,"search-col-input"),t.action.title=r.Operation||"Oper : ",t.action.title+="",setTimeout(function(){$e("#selectoper").on("change",function(){var e=$e("#"+$e(this).attr("data-grid-id"))[0];e.p.searchColOptions.operand=$e(this).val(),$e.jgrid.myfunc(e.p.id)})},200)}}})})},disableColMenu:function(e){return this.each(function(){$e(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","none")})},enableColMenu:function(e){return this.each(function(){$e(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","inline")})}}),$e.jgrid.extend({editCell:function(c,u,h,g,f){return this.each(function(){var e,t,i,r,o=this,a=$e(this).jqGrid("getStyleUI",o.p.styleUI+".common","highlight",!0),n=o.p.ariaBody?"":$e(this).jqGrid("getStyleUI",o.p.styleUI+".common","hover",!0),l=$e(this).jqGrid("getStyleUI",o.p.styleUI+".celledit","inputClass",!0),s=$e(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||$e(o).jqGrid("GridNav"),0"+t,d.bClose,{styleUI:r.p.styleUI,top:c.top+30,left:c.left,onClose:function(){r.p.restoreCellonFail||$e("#"+y+"_"+p,a).focus()}}),r.p.restoreCellonFail&&$e(r).jqGrid("restoreCell",y,x)}},$e.jgrid.ajaxOptions,r.p.ajaxCellOptions||{}))}else try{$e.jgrid.info_dialog(s.errcap,s.nourl,d.bClose,{styleUI:r.p.styleUI}),r.p.restoreCellonFail&&$e(r).jqGrid("restoreCell",y,x)}catch(e){}"clientArray"===r.p.cellsubmit&&($e(n).empty(),$e(r).jqGrid("setCell",r.p.savedRow[l].rowId,x,h,!1,!1,!0),n=$e("td",a).eq(x),$e(n).addClass("dirty-cell"),$e(a).addClass("edited"),$e(r).triggerHandler("jqGridAfterSaveCell",[r.p.savedRow[l].rowId,o,u,y,x]),$e.jgrid.isFunction(r.p.afterSaveCell)&&r.p.afterSaveCell.call(r,r.p.savedRow[l].rowId,o,u,y,x),r.p.savedRow.splice(0,1))}else try{$e.jgrid.isFunction(r.p.validationCell)?r.p.validationCell.call(r,$e("#"+y+"_"+p,a),f[1],y,x):(window.setTimeout(function(){$e.jgrid.info_dialog(s.errcap,u+" "+f[1],d.bClose,{styleUI:r.p.styleUI,top:c.top+30,left:c.left,onClose:function(){r.p.restoreCellonFail||$e("#"+y+"_"+p,a).focus()}})},50),r.p.restoreCellonFail&&$e(r).jqGrid("restoreCell",y,x))}catch(e){alert(f[1])}}else $e(r).jqGrid("restoreCell",y,x)}window.setTimeout(function(){$e("#"+$e.jgrid.jqID(r.p.knv)).attr("tabindex","-1").focus(),r.p.ariaBody&&$e(r).jqGrid("focusBodyCell",r.p.iRow,r.p.iCol)},0)}})},restoreCell:function(r,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 i=$e(e).jqGrid("getGridRowById",e.p.savedRow[t].rowId),i=$e("td",i).eq(o);if($e.jgrid.isFunction($e.fn.datepicker))try{$e("input.hasDatepicker",i).datepicker("hide")}catch(e){}$e(i).empty().attr("tabindex","-1"),$e(e).jqGrid("setCell",e.p.savedRow[0].rowId,o,e.p.savedRow[t].v,!1,!1,!0),$e(e).triggerHandler("jqGridAfterRestoreCell",[e.p.savedRow[t].rowId,e.p.savedRow[t].v,r,o]),$e.jgrid.isFunction(e.p.afterRestoreCell)&&e.p.afterRestoreCell.call(e,e.p.savedRow[t].rowId,e.p.savedRow[t].v,r,o),e.p.savedRow.splice(0,1)}window.setTimeout(function(){$e("#"+e.p.knv).attr("tabindex","-1").focus(),e.p.ariaBody&&$e(e).jqGrid("focusBodyCell",e.p.iRow,e.p.iCol)},0)}})},nextCell:function(r,o,a){var n;return this.each(function(){var e,t=this,i=!1;if(t.grid&&!0===t.p.cellEdit){for(e=o+1;e=r+parseInt(o,10)?$e(l.grid.bDiv)[0].scrollLeft=$e(l.grid.bDiv)[0].scrollLeft+l.rows[e].cells[t].clientWidth:n
"),$e(e).insertBefore(l.grid.cDiv),$e("#"+l.p.knv).focus().keydown(function(e){switch(i=e.keyCode,"rtl"===l.p.direction&&(37===i?i=39:39===i&&(i=37)),i){case 38:0"+r.caption+""),$e("").hover(function(){h.addClass(p.hover)},function(){h.removeClass(p.hover)}).append("")),g=($e(u).append(h),s?(c.dir="rtl",$e(".ui-jqdialog-title",u).css("float","right"),$e(".ui-jqdialog-titlebar-close",u).css("left","0.3em")):(c.dir="ltr",$e(".ui-jqdialog-title",u).css("float","left"),$e(".ui-jqdialog-titlebar-close",u).css("right","0.3em")),document.createElement("div")),e=($e(g).addClass("ui-jqdialog-content "+d.content).attr("id",i.modalcontent),$e(g).append(e),c.appendChild(g),$e(c).prepend(u),!0===a?$e("body").append(c):"string"==typeof a?$e(a).append(c):$e(c).insertBefore(t),$e(c).css(n),void 0===r.jqModal&&(r.jqModal=!0),{});$e.fn.jqm&&!0===r.jqModal?(0===r.left&&0===r.top&&r.overlay&&(g=[],g=$e.jgrid.findPos(o),r.left=g[0]+4,r.top=g[1]+4),e.top=r.top+"px",e.left=r.left):0===r.left&&0===r.top||(e.left=r.left,e.top=r.top+"px"),$e("a.ui-jqdialog-titlebar-close",u).click(function(){var e=$e("#"+$e.jgrid.jqID(i.themodal)).data("onClose")||r.onClose,t=$e("#"+$e.jgrid.jqID(i.themodal)).data("gbox")||r.gbox;return l.hideModal("#"+$e.jgrid.jqID(i.themodal),{gb:t,jqm:r.jqModal,onClose:e,removemodal:r.removemodal||!1,formprop:!r.recreateForm||!1,form:r.form||""}),!1}),0!==r.width&&r.width||(r.width=300),0!==r.height&&r.height||(r.height=200),r.zIndex||(n=$e(t).parents("*[role=dialog]").first().css("z-index"),r.zIndex=n?parseInt(n,10)+2:950);if(s&&e.hasOwnProperty("left")&&!a&&(o=$e(r.gbox).outerWidth()-(isNaN(r.width)?0:parseInt(r.width,10))+12,e.left=parseInt(e.left,10)+parseInt(o,10)),e.hasOwnProperty("left")&&(e.left+="px"),$e(c).css($e.extend({width:isNaN(r.width)?"auto":r.width+"px",height:isNaN(r.height)?"auto":r.height+"px",zIndex:r.zIndex,overflow:"hidden"},e)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":i.modalhead,"aria-hidden":"true"}),void 0===r.drag&&(r.drag=!0),void 0===r.resize&&(r.resize=!0),r.drag)if($e(u).css("cursor","move"),$e.fn.tinyDraggable)$e(c).tinyDraggable({handle:"#"+$e.jgrid.jqID(u.id)});else try{$e(c).draggable({handle:$e("#"+$e.jgrid.jqID(u.id))})}catch(e){}if(r.resize)if($e.fn.jqResize)$e(c).append("
"),$e("#"+$e.jgrid.jqID(i.themodal)).jqResize(".jqResize",!!i.scrollelm&&"#"+$e.jgrid.jqID(i.scrollelm));else try{$e(c).resizable({handles:"se, sw",alsoResize:!!i.scrollelm&&"#"+$e.jgrid.jqID(i.scrollelm)})}catch(e){}!0===r.closeOnEscape&&$e(c).keydown(function(e){27===e.which&&(e=$e("#"+$e.jgrid.jqID(i.themodal)).data("onClose")||r.onClose,l.hideModal("#"+$e.jgrid.jqID(i.themodal),{gb:r.gbox,jqm:r.jqModal,onClose:e,removemodal:r.removemodal||!1,formprop:!r.recreateForm||!1,form:r.form||""}))})},viewModal:function(e,t){var i="";if((t=$e.extend({toTop:!0,overlay:10,modal:!1,overlayClass:"ui-widget-overlay",onShow:$e.jgrid.showModal,onHide:$e.jgrid.closeModal,gbox:"",jqm:!0,jqM:!0},t||{})).gbox){var r=$e("#"+t.gbox.substring(6))[0];try{i=$e(r).jqGrid("getStyleUI",r.p.styleUI+".common","overlay",!1,"jqgrid-overlay-modal"),t.overlayClass=$e(r).jqGrid("getStyleUI",r.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,$e.fn.jqm&&!0===t.jqm)(t.jqM?$e(e).attr("aria-hidden","false").jqm(t):$e(e).attr("aria-hidden","false")).jqmShow();else if(""!==t.gbox&&(r=parseInt($e(e).css("z-index"))-1,t.modal?($e(".jqgrid-overlay-modal")[0]||$e("body").prepend("
"),$e(".jqgrid-overlay-modal").css("z-index",r).show()):($e(t.gbox).find(".jqgrid-overlay").first().css("z-index",r).show(),$e(e).data("gbox",t.gbox))),$e(e).show().attr("aria-hidden","false"),0<=t.focusField)try{$e(":input:visible",e)[t.focusField].focus()}catch(e){}},info_dialog:function(e,t,i,r){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=($e.extend(!0,a,$e.jgrid.jqModal||{},{caption:""+e+""},r||{}),a.jqModal),l=this,e=$e.jgrid.styleUI[a.styleUI||"jQueryUI"].modal,s=$e.jgrid.styleUI[a.styleUI||"jQueryUI"].common,d=($e.fn.jqm&&!n&&(n=!1),"");if(0"+a.buttons[o].text+"";r="
",r=(r+="
"+t+"
")+(i?"
"+i+""+d+"
":""!==d?"
"+d+"
":"")+"
";try{"false"===$e("#info_dialog").attr("aria-hidden")&&$e.jgrid.hideModal("#info_dialog",{jqm:n}),$e("#info_dialog").remove()}catch(e){}t=$e(".ui-jqgrid").css("font-size")||"11px";$e.jgrid.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},r,a,"","",!0,{"font-size":t}),d&&$e.each(a.buttons,function(e){$e("#"+$e.jgrid.jqID(this.id),"#info_id").on("click",function(){return a.buttons[e].onClick.call($e("#info_dialog")),!1})}),$e("#closedialog","#info_id").on("click",function(){return l.hideModal("#info_dialog",{jqm:n,onClose:$e("#info_dialog").data("onClose")||a.onClose,gb:$e("#info_dialog").data("gbox")||a.gbox}),!1}),$e(".fm-button","#info_dialog").hover(function(){$e(this).addClass(s.hover)},function(){$e(this).removeClass(s.hover)}),$e.jgrid.isFunction(a.beforeOpen)&&a.beforeOpen(),$e.jgrid.viewModal("#info_dialog",{onHide:function(e){e.w.hide().remove(),e.o&&e.o.remove()},modal:a.modal,jqm:n}),$e.jgrid.isFunction(a.afterOpen)&&a.afterOpen();try{$e("#info_dialog").focus()}catch(e){}},bindEv:function(e,i){$e.jgrid.isFunction(i.dataInit)&&i.dataInit.call(this,e,i),i.dataEvents&&$e.each(i.dataEvents,function(){var t=this.fn;void 0!==this.data?$e(e).on(this.type,this.data,function(e){t.call(this,e,i)}):$e(e).on(this.type,function(e){t.call(this,e,i)})})},createEl:function(e,t,i,r,o){var a="",c=this;function u(i,e,t){var r=(r=["dataInit","dataEvents","dataUrl","buildSelect","sopt","searchhidden","defaultValue","attr","custom_element","custom_value","oper"]).concat(["cacheUrlData","delimiter","separator"]);void 0!==t&&Array.isArray(t)&&$e.merge(r,t),$e.each(e,function(e,t){-1===$e.inArray(e,r)&&$e(i).attr(e,t)}),e.hasOwnProperty("id")||$e(i).attr("id",$e.jgrid.randId())}switch(e){case"textarea":a=document.createElement("textarea"),r?t.cols||$e(a).css({width:"98%"}):t.cols||(t.cols=20),t.rows||(t.rows=2),(" "===i||" "===i||1===i.length&&160===i.charCodeAt(0))&&(i=""),a.value=i,$e(a).attr({role:"textbox",multiline:"true"}),u(a,t);break;case"checkbox":(a=document.createElement("input")).type="checkbox",t.value?(i===(d=t.value.split(":"))[0]&&(a.checked=!0,a.defaultChecked=!0),a.value=d[0],$e(a).attr("offval",d[1])):((d=(i+"").toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0&&""!==d?(a.checked=!0,a.defaultChecked=!0,a.value=i):a.value="on",$e(a).attr("offval","off")),$e(a).attr("role","checkbox"),u(a,t,["value"]);break;case"select":(a=document.createElement("select")).setAttribute("role","select");var n,l,s=[];if(!0===t.multiple?(n=!0,a.multiple="multiple",$e(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=$e.jgrid.stripPref(c.p.idPrefix,d)),$e.ajax($e.extend({url:$e.jgrid.isFunction(t.dataUrl)?t.dataUrl.call(c,d,i,String(t.name)):t.dataUrl,type:"GET",dataType:"html",data:$e.jgrid.isFunction(h)?h.call(c,d,i,String(t.name)):h,context:{elem:a,options:t,vl:i},success:function(e){var t,i,r=[],o=this.elem,a=this.vl,n=$e.extend({},this.options),l=!0===n.multiple,s=!0===n.cacheUrlData,d="",p=[],e=$e.jgrid.isFunction(n.buildSelect)?n.buildSelect.call(c,e):e;(e="string"==typeof e?$e($e.jgrid.trim(e)).html():e)&&($e(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,r=a.split(e),r=$e.map(r,function(e){return $e.jgrid.trim(e)})):r[0]=$e.jgrid.trim(a),$e("option",o).each(function(e){t=$e(this).text(),a=$e(this).val(),s&&(d+=(0!==e?";":"")+a+":"+t),0===e&&o.multiple&&(this.selected=!1),$e(this).attr("role","option"),(-1<$e.inArray($e.jgrid.trim(t),r)||-1<$e.inArray($e.jgrid.trim(a),r))&&(this.selected="selected",p.push(a))}),n.hasOwnProperty("checkUpdate")&&n.checkUpdate&&(c.p.savedData[n.name]=p.join(",")),s&&("edit"===n.oper?$e(c).jqGrid("setColProp",n.name,{editoptions:{buildSelect:null,dataUrl:null,value:d}}):"search"===n.oper?$e(c).jqGrid("setColProp",n.name,{searchoptions:{dataUrl:null,value:d}}):"filter"===n.oper&&$e("#fbox_"+c.p.id)[0].p&&(l=$e("#fbox_"+c.p.id)[0].p.columns,$e.each(l,function(e){if(i=this.index||this.name,n.name===i)return this.searchoptions.dataUrl=null,this.searchoptions.value=d,!1}))),$e(c).triggerHandler("jqGridAddEditAfterSelectUrlComplete",[o]))}},o||{}))}else if(t.value){void 0===t.size&&(t.size=n?3:1),n&&(s=i.split(","),s=$e.map(s,function(e){return $e.jgrid.trim(e)})),"function"==typeof t.value&&(t.value=t.value());var p,g,f,m,v,j,b=void 0===t.separator?":":t.separator,d=void 0===t.delimiter?";":t.delimiter;if("string"==typeof t.value)for(p=t.value.split(d),l=0;l((r=i[e[o]])%4!=0||r%100==0&&r%400!=0?28:29)||i[e[a]]>[0,31,29,31,30,31,30,31,31,30,31,30,31][i[e[n]]])},isEmpty:function(e){return!(void 0!==e&&!e.match(/^\s+$/)&&""!==e)},checkTime:function(e){if(!$e.jgrid.isEmpty(e)){if(!(e=e.match(/^(\d{1,2}):(\d{2})([apAP][Mm])?$/)))return!1;if(e[3]){if(e[1]<1||12$e.jgrid.floatNum(a.maxValue))return[!1,l+": "+u.maxValue+" "+a.maxValue,""];if(!0===a.email&&!(!1==i&&$e.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!=i||!$e.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==i&&$e.jgrid.isEmpty(e)||(c[t].formatoptions&&c[t].formatoptions.newformat?(s=c[t].formatoptions.newformat,(r=$e.jgrid.getRegional(p,"formatter.date.masks"))&&r.hasOwnProperty(s)&&(s=r[s])):s=c[t].datefmt||"Y-m-d",$e.jgrid.checkDate(s,e))))return[!1,l+": "+u.date+" - "+s,""];if(!0===a.time&&!(!1==i&&$e.jgrid.isEmpty(e)||$e.jgrid.checkTime(e)))return[!1,l+": "+u.date+" - hh:mm (am/pm)",""];if(!0===a.url&&!(!1==i&&$e.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!=i||!$e.jgrid.isEmpty(e))return $e.jgrid.isFunction(a.custom_func)?(r=a.custom_func.call(p,e,l,t),Array.isArray(r)?r:[!1,u.customarray,""]):[!1,u.customfcheck,""]}return[!0,"",""]},validateForm:function(e){for(var t,i=!0,r=0;r=a)&&(!n||i.length<=n)))&&l&&(t=(l=new RegExp(l)).test(i)),t},buildButtons:function(e,i,r){var o;return $e.each(e,function(e,t){t.id||(t.id=$e.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 i=[!0,""],r=y();if($e.jgrid.isFunction(t.searchrules))i=t.searchrules.call(r,e,t);else if($e.jgrid&&$e.jgrid.checkValues)try{i=$e.jgrid.checkValues.call(r,e,-1,t.searchrules,t.label)}catch(e){}i&&i.length&&!1===i[0]&&(q.error=!i[0],q.errmsg=i[1])});this.onchange=function(){return this.p.error=!1,this.p.errmsg="",!!$e.jgrid.isFunction(this.p.onChange)&&this.p.onChange.call(this,this.p)},this.reDraw=function(){$e(this).find("table.group").first().remove();var e=this.createTableForGroup(q.filter,null);$e(this).append(e),$e.jgrid.isFunction(this.p.afterRedraw)&&this.p.afterRedraw.call(this,this.p)},this.createTableForGroup=function(r,e){var o=this,t=$e("
"),i="left",a=("rtl"===this.p.direction&&(i="right",t.attr("dir","rtl")),null===e&&t.append(""),$e("")),i=(t.append(a),$e(""));if(a.append(i),!0===this.p.ruleButtons){for(var n,l=$e(""),s=(i.append(l),""),d=0;d"+o.p.groupOps[d].text+"";l.append(s).on("change",function(){r.groupOp=$e(l).val(),o.onchange()})}var p,a="";if(this.p.groupButton&&(a=$e("")).on("click",function(){return void 0===r.groups&&(r.groups=[]),r.groups.push({groupOp:q.groupOps[0].op,rules:[],groups:[]}),o.reDraw(),o.onchange(),!1}),i.append(a),!0===this.p.ruleButtons&&((a=$e("")).on("click",function(){for(void 0===r.rules&&(r.rules=[]),d=0;d"),i.append(a),a.on("click",function(){for(d=0;d"),u=(t.append(c),$e("")),u=(c.append(u),$e(""));u.append(this.createTableForGroup(r.groups[d],r)),c.append(u)}void 0===r.groupOp&&(r.groupOp=o.p.groupOps[0].op);var h=o.p.ruleButtons&&o.p.uniqueSearchFields;if(h)for(f=0;f"),r="",o=(i.append(""),$e("")),u=(i.append(o),$e("")),h=[],g=(o.append(u),u.on("change",function(){var e;for(p.p.ruleButtons&&p.p.uniqueSearchFields&&(t=parseInt($e(this).data("curr"),10),e=this.selectedIndex,0<=t)&&(p.p.columns[t].search=!0,$e(this).data("curr",e),p.p.columns[e].search=!1),a.field=$e(u).val(),l=$e(this).parents("tr").first(),$e(".data",l).empty(),f=0;f"+p.p.ops[d].text+"",o++);$e(".selectopts",l).empty().append(r),$e(".selectopts",l)[0].selectedIndex=0,$e.jgrid.msie()&&$e.jgrid.msiever()<9&&(t=parseInt($e("select.selectopts",l)[0].offsetWidth,10)+1,$e(".selectopts",l).width(t),$e(".selectopts",l).css("width","auto")),$e(".data",l).append(i),$e.jgrid.bindEv.call(c,i,s.searchoptions),$e(".input-elm",l).on("change",function(e){e=e.target;"custom"===s.inputtype&&$e.jgrid.isFunction(s.searchoptions.custom_value)?a.data=s.searchoptions.custom_value.call(c,$e(".customelement",this),"get"):a.data=$e(e).val(),"select"===s.inputtype&&s.searchoptions.multiple&&(a.data=a.data.join(",")),p.onchange()}),setTimeout(function(){a.data=$e(i).val(),("nu"===a.op||"nn"===a.op||0<=$e.inArray(a.op,p.p.unaryOperations))&&($e(i).attr("readonly","true"),$e(i).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(r),u.data("curr",g);var o=$e(""),j=(i.append(o),(s=q.columns[g]).searchoptions.id=$e.jgrid.randId(),!w||"text"!==s.inputtype||s.searchoptions.size||(s.searchoptions.size=10),s.searchoptions.name=a.field,s.searchoptions.oper="filter",$e.jgrid.createEl.call(c,s.inputtype,s.searchoptions,a.data,!0,p.p.ajaxSelectOptions||{},!0)),b=(("nu"===a.op||"nn"===a.op||0<=$e.inArray(a.op,p.p.unaryOperations))&&($e(j).attr("readonly","true"),$e(j).attr("disabled","true")),$e(""));for(o.append(b),b.on("change",function(){a.op=$e(b).val(),l=$e(this).parents("tr").first();var e=$e(".input-elm",l)[0];"nu"===a.op||"nn"===a.op||0<=$e.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!==$e.inArray(s.searchtype,p.p.strarr)?p.p.stropts:p.p.numopts),r="",$e.each(p.p.ops,function(){h.push(this.oper)}),f=0;f"+p.p.ops[d].text+"");b.append(r);o=$e(""),i.append(o),o.append(j),$e.jgrid.bindEv.call(c,j,s.searchoptions),$e(j).addClass("input-elm "+x.srInput).on("change",function(){a.data="custom"===s.inputtype?s.searchoptions.custom_value.call(c,$e(".customelement",this),"get"):$e(this).val(),p.onchange()}),o=$e("");return i.append(o),!0===this.p.ruleButtons&&(j=$e(""),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]},r,S||{}),this.each(function(){var D=this,F=[];if(!D.p.filterToolbar){if($e(D).data("filterToolbar")||$e(D).data("filterToolbar",S),D.p.force_regional&&(S=$e.extend(S,r)),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)&&F.push(e);var h,g,t,f=$e.jgrid.styleUI[D.p.styleUI||"jQueryUI"].filter,p=$e.jgrid.styleUI[D.p.styleUI||"jQueryUI"].common,m=$e.jgrid.styleUI[D.p.styleUI||"jQueryUI"].base,v=function(e){void 0===e&&(e=1);var i,r,o,a,n={},l=0,s={},d=!1,p=[],c=[],u={},h=[],g=!1,f=[!0,"",""],m=!1;if($e.each(D.p.colModel,function(){var e,t=!1;if(r=this.index||this.name,a=this.searchoptions||{},!0===this.frozen&&!0===D.p.frozenColumns?(e=$e("#gs_"+D.p.idPrefix+$e.jgrid.jqID(this.name),D.grid.fhDiv),t=!0):e=$e("#gs_"+D.p.idPrefix+$e.jgrid.jqID(this.name),D.grid.hDiv),void 0===e[0]&&(e=$e("#gs_"+D.p.idPrefix+$e.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&&$e.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=$e.jgrid.parse(t)),g=!(!t.rules||!t.rules.length)&&t.rules),new Set(S.disabledKeys));if(b.size!==S.disabledKeys.length)for(var i=0;i"),d=$e("
"),p=$e("
");if(!0===this.hidden&&$e(s).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),t=$e.extend({},this.searchoptions,{name:a.index||a.name,id:"gs_"+D.p.idPrefix+a.name,oper:"search"}),this.search){if(S.restoreFromFilters&&g)for(var c=!1,u=0;u"+l+"
":""}switch($e("td",p).eq(0).attr("columname",a.name).append(n),void 0===t.clearSearch&&(t.clearSearch=!0),t.clearSearch?(o=S.resetTitle||"Clear Search Value",$e("td",p).eq(2).append(""+S.resetIcon+"")):$e("td",p).eq(2).hide(),this.surl&&(t.dataUrl=this.surl),o="",t.defaultValue&&(o=$e.jgrid.isFunction(t.defaultValue)?t.defaultValue.call(D):t.defaultValue),S.restoreFromFilters&&c&&(o=c.data),o=$e.jgrid.createEl.call(D,this.stype,t,o,!1,$e.extend({},$e.jgrid.ajaxOptions,D.p.ajaxSelectOptions||{})),"custom"!==this.stype&&("select"===this.stype?$e(o).addClass(f.srSelect):$e(o).addClass(f.srInput)),$e("td",p).eq(1).append(o),$e(d).append(p),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;h&&clearTimeout(h),h=setTimeout(function(){v()},S.autosearchDelay)}}}))}$e.jgrid.bindEv.call(D,o,t)}$e(s).append(d),$e(j).append(s),S.searchOperators&&""!==n||$e("td",p).eq(0).hide()}),$e("table thead",D.grid.hDiv).append(j),S.searchOperators&&($e(".soptclass",j).click(function(e){var t=$e(this).offset(),i=t.left,t=t.top,r=this;$e("#sopt_menu").remove(),i=parseInt(i,10),t=parseInt(t,10)+18;var o,a='",$e("body").append(a),$e("#sopt_menu").addClass("ui-menu "+f.menu_widget),$e("#sopt_menu > li > a").hover(function(){$e(this).addClass(p.hover)},function(){$e(this).removeClass(p.hover)}).click(function(){var e=$e(this).attr("value"),t=$e(this).attr("oper");$e(D).triggerHandler("jqGridToolbarSelectOper",[e,t,r]),$e("#sopt_menu").hide(),$e(r).text(t).attr("soper",e),!0===S.autosearch&&(t=$e(r).parent().next().children()[0],$e(t).val()||"nu"===e||"nn"===e||0<=$e.inArray(e,F))&&v()})}e.stopPropagation()}),$e("body").on("click",function(e){"soptclass"!==e.target.className&&$e("#sopt_menu").remove()})),$e(".clearsearchclass",j).click(function(){var e=$e(this).parents("tr").first(),t=$e("td.ui-search-oper",e).attr("columname"),i=$e("td.ui-search-oper a",e).attr("soper");if(-1===(t=$e.jgrid.getElemByAttrVal(D.p.colModel,"name",t,!0)))return!1;var r,o,a,n=D.p.colModel[t],l=$e.extend({},n.searchoptions||{}),s=l.defaultValue||"";"select"===n.stype?(r=$e("td.ui-search-input select",e),s?r.val(s):r[0].selectedIndex=0):(r=$e("td.ui-search-input input",e)).val(s),$e(D).triggerHandler("jqGridToolbarClearVal",[r[0],t,l,s]),$e.jgrid.isFunction(S.onClearSearchValue)&&S.onClearSearchValue.call(D,r[0],t,l,s),("nu"===i||"nn"===i||0<=$e.inArray(i,F))&&(o=l.sopt?l.sopt[0]:"select"===n.stype?"eq":S.defaultSearch,a=null!=D.p.customFilterDef&&null!=D.p.customFilterDef[o]?D.p.customFilterDef[o].operand:S.operands[o]||"",(o===i?$e("td.ui-search-oper a",e).attr("soper","dummy"):$e("td.ui-search-oper a",e).attr("soper",o)).text(a)),!0===S.autosearch&&(v(),o===i)&&$e("td.ui-search-oper a",e).attr("soper",o).text(a)}),$e(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}),this.p.filterToolbar=!0,this.triggerToolbar=v,this.clearToolbar=function(e){var i,r,o,t,a={},n=0,l=(e="boolean"!=typeof e||e,$e.each(D.p.colModel,function(){var t,e=$e("#gs_"+D.p.idPrefix+$e.jgrid.jqID(this.name),!0===this.frozen&&!0===D.p.frozenColumns?D.grid.fhDiv:D.grid.hDiv);switch(this.searchoptions&&void 0!==this.searchoptions.defaultValue&&(t=this.searchoptions.defaultValue),i=this.index||this.name,this.stype){case"select":if(e.find("option").each(function(e){if(0===e&&(this.selected=!0),$e(this).val()===t)return!(this.selected=!0)}),void 0!==t)a[i]=t,n++;else try{delete D.p.postData[i]}catch(e){}break;case"text":if(e.val(t||""),void 0!==t)a[i]=t,n++;else try{delete D.p.postData[i]}catch(e){}break;case"custom":$e.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,i,r="fbox_"+o.p.id,a=!0,n=!0,l={themodal:"searchmod"+r,modalhead:"searchhd"+r,modalcontent:"searchcnt"+r,scrollelm:r},e=[],s=$e.jgrid.styleUI[o.p.styleUI||"jQueryUI"].filter,d=$e.jgrid.styleUI[o.p.styleUI||"jQueryUI"].common;if(k.styleUI=o.p.styleUI,"string"==typeof(t=$e.isPlainObject(o.p._savedFilter)&&!$e.isEmptyObject(o.p._savedFilter)?o.p._savedFilter:(!0===o.p.mergeSearch&&o.p.searchModules.hasOwnProperty("searchGrid")&&!1!==o.p.searchModules.searchGrid&&$e.extend(o.p.postData,{filters:$e.jgrid.splitSearch(o.p.searchModules)}),o.p.postData[k.sFilter]))&&(t=$e.jgrid.parse(t)),!0===k.recreateFilter&&$e("#"+$e.jgrid.jqID(l.themodal)).remove(),void 0!==$e("#"+$e.jgrid.jqID(l.themodal))[0])S($e("#fbox_"+$e.jgrid.jqID(o.p.id)));else{var p,c,u=$e("
").insertBefore("#gview_"+$e.jgrid.jqID(o.p.id)),h="left",g="",f=("rtl"===o.p.direction&&(h="right",g=" style='text-align:left'",u.attr("dir","rtl")),$e.extend([],o.p.colModel)),m=""+k.Find+"",v=""+k.Reset+"",j="",b="",w=!1,y=-1,x=!1,_=[],m=(k.showQuery&&(j="Query"),$e.jgrid.buildButtons(k.buttons,j+m,d)),q=null;if($e(o).jqGrid("isGroupHeaderOn")&&(G=$e("table.ui-jqgrid-htable",o.grid.hDiv).find(".jqg-second-row-header"),c=o.p.groupHeader.length,void 0!==G[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 F in o.p.customFilterDef)o.p.customFilterDef.hasOwnProperty(F)&&!k.operands.hasOwnProperty(F)&&(k.odata.push({oper:F,text:o.p.customFilterDef[F].text}),k.operands[F]=o.p.customFilterDef[F].operand,!0===o.p.customFilterDef[F].unary)&&e.push(F);c=""+b+"

"+v+""+m+"
",r=$e.jgrid.jqID(r),$e("#"+r).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&&$e(".query",this).text(this.toUserFriendlyString()),$e.jgrid.isFunction(k.afterChange)&&k.afterChange.call(o,$e("#"+r),k)},direction:o.p.direction,id:o.p.id}),u.append(c),$e("#"+r+"_2").find("[data-index]").each(function(){var t=parseInt($e(this).attr("data-index"),10);0<=t&&$e(this).on("click",function(e){k.buttons[t].click.call(o,$e("#"+r),k,e)})}),w&&k.tmplFilters&&k.tmplFilters.length&&$e(".ui-template",u).on("change",function(){var e=$e(this).val();return"default"===e?$e("#"+r).jqFilter("addFilter",t):$e("#"+r).jqFilter("addFilter",k.tmplFilters[parseInt(e,10)]),!1}),!0===k.multipleGroup&&(k.multipleSearch=!0),$e(o).triggerHandler("jqGridFilterInitialize",[$e("#"+r)]),$e.jgrid.isFunction(k.onInitializeSearch)&&k.onInitializeSearch.call(o,$e("#"+r)),k.gbox="#gbox_"+$e.jgrid.jqID(o.p.id);var G=$e(".ui-jqgrid").css("font-size")||"11px";k.layer?$e.jgrid.createModal(l,u,k,"#gview_"+$e.jgrid.jqID(o.p.id),$e("#gbox_"+$e.jgrid.jqID(o.p.id))[0],"string"==typeof k.layer?"#"+$e.jgrid.jqID(k.layer):k.layer,"string"==typeof k.layer?{position:"relative","font-size":G}:{"font-size":G}):$e.jgrid.createModal(l,u,k,"#gview_"+$e.jgrid.jqID(o.p.id),$e("#gbox_"+$e.jgrid.jqID(o.p.id))[0],null,{"font-size":G}),(k.searchOnEnter||k.closeOnEscape)&&$e("#"+$e.jgrid.jqID(l.themodal)).keydown(function(e){var t=$e(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?($e("#"+$e.jgrid.jqID(l.modalhead)).find(".ui-jqdialog-titlebar-close").click(),!1):void 0:($e("#"+r+"_search").click(),!1)}),j&&$e("#"+r+"_query").on("click",function(){return $e(".queryresult",u).toggle(),!1}),void 0===k.stringResult&&(k.stringResult=k.multipleSearch),$e("#"+r+"_search").on("click",function(){var e,t={};return(i=$e("#"+r)).find(".input-elm:focus").change(),x&&k.multipleSearch?(o.p._savedFilter={},e=$e.jgrid.filterRefactor({ruleGroup:$e.extend(!0,{},i.jqFilter("filterData")),ssfield:_,splitSelect:k.splitSelect,groupOpSelect:k.groupOpSelect}),o.p._savedFilter=$e.extend(!0,{},i.jqFilter("filterData"))):e=i.jqFilter("filterData"),k.errorcheck&&(i[0].hideError(),k.showQuery||i.jqFilter("toSQLString"),i[0].p.error)?i[0].showError():(k.stringResult?(t[k.sFilter]=JSON.stringify(e),$e.each([k.sField,k.sValue,k.sOper],function(){t[this]=""})):k.multipleSearch?(t[k.sFilter]=e,$e.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,$e.extend(o.p.postData,{filters:$e.jgrid.splitSearch(o.p.searchModules)})):$e.extend(o.p.postData,t),!1!==(n=(n=void 0===(n=$e(o).triggerHandler("jqGridFilterSearch"))?!0:n)&&$e.jgrid.isFunction(k.onSearch)?k.onSearch.call(o,o.p.filters):n)&&$e(o).trigger("reloadGrid",[{page:1}]),k.closeAfterSearch&&$e.jgrid.hideModal("#"+$e.jgrid.jqID(l.themodal),{gb:"#gbox_"+$e.jgrid.jqID(o.p.id),jqm:k.jqModal,onClose:k.onClose})),!1}),$e("#"+r+"_reset").on("click",function(){var e={},t=$e("#"+r);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&&$e(".ui-template",u).val("default"),!0===o.p.mergeSearch&&o.p.searchModules.hasOwnProperty("searchGrid")&&!1!==o.p.searchModules.searchGrid?(o.p.searchModules.searchGrid=null,$e.extend(o.p.postData,{filters:$e.jgrid.splitSearch(o.p.searchModules)}),o.p.search=!0):$e.extend(o.p.postData,e),!1!==(n=(n=void 0===(n=$e(o).triggerHandler("jqGridFilterReset"))?!0:n)&&$e.jgrid.isFunction(k.onReset)?k.onReset.call(o):n)&&$e(o).trigger("reloadGrid",[{page:1}]),k.closeAfterReset&&$e.jgrid.hideModal("#"+$e.jgrid.jqID(l.themodal),{gb:"#gbox_"+$e.jgrid.jqID(o.p.id),jqm:k.jqModal,onClose:k.onClose}),!1}),S($e("#"+r)),$e(".fm-button:not(."+d.disabled+")",u).hover(function(){$e(this).addClass(d.hover)},function(){$e(this).removeClass(d.hover)})}}function S(e){(a=(a=void 0===(a=$e(o).triggerHandler("jqGridFilterBeforeShow",[e]))?!0:a)&&$e.jgrid.isFunction(k.beforeShowSearch)?k.beforeShowSearch.call(o,e):a)&&($e.jgrid.viewModal("#"+$e.jgrid.jqID(l.themodal),{gbox:"#gbox_"+$e.jgrid.jqID(o.p.id),jqm:k.jqModal,modal:k.modal,overlay:k.overlay,toTop:k.toTop}),$e(o).triggerHandler("jqGridFilterAfterShow",[e]),$e.jgrid.isFunction(k.afterShowSearch))&&k.afterShowSearch.call(o,e)}})},filterInput:function(n,l){return l=$e.extend(!0,{defaultSearch:"cn",groupOp:"OR",searchAll:!1,beforeSearch:null,afterSearch:null,selectFirstFound:!1,firstFoundTimeout:30},l||{}),this.each(function(){var e,t,i,r,o,a=this;a.grid&&(t='{"groupOp":"'+l.groupOp+'","rules":[',i=0,n+="",$e.each(a.p.colModel,function(){e=this.index||this.name,r=this.searchoptions||{},r=l.defaultSearch||(r.sopt?r.sopt[0]:l.defaultSearch),(void 0===this.search||this.search||l.searchAll)&&(0 select"),n=a.length,s.allValues&&(i="",l.push(":"+s.allValues));n--;)e=a[n],r=s.count_item?" ("+e.items.length+")":"",i+="",l.push(e.unique+":"+e.unique+r);o.append(i),o.on("change",function(){t.triggerToolbar()}),s.create_value&&(o=$e.jgrid.getElemByAttrVal(t.p.colModel,"name",s.field,!1),$e.isEmptyObject(o)||(o.searchoptions?$e.extend(o.searchoptions,{value:l.join(";")}):(o.searchoptions={},o.searchoptions.value=l.join(";"))))}}})}});var r,J={};$e.jgrid.extend({editGridRow:function(X,K){var e=$e.jgrid.getRegional(this[0],"edit"),t=this[0].p.styleUI,$=$e.jgrid.styleUI[t].formedit,Y=$e.jgrid.styleUI[t].common;return K=$e.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[$e(this)[0].p.id]=K,this.each(function(){var c=this;if(c.grid&&X){c.p.savedData={};var u,h,i,e,g=c.p.id,f="FrmGrid_"+g,t="TblGrid_"+g,m="#"+$e.jgrid.jqID(t),v={themodal:"editmod"+g,modalhead:"edithd"+g,modalcontent:"editcnt"+g,scrollelm:f},r=!0,o=1,a=0,n="string"==typeof J[c.p.id].template&&0").data("disabled",!1),d=n?(s=J[$e(this)[0].p.id].template,l="",i=l="string"==typeof s?s.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){return''}):l,m):(i=$e("
"),m+"_2"),f="#"+$e.jgrid.jqID(f);if($e(b).append(""),$e(b).append("
"+J[c.p.id].topinfo+"
"),$e(c.p.colModel).each(function(){var e=this.formoptions;o=Math.max(o,e&&e.colpos||0),a=Math.max(a,e&&e.rowpos||0)}),$e(b).append(i),!1!==(r=(r=void 0===(r=$e(c).triggerHandler("jqGridAddEditBeforeInitData",[b,h]))?!0:r)&&$e.jgrid.isFunction(J[c.p.id].beforeInitData)?J[c.p.id].beforeInitData.call(c,b,h):r)){if("_empty"!==X&&void 0!==c.p.savedRow&&0";"_empty"!==C&&(S=$e(I).jqGrid("getInd",C)),$e(I.p.colModel).each(function(t){if(p=this.name,w=(!this.editrules||!0!==this.editrules.edithidden)&&!0===this.hidden,T=w?"style='display:none'":"","cb"!==p&&"subgrid"!==p&&!0===this.editable&&"rn"!==p&&"sc"!==p){if(!1===S)x="";else if(p===I.p.ExpandColumn&&!0===I.p.treeGrid)x=$e("td[role='gridcell']",I.rows[S]).eq(t).text();else{try{x=$e.unformat.call(I,$e("td[role='gridcell']",I.rows[S]).eq(t),{rowId:C,colModel:this},t)}catch(e){x=this.edittype&&"textarea"===this.edittype?$e("td[role='gridcell']",I.rows[S]).eq(t).text():$e("td[role='gridcell']",I.rows[S]).eq(t).html()}x&&" "!==x&&" "!==x&&(1!==x.length||160!==x.charCodeAt(0))||(x="")}var e,i=$e.extend({},this.editoptions||{},{id:p,name:p,rowId:C,oper:h,module:"form",checkUpdate:J[c.p.id].checkOnSubmit||J[c.p.id].checkOnUpdate}),r=$e.extend({},{elmprefix:"",elmsuffix:"",rowabove:!1,rowcontent:""},this.formoptions||{}),o=parseInt(r.rowpos,10)||G+1,a=parseInt(2*(parseInt(r.colpos,10)||1),10);"_empty"===C&&i.defaultValue&&(x=$e.jgrid.isFunction(i.defaultValue)?i.defaultValue.call(c):i.defaultValue),this.edittype||(this.edittype="text"),c.p.autoencode&&(x=$e.jgrid.htmlDecode(x)),_=$e.jgrid.createEl.call(c,this.edittype,i,x,!1,$e.extend({},$e.jgrid.ajaxOptions,I.p.ajaxSelectOptions||{})),"select"===this.edittype&&(x=$e(_).val(),"select-multiple"===$e(_).get(0).type)&&(x=x&&x.join(",")),"checkbox"===this.edittype&&(x=$e(_).is(":checked")?$e(_).val():$e(_).attr("offval")),$e(_).addClass("FormElement"),"select"===this.edittype?$e(_).addClass($.selectClass):-1<$e.inArray(this.edittype,["text","textarea","password","color","date","datetime","datetime-local","email","month","number","range","search","tel","time","url","week"])&&$e(_).addClass($.inputClass),q=!0,n?(e=$e(b).find("#"+p)).length?e.replaceWith(_):q=!1:(y=$e(D).find("tr[rowpos="+o+"]"),r.rowabove&&(e=$e(""+r.rowcontent+""),$e(D).append(e),e[0].rp=o),0===y.length&&(y=$e(1":"").addClass("FormData").attr("id","tr_"+p),$e(y).append(P),$e(D).append(y),y[0].rp=o),$e("td",y[0]).eq(a-2).html(""),$e("td",y[0]).eq(a-1).append(r.elmprefix).append(_).append(r.elmsuffix),1