Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
some suggestions from JSLint to jqGrid 3.8 beta
Tags: jslint
30/08/2010
15:02
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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

02/09/2010
16:43
Avatar
sho
Member
Members
Forum Posts: 6
Member Since:
25/08/2010
sp_UserOfflineSmall Offline

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.

03/09/2010
09:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

03/09/2010
12:29
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Tony,

I wish you have a good time and much pleasure in the vacation.

Best wishes

Oleg

10/09/2010
15:57
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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

10/09/2010
19:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

10/09/2010
20:38
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You welcome!

Everybody should have sometime vacation and a little time for his family.

Best regards
Oleg 

11/09/2010
12:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information