<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dev.iordanov.net &#187; javascript</title>
	<atom:link href="http://dev.iordanov.net/archives/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.iordanov.net</link>
	<description></description>
	<lastBuildDate>Sun, 31 May 2009 18:07:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Extjs rating extension</title>
		<link>http://dev.iordanov.net/archives/10</link>
		<comments>http://dev.iordanov.net/archives/10#comments</comments>
		<pubDate>Sat, 06 Sep 2008 08:28:19 +0000</pubDate>
		<dc:creator>ivan</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[extjs]]></category>

		<guid isPermaLink="false">http://dev.iordanov.net/?p=10</guid>
		<description><![CDATA[Lately i was playing with extjs and i created an extension for rating. The extension itself has 2 components. The first one is the visual one. It&#8217;s a kind of slider with some modifications. It&#8217;s usage is the same as a slider&#8217;s. The second component is a form field that holds the value of the [...]]]></description>
			<content:encoded><![CDATA[<p>Lately i was playing with <a href="http://www.extjs.com">extjs</a> and i created an extension for rating. The extension itself has 2 components. The first one is the visual one. It&#8217;s a kind of <a href="http://extjs.com/deploy/dev/docs/?class=Ext.Slider">slider</a> with some modifications. It&#8217;s usage is the same as a slider&#8217;s. The second component is a form field that holds the value of the first one in a hidden input flield. The input element takes an extra parameter called starConfig and this parameter is passed to the constructor of the first component.</p>
<p>The number of stars is calculated dynamically and it&#8217;s equal to maxValue/increment<br />
for example</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript"><span style="color: #009900;">&#123;</span>
    minValue<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
    maxValue<span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span>
    increment<span style="color: #339933;">:</span> <span style="color: #CC0000;">10</span>	
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This will give us 10 stars and each star increases the value of the hidden field by 10. By default increment = 1 and maxValue = 5</p>
<p>you can see demo <a href="http://dev.iordanov.net/ext/examples/starslider/slider.html">here</a> and download the extension <a href="http://dev.iordanov.net/starslider.tar.gz">here</a></p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=dev.iordanov.net&amp;siteurl=http%3A%2F%2Fdev.iordanov.net%2F&amp;linkname=Extjs%20rating%20extension&amp;linkurl=http%3A%2F%2Fdev.iordanov.net%2Farchives%2F10"><img src="http://dev.iordanov.net/wp-content/plugins/add-to-any/share_save_120_16.gif" width="120" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Extjs rating extension";
		a2a_linkurl="http://dev.iordanov.net/archives/10";
				    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p>]]></content:encoded>
			<wfw:commentRss>http://dev.iordanov.net/archives/10/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
