Forum
19:30
10/08/2009
Hello Tony,
many jqGrid methods allow to set default values for parameters by extending some "default" objects (like $.jgrid.defaults, $.jgrid.search, $.jgrid.edit, $.jgrid.nav, $.jgrid.del, $.jgrid.view, $.jgrid.inlineEdit and so on). I personally find the way very practical. So I suggest to infroduce one more "default" object used by $.jgrid.createModal.
If one instert as the first line of the code of $.jgrid.createModal the following line
then one will be able for example to set some common options like zIndex or closeOnEscape. The current code of navGrid supports (but don't documents) the options alertzIndex (of closeOnEscape) for example, but all other calls of $.jgrid.createModal in grid.formedit.js don't have the possibility. Introduction of $.jgrid.createModal (I didn't found the better name) will be helpful for all cases of usage $.jgrid.createModal method.
Best regards
Oleg
13:37
Moderators
30/10/2007
Hello Oleg,
I have done it llike this:
p = $.extend(true, $.jgrid.jqModal || {}, p)
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.
22:47
10/08/2009
Sorry Tony, but in both: my suggestion and your implementation there are bugs. The correct line of code should be
The currect code (see here)
changes the value of $.jgrid.jqModal on every execution of createModal function with the value of p parameter. Moreover, the currect code of navGrid contains the definition of alertzIndex : null (see the line) which ovewrite the $.jgrid.jqModal.zIndex value.
I think that the line alertzIndex : null should be either removed or replaced with alertzIndex : undefined.
There are one more problem in the line
of the method info_dialog and with the settings of properties like zIndex : 1000 at the beginning of the function (see the line). As the result the default value set at the beginging of info_dialog (like zIndex : 1000) will be forward to $.jgrid.createModal (see here) and will overwrite the default settings from $.jgrid.jqModal (see the first line of the createModal method).
As the result the $.jgrid.jqModal works currently only in some cases of the usage in form editing, but not works in other cases. For example in case of displaying of validation errors in inline editing the value zIndex : 1000 will be allways used.
It seems to me, that one can solve the problem by changing the line $.extend(mopt,modalopt || {}); of info_dialog to something like
modalopt || {});
Additionally one should remove initializing of caption property of mopt (in the first line of the code).
I hope that all the changes will allows to set default setting (like zIndex) of jqGrid dialogs.
Best regards
Oleg
19:28
Moderators
30/10/2007
Thanks Oleg,
Fixed in GitHub.
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.
Most Users Ever Online: 715
Currently Online:
20 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