The grid is setting ‘info_dialog’ top relative to the window.innerHeight or clientHeight. If the page is longer than the browser widow and the grid is at the bottom of the page, the dialog will be above the grid. Or possibly out of view if the page is very long.
The solution is to position the dialog relative to the grid and not the window. I did this by changing code in “navGrid : function” as shown below
if(!o.alerttop && !o.alertleft) {
if (window.innerWidth !== undefined) {
o.alertleft = window.innerWidth;
o.alerttop = window.innerHeight;
} else if (document.documentElement !== undefined && document.documentElement.clientWidth !== undefined && document.documentElement.clientWidth !== 0) {
o.alertleft = document.documentElement.clientWidth;
o.alerttop = document.documentElement.clientHeight;
} else {
o.alertleft=1024;
o.alerttop=768;
}
o.alertleft = o.alertleft/2 – parseInt(o.alertwidth,10)/2;
o.alerttop = o.alerttop/2-25;
}
To this:
if(!o.alerttop && !o.alertleft) {
var pos=$.jgrid.findPos(this);
pos[0]=Math.round(pos[0]);
pos[1]=Math.round(pos[1]);
o.alertleft = pos[0] + (this.p.width/2)-parseInt(o.alertwidth,10)/2;
o.alerttop = pos[1] + (this.p.height/2)-25;
}
To position the dialog top left of grid (like the search dialog) use
o.alertleft = pos[0];
o.alerttop = pos[1];
Rayhal
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top