<?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: support default values for $.jgrid.createModal</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal</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/feature-request/support-default-values-for-jgrid-createmodal/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on support default values for $.jgrid.createModal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p27293</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p27293</guid>
        	        	<description><![CDATA[<p>Thanks Oleg,</p>
<p>Fixed in GitHub.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 10 Sep 2012 19:28:41 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on support default values for $.jgrid.createModal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p27244</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p27244</guid>
        	        	<description><![CDATA[<p>Sorry Tony, but in both: my suggestion and your implementation there are bugs. The correct line of code should be</p>
<p><input type='button' class='sfcodeselect' name='sfselectit801' value='Select Code' data-codeid='sfcode801' /></p>
<div class='sfcode' id='sfcode801'>p = $.extend(true, <strong>{}, </strong>$.jgrid.jqModal &#124;&#124; {}, p);</div>
<p>The currect code (see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L49" target="_blank">here</a>)</p>
<p><input type='button' class='sfcodeselect' name='sfselectit492' value='Select Code' data-codeid='sfcode492' /></p>
<div class='sfcode' id='sfcode492'>p = $.extend(true, $.jgrid.jqModal &#124;&#124; {}, p);</div>
<p><strong><em><span style="text-decoration: underline;">changes</span></em></strong> the value of <strong>$.jgrid.jqModal</strong> on every execution of <strong>createModal</strong> function with the value of <strong>p</strong> parameter. Moreover, the currect code of <strong>navGrid</strong>&#160;contains the definition of&#160;<strong>alertzIndex : null</strong> (see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.formedit.js#L1727" target="_blank">the line</a>)&#160;which ovewrite the <strong>$.jgrid.jqModal.zIndex</strong>&#160;value.</p>
<p>I think that the line <strong>alertzIndex : null</strong>&#160;should be either removed or replaced with <strong>alertzIndex : undefined</strong>.</p>
<p>There are one more problem in <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L204" target="_blank">the line</a></p>
<p><input type='button' class='sfcodeselect' name='sfselectit2846' value='Select Code' data-codeid='sfcode2846' /></p>
<div class='sfcode' id='sfcode2846'>$.extend(mopt,modalopt &#124;&#124; {});</div>
<p>of the method <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L184" target="_blank">info_dialog</a>&#160;and with the settings of properties like <strong>zIndex : 1000</strong> at the beginning of the function (see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L194" target="_blank">the line</a>). As the result the default value set at the beginging of <strong>info_dialog</strong> (like <strong>zIndex : 1000</strong>) will be forward to <strong>$.jgrid.createModal</strong> (see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L229-237" target="_blank">here</a>) and will&#160;<span style="text-decoration: underline;"><em>overwrite</em></span> the default settings from <strong>$.jgrid.jqModal</strong> (see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L49" target="_blank">the first line</a> of the <strong>createModal</strong> method).</p>
<p>As the result the <strong>$.jgrid.jqModal</strong>&#160;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 <strong>zIndex : 1000&#160;</strong>will be allways used.</p>
<p>It seems to me, that one can solve the problem by changing the line <strong>$.extend(mopt,modalopt &#124;&#124; {});</strong>&#160;of <strong>info_dialog</strong> to something like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4894' value='Select Code' data-codeid='sfcode4894' /></p>
<div class='sfcode' id='sfcode4894'>$.extend(true, mopt, $.jgrid.jqModal &#124;&#124; {}, {caption:&#34;&#60;b&#62;&#34;+caption+&#34;&#60;/b&#62;&#34;},<br />&#160; &#160; modalopt &#124;&#124; {});</div>
<p>Additionally one should remove initializing of <strong>caption</strong> property of <strong>mopt</strong> (in the first line of the code).</p>
<p>I hope that all the changes will allows to set default setting (like <strong>zIndex</strong>) of jqGrid dialogs.</p>
<p>Best regards<br />Oleg</p></p>
]]></description>
        	        	<pubDate>Sat, 01 Sep 2012 22:47:50 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on support default values for $.jgrid.createModal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26878</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26878</guid>
        	        	<description><![CDATA[<p>You are right Tony, the usage of <strong>$.jgrid.jqModal &#124;&#124; {}</strong> is definitively better.</p>
<p>Regards<br />Olge&#160;</p>
]]></description>
        	        	<pubDate>Sun, 01 Jul 2012 13:54:22 +0300</pubDate>
        </item>
        <item>
        	<title>tony on support default values for $.jgrid.createModal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26877</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26877</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>I have done it llike this:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1346' value='Select Code' data-codeid='sfcode1346' /></p>
<div class='sfcode' id='sfcode1346'>
<p>p = $.extend(true, $.jgrid.jqModal &#124;&#124; {}, p)</p>
</div>
]]></description>
        	        	<pubDate>Sun, 01 Jul 2012 13:37:56 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on support default values for $.jgrid.createModal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26863</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/support-default-values-for-jgrid-createmodal#p26863</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>many jqGrid methods allow to set default values for parameters by extending some "default" objects (like <strong>$.jgrid.defaults</strong>, <strong>$.jgrid.search</strong>, <strong>$.jgrid.edit</strong>, <strong>$.jgrid.nav</strong>, <strong>$.jgrid.del</strong>, <strong>$.jgrid.view</strong>, <strong>$.jgrid.inlineEdit</strong> and so on). I personally find the way very practical. So I suggest to infroduce one more "default" object used by <strong>$.jgrid.createModal</strong>.</p>
<p>If one instert as the first line of the code of <strong>$.jgrid.createModal</strong>&#160;the following line</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3054' value='Select Code' data-codeid='sfcode3054' /></p>
<div class='sfcode' id='sfcode3054'>p = $.extend(true, {$.jgrid.createModal, p);</div>
<p>then one will be able for example to set some common options like <strong>zIndex</strong> or <strong>closeOnEscape</strong>. The current code of <strong>navGrid</strong> supports (but don&#39;t documents) the options <strong>alertzIndex</strong> (of <strong>closeOnEscape</strong>) for example, but all other calls of <strong>$.jgrid.createModal</strong> in <em>grid.formedit.js</em> don&#39;t have the possibility. Introduction of <strong>$.jgrid.createModal</strong>&#160;(I didn&#39;t found the better name) will be helpful for all cases of usage <strong>$.jgrid.createModal</strong> method.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Wed, 27 Jun 2012 19:30:20 +0300</pubDate>
        </item>
</channel>
</rss>