template.js.base.jquery.jqGrid.min.js Maven / Gradle / Ivy
/*
jqGrid 4.15.5-pre - free jqGrid: https://github.com/free-jqgrid/jqGrid
Copyright (c) 2008-2014, Tony Tomov, [email protected]
Copyright (c) 2014-2018, Oleg Kiriljuk, [email protected]
Dual licensed under the MIT and GPL licenses
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl-2.0.html
Date: 2018-08-12
*/
'use strict';(function(b,P){"function"===typeof define&&define.amd?define(["jquery"],function(xa){return P(xa,b.document)}):"object"===typeof module&&module.exports?module.exports=function(b,ia){b||(b=window);void 0===ia&&(ia="undefined"!==typeof window?require("jquery"):require("jquery")(b));P(ia,b.document);return ia}:P(jQuery,b.document)})("undefined"!==typeof window?window:this,function(b,P){function xa(b,c,d){if(!(this instanceof xa))return new xa(b);this.aggregator=b;this.finilized=!1;this.context=
c;this.pivotOptions=d}function ia(a,c,d,e,f){var g=e.length,k=function(b,a){var c=b,d=a;null==c&&(c="");null==d&&(d="");c=String(c);d=String(d);this.caseSensitive||(c=c.toUpperCase(),d=d.toUpperCase());if(c===d){if(b===a)return 0;if(void 0===b)return-1;if(void 0===a)return 1;if(null===b)return-1;if(null===a)return 1}return cb||13/g,
"\x26gt;"):b},oldEncodePostedData:function(b){return b?String(b).replace(/&/g,"\x26amp;").replace(/"/g,"\x26quot;").replace(//g,"\x26gt;"):b},oldDecodePostedData:function(b){return b&&("\x26nbsp;"===b||"\x26#160;"===b||1===b.length&&160===b.charCodeAt(0))?"":b?String(b).replace(/>/g,"\x3e").replace(/</g,"\x3c").replace(/"/g,'"').replace(/&/g,"\x26"):b},clearArray:function(b){for(;0])*>/gi,""))&&"\x26nbsp;"!==b&&"\x26#160;"!==b?b.replace(/"/g,"'"):"":b},stripPref:function(a,c){var d=b.type(a);if("string"===d||"number"===d)a=String(a),c=""!==a?String(c).replace(String(a),""):c;return c},getRes:function(b,c){c=c.split(".");var a=c.length,e;if(null!=b){for(e=0;ef&&(c[g]=f+1,l.m=c[g]);break;case "F":f=b.inArray(c[g],e.monthNames,12);-1!==f&&11f&&c[g]===e.AmPm[f]&&(c[g]=f,l.h=p(c[g],l.h));break;case "A":f=b.inArray(c[g],e.AmPm),-1!==f&&1=a?l.y=1900+l.y:0<=a&&69>=a&&(l.y=2E3+l.y);l=new Date(l.y,l.m,l.d,l.h,l.i,l.s,l.u);0!==m&&l.setTime(Number(Number(l)+6E4*m))}else l=new Date(parseFloat(c));else l=new Date(1E3*
parseFloat(c));else l=new Date(l.y,l.m,l.d,l.h,l.i,l.s,l.u);e.userLocalTime&&0===m&&(m-=(new Date).getTimezoneOffset(),0!==m&&l.setTime(Number(Number(l)+6E4*m)));if(void 0===d)return l;e.masks.hasOwnProperty(d)?d=e.masks[d]:d||(d="Y-m-d");if("u1000"===d.toLowerCase())return l.getTime();m=l.getHours();a=l.getMinutes();c=l.getDate();p=l.getMonth()+1;f=l.getTimezoneOffset();g=l.getSeconds();k=l.getMilliseconds();var q=l.getDay(),r=l.getFullYear(),v=(q+6)%7+1,z=(new Date(r,p-1,c)-new Date(r,0,1))/864E5,
C=5>v?Math.floor((z+v-1)/7)+1:Math.floor((z+v-1)/7)||(4>((new Date(r-1,0,1)).getDay()+6)%7?53:52),w={d:n(c),D:e.dayNames[q],j:c,l:e.dayNames[q+7],N:v,S:e.S(c),w:q,z:z,W:C,F:e.monthNames[p-1+12],m:n(p),M:e.monthNames[p-1],n:p,t:"?",L:"?",o:"?",Y:r,y:String(r).substring(2),a:12>m?e.AmPm[0]:e.AmPm[1],A:12>m?e.AmPm[2]:e.AmPm[3],B:"?",g:m%12||12,G:m,h:n(m%12||12),H:n(m),i:n(a),s:n(g),u:k,e:"?",I:"?",O:(0?@\[\\\]\^`{|}~]/g,"\\$\x26")},getGridComponentId:function(b){if(null==this.p||!this.p.id)return"";var a=this.p.id;switch(b){case 21:return a;
case 0:return"gbox_"+a;case 8:return"gview_"+a;case 3:return"alertmod_"+a;case 43:return"rs_m"+a;case 45:return"cb_"+a;case 46:return"sopt_menu";default:return""}},getGridComponentIdSelector:function(b){return(b=u.getGridComponentId.call(this,b))?"#"+u.jqID(b):""},isHTMLElement:function(b){return"object"===typeof HTMLElement||"function"===typeof HTMLElement?b instanceof HTMLElement:null!=b&&"object"===typeof b&&1===b.nodeType&&"string"===typeof b.nodeName},getGridComponent:function(a,c){var d;if(c instanceof
b||0a?c:0;k||"number"===typeof b||"number"===typeof a||(b=String(b),a=String(a));return ba?c:0};this._performSort=function(){0!==C.length&&(g=d._doSort(g,0))};this._doSort=function(b,a){var c=C[a].by,e=C[a].dir,f=C[a].type,h=C[a].datefmt,g=C[a].sfunc;if(a===C.length-1)return d._getOrder(b,c,e,f,h,g);a++;b=d._getGroup(b,c,e,f,h);c=[];for(e=0;ee.length)return null;var g="on"===e.substring(0,2)?"jqGrid"+c+e.charAt(2).toUpperCase()+e.substring(3):"jqGrid"+c+e.charAt(0).toUpperCase()+e.substring(1),k=b.makeArray(arguments).slice(4),l=a[e+d];k.unshift(g);k.unshift(l);return u.fullBoolFeedback.apply(f,k)},builderSortIcons:function(a){var c=this,d=c.p,e=b(c),f=e.jqGrid("getGuiStyles","states.disabled"),g=function(g){var k=d.colModel[a],m=null!=k&&b.isFunction(k.sortIconName)?k.sortIconName:
d.sortIconName,k=b.isFunction(m)?m.call(c,{order:g,iCol:a,cm:k}):e.jqGrid("getIconRes","sort."+g);return u.mergeCssClasses("ui-grid-ico-sort","ui-icon-"+g,"horizontal"===d.viewsortcols[1]?"ui-i-"+g:"",f,k,"ui-sort-"+d.direction)};return"\x3cspan class\x3d's-ico"+(d.sortIconsBeforeText?" jqgrid-icons-first":"")+"' style\x3d'display:none'\x3e\x3cspan class\x3d'"+g("asc")+"'\x3e\x3c/span\x3e\x3cspan class\x3d'"+g("desc")+"'\x3e\x3c/span\x3e\x3c/span\x3e"},builderFmButon:function(a,c,d,e,f){var g=this.p,
k=b(this);return null==g?"":"\x3ca id\x3d'"+a+"' class\x3d'"+u.mergeCssClasses("fm-button",k.jqGrid("getGuiStyles","dialog.fmButton"),k.jqGrid("getGuiStyles","dialog."+("right"===f?"rightCorner":"left"===f?"leftCorner":"defaultCorner")),"right"===e?"fm-button-icon-right":"left"===e?"fm-button-icon-left":"")+"' role\x3d'button' tabindex\x3d'0'\x3e"+(d?"\x3cspan class\x3d'fm-button-icon "+(k.jqGrid("getIconRes",d)||d)+"'\x3e\x3c/span\x3e":"")+(c?"\x3cspan class\x3d'fm-button-text'\x3e"+c+"\x3c/span\x3e":
"")+"\x3c/a\x3e"},convertOnSaveLocally:function(a,c,d,e,f,g){if(null==this.p)return a;if(b.isFunction(c.convertOnSave))return c.convertOnSave.call(this,{newValue:a,cm:c,oldValue:d,id:e,item:f,iCol:g});if("boolean"!==typeof d&&"number"!==typeof d)return a;"boolean"!==typeof d||"checkbox"!==c.edittype&&"checkbox"!==c.formatter?"number"!==typeof d||isNaN(a)||("number"===c.formatter||"currency"===c.formatter?a=parseFloat(a):"integer"===c.formatter&&(a=parseInt(a,10))):(d=String(a).toLowerCase(),c=null!=
c.editoptions&&"string"===typeof c.editoptions.value?c.editoptions.value.split(":"):["yes","no"],0<=b.inArray(d,["1","true",c[0].toLowerCase()])?a=!0:0<=b.inArray(d,["0","false",c[1].toLowerCase()])&&(a=!1));return a},parseDataToHtml:function(a,c,d,e,f,g,k){var l=this,m=l.p,n=b(l),p,q,r,v,z,C,w,x=!1,t=[],y=[],D=!0!==m.altRows||n.jqGrid("isBootstrapGuiStyle")?"":m.altclass,B=m.groupingView,h=!1,F=parseInt(m.rowNum,10),K,I=b.fn.jqGrid,L=!0===m.treeGrid&&-1=L&&(m.rowIndexes={});if("local"===m.datatype&&!m.deselectAfterSort||m.multiPageSelection)x=!0;g&&(F*=g+1);for(g=0;gm.maxItemsToJoin&&(t=[t.join("")])}m.grouping&&I.groupingRender&&(k&&(B._locgr=!0),t=[I.groupingRender.call(n,y,F)],u.clearArray(y));return t},fillSelectOptions:function(a,c,d,e,f,g){var k,l=[],m,n,p=!1;n=function(b,a){if(0]*>([\s\S]*)<\/body\s*>/gim.exec(a);c.innerHTML=null!=d&&2===d.length?d[1]:a;a=c.getElementsByTagName("script");for(d=a.length;d--;)a[d].parentNode.removeChild(a[d]);a=c.innerHTML;try{""===b.trim(b(a).text())&&(a="")}catch(Fb){}return a},g=function(a){try{var c=
b.parseJSON(a),d=[],e;for(e in c)c.hasOwnProperty(e)&&"StackTrace"!==e&&d.push(e+": "+c[e]);a=d.join("\x3cbr /\x3e")}catch(Gb){}return a};"text/html"===e?h=f(h):"application/json"===e?h=g(h):"text/plain"===e&&(h=g(h));500!==a.status&&0!==a.status&&(h=(c||d)+(d&&d!==c?": "+d:"")+" "+a.status+" "+a.statusText+(""!==h?"\x3chr /\x3e":"")+h);k.jqGrid("displayErrorMessage",h||c||d)}},loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,beforeProcessing:null,onHeaderClick:null,viewrecords:!1,loadonce:!1,
forceClientSorting:!1,multiselect:!1,multikey:!1,editurl:"clientArray",search:!1,caption:"",hidegrid:!0,hiddengrid:!1,useUnformattedDataForCellAttr:!0,postData:{},userData:{},treeGrid:!1,treeGridModel:"nested",treeReader:{},treeANode:-1,ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord",search:"_search",filters:"filters",nd:"nd",id:"id",idold:"idOld",oper:"oper",editoper:"edit",addoper:"add",deloper:"del",subgridid:"id",npage:null,totalrows:"totalrows"},
forceFit:!1,gridstate:"visible",cellEdit:!1,iCol:-1,iRow:-1,nv:0,loadui:"enable",toolbar:[!1,""],scroll:!1,multiboxonly:!1,deselectAfterSort:!0,resetPageAfterSort:!0,multiPageSelection:!1,selectAllMode:"filtered",scrollrows:!1,autowidth:!1,scrollOffset:18,cellLayout:5,subGridWidth:16,multiselectWidth:16,multiselectPosition:"left",gridview:!0,rownumWidth:25,rownumbers:!1,pagerpos:"center",footerrow:!1,userDataOnFooter:!1,hoverrows:!0,altclass:"ui-priority-secondary",viewsortcols:[!1,"vertical",!0],
resizeclass:"",autoencode:!0,autoEncodeOnEdit:!1,remapColumns:[],cmNamesInputOrder:[],ajaxGridOptions:{},direction:x,toppager:!1,headertitles:!1,scrollTimeout:40,maxItemsToJoin:32768,data:[],lastSelectedData:[],quickEmpty:"quickest",_index:{},indexByColumnData:{},dataIndexById:{},iColByName:{},iPropByName:{},reservedColumnNames:["rn","cb","subgrid"],grouping:!1,groupingView:{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:!1,useDefaultValuesOnGrouping:!0,
summary:[],displayField:[],groupSummaryPos:[],formatDisplayField:[],_locgr:!1,commonIconClass:D("grouping.common"),plusicon:D("grouping.plus"),minusicon:D("grouping.minus")},ignoreCase:!0,cmTemplate:{},idPrefix:"",iconSet:t,guiStyle:y,locale:w,multiSort:!1,showSortOrder:!0,sortOrderPosition:"afterSortIcons",multiSortOrder:"lastClickedFirstSorted",maxSortColumns:3,treeIcons:{commonIconClass:D("treeGrid.common"),plusLtr:D("treeGrid.plusLtr"),plusRtl:D("treeGrid.plusRtl"),minus:D("treeGrid.minus"),leaf:D("treeGrid.leaf")}},
ra,{navOptions:n(!0,{commonIconClass:D("nav.common"),editicon:D("nav.edit"),addicon:D("nav.add"),delicon:D("nav.del"),searchicon:D("nav.search"),refreshicon:D("nav.refresh"),viewicon:D("nav.view"),saveicon:D("nav.save"),cancelicon:D("nav.cancel"),buttonicon:D("nav.newbutton")},u.nav||{}),actionsNavOptions:n(!0,{commonIconClass:D("actions.common"),editicon:D("actions.edit"),delicon:D("actions.del"),saveicon:D("actions.save"),cancelicon:D("actions.cancel")},u.actionsNav||{}),formEditing:n(!0,{commonIconClass:D("form.common"),
prevIcon:D("form.prev"),nextIcon:D("form.next"),saveicon:[!0,"left",D("form.save")],closeicon:[!0,"left",D("form.undo")]},u.edit||{}),searching:n(!0,{commonIconClass:D("search.common"),findDialogIcon:D("search.search"),resetDialogIcon:D("search.reset"),queryDialogIcon:D("search.query")},u.search||{}),formViewing:n(!0,{commonIconClass:D("form.common"),prevIcon:D("form.prev"),nextIcon:D("form.next"),closeicon:[!0,"left",D("form.cancel")]},u.view||{}),formDeleting:n(!0,{commonIconClass:D("form.common"),
delicon:[!0,"left",D("form.del")],cancelicon:[!0,"left",D("form.cancel")]},u.del||{})},a||{}),F=function(b){var a=u.getRes(h,b);return void 0!==a?a:z.call(k,"defaults."+b)};h.recordpos=h.recordpos||("rtl"===h.direction?"left":"right");h.autoResizing.widthOfVisiblePartOfSortIcon=void 0!==h.autoResizing.widthOfVisiblePartOfSortIcon?h.autoResizing.widthOfVisiblePartOfSortIcon:"fontAwesome"===h.iconSet?13:12;h.datatype=void 0!==h.datatype?h.datatype:void 0!==f||null==h.url?"local":null!=h.jsonReader&&
"object"===typeof h.jsonReader?"json":"xml";h.jsonReader=h.jsonReader||{};h.url=h.url||"";h.cellsubmit=void 0!==h.cellsubmit?h.cellsubmit:void 0===h.cellurl?"clientArray":"remote";h.gridview=void 0!==h.gridview?h.gridview:null==h.afterInsertRow;void 0!==f&&(h.data=f,a.data=f);void 0!==g&&(h.datastr=g,a.datastr=g);if("TABLE"!==d.tagName.toUpperCase())C("Element is not a table!");else if(""===d.id&&k.attr("id",va()),void 0!==P.documentMode&&5>=P.documentMode)C("Grid can not be used in this ('quirks') mode!");
else{k.empty().attr("tabindex","0");d.p=h;h.id=d.id;h.idSel="#"+H(d.id);h.gBoxId=ab.call(d,0);h.gBox=$a.call(d,0);h.gViewId=ab.call(d,8);h.gView=$a.call(d,8);h.rsId=ab.call(d,43);h.rs=$a.call(d,43);h.cbId=ab.call(d,45);h.cb=$a.call(d,45);var K=u.fixScrollOffsetAndhBoxPadding,I=function(b){var a={},c,d=b.length;for(c=0;cg&&(null==this.curGbox&&(this.curGbox=b(h.rs)),this.curGbox.css({left:c.sOL+d}),!0===h.forceFit?(c=e[c.idx+h.nv],d="ltr"===h.direction?c.width-d:c.width+d,d>h.autoResizing.minColWidth&&(a.newWidth=f,c.newWidth=d)):(this.newWidth="ltr"===h.direction?h.tblwidth+d:h.tblwidth-d,a.newWidth=f))}},resizeColumn:function(a,d,e){var f=this.headers,g=this.footers,k=f[a],l=k.newWidth||k.width,m=Fa(21,this.bDiv),p=Fa(14,this.hDiv).children("thead").children("tr").first()[0].cells,
l=parseInt(l,10);h.colModel[a].width=l;k.width=l;p[a].style.width=l+"px";this.cols[a].style.width=l+"px";this.fbRows&&(b(this.fbRows[0].cells[a]).css("width",l),b(Fa(31,this.fhDiv)[0].rows[0].cells[a]).css("width",l),h.footerrow&&b(Fa(36,this.fsDiv)[0].rows[0].cells[a]).css("width",l));0=l&&(void 0===h.lastpage||(parseInt((c+e+k-1)/k,10)||0)<=h.lastpage)&&(p=parseInt((f-c+k-1)/k,10)||1,0<=c||2>p||!0===h.scroll?(m=(Math.round((c+e)/k)||0)+1,l=-1):l=1);0h.lastpage||1===h.lastpage||m===h.page&&m===h.lastpage)||
(d.hDiv.loading?d.timer=setTimeout(function(){d.populateVisible.call(a)},h.scrollTimeout):(h.page=m,n&&(d.selectionPreserver.call(a),d.emptyRows.call(a,!1,!1)),d.populate.call(a,p)))}}},scrollGrid:function(){if(h.scroll){var b=this.scrollTop;void 0===E.scrollTop&&(E.scrollTop=0);b!==E.scrollTop&&(E.scrollTop=b,E.timer&&clearTimeout(E.timer),E.timer=setTimeout(function(){E.populateVisible.call(d)},h.scrollTimeout))}E.hDiv.scrollLeft=this.scrollLeft;h.footerrow&&(E.sDiv.scrollLeft=this.scrollLeft);
return!1},selectionPreserver:function(){var a=b(this),c=h.selrow,d=h.selarrrow?b.makeArray(h.selarrrow):null,e=this.grid.bDiv,f=e.scrollLeft,g=function(){var b;h.selrow=null;if(!h.multiPageSelection){R(h.selarrrow);if(h.multiselect&&d&&0c.length)return!t&&k.title&&(t=n),m+" style\x3d'"+v(r)+"'"+(q?" class\x3d'"+v(q)+"'":"")+(t?" title\x3d'"+v(t)+"'":"");f=c[3];e=c[4];switch(c[1].toLowerCase()){case "class":q=q?q+(" "+f):f;break;case "title":t=f;break;case "style":r+=f;break;default:m+=" "+c[1]+"\x3d"+c[2]+f+c[2]}}k=(""!==r?"style\x3d'"+r+"'":"")+((void 0!==q?" class\x3d'"+q+"'":"")+(k.title&&n?" title\x3d'"+bb(c).replace(/'/g,"\x26apos;")+"'":""));return k+m},
na=function(b){return null==b||""===b?"\x26#160;":h.autoencode?rb(b):String(b)},ga=function(b){var a=h.treeReader,c=a.loaded,d=a.leaf_field,e=a.expanded_field,f=function(b){return!0===b||"true"===b||"1"===b};if("nested"===h.treeGridModel&&!b[d]){var g=parseInt(b[a.left_field],10),a=parseInt(b[a.right_field],10);b[d]=a===g+1?!0:!1}void 0!==b[c]&&(b[c]=f(b[c]));b[d]=f(b[d]);b[e]=f(b[e])},Za=function(b,a){var c,d;for(c in h.indexByColumnData)h.indexByColumnData.hasOwnProperty(c)&&(d=b[c],b.hasOwnProperty(c)&&
void 0!==d&&""!==d&&(h.ignoreCase&&(d=String(d).toLowerCase()),void 0===h.indexByColumnData[c][d]&&(h.indexByColumnData[c][d]={}),h.indexByColumnData[c][d][a]=b[c],void 0===h.dataIndexById[a]&&(h.dataIndexById[a]={}),void 0===h.dataIndexById[a][c]&&(h.dataIndexById[a][c]={}),h.dataIndexById[a][c][d]=h.indexByColumnData[c][d]))},aa=function(){var b=h.data,a=b.length,c,e,f,g,k,p,q,r=h.localReader,t=h.additionalProperties,v=r.cell,y,u,w,x=h.arrayReaderInfos;if("local"!==h.datatype||!0!==r.repeatitems){if(h.treeGrid)for(c=
0;c=h.page&&(h.page=1);Y=parseInt(h.rowNum,10);f&&(Y*=f+1);var G=[],na=[],Q,z=[];for(v=0;v=P.documentMode?r.html(r.html()+d.join("")):this.firstElementChild.innerHTML+=d.join(""),this.grid.cols=
this.rows[0].cells);if(h.grouping)for(Z.call(this),r=function(a){var c=b(this).closest("tr.jqgroup").attr("id");g.jqGrid("groupingToggle",c,this,a);return!1},v=0;v=c&&(c=b(this).closest(".ui-jqgrid\x3e.ui-jqgrid-view").css("font-size")||"11px",b(P.body).append("\x3cdiv id\x3d'testpg' class\x3d'"+
B("gBox","ui-jqgrid")+"' style\x3d'font-size:"+c+";visibility:hidden;margin:0;padding:0;' \x3e\x3c/div\x3e"),b(a).clone().appendTo("#testpg"),c=b("#testpg\x3e.ui-pg-table").width(),b("#testpg").remove());0=h.page&&(h.page=Math.min(1,h.lastpage));null!==q.search&&(m[q.search]=h.search);null!==q.nd&&(m[q.nd]=(new Date).getTime());if(isNaN(parseInt(h.rowNum,10))||0>=parseInt(h.rowNum,10))h.rowNum=h.maxRowNum;null!==q.rows&&(m[q.rows]=h.rowNum);null!==q.page&&(m[q.page]=h.page);null!==q.sort&&(m[q.sort]=h.sortname);null!==q.order&&(m[q.order]=h.sortorder);null!==h.rowTotal&&null!==q.totalrows&&(m[q.totalrows]=h.rowTotal);
var r=l(h.loadComplete),t=r?h.loadComplete:null,v=0;a=a||1;1=b&&(m=l=!1),n=p=!1):1e?a.push(d.index||
d.name):""===d.lso&&0<=e&&a.splice(e,1)}r(h.colModel,function(){var d=this.index||this.name,e;this.lso&&(e=this.lso.split("-"),0>b.inArray(d,a)&&a.push(d),c[d]=e[e.length-1])})},cb=function(a,c){var e="",f=h.colModel[a],g,k=B("states.disabled");a=h.frozenColumns?b(d.grid.headers[a].el).add(b(c)):b(d.grid.headers[a].el);g=a.find("span.s-ico");c=g.children("span.ui-icon-asc");var m=g.children("span.ui-icon-desc"),n=c,q=m,t=[],v={};a.find("span.ui-grid-ico-sort").addClass(k);a.attr("aria-selected","false");
f.lso?(g.show(),g=f.lso.split("-"),g=g[g.length-1],"desc"===g&&(n=m,q=c),n.removeClass(k).css("display",""),h.showOneSortIcon&&q.hide(),a.attr("aria-selected","true")):h.viewsortcols[0]||g.hide();Ma(t,v,f);if("string"===typeof h.sortname&&""!==h.sortname&&h.sortname.split(",").lengthh.maxSortColumns;)k(t[t.length-1]);else l(h.multiSortOrder)&&(t=h.multiSortOrder.call(d,{sortNames:t,cm:f,sortDirs:v,removeSorting:k})||t);r(t,function(){0a?"\x26nbsp;":l(h.formatSortOrder)?h.formatSortOrder.call(d,{cm:this,sortIndex:a}):a+1)}})},sb=function(a,d,e,f,g,k){var l=this.grid,m=h.colModel[d],p=B("states.disabled");if(null!=m&&m.sortable&&!(0p(f,h.reservedColumnNames)&&d.push(f);if(null!=b)for(a=d.slice(),e=0;ep(g,h.reservedColumnNames)&&!f.hasOwnProperty(g)&&(k=h.iColByName[g],void 0!==k?f[g]={name:g,index:k,order:l,type:0}:(k=h.iPropByName[g],void 0!==k?f[g]={name:g,index:k,order:l,type:1}:g===(h.prmNames.rowidName||"rowid")&&(f[g]={index:k,type:2})));e=c.length;for(a=0;ap(g,h.reservedColumnNames)&&!f.hasOwnProperty(g)&&(f[g]={name:g,index:a,order:l,type:0},l++);e=d.length;for(a=0;ab.inArray(this.id,n)&&n.push(this.id),k&&g(k[a],c))});O.call(d,"onSelectAll",c?h.selarrrow:e,c)});!0===h.autowidth&&(q=Math.floor(b(f).innerWidth()),h.width=0d&&(this.hidden=!h.groupingView.groupColumnShow[d])}this.widthOrg=f=A(this.width,0);!1!==this.hidden||n(this.classes)||(b+=f+a,this.fixed?l+=f+a:c++)});isNaN(h.width)&&(h.width=b+(!1!==
h.shrinkToFit||isNaN(h.height)?0:e));E.width=h.width;h.tblwidth=b;!1===h.shrinkToFit&&!0===h.forceFit&&(h.forceFit=!1);!0===h.shrinkToFit&&0
h.width&&(h.colModel[d].width-=h.tblwidth-parseInt(h.width,10),h.tblwidth=h.width))})();b(f).css("width",E.width+"px").append("\x3cdiv class\x3d'"+B("resizer","ui-jqgrid-resize-mark")+"' id\x3d'"+h.rsId+"'\x3e\x26#160;\x3c/div\x3e");b(h.rs).on("selectstart",function(){return!1}).click(G).dblclick(function(a){var e=b(this).data("idx"),f=b(this).data("pageX"),g=h.colModel[e];if(null==f||null==g)return!1;var f=String(f).split(";"),l=parseFloat(f[0]),m=parseFloat(f[1]);if(2===f.length&&(5sa?"\x26nbsp;":l(h.formatSortOrder)?h.formatSortOrder.call(d,{cm:this,sortIndex:sa}):sa+1)+"\x3c/span\x3e"))):(e="desc"===h.sortorder?"asc":"desc",h.viewsortcols[0]?(k.css("display",
""),a===h.lastsort&&(k.children("span.ui-icon-"+h.sortorder).removeClass(Da),m&&k.children("span.ui-icon-"+e).hide())):a===h.lastsort&&""!==c.lso&&(k.css("display",""),k.children("span.ui-icon-"+h.sortorder).removeClass(Da),m&&k.children("span.ui-icon-"+e).hide())));h.footerrow&&(eb+="\x3ctd role\x3d'gridcell' "+Y(a,0,"",null,"",!1)+"\x3e\x26#160;\x3c/td\x3e")}).mousedown(function(a){var c=b(this),d=c.closest(".ui-jqgrid-hdiv").hasClass("frozen-div"),e=function(){var a=[c.position().left+c.outerWidth()];
"rtl"===h.direction&&(a[0]=h.width-a[0]);a[0]-=d?0:E.bDiv.scrollLeft;a.push(b(E.hDiv).position().top);a.push(b(E.bDiv).offset().top-b(E.hDiv).offset().top+b(E.bDiv).height()+(E.sDiv?b(E.sDiv).height():0));return a},f;if(1===b(a.target).closest("th\x3espan.ui-jqgrid-resize").length)return f=h.iColByName[(this.id||"").substring(h.id.length+1)],null!=f&&(!0===h.forceFit&&(h.nv=Jb(f)),E.dragStart(f,a,e(),c)),!1}).click(function(a){if(h.disableClick)return h.disableClick=!1;var c="th.ui-th-column\x3ediv",
e,f,c=h.viewsortcols[2]?c+".ui-jqgrid-sortable":c+"\x3espan.s-ico\x3espan.ui-grid-ico-sort",c=b(a.target).closest(c);if(1===c.length)return h.viewsortcols[2]||(e=!0,f=c.hasClass("ui-icon-desc")?"asc":"desc"),c=h.iColByName[(this.id||"").substring(h.id.length+1)],null!=c&&sb.call(d,b("div",this)[0].id.substring(5+h.id.length+1),c,e,f,this,a),!1});if(h.sortable&&l(c.sortableColumns))try{c.sortableColumns.call(k,b(t[0].tHead.rows[0]))}catch(Ga){}h.footerrow&&(eb+="\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e");
W+="\x3c/tr\x3e";k.html("\x3ctbody\x3e"+W+"\x3c/tbody\x3e");k.addClass(B("grid","ui-jqgrid-btable"+(!0===h.altRows&&k.jqGrid("isBootstrapGuiStyle")?" table-striped":"")));var ta=h.caption&&!0===h.hiddengrid?!0:!1,x=b("\x3cdiv class\x3d'ui-jqgrid-hbox"+("rtl"===T?"-rtl":"")+"'\x3e\x3c/div\x3e"),q=B("top"),fb=B("bottom");E.hDiv=P.createElement("div");b(E.hDiv).css({width:E.width+"px"}).addClass(B("hDiv","ui-jqgrid-hdiv")).append(x).scroll(function(){var a=b(this).next(".ui-jqgrid-bdiv")[0];a&&(a.scrollLeft=
this.scrollLeft);return!1});b(x).append(t);t=null;ta&&b(E.hDiv).hide();h.rowNum=parseInt(h.rowNum,10);if(isNaN(h.rowNum)||0>=h.rowNum)h.rowNum=h.maxRowNum;h.pager&&("string"===typeof h.pager&&"#"!==h.pager.substr(0,1)?(t=h.pager,x=b("#"+H(h.pager))):!0===h.pager?(t=va(),x=b("\x3cdiv id\x3d'"+t+"'\x3e\x3c/div\x3e"),x.appendTo("body"),h.pager="#"+H(t)):(x=b(h.pager),t=x.attr("id")),0f.lastpage&&(g=f.lastpage);1>g&&(g=1);f.page=g;a.bDiv.scrollTop=a.prevRowHeight?(g-1)*a.prevRowHeight*f.rowNum:0}a.prevRowHeight&&f.scroll&&void 0===d.page?(delete f.lastpage,a.populateVisible.call(this)):a.populate.call(this);!0===f._inlinenav&&e.jqGrid("showAddEditButtons",!1);
return!1}).dblclick(function(b){var a=fa.call(d,b.target),c=a.parent();if(0l&&(l=0);l*=parseInt(h.rowNum,10);p=l+h.reccount;if(h.scroll){q=b(Fa(21,g)[0].rows).slice(1);l=p-q.length;h.reccount=q.length;if(q=q.outerHeight()||f.prevRowHeight)m=l*q,n=u.fixMaxHeightOfDiv.call(d,parseInt(h.records,10)*q),b(g).children("div").first().css({height:n+"px"}).children("div").first().css({height:m+
"px",display:m+"px"?"":"none"}),0===g.scrollTop&&1=g&&(f=0),0>=f&&(f=g=0),1===f||0===f?(b("#first"+t+", #prev"+t).addClass(w).removeClass(x),h.toppager&&b("#first_t"+y+", #prev_t"+y).addClass(w).removeClass(x)):(b("#first"+t+", #prev"+t).removeClass(w),
h.toppager&&b("#first_t"+y+", #prev_t"+y).removeClass(w)),f===g||0===f?(b("#next"+t+", #last"+t).addClass(w).removeClass(x),h.toppager&&b("#next_t"+y+", #last_t"+y).addClass(w).removeClass(x)):(b("#next"+t+", #last"+t).removeClass(w),h.toppager&&b("#next_t"+y+", #last_t"+y).removeClass(w)))}!0===a&&!0===h.rownumbers&&b("\x3etd.jqgrid-rownum",d.rows).each(function(a){b(this).html(l+1+a)});c&&h.jqgdnd&&e.jqGrid("gridDnD","updateDnD");O.call(d,"gridComplete");e.triggerHandler("jqGridAfterGridComplete")};
d.refreshIndex=Q;d.addItemDataToColumnIndex=Za;d.removeItemDataFromColumnIndex=function(a){var c,d,e,f=h.dataIndexById[a];if(null!=f){for(c in f)if(f.hasOwnProperty(c))for(e in d=f[c],d)d.hasOwnProperty(e)&&(delete h.indexByColumnData[c][e][a],b.isEmptyObject(h.indexByColumnData[c][e])&&delete h.indexByColumnData[c][e]);delete h.dataIndexById[a]}};d.generateValueFromColumnIndex=function(a,c,d){a=b(this).jqGrid("getUniqueValueFromColumnIndex",a);var e="",f,g;if(null!=a)for(d=d||";",c=c||":",f=0,g=
a.length;fa?1:-1}):d.sort(function(b,a){return String(b).toLowerCase().localeCompare(String(a).toLowerCase())}):
d.sort()}return d},generateDatalistFromColumnIndex:function(a){if(!this[0]||!this[0].grid)return null;a=this.jqGrid("getUniqueValueFromColumnIndex",a);var c,d,e=b("\x3cdatalist\x3e\x3c/datalist\x3e");if(null!=a&&0=d+e?c.scrollTop=f-(d+e)+a+e:fb.inArray(v,f.reservedColumnNames)&&"actions"!==r.formatter&&(!c.skipHidden||!r.hidden))if(z=q[p],A.isCellEditing.call(b(this),a,p,k))d[v]=u.getEditedValue.call(this,u.getDataFieldOfCell.call(this,k,p),r,{},r.editable);else if(!0===f.treeGrid&&v===f.ExpandColumn)d[v]=La(b("span",z).first().html());else try{d[v]=
b.unformat.call(this,z,{rowId:a,colModel:r},p)}catch(C){d[v]=La(b(z).html())}!c.includeId||!1!==f.keyName&&null!=d[f.keyName]||(d[f.prmNames.id]=ua(f.idPrefix,k.id));g&&(e.push(d),d={})}});return e||d},delRowData:function(a){var c=!1;this.each(function(){var d=this.p,e=b.jgrid.detectRowEditing.call(this,a),f,g;f=A.getGridRowById.call(b(this),a);if(!f)return!1;d.subGrid&&(g=b(f).next(),g.hasClass("ui-subgrid")&&g.remove());if(null!=e)try{"inlineEditing"===e.mode&&null!=A.restoreRow?A.restoreRow.call(b(this),
a):"cellEditing"===e.mode&&null!=A.restoreCell&&A.restoreCell.call(b(this),e.savedRow.id,e.savedRow.ic)}catch(m){}f.rowIndex===d.iRow&&(d.iRow=-1,d.iCol=-1);b(f).remove();d.records--;d.reccount--;this.updatepager(!0,!1);c=!0;d.multiselect&&(e=b.inArray(a,d.selarrrow),-1!==e&&d.selarrrow.splice(e,1));d.multiselect&&0b.inArray(d,"first last before after afterSelected beforeSelected".split(" "))&&(d="last");var f=!1,g,k,l,m,n,p,q,r,v,z,C;c&&(b.isArray(c)?(p=!0,q=a):(c=[c],p=!1),this.each(function(){var w=this.p,x=c.length,t=b(this),y=this.rows,D=0,B=A.getGridRowById,h=w.colModel,F,K=w.additionalProperties,I;p||(void 0!==a?a=String(a):(a=va(),!1!==w.keyName&&(q=w.keyName,void 0!==c[0][q]&&(a=c[0][q]))));for(r=w.altclass;Db.inArray(m,g.reservedColumnNames)&&(!1!==c?(k=b(p[n]).text(),b.trim(k)&&(f[m]=k)):f[m]=b(p[n]).html());else if("set"===a)for(m in c)n=g.iColByName[m],c.hasOwnProperty(m)&&void 0!==n&&(k=d?this.formatter("",c[m],n,c,"edit"):c[m],l=b(p[n]).add(r[n]),l.html(k),q[n].title&&l.attr({title:bb(k)}))});
return"get"===a?f:e},resetColumnResizerHeight:function(){return this.each(function(){if(b.jgrid.msie){var a,c,d,e=this.grid.headers,f;for(d=0;dp.length&&(n.detach(),q.detach(),m.wrapInner("\x3cspan class\x3d'"+e.autoResizing.wrapperClassName+
"'\x3e\x3c/span\x3e"),p=m.children("span."+e.autoResizing.wrapperClassName),x()),l=n.outerWidth(!0),r=p.outerWidth(),u=parseFloat(k.css("padding-top")||0),C=parseFloat(k.css("padding-bottom")||0),p=parseFloat(k.css("padding-left")||0),v=parseFloat(k.css("padding-right")||0),e.showSortOrder&&(l+=.5*l),l=void 0===c||0===c?r+l+p+v:c,k.height(l),k.css({paddingTop:v+"px",paddingBottom:p+"px",paddingLeft:u+"px",paddingRight:C+"px"}),m.css("min-width",l-p-v+"px").addClass("ui-jqgrid-rotate").css({bottom:0}),
e.colModel[g].rotated=!0);d.jqGrid("resetColumnResizerHeight");e.frozenColumns&&setTimeout(function(){d.triggerHandler("jqGridResetFrozenHeights",{header:{resizeDiv:!0,resizedRows:{iRowStart:0,iRowEnd:-1}},resizeFooter:!0,body:{resizeDiv:!0,resizedRows:{iRowStart:-1,iRowEnd:-1}}})},0)})},showHideCol:function(a,c,d){return this.each(function(){var e=this,f=b(e),g=e.grid,k=!1,l=e.p,m=u.cell_width?0:l.cellLayout,n;if(g){"string"===typeof a&&(a=[a]);c="none"!==c&&!1!==c?"":"none";d=d||{};var p=""===c?
!0:!1,q=l.groupHeader;(q=q&&("object"===typeof q||b.isFunction(q)))&&!d.skipSetGroupHeaders&&A.destroyGroupHeader.call(f,!1);b(l.colModel).each(function(f){var q=function(a){var d,e,g,k,m,n,h,q,r,v;d=0;for(e=a.length;dg("subgrid",a)&&a.unshift("subgrid");e.multiselect&&0>g("cb",a)&&a.unshift("cb");e.rownumbers&&0>g("rn",a)&&a.unshift("rn");g=0;for(k=a.length;gF)return;g=0;h=0r&&(n=d.tblwidth-parseInt(r,10),d.tblwidth=r,v.width-=n);e=v.width;r=w[k];r.width=e;K[k].style.width=e+"px";h&&(B[k].style.width=e+"px");d.footerrow&&(x[k].style.width=e+"px");d.tblwidth+(m?z:0)t.clientWidth&&(d.autowidth||void 0!==d.widthOrg&&"auto"!==d.widthOrg&&"100%"!==d.widthOrg||I(t.offsetWidth))}d.tblwidth&&(d.tblwidth=parseInt(d.tblwidth,10),r=d.tblwidth,y.scrollLeft=t.scrollLeft,
n=Math.abs(r-d.width),d.shrinkToFit&&!c&&3>n&&0t.clientWidth&&(d.autowidth||void 0!==d.widthOrg&&"auto"!==d.widthOrg&&"100%"!==d.widthOrg||I(t.offsetWidth))));this.fixScrollOffsetAndhBoxPadding();m={resizeDiv:!0,resizedRows:{iRowStart:c?0:-1,iRowEnd:-1}};b(this).triggerHandler("jqGridResetFrozenHeights",[{header:m,resizeFooter:!0,body:m}])}}})},setGridHeight:function(a){return this.each(function(){var c=this.grid,d=this.p;if(c){var e=b(c.bDiv);e.css({height:a+(isNaN(a)?
"":"px")});!0===d.frozenColumns&&b(d.idSel+"_frozen").parent().height(e.height()-16);d.height=a;d.scroll&&c.populateVisible.call(this);this.fixScrollOffsetAndhBoxPadding();b(this).triggerHandler("jqGridResetFrozenHeights")}})},setCaption:function(a){return this.each(function(){var c=this.grid.cDiv;this.p.caption=a;b("span.ui-jqgrid-title, span.ui-jqgrid-title-rtl",c).html(a);b(c).show();b(c).nextAll("div").removeClass(A.getGuiStyles.call(this,"top"));b(this).triggerHandler("jqGridResetFrozenHeights")})},
setLabel:function(a,c,d,e){return this.each(function(){var f,g=this.p,k;if(this.grid){if(isNaN(a)){if(f=g.iColByName[a],void 0===f)return}else f=parseInt(a,10);0<=f&&(k=b(this.grid.headers[f].el),g.frozenColumns&&(k=k.add(this.grid.fhDiv.find("#"+H(k)))),c&&(k.each(function(){var a=b("[id^\x3djqgh_]",this),d=a.children("span.ui-jqgrid-cell-wrapper");0g||g===f.width)){A.setColWidth.call(d,a,g,e.autoResizing.adjustGridWidth&&!e.autoResizing.fixWidthOnShrink&&!c,c);e.autoResizing.fixWidthOnShrink&&e.shrinkToFit&&!c&&(f.fixed=!0,g=f.widthOrg,f.widthOrg=f.width,A.setGridWidth.call(d,e.width,!0),f.widthOrg=g,f.fixed=!1);if(l||void 0===l&&e.autoResizing.resetWidthOrg)f.widthOrg=f.width;k.data("autoResized","true")}})},autoResizeAllColumns:function(){return this.each(function(){var a=b(this),c=this.p,d=c.colModel,e=d.length,f,g,k=c.shrinkToFit,
l=c.autoResizing.adjustGridWidth,m=c.autoResizing.fixWidthOnShrink,n=parseInt(c.widthOrg,10),p=this.grid,q=A.autoResizeColumn;c.shrinkToFit=!1;c.autoResizing.adjustGridWidth=!0;c.autoResizing.fixWidthOnShrink=!1;for(f=0;fc?d[a.rowIndex]:a;return null!=a&&null!=a.cells?b(a.cells[c]):b()},Kb=function(b,c){var a=b.height();1<=Math.abs(a-c)&&0h.status||304===h.status)&&(0!==h.status||4!==h.readyState)){var l=e.triggerHandler("jqGridAfterSubmitCell",[d,h,F.id,x,B,a,c])||[!0,""];if(!0===l||!0===l[0]&&b.isFunction(f.afterSubmitCell))l=f.afterSubmitCell.call(d,h,F.id,x,B,a,c);null==l||!0===l||!0===l[0]?(e.jqGrid("setCell",
z,c,B,!1,!1,!0),y.addClass("dirty-cell"),C.addClass("edited"),O.call(d,"afterSaveCell",z,x,B,a,c),q.splice(0,1),delete f.editingInfo[z]):(k.call(d,n,l[1],p),e.jqGrid("restoreCell",a,c))}},error:function(g,h,l){e.triggerHandler("jqGridErrorCell",[g,h,l]);b.isFunction(f.errorCell)?f.errorCell.call(d,g,h,l):k.call(d,n,g.status+" : "+g.statusText+"\x3cbr/\x3e"+h,p);e.jqGrid("restoreCell",a,c)}},u.ajaxOptions,f.ajaxCellOptions||{}))}else try{k.call(d,n,m.nourl,p),e.jqGrid("restoreCell",a,c)}catch(K){}if("clientArray"===
f.cellsubmit){e.jqGrid("setCell",z,c,"select"===w.edittype&&"select"!==w.formatter?D.text:B,!1,!1,!0);y.addClass("dirty-cell");C.addClass("edited");O.call(d,"afterSaveCell",z,x,B,a,c);if(f.frozenColumns&&c=f+e&&(m.scrollTop+=b.clientHeight);"vu"===c&&k=m.clientWidth+parseInt(c,10)?m.scrollLeft+=a.clientWidth:bf.search(/(false|f|0|no|n|off|undefined)/i)&&""!==f?(k.checked=!0,k.defaultChecked=!0,k.value=d):k.value="on",b(k).data("offval","off"));g(k,c,["value"]);b(k).attr({role:"checkbox","aria-checked":k.checked?"true":"false"});break;case "select":k=P.createElement("select");e=[];a=null;!0===c.multiple||"multiple"===c.multiple?(n=!0,k.multiple="multiple",b(k).attr("aria-multiselectable","true"),
e=d.split(","),e=b.map(e,function(a){return b.trim(a)})):(n=!1,e[0]=b.trim(d));void 0===c.size&&(c.size=n?3:1);try{a=c.rowId}catch(z){}m&&m.idPrefix&&(a=u.stripPref(m.idPrefix,a));void 0===c.dataUrl&&c.generateValue&&null!=m.indexByColumnData[c.cm.name]&&(c.value=l.generateValueFromColumnIndex(c.cm.name,c.separator,c.delimiter));void 0!==c.dataUrl?(m=c.postData||f.postData,e={elem:k,options:c,cm:c.cm,mode:c.mode,rowid:a,iCol:c.iCol,ovm:e},g(k,c,m?["postData"]:void 0),b.ajax(b.extend({url:b.isFunction(c.dataUrl)?
c.dataUrl.call(l,a,d,String(c.name),e):c.dataUrl,type:"GET",dataType:"html",data:b.isFunction(m)?m.call(l,a,d,String(c.name)):m,context:e,success:function(a,c,d){var e=this.ovm,f=this.elem,g=this.cm,k=this.iCol,m=b.extend({},this.options),h=this.rowid,p=this.mode;a=b.isFunction(m.buildSelect)?m.buildSelect.call(l,a,d,g,k):a;"string"===typeof a&&(a=b(b.trim(a)).html());a&&(b(f).append(a),setTimeout(function(){var a;b("option",f).each(function(c){0===c&&f.multiple&&(this.selected=!1);-1m.length||1>a[b[k]]||12m.length||1>a[b[e]]||31(0!==f%4||0===f%100&&0!==f%400?28:29));return c||a[b[e]]>l[a[b[k]]]?!1:!0},isEmpty:function(b){return b.match(/^\s+$/)||""===b?!0:!1},checkTime:function(b){var a=/^(\d{1,2}):(\d{2})([apAP][Mm])?$/;if(!u.isEmpty(b))if(b=b.match(a)){if(b[3]){if(1>b[1]||12c)return[!0,"",""];d=l[c];g=d.editrules;null!=d.formoptions&&(k=d.formoptions.label)}else g=d,k=void 0===e?"_":e,d=l[c];if(g){k||(k=null!=n.colNames?n.colNames[c]:d.label);if(!0===
r("required")&&p(a))return[!1,k+": "+q.required,""];n=!1===r("required")?!1:!0;if(!0===r("number")&&(!1!==n||!p(a))&&isNaN(a))return[!1,k+": "+q.number,""];if(void 0!==g.minValue&&!isNaN(g.minValue)&&parseFloat(a)parseFloat(g.maxValue))return[!1,k+": "+q.maxValue+" "+g.maxValue,""];if(!(!0!==r("email")||!1===n&&p(a)||(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,
e.test(a))))return[!1,k+": "+q.email,""];if(!(!0!==r("integer")||!1===n&&p(a)||!isNaN(a)&&0===a%1&&-1===a.indexOf(".")))return[!1,k+": "+q.integer,""];if(!(!0!==r("date")||!1===n&&p(a)||(d.formatoptions&&d.formatoptions.newformat?(l=d.formatoptions.newformat,v.hasOwnProperty(l)&&(l=v[l])):l=l[c].datefmt||"Y-m-d",u.checkDate(l,a))))return[!1,k+": "+q.date+" - "+l,""];if(!0===r("time")&&!(!1===n&&p(a)||u.checkTime(a)))return[!1,k+": "+q.date+" - hh:mm (am/pm)",""];if(!(!0!==r("url")||!1===n&&p(a)||
(e=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@`~=%!]*)(\.\w{2,})?)*\/?)/i,e.test(a))))return[!1,k+": "+q.url,""];if(!0===g.custom){if(!1!==n||!p(a))return b.isFunction(g.custom_func)?(a=g.custom_func.call(m,a,k,c),b.isArray(a)?a:[!1,q.customarray,""]):[!1,q.customfcheck,""]}else if(b.isFunction(g.custom)&&(!1!==n||!p(a)))return a=g.custom.call(m,f),b.isArray(a)?a:[!1,q.customarray,""]}return[!0,"",""]}});u.extend({getColProp:function(b){var a=this[0];return null!=
a&&a.grid&&(b=a.p.iColByName[b],void 0!==b)?a.p.colModel[b]:{}},setColProp:function(a,c){return this.each(function(){var d=this.p,e;this.grid&&null!=d&&c&&(e=d.iColByName[a],void 0!==e&&b.extend(!0,d.colModel[e],c))})},sortGrid:function(b,c,d){return this.each(function(){var a=this.grid,f=this.p,g=f.colModel,k=g.length,l,m,n=!1;if(a)for(b||(b=f.sortname),"boolean"!==typeof c&&(c=!1),m=0;mb.inArray(g.op,k.sopt))continue}else if("select"===h.stype||"checkbox"===h.stype){if("eq"!==g.op)continue}else if(g.op!==l.defaultSearch)continue;d[h.name]={op:g.op,data:g.data}}return d},D=function(b,a){switch(a){case 1:b.data("state",1).prop({checked:!0,indeterminate:!1});break;case 0:b.data("state",0).prop({checked:!1,indeterminate:!1});break;default:b.data("state",-1).prop({checked:!1,indeterminate:!0})}},B=function(){var a={},g=0,h={};b.each(m,function(){var e=this,k=e.index||
e.name,m,p,q=e.searchoptions||{};m=b("#"+H(x(e.name)),!0===e.frozen&&!0===f.frozenColumns?d.fhDiv:d.hDiv);var r=function(b,a){var c=e.formatoptions||{};return void 0!==c[b]?c[b]:n("formatter."+(a||e.formatter)+"."+b)},v=function(b){var a=r("thousandsSeparator").replace(/([\.\*\_\'\(\)\{\}\+\?\\])/g,"\\$1");return b.replace(new RegExp(a,"g"),"")};p=l.searchOperators?m.parent().prev().children("a").data("soper")||l.defaultSearch:q.sopt?q.sopt[0]:"select"===e.stype||"checkbox"===e.stype?"eq":l.defaultSearch;
if("custom"===e.stype&&b.isFunction(q.custom_value)&&0y.length&&m.substr(m.length-y.length,y.length)===y&&(m=m.substr(0,m.length-y.length));m=v(m).replace(r("decimalSeparator"),".");""!==m&&(m=String(parseFloat(m)))}if(m||"nu"===p||"nn"===p||0<=
b.inArray(p,f.customUnaryOperations))a[k]=m,h[k]=p,g++;else if(a.hasOwnProperty(k)&&delete a[k],!l.stringResult&&!l.searchOperators&&"local"!==f.datatype)try{null!=f.postData&&f.postData.hasOwnProperty(k)&&delete f.postData[k]}catch(da){}});var k=0m&&b(this).remove())})});var v=
-1,u=-1,C,w;b(l).filter(".jqg-second-row-header").children("th").each(function(){C=parseInt(b(this).attr("colspan")||1,10);w=parseInt(b(this).attr("rowspan")||1,10);1u.msiever()&&(g=parseInt(b("select.selectopts",c)[0].offsetWidth,10)+1,b(".selectopts",c).width(g),b(".selectopts",c).css("width","auto"));b(".data",c).empty().append(n);e.createColumnIndex&&h.generateDatalist&&(g="dl_"+n.id,e=b(f).jqGrid("generateDatalistFromColumnIndex",e.name),null!=e&&0f&&2>g)for(this.removeWhite(a),e=a.firstChild;e;e=e.nextSibling)3===e.nodeType?c["#text"]=this.escape(e.nodeValue):4===e.nodeType?
d.test(e.nodeValue)?c[e.nodeName]=[c[e.nodeName],e.nodeValue]:c["#cdata"]=this.escape(e.nodeValue):c[e.nodeName]?c[e.nodeName]instanceof Array?c[e.nodeName][c[e.nodeName].length]=this.toObj(e):c[e.nodeName]=[c[e.nodeName],this.toObj(e)]:c[e.nodeName]=this.toObj(e);else a.attributes.length?c["#text"]=this.escape(this.innerXml(a)):c=this.escape(this.innerXml(a));else if(f)a.attributes.length?c["#text"]=this.escape(this.innerXml(a)):(c=this.escape(this.innerXml(a)),"__EMPTY_ARRAY_"===c?c="[]":"__EMPTY_STRING_"===
c&&(c=""));else if(g)if(1b.inArray(a,w.skipPostTypes)&&(G[c]=b(this).val())}});return!0}function e(a,c){var d,e=0,f,g,h,k;if(w.checkOnSubmit||w.checkOnUpdate)w._savedData={},w._savedData[v+"_id"]=a;var l=r.colModel;if("_empty"===a)b(l).each(function(){d=this.name;g=b.extend({},this.editoptions||{});(f=b("#"+H(d),c))&&f.length&&null!==f[0]&&(h="","custom"===this.edittype&&b.isFunction(g.custom_value)?
g.custom_value.call(p,f,"set",h):g.defaultValue?(h=b.isFunction(g.defaultValue)?g.defaultValue.call(p):g.defaultValue,"checkbox"===f[0].type?(k=h.toLowerCase(),0>k.search(/(false|f|0|no|n|off|undefined)/i)&&""!==k?(f[0].checked=!0,f[0].defaultChecked=!0,f[0].value=h):(f[0].checked=!1,f[0].defaultChecked=!1)):f.val(h)):"checkbox"===f[0].type?(f[0].checked=!1,f[0].defaultChecked=!1,h=b(f).data("offval")):f[0].type&&"select"===f[0].type.substr(0,6)?f[0].selectedIndex=0:f.val(h),!0===w.checkOnSubmit||
w.checkOnUpdate)&&(w._savedData[d]=h)}),b("#id_g",c).val(a);else{var m=A.getInd.call(q,a,!0);m&&(b(m.cells).filter("td[role\x3dgridcell]").each(function(f){var g;d=l[f].name;if("cb"!==d&&"subgrid"!==d&&"rn"!==d&&!0===l[f].editable){try{g=b.unformat.call(p,b(this),{rowId:a,colModel:l[f]},f)}catch(Ja){g="textarea"===l[f].edittype?b(this).text():b(this).html()}r.autoEncodeOnEdit&&(g=u.oldDecodePostedData(g));if(!0===w.checkOnSubmit||w.checkOnUpdate)w._savedData[d]=g;d="#"+H(d);switch(l[f].edittype){case "password":case "text":case "button":case "image":case "textarea":Sa(g)&&
(g="");b(d,c).val(g);break;case "select":var h=g.split(","),h=b.map(h,function(a){return b.trim(a)});b(d+" option",c).each(function(){var a=b(this),a=b.trim(a.val());l[f].editoptions.multiple||h[0]!==a?l[f].editoptions.multiple?(a=b.inArray(a,h),-1g.search(/(false|f|0|no|n|off|undefined)/i)&&""!==g);b(d,c).prop({checked:g,defaultChecked:g});break;case "custom":try{if(l[f].editoptions&&b.isFunction(l[f].editoptions.custom_value))l[f].editoptions.custom_value.call(p,
b(d,c),"set",g);else throw"e1";}catch(Ja){"e1"===Ja?u.info_dialog.call(p,na,"function 'custom_value' "+w.msg.nodefined,w.bClose):u.info_dialog.call(p,na,Ja.message,w.bClose)}}e++}}),0b.rp?1:a.rpb.rp?1:a.rpb.inArray(c,d))return a.trigger("click"),!1}},D=U.call(l,"hover"),B=U.call(l,"disabled"),h=M.call(l,"navButton","ui-pg-button");if(l.grid){l.modalAlert=x;void 0===a&&(m.pager?(a=m.pager,m.toppager&&(q.cloneToTop=!0)):m.toppager&&(a=m.toppager));var F=1,K,I,L,J,Z,G,N=["left","center","right"],E="\x3cdiv class\x3d'"+M.call(l,"navButton","ui-pg-button "+U.call(l,"disabled"))+
"'\x3e\x3cspan class\x3d'ui-separator'\x3e\x3c/span\x3e\x3c/div\x3e",T=function(){ba(this,B)||b(this).addClass(D)},Y=function(){b(this).removeClass(D)},na=function(){ba(this,B)||(b.isFunction(q.addfunc)?q.addfunc.call(l,e):A.editGridRow.call(n,"new",e));return!1},ga=function(a,c,d){if(!ba(this,B)){var e=m.selrow;e?b.isFunction(a)?a.call(l,e,d):A[c].call(n,e,d):x()}return!1},O=function(){return ga.call(this,q.editfunc,"editGridRow",d)},aa=function(){return ga.call(this,q.viewfunc,"viewGridRow",k)},
Q=function(){var a;ba(this,B)||(m.multiselect?(a=m.selarrrow,0===a.length&&(a=null)):a=m.selrow,a?b.isFunction(q.delfunc)?q.delfunc.call(l,a,f):A.delGridRow.call(n,a,f):x());return!1},W=function(){ba(this,B)||(b.isFunction(q.searchfunc)?q.searchfunc.call(l,g):A.searchGrid.call(n,g));return!1},V=function(){if(!ba(this,B)){b.isFunction(q.beforeRefresh)&&q.beforeRefresh.call(l);m.search=!1;m.resetsearch=!0;try{if("currentfilter"!==q.refreshstate){m.postData.filters="";try{b("#fbox_"+v).jqFilter("resetFilter")}catch(S){}b.isFunction(l.clearToolbar)&&
l.clearToolbar(!1)}}catch(S){}switch(q.refreshstate){case "firstpage":n.trigger("reloadGrid",[b.extend({},q.reloadGridOptions||{},{page:1})]);break;case "current":case "currentfilter":n.trigger("reloadGrid",[b.extend({},q.reloadGridOptions||{},{current:!0})])}b.isFunction(q.afterRefresh)&&q.afterRefresh.call(l)}return!1},X=function(a,c,d){var e=b("\x3cdiv class\x3d'"+h+"' tabindex\x3d'0' role\x3d'button'\x3e\x3c/div\x3e"),f=q[a+"icon"],g=b.trim(q[a+"text"]);e.append("\x3cdiv class\x3d'ui-pg-div'\x3e\x3cspan class\x3d'"+
(q.iconsOverText?oa("ui-pg-button-icon-over-text",C,f):oa(C,f))+"'\x3e\x3c/span\x3e"+(g?"\x3cspan class\x3d'ui-pg-button-text"+(q.iconsOverText?" ui-pg-button-icon-over-text":"")+"'\x3e"+g+"\x3c/span\x3e":"")+"\x3c/div\x3e");b(t).append(e);e.attr({title:q[a+"title"]||"",id:c||a+"_"+L}).click(d).hover(T,Y);return e};q.cloneToTop&&m.toppager&&(F=2);for(K=0;Km._nvtd[0]&&(b(I+"_"+q.position,I).width(r),m._nvtd[0]=r),m._nvtd[1]=r);l.nav=!0;t.on("keydown.jqGrid",
y)}n.triggerHandler("jqGridResetFrozenHeights")}}})},navButtonAdd:function(a,c){"object"===typeof a&&(c=a,a=void 0);return this.each(function(){var d=this,e=d.p;if(d.grid){var f=b.extend({caption:"newButton",title:"",onClickButton:null,position:"last",iconsOverText:!1},A.getGridRes.call(b(d),"nav"),u.nav||{},e.navOptions||{},c||{}),g=f.id,k=U.call(d,"hover"),l=U.call(d,"disabled"),m=M.call(d,"navButton","ui-pg-button");if(void 0===a)if(e.pager)if(A.navButtonAdd.call(b(d),e.pager,f),e.toppager)a=e.toppager,
g&&(g+="_top");else return;else e.toppager&&(a=e.toppager);"string"===typeof a&&0!==a.indexOf("#")&&(a="#"+H(a));var e=b(".navtable",a),n=f.commonIconClass;if(0v)&&r(k),l(z-1)*c&&t.startRowt.startRow&&(y=K));for(;ya.status||304===a.status)||0===a.status&&4===a.readyState||(d(a.responseXML,this),b(c).triggerHandler("jqGridImportComplete",[a,this]),b.isFunction(this.importComplete)&&this.importComplete(a))}},a.ajaxOptions));
break;case "xmlstring":a.impstring&&"string"===typeof a.impstring&&(f=b.parseXML(a.impstring))&&(d(f,a),b(c).triggerHandler("jqGridImportComplete",[f,a]),b.isFunction(a.importComplete)&&a.importComplete(f),a.impstring=null);break;case "json":b.ajax(b.extend({url:a.impurl,type:a.mtype,data:a.impData,dataType:"json",context:a,complete:function(a){try{!(300>a.status||304===a.status)||0===a.status&&4===a.readyState||(e(a.responseText,this),b(c).triggerHandler("jqGridImportComplete",[a,this]),b.isFunction(this.importComplete)&&
this.importComplete(a))}catch(k){}}},a.ajaxOptions));break;case "jsonstring":a.impstring&&"string"===typeof a.impstring&&(e(a.impstring,a),b(c).triggerHandler("jqGridImportComplete",[a.impstring,a]),b.isFunction(a.importComplete)&&a.importComplete(a.impstring),a.impstring=null)}})},jqGridExport:function(a){a=b.extend({exptype:"xmlstring",root:"grid",ident:"\t"},a||{});var c=null;this.each(function(){if(this.grid){var d,e=b.extend(!0,{},b(this).jqGrid("getGridParam"));e.rownumbers&&(e.colNames.splice(0,
1),e.colModel.splice(0,1));e.multiselect&&(e.colNames.splice(0,1),e.colModel.splice(0,1));e.subGrid&&(e.colNames.splice(0,1),e.colModel.splice(0,1));e.knv=null;if(e.treeGrid)for(d in e.treeReader)e.treeReader.hasOwnProperty(d)&&(e.colNames.splice(e.colNames.length-1),e.colModel.splice(e.colModel.length-1));switch(a.exptype){case "xmlstring":c="\x3c"+a.root+"\x3e"+Qa.json2xml(e,a.ident)+"\x3c/"+a.root+"\x3e";break;case "jsonstring":c="{"+Qa.toJson(e,a.root,a.ident,!1)+"}",void 0!==e.postData.filters&&
(c=c.replace(/filters":"/,'filters":'),c=c.replace(/\}\]\}"/,"}]}"))}}});return c},excelExport:function(a){a=b.extend({exptype:"remote",url:null,oper:"oper",tag:"excel",exportOptions:{}},a||{});return this.each(function(){var c;this.grid&&"remote"===a.exptype&&(c=b.extend({},this.p.postData,a.exportOptions),c[a.oper]=a.tag,window.location=a.url+(null!=a.url&&0<=a.url.indexOf("?")?"\x26":"?")+b.param(c))})}});var Ta=function(a){var c=b.makeArray(arguments).slice(1);c.unshift("");c.unshift("Inline");
c.unshift(a);return u.feedback.apply(this,c)};u.inlineEdit=u.inlineEdit||{};u.extend({editRow:function(a,c,d,e,f,g,k,l,m,n){var p={},q=b.makeArray(arguments).slice(1);"object"===b.type(q[0])?p=q[0]:(void 0!==c&&(p.keys=c),b.isFunction(d)&&(p.oneditfunc=d),b.isFunction(e)&&(p.successfunc=e),void 0!==f&&(p.url=f),null!=g&&(p.extraparam=g),b.isFunction(k)&&(p.aftersavefunc=k),b.isFunction(l)&&(p.errorfunc=l),b.isFunction(m)&&(p.afterrestorefunc=m),b.isFunction(n)&&(p.beforeEditRow=n));return this.each(function(){var c=
this,d=b(c),e=c.p,f=0,g=null,k={},l={},m=e.colModel,n=e.prmNames;if(c.grid){var q=b.extend(!0,{keys:!1,oneditfunc:null,successfunc:null,url:null,extraparam:{},aftersavefunc:null,errorfunc:null,afterrestorefunc:null,restoreAfterError:!0,beforeEditRow:null,focusField:!0},u.inlineEdit,e.inlineEditing||{},p),h=d.jqGrid("getInd",a,!0),F=q.focusField,A="object"===typeof F&&null!=F?b(F.target||F).closest("tr.jqgrow\x3etd")[0]:null;if(!1!==h&&(q.extraparam[n.oper]===n.addoper||Ta.call(c,q,"beforeEditRow",
q,a))&&"0"===(b(h).attr("editable")||"0")&&!b(h).hasClass("not-editable-row")){n=u.detectRowEditing.call(c,a);if(null!=n&&"cellEditing"===n.mode){var n=n.savedRow,I=c.rows[n.id],L=U.call(c,"select");d.jqGrid("restoreCell",n.id,n.ic);b(I.cells[n.ic]).removeClass("edit-cell "+L);b(I).addClass(L).attr({"aria-selected":"true",tabindex:"0"})}u.enumEditableCells.call(c,h,b(h).hasClass("jqgrid-new-row")?"add":"edit",function(d){var h=d.cm,m=b(d.dataElement),n=d.dataWidth,p,q=h.name,t=h.edittype,r=d.iCol,
v=h.editoptions||{};l[q]=d.editable;if("hidden"!==d.editable){try{p=b.unformat.call(this,d.td,{rowId:a,colModel:h},r)}catch(Za){p="textarea"===t?m.text():m.html()}k[q]=p;m.html("");h=b.extend({},v,{id:a+"_"+q,name:q,rowId:a,mode:d.mode,cm:h,iCol:r});if("\x26nbsp;"===p||"\x26#160;"===p||1===p.length&&160===p.charCodeAt(0))p="";p=u.createEl.call(c,t,h,p,!0,b.extend({},u.ajaxOptions,e.ajaxSelectOptions||{}));b(p).addClass("editable");m.append(p);n&&b(p).width(d.dataWidth);u.bindEv.call(c,p,h);"select"===
t&&!0===v.multiple&&void 0===v.dataUrl&&u.msie&&b(p).width(b(p).width());null===g&&(g=r);f++}});0
c.status||304===c.status)&&(0!==c.status||4!==c.readyState)){var e,f;f=q.triggerHandler("jqGridInlineSuccessSaveRow",[c,a,n,v,D]);if(null==f||!0===f)f=[!0,t];f[0]&&C(n.successfunc)&&(f=n.successfunc.call(p,c,a,n,v,D));b.isArray(f)?(e=f[0],t=f[1]||t):e=f;if(!0===e){r.autoEncodeOnEdit&&b.each(t,function(a,b){t[a]=u.oldDecodePostedData(b)});t=b.extend({},t,y);q.jqGrid("setRowData",a,t);I.attr("editable","0");for(d=0;d=g.length))){0>=g.find(".navtable").length&&e.jqGrid("navGrid",a,{add:!1,edit:!1,del:!1,search:!1,refresh:!1,view:!1});f._inlinenav=!0;if(!0===n.addParams.useFormatter){g=f.colModel;var p,q;for(p=0;pe&&(e=b.inArray(d.colModel[f].name,c.newColOrder));e++})},u=function(c){if(n[c]===n[a])return b(this).after(p[q]),v(),!0},C=function(c){if(n[c]===n[a])return b(this).before(p[q]),v(),!0},w=function(b){if(n[b]===n[a]&&void 0!==n[b])return l[n[b]].startColumnName=d.colModel[b].name,!0};v();if(l&&void 0!==l[n[a]])for(k=l[n[a]],f=0;f=p.length||0>f||!(k=b(p[f+1]).data("optionLink")))||(g=n[parseInt(k.val(),10)],void 0!==g&&(k=b(p[f-1]).data("optionLink"))&&n[parseInt(k.val(),10)]===g&&(k=r(function(a){if(n[a]!==g)return!0},f+1),b(p[void 0===k||k>=p.length?p.length-1:k-1]).after(p[q]),v()))}};u.msie&&8===u.msiever()&&(b.expr[":"].hidden=function(a){return 0===a.offsetWidth||0===a.offsetHeight||
"none"===a.style.display});u._multiselect=!1;if(ka){if(ka.prototype._setSelected){var Lb=ka.prototype._setSelected;ka.prototype._setSelected=function(a,c){var d=Lb.call(this,a,c),e=this.element;a=parseInt(a.data("optionLink").val(),10);c&&this.selectedList&&(ub.call(this,a),this.selectedList.find("li").each(function(){b(this).data("optionLink")&&b(this).data("optionLink").remove().appendTo(e)}));return d}}ka.prototype.destroy&&(ka.prototype.destroy=function(){this.element.show();this.container.remove();
void 0===b.Widget?b.widget.prototype.destroy.apply(this,arguments):b.Widget.prototype.destroy.apply(this,arguments)});u._multiselect=!0}u.extend({sortableColumns:function(a){return this.each(function(){function c(){e.disableClick=!0}var d=this,e=d.p,f=H(e.id);if(e&&e.sortable&&b.isFunction(b.fn.sortable)){f={tolerance:"pointer",axis:"x",scrollSensitivity:"1",items:"\x3eth:not(:has(#jqgh_"+f+"_cb,#jqgh_"+f+"_rn,#jqgh_"+f+"_subgrid),:hidden)",placeholder:{element:function(a){return b(P.createElement(a[0].nodeName)).addClass(a[0].className+
" ui-sortable-placeholder ui-state-highlight").removeClass("ui-sortable-helper")[0]},update:function(a,b){b.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css("paddingTop")||0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10));b.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}},start:function(){d.grid.hDiv.scrollLeft=d.grid.bDiv.scrollLeft},update:function(a,c){a=b("\x3eth",b(c.item).parent());var f=
e.id+"_",g=[];a.each(function(){var a=b("\x3ediv",this).get(0).id.replace(/^jqgh_/,"").replace(f,""),a=e.iColByName[a];void 0!==a&&g.push(a)});b(d).jqGrid("remapColumns",g,!0,!0);b.isFunction(e.sortable.update)&&e.sortable.update(g);setTimeout(function(){e.disableClick=!1},50)}};e.sortable.options?b.extend(f,e.sortable.options):b.isFunction(e.sortable)&&(e.sortable={update:e.sortable});if(f.start){var g=f.start;f.start=function(a,b){c();g.call(this,a,b)}}else f.start=c;e.sortable.exclude&&(f.items+=
":not("+e.sortable.exclude+")");f=a.sortable(f);f=f.data("sortable")||f.data("uiSortable")||f.data("ui-sortable");null!=f&&(f.floating=!0)}})},columnChooser:function(a){function c(a,c){a&&("string"===typeof a?b.fn[a]&&b.fn[a].apply(c,b.makeArray(arguments).slice(2)):b.isFunction(a)&&a.apply(c,b.makeArray(arguments).slice(2)))}var d=this,e=d[0],f=e.p,g,k,l,m,n,p=f.colModel,q=p.length,r=f.colNames,v=function(a){return ka&&ka.prototype&&a.data(ka.prototype.widgetFullName||ka.prototype.widgetName)||a.data("ui-multiselect")||
a.data("multiselect")};if(!b("#colchooser_"+H(f.id)).length){g=b('\x3cdiv id\x3d"colchooser_'+f.id+'" style\x3d"position:relative;overflow:hidden"\x3e\x3cdiv\x3e\x3cselect multiple\x3d"multiple"\x3e\x3c/select\x3e\x3c/div\x3e\x3c/div\x3e');k=b("select",g);a=b.extend({width:400,height:240,classname:null,done:function(a){a&&d.jqGrid("remapColumns",a,!0)},msel:"multiselect",dlog:"dialog",dialog_opts:{minWidth:470,dialogClass:"ui-jqdialog"},dlog_opts:function(a){var c={};c[a.bSubmit]=function(){a.apply_perm();
a.cleanup(!1)};c[a.bCancel]=function(){a.cleanup(!0)};return b.extend(!0,{buttons:c,close:function(){a.cleanup(!0)},modal:a.modal||!1,resizable:a.resizable||!0,width:a.width+70,resize:function(){var a=v(k),b=a.container.closest(".ui-dialog-content");0q)p.push(f),l.push([c]);else if(g=this.compareVectors(f,p[q]),0===g)l[q].push(c);else if(1===g||this.skipSort)p.push(f),l.push([c]);else if(g=this.compareVectors(p[0],f),1===g)p.unshift(f),l.unshift([c]);else if(0===g)l[0].push(c);else for(;;){if(2>q-n){p.splice(q,0,f);l.splice(q,0,[c]);break}m=Math.floor((n+q)/2);g=this.compareVectors(p[m],f);if(0===g){l[m].push(c);break}1===g?q=m:n=m}}};u.extend({pivotSetup:function(a,c){var d=this[0],e=b.isArray,f={},g={groupField:[],groupSummary:[],groupSummaryPos:[]},
k={grouping:!0,groupingView:g},l=b.extend({totals:!1,useColSpanStyle:!1,trimByCollect:!0,skipSortByX:!1,skipSortByY:!1,caseSensitive:!1,footerTotals:!1,groupSummary:!0,groupSummaryPos:"header",frozenStaticCols:!1,defaultFormatting:!0,data:a},c||{}),m,n,p,q=a.length,r,v,z,C,w,x,t=l.xDimension,y=l.yDimension,D=l.aggregates,B,q=l.totalText||l.totals||l.rowTotals||l.totalHeader,h,F=e(t)?t.length:0;C=e(y)?y.length:0;var A=e(D)?D.length:0,I=C-(1===A?1:0),L=[],J=[],H=[],e=[],G=["pivotInfos"],M=Array(A),
E=Array(C),N,P,O,W,U,aa,Q,R,V,X,S;n=function(c,d,e){c=new ia(l.trimByCollect,l.caseSensitive,d,c);b.isFunction(e)&&(c.compareVectorsEx=e);c.createDataIndex(a);return c};var ba=function(a,c,e,f,g){var h,k;switch(a){case 1:h=y[f].totalText||"{0} {1} {2}";k="y"+g+"t"+f;break;case 2:h=l.totalText||"{0}";k="t";break;default:h=1=c;f--)if(J[f]){for(g=0;g<=f;g++)V=L[g].groupHeaders,V[V.length-1].numberOfColumns+=A;r=y[f];h=r.totalHeader;k=r.headerOnTop;for(g=f+1;g<=I-1;g++)L[g].groupHeaders.push({titleText:k&&g===f+1||!k&&g===I-1?b.isFunction(h)?h.call(d,e,f):u.template.call(d,String(h||""),e[f],f):"",startColumnName:"y"+(a-1)+"t"+f+(1===A?"":"a0"),numberOfColumns:A})}};var da=function(a){a=new xa("count"===D[a].aggregator?"sum":D[a].aggregator,d,c);a.groupInfo={iRows:[],
rows:[],ys:[],iYs:[]};return a},fa=function(){var a,b;for(a=I-1;0<=a;a--)if(J[a])for(null==E[a]&&(E[a]=Array(A)),b=0;b=f;e--)g="y"+a+"t"+e+(1b.inArray(k,l.iYs)&&(l.iYs.push(k),l.ys.push(c)),0>b.inArray(h,l.iRows)&&(l.iRows.push(h),l.rows.push(g)))};if(0===F||0===A)throw"xDimension or aggregates options are not set!";X=n(t,l.skipSortByX,l.compareVectorsByX);S=n(y,l.skipSortByY,l.compareVectorsByY);c.xIndex=X;c.yIndex=S;for(n=0;nF&&(k.grouping=!1);g.hideFirstGroupCol=!0;for(n=0;n=n;p--)J[p]&&w(1,p,v-1);R=O;w(0,C-1,v)}for(n=I-1;0<=n;n--)J[n]&&w(1,n,g-1);q&&w(2);R=S.getItem(0);for(p=0;p=n;p--)L[p].groupHeaders.push({titleText:b.isFunction(y[p].label)?
y[p].label.call(d,{yData:O[p],yIndex:O,yLevel:p,pivotOptions:l}):O[p],startColumnName:"y"+v+(1===A?"":"a0"),numberOfColumns:A});for(p=0;pb.inArray(n,h.iYs)&&(h.iYs.push(v),h.ys.push(O)),0>b.inArray(n,h.iRows)&&(h.iRows.push(n),
h.rows.push(m))),ha(O,R,aa,p,m,n,v);m="y"+v+(1===A?"":"a"+p);B.getResult(Q,m);w[m]={colType:0,iY:v,y:O,iA:p,a:aa,iRows:U,rows:x}}}R=O}if(null!==R)for(p=0;pn)return f=this,!1});return f}if(null===e||"null"===e)return null;a=c._index[e];return void 0!==a?c.data[a]:null},getNodeChildren:function(a){var c=[];this.each(function(){var d=this.p;if(this.grid&&d.treeGrid)switch(d.treeGridModel){case "nested":var e=d.treeReader.left_field,f=d.treeReader.right_field,g=
d.treeReader.level_field,k=parseInt(a[e],10),l=parseInt(a[f],10),m=parseInt(a[g],10);b(d.data).each(function(){parseInt(this[g],10)===m+1&&parseInt(this[e],10)>k&&parseInt(this[f],10)=n&&parseInt(this[f],10)>=l&&parseInt(this[f],10)<=m&&c.push(this)});break;case "adjacency":if(a){c.push(a);var p=d.treeReader.parent_id_field,q=d.localReader.id;b(d.data).each(function(){var a;e=c.length;for(a=0;ar&&(r=I,v=L)}p[w]&&(z=!0,p[C]=!0,b(this.rows[h]).find("span.cell-wrapperleaf").removeClass("cell-wrapperleaf").addClass("cell-wrapper").end().find("div.tree-leaf").removeClass(f.treeIcons.leaf+
" tree-leaf").addClass(f.treeIcons.commonIconClass).addClass(l),f.data[n][w]=!1,p[B]=!0)}void 0===d[C]&&(d[C]=!1);void 0===d[B]&&(d[B]=!1);d[x]=q;void 0===d[w]&&(d[w]=!0);"adjacency"===f.treeGridModel&&(d[t]=c);if("nested"===f.treeGridModel){var J;if(null!==c){k=parseInt(p[D],10);f=u.from.call(this,f.data);f=f.greaterOrEquals(D,k,{stype:"integer"});l=f.select();if(l.length)for(J in l)l.hasOwnProperty(J)&&(l[J][y]=l[J][y]>k?parseInt(l[J][y],10)+2:l[J][y],l[J][D]=l[J][D]>=k?parseInt(l[J][D],10)+2:l[J][D]);
d[y]=k;d[D]=k+1}else{k=parseInt(A.getCol.call(g,D,!1,"max"),10);l=u.from.call(this,f.data).greater(y,k,{stype:"integer"}).select();if(l.length)for(J in l)l.hasOwnProperty(J)&&(l[J][y]=parseInt(l[J][y],10)+2);l=u.from.call(this,f.data).greater(D,k,{stype:"integer"}).select();if(l.length)for(J in l)l.hasOwnProperty(J)&&(l[J][D]=parseInt(l[J][D],10)+2);d[y]=k+1;d[D]=k+2}}(null===c||A.isNodeLoaded.call(g,p)||z)&&A.addRowData.call(g,a,d,m,v);p&&!p[C]&&e&&b(this.rows[h]).find("div.treeclick").click()}})}});
var hb="mousedown",Ua="mousemove",Va="mouseup",xb=function(a){var b=a.originalEvent.targetTouches;return b?(b=b[0],{x:b.pageX,y:b.pageY}):{x:a.pageX,y:a.pageY}},Wa={drag:function(a){var b=a.data,d=b.e,e=b.dnr,f=b.ar,b=b.dnrAr;a=xb(a);"move"===e.k?d.css({left:e.X+a.x-e.pX,top:e.Y+a.y-e.pY}):(d.css({width:Math.max(a.x-e.pX+e.W,0),height:Math.max(a.y-e.pY+e.H,0)}),b&&f.css({width:Math.max(a.x-b.pX+b.W,0),height:Math.max(a.y-b.pY+b.H,0)}));return!1},stop:function(){b(P).off(Ua,Wa.drag).off(Va,Wa.stop)}},
yb=function(a,c,d,e){return a.each(function(){c=c?b(c,a):a;c.on(hb,{e:a,k:d},function(a){var c=a.data,d={},f,m,n=function(a,b){return parseInt(a.css(b),10)||!1},p=xb(a);if(!b(a.target).hasClass("ui-jqdialog-titlebar-close")&&!b(a.target).parent().hasClass("ui-jqdialog-titlebar-close")){a=c.e;m=e?b(e):!1;if("relative"!==a.css("position"))try{a.position(d)}catch(q){}f={X:d.left||n(a,"left")||0,Y:d.top||n(a,"top")||0,W:n(a,"width")||a[0].scrollWidth||0,H:n(a,"height")||a[0].scrollHeight||0,pX:p.x,pY:p.y,
k:c.k};d=m&&"move"!==c.k?{X:d.left||n(m,"left")||0,Y:d.top||n(m,"top")||0,W:m[0].offsetWidth||n(m,"width")||0,H:m[0].offsetHeight||n(m,"height")||0,pX:p.x,pY:p.y,k:c.k}:!1;c=a.find("input.hasDatepicker");if(0a,f=String(a),g=b.decimalSeparator||".";if(c(b.decimalPlaces)&&(c=b.decimalPlaces,f=String(Number(Math.round(a+"e"+c)+"e-"+c)),a=f.lastIndexOf("."),0a?(f+=g,a=f.length-1):"."!==g&&(f=f.replace(".",g));f.length-1-ab.inArray(f,
l.selarrrow)?k.jqGrid("setSelection",f,!0,a):u.fullBoolFeedback.call(g,"onSelectRow","jqGridSelectRow",f,!0,a);switch(c){case "edit":k.jqGrid("editRow",f,e);break;case "save":k.jqGrid("saveRow",f,e);break;case "cancel":k.jqGrid("restoreRow",f,d.afterRestore);break;case "del":d.delOptions=d.delOptions||{};void 0===d.delOptions.top&&(d.delOptions.top=m);k.jqGrid("delGridRow",f,d.delOptions);break;case "formedit":d.editOptions=d.editOptions||{};void 0===d.editOptions.top&&(d.editOptions.top=m,d.editOptions.recreateForm=
!0);k.jqGrid("editGridRow",f,d.editOptions);break;default:if(null!=d.custom&&0
© 2015 - 2025 Weber Informatics LLC | Privacy Policy