Forum
15:02
10/08/2009
Hello Tony!
I verified current sources from http://github.com/tonytomov/jq.....d/tree/dev with respect of JSLint. Here are the results:
grid.grouping.js:
Line 226: „return v=v+1;“ should be replaced to return v+1;
Lines 17,38,125,153: Missing semicolon
Line 138: Unused variable hs.
Line 88: Missing radix parameter in the parseInt() function.
In the line 8 are used isObject() function which is not defined here. It is defined in the line 543 of jquery.fmatter.js.
grid.common.js:
In lines 235, 244 one should add '{' … '}' after if-statement
jquery.fmatter.js:
In the lines 500-503 are defined debug() function which are not used.
At the line 102 would be better to replace dateFormat["i18n"] to the dateFormat.i18n
Unescaped '-' are used in the lines 90,91,112,113.
grid.custom.js:
switch-statemant from the line 263 will be recommended to replace with the if-statement.
grid.base.js:
at line 1309 are use cmtypes=grtypes=[] inside a var declaration. If should be probably replaced to the cmtypes=[], grtypes=[].
Unescaped '-' are used in the lines 70, 71.
Missing semicolon are found at the lines 1154,2365,2546.
The Object grpdata defined in the line 1017 are used in 1092, 1093. It is defined in the scope of if block defined in the line 1014 and closed in the line 1089.
Exactly in the same way the variable rn defined in the line 1015 are used in 1107. It is defined in the scoup of if block defined in the line 1014 and closed in the line 1089.
Because the scope of the variable in JavaScript is function and not block it is not real error, but it is not nice to do this.
Unused variable: ft defined in the line 67 and sortype defined in the line 1309
grid.formedit.js:
Lines 88-91 should be better reformated to have ',' as the last character at the line and not the first one.
The line 246 should be probably started with "var " or ';' on the previous line should be replaced to ','.
Missing semicolon at the lines 1025,1035,1036,1490,1491
Indexed usage of properties in the lines 1027,1029,1035,1482,1484,1490 (like ajaxOptions['url']) should be better written in dot notation.
Variable searchable are defined in the line 133 will not be used (see line 135 defines another one which hide the variable defined in the line 133)
Variable copydata defined and assigned in the line 339 (see line 332) are never used. Function postIt() define and use another local copydata variable.
Variables gurl and ret defined in the line 320 will be never used.
Variable valref will be defined twice in the lines 421 and 1103 and will be never used.
Variable dummy defined in the line 882 will be never used.
Variable flr defined in the line 1099 will be never used.
Variables tdl and tde defined in the line 1226 will be never used.
Variable opt defined in the line 1272 will be never used.
grid.setcolumns.js:
Missing semicolon at the line 60.
In the line 91 one should add '{' … '}' after if-statement
grid.subgrid.js:
Unused variable res declered in the line 79 and variable cur declered in the line 129.
grid.treegrid.js:
Missing semicolon at the lines 178, 375, 406.
Unused variable nm declered in the line 461.
Every file from the i18n directory has the same old small syntax problem – missing semicolon after the return statement inside of the definition of the function $.jgridformatter.date.S.
For example, grid.locale-en.js
has in the line 103 return statment without ';'
Best regards
Oleg
16:43
25/08/2010
Hello,
I just found a bug that appears when grouping option is enabled and my search does not return any result.
grid.base.js line 1255:
$(ts).jqGrid('groupingRender',grpdata,F.length+gi+si+ni);
>> F is undefined
Cheers,
Sylvestre.
09:49
Moderators
30/10/2007
Oleg,
Thanks. As usual very good fixes and recommendations.
I wil fix these when I'm back from the vacantion.
Kind Regards
tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
15:57
10/08/2009
Hi Tony!
One more remark. The functions at the end of jquery.fmatter.js (isValue, isNull, isNumber, isString, isEmpty, isUndefined, isObject, isFunction) are defined as global and without any namespace! Is it what you want? Moreover $.isFunction use another implementation of isFunction: return toString.call(obj) === "[object Function]"; Is the way probably more safe?
Where more this global functions are used. One place is line 8 of grid.grouping.js. Where more?
Best regards
Oleg
19:21
Moderators
30/10/2007
Oleg,
Thank you very much for all what you do.
We will correct these.
Thanks again
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
12:19
Moderators
30/10/2007
Oleg,
I have do a lot of improvents and fixes.
Will publish it later this day.
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
33 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66