You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2014/12/16 17:26:20 UTC

[2/3] incubator-nifi git commit: NIFI-27: - Upgrading jQuery, jQuery UI, jqGrid. - Replacing deprecated functionality.

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d7b1113a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
----------------------------------------------------------------------
diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
old mode 100755
new mode 100644
index 5ce272f..340d0a0
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
+++ b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
@@ -1,416 +1,545 @@
 /* 
- * jqGrid  3.6.5 - jQuery Grid 
- * Copyright (c) 2008, Tony Tomov, tony@trirand.com 
- * Dual licensed under the MIT and GPL licenses 
- * http://www.opensource.org/licenses/mit-license.php 
- * http://www.gnu.org/licenses/gpl-2.0.html 
- * Date:2010-05-05 
- * Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; grid.jqueryui.js; 
- */
-(function(b){b.jgrid = b.jgrid || {}; b.extend(b.jgrid, {htmlDecode:function(f){if (f == "&nbsp;" || f == "&#160;" || f.length == 1 && f.charCodeAt(0) == 160)return""; return!f?f:String(f).replace(/&amp;/g, "&").replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"')}, htmlEncode:function(f){return!f?f:String(f).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/\"/g, "&quot;")}, format:function(f){var k = b.makeArray(arguments).slice(1); if (f === undefined)f = ""; return f.replace(/\{(\d+)\}/g, function(i,
-        h){return k[h]})}, getCellIndex:function(f){f = b(f); f = (!f.is("td") && !f.is("th")?f.closest("td,th"):f)[0]; if (b.browser.msie)return b.inArray(f, f.parentNode.cells); return f.cellIndex}, stripHtml:function(f){f += ""; var k = /<("[^"]*"|'[^']*'|[^'">])*>/gi; if (f)return(f = f.replace(k, "")) && f !== "&nbsp;" && f !== "&#160;"?f.replace(/\"/g, "'"):""; else return f}, stringToDoc:function(f){var k; if (typeof f !== "string")return f; try{k = (new DOMParser).parseFromString(f, "text/xml")} catch (i){k = new ActiveXObject("Microsoft.XMLDOM");
-        k.async = false; k.loadXML(f)}return k && k.documentElement && k.documentElement.tagName != "parsererror"?k:null}, parse:function(f){f = f; if (f.substr(0, 9) == "while(1);")f = f.substr(9); if (f.substr(0, 2) == "/*")f = f.substr(2, f.length - 4); f || (f = "{}"); return b.jgrid.useJSON === true && typeof JSON === "object" && typeof JSON.parse === "function"?JSON.parse(f):eval("(" + f + ")")}, jqID:function(f){f += ""; return f.replace(/([\.\:\[\]])/g, "\\$1")}, ajaxOptions:{}, extend:function(f){b.extend(b.fn.jqGrid, f); this.no_legacy_api || b.fn.extend(f)}});
-        b.fn.jqGrid = function(f){if (typeof f == "string"){var k = b.fn.jqGrid[f]; if (!k)throw"jqGrid - No such method: " + f; var i = b.makeArray(arguments).slice(1); return k.apply(this, i)}return this.each(function(){if (!this.grid){var h = b.extend(true, {url:"", height:150, page:1, rowNum:20, records:0, pager:"", pgbuttons:true, pginput:true, colModel:[], rowList:[], colNames:[], sortorder:"asc", sortname:"", datatype:"xml", mtype:"GET", altRows:false, selarrrow:[], savedRow:[], shrinkToFit:true, xmlReader:{}, jsonReader:{}, subGrid:false,
-                subGridModel:[], reccount:0, lastpage:0, lastsort:0, selrow:null, beforeSelectRow:null, onSelectRow:null, onSortCol:null, ondblClickRow:null, onRightClickRow:null, onPaging:null, onSelectAll:null, loadComplete:null, gridComplete:null, loadError:null, loadBeforeSend:null, afterInsertRow:null, beforeRequest:null, onHeaderClick:null, viewrecords:false, loadonce:false, multiselect:false, multikey:false, editurl:null, search:false, caption:"", hidegrid:true, hiddengrid:false, postData:{}, userData:{}, treeGrid:false, treeGridModel:"nested",
-                treeReader:{}, treeANode: - 1, ExpandColumn:null, tree_root_level:0, prmNames:{page:"page", rows:"rows", sort:"sidx", order:"sord", search:"_search", nd:"nd", id:"id", oper:"oper", editoper:"edit", addoper:"add", deloper:"del", subgridid:"id", npage:null}, forceFit:false, gridstate:"visible", cellEdit:false, cellsubmit:"remote", nv:0, loadui:"enable", toolbar:[false, ""], scroll:false, multiboxonly:false, deselectAfterSort:true, scrollrows:false, autowidth:false, scrollOffset:18, cellLayout:5, subGridWidth:20, multiselectWidth:20,
-                gridview:false, rownumWidth:25, rownumbers:false, pagerpos:"center", recordpos:"right", footerrow:false, userDataOnFooter:false, hoverrows:true, altclass:"ui-priority-secondary", viewsortcols:[false, "vertical", true], resizeclass:"", autoencode:false, remapColumns:[], ajaxGridOptions:{}, direction:"ltr", toppager:false, headertitles:false, scrollTimeout:200}, b.jgrid.defaults, f || {}), g = {headers:[], cols:[], footers:[], dragStart:function(c, d, e){this.resizing = {idx:c, startX:d.clientX, sOL:e[0]}; this.hDiv.style.cursor = "col-resize";
-                this.curGbox = b("#rs_m" + h.id, "#gbox_" + h.id); this.curGbox.css({display:"block", left:e[0], top:e[1], height:e[2]}); b.isFunction(h.resizeStart) && h.resizeStart.call(this, d, c); document.onselectstart = function(){return false}}, dragMove:function(c){if (this.resizing){var d = c.clientX - this.resizing.startX; c = this.headers[this.resizing.idx]; var e = h.direction === "ltr"?c.width + d:c.width - d, l; if (e > 33){this.curGbox.css({left:this.resizing.sOL + d}); if (h.forceFit === true){l = this.headers[this.resizing.idx + h.nv]; d = h.direction ===
-                "ltr"?l.width - d:l.width + d; if (d > 33){c.newWidth = e; l.newWidth = d}} else{this.newWidth = h.direction === "ltr"?h.tblwidth + d:h.tblwidth - d; c.newWidth = e}}}}, dragEnd:function(){this.hDiv.style.cursor = "default"; if (this.resizing){var c = this.resizing.idx, d = this.headers[c].newWidth || this.headers[c].width; d = parseInt(d, 10); this.resizing = false; b("#rs_m" + h.id).css("display", "none"); h.colModel[c].width = d; this.headers[c].width = d; this.headers[c].el.style.width = d + "px"; if (this.cols.length > 0)this.cols[c].style.width = d + "px";
-                if (this.footers.length > 0)this.footers[c].style.width = d + "px"; if (h.forceFit === true){d = this.headers[c + h.nv].newWidth || this.headers[c + h.nv].width; this.headers[c + h.nv].width = d; this.headers[c + h.nv].el.style.width = d + "px"; if (this.cols.length > 0)this.cols[c + h.nv].style.width = d + "px"; if (this.footers.length > 0)this.footers[c + h.nv].style.width = d + "px"; h.colModel[c + h.nv].width = d} else{h.tblwidth = this.newWidth || h.tblwidth; b("table:first", this.bDiv).css("width", h.tblwidth + "px"); b("table:first", this.hDiv).css("width",
-                h.tblwidth + "px"); this.hDiv.scrollLeft = this.bDiv.scrollLeft; if (h.footerrow){b("table:first", this.sDiv).css("width", h.tblwidth + "px"); this.sDiv.scrollLeft = this.bDiv.scrollLeft}}b.isFunction(h.resizeStop) && h.resizeStop.call(this, d, c)}this.curGbox = null; document.onselectstart = function(){return true}}, populateVisible:function(){g.timer && clearTimeout(g.timer); g.timer = null; var c = b(g.bDiv).height(); if (c){var d = b("table:first", g.bDiv), e = b("> tbody > tr:visible:first", d).outerHeight() || g.prevRowHeight; if (e){g.prevRowHeight =
-                e; var l = h.rowNum, n = g.scrollTop = g.bDiv.scrollTop, o = Math.round(d.position().top) - n, p = o + d.height(); e = e * l; var w, y, s; if (o <= 0 && (h.lastpage === undefined || parseInt((p + n + e - 1) / e, 10) <= h.lastpage)){y = parseInt((c - p + e - 1) / e, 10); if (p >= 0 || y < 2 || h.scroll === true){w = Math.round((p + n) / e) + 1; o = - 1} else o = 1}if (o > 0){w = parseInt(n / e, 10) + 1; y = parseInt((n + c) / e, 10) + 2 - w; s = true}if (y)if (!(h.lastpage && w > h.lastpage))if (g.hDiv.loading)g.timer = setTimeout(g.populateVisible, h.scrollTimeout); else{h.page = w; if (s){g.selectionPreserver(d[0]); g.emptyRows(g.bDiv,
-                false)}g.populate(y)}}}}, scrollGrid:function(){if (h.scroll){var c = g.bDiv.scrollTop; if (c != g.scrollTop){g.scrollTop = c; g.timer && clearTimeout(g.timer); g.timer = setTimeout(g.populateVisible, 200)}}g.hDiv.scrollLeft = g.bDiv.scrollLeft; if (h.footerrow)g.sDiv.scrollLeft = g.bDiv.scrollLeft}, selectionPreserver:function(c){var d = c.p, e = d.selrow, l = d.selarrrow?b.makeArray(d.selarrrow):null, n = c.grid.bDiv.scrollLeft, o = d.gridComplete; d.gridComplete = function(){d.selrow = null; d.selarrrow = []; if (d.multiselect && l && l.length >
-                0)for (var p = 0; p < l.length; p++)l[p] != e && b(c).jqGrid("setSelection", l[p], false); e && b(c).jqGrid("setSelection", e, false); c.grid.bDiv.scrollLeft = n; d.gridComplete = o; d.gridComplete && o()}}}; this.p = h; var j, m, a; if (this.p.colNames.length === 0)for (j = 0; j < this.p.colModel.length; j++)this.p.colNames[j] = this.p.colModel[j].label || this.p.colModel[j].name; if (this.p.colNames.length !== this.p.colModel.length)alert(b.jgrid.errors.model); else{var q = b("<div class='ui-jqgrid-view'></div>"), t, x = b.browser.msie?true:false, C = b.browser.safari?
-                true:false; a = this; a.p.direction = b.trim(a.p.direction.toLowerCase()); if (b.inArray(a.p.direction, ["ltr", "rtl"]) == - 1)a.p.direction = "ltr"; m = a.p.direction; b(q).insertBefore(this); b(this).appendTo(q).removeClass("scroll"); var K = b("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>"); b(K).insertBefore(q).attr({id:"gbox_" + this.id, dir:m}); b(q).appendTo(K).attr("id", "gview_" + this.id); t = x && b.browser.version <= 6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':
-                ""; b("<div class='ui-widget-overlay jqgrid-overlay' id='lui_" + this.id + "'></div>").append(t).insertBefore(q); b("<div class='loading ui-state-default ui-state-active' id='load_" + this.id + "'>" + this.p.loadtext + "</div>").insertBefore(q); b(this).attr({cellSpacing:"0", cellPadding:"0", border:"0", role:"grid", "aria-multiselectable":!!this.p.multiselect, "aria-labelledby":"gbox_" + this.id}); var J = function(c, d){c = parseInt(c, 10); return isNaN(c)?d?d:0:c}, F = function(c, d, e){var l = a.p.colModel[c], n = l.align, o = 'style="',
-                p = l.classes, w = l.name; if (n)o += "text-align:" + n + ";"; if (l.hidden === true)o += "display:none;"; if (d === 0)o += "width: " + g.headers[c].width + "px;"; o += '"' + (p !== undefined?' class="' + p + '"':"") + (l.title && e?' title="' + b.jgrid.stripHtml(e) + '"':""); o += ' aria-describedby="' + a.p.id + "_" + w + '"'; return o}, Q = function(c){return c === undefined || c === null || c === ""?"&#160;":a.p.autoencode?b.jgrid.htmlEncode(c):c + ""}, M = function(c, d, e, l, n){e = a.p.colModel[e]; if (typeof e.formatter !== "undefined"){c = {rowId:c, colModel:e, gid:a.p.id}; d = b.isFunction(e.formatter)?
-                e.formatter.call(a, d, c, l, n):b.fmatter?b.fn.fmatter(e.formatter, d, c, l, n):Q(d)} else d = Q(d); return d}, R = function(c, d, e, l, n){c = M(c, d, e, n, "add"); return'<td role="gridcell" ' + F(e, l, c) + ">" + c + "</td>"}, u = function(c, d, e){c = '<input role="checkbox" type="checkbox" id="jqg_' + c + '" class="cbox" name="jqg_' + c + '"/>'; d = F(d, e, ""); return'<td role="gridcell" aria-describedby="' + a.p.id + '_cb" ' + d + ">" + c + "</td>"}, la = function(c, d, e, l){e = (parseInt(e, 10) - 1) * parseInt(l, 10) + 1 + d; c = F(c, d, ""); return'<td role="gridcell" aria-describedby="' +
-                a.p.id + '_rn" class="ui-state-default jqgrid-rownum" ' + c + ">" + e + "</td>"}, ca = function(c){var d, e = [], l = 0, n; for (n = 0; n < a.p.colModel.length; n++){d = a.p.colModel[n]; if (d.name !== "cb" && d.name !== "subgrid" && d.name !== "rn"){e[l] = c == "xml"?d.xmlmap || d.name:d.jsonmap || d.name; l++}}return e}, fa = function(c){var d = a.p.remapColumns; if (!d || !d.length)d = b.map(a.p.colModel, function(e, l){return l}); if (c)d = b.map(d, function(e){return e < c?null:e - c}); return d}, aa = function(c, d){a.p.deepempty?b("tbody:first tr", c).remove():b("tbody:first",
-                c).empty(); if (d && a.p.scroll){b(">div:first", c).css({height:"auto"}).children("div:first").css({height:0, display:"none"}); c.scrollTop = 0}}, U = function(c, d){var e, l, n, o; if (typeof d === "function")return d(c); e = c[d]; if (e === undefined){if (typeof d === "string")n = d.split("."); try{if (o = n.length)for (e = c; e && o--; ){l = n.shift(); e = e[l]}} catch (p){}}return e}, ia = function(c, d, e, l, n){var o = new Date; a.p.reccount = 0; if (b.isXMLDoc(c)){if (a.p.treeANode === - 1 && !a.p.scroll){aa(d, false); e = 0} else e = e > 0?e:0; var p, w = 0, y, s, r = 0, v = 0,
-                z = 0, D, N, L = [], P, G = {}, da = a.rows.length, E, W, B = [], S = 0, ga = a.p.altRows === true?" " + a.p.altclass:""; a.p.xmlReader.repeatitems || (L = ca("xml")); D = a.p.keyIndex === false?a.p.xmlReader.id:a.p.keyIndex; if (L.length > 0 && !isNaN(D)){if (a.p.remapColumns && a.p.remapColumns.length)D = b.inArray(D, a.p.remapColumns); D = L[D]}N = (D + "").indexOf("[") === - 1?L.length?function(X, V){return b(D, X).text() || V}:function(X, V){return b(a.p.xmlReader.cell, X).eq(D).text() || V}:function(X, V){return X.getAttribute(D.replace(/[\[\]]/g, "")) || V}; a.p.userData =
-        {}; b(a.p.xmlReader.page, c).each(function(){a.p.page = this.textContent || this.text || 0}); b(a.p.xmlReader.total, c).each(function(){a.p.lastpage = this.textContent || this.text; if (a.p.lastpage === undefined)a.p.lastpage = 1}); b(a.p.xmlReader.records, c).each(function(){a.p.records = this.textContent || this.text || 0}); b(a.p.xmlReader.userdata, c).each(function(){a.p.userData[this.getAttribute("name")] = this.textContent || this.text}); c = b(a.p.xmlReader.root + " " + a.p.xmlReader.row, c); var ha = c.length, O = 0; if (c && ha){var ma = parseInt(a.p.rowNum,
-                10), wa = a.p.scroll?(parseInt(a.p.page, 10) - 1) * ma + 1:1; if (n)ma *= n + 1; for (n = b.isFunction(a.p.afterInsertRow); O < ha; ){E = c[O]; W = N(E, wa + O); p = e === 0?0:e + 1; p = (p + O) % 2 == 1?ga:""; B[S++] = '<tr id="' + W + '" role="row" class ="ui-widget-content jqgrow ui-row-' + a.p.direction + "" + p + '">'; if (a.p.rownumbers === true){B[S++] = la(0, O, a.p.page, a.p.rowNum); z = 1}if (a.p.multiselect === true){B[S++] = u(W, z, O); r = 1}if (a.p.subGrid === true){B[S++] = b(a).jqGrid("addSubGridCell", r + z, O + e); v = 1}if (a.p.xmlReader.repeatitems){P || (P = fa(r + v + z)); var za = b(a.p.xmlReader.cell,
-                E); b.each(P, function(X){var V = za[this]; if (!V)return false; y = V.textContent || V.text; G[a.p.colModel[X + r + v + z].name] = y; B[S++] = R(W, y, X + r + v + z, O + e, E)})} else for (p = 0; p < L.length; p++){y = b(L[p], E).text(); G[a.p.colModel[p + r + v + z].name] = y; B[S++] = R(W, y, p + r + v + z, O + e, E)}B[S++] = "</tr>"; if (a.p.gridview === false){if (a.p.treeGrid === true){p = a.p.treeANode >= - 1?a.p.treeANode:0; s = b(B.join(""))[0]; try{b(a).jqGrid("setTreeNode", G, s)} catch (Fa){}da === 0?b("tbody:first", d).append(s):b(a.rows[O + p + e]).after(s)} else b("tbody:first", d).append(B.join(""));
-                if (a.p.subGrid === true)try{b(a).jqGrid("addSubGrid", a.rows[a.rows.length - 1], r + z)} catch (Ga){}n && a.p.afterInsertRow.call(a, W, G, E); B = []; S = 0}G = {}; w++; O++; if (w == ma)break}}a.p.gridview === true && b("tbody:first", d).append(B.join("")); a.p.totaltime = new Date - o; if (w > 0){a.grid.cols = a.rows[0].cells; if (a.p.records === 0)a.p.records = ha}B = null; if (!a.p.treeGrid && !a.p.scroll)a.grid.bDiv.scrollTop = 0; a.p.reccount = w; a.p.treeANode = - 1; a.p.userDataOnFooter && b(a).jqGrid("footerData", "set", a.p.userData, true); l || na(false, true)}},
-                ra = function(c, d, e, l, n){var o = new Date; a.p.reccount = 0; if (c){if (a.p.treeANode === - 1 && !a.p.scroll){aa(d, false); e = 0} else e = e > 0?e:0; var p = 0, w, y, s, r = [], v, z = 0, D = 0, N = 0, L, P, G, da = {}, E, W = a.rows.length, B; s = []; E = 0; var S = a.p.altRows === true?" " + a.p.altclass:""; a.p.page = U(c, a.p.jsonReader.page) || 0; G = U(c, a.p.jsonReader.total); a.p.lastpage = G === undefined?1:G; a.p.records = U(c, a.p.jsonReader.records) || 0; a.p.userData = U(c, a.p.jsonReader.userdata) || {}; a.p.jsonReader.repeatitems || (v = r = ca("json")); G = a.p.keyIndex === false?a.p.jsonReader.id:
-                        a.p.keyIndex; if (r.length > 0 && !isNaN(G)){if (a.p.remapColumns && a.p.remapColumns.length)G = b.inArray(G, a.p.remapColumns); G = r[G]}if (P = U(c, a.p.jsonReader.root)){L = P.length; c = 0; var ga = parseInt(a.p.rowNum, 10), ha = a.p.scroll?(parseInt(a.p.page, 10) - 1) * ga + 1:1; if (n)ga *= n + 1; for (var O = b.isFunction(a.p.afterInsertRow); c < L; ){n = P[c]; B = U(n, G); if (B === undefined){B = ha + c; if (r.length === 0)if (a.p.jsonReader.cell)B = n[a.p.jsonReader.cell][G] || B}w = e === 0?0:e + 1; w = (w + c) % 2 == 1?S:""; s[E++] = '<tr id="' + B + '" role="row" class= "ui-widget-content jqgrow ui-row-' +
-                        a.p.direction + "" + w + '">'; if (a.p.rownumbers === true){s[E++] = la(0, c, a.p.page, a.p.rowNum); N = 1}if (a.p.multiselect){s[E++] = u(B, N, c); z = 1}if (a.p.subGrid){s[E++] = b(a).jqGrid("addSubGridCell", z + N, c + e); D = 1}if (a.p.jsonReader.repeatitems){if (a.p.jsonReader.cell)n = U(n, a.p.jsonReader.cell); v || (v = fa(z + D + N))}for (y = 0; y < v.length; y++){w = U(n, v[y]); s[E++] = R(B, w, y + z + D + N, c + e, n); da[a.p.colModel[y + z + D + N].name] = w}s[E++] = "</tr>"; if (a.p.gridview === false){if (a.p.treeGrid === true){E = a.p.treeANode >= - 1?a.p.treeANode:0; s = b(s.join(""))[0];
-                        try{b(a).jqGrid("setTreeNode", da, s)} catch (ma){}W === 0?b("tbody:first", d).append(s):b(a.rows[c + E + e]).after(s)} else b("tbody:first", d).append(s.join("")); if (a.p.subGrid === true)try{b(a).jqGrid("addSubGrid", a.rows[a.rows.length - 1], z + N)} catch (wa){}O && a.p.afterInsertRow.call(a, B, da, n); s = []; E = 0}da = {}; p++; c++; if (p == ga)break}a.p.gridview === true && b("tbody:first", d).append(s.join("")); a.p.totaltime = new Date - o; if (p > 0){a.grid.cols = a.rows[0].cells; if (a.p.records === 0)a.p.records = L}}if (!a.p.treeGrid && !a.p.scroll)a.grid.bDiv.scrollTop =
-                        0; a.p.reccount = p; a.p.treeANode = - 1; a.p.userDataOnFooter && b(a).jqGrid("footerData", "set", a.p.userData, true); l || na(false, true)}}, na = function(c, d){var e, l, n, o, p, w, y, s = ""; n = parseInt(a.p.page, 10) - 1; if (n < 0)n = 0; n *= parseInt(a.p.rowNum, 10); p = n + a.p.reccount; if (a.p.scroll){e = b("tbody:first > tr", a.grid.bDiv); n = p - e.length; if (l = e.outerHeight()){e = n * l; l = parseInt(a.p.records, 10) * l; b(">div:first", a.grid.bDiv).css({height:l}).children("div:first").css({height:e, display:e?"":"none"})}}s = a.p.pager?a.p.pager:""; s += a.p.toppager?
-                s?"," + a.p.toppager:a.p.toppager:""; if (s){y = b.jgrid.formatter.integer || {}; if (a.p.loadonce){e = l = 1; a.p.lastpage = a.page = 1; b(".selbox", s).attr("disabled", true)} else{e = J(a.p.page); l = J(a.p.lastpage); b(".selbox", s).attr("disabled", false)}if (a.p.pginput === true){b(".ui-pg-input", s).val(a.p.page); b("#sp_1", s).html(b.fmatter?b.fmatter.util.NumberFormat(a.p.lastpage, y):a.p.lastpage)}if (a.p.viewrecords)if (a.p.reccount === 0)b(".ui-paging-info", s).html(a.p.emptyrecords); else{o = n + 1; w = a.p.records; if (b.fmatter){o = b.fmatter.util.NumberFormat(o,
-                y); p = b.fmatter.util.NumberFormat(p, y); w = b.fmatter.util.NumberFormat(w, y)}b(".ui-paging-info", s).html(b.jgrid.format(a.p.recordtext, o, p, w))}if (a.p.pgbuttons === true){if (e <= 0)e = l = 0; if (e == 1 || e === 0){b("#first, #prev", a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover"); a.p.toppager && b("#first_t, #prev_t", a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")} else{b("#first, #prev", a.p.pager).removeClass("ui-state-disabled"); a.p.toppager && b("#first_t, #prev_t", a.p.toppager).removeClass("ui-state-disabled")}if (e ==
-                l || e === 0){b("#next, #last", a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover"); a.p.toppager && b("#next_t, #last_t", a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")} else{b("#next, #last", a.p.pager).removeClass("ui-state-disabled"); a.p.toppager && b("#next_t, #last_t", a.p.toppager).removeClass("ui-state-disabled")}}}c === true && a.p.rownumbers === true && b("td.jqgrid-rownum", a.rows).each(function(r){b(this).html(n + 1 + r)}); d && a.p.jqgdnd && b(a).jqGrid("gridDnD", "updateDnD");
-                b.isFunction(a.p.gridComplete) && a.p.gridComplete.call(a)}, Y = function(c){if (!a.grid.hDiv.loading){var d = a.p.scroll && c === false, e = {}, l, n = a.p.prmNames; if (a.p.page <= 0)a.p.page = 1; if (n.search !== null)e[n.search] = a.p.search; if (n.nd !== null)e[n.nd] = (new Date).getTime(); if (n.rows !== null)e[n.rows] = a.p.rowNum; if (n.page !== null)e[n.page] = a.p.page; if (n.sort !== null)e[n.sort] = a.p.sortname; if (n.order !== null)e[n.order] = a.p.sortorder; var o = a.p.loadComplete, p = b.isFunction(o); p || (o = null); var w = 0; c = c || 1; if (c > 1)if (n.npage !==
-                null){e[n.npage] = c; w = c - 1; c = 1} else o = function(s){p && a.p.loadComplete.call(a, s); a.grid.hDiv.loading = false; a.p.page++; Y(c - 1)}; else n.npage !== null && delete a.p.postData[n.npage]; b.extend(a.p.postData, e); var y = !a.p.scroll?0:a.rows.length - 1; if (b.isFunction(a.p.datatype))a.p.datatype.call(a, a.p.postData, "load_" + a.p.id); else{b.isFunction(a.p.beforeRequest) && a.p.beforeRequest.call(a); l = a.p.datatype.toLowerCase(); switch (l){case "json":case "jsonp":case "xml":case "script":b.ajax(b.extend({url:a.p.url, type:a.p.mtype,
-                dataType:l, data:b.isFunction(a.p.serializeGridData)?a.p.serializeGridData.call(a, a.p.postData):a.p.postData, success:function(s){l === "xml"?ia(s, a.grid.bDiv, y, c > 1, w):ra(s, a.grid.bDiv, y, c > 1, w); o && o.call(a, s); d && a.grid.populateVisible(); if (a.p.loadonce || a.p.treeGrid)a.p.datatype = "local"; ja()}, error:function(s, r, v){b.isFunction(a.p.loadError) && a.p.loadError.call(a, s, r, v); ja()}, beforeSend:function(s){oa(); b.isFunction(a.p.loadBeforeSend) && a.p.loadBeforeSend.call(a, s)}}, b.jgrid.ajaxOptions, a.p.ajaxGridOptions));
-                break; case "xmlstring":oa(); e = b.jgrid.stringToDoc(a.p.datastr); p && a.p.loadComplete.call(a, e); ia(e, a.grid.bDiv); a.p.datatype = "local"; a.p.datastr = null; ja(); break; case "jsonstring":oa(); e = typeof a.p.datastr == "string"?b.jgrid.parse(a.p.datastr):a.p.datastr; p && a.p.loadComplete.call(a, e); ra(e, a.grid.bDiv); a.p.datatype = "local"; a.p.datastr = null; ja(); break; case "local":case "clientside":oa(); a.p.datatype = "local"; p && a.p.loadComplete.call(a, ""); Aa(); na(true, true); ja(); break}}}}, oa = function(){a.grid.hDiv.loading =
-                true; if (!a.p.hiddengrid)switch (a.p.loadui){case "disable":break; case "enable":b("#load_" + a.p.id).show(); break; case "block":b("#lui_" + a.p.id).show(); b("#load_" + a.p.id).show(); break}}, ja = function(){a.grid.hDiv.loading = false; switch (a.p.loadui){case "disable":break; case "enable":b("#load_" + a.p.id).hide(); break; case "block":b("#lui_" + a.p.id).hide(); b("#load_" + a.p.id).hide(); break}}, Aa = function(){var c = /[\$,%]/g, d = [], e = 0, l, n, o, p = a.p.sortorder == "asc"?1: - 1, w = false, y; b.each(a.p.colModel, function(r){if (this.index ==
-                a.p.sortname || this.name == a.p.sortname){if (a.p.lastsort == r)w = true; e = r; l = this.sorttype; return false}}); o = l == "float" || l == "number" || l == "currency"?function(r){r = parseFloat(r.replace(c, "")); return isNaN(r)?0:r}:l == "int" || l == "integer"?function(r){return J(r.replace(c, ""), 0)}:l == "date" || l == "datetime"?function(r){return Ba(a.p.colModel[e].datefmt || "Y-m-d", r).getTime()}:b.isFunction(l)?l:function(r){return b.trim(r.toUpperCase())}; y = a.p.colModel[e]; b.each(a.rows, function(r, v){try{n = b.unformat(b(v).children("td").eq(e),
-        {rowId:v.id, colModel:y}, e, true)} catch (z){n = b(v).children("td").eq(e).text()}v.sortKey = o(n); d[r] = this}); if (a.p.treeGrid)b(a).jqGrid("SortTree", p); else{w?d.reverse():d.sort(function(r, v){if (r.sortKey < v.sortKey)return - p; if (r.sortKey > v.sortKey)return p; return 0}); if (d[0]){b("td", d[0]).each(function(r){b(this).css("width", g.headers[r].width + "px")}); a.grid.cols = d[0].cells}var s = ""; if (a.p.altRows)s = a.p.altclass; b.each(d, function(r, v){if (s)r % 2 == 1?b(v).addClass(s):b(v).removeClass(s); b("tbody", a.grid.bDiv).append(v);
-                v.sortKey = null})}a.grid.bDiv.scrollTop = 0}, Ba = function(c, d){var e = {m:1, d:1, y:1970, h:0, i:0, s:0}, l, n, o; if (d = b.trim(d)){d = d.split(/[\\\/:_;.\t\T\s-]/); c = c.split(/[\\\/:_;.\t\T\s-]/); var p = b.jgrid.formatter.date.monthNames, w = b.jgrid.formatter.date.AmPm, y = function(s, r){if (s === 0){if (r == 12)r = 0} else if (r != 12)r += 12; return r}; l = 0; for (n = c.length; l < n; l++){if (c[l] == "M"){o = b.inArray(d[l], p); if (o !== - 1 && o < 12)d[l] = o + 1}if (c[l] == "F"){o = b.inArray(d[l], p); if (o !== - 1 && o > 11)d[l] = o + 1 - 12}if (c[l] == "a"){o = b.inArray(d[l], w); if (o !==
-                - 1 && o < 2 && d[l] == w[o]){d[l] = o; e.h = y(d[l], e.h)}}if (c[l] == "A"){o = b.inArray(d[l], w); if (o !== - 1 && o > 1 && d[l] == w[o]){d[l] = o - 2; e.h = y(d[l], e.h)}}e[c[l].toLowerCase()] = parseInt(d[l], 10)}e.m = parseInt(e.m, 10) - 1; c = e.y; if (c >= 70 && c <= 99)e.y = 1900 + e.y; else if (c >= 0 && c <= 69)e.y = 2E3 + e.y}return new Date(e.y, e.m, e.d, e.h, e.i, e.s, 0)}; t = function(c, d){var e = "", l = "<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>", n = "", o, p, w, y, s = function(r){var v; if (b.isFunction(a.p.onPaging))v =
-                a.p.onPaging.call(a, r); a.p.selrow = null; if (a.p.multiselect){a.p.selarrrow = []; b("#cb_" + b.jgrid.jqID(a.p.id), a.grid.hDiv).attr("checked", false)}a.p.savedRow = []; if (v == "stop")return false; return true}; c = c.substr(1); o = "pg_" + c; p = c + "_left"; w = c + "_center"; y = c + "_right"; b("#" + c).append("<div id='" + o + "' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;' role='row'><tbody><tr><td id='" + p + "' align='left'></td><td id='" +
-                w + "' align='center' style='white-space:pre;'></td><td id='" + y + "' align='right'></td></tr></tbody></table></div>").attr("dir", "ltr"); if (a.p.rowList.length > 0){n = "<td dir='" + m + "'>"; n += "<select class='ui-pg-selbox' role='listbox'>"; for (p = 0; p < a.p.rowList.length; p++)n += "<option role='option' value='" + a.p.rowList[p] + "'" + (a.p.rowNum == a.p.rowList[p]?" selected":"") + ">" + a.p.rowList[p] + "</option>"; n += "</select></td>"}if (m == "rtl")l += n; if (a.p.pginput === true)e = "<td dir='" + m + "'>" + b.jgrid.format(a.p.pgtext || "", "<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>",
-                "<span id='sp_1'></span>") + "</td>"; if (a.p.pgbuttons === true){p = ["first" + d, "prev" + d, "next" + d, "last" + d]; m == "rtl" && p.reverse(); l += "<td id='" + p[0] + "' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>"; l += "<td id='" + p[1] + "' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>"; l += e != ""?"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>" + e + "<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>":
-                ""; l += "<td id='" + p[2] + "' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>"; l += "<td id='" + p[3] + "' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>"} else if (e != "")l += e; if (m == "ltr")l += n; l += "</tr></tbody></table>"; a.p.viewrecords === true && b("td#" + c + "_" + a.p.recordpos, "#" + o).append("<div dir='" + m + "' style='text-align:" + a.p.recordpos + "' class='ui-paging-info'></div>"); b("td#" + c + "_" + a.p.pagerpos, "#" + o).append(l); n = b(".ui-jqgrid").css("font-size") ||
-                "11px"; b("body").append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:" + n + ";visibility:hidden;' ></div>"); l = b(l).clone().appendTo("#testpg").width(); b("#testpg").remove(); if (l > 0){if (e != "")l += 50; b("td#" + c + "_" + a.p.pagerpos, "#" + o).width(l)}a.p._nvtd = []; a.p._nvtd[0] = l?Math.floor((a.p.width - l) / 2):Math.floor(a.p.width / 3); a.p._nvtd[1] = 0; l = null; b(".ui-pg-selbox", "#" + o).bind("change", function(){a.p.page = Math.round(a.p.rowNum * (a.p.page - 1) / this.value - 0.5) + 1; a.p.rowNum = this.value;
-                if (d)b(".ui-pg-selbox", a.p.pager).val(this.value); else a.p.toppager && b(".ui-pg-selbox", a.p.toppager).val(this.value); if (!s("records"))return false; Y(); return false}); if (a.p.pgbuttons === true){b(".ui-pg-button", "#" + o).hover(function(){if (b(this).hasClass("ui-state-disabled"))this.style.cursor = "default"; else{b(this).addClass("ui-state-hover"); this.style.cursor = "pointer"}}, function(){if (!b(this).hasClass("ui-state-disabled")){b(this).removeClass("ui-state-hover"); this.style.cursor = "default"}}); b("#first" +
-                d + ", #prev" + d + ", #next" + d + ", #last" + d, "#" + c).click(function(){var r = J(a.p.page, 1), v = J(a.p.lastpage, 1), z = false, D = true, N = true, L = true, P = true; if (v === 0 || v === 1)P = L = N = D = false; else if (v > 1 && r >= 1)if (r === 1)N = D = false; else{if (!(r > 1 && r < v))if (r === v)P = L = false} else if (v > 1 && r === 0){P = L = false; r = v - 1}if (this.id === "first" + d && D){a.p.page = 1; z = true}if (this.id === "prev" + d && N){a.p.page = r - 1; z = true}if (this.id === "next" + d && L){a.p.page = r + 1; z = true}if (this.id === "last" + d && P){a.p.page = v; z = true}if (z){if (!s(this.id))return false; Y()}return false})}a.p.pginput ===
-                true && b("input.ui-pg-input", "#" + o).keypress(function(r){if ((r.charCode?r.charCode:r.keyCode?r.keyCode:0) == 13){a.p.page = b(this).val() > 0?b(this).val():a.p.page; if (!s("user"))return false; Y(); return false}return this})}; var xa = function(c, d, e, l){if (a.p.colModel[d].sortable)if (!(a.p.savedRow.length > 0)){if (!e){if (a.p.lastsort == d)if (a.p.sortorder == "asc")a.p.sortorder = "desc"; else{if (a.p.sortorder == "desc")a.p.sortorder = "asc"} else a.p.sortorder = a.p.colModel[d].firstsortorder || "asc"; a.p.page = 1}if (l)if (a.p.lastsort ==
-                d && a.p.sortorder == l && !e)return; else a.p.sortorder = l; e = b("thead:first", a.grid.hDiv).get(0); b("tr th:eq(" + a.p.lastsort + ") span.ui-grid-ico-sort", e).addClass("ui-state-disabled"); b("tr th:eq(" + a.p.lastsort + ")", e).attr("aria-selected", "false"); b("tr th:eq(" + d + ") span.ui-icon-" + a.p.sortorder, e).removeClass("ui-state-disabled"); b("tr th:eq(" + d + ")", e).attr("aria-selected", "true"); if (!a.p.viewsortcols[0])if (a.p.lastsort != d){b("tr th:eq(" + a.p.lastsort + ") span.s-ico", e).hide(); b("tr th:eq(" + d + ") span.s-ico",
-                e).show()}c = c.substring(5); a.p.sortname = a.p.colModel[d].index || c; e = a.p.sortorder; if (b.isFunction(a.p.onSortCol))if (a.p.onSortCol.call(a, c, d, e) == "stop"){a.p.lastsort = d; return}if (a.p.datatype == "local")a.p.deselectAfterSort && b(a).jqGrid("resetSelection"); else{a.p.selrow = null; a.p.multiselect && b("#cb_" + b.jgrid.jqID(a.p.id), a.grid.hDiv).attr("checked", false); a.p.selarrrow = []; a.p.savedRow = []; a.p.scroll && aa(a.grid.bDiv, true)}a.p.subGrid && a.p.datatype == "local" && b("td.sgexpanded", "#" + a.p.id).each(function(){b(this).trigger("click")});
-                Y(); a.p.lastsort = d; if (a.p.sortname != c && d)a.p.lastsort = d}}, Ca = function(c){var d = c, e; for (e = c + 1; e < a.p.colModel.length; e++)if (a.p.colModel[e].hidden !== true){d = e; break}return d - c}, Da = function(c){var d, e = {}, l = C?0:a.p.cellLayout; for (d = e[0] = e[1] = e[2] = 0; d <= c; d++)if (a.p.colModel[d].hidden === false)e[0] += a.p.colModel[d].width + l; if (a.p.direction == "rtl")e[0] = a.p.width - e[0]; e[0] -= a.grid.bDiv.scrollLeft; if (b(a.grid.cDiv).is(":visible"))e[1] += b(a.grid.cDiv).height() + parseInt(b(a.grid.cDiv).css("padding-top"), 10) +
-                parseInt(b(a.grid.cDiv).css("padding-bottom"), 10); if (a.p.toolbar[0] === true && (a.p.toolbar[1] == "top" || a.p.toolbar[1] == "both"))e[1] += b(a.grid.uDiv).height() + parseInt(b(a.grid.uDiv).css("border-top-width"), 10) + parseInt(b(a.grid.uDiv).css("border-bottom-width"), 10); if (a.p.toppager)e[1] += b(a.grid.topDiv).height() + parseInt(b(a.grid.topDiv).css("border-bottom-width"), 10); e[2] += b(a.grid.bDiv).height() + b(a.grid.hDiv).height(); return e}; this.p.id = this.id; if (b.inArray(a.p.multikey, ["shiftKey", "altKey", "ctrlKey"]) ==
-                - 1)a.p.multikey = false; a.p.keyIndex = false; for (j = 0; j < a.p.colModel.length; j++)if (a.p.colModel[j].key === true){a.p.keyIndex = j; break}a.p.sortorder = a.p.sortorder.toLowerCase(); if (this.p.treeGrid === true)try{b(this).jqGrid("setTreeGrid")} catch (Ha){}if (this.p.subGrid)try{b(a).jqGrid("setSubGrid")} catch (Ia){}if (this.p.multiselect){this.p.colNames.unshift("<input role='checkbox' id='cb_" + this.p.id + "' class='cbox' type='checkbox'/>"); this.p.colModel.unshift({name:"cb", width:C?a.p.multiselectWidth + a.p.cellLayout:
-                a.p.multiselectWidth, sortable:false, resizable:false, hidedlg:true, search:false, align:"center", fixed:true})}if (this.p.rownumbers){this.p.colNames.unshift(""); this.p.colModel.unshift({name:"rn", width:a.p.rownumWidth, sortable:false, resizable:false, hidedlg:true, search:false, align:"center", fixed:true})}a.p.xmlReader = b.extend(true, {root:"rows", row:"row", page:"rows>page", total:"rows>total", records:"rows>records", repeatitems:true, cell:"cell", id:"[id]", userdata:"userdata", subgrid:{root:"rows", row:"row", repeatitems:true,
-                cell:"cell"}}, a.p.xmlReader); a.p.jsonReader = b.extend(true, {root:"rows", page:"page", total:"total", records:"records", repeatitems:true, cell:"cell", id:"id", userdata:"userdata", subgrid:{root:"rows", repeatitems:true, cell:"cell"}}, a.p.jsonReader); if (a.p.scroll){a.p.pgbuttons = false; a.p.pginput = false; a.p.rowList = []}var H = "<thead><tr class='ui-jqgrid-labels' role='rowheader'>", ya, ba, sa, ka, pa, I, A, ea; ba = ea = ""; if (a.p.shrinkToFit === true && a.p.forceFit === true)for (j = a.p.colModel.length - 1; j >= 0; j--)if (!a.p.colModel[j].hidden){a.p.colModel[j].resizable =
-                false; break}if (a.p.viewsortcols[1] == "horizontal"){ea = " ui-i-asc"; ba = " ui-i-desc"}ya = x?"class='ui-th-div-ie'":""; ea = "<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc" + ea + " ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-" + m + "'></span>"; ea += "<span sort='desc' class='ui-grid-ico-sort ui-icon-desc" + ba + " ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-" + m + "'></span></span>"; for (j = 0; j < this.p.colNames.length; j++){ba = a.p.headertitles?' title="' + b.jgrid.stripHtml(a.p.colNames[j]) +
-                '"':""; H += "<th id='" + a.p.id + "_" + a.p.colModel[j].name + "' role='columnheader' class='ui-state-default ui-th-column ui-th-" + m + "'" + ba + ">"; ba = a.p.colModel[j].index || a.p.colModel[j].name; H += "<div id='jqgh_" + a.p.colModel[j].name + "' " + ya + ">" + a.p.colNames[j]; a.p.colModel[j].width = a.p.colModel[j].width?parseInt(a.p.colModel[j].width, 10):150; if (typeof a.p.colModel[j].title !== "boolean")a.p.colModel[j].title = true; if (ba == a.p.sortname)a.p.lastsort = j; H += ea + "</div></th>"}H += "</tr></thead>"; b(this).append(H); b("thead tr:first th",
-                this).hover(function(){b(this).addClass("ui-state-hover")}, function(){b(this).removeClass("ui-state-hover")}); if (this.p.multiselect){var ta = [], qa; b("#cb_" + b.jgrid.jqID(a.p.id), this).bind("click", function(){if (this.checked){b("[id^=jqg_]", a.rows).attr("checked", true); b(a.rows).each(function(c){if (!b(this).hasClass("subgrid")){b(this).addClass("ui-state-highlight").attr("aria-selected", "true"); a.p.selarrrow[c] = a.p.selrow = this.id}}); qa = true; ta = []} else{b("[id^=jqg_]", a.rows).attr("checked", false); b(a.rows).each(function(c){if (!b(this).hasClass("subgrid")){b(this).removeClass("ui-state-highlight").attr("aria-selected",
-                "false"); ta[c] = this.id}}); a.p.selarrrow = []; a.p.selrow = null; qa = false}if (b.isFunction(a.p.onSelectAll))a.p.onSelectAll.call(a, qa?a.p.selarrrow:ta, qa)})}if (a.p.autowidth === true){H = b(K).innerWidth(); a.p.width = H > 0?H:"nw"}(function(){var c = 0, d = a.p.cellLayout, e = 0, l, n = a.p.scrollOffset, o, p = false, w, y = 0, s = 0, r = 0, v; if (C)d = 0; b.each(a.p.colModel, function(){if (typeof this.hidden === "undefined")this.hidden = false; if (this.hidden === false){c += J(this.width, 0); if (this.fixed){y += this.width; s += this.width + d} else e++; r++}});
-                if (isNaN(a.p.width))a.p.width = g.width = c; else g.width = a.p.width; a.p.tblwidth = c; if (a.p.shrinkToFit === false && a.p.forceFit === true)a.p.forceFit = false; if (a.p.shrinkToFit === true && e > 0){w = g.width - d * e - s; if (!isNaN(a.p.height)){w -= n; p = true}c = 0; b.each(a.p.colModel, function(z){if (this.hidden === false && !this.fixed){this.width = o = Math.round(w * this.width / (a.p.tblwidth - y)); c += o; l = z}}); v = 0; if (p){if (g.width - s - (c + d * e) !== n)v = g.width - s - (c + d * e) - n} else if (!p && Math.abs(g.width - s - (c + d * e)) !== 1)v = g.width - s - (c + d * e); a.p.colModel[l].width +=
-                v; a.p.tblwidth = c + v + y + r * d; if (a.p.tblwidth > a.p.width){a.p.colModel[l].width -= a.p.tblwidth - parseInt(a.p.width, 10); a.p.tblwidth = a.p.width}}})(); b(K).css("width", g.width + "px").append("<div class='ui-jqgrid-resize-mark' id='rs_m" + a.p.id + "'>&#160;</div>"); b(q).css("width", g.width + "px"); H = b("thead:first", a).get(0); var ua = "<table role='grid' style='width:" + a.p.tblwidth + "px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-" +
-                m + "'>"; q = b("tr:first", H); a.p.disableClick = false; b("th", q).each(function(c){sa = a.p.colModel[c].width; if (typeof a.p.colModel[c].resizable === "undefined")a.p.colModel[c].resizable = true; if (a.p.colModel[c].resizable){ka = document.createElement("span"); b(ka).html("&#160;").addClass("ui-jqgrid-resize ui-jqgrid-resize-" + m); b.browser.opera || b(ka).css("cursor", "col-resize"); b(this).addClass(a.p.resizeclass)} else ka = ""; b(this).css("width", sa + "px").prepend(ka); a.p.colModel[c].hidden && b(this).css("display", "none");
-                g.headers[c] = {width:sa, el:this}; pa = a.p.colModel[c].sortable; if (typeof pa !== "boolean")pa = a.p.colModel[c].sortable = true; var d = a.p.colModel[c].name; d == "cb" || d == "subgrid" || d == "rn" || a.p.viewsortcols[2] && b("div", this).addClass("ui-jqgrid-sortable"); if (pa)if (a.p.viewsortcols[0]){b("div span.s-ico", this).show(); c == a.p.lastsort && b("div span.ui-icon-" + a.p.sortorder, this).removeClass("ui-state-disabled")} else if (c == a.p.lastsort){b("div span.s-ico", this).show(); b("div span.ui-icon-" + a.p.sortorder, this).removeClass("ui-state-disabled")}ua +=
-                "<td role='gridcell' " + F(c, 0, "") + ">&#160;</td>"}).mousedown(function(c){if (b(c.target).closest("th>span.ui-jqgrid-resize").length == 1){var d = b.jgrid.getCellIndex(this); if (a.p.forceFit === true)a.p.nv = Ca(d); g.dragStart(d, c, Da(d)); return false}}).click(function(c){if (a.p.disableClick)return a.p.disableClick = false; var d = "th>div.ui-jqgrid-sortable", e, l; a.p.viewsortcols[2] || (d = "th>div>span>span.ui-grid-ico-sort"); c = b(c.target).closest(d); if (c.length == 1){d = b.jgrid.getCellIndex(this); if (!a.p.viewsortcols[2]){e =
-                true; l = c.attr("sort")}xa(b("div", this)[0].id, d, e, l); return false}}); if (a.p.sortable && b.fn.sortable)try{b(a).jqGrid("sortableColumns", q)} catch (Ja){}ua += "</tr></tbody></table>"; this.appendChild(document.createElement("tbody")); b(this).addClass("ui-jqgrid-btable"); q = b("<table class='ui-jqgrid-htable' style='width:" + a.p.tblwidth + "px' role='grid' aria-labelledby='gbox_" + this.id + "' cellspacing='0' cellpadding='0' border='0'></table>").append(H); var T = a.p.caption && a.p.hiddengrid === true?true:false; H = b("<div class='ui-jqgrid-hbox" +
-                (m == "rtl"?"-rtl":"") + "'></div>"); g.hDiv = document.createElement("div"); b(g.hDiv).css({width:g.width + "px"}).addClass("ui-state-default ui-jqgrid-hdiv").append(H); b(H).append(q); T && b(g.hDiv).hide(); if (a.p.pager){if (typeof a.p.pager == "string"){if (a.p.pager.substr(0, 1) != "#")a.p.pager = "#" + a.p.pager} else a.p.pager = "#" + b(a.p.pager).attr("id"); b(a.p.pager).css({width:g.width + "px"}).appendTo(K).addClass("ui-state-default ui-jqgrid-pager ui-corner-bottom"); T && b(a.p.pager).hide(); t(a.p.pager, "")}a.p.cellEdit ===
-                false && a.p.hoverrows === true && b(a).bind("mouseover", function(c){A = b(c.target).closest("tr.jqgrow"); b(A).attr("class") !== "subgrid" && b(A).addClass("ui-state-hover"); return false}).bind("mouseout", function(c){A = b(c.target).closest("tr.jqgrow"); b(A).removeClass("ui-state-hover"); return false}); var Z, $; b(a).before(g.hDiv).click(function(c){I = c.target; var d = b(I).hasClass("cbox"); A = b(I, a.rows).closest("tr.jqgrow"); if (b(A).length === 0)return this; var e = true; if (b.isFunction(a.p.beforeSelectRow))e = a.p.beforeSelectRow.call(a,
-                A[0].id, c); if (I.tagName == "A" || (I.tagName == "INPUT" || I.tagName == "TEXTAREA" || I.tagName == "OPTION" || I.tagName == "SELECT") && !d)return this; if (e === true){if (a.p.cellEdit === true)if (a.p.multiselect && d)b(a).jqGrid("setSelection", A[0].id, true); else{Z = A[0].rowIndex; $ = b.jgrid.getCellIndex(I); try{b(a).jqGrid("editCell", Z, $, true)} catch (l){}} else if (a.p.multikey)if (c[a.p.multikey])b(a).jqGrid("setSelection", A[0].id, true); else{if (a.p.multiselect && d){d = b("[id^=jqg_]", A).attr("checked"); b("[id^=jqg_]", A).attr("checked",
-                !d)}} else{if (a.p.multiselect && a.p.multiboxonly)if (!d){b(a.p.selarrrow).each(function(n, o){n = a.rows.namedItem(o); b(n).removeClass("ui-state-highlight"); b("#jqg_" + b.jgrid.jqID(o), n).attr("checked", false)}); a.p.selarrrow = []; b("#cb_" + b.jgrid.jqID(a.p.id), a.grid.hDiv).attr("checked", false)}b(a).jqGrid("setSelection", A[0].id, true)}if (b.isFunction(a.p.onCellSelect)){Z = A[0].id; $ = b.jgrid.getCellIndex(I); a.p.onCellSelect.call(a, Z, $, b(I).html(), c)}c.stopPropagation()} else return this}).bind("reloadGrid", function(c,
-                d){if (a.p.treeGrid === true)a.p.datatype = a.p.treedatatype; d && d.current && a.grid.selectionPreserver(a); if (a.p.datatype == "local")b(a).jqGrid("resetSelection"); else if (!a.p.treeGrid){a.p.selrow = null; if (a.p.multiselect){a.p.selarrrow = []; b("#cb_" + b.jgrid.jqID(a.p.id), a.grid.hDiv).attr("checked", false)}a.p.savedRow = []; a.p.scroll && aa(a.grid.bDiv, true)}if (d && d.page){c = d.page; if (c > a.p.lastpage)c = a.p.lastpage; if (c < 1)c = 1; a.p.page = c; a.grid.bDiv.scrollTop = a.grid.prevRowHeight?(c - 1) * a.grid.prevRowHeight * a.p.rowNum:
-                0}if (a.grid.prevRowHeight && a.p.scroll){delete a.p.lastpage; a.grid.populateVisible()} else a.grid.populate(); return false}); b.isFunction(this.p.ondblClickRow) && b(this).dblclick(function(c){I = c.target; A = b(I, a.rows).closest("tr.jqgrow"); if (b(A).length === 0)return false; Z = A[0].rowIndex; $ = b.jgrid.getCellIndex(I); a.p.ondblClickRow.call(a, b(A).attr("id"), Z, $, c); return false}); b.isFunction(this.p.onRightClickRow) && b(this).bind("contextmenu", function(c){I = c.target; A = b(I, a.rows).closest("tr.jqgrow"); if (b(A).length ===
-                0)return false; a.p.multiselect || b(a).jqGrid("setSelection", A[0].id, true); Z = A[0].rowIndex; $ = b.jgrid.getCellIndex(I); a.p.onRightClickRow.call(a, b(A).attr("id"), Z, $, c); return false}); g.bDiv = document.createElement("div"); b(g.bDiv).append(b('<div style="position:relative;' + (x && b.browser.version < 8?"height:0.01%;":"") + '"></div>').append("<div></div>").append(this)).addClass("ui-jqgrid-bdiv").css({height:a.p.height + (isNaN(a.p.height)?"":"px"), width:g.width + "px"}).scroll(g.scrollGrid); b("table:first", g.bDiv).css({width:a.p.tblwidth +
-                "px"}); if (x){b("tbody", this).size() == 2 && b("tbody:first", this).remove(); a.p.multikey && b(g.bDiv).bind("selectstart", function(){return false})} else a.p.multikey && b(g.bDiv).bind("mousedown", function(){return false}); T && b(g.bDiv).hide(); g.cDiv = document.createElement("div"); var va = a.p.hidegrid === true?b("<a role='link' href='javascript:void(0)'/>").addClass("ui-jqgrid-titlebar-close HeaderButton").hover(function(){va.addClass("ui-state-hover")}, function(){va.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css(m ==
-                "rtl"?"left":"right", "0px"):""; b(g.cDiv).append(va).append("<span class='ui-jqgrid-title" + (m == "rtl"?"-rtl":"") + "'>" + a.p.caption + "</span>").addClass("ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"); b(g.cDiv).insertBefore(g.hDiv); if (a.p.toolbar[0]){g.uDiv = document.createElement("div"); if (a.p.toolbar[1] == "top")b(g.uDiv).insertBefore(g.hDiv); else a.p.toolbar[1] == "bottom" && b(g.uDiv).insertAfter(g.hDiv); if (a.p.toolbar[1] == "both"){g.ubDiv = document.createElement("div"); b(g.uDiv).insertBefore(g.hDiv).addClass("ui-userdata ui-state-default").attr("id",
-                "t_" + this.id); b(g.ubDiv).insertAfter(g.hDiv).addClass("ui-userdata ui-state-default").attr("id", "tb_" + this.id); T && b(g.ubDiv).hide()} else b(g.uDiv).width(g.width).addClass("ui-userdata ui-state-default").attr("id", "t_" + this.id); T && b(g.uDiv).hide()}if (a.p.toppager){a.p.toppager = a.p.id + "_toppager"; g.topDiv = b("<div id='" + a.p.toppager + "'></div>")[0]; a.p.toppager = "#" + a.p.toppager; b(g.topDiv).insertBefore(g.hDiv).addClass("ui-state-default ui-jqgrid-toppager").width(g.width); t(a.p.toppager, "_t")}if (a.p.footerrow){g.sDiv =
-                b("<div class='ui-jqgrid-sdiv'></div>")[0]; H = b("<div class='ui-jqgrid-hbox" + (m == "rtl"?"-rtl":"") + "'></div>"); b(g.sDiv).append(H).insertAfter(g.hDiv).width(g.width); b(H).append(ua); g.footers = b(".ui-jqgrid-ftable", g.sDiv)[0].rows[0].cells; if (a.p.rownumbers)g.footers[0].className = "ui-state-default jqgrid-rownum"; T && b(g.sDiv).hide()}if (a.p.caption){var Ea = a.p.datatype; if (a.p.hidegrid === true){b(".ui-jqgrid-titlebar-close", g.cDiv).click(function(c){var d = b.isFunction(a.p.onHeaderClick); if (a.p.gridstate ==
-                "visible"){b(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv", "#gview_" + a.p.id).slideUp("fast"); a.p.pager && b(a.p.pager).slideUp("fast"); a.p.toppager && b(a.p.toppager).slideUp("fast"); if (a.p.toolbar[0] === true){a.p.toolbar[1] == "both" && b(g.ubDiv).slideUp("fast"); b(g.uDiv).slideUp("fast")}a.p.footerrow && b(".ui-jqgrid-sdiv", "#gbox_" + a.p.id).slideUp("fast"); b("span", this).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s"); a.p.gridstate = "hidden"; b("#gbox_" + a.p.id).hasClass("ui-resizable") &&
-                b(".ui-resizable-handle", "#gbox_" + a.p.id).hide(); if (d)T || a.p.onHeaderClick.call(a, a.p.gridstate, c)} else if (a.p.gridstate == "hidden"){b(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv", "#gview_" + a.p.id).slideDown("fast"); a.p.pager && b(a.p.pager).slideDown("fast"); a.p.toppager && b(a.p.toppager).slideDown("fast"); if (a.p.toolbar[0] === true){a.p.toolbar[1] == "both" && b(g.ubDiv).slideDown("fast"); b(g.uDiv).slideDown("fast")}a.p.footerrow && b(".ui-jqgrid-sdiv", "#gbox_" + a.p.id).slideDown("fast"); b("span", this).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");
-                if (T){a.p.datatype = Ea; Y(); T = false}a.p.gridstate = "visible"; b("#gbox_" + a.p.id).hasClass("ui-resizable") && b(".ui-resizable-handle", "#gbox_" + a.p.id).show(); d && a.p.onHeaderClick.call(a, a.p.gridstate, c)}return false}); if (T){a.p.datatype = "local"; b(".ui-jqgrid-titlebar-close", g.cDiv).trigger("click")}}} else b(g.cDiv).hide(); b(g.hDiv).after(g.bDiv).mousemove(function(c){if (g.resizing){g.dragMove(c); return false}}); b(".ui-jqgrid-labels", g.hDiv).bind("selectstart", function(){return false}); b(document).mouseup(function(){if (g.resizing){g.dragEnd();
-                return false}return true}); this.updateColumns = function(){var c = this.rows[0], d = this; if (c){b("td", c).each(function(e){b(this).css("width", d.grid.headers[e].width + "px")}); this.grid.cols = c.cells}return this}; a.formatCol = F; a.sortData = xa; a.updatepager = na; a.formatter = function(c, d, e, l, n){return M(c, d, e, l, n)}; b.extend(g, {populate:Y, emptyRows:aa}); this.grid = g; a.addXmlData = function(c){ia(c, a.grid.bDiv)}; a.addJSONData = function(c){ra(c, a.grid.bDiv)}; Y(); a.p.hiddengrid = false; b(window).unload(function(){a = null})}}})};
-        b.jgrid.extend({getGridParam:function(f){var k = this[0]; if (k.grid)return f?typeof k.p[f] != "undefined"?k.p[f]:null:k.p}, setGridParam:function(f){return this.each(function(){this.grid && typeof f === "object" && b.extend(true, this.p, f)})}, getDataIDs:function(){var f = [], k = 0, i; this.each(function(){if ((i = this.rows.length) && i > 0)for (; k < i; ){f[k] = this.rows[k].id; k++}}); return f}, setSelection:function(f, k){return this.each(function(){function i(a){var q = b(h.grid.bDiv)[0].clientHeight, t = b(h.grid.bDiv)[0].scrollTop,
-                x = h.rows[a].offsetTop; a = h.rows[a].clientHeight; if (x + a >= q + t)b(h.grid.bDiv)[0].scrollTop = x - (q + t) + a + t; else if (x < q + t)if (x < t)b(h.grid.bDiv)[0].scrollTop = x}var h = this, g, j, m; if (f !== undefined){k = k === false?false:true; if (j = h.rows.namedItem(f + "")){if (h.p.scrollrows === true){g = h.rows.namedItem(f).rowIndex; g >= 0 && i(g)}if (h.p.multiselect){h.p.selrow = j.id; m = b.inArray(h.p.selrow, h.p.selarrrow); if (m === - 1){j.className !== "ui-subgrid" && b(j).addClass("ui-state-highlight").attr("aria-selected", "true"); g = true; b("#jqg_" + b.jgrid.jqID(h.p.selrow),
-                h.rows[j.rowIndex]).attr("checked", g); h.p.selarrrow.push(h.p.selrow); h.p.onSelectRow && k && h.p.onSelectRow.call(h, h.p.selrow, g)} else{j.className !== "ui-subgrid" && b(j).removeClass("ui-state-highlight").attr("aria-selected", "false"); g = false; b("#jqg_" + b.jgrid.jqID(h.p.selrow), h.rows[j.rowIndex]).attr("checked", g); h.p.selarrrow.splice(m, 1); h.p.onSelectRow && k && h.p.onSelectRow.call(h, h.p.selrow, g); j = h.p.selarrrow[0]; h.p.selrow = j === undefined?null:j}} else if (j.className !== "ui-subgrid"){h.p.selrow && b(h.rows.namedItem(h.p.selrow)).removeClass("ui-state-highlight").attr("aria-selected",
-                "false"); h.p.selrow = j.id; b(j).addClass("ui-state-highlight").attr("aria-selected", "true"); h.p.onSelectRow && k && h.p.onSelectRow.call(h, h.p.selrow, true)}}}})}, resetSelection:function(){return this.each(function(){var f = this, k; if (f.p.multiselect){b(f.p.selarrrow).each(function(i, h){k = f.rows.namedItem(h); b(k).removeClass("ui-state-highlight").attr("aria-selected", "false"); b("#jqg_" + b.jgrid.jqID(h), k).attr("checked", false)}); b("#cb_" + b.jgrid.jqID(f.p.id), f.grid.hDiv).attr("checked", false); f.p.selarrrow =
-                []} else if (f.p.selrow){b("tr#" + b.jgrid.jqID(f.p.selrow), f.grid.bDiv).removeClass("ui-state-highlight").attr("aria-selected", "false"); f.p.selrow = null}f.p.savedRow = []})}, getRowData:function(f){var k = {}, i, h = false, g, j = 0; this.each(function(){var m = this, a, q; if (typeof f == "undefined"){h = true; i = []; g = m.rows.length} else{q = m.rows.namedItem(f); if (!q)return k; g = 1}for (; j < g; ){if (h)q = m.rows[j]; b("td", q).each(function(t){a = m.p.colModel[t].name; if (a !== "cb" && a !== "subgrid")if (m.p.treeGrid === true && a == m.p.ExpandColumn)k[a] =
-                b.jgrid.htmlDecode(b("span:first", this).html()); else try{k[a] = b.unformat(this, {rowId:q.id, colModel:m.p.colModel[t]}, t)} catch (x){k[a] = b.jgrid.htmlDecode(b(this).html())}}); j++; if (h){i.push(k); k = {}}}}); return i?i:k}, delRowData:function(f){var k = false, i, h, g; this.each(function(){var j = this; if (i = j.rows.namedItem(f)){g = i.rowIndex; b(i).remove(); j.p.records--; j.p.reccount--; j.updatepager(true, false); k = true; if (j.p.multiselect){h = b.inArray(f, j.p.selarrrow); h != - 1 && j.p.selarrrow.splice(h, 1)}if (f == j.p.selrow)j.p.selrow =
-                null} else return false; g === 0 && k && j.updateColumns(); if (j.p.altRows === true && k){var m = j.p.altclass; b(j.rows).each(function(a){a % 2 == 1?b(this).addClass(m):b(this).removeClass(m)})}}); return k}, setRowData:function(f, k, i){var h, g = false, j; this.each(function(){var m = this, a, q, t = typeof i; if (!m.grid)return false; q = m.rows.namedItem(f); if (!q)return false; k && b(this.p.colModel).each(function(x){h = this.name; if (k[h] !== undefined){a = m.formatter(f, k[h], x, k, "edit"); j = this.title?{title:b.jgrid.stripHtml(a)}:{}; m.p.treeGrid ===
-                true && h == m.p.ExpandColumn?b("td:eq(" + x + ") > span:first", q).html(a).attr(j):b("td:eq(" + x + ")", q).html(a).attr(j); g = true}}); if (t === "string")b(q).addClass(i); else t === "object" && b(q).css(i)}); return g}, addRowData:function(f, k, i, h){i || (i = "last"); var g = false, j, m, a, q, t, x, C, K, J = "", F, Q, M, R; if (k){if (b.isArray(k)){F = true; i = "last"; Q = f} else{k = [k]; F = false}this.each(function(){var u = this, la = k.length; t = u.p.rownumbers === true?1:0; a = u.p.multiselect === true?1:0; q = u.p.subGrid === true?1:0; if (!F)if (typeof f != "undefined")f +=
-                ""; else{f = u.p.records + 1 + ""; if (u.p.keyIndex !== false){Q = u.p.colModel[u.p.keyIndex + a + q + t].name; if (typeof k[0][Q] != "undefined")f = k[0][Q]}}M = u.p.altclass; for (var ca = 0, fa = "", aa = b.isFunction(u.p.afterInsertRow)?true:false; ca < la; ){R = k[ca]; m = ""; if (F){try{f = R[Q]} catch (U){f = u.p.records + 1}fa = u.p.altRows === true?(u.rows.length - 1) % 2 === 0?M:"":""}if (t){J = u.formatCol(t, 1, ""); m += '<td role="gridcell" aria-describedby="' + u.p.id + '_rn" class="ui-state-default jqgrid-rownum" ' + J + ">0</td>"}if (a){K = '<input role="checkbox" type="checkbox" id="jqg_' +
-                f + '" class="cbox"/>'; J = u.formatCol(t, 1, ""); m += '<td role="gridcell" aria-describedby="' + u.p.id + '_cb" ' + J + ">" + K + "</td>"}if (q)m += b(u).jqGrid("addSubGridCell", a + t, 1); for (C = a + q + t; C < this.p.colModel.length; C++){j = this.p.colModel[C].name; K = u.formatter(f, R[j], C, R, "add"); J = u.formatCol(C, 1, K); m += '<td role="gridcell" aria-describedby="' + u.p.id + "_" + j + '" ' + J + ">" + K + "</td>"}m = '<tr id="' + f + '" role="row" class="ui-widget-content jqgrow ui-row-' + u.p.direction + " " + fa + '">' + m + "</tr>"; if (u.p.subGrid === true){m = b(m)[0]; b(u).jqGrid("addSubGrid",
-                m, a + t)}if (u.rows.length === 0)b("table:first", u.grid.bDiv).append(m); else switch (i){case "last":b(u.rows[u.rows.length - 1]).after(m); break; case "first":b(u.rows[0]).before(m); break; case "after":if (x = u.rows.namedItem(h))b(u.rows[x.rowIndex + 1]).hasClass("ui-subgrid")?b(u.rows[x.rowIndex + 1]).after(m):b(x).after(m); break; case "before":if (x = u.rows.namedItem(h)){b(x).before(m); x = x.rowIndex}break}u.p.records++; u.p.reccount++; if (!u.grid.cols || !u.grid.cols.length)u.grid.cols = u.rows[0].cells; if (i === "first" || i ===
-                "before" && x <= 1 || u.rows.length === 1)u.updateColumns(); aa && u.p.afterInsertRow.call(u, f, R, R); ca++}if (u.p.altRows === true && !F)if (i == "last")(u.rows.length - 1) % 2 == 1 && b(u.rows[u.rows.length - 1]).addClass(M); else b(u.rows).each(function(ia){ia % 2 == 1?b(this).addClass(M):b(this).removeClass(M)}); u.updatepager(true, true); g = true})}return g}, footerData:function(f, k, i){function h(q){for (var t in q)if (q.hasOwnProperty(t))return false; return true}var g, j = false, m = {}, a; if (typeof f == "undefined")f = "get"; if (typeof i != "boolean")i =
-                true; f = f.toLowerCase(); this.each(function(){var q = this, t; if (!q.grid || !q.p.footerrow)return false; if (f == "set")if (h(k))return false; j = true; b(this.p.colModel).each(function(x){g = this.name; if (f == "set"){if (k[g] !== undefined){t = i?q.formatter("", k[g], x, k, "edit"):k[g]; a = this.title?{title:b.jgrid.stripHtml(t)}:{}; b("tr.footrow td:eq(" + x + ")", q.grid.sDiv).html(t).attr(a); j = true}} else if (f == "get")m[g] = b("tr.footrow td:eq(" + x + ")", q.grid.sDiv).html()})}); return f == "get"?m:j}, ShowHideCol:function(f, k){return this.each(function(){var i =
-                this, h = false; if (i.grid){if (typeof f === "string")f = [f]; k = k != "none"?"":"none"; var g = k == ""?true:false; b(this.p.colModel).each(function(j){if (b.inArray(this.name, f) !== - 1 && this.hidden === g){b("tr", i.grid.hDiv).each(function(){b("th:eq(" + j + ")", this).css("display", k)}); b(i.rows).each(function(m){b("td:eq(" + j + ")", i.rows[m]).css("display", k)}); i.p.footerrow && b("td:eq(" + j + ")", i.grid.sDiv).css("display", k); if (k == "none")i.p.tblwidth -= this.width; else i.p.tblwidth += this.width; this.hidden = !g; h = true}}); if (h === true){b("table:first",
-                i.grid.hDiv).width(i.p.tblwidth); b("table:first", i.grid.bDiv).width(i.p.tblwidth); i.grid.hDiv.scrollLeft = i.grid.bDiv.scrollLeft; if (i.p.footerrow){b("table:first", i.grid.sDiv).width(i.p.tblwidth); i.grid.sDiv.scrollLeft = i.grid.bDiv.scrollLeft}}}})}, hideCol:function(f){return this.each(function(){b(this).jqGrid("ShowHideCol", f, "none")})}, showCol:function(f){return this.each(function(){b(this).jqGrid("ShowHideCol", f, "")})}, remapColumns:function(f, k, i){function h(m){var a; a = m.length?b.makeArray(m):b.extend({},
-                m); b.each(f, function(q){m[q] = a[this]})}function g(m, a){b(">tr" + (a || ""), m).each(function(){var q = this, t = b.makeArray(q.cells); b.each(f, function(){var x = t[this]; x && q.appendChild(x)})})}var j = this.get(0); h(j.p.colModel); h(j.p.colNames); h(j.grid.headers); g(b("thead:first", j.grid.hDiv), i && ":not(.ui-jqgrid-labels)"); k && g(b("tbody:first", j.grid.bDiv), ".jqgrow"); j.p.footerrow && g(b("tbody:first", j.grid.sDiv)); if (j.p.remapColumns)if (j.p.remapColumns.length)h(j.p.remapColumns); else j.p.remapColumns = b.makeArray(f);
-                j.p.lastsort = b.inArray(j.p.lastsort, f); if (j.p.treeGrid)j.p.expColInd = b.inArray(j.p.expColInd, f)}, setGridWidth:function(f, k){return this.each(function(){var i = this, h, g = 0, j = i.p.cellLayout, m, a = 0, q = false, t = i.p.scrollOffset, x, C = 0, K = 0, J = 0, F; if (i.grid){if (typeof k != "boolean")k = i.p.shrinkToFit; if (!isNaN(f)){f = parseInt(f, 10); i.grid.width = i.p.width = f; b("#gbox_" + i.p.id).css("width", f + "px"); b("#gview_" + i.p.id).css("width", f + "px"); b(i.grid.bDiv).css("width", f + "px"); b(i.grid.hDiv).css("width", f + "px"); i.p.pager &&
-                b(i.p.pager).css("width", f + "px"); i.p.toppager && b(i.p.toppager).css("width", f + "px"); if (i.p.toolbar[0] === true){b(i.grid.uDiv).css("width", f + "px"); i.p.toolbar[1] == "both" && b(i.grid.ubDiv).css("width", f + "px")}i.p.footerrow && b(i.grid.sDiv).css("width", f + "px"); if (k === false && i.p.forceFit === true)i.p.forceFit = false; if (k === true){if (b.browser.safari)j = 0; b.each(i.p.colModel, function(){if (this.hidden === false){g += parseInt(this.width, 10); if (this.fixed){K += this.width; C += this.width + j} else a++; J++}}); if (a !== 0){i.p.tblwidth =
-                g; x = f - j * a - C; if (!isNaN(i.p.height))q = true; x -= t; g = 0; var Q = i.grid.cols.length > 0; b.each(i.p.colModel, function(M){if (this.hidden === false && !this.fixed){h = Math.round(x * this.width / (i.p.tblwidth - K)); if (!(h < 0)){this.width = h; g += h; i.grid.headers[M].width = h; i.grid.headers[M].el.style.width = h + "px"; if (i.p.footerrow)i.grid.footers[M].style.width = h + "px"; if (Q)i.grid.cols[M].style.width = h + "px"; m = M}}}); F = 0; if (q){if (f - C - (g + j * a) !== t)F = f - C - (g + j * a) - t} else if (Math.abs(f -
-                C - (g + j * a)) !== 1)F = f - C - (g + j * a); i.p.colModel[m].width += F; i.p.tblwidth = g + F + K + j * J; if (i.p.tblwidth > f){q = i.p.tblwidth - parseInt(f, 10); i.p.tblwidth = f; h = i.p.colModel[m].width -= q} else h = i.p.colModel[m].width; i.grid.headers[m].width = h; i.grid.headers[m].el.style.width = h + "px"; if (Q)i.grid.cols[m].style.width = h + "px"; b("table:first", i.grid.bDiv).css("width", i.p.tblwidth + "px"); b("table:first", i.grid.hDiv).css("width", i.p.tblwidth + "px"); i.grid.hDiv.scrollLeft = i.grid.bDiv.scrollLeft; if (i.p.footerrow){i.grid.footers[m].style.width =
-                h + "px"; b("table:first", i.grid.sDiv).css("width", i.p.tblwidth + "px")}}}}}})}, setGridHeight:function(f){return this.each(function(){var k = this; if (k.grid){b(k.grid.bDiv).css({height:f + (isNaN(f)?"":"px")}); k.p.height = f; k.p.scroll && k.grid.populateVisible()}})}, setCaption:function(f){return this.each(function(){this.p.caption = f; b("span.ui-jqgrid-title", this.grid.cDiv).html(f); b(this.grid.cDiv).show()})}, setLabel:function(f, k, i, h){return this.each(function(){var g = this, j = - 1; if (g.grid){if (isNaN(f))b(g.p.colModel).each(function(q){if (this.name ==
-                f){j = q; return false}}); else j = parseInt(f, 10); if (j >= 0){var m = b("tr.ui-jqgrid-labels th:eq(" + j + ")", g.grid.hDiv); if (k){var a = b(".s-ico", m); b("[id^=jqgh_]", m).empty().html(k).append(a); g.p.colNames[j] = k}if (i)typeof i === "string"?b(m).addClass(i):b(m).css(i); typeof h === "object" && b(m).attr(h)}}})}, setCell:function(f, k, i, h, g, j){return this.each(function(){var m = this, a = - 1, q, t; if (m.grid){if (isNaN(k))b(m.p.colModel).each(function(C){if (this.name == k){a = C; return false}}); else a = parseInt(k, 10); if (a >= 0)if (q = m.rows.namedItem(f)){var x =
-                b("td:eq(" + a + ")", q); if (i !== "" || j === true){q = m.formatter(f, i, a, q, "edit"); t = m.p.colModel[a].title?{title:b.jgrid.stripHtml(q)}:{}; m.p.treeGrid && b(".tree-wrap", b(x)).length > 0?b("span", b(x)).html(q).attr(t):b(x).html(q).attr(t)}if (typeof h === "string")b(x).addClass(h); else h && b(x).css(h); typeof g === "object" && b(x).attr(g)}}})}, getCell:function(f, k){var i = false; this.each(function(){var h = this, g = - 1; if (h.grid){if (isNaN(k))b(h.p.colModel).each(function(a){if (this.name === k){g = a; return false}}); else g = parseInt(k,
-                10); if (g >= 0){var j = h.rows.namedItem(f); if (j)try{i = b.unformat(b("td:eq(" + g + ")", j), {rowId:j.id, colModel:h.p.colModel[g]}, g)} catch (m){i = b.jgrid.htmlDecode(b("td:eq(" + g + ")", j).html())}}}}); return i}, getCol:function(f, k, i){var h = [], g, j = 0; k = typeof k != "boolean"?false:k; if (typeof i == "undefined")i = false; this.each(function(){var m = this, a = - 1; if (m.grid){if (isNaN(f))b(m.p.colModel).each(function(C){if (this.name === f){a = C; return false}}); else a = parseInt(f, 10); if (a >= 0){var q = m.rows.length, t = 0; if (q && q > 0){for (; t < q; ){try{g =
-                b.unformat(b(m.rows[t].cells[a]), {rowId:m.rows[t].id, colModel:m.p.colModel[a]}, a)} catch (x){g = b.jgrid.htmlDecode(m.rows[t].cells[a].innerHTML)}if (i)j += parseFloat(g); else if (k)h.push({id:m.rows[t].id, value:g}); else h[t] = g; t++}if (i)switch (i.toLowerCase()){case "sum":h = j; break; case "avg":h = j / q; break; case "count":h = q; break}}}}}); return h}, clearGridData:function(f){return this.each(function(){var k = this; if (k.grid){if (typeof f != "boolean")f = false; b("tbody:first tr", k.grid.bDiv).remove(); k.p.footerrow && f &&
-                b(".ui-jqgrid-ftable td", k.grid.sDiv).html("&#160;"); k.p.selrow = null; k.p.selarrrow = []; k.p.savedRow = []; k.p.records = 0; k.p.page = "0"; k.p.lastpage = "0"; k.p.reccount = 0; k.updatepager(true, false)}})}, getInd:function(f, k){var i = false, h; this.each(function(){if (h = this.rows.namedItem(f))i = k === true?h:h.rowIndex}); return i}})})(jQuery);
-        (function(c){function u(a, b, d, e, g){var h = b; if (c.fn.fmatter[a])h = c.fn.fmatter[a](b, d, e, g); return h}c.fmatter = {}; c.fn.fmatter = function(a, b, d, e, g){d = c.extend({}, c.jgrid.formatter, d); return u(a, b, d, e, g)}; c.fmatter.util = {NumberFormat:function(a, b){isNumber(a) || (a *= 1); if (isNumber(a)){var d = a < 0, e = a + "", g = b.decimalSeparator?b.decimalSeparator:"."; if (isNumber(b.decimalPlaces)){var h = b.decimalPlaces; e = Math.pow(10, h); e = Math.round(a * e) / e + ""; a = e.lastIndexOf("."); if (h > 0){if (a < 0){e += g; a = e.length - 1} else if (g !== ".")e =
-                e.replace(".", g); for (; e.length - 1 - a < h; )e += "0"}}if (b.thousandsSeparator){h = b.thousandsSeparator; a = e.lastIndexOf(g); a = a > - 1?a:e.length; g = e.substring(a); for (var f = - 1, i = a; i > 0; i--){f++; if (f % 3 === 0 && i !== a && (!d || i > 1))g = h + g; g = e.charAt(i - 1) + g}e = g}e = b.prefix?b.prefix + e:e; return e = b.suffix?e + b.suffix:e} else return a}, DateFormat:function(a, b, d, e){var g = function(m, r){m = String(m); for (r = parseInt(r, 10) || 2; m.length < r; )m = "0" + m; return m}, h = {m:1, d:1, y:1970, h:0, i:0, s:0, u:0}, f = 0, i, k, j = ["i18n"]; j.i18n = {dayNames:e.dayNames,
-                monthNames:e.monthNames}; if (a in e.masks)a = e.masks[a]; if (b.constructor === Date)f = b; else{b = b.split(/[\\\/:_;.\t\T\s-]/); a = a.split(/[\\\/:_;.\t\T\s-]/); i = 0; for (k = a.length; i < k; i++){if (a[i] == "M"){f = c.inArray(b[i], j.i18n.monthNames); if (f !== - 1 && f < 12)b[i] = f + 1}if (a[i] == "F"){f = c.inArray(b[i], j.i18n.monthNames); if (f !== - 1 && f > 11)b[i] = f + 1 - 12}h[a[i].toLowerCase()] = parseInt(b[i], 10)}h.m = parseInt(h.m, 10) - 1; f = h.y; if (f >= 70 && f <= 99)h.y = 1900 + h.y; else if (f >= 0 && f <= 69)h.y = 2E3 + h.y; f = new Date(h.y, h.m, h.d, h.h, h.i, h.s, h.u)}if (d in
-                e.masks)d = e.masks[d]; else d || (d = "Y-m-d"); h = f.getHours(); a = f.getMinutes(); b = f.getDate(); i = f.getMonth() + 1; k = f.getTimezoneOffset(); var l = f.getSeconds(), o = f.getMilliseconds(), n = f.getDay(), p = f.getFullYear(), q = (n + 6) % 7 + 1, s = (new Date(p, i - 1, b) - new Date(p, 0, 1)) / 864E5, t = {d:g(b), D:j.i18n.dayNames[n], j:b, l:j.i18n.dayNames[n + 7], N:q, S:e.S(b), w:n, z:s, W:q < 5?Math.floor((s + q - 1) / 7) + 1:Math.floor((s + q - 1) / 7) || (((new Date(p - 1, 0, 1)).getDay() + 6) % 7 < 4?53:52), F:j.i18n.monthNames[i - 1 + 12], m:g(i), M:j.i18n.monthNames[i - 1], n:i, t:"?",
-                L:"?", o:"?", Y:p, y:String(p).substring(2), a:h < 12?e.AmPm[0]:e.AmPm[1], A:h < 12?e.AmPm[2]:e.AmPm[3], B:"?", g:h % 12 || 12, G:h, h:g(h % 12 || 12), H:g(h), i:g(a), s:g(l), u:o, e:"?", I:"?", O:(k > 0?"-":"+") + g(Math.floor(Math.abs(k) / 60) * 100 + Math.abs(k) % 60, 4), P:"?", T:(String(f).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g) || [""]).pop().replace(/[^-+\dA-Z]/g, ""), Z:"?", c:"?", r:"?", U:Math.floor(f / 1E3)}; return d.replace(/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,
-                function(m){return m in t?t[m]:m.substring(1)})}}; c.fn.fmatter.defaultFormat = function(a, b){return isValue(a) && a !== ""?a:b.defaultValue?b.defaultValue:"&#160;"}; c.fn.fmatter.email = function(a, b){return isEmpty(a)?c.fn.fmatter.defaultFormat(a, b):'<a href="mailto:' + a + '">' + a + "</a>"}; c.fn.fmatter.checkbox = function(a, b){var d = c.extend({}, b.checkbox); isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); b = d.disabled === true?"disabled":""; if (isEmpty(a) || isUndefined(a))a = c.fn.fmatter.defaultFormat(a,
-                d); a += ""; a = a.toLowerCase(); return'<input type="checkbox" ' + (a.search(/(false|0|no|off)/i) < 0?" checked='checked' ":"") + ' value="' + a + '" offval="no" ' + b + "/>"}; c.fn.fmatter.link = function(a, b){var d = {target:b.target}, e = ""; isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); if (d.target)e = "target=" + d.target; return isEmpty(a)?c.fn.fmatter.defaultFormat(a, b):"<a " + e + ' href="' + a + '">' + a + "</a>"}; c.fn.fmatter.showlink = function(a, b){var d = {baseLinkUrl:b.baseLinkUrl, showAction:b.showAction,
-                addParam:b.addParam || "", target:b.target, idName:b.idName}, e = ""; isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); if (d.target)e = "target=" + d.target; d = d.baseLinkUrl + d.showAction + "?" + d.idName + "=" + b.rowId + d.addParam; return isString(a)?"<a " + e + ' href="' + d + '">' + a + "</a>":c.fn.fmatter.defaultFormat(a, b)}; c.fn.fmatter.integer = function(a, b){var d = c.extend({}, b.integer); isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); if (isEmpty(a))return d.defaultValue;
-                return c.fmatter.util.NumberFormat(a, d)}; c.fn.fmatter.number = function(a, b){var d = c.extend({}, b.number); isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); if (isEmpty(a))return d.defaultValue; return c.fmatter.util.NumberFormat(a, d)}; c.fn.fmatter.currency = function(a, b){var d = c.extend({}, b.currency); isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); if (isEmpty(a))return d.defaultValue; return c.fmatter.util.NumberFormat(a, d)}; c.fn.fmatter.date =
-                function(a, b, d, e){d = c.extend({}, b.date); isUndefined(b.colModel.formatoptions) || (d = c.extend({}, d, b.colModel.formatoptions)); return!d.reformatAfterEdit && e == "edit"?c.fn.fmatter.defaultFormat(a, b):isEmpty(a)?c.fn.fmatter.defaultFormat(a, b):c.fmatter.util.DateFormat(d.srcformat, a, d.newformat, d)}; c.fn.fmatter.select = function(a, b){a += ""; var d = false, e = []; if (!isUndefined(b.colModel.editoptions))d = b.colModel.editoptions.value; if (d){var g = b.colModel.editoptions.multiple === true?true:false, h = [], f; if (g){h = a.split(",");
-                h = c.map(h, function(l){return c.trim(l)})}if (isString(d))for (var i = d.split(";"), k = 0, j = 0; j < i.length; j++){f = i[j].split(":"); if (f.length > 2)f[1] = jQuery.map(f, function(l, o){if (o > 0)return l}).join(":"); if (g){if (jQuery.inArray(f[0], h) > - 1){e[k] = f[1]; k++}} else if (c.trim(f[0]) == c.trim(a)){e[0] = f[1]; break}} else if (isObject(d))if (g)e = jQuery.map(h, function(l){return d[l]}); else e[0] = d[a] || ""}a = e.join(", "); return a == ""?c.fn.fmatter.defaultFormat(a, b):a}; c.fn.fmatter.rowactions = function(a, b, d, e){switch (d){case "edit":d =
-                function(){c("tr#" + a + " div.ui-inline-edit, tr#" + a + " div.ui-inline-del", "#" + b).show(); c("tr#" + a + " div.ui-inline-save, tr#" + a + " div.ui-inline-cancel", "#" + b).hide()}; c("#" + b).jqGrid("editRow", a, e, null, null, null, {oper:"edit"}, d, null, d); c("tr#" + a + " div.ui-inline-edit, tr#" + a + " div.ui-inline-del", "#" + b).hide(); c("tr#" + a + " div.ui-inline-save, tr#" + a + " div.ui-inline-cancel", "#" + b).show(); break; case "save":c("#" + b).jqGrid("saveRow", a, null, null); c("tr#" + a + " div.ui-inline-edit, tr#" + a + " div.ui-inline-del", "#" +
-                b).show(); c("tr#" + a + " div.ui-inline-save, tr#" + a + " div.ui-inline-cancel", "#" + b).hide(); break; case "cancel":c("#" + b).jqGrid("restoreRow", a); c("tr#" + a + " div.ui-inline-edit, tr#" + a + " div.ui-inline-del", "#" + b).show(); c("tr#" + a + " div.ui-inline-save, tr#" + a + " div.ui-inline-cancel", "#" + b).hide(); break}}; c.fn.fmatter.actions = function(a, b){a = {keys:false, editbutton:true, delbutton:true}; isUndefined(b.colModel.formatoptions) || (a = c.extend(a, b.colModel.formatoptions)); var d = b.rowId, e = "", g; if (typeof d == "undefined" ||
-                isEmpty(d))return""; if (a.editbutton){g = "onclick=$.fn.fmatter.rowactions('" + d + "','" + b.gid + "','edit'," + a.keys + ");"; e = e + "<div style='margin-left:8px;'><div title='" + c.jgrid.nav.edittitle + "' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' " + g + "><span class='ui-icon ui-icon-pencil'></span></div>"}if (a.delbutton){g = "onclick=jQuery('#" + b.gid + "').jqGrid('delGridRow','" + d + "');"; e = e + "<div title='" + c.jgrid.nav.deltitle + "' style='float:left;margin-left:5px;' class='ui-pg-div ui-inline-del' " +
-                g + "><span class='ui-icon ui-icon-trash'></span></div>"}g = "onclick=$.fn.fmatter.rowactions('" + d + "','" + b.gid + "','save',false);"; e = e + "<div title='" + c.jgrid.edit.bSubmit + "' style='float:left;display:none' class='ui-pg-div ui-inline-save'><span class='ui-icon ui-icon-disk' " + g + "></span></div>"; g = "onclick=$.fn.fmatter.rowactions('" + d + "','" + b.gid + "','cancel',false);"; return e = e + "<div title='" + c.jgrid.edit.bCancel + "' style='float:left;display:none;margin-left:5px;' class='ui-pg-div ui-inline-cancel'><span class='ui-icon ui-icon-cancel' " +
-                g + "></span></div></div>"}; c.unformat = function(a, b, d, e){var g, h = b.colModel.formatter, f = b.colModel.formatoptions || {}, i = /([\.\*\_\'\(\)\{\}\+\?\\])/g; unformatFunc = b.colModel.unformat || c.fn.fmatter[h] && c.fn.fmatter[h].unformat; if (typeof unformatFunc !== "undefined" && isFunction(unformatFunc))g = unformatFunc(c(a).text(), b, a); else if (typeof h !== "undefined" && isString(h)){g = c.jgrid.formatter || {}; switch (h){case "integer":f = c.extend({}, g.integer, f); b = f.thousandsSeparator.replace(i, "\\$1"); b = new RegExp(b, "g"); g =
-                c(a).text().replace(b, ""); break; case "number":f = c.extend({}, g.number, f); b = f.thousandsSeparator.replace(i, "\\$1"); b = new RegExp(b, "g"); g = c(a).text().replace(b, "").replace(f.decimalSeparator, "."); break; case "currency":f = c.extend({}, g.currency, f); b = f.thousandsSeparator.replace(i, "\\$1"); b = new RegExp(b, "g"); g = c(a).text().replace(b, "").replace(f.decimalSeparator, ".").replace(f.prefix, "").replace(f.suffix, ""); break; case "checkbox":f = b.colModel.editoptions?b.colModel.editoptions.value.split(":"):["Yes", "No"];
-                g = c("input", a).attr("checked")?f[0]:f[1]; break; case "select":g = c.unformat.select(a, b, d, e); break; case "actions":return""; default:g = c(a).text()}}return g?g:e === true?c(a).text():c.jgrid.htmlDecode(c(a).html())}; c.unformat.select = function(a, b, d, e){d = []; a = c(a).text(); if (e === true)return a; b = c.extend({}, b.colModel.editoptions); if (b.value){var g = b.value; b = b.multiple === true?true:false; e = []; var h; if (b){e = a.split(","); e = c.map(e, function(j){return c.trim(j)})}if (isString(g))for (var f = g.split(";"), i = 0, k = 0; k < f.length; k++){h =
-                f[k].split(":"); if (b){if (jQuery.inArray(h[1], e) > - 1){d[i] = h[0]; i++}} else if (c.trim(h[1]) == c.trim(a)){d[0] = h[0]; break}} else if (isObject(g)){b || (e[0] = a); d = jQuery.map(e, function(j){var l; c.each(g, function(o, n){if (n == j){l = o; return false}}); if (l)return l})}return d.join(", ")} else return a || ""}; isValue = function(a){return isObject(a) || isString(a) || isNumber(a) || isBoolean(a)}; isBoolean = function(a){return typeof a === "boolean"}; isNull = function(a){return a === null}; isNumber = function(a){return typeof a === "number" &&
-                isFinite(a)}; isString = function(a){return typeof a === "string"}; isEmpty = function(a){if (!isString(a) && isValue(a))return false; else if (!isValue(a))return true; a = c.trim(a).replace(/\&nbsp\;/ig, "").replace(/\&#160\;/ig, ""); return a === ""}; isUndefined = function(a){return typeof a === "undefined"}; isObject = function(a){return a && (typeof a === "object" || isFunction(a)) || false}; isFunction = function(a){return typeof a === "function"}})(jQuery);
-        (function(a){a.jgrid.extend({getColProp:function(g){var d = {}, b = this[0]; if (b.grid){b = b.p.colModel; for (var n = 0; n < b.length; n++)if (b[n].name == g){d = b[n]; break}return d}}, setColProp:function(g, d){return this.each(function(){if (this.grid)if (d)for (var b = this.p.colModel, n = 0; n < b.length; n++)if (b[n].name == g){a.extend(this.p.colModel[n], d); break}})}, sortGrid:function(g, d, b){return this.each(function(){var n = this, s = - 1; if (n.grid){if (!g)g = n.p.sortname; for (var q = 0; q < n.p.colModel.length; q++)if (n.p.colModel[q].index ==
-                g || n.p.colModel[q].name == g){s = q; break}if (s != - 1){q = n.p.colModel[s].sortable; if (typeof q !== "boolean")q = true; if (typeof d !== "boolean")d = false; q && n.sortData("jqgh_" + g, s, d, b)}}})}, GridDestroy:function(){return this.each(function(){if (this.grid){this.p.pager && a(this.p.pager).remove(); var g = this.id; try{a("#gbox_" + g).remove()} catch (d){}}})}, GridUnload:function(){return this.each(function(){if (this.grid){var g = {id:a(this).attr("id"), cl:a(this).attr("class")}; this.p.pager && a(this.p.pager).empty().removeClass("ui-state-default ui-jqgrid-pager corner-bottom");
-                var d = document.createElement("table"); a(d).attr({id:g.id}); d.className = g.cl; g = this.id; a(d).removeClass("ui-jqgrid-btable"); if (a(this.p.pager).parents("#gbox_" + g).length === 1){a(d).insertBefore("#gbox_" + g).show(); a(this.p.pager).insertBefore("#gbox_" + g)} else a(d).insertBefore("#gbox_" + g).show(); a("#gbox_" + g).remove()}})}, setGridState:function(g){return this.each(function(){if (this.grid){var d = this; if (g == "hidden"){a(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv", "#gview_" + d.p.id).slideUp("fast"); d.p.pager && a(d.p.pager).slideUp("fast");
-                d.p.toppager && a(d.p.toppager).slideUp("fast"); if (d.p.toolbar[0] === true){d.p.toolbar[1] == "both" && a(d.grid.ubDiv).slideUp("fast"); a(d.grid.uDiv).slideUp("fast")}d.p.footerrow && a(".ui-jqgrid-sdiv", "#gbox_" + d.p.id).slideUp("fast"); a(".ui-jqgrid-titlebar-close span", d.grid.cDiv).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s"); d.p.gridstate = "hidden"} else if (g == "visible"){a(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv", "#gview_" + d.p.id).slideDown("fast"); d.p.pager && a(d.p.pager).slideDown("fast");
-                d.p.toppager && a(d.p.toppager).slideDown("fast"); if (d.p.toolbar[0] === true){d.p.toolbar[1] == "both" && a(d.grid.ubDiv).slideDown("fast"); a(d.grid.uDiv).slideDown("fast")}d.p.footerrow && a(".ui-jqgrid-sdiv", "#gbox_" + d.p.id).slideDown("fast"); a(".ui-jqgrid-titlebar-close span", d.grid.cDiv).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n"); d.p.gridstate = "visible"}}})}, updateGridRows:function(g, d, b){var n, s = false, q; this.each(function(){var h = this, l, o, c, f; if (!h.grid)return false;
-                d || (d = "id"); g && g.length > 0 && a(g).each(function(){c = this; if (o = h.rows.namedItem(c[d])){f = c[d]; if (b === true)if (h.p.jsonReader.repeatitems === true){if (h.p.jsonReader.cell)c = c[h.p.jsonReader.cell]; for (var e = 0; e < c.length; e++){l = h.formatter(f, c[e], e, c, "edit"); q = h.p.colModel[e].title?{title:a.jgrid.stripHtml(l)}:{}; h.p.treeGrid === true && n == h.p.ExpandColumn?a("td:eq(" + e + ") > span:first", o).html(l).attr(q):a("td:eq(" + e + ")", o).html(l).attr(q)}return s = true}a(h.p.colModel).each(function(m){n = b === true?this.jsonmap ||
-                this.name:this.name; if (c[n] !== undefined){l = h.formatter(f, c[n], m, c, "edit"); q = this.title?{title:a.jgrid.stripHtml(l)}:{}; h.p.treeGrid === true && n == h.p.ExpandColumn?a("td:eq(" + m + ") > span:first", o).html(l).attr(q):a("td:eq(" + m + ")", o).html(l).attr(q); s = true}})}})}); return s}, filterGrid:function(g, d){d = a.extend({gridModel:false, gridNames:false, gridToolbar:false, filterModel:[], formtype:"horizontal", autosearch:true, formclass:"filterform", tableclass:"filtertable", buttonclass:"filterbutton", searchButton:"Search",
-                clearButton:"Clear", enableSearch:false, enableClear:false, beforeSearch:null, afterSearch:null, beforeClear:null, afterClear:null, url:"", marksearched:true}, d || {}); return this.each(function(){var b = this; this.p = d; if (this.p.filterModel.length === 0 && this.p.gridModel === false)alert("No filter is set"); else if (g){this.p.gridid = g.indexOf("#") != - 1?g:"#" + g; var n = a(this.p.gridid).jqGrid("getGridParam", "colModel"); if (n){if (this.p.gridModel === true){var s = a(this.p.gridid)[0], q; a.each(n, function(f){var e = []; this.search =
-                this.search === false?false:true; q = this.editrules && this.editrules.searchhidden === true?true:this.hidden === true?false:true; if (this.search === true && q === true){e.label = b.p.gridNames === true?s.p.colNames[f]:""; e.name = this.name; e.index = this.index || this.name; e.stype = this.edittype || "text"; if (e.stype != "select")e.stype = "text"; e.defval = this.defval || ""; e.surl = this.surl || ""; e.sopt = this.editoptions || {}; e.width = this.width; b.p.filterModel.push(e)}})} else a.each(b.p.filterModel, function(){for (var f = 0; f < n.length; f++)if (this.name ==
-                n[f].name){this.index = n[f].index || this.name; break}if (!this.index)this.index = this.name}); var h = function(){var f = {}, e = 0, m, i = a(b.p.gridid)[0], k; i.p.searchdata = {}; a.isFunction(b.p.beforeSearch) && b.p.beforeSearch(); a.each(b.p.filterModel, function(){k = this.index; switch (this.stype){case "select":if (m = a("select[name=" + k + "]", b).val()){f[k] = m; b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).addClass("dirty-cell"); e++} else{b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).removeClass("dirty-cell"); try{delete i.p.postData[this.index]} catch (r){}}break;
-                default:if (m = a("input[name=" + k + "]", b).val()){f[k] = m; b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).addClass("dirty-cell"); e++} else{b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).removeClass("dirty-cell"); try{delete i.p.postData[this.index]} catch (u){}}}}); var p = e > 0?true:false; a.extend(i.p.postData, f); var j; if (b.p.url){j = a(i).jqGrid("getGridParam", "url"); a(i).jqGrid("setGridParam", {url:b.p.url})}a(i).jqGrid("setGridParam", {search:p}).trigger("reloadGrid", [{page:1}]); j && a(i).jqGrid("setGridParam",
-        {url:j}); a.isFunction(b.p.afterSearch) && b.p.afterSearch()}, l = function(){var f = {}, e, m = 0, i = a(b.p.gridid)[0], k; a.isFunction(b.p.beforeClear) && b.p.beforeClear(); a.each(b.p.filterModel, function(){k = this.index; e = this.defval?this.defval:""; if (!this.stype)this.stype = "text"; switch (this.stype){case "select":var r; a("select[name=" + k + "] option", b).each(function(v){if (v === 0)this.selected = true; if (a(this).text() == e){this.selected = true; r = a(this).val(); return false}}); if (r){f[k] = r; b.p.marksearched && a("#jqgh_" + this.name,
-                i.grid.hDiv).addClass("dirty-cell"); m++} else{b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).removeClass("dirty-cell"); try{delete i.p.postData[this.index]} catch (u){}}break; case "text":a("input[name=" + k + "]", b).val(e); if (e){f[k] = e; b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).addClass("dirty-cell"); m++} else{b.p.marksearched && a("#jqgh_" + this.name, i.grid.hDiv).removeClass("dirty-cell"); try{delete i.p.postData[this.index]} catch (t){}}break}}); var p = m > 0?true:false; a.extend(i.p.postData, f); var j;
-                if (b.p.url){j = a(i).jqGrid("getGridParam", "url"); a(i).jqGrid("setGridParam", {url:b.p.url})}a(i).jqGrid("setGridParam", {search:p}).trigger("reloadGrid", [{page:1}]); j && a(i).jqGrid("setGridParam", {url:j}); a.isFunction(b.p.afterClear) && b.p.afterClear()}, o = a("<form name='SearchForm' style=display:inline;' class='" + this.p.formclass + "'></form>"), c = a("<table class='" + this.p.tableclass + "' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>"); a(o).append(c); (function(){var f = document.createElement("tr"),
-                e, m, i, k; b.p.formtype == "horizontal" && a(c).append(f); a.each(b.p.filterModel, function(p){i = document.createElement("td"); a(i).append("<label for='" + this.name + "'>" + this.label + "</label>"); k = document.createElement("td"); var j = this; if (!this.stype)this.stype = "text"; switch (this.stype){case "select":if (this.surl)a(k).load(this.surl, function(){j.defval && a("select", this).val(j.defval); a("select", this).attr({name:j.index || j.name, id:"sg_" + j.name}); j.sopt && a("select", this).attr(j.sopt); b.p.gridToolbar === true && j.width &&
-                a("select", this).width(j.width); b.p.autosearch === true && a("select", this).change(function(){h(); return false})}); else if (j.sopt.value){var r = j.sopt.value, u = document.createElement("select"); a(u).attr({name:j.index || j.name, id:"sg_" + j.name}).attr(j.sopt); var t; if (typeof r === "string"){p = r.split(";"); for (var v = 0; v < p.length; v++){r = p[v].split(":"); t = document.createElement("option"); t.value = r[0]; t.innerHTML = r[1]; if (r[1] == j.defval)t.selected = "selected"; u.appendChild(t)}} else if (typeof r === "object")for (v in r)if (r.hasOwnProperty(v)){p++;
-                t = document.createElement("option"); t.value = v; t.innerHTML = r[v]; if (r[v] == j.defval)t.selected = "selected"; u.appendChild(t)}b.p.gridToolbar === true && j.width && a(u).width(j.width); a(k).append(u); b.p.autosearch === true && a(u).change(function(){h(); return false})}break; case "text":u = this.defval?this.defval:""; a(k).append("<input type='text' name='" + (this.index || this.name) + "' id='sg_" + this.name + "' value='" + u + "'/>"); j.sopt && a("input", k).attr(j.sopt); if (b.p.gridToolbar === true && j.width)a.browser.msie?a("input", k).width(j.width -
-                4):a("input", k).width(j.width - 2); b.p.autosearch === true && a("input", k).keypress(function(w){if ((w.charCode?w.charCode:w.keyCode?w.keyCode:0) == 13){h(); return false}return this}); break}if (b.p.formtype == "horizontal"){b.p.gridToolbar === true && b.p.gridNames === false?a(f).append(k):a(f).append(i).append(k); a(f).append(k)} else{e = document.createElement("tr"); a(e).append(i).append(k); a(c).append(e)}}); k = document.createElement("td"); if (b.p.enableSearch === true){m = "<input type='button' id='sButton' class='" + b.p.buttonclass +
-                "' value='" + b.p.searchButton + "'/>"; a(k).append(m); a("input#sButton", k).click(function(){h(); return false})}if (b.p.enableClear === true){m = "<input type='button' id='cButton' class='" + b.p.buttonclass + "' value='" + b.p.clearButton + "'/>"; a(k).append(m); a("input#cButton", k).click(function(){l(); return false})}if (b.p.enableClear === true || b.p.enableSearch === true)if (b.p.formtype == "horizontal")a(f).append(k); else{e = document.createElement("tr"); a(e).append("<td>&#160;</td>").append(k); a(c).append(e)}})(); a(this).append(o);
-                this.triggerSearch = h; this.clearSearch = l} else alert("Could not get grid colModel")} else alert("No target grid is set!")})}, filterToolbar:function(g){g = a.extend({autosearch:true, searchOnEnter:true, beforeSearch:null, afterSearch:null, beforeClear:null, afterClear:null, searchurl:"", stringResult:false, groupOp:"AND"}, g || {}); return this.each(function(){function d(h, l){var o = a(h); o[0] && jQuery.each(l, function(){this.data !== undefined?o.bind(this.type, this.data, this.fn):o.bind(this.type, this.fn)})}var b = this, n =
-                function(){var h = {}, l = 0, o, c, f = {}; a.each(b.p.colModel, function(){c = this.index || this.name; var j = this.searchoptions && this.searchoptions.sopt?this.searchoptions.sopt[0]:"bw"; switch (this.stype){case "select":if (o = a("select[name=" + c + "]", b.grid.hDiv).val()){h[c] = o; f[c] = j; l++} else try{delete b.p.postData[c]} catch (r){}break; case "text":if (o = a("input[name=" + c + "]", b.grid.hDiv).val()){h[c] = o; f[c] = j; l++} else try{delete b.p.postD

<TRUNCATED>