All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.js.base.grid.custom.min.js Maven / Gradle / Ivy

'use strict';(function(a,G){"function"===typeof define&&define.amd?define(["jquery","./grid.base","./jquery.fmatter","./grid.common"],function(w){return G(w,a.document)}):"object"===typeof module&&module.exports?module.exports=function(a,u){a||(a=window);void 0===u&&(u="undefined"!==typeof window?require("jquery"):require("jquery")(a));require("./grid.base");require("./jquery.fmatter");require("./grid.common");G(u,a.document);return u}:G(jQuery,a.document)})("undefined"!==typeof window?window:this,
function(a,G){var w=a.jgrid,u=w.jqID,B=a.fn.jqGrid,D=B.getGuiStyles,W=B.getGridRes;w.extend({getColProp:function(a){var b=this[0];return null!=b&&b.grid&&(a=b.p.iColByName[a],void 0!==a)?b.p.colModel[a]:{}},setColProp:function(f,b){return this.each(function(){var d=this.p,e;this.grid&&null!=d&&b&&(e=d.iColByName[f],void 0!==e&&a.extend(!0,d.colModel[e],b))})},sortGrid:function(a,b,d){return this.each(function(){var e=this.grid,c=this.p,f=c.colModel,q=f.length,k,g,m=!1;if(e)for(a||(a=c.sortname),"boolean"!==
typeof b&&(b=!1),g=0;ga.inArray(n.op,f.sopt))continue}else if("select"===d.stype||"checkbox"===d.stype){if("eq"!==n.op)continue}else if(n.op!==k.defaultSearch)continue;e[d.name]={op:n.op,data:n.data}}return e},J=function(a,b){switch(b){case 1:a.data("state",1).prop({checked:!0,indeterminate:!1});break;case 0:a.data("state",
0).prop({checked:!1,indeterminate:!1});break;default:a.data("state",-1).prop({checked:!1,indeterminate:!0})}},E=function(){var x={},h=0,f={};a.each(g,function(){var e=this,n=e.index||e.name,p,r,t=e.searchoptions||{};p=a("#"+u(z(e.name)),!0===e.frozen&&!0===c.frozenColumns?d.fhDiv:d.hDiv);var l=function(a,b){var c=e.formatoptions||{};return void 0!==c[a]?c[a]:m("formatter."+(b||e.formatter)+"."+a)},g=function(a){var b=l("thousandsSeparator").replace(/([\.\*\_\'\(\)\{\}\+\?\\])/g,"\\$1");return a.replace(new RegExp(b,
"g"),"")};r=k.searchOperators?p.parent().prev().children("a").data("soper")||k.defaultSearch:t.sopt?t.sopt[0]:"select"===e.stype||"checkbox"===e.stype?"eq":k.defaultSearch;if("custom"===e.stype&&a.isFunction(t.custom_value)&&0v.length&&p.substr(p.length-
v.length,v.length)===v&&(p=p.substr(0,p.length-v.length));p=g(p).replace(l("decimalSeparator"),".");""!==p&&(p=String(parseFloat(p)))}if(p||"nu"===r||"nn"===r||0<=a.inArray(r,c.customUnaryOperations))x[n]=p,f[n]=r,h++;else if(x.hasOwnProperty(n)&&delete x[n],!k.stringResult&&!k.searchOperators&&"local"!==c.datatype)try{null!=c.postData&&c.postData.hasOwnProperty(n)&&delete c.postData[n]}catch(P){}});var t=0g&&a(this).remove())})});var F=-1,y=-1,I,H;a(k).filter(".jqg-second-row-header").children("th").each(function(){I=parseInt(a(this).attr("colspan")||1,10);H=parseInt(a(this).attr("rowspan")||1,10);1




© 2015 - 2025 Weber Informatics LLC | Privacy Policy