Hello Tony,
first of all one should fix three places of calling $.jgrid.hideModal with wrong first parameter. The line of the code of createModal
self.hideModal(this,{gb:p.gbox,jqm:p.jqModal,onClose: cone});
should be fixed to
self.hideModal("#"+$.jgrid.jqID(aIDs.themodal),{gb:p.gbox,jqm:p.jqModal,onClose: cone});
In the same way another line of the code of editGridRow
if(cle) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}
should be fixed to
if(cle) {$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}
and the line of viewGridRow
if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
should be fixed to
if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
Additionally I suggest to adjust a little the code of hideModal to call onClose method with the value of this exactly the same as for all other callbacks of jqGrid inclusive callbacks of form editing. To do this one can change the line of code of hideModal
var oncret = o.onClose(selector);
to
var oncret = o.gb && typeof o.gb === "string" && o.gb.substr(0,6) === "#gbox_" ?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top