<?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: Cellattr and font-style</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/cellattr-and-font-style</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/cellattr-and-font-style/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Cellattr and font-style</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cellattr-and-font-style#p28120</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cellattr-and-font-style#p28120</guid>
        	        	<description><![CDATA[<p>I think that it would be better to rewrite the code which parse cellattr and use</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1961' value='Select Code' data-codeid='sfcode1961' /></p>
<div class='sfcode' id='sfcode1961'>/^\s*(\w+)\s*=\s*([\&#34;&#124;\&#39;])(.*?)\2(.*)/.exec(...)</div>
<p>to parce the results returned from <strong>cellattr</strong> callback. If one use</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2845' value='Select Code' data-codeid='sfcode2845' /></p>
<div class='sfcode' id='sfcode2845'>var attrStr = cm.cellattr.call(...), matches, name, value, quote, tilteValue,&#160;classes = &#34;&#34;;<br />if (attrStr &#38;&#38; typeof attrStr === &#34;string&#34;) {<br />&#160; &#160; // ??? probably one can create object with properties from the attrStr<br />&#160; &#160; // and then to use one common function with constructTr to combin the default<br />&#160; &#160; // properties with the properties used in cellattr and rowattr.<br />&#160; &#160; // Probably one could use $.extend with the most attributes. The exception are<br />&#160; &#160; // only class and style attributes which hold multi-values with &#34; &#34; or &#34;;&#34; as separator<br />&#160; &#160; while (true) {<br />&#160; &#160; &#160; &#160; // we have to use ? in the construction ([^\2]*?) to have non-greedy (lazy, minimal) matching<br />&#160; &#160; &#160; &#160; // so that we will find the FIRST closing quote instead of default the LAST matching.<br />&#160; &#160; &#160; &#160; matches = /^\s*(\w+)\s*=\s*([\&#34;&#124;\&#39;])(.*?)\2(.*)/.exec(attrStr);<br />&#160; &#160; &#160; &#160; if (matches === null &#124;&#124; matches.length &#60; 5) {<br />&#160; &#160; &#160; &#160; &#160; &#160; ... // need nothing to done one need use styleValue, classes and tilteValue<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; // to generate the results<br />&#160; &#160; &#160; &#160; }<br />&#160; &#160; &#160; &#160; name = matches[1].toLowerCase();<br />&#160; &#160; &#160; &#160; quote = matches[2]; // one should better use the character to quote the value matches[3]<br />&#160; &#160; &#160; &#160; value = matches[3];<br />&#160; &#160; &#160; &#160; attrStr = matches[4];<br />&#160; &#160; &#160; &#160; switch (name) {<br />&#160; &#160; &#160; &#160; &#160; &#160; case &#34;class&#34;:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; // if some spetial characters are inside of class value there MUST be escaped<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; // so we can use any quote characters (&#39; or &#34;) around the call value.<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; // So we don&#39;t need to save quote used in class attribute<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if (classes) {<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; classes += &#34; &#34; + value;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; } else {<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; classes = value;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; break;<br />&#160; &#160; &#160; &#160; &#160; &#160; case &#34;title&#34;:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; tilteValue = value;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; break;<br />&#160; &#160; &#160; &#160; &#160; &#160; case &#34;style&#34;:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; styleValue += value;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; break;<br />&#160; &#160; &#160; &#160; &#160; &#160; default:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; rest += &#34; &#34; + matches[1] + &#34;=&#34; + quote + value + quote;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; break;<br />&#160; &#160; &#160; &#160; }<br />&#160; &#160; }<br />}</div>
<p>It&#39;s just an example how the code looks like.</p>
<p><span style="font-size: 14px;">Regards<br /></span><span style="font-size: 14px;">Oleg&#160;</span></p>
]]></description>
        	        	<pubDate>Fri, 25 Jan 2013 13:57:37 +0200</pubDate>
        </item>
        <item>
        	<title>Azerty on Cellattr and font-style</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cellattr-and-font-style#p28117</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cellattr-and-font-style#p28117</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>i found what i think is a bug, i am able to set any style parameter in the cell attr function except font-style.</p>
<p>I fixed it on my side writing acp = celp.split("style="); instead of acp = celp.split("style"); in formatCol function of jqGrid.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Thu, 24 Jan 2013 23:11:00 +0200</pubDate>
        </item>
</channel>
</rss>