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_TopicIcon
Some Bugfixes for 3.6.5
05/05/2010
18:03
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Hello Tony,

I've just updated to the latest jqGrid release 3.6.5.

Many of my previous bug fixes have already been applied and included – thank you

But the following fixes should improve stability by preventing access to unavailable fields – most times these problemes only occur with async tasks (esp. with IE)

@addXmlData:
  ts.p.totaltime = new Date() – startReq;
  if(ir>0 && ts.rows && ts.rows.length > 0) { ts.grid.cols = ts.rows[0].cells; if(ts.p.records===0) { ts.p.records=gl;} }  // FIX: prevent access on undefined object (rare error case in IE)

@addJSONData:
  ts.p.totaltime = new Date() – startReq;
  if(ir>0 && ts.rows && ts.rows.length > 0) {ts.grid.cols = ts.rows[0].cells;if(ts.p.records===0)ts.p.records=len;}  // FIX: prevent access on undefined object (rare error case in IE)

@setGridWidth:
  return this.each(function(){
+   if (!this.grid) {return;}     // FIX: accessing $t.p… for non jqgrid elems
    var $t = this, cw,
    initwidth = 0, brd=$t.p.cellLayout, lvc, vc=0, hs=false, scw=$t.p.scrollOffset, aw, gw=0, tw=0,
    cl = 0,cr;
-   if (!$t.grid ) {return;}
    …  

@getCellIndex:
  getCellIndex : function (cell) {
-    cell = $(cell);
-    cell = (!cell.is('td') && !cell.is('th') ? cell.closest("td,th") : cell)[0];
-    if ($.browser.msie) { return $.inArray(cell, cell.parentNode.cells); }
-    return cell.cellIndex;
+   // FIX: avoid exception when given dom node is a tr
+   var c = $(cell);
+   if (c.is('tr')) { return -1; }
+   c = (!c.is('td') && !c.is('th') ? c.closest("td,th") : c)[0];
+   if ($.browser.msie) return $.inArray(c, c.parentNode.cells);
+   return c.cellIndex;
  }

another improvement I applied in the jqGrid JS-files is for the document-body selectors:

replace $('body') -> with $(document.body) .. in all JS-files

Kind regards,
Klaus.

06/05/2010
13:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

HEllo,

Thanks Klaus, all of these have sense. Will be added.

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

07/05/2010
11:37
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

here is another fix:

$.jgrid.extend({
  getGridParam : function(pName) {
    var $t = this[0];
-     if (!$t.grid) {return;}
+     if (!$t || !$t.grid) {return;}    //FIX: avoid exception for empty jQuery sets           
    if (!pName) { return $t.p; }
    else {return typeof($t.p[pName]) != "undefined" ? $t.p[pName] : null;}
  },

12/05/2010
15:47
Avatar
dajaney
Member
Members
Forum Posts: 20
Member Since:
22/01/2010
sp_UserOfflineSmall Offline

Klaus, you are awesome  🙂

You don't just complain, you provide solutions. The perfect tester!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
21 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