<?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='sfselectit7601' value='Select Code' data-codeid='sfcode7601' /></p>
<div class='sfcode' id='sfcode7601'>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='sfselectit3005' value='Select Code' data-codeid='sfcode3005' /></p>
<div class='sfcode' id='sfcode3005'>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='sfselectit7583' value='Select Code' data-codeid='sfcode7583' /></p>
<div class='sfcode' id='sfcode7583'>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='sfselectit9212' value='Select Code' data-codeid='sfcode9212' /></p>
<div class='sfcode' id='sfcode9212'>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='sfselectit8748' value='Select Code' data-codeid='sfcode8748' /></p>
<div class='sfcode' id='sfcode8748'>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='sfselectit4857' value='Select Code' data-codeid='sfcode4857' /></p>
<div class='sfcode' id='sfcode4857'>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='sfselectit5392' value='Select Code' data-codeid='sfcode5392' /></p>
<div class='sfcode' id='sfcode5392'>var oncret =  o.onClose(selector);</div>
<p>to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8508' value='Select Code' data-codeid='sfcode8508' /></p>
<div class='sfcode' id='sfcode8508'>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>