Star rating completed on client side.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Mon, 10 Aug 2009 02:40:50 +0530
changeset 29 425626c7f63e
parent 28 be65e84e7d03
child 30 94fe7fe7394d
Star rating completed on client side.
app/site-content/css/jquery.rating.css
app/templates/projrev/proposal/review.html
--- a/app/site-content/css/jquery.rating.css	Mon Aug 10 02:13:02 2009 +0530
+++ b/app/site-content/css/jquery.rating.css	Mon Aug 10 02:40:50 2009 +0530
@@ -1,12 +1,69 @@
 /* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */
-div.rating-cancel,div.star-rating{float:left;width:17px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden}
-div.rating-cancel,div.rating-cancel a{background:url(/site-content/images/delete.gif) no-repeat 0 -16px}
-div.star-rating,div.star-rating a{background:url(/site-content/images/star.gif) no-repeat 0 0px}
-div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0}
-div.star-rating-on a{background-position:0 -16px!important}
-div.star-rating-hover a{background-position:0 -32px}
+div.rating-cancel {
+	float:left;
+	width:17px;
+	height:15px;
+	margin-left: 3%;
+	text-indent:-999em;
+	cursor:pointer;
+	display:block;
+	background:transparent;
+	overflow:hidden;
+}
+
+div.star-rating {
+  float:left;
+  width:17px;
+  height:15px;
+  text-indent:-999em;
+  cursor:pointer;
+  display:block;
+  background:transparent;
+  overflow:hidden;
+}
+
+div.rating-cancel,div.rating-cancel a {
+	background:url(/site-content/images/delete.gif) no-repeat 0 -16px
+}
+
+div.star-rating,div.star-rating a {
+	background:url(/site-content/images/star.gif) no-repeat 0 0px
+}
+
+div.rating-cancel a,div.star-rating a {
+	display:block;
+	width:16px;
+	height:100%;
+	background-position:0 0px;
+	border:0
+}
+
+div.star-rating-on a {
+	background-position:0 -16px!important
+}
+
+div.star-rating-hover a {
+	background-position:0 -32px
+}
+
 /* Read Only CSS */
-div.star-rating-readonly a{cursor:default !important}
+div.star-rating-readonly a{
+	cursor:default !important
+}
 /* Partial Star CSS */
-div.star-rating{background:transparent!important;overflow:hidden!important}
+div.star-rating{
+	background:transparent!important;
+	overflow:hidden!important
+}
 /* END jQuery.Rating Plugin CSS */
+
+label {
+  float: left;
+  width: 40%;
+  position: relative;
+  top: -5px;
+  font-weight:bold;
+  margin:5px 0;
+  margin-right: 1em;  
+  text-align: right; 
+}
\ No newline at end of file
--- a/app/templates/projrev/proposal/review.html	Mon Aug 10 02:13:02 2009 +0530
+++ b/app/templates/projrev/proposal/review.html	Mon Aug 10 02:40:50 2009 +0530
@@ -111,8 +111,8 @@
       {{ form.comment.label_tag }}{{ form.comment }}{% if form.comment.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       </p>
       <p>
-        {{ form.comment.errors }}
-        {{ form.attribute1.label_tag }}:
+        {{ form.attribute1.errors }}
+        {{ form.attribute1.label_tag }}
         <input name="attribute1" type="radio" class="star"/>
         <input name="attribute1" type="radio" class="star"/>
         <input name="attribute1" type="radio" class="star"/>
@@ -120,6 +120,86 @@
         <input name="attribute1" type="radio" class="star"/> 
         {% if form.attribute1.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       </p>
+      <p>
+        {{ form.attribute2.errors }}
+        {{ form.attribute2.label_tag }}
+        <input name="attribute2" type="radio" class="star"/>
+        <input name="attribute2" type="radio" class="star"/>
+        <input name="attribute2" type="radio" class="star"/>
+        <input name="attribute2" type="radio" class="star"/>
+        <input name="attribute2" type="radio" class="star"/> 
+        {% if form.attribute2.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute3.errors }}
+        {{ form.attribute3.label_tag }}
+        <input name="attribute3" type="radio" class="star"/>
+        <input name="attribute3" type="radio" class="star"/>
+        <input name="attribute3" type="radio" class="star"/>
+        <input name="attribute3" type="radio" class="star"/>
+        <input name="attribute3" type="radio" class="star"/> 
+        {% if form.attribute3.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute4.errors }}
+        {{ form.attribute4.label_tag }}
+        <input name="attribute4" type="radio" class="star"/>
+        <input name="attribute4" type="radio" class="star"/>
+        <input name="attribute4" type="radio" class="star"/>
+        <input name="attribute4" type="radio" class="star"/>
+        <input name="attribute4" type="radio" class="star"/> 
+        {% if form.attribute4.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute5.errors }}
+        {{ form.attribute5.label_tag }}
+        <input name="attribute5" type="radio" class="star"/>
+        <input name="attribute5" type="radio" class="star"/>
+        <input name="attribute5" type="radio" class="star"/>
+        <input name="attribute5" type="radio" class="star"/>
+        <input name="attribute5" type="radio" class="star"/> 
+        {% if form.attribute5.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute6.errors }}
+        {{ form.attribute6.label_tag }}
+        <input name="attribute6" type="radio" class="star"/>
+        <input name="attribute6" type="radio" class="star"/>
+        <input name="attribute6" type="radio" class="star"/>
+        <input name="attribute6" type="radio" class="star"/>
+        <input name="attribute6" type="radio" class="star"/> 
+        {% if form.attribute6.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute7.errors }}
+        {{ form.attribute7.label_tag }}
+        <input name="attribute7" type="radio" class="star"/>
+        <input name="attribute7" type="radio" class="star"/>
+        <input name="attribute7" type="radio" class="star"/>
+        <input name="attribute7" type="radio" class="star"/>
+        <input name="attribute7" type="radio" class="star"/> 
+        {% if form.attribute7.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute8.errors }}
+        {{ form.attribute8.label_tag }}
+        <input name="attribute8" type="radio" class="star"/>
+        <input name="attribute8" type="radio" class="star"/>
+        <input name="attribute8" type="radio" class="star"/>
+        <input name="attribute8" type="radio" class="star"/>
+        <input name="attribute8" type="radio" class="star"/> 
+        {% if form.attribute8.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.attribute9.errors }}
+        {{ form.attribute9.label_tag }}
+        <input name="attribute9" type="radio" class="star"/>
+        <input name="attribute9" type="radio" class="star"/>
+        <input name="attribute9" type="radio" class="star"/>
+        <input name="attribute9" type="radio" class="star"/>
+        <input name="attribute9" type="radio" class="star"/> 
+        {% if form.attribute9.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
 		<br />	
 		<input class="button" type="submit" value="Submit Review" />		
 		</p>