diff options
author | tof <> | 2008-04-24 14:47:29 +0000 |
---|---|---|
committer | tof <> | 2008-04-24 14:47:29 +0000 |
commit | b0b2ab42bbe6d781ca007fdee7ea60ea83e9ba11 (patch) | |
tree | 0fd50b8e666ec7fdab5b5568710beddbc54548bc /framework/Web/Javascripts/source/prado | |
parent | 9165057c74be1f77a37ee1a3ff73c3f786a3eb1d (diff) |
Fixed #836
Diffstat (limited to 'framework/Web/Javascripts/source/prado')
-rw-r--r-- | framework/Web/Javascripts/source/prado/activeratings/ratings.js | 8 | ||||
-rw-r--r-- | framework/Web/Javascripts/source/prado/ratings/ratings.js | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/framework/Web/Javascripts/source/prado/activeratings/ratings.js b/framework/Web/Javascripts/source/prado/activeratings/ratings.js index 884a695a..4eeddbd8 100644 --- a/framework/Web/Javascripts/source/prado/activeratings/ratings.js +++ b/framework/Web/Javascripts/source/prado/activeratings/ratings.js @@ -30,7 +30,7 @@ Prado.WebUI.TActiveRatingList = Base.extend( for(var i = 0; i<this.options.ItemCount; i++)
{
var radio = $(this.options.ListID+'_c'+i);
- var td = radio.parentNode;
+ var td = radio.parentNode.parentNode;
if(radio && td.tagName.toLowerCase()=='td')
{
this.radios.push(radio);
@@ -48,7 +48,7 @@ Prado.WebUI.TActiveRatingList = Base.extend( if(this.enabled==false) return;
for(var i = 0; i<this.radios.length; i++)
{
- var node = this.radios[i].parentNode;
+ var node = this.radios[i].parentNode.parentNode;
var action = i <= index ? 'addClassName' : 'removeClassName'
Element[action](node,"rating_hover");
Element.removeClassName(node,"rating_selected");
@@ -115,7 +115,7 @@ Prado.WebUI.TActiveRatingList = Base.extend( var hasHalf = remainder >= halfMin && remainder <= halfMax;
for(var i = 0; i<this.radios.length; i++)
{
- var node = this.radios[i].parentNode;
+ var node = this.radios[i].parentNode.parentNode;
var action = i > index ? 'removeClassName' : 'addClassName';
Element[action](node, "rating_selected");
if(i==index+1 && hasHalf)
@@ -150,7 +150,7 @@ Prado.WebUI.TActiveRatingList = Base.extend( for(var i = 0; i<this.radios.length; i++)
{
var action = value ? 'removeClassName' : 'addClassName'
- Element[action](this.radios[i].parentNode, "rating_disabled");
+ Element[action](this.radios[i].parentNode.parentNode, "rating_disabled");
}
}
},
diff --git a/framework/Web/Javascripts/source/prado/ratings/ratings.js b/framework/Web/Javascripts/source/prado/ratings/ratings.js index d84b7aa1..e1770f1f 100644 --- a/framework/Web/Javascripts/source/prado/ratings/ratings.js +++ b/framework/Web/Javascripts/source/prado/ratings/ratings.js @@ -11,9 +11,9 @@ Prado.WebUI.TRatingList.prototype = this.radios = document.getElementsByName(options.field);
for(var i = 0; i<this.radios.length; i++)
{
- Event.observe(this.radios[i].parentNode, "mouseover", this.hover.bindEvent(this,i));
- Event.observe(this.radios[i].parentNode, "mouseout", this.recover.bindEvent(this,i));
- Event.observe(this.radios[i].parentNode, "click", this.click.bindEvent(this, i));
+ Event.observe(this.radios[i].parentNode.parentNode, "mouseover", this.hover.bindEvent(this,i));
+ Event.observe(this.radios[i].parentNode.parentNode, "mouseout", this.recover.bindEvent(this,i));
+ Event.observe(this.radios[i].parentNode.parentNode, "click", this.click.bindEvent(this, i));
}
this.caption = CAPTION();
this.element.appendChild(this.caption);
@@ -24,14 +24,14 @@ Prado.WebUI.TRatingList.prototype = hover : function(ev,index)
{
for(var i = 0; i<this.radios.length; i++)
- this.radios[i].parentNode.className = (i<=index) ? "rating_hover" : "";
+ this.radios[i].parentNode.parentNode.className = (i<=index) ? "rating_hover" : "";
this.setCaption(index);
},
recover : function(ev,index)
{
for(var i = 0; i<=index; i++)
- Element.removeClassName(this.radios[i].parentNode, "rating_hover");
+ Element.removeClassName(this.radios[i].parentNode.parentNode, "rating_hover");
this.setRating(this.selectedIndex);
},
@@ -48,7 +48,7 @@ Prado.WebUI.TRatingList.prototype = setRating: function(index)
{
for(var i = 0; i<=index; i++)
- this.radios[i].parentNode.className = "rating_selected";
+ this.radios[i].parentNode.parentNode.className = "rating_selected";
this.setCaption(index);
},
|