<?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: Sort Icon not always visible ...</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible</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/sort-icon-not-always-visible/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>benk@b1-systems.de on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30342</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30342</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>yes, you are right.</p>
</p>
<p>But i want the sort icon on the left and next to it the label.If the label is too wide</p>
<p>to be displayed, it will be cut off on the right, but the icon is still positioned next to</p>
<p>the label. The label will not overwrite the sort icon.</p>
</p>
<p>I have achieved this by adding an extra span (span.col-header-name) for the label</p>
<p>and using the following css. I do not know how to achieve the same without patching</p>
<p>the jqgrid source.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9122' value='Select Code' data-codeid='sfcode9122' /></p>
<div class='sfcode' id='sfcode9122'>
<p>// fix table sort icon &#8211; position to the left</p>
<p>.ui-jqgrid .ui-jqgrid-sortable span.s-ico {</p>
<p>&#160; float : left;</p>
<p>}</p>
</p>
<p>// dynamically add margin-left to span.colheadername if s-ico shown</p>
<p>.ui-jqgrid .ui-jqgrid-sortable span.col-header-name {</p>
<p>&#160; display  : inline-block;</p>
<p>&#160; position : absolute;</p>
<p>&#160; left     : 17px;</p>
<p>}</p>
</div>
<p>&#160;
</p>
<p>Greetings,</p>
<p>-timo</p></p>
]]></description>
        	        	<pubDate>Sun, 09 Mar 2014 11:23:52 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30277</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30277</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>After the grid is created you can do this:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1748' value='Select Code' data-codeid='sfcode1748' /></p>
<div class='sfcode' id='sfcode1748'>
<p>jQuery(&#39;span.s-ico&#39;).css({position:&#39;absolute&#39;, left:&#39;0px&#39;,top:&#39;0px&#39;});</p>
</div>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 24 Feb 2014 17:00:35 +0200</pubDate>
        </item>
        <item>
        	<title>benk@b1-systems.de on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30266</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p30266</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>just want to pop this task up again.</p>
</p>
<p>I think this would be simple to implement and large tables would benefit from this one.</p>
</p>
<p>Greetings,</p>
<p>-timo</p>
]]></description>
        	        	<pubDate>Fri, 21 Feb 2014 10:14:09 +0200</pubDate>
        </item>
        <item>
        	<title>Klaus on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16920</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16920</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>here are my changes to put the sort-icon to the front of the column header cell &#8230; (based on jqGrid 3.6.4)</p>
<p>CSS:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7029' value='Select Code' data-codeid='sfcode7029' /></p>
<div class='sfcode' id='sfcode7029'>
<p>/* fix table sort icon &#8211; position to the left */<br />.ui-jqgrid .ui-jqgrid-sortable span.s-ico {<br />&#160; position: absolute;<br />&#160; left: 0;<br />}</p>
<p>/* dynamically add margin-left to span.colheadername if s-ico shown */<br />.ui-jqgrid .ui-jqgrid-sortable span.colHeaderName.sortActive {<br />&#160; margin-left: 15px;<br />}</p>
</div>
<p>JS:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1475' value='Select Code' data-codeid='sfcode1475' /></p>
<div class='sfcode' id='sfcode1475'>
<p>@ sortData = function &#8230;&#160; // show/hide sort-icon span and apply CSS class sortActive</p>
<p>&#160; if(!ts.p.viewsortcols[0]) {<br />&#160;&#160;&#160; if(ts.p.lastsort != idxcol) {<br />&#160;&#160;&#160;&#160;&#160; $(&#34;tr th:eq(&#34;+ts.p.lastsort+&#34;) span.s-ico&#34;,thd).hide();<br />+&#160;&#160;&#160;&#160; $(&#34;tr th:eq(&#34;+ts.p.lastsort+&#34;) span.colHeaderName&#34;,thd).removeClass(&#34;sortActive&#34;);<br />&#160;&#160;&#160;&#160;&#160; $(&#34;tr th:eq(&#34;+idxcol+&#34;) span.s-ico&#34;,thd).show();<br />+&#160;&#160;&#160;&#160; $(&#34;tr th:eq(&#34;+idxcol+&#34;)+ span.colHeaderName&#34;,thd).addClass(&#34;sortActive&#34;);<br />&#160; &#160; }<br />&#160; }<br />&#160; ts.p.lastsort = idxcol;</p>
</p>
<p>@ var thead = &#34;&#60;thead&#62;&#60;tr class=&#39;ui-jqgrid-labels&#39; role=&#39;rowheader&#39;&#62;&#34;, &#8230;<br />// move sort-icons before colName and wrap colName inside a span (for styling)</p>
<p>&#160; for(i=0;i&#60;this.p.colNames.length;i++){<br />&#160;&#160;&#160; &#8230;<br />-&#160;&#160; thead += &#34;&#60;div id=&#39;jqgh_&#34;+ts.p.colModel[i].name+&#34;&#39; &#34;+tdc+&#34;&#62;&#34;+ts.p.colNames[i];<br />+&#160;&#160; thead += &#34;&#60;div id=&#39;jqgh_&#34;+ts.p.colModel[i].name+&#34;&#39;+&#34;+tdc+&#34;&#62;&#34;+imgs+&#34;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;span+class=&#39;colHeaderName&#39;&#62;&#34;+ts.p.colNames[i]+&#34;&#60;/span&#62;&#60;/div&#62;&#60;/th&#62;&#34;;<br />-&#160;&#160; thead += imgs+&#34;&#60;/div&#62;&#60;/th&#62;&#34;;<br />&#160; }</p>
</p>
<p>@ $(&#34;th&#34;,thr).each(function ( j ) { &#8230;&#160; // show/hide sort-icon span and apply CSS class sortActive</p>
<p>&#160; if(sort) {<br />-&#160;&#160; if(ts.p.viewsortcols[0]) {$(&#34;div span.s-ico&#34;,this).show(); if(j==ts.p.lastsort){ $(&#34;div span.ui-icon-&#34;+ts.p.sortorder,this).removeClass(&#34;ui-state-disabled&#34;);}}<br />-&#160;&#160; else if( j == ts.p.lastsort) {$(&#34;div span.s-ico&#34;,this).show();$(&#34;div span.ui-icon-&#34;+ts.p.sortorder,this).removeClass(&#34;ui-state-disabled&#34;);}<br />+&#160;&#160; if(ts.p.viewsortcols[0]) {<br />+&#160;&#160;&#160;&#160; $(&#34;div span.s-ico&#34;,this).show();<br />+&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;div span.colHeaderName&#34;,this).addClass(&#34;sortActive&#34;);<br />+&#160;&#160;&#160;&#160;&#160;&#160; if(j==ts.p.lastsort){<br />+&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;div span.ui-icon-&#34;+ts.p.sortorder,this).removeClass(&#34;ui-state-disabled&#34;);<br />+&#160;&#160;&#160;&#160;&#160;&#160; }<br />+&#160;&#160; } else if( j == ts.p.lastsort) {<br />+&#160;&#160;&#160;&#160; $(&#34;div span.s-ico&#34;,this).show();<br />+&#160;&#160;&#160;&#160; $(&#34;div span.ui-icon-&#34;+ts.p.sortorder,this).removeClass(&#34;ui-state-disabled&#34;);<br />+&#160;&#160;&#160;&#160; $(&#34;div span.colHeaderName&#34;,this).addClass(&#34;sortActive&#34;);<br />+&#160;&#160; }</p>
</p>
<p>@ setLabel: function &#8230;&#160;&#160;&#160; // changed append(ico) to prepend(ico)</p>
<p>&#160; var thecol = $(&#34;tr.ui-jqgrid-labels th:eq(&#34;+pos+&#34;)&#34;,$t.grid.hDiv);<br />&#160; if (nData){&#160;&#160;&#160; <br />&#160;&#160;&#160; var ico = $(&#34;.s-ico&#34;,thecol);&#160;&#160;&#160; <br />-&#160;&#160; $(&#34;[id^=jqgh_]&#34;,thecol).empty().html(nData).append(ico); <br />+&#160;&#160; $(&#34;[id^=jqgh_]&#34;,thecol).empty().html(&#34;&#60;span  class=&#39;colHeaderName&#39;&#62;&#34; + nData + &#34;&#60;/span&#62;&#34;).prepend(ico);<br />&#160;&#160;&#160; $t.p.colNames[pos] = nData;<br />&#160; }</p>
</div>
<p>Maybe you could integrate this feature sometimes.</p>
<p>Kind regards,<br />Klaus.</p></p>
]]></description>
        	        	<pubDate>Wed, 05 May 2010 13:49:26 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16590</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16590</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. Will add this in todo list.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 21 Apr 2010 20:43:27 +0300</pubDate>
        </item>
        <item>
        	<title>Klaus on Sort Icon not always visible ...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16568</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/sort-icon-not-always-visible#p16568</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I sometimes have the problem that the column sort icon is not visible, if the column is too small or the column text is too big.</p>
<ul>
<li>Is it possible to move the sort icon to the front of the column so it will be always visible if used.</li>
<li>Or another solution would be to put the sort icon one layer above the text, so that it is always visible at the most right place in the column header cell.</li>
</ul>
<p>Maybe someone knows a simple solution for this problem.</p>
<p>Kind regards,<br />Klaus.</p>
]]></description>
        	        	<pubDate>Tue, 20 Apr 2010 18:52:13 +0300</pubDate>
        </item>
</channel>
</rss>