Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removing the most clear cases of unused variables

Replacing the usage of global `jQuery` to the local `$` in the `jquery.fmatter.js`

Signed-off-by: Dr. Oleg Kiriljuk <oleg.kiriljuk@ok-soft-gmbh.com>
  • Loading branch information...
commit 1abd2d4be6e44022700df94228bf20eab824b084 1 parent c2540fb
@OlegKi OlegKi authored
View
50 js/grid.base.js
@@ -181,7 +181,7 @@ $.extend($.jgrid,{
}
},
ajaxOptions: {},
- from : function(source,initalQuery){
+ from : function(source){
// Original Author Hugo Bonacci
// License MIT http://jlinq.codeplex.com/license
var QueryObject=function(d,q){
@@ -349,22 +349,22 @@ $.extend($.jgrid,{
if(type === undefined ) { type = "text"; }
if (type == 'float' || type== 'number' || type== 'currency' || type== 'numeric') {
- findSortKey = function($cell, a) {
+ findSortKey = function($cell) {
var key = parseFloat( String($cell).replace(_stripNum, ''));
return isNaN(key) ? 0.00 : key;
};
} else if (type=='int' || type=='integer') {
- findSortKey = function($cell, a) {
+ findSortKey = function($cell) {
return $cell ? parseFloat(String($cell).replace(_stripNum, '')) : 0;
};
} else if(type == 'date' || type == 'datetime') {
- findSortKey = function($cell, a) {
+ findSortKey = function($cell) {
return $.jgrid.parseDate(dfmt,$cell).getTime();
};
} else if($.isFunction(type)) {
findSortKey = type;
} else {
- findSortKey = function($cell, a) {
+ findSortKey = function($cell) {
if(!$cell) {$cell ="";}
return $.trim(String($cell).toUpperCase());
};
@@ -455,7 +455,7 @@ $.extend($.jgrid,{
}
return _data;
};
- this.hasMatch=function(f){
+ this.hasMatch=function(){
if(!self._hasData()) { return false; }
self.execute();
return _data.length>0;
@@ -1087,7 +1087,7 @@ $.fn.jqGrid = function( pin ) {
rcnt=1;
} else { rcnt = rcnt > 1 ? rcnt :1; }
} else { return; }
- var i,fpos,ir=0,v,row,gi=0,si=0,ni=0,idn, getId,f=[],F,rd ={}, xmlr,rid, rowData=[], cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1;
+ var i,fpos,ir=0,v,gi=0,si=0,ni=0,idn, getId,f=[],F,rd ={}, xmlr,rid, rowData=[], cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1;
if(!xmlRd.repeatitems) {f = reader(frd);}
if( ts.p.keyIndex===false) {
idn = $.isFunction( xmlRd.id ) ? xmlRd.id.call(ts, xml) : xmlRd.id;
@@ -1435,7 +1435,7 @@ $.fn.jqGrid = function( pin ) {
return;
}
var grpview = ts.p.grouping ? ts.p.groupingView : false;
- $.each(ts.p.colModel,function(i,v){
+ $.each(ts.p.colModel,function(){
sorttype = this.sorttype || "text";
if(sorttype == "date" || sorttype == "datetime") {
if(this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date') {
@@ -1474,21 +1474,21 @@ $.fn.jqGrid = function( pin ) {
return;
}
var compareFnMap = {
- 'eq':function(queryObj, op) {return queryObj.equals;},
- 'ne':function(queryObj,op) {return queryObj.notEquals;},
- 'lt':function(queryObj,op) {return queryObj.less;},
- 'le':function(queryObj,op) {return queryObj.lessOrEquals;},
- 'gt':function(queryObj,op) {return queryObj.greater;},
- 'ge':function(queryObj,op) {return queryObj.greaterOrEquals;},
- 'cn':function(queryObj,op) {return queryObj.contains;},
+ 'eq':function(queryObj) {return queryObj.equals;},
+ 'ne':function(queryObj) {return queryObj.notEquals;},
+ 'lt':function(queryObj) {return queryObj.less;},
+ 'le':function(queryObj) {return queryObj.lessOrEquals;},
+ 'gt':function(queryObj) {return queryObj.greater;},
+ 'ge':function(queryObj) {return queryObj.greaterOrEquals;},
+ 'cn':function(queryObj) {return queryObj.contains;},
'nc':function(queryObj,op) {return op === "OR" ? queryObj.orNot().contains : queryObj.andNot().contains;},
- 'bw':function(queryObj,op) {return queryObj.startsWith;},
+ 'bw':function(queryObj) {return queryObj.startsWith;},
'bn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().startsWith : queryObj.andNot().startsWith;},
'en':function(queryObj,op) {return op === "OR" ? queryObj.orNot().endsWith : queryObj.andNot().endsWith;},
- 'ew':function(queryObj,op) {return queryObj.endsWith;},
+ 'ew':function(queryObj) {return queryObj.endsWith;},
'ni':function(queryObj,op) {return op === "OR" ? queryObj.orNot().equals : queryObj.andNot().equals;},
- 'in':function(queryObj,op) {return queryObj.equals;},
- 'nu':function(queryObj,op) {return queryObj.isNull;},
+ 'in':function(queryObj) {return queryObj.equals;},
+ 'nu':function(queryObj) {return queryObj.isNull;},
'nn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().isNull : queryObj.andNot().isNull;}
},
@@ -1888,20 +1888,20 @@ $.fn.jqGrid = function( pin ) {
return false;
});
if(ts.p.pgbuttons===true) {
- $(".ui-pg-button","#"+pgcnt).hover(function(e){
+ $(".ui-pg-button","#"+pgcnt).hover(function(){
if($(this).hasClass('ui-state-disabled')) {
this.style.cursor='default';
} else {
$(this).addClass('ui-state-hover');
this.style.cursor='pointer';
}
- },function(e) {
+ },function() {
if(!$(this).hasClass('ui-state-disabled')) {
$(this).removeClass('ui-state-hover');
this.style.cursor= "default";
}
});
- $("#first"+$.jgrid.jqID(tp)+", #prev"+$.jgrid.jqID(tp)+", #next"+$.jgrid.jqID(tp)+", #last"+$.jgrid.jqID(tp)).click( function(e) {
+ $("#first"+$.jgrid.jqID(tp)+", #prev"+$.jgrid.jqID(tp)+", #next"+$.jgrid.jqID(tp)+", #last"+$.jgrid.jqID(tp)).click( function() {
var cp = intNum(ts.p.page,1),
last = intNum(ts.p.lastpage,1), selclick = false,
fp=true, pp=true, np=true,lp=true;
@@ -1996,7 +1996,7 @@ $.fn.jqGrid = function( pin ) {
setColWidth = function () {
var initwidth = 0, brd=isSafari? 0: intNum(ts.p.cellLayout,0), vc=0, lvc, scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,
cl = 0, cr;
- $.each(ts.p.colModel, function(i) {
+ $.each(ts.p.colModel, function() {
if(typeof this.hidden === 'undefined') {this.hidden=false;}
this.widthOrg = cw = intNum(this.width,0);
if(this.hidden===false){
@@ -2542,7 +2542,7 @@ $.fn.jqGrid = function( pin ) {
if(grid.resizing){grid.dragMove(e);return false;}
});
$(".ui-jqgrid-labels",grid.hDiv).bind("selectstart", function () { return false; });
- $(document).mouseup(function (e) {
+ $(document).mouseup(function () {
if(grid.resizing) { grid.dragEnd(); return false;}
return true;
});
@@ -3096,7 +3096,7 @@ $.jgrid.extend({
if($t.p.footerrow) { $($t.grid.sDiv).css("width",nwidth+"px"); }
if(shrink ===false && $t.p.forceFit === true) {$t.p.forceFit=false;}
if(shrink===true) {
- $.each($t.p.colModel, function(i) {
+ $.each($t.p.colModel, function() {
if(this.hidden===false){
cw = this.widthOrg? this.widthOrg: parseInt(this.width,10);
initwidth += cw+brd;
View
6 js/grid.common.js
@@ -94,7 +94,7 @@ $.extend($.jgrid,{
coord.left = p.left;
coord.top = p.top+"px";
}
- $("a.ui-jqdialog-titlebar-close",mh).click(function(e){
+ $("a.ui-jqdialog-titlebar-close",mh).click(function(){
var oncm = $("#"+$.jgrid.jqID(aIDs.themodal)).data("onClose") || p.onClose;
var gboxclose = $("#"+$.jgrid.jqID(aIDs.themodal)).data("gbox") || p.gbox;
self.hideModal("#"+$.jgrid.jqID(aIDs.themodal),{gb:gboxclose,jqm:p.jqModal,onClose:oncm});
@@ -240,7 +240,7 @@ $.extend($.jgrid,{
$("#"+$.jgrid.jqID(this.id),"#info_id").bind('click',function(){mopt.buttons[i].onClick.call($("#info_dialog")); return false;});
});
}
- $("#closedialog", "#info_id").click(function(e){
+ $("#closedialog", "#info_id").click(function(){
self.hideModal("#info_dialog",{jqm:jm});
return false;
});
@@ -347,7 +347,7 @@ $.extend($.jgrid,{
type : "GET",
dataType: "html",
context: {elem:elem, options:options, vl:vl},
- success: function(data,status){
+ success: function(data){
var a, ovm = [], elem = this.elem, vl = this.vl,
options = $.extend({},this.options),
msl = options.multiple===true;
View
18 js/grid.custom.js
@@ -145,7 +145,7 @@ $.jgrid.extend({
if(this.ftoolbar) { return; }
var triggerToolbar = function() {
var sdata={}, j=0, v, nm, sopt={},so;
- $.each($t.p.colModel,function(i,n){
+ $.each($t.p.colModel,function(){
nm = this.index || this.name;
so = (this.searchoptions && this.searchoptions.sopt) ? this.searchoptions.sopt[0] : this.stype=='select'? 'eq' : p.defaultSearch;
v = $("#gs_"+$.jgrid.jqID(this.name), (this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv).val();
@@ -194,7 +194,7 @@ $.jgrid.extend({
var clearToolbar = function(trigger){
var sdata={}, j=0, nm;
trigger = (typeof trigger != 'boolean') ? true : trigger;
- $.each($t.p.colModel,function(i,n){
+ $.each($t.p.colModel,function(){
var v;
if(this.searchoptions && this.searchoptions.defaultValue !== undefined) { v = this.searchoptions.defaultValue; }
nm = this.index || this.name;
@@ -296,7 +296,7 @@ $.jgrid.extend({
}
var tr = $("<tr class='ui-search-toolbar' role='rowheader'></tr>");
var timeoutHnd;
- $.each($t.p.colModel,function(i,n){
+ $.each($t.p.colModel,function(){
var cm=this, thd , th, soptions,surl,self;
th = $("<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+$t.p.direction+"'></th>");
thd = $("<div style='width:100%;position:relative;height:100%;padding-right:0.3em;'></div>");
@@ -316,7 +316,7 @@ $.jgrid.extend({
$.ajax($.extend({
url: surl,
dataType: "html",
- success: function(res,status) {
+ success: function(res) {
if(soptions.buildSelect !== undefined) {
var d = soptions.buildSelect(res);
if (d) { $(self).append(d); }
@@ -331,7 +331,7 @@ $.jgrid.extend({
if(soptions.dataInit !== undefined) { soptions.dataInit($("select",self)[0]); }
if(soptions.dataEvents !== undefined) { bindEvents($("select",self)[0],soptions.dataEvents); }
if(p.autosearch===true){
- $("select",self).change(function(e){
+ $("select",self).change(function(){
triggerToolbar();
return false;
});
@@ -378,7 +378,7 @@ $.jgrid.extend({
if(soptions.dataEvents !== undefined) { bindEvents(elem, soptions.dataEvents); }
$(thd).append(elem);
if(p.autosearch===true){
- $(elem).change(function(e){
+ $(elem).change(function(){
triggerToolbar();
return false;
});
@@ -662,7 +662,7 @@ $.jgrid.extend({
$("th:gt("+maxfrozen+")",this).remove();
});
var swapfroz = -1, fdel = -1;
- $("tr.jqg-second-row-header th", htbl).each(function( i ){
+ $("tr.jqg-second-row-header th", htbl).each(function(){
var cs= parseInt($(this).attr("colspan"),10);
if(cs) {
swapfroz = swapfroz+cs;
@@ -675,7 +675,7 @@ $.jgrid.extend({
if(swapfroz !== maxfrozen) {
fdel = maxfrozen;
}
- $("tr.jqg-second-row-header", htbl).each(function( i ){
+ $("tr.jqg-second-row-header", htbl).each(function(){
$("th:gt("+fdel+")",this).remove();
});
} else {
@@ -696,7 +696,7 @@ $.jgrid.extend({
$("tr:first td:eq("+index+")",btd).width( w );
});
// sorting stuff
- $($t).bind('jqGridOnSortCol.setFrozenColumns', function (index, idxcol, so) {
+ $($t).bind('jqGridOnSortCol.setFrozenColumns', function (index, idxcol) {
var previousSelectedTh = $("tr.ui-jqgrid-labels:last th:eq("+$t.p.lastsort+")",$t.grid.fhDiv), newSelectedTh = $("tr.ui-jqgrid-labels:last th:eq("+idxcol+")",$t.grid.fhDiv);
View
41 js/grid.formedit.js
@@ -161,7 +161,7 @@ $.jgrid.extend({
_gridsopt : $.jgrid.search.odata,
ajaxSelectOptions: $t.p.ajaxSelectOptions,
groupOps: p.groupOps,
- onChange : function( sp ) {
+ onChange : function() {
if(this.p.showQuery) {
$('.query',this).html(this.toUserFriendlyString());
}
@@ -170,7 +170,7 @@ $.jgrid.extend({
});
fil.append( bt );
if(found && p.tmplFilters && p.tmplFilters.length) {
- $(".ui-template", fil).bind('change', function(e){
+ $(".ui-template", fil).bind('change', function(){
var curtempl = $(this).val();
if(curtempl=="default") {
$("#"+fid).jqFilter('addFilter', defaultFilters);
@@ -192,7 +192,7 @@ $.jgrid.extend({
$.jgrid.createModal(IDs ,fil,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0]);
}
if(bQ) {
- $("#"+fid+"_query").bind('click', function(e){
+ $("#"+fid+"_query").bind('click', function(){
$(".queryresult", fil).toggle();
return false;
});
@@ -336,7 +336,6 @@ $.jgrid.extend({
onAfterShow = $.isFunction(rp_ge[$t.p.id].afterShowForm) ? rp_ge[$t.p.id].afterShowForm : false,
onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
onInitializeForm = $.isFunction(rp_ge[$t.p.id].onInitializeForm) ? rp_ge[$t.p.id].onInitializeForm : false,
- copydata = null,
showFrm = true,
maxCols = 1, maxRows=0, postdata, extpost, newData, diff, frmoper;
frmgr = $.jgrid.jqID(frmgr);
@@ -356,11 +355,11 @@ $.jgrid.extend({
closeovrl = false;
}
function getFormData(){
- $(frmtb+" > tbody > tr > td > .FormElement").each(function(i) {
+ $(frmtb+" > tbody > tr > td > .FormElement").each(function() {
var celm = $(".customelement", this);
if (celm.length) {
var elem = celm[0], nm = $(elem).attr('name');
- $.each($t.p.colModel, function(i,n){
+ $.each($t.p.colModel, function(){
if(this.name === nm && this.editoptions && $.isFunction(this.editoptions.custom_value)) {
try {
postdata[nm] = this.editoptions.custom_value.call($t, $("#"+$.jgrid.jqID(nm),frmtb),'get');
@@ -492,7 +491,7 @@ $.jgrid.extend({
if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData = {};rp_ge[$t.p.id]._savedData[obj.p.id+"_id"]=rowid;}
var cm = obj.p.colModel;
if(rowid == '_empty') {
- $(cm).each(function(i){
+ $(cm).each(function(){
nm = this.name;
opt = $.extend({}, this.editoptions || {} );
fld = $("#"+$.jgrid.jqID(nm),"#"+fmid);
@@ -558,7 +557,7 @@ $.jgrid.extend({
case "select":
var opv = tmp.split(",");
opv = $.map(opv,function(n){return $.trim(n);});
- $("#"+nm+" option","#"+fmid).each(function(j){
+ $("#"+nm+" option","#"+fmid).each(function(){
if (!cm[i].editoptions.multiple && ($.trim(tmp) == $.trim($(this).text()) || opv[0] == $.trim($(this).text()) || opv[0] == $.trim($(this).val())) ){
this.selected= true;
} else if (cm[i].editoptions.multiple){
@@ -713,7 +712,7 @@ $.jgrid.extend({
$("#FormError",frmtb).show();
} else {
// remove some values if formattaer select or checkbox
- $.each($t.p.colModel, function(i,n){
+ $.each($t.p.colModel, function(){
if(extpost[this.name] && this.formatter && this.formatter=='select') {
try {delete extpost[this.name];} catch (e) {}
}
@@ -950,7 +949,7 @@ $.jgrid.extend({
}
if(showFrm === false) {return;}
restoreInline();
- $($t.p.colModel).each( function(i) {
+ $($t.p.colModel).each( function() {
var fmto = this.formoptions;
maxCols = Math.max(maxCols, fmto ? fmto.colpos || 0 : 0 );
maxRows = Math.max(maxRows, fmto ? fmto.rowpos || 0 : 0 );
@@ -1102,7 +1101,7 @@ $.jgrid.extend({
function(){$(this).addClass('ui-state-hover');},
function(){$(this).removeClass('ui-state-hover');}
);
- $("#sData", frmtb+"_2").click(function(e){
+ $("#sData", frmtb+"_2").click(function(){
postdata = {};extpost={};
$("#FormError",frmtb).hide();
// all depend on ret array
@@ -1125,12 +1124,12 @@ $.jgrid.extend({
}
return false;
});
- $("#cData", frmtb+"_2").click(function(e){
+ $("#cData", frmtb+"_2").click(function(){
if(!checkUpdates()) {return false;}
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal,onClose: rp_ge[$t.p.id].onClose});
return false;
});
- $("#nData", frmtb+"_2").click(function(e){
+ $("#nData", frmtb+"_2").click(function(){
if(!checkUpdates()) {return false;}
$("#FormError",frmtb).hide();
var npos = getCurrPos();
@@ -1150,7 +1149,7 @@ $.jgrid.extend({
}
return false;
});
- $("#pData", frmtb+"_2").click(function(e){
+ $("#pData", frmtb+"_2").click(function(){
if(!checkUpdates()) {return false;}
$("#FormError",frmtb).hide();
var ppos = getCurrPos();
@@ -1220,7 +1219,7 @@ $.jgrid.extend({
tmpl += i == 1 ? tdtmpl : tdtmpl2;
}
// find max number align rigth with property formatter
- $(obj.p.colModel).each( function(i) {
+ $(obj.p.colModel).each( function() {
if(this.editrules && this.editrules.edithidden === true) {
hc = false;
} else {
@@ -1353,7 +1352,7 @@ $.jgrid.extend({
}
}
if(showFrm === false) {return;}
- $($t.p.colModel).each( function(i) {
+ $($t.p.colModel).each( function() {
var fmto = this.formoptions;
maxCols = Math.max(maxCols, fmto ? fmto.colpos || 0 : 0 );
maxRows = Math.max(maxRows, fmto ? fmto.rowpos || 0 : 0 );
@@ -1425,11 +1424,11 @@ $.jgrid.extend({
function(){$(this).removeClass('ui-state-hover');}
);
focusaref();
- $("#cData", "#"+frmtb+"_2").click(function(e){
+ $("#cData", "#"+frmtb+"_2").click(function(){
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: p.onClose});
return false;
});
- $("#nData", "#"+frmtb+"_2").click(function(e){
+ $("#nData", "#"+frmtb+"_2").click(function(){
$("#FormError","#"+frmtb).hide();
var npos = getCurrPos();
npos[0] = parseInt(npos[0],10);
@@ -1447,7 +1446,7 @@ $.jgrid.extend({
focusaref();
return false;
});
- $("#pData", "#"+frmtb+"_2").click(function(e){
+ $("#pData", "#"+frmtb+"_2").click(function(){
$("#FormError","#"+frmtb).hide();
var ppos = getCurrPos();
if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
@@ -1569,7 +1568,7 @@ $.jgrid.extend({
$("#eData","#"+dtbl+"_2").addClass(p.cancelicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.cancelicon[2]+"'></span>");
}
- $("#dData","#"+dtbl+"_2").click(function(e){
+ $("#dData","#"+dtbl+"_2").click(function(){
var ret=[true,""];onCS = {};
var postdata = $("#DelData>td","#"+dtbl).text(); //the pair is name=val1,val2,...
if( $.isFunction( rp_ge[$t.p.id].onclickSubmit ) ) {onCS = rp_ge[$t.p.id].onclickSubmit(rp_ge[$t.p.id], postdata) || {};}
@@ -1667,7 +1666,7 @@ $.jgrid.extend({
}
return false;
});
- $("#eData", "#"+dtbl+"_2").click(function(e){
+ $("#eData", "#"+dtbl+"_2").click(function(){
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal, onClose: rp_ge[$t.p.id].onClose});
return false;
});
View
2  js/grid.import.js
@@ -117,7 +117,7 @@
type:o.mtype,
data: o.impData,
dataType:"json",
- complete: function(json,stat) {
+ complete: function(json) {
try {
jsonConvert(json.responseText,o );
$($t).triggerHandler("jqGridImportComplete", [json, o]);
View
12 js/grid.inlinedit.js
@@ -353,7 +353,7 @@ $.jgrid.extend({
$("input.hasDatepicker","#"+$.jgrid.jqID(ind.id)).datepicker('hide');
} catch (e) {}
}
- $.each($t.p.colModel, function(i,n){
+ $.each($t.p.colModel, function(){
if(this.editable === true && this.name in $t.p.savedRow[fr] ) {
ares[this.name] = $t.p.savedRow[fr][this.name];
}
@@ -385,7 +385,7 @@ $.jgrid.extend({
if (!this.grid ) { return; }
var $t = this;
if(p.useDefValues === true) {
- $($t.p.colModel).each(function(i){
+ $($t.p.colModel).each(function(){
if( this.editoptions && this.editoptions.defaultValue ) {
var opt = this.editoptions.defaultValue,
tmp = $.isFunction(opt) ? opt.call($t) : opt;
@@ -462,7 +462,7 @@ $.jgrid.extend({
title : o.addtitle,
buttonicon : o.addicon,
id : $t.p.id+"_iladd",
- onClickButton : function ( e ) {
+ onClickButton : function () {
$($t).jqGrid('addRow', o.addParams);
if(!o.addParams.useFormatter) {
$("#"+gID+"_ilsave").removeClass('ui-state-disabled');
@@ -479,7 +479,7 @@ $.jgrid.extend({
title : o.edittitle,
buttonicon : o.editicon,
id : $t.p.id+"_iledit",
- onClickButton : function ( e ) {
+ onClickButton : function () {
var sr = $($t).jqGrid('getGridParam','selrow');
if(sr) {
$($t).jqGrid('editRow', sr, o.editParams);
@@ -499,7 +499,7 @@ $.jgrid.extend({
title : o.savetitle || 'Save row',
buttonicon : o.saveicon,
id : $t.p.id+"_ilsave",
- onClickButton : function ( e ) {
+ onClickButton : function () {
var sr = $t.p.savedRow[0].id;
if(sr) {
var opers = $t.p.prmNames,
@@ -528,7 +528,7 @@ $.jgrid.extend({
title : o.canceltitle || 'Cancel row editing',
buttonicon : o.cancelicon,
id : $t.p.id+"_ilcancel",
- onClickButton : function ( e ) {
+ onClickButton : function () {
var sr = $t.p.savedRow[0].id;
if(sr) {
$($t).jqGrid('restoreRow', sr, o.editParams);
View
4 js/grid.jqueryui.js
@@ -78,7 +78,7 @@ $.jgrid.extend({
cmMap = {}, tid= ts.p.id+"_";
$.each(colModel, function(i) { cmMap[this.name]=i; });
var permutation = [];
- th.each(function(i) {
+ th.each(function() {
var id = $(">div", this).get(0).id.replace(/^jqgh_/, "").replace(tid,"");
if (id in cmMap) {
permutation.push(cmMap[id]);
@@ -177,7 +177,7 @@ $.jgrid.extend({
/* Function to get the permutation array, and pass it to the
"done" function */
"apply_perm" : function() {
- $('option',select).each(function(i) {
+ $('option',select).each(function() {
if (this.selected) {
self.jqGrid("showCol", colModel[this.value].name);
} else {
View
2  js/grid.subgrid.js
@@ -175,7 +175,7 @@ addSubGrid : function( pos, sind ) {
return false;
};
var _id, pID,atd, nhc=0, bfsc, r;
- $.each(ts.p.colModel,function(i,v){
+ $.each(ts.p.colModel,function(){
if(this.hidden === true || this.name === 'rn' || this.name === 'cb') {
nhc++;
}
View
20 js/grid.treegrid.js
@@ -191,7 +191,7 @@ $.jgrid.extend({
var childern = $($t).jqGrid("getNodeChildren",record),
//if ($($t).jqGrid("isVisibleNode",record)) {
expanded = $t.p.treeReader.expanded_field;
- $(childern).each(function(i){
+ $(childern).each(function(){
var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
$("#"+$.jgrid.jqID(id),$t.grid.bDiv).css("display","");
if(this[expanded]) {
@@ -207,7 +207,7 @@ $.jgrid.extend({
if(!$t.grid || !$t.p.treeGrid) {return;}
var childern = $($t).jqGrid("getNodeChildren",record),
expanded = $t.p.treeReader.expanded_field;
- $(childern).each(function(i){
+ $(childern).each(function(){
var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
$("#"+$.jgrid.jqID(id),$t.grid.bDiv).css("display","none");
if(this[expanded]){
@@ -225,7 +225,7 @@ $.jgrid.extend({
switch ($t.p.treeGridModel) {
case 'nested' :
var level = $t.p.treeReader.level_field;
- $($t.p.data).each(function(i){
+ $($t.p.data).each(function(){
if(parseInt(this[level],10) === parseInt($t.p.tree_root_level,10)) {
result.push(this);
}
@@ -233,7 +233,7 @@ $.jgrid.extend({
break;
case 'adjacency' :
var parent_id = $t.p.treeReader.parent_id_field;
- $($t.p.data).each(function(i){
+ $($t.p.data).each(function(){
if(this[parent_id] === null || String(this[parent_id]).toLowerCase() == "null") {
result.push(this);
}
@@ -281,7 +281,7 @@ $.jgrid.extend({
case 'adjacency' :
var parent_id = $t.p.treeReader.parent_id_field,
dtid = $t.p.localReader.id;
- $(this.p.data).each(function(i,val){
+ $(this.p.data).each(function(){
if(this[dtid] == rc[parent_id] ) {
result = this;
return false;
@@ -303,7 +303,7 @@ $.jgrid.extend({
rgtc = $t.p.treeReader.right_field,
levelc = $t.p.treeReader.level_field,
lft = parseInt(rc[lftc],10), rgt = parseInt(rc[rgtc],10), level = parseInt(rc[levelc],10);
- $(this.p.data).each(function(i){
+ $(this.p.data).each(function(){
if(parseInt(this[levelc],10) === level+1 && parseInt(this[lftc],10) > lft && parseInt(this[rgtc],10) < rgt) {
result.push(this);
}
@@ -312,7 +312,7 @@ $.jgrid.extend({
case 'adjacency' :
var parent_id = $t.p.treeReader.parent_id_field,
dtid = $t.p.localReader.id;
- $(this.p.data).each(function(i,val){
+ $(this.p.data).each(function(){
if(this[parent_id] == rc[dtid]) {
result.push(this);
}
@@ -333,7 +333,7 @@ $.jgrid.extend({
rgtc = $t.p.treeReader.right_field,
levelc = $t.p.treeReader.level_field,
lft = parseInt(rc[lftc],10), rgt = parseInt(rc[rgtc],10), level = parseInt(rc[levelc],10);
- $(this.p.data).each(function(i){
+ $(this.p.data).each(function(){
if(parseInt(this[levelc],10) >= level && parseInt(this[lftc],10) >= lft && parseInt(this[lftc],10) <= rgt) {
result.push(this);
}
@@ -473,7 +473,7 @@ $.jgrid.extend({
records.push(rec);
$(this).jqGrid("collectChildrenSortTree",records, rec, sortname, newDir,st, datefmt);
}
- $.each(records, function(index, row) {
+ $.each(records, function(index) {
var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
$('#'+$.jgrid.jqID($t.p.id)+ ' tbody tr:eq('+index+')').after($('tr#'+$.jgrid.jqID(id),$t.grid.bDiv));
});
@@ -557,7 +557,7 @@ $.jgrid.extend({
var expanded = $t.p.treeReader.expanded_field,
isLeaf = $t.p.treeReader.leaf_field,
level = $t.p.treeReader.level_field,
- icon = $t.p.treeReader.icon_field,
+ //icon = $t.p.treeReader.icon_field,
parent = $t.p.treeReader.parent_id_field,
left = $t.p.treeReader.left_field,
right = $t.p.treeReader.right_field,
View
16 js/jquery.fmatter.js
@@ -344,7 +344,7 @@
return $.fn.fmatter.defaultFormat(cellval, opts);
}
};
- $.fn.fmatter.select = function (cellval,opts, rwd, act) {
+ $.fn.fmatter.select = function (cellval,opts) {
// jqGrid specific
cellval = cellval + "";
var oSelect = false, ret=[], sep, delim;
@@ -367,10 +367,10 @@
for(var i=0; i<so.length;i++){
sv = so[i].split(sep);
if(sv.length > 2 ) {
- sv[1] = jQuery.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
+ sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
}
if(msl) {
- if(jQuery.inArray(sv[0],scell)>-1) {
+ if($.inArray(sv[0],scell)>-1) {
ret[j] = sv[1];
j++;
}
@@ -382,7 +382,7 @@
} else if($.fmatter.isObject(oSelect)) {
// this is quicker
if(msl) {
- ret = jQuery.map(scell, function(n, i){
+ ret = $.map(scell, function(n){
return oSelect[n];
});
} else {
@@ -464,7 +464,7 @@
break;
}
};
- $.fn.fmatter.actions = function(cellval,opts, rwd) {
+ $.fn.fmatter.actions = function(cellval,opts) {
var op ={keys:false, editbutton:true, delbutton:true, editformbutton: false};
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
op = $.extend(op,opts.colModel.formatoptions);
@@ -559,10 +559,10 @@
for(var i=0; i<so.length;i++){
sv = so[i].split(sep);
if(sv.length > 2 ) {
- sv[1] = jQuery.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
+ sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
}
if(msl) {
- if(jQuery.inArray(sv[1],scell)>-1) {
+ if($.inArray(sv[1],scell)>-1) {
ret[j] = sv[0];
j++;
}
@@ -573,7 +573,7 @@
}
} else if($.fmatter.isObject(oSelect) || $.isArray(oSelect) ){
if(!msl) {scell[0] = cell;}
- ret = jQuery.map(scell, function(n){
+ ret = $.map(scell, function(n){
var rv;
$.each(oSelect, function(i,val){
if (val == n) {
Please sign in to comment.
Something went wrong with that request. Please try again.