<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Fixing calls of hideModal and setting this in onClose</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Fixing calls of hideModal and setting this in onClose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose#p27724</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose#p27724</guid>
        	        	<description><![CDATA[<p>Thanks Oleg.</p>
]]></description>
        	        	<pubDate>Mon, 12 Nov 2012 09:42:43 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Fixing calls of hideModal and setting this in onClose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose#p27718</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fixing-calls-of-hidemodal-and-setting-this-in-onclose#p27718</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>first of all one should fix three places of calling <strong>$.jgrid.hideModal</strong> with wrong first parameter. <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L154" target="_blank">The line</a> of the code of <strong>createModal</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit3173' value='Select Code' data-codeid='sfcode3173' /></p>
<div class='sfcode' id='sfcode3173'>self.hideModal(this,{gb:p.gbox,jqm:p.jqModal,onClose: cone});</div>
<p>should be fixed to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2960' value='Select Code' data-codeid='sfcode2960' /></p>
<div class='sfcode' id='sfcode2960'>self.hideModal(<strong>&#34;#&#34;+$.jgrid.jqID(aIDs.themodal)</strong>,{gb:p.gbox,jqm:p.jqModal,onClose: cone});</div>
<p>In the same way <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.formedit.js#L1040" target="_blank">another line</a> of the code of <strong>editGridRow</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit7172' value='Select Code' data-codeid='sfcode7172' /></p>
<div class='sfcode' id='sfcode7172'>if(cle)	{$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}</div>
<p>should be fixed to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7751' value='Select Code' data-codeid='sfcode7751' /></p>
<div class='sfcode' id='sfcode7751'>if(cle) {$.jgrid.hideModal(<strong>&#34;#&#34;+$.jgrid.jqID(IDs.themodal)</strong>,{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}</div>
<p>and <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.formedit.js#L1422" target="_blank">the line</a> of viewGridRow</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6426' value='Select Code' data-codeid='sfcode6426' /></p>
<div class='sfcode' id='sfcode6426'>if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}</div>
<p>should be fixed to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9839' value='Select Code' data-codeid='sfcode9839' /></p>
<div class='sfcode' id='sfcode9839'>if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal(<strong>&#34;#&#34;+$.jgrid.jqID(IDs.themodal)</strong>,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}</div>
<p>Additionally I suggest to adjust a little the code of <strong>hideModal</strong> to call <strong>onClose</strong> method with the value of <strong>this</strong> exactly the same as for all other callbacks of jqGrid inclusive callbacks of form editing. To do this one can change <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L24" target="_blank">the line</a> of code of <strong>hideModal</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit9130' value='Select Code' data-codeid='sfcode9130' /></p>
<div class='sfcode' id='sfcode9130'>var oncret =  o.onClose(selector);</div>
<p>to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8435' value='Select Code' data-codeid='sfcode8435' /></p>
<div class='sfcode' id='sfcode8435'>var oncret = <strong>o.gb &#38;&#38; typeof o.gb === &#34;string&#34; &#38;&#38; o.gb.substr(0,6) === &#34;#gbox_&#34; ?<br />&#160; &#160; o.onClose.call($(&#34;#&#34; + o.gb.substr(6))[0], selector) :</strong><br />&#160; &#160; o.onClose(selector);&#160;</div>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Sun, 11 Nov 2012 16:25:53 +0200</pubDate>
        </item>
</channel>
</rss>