From fe60cc221f922ea362826e2d00431c5df28fe85f Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 6 Oct 2006 03:46:05 +0000 Subject: fixed #410 #412 --- framework/Web/Javascripts/ratings/ratings.js | 32 +++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'framework/Web/Javascripts/ratings/ratings.js') diff --git a/framework/Web/Javascripts/ratings/ratings.js b/framework/Web/Javascripts/ratings/ratings.js index 04ebd31d..9299d8d8 100644 --- a/framework/Web/Javascripts/ratings/ratings.js +++ b/framework/Web/Javascripts/ratings/ratings.js @@ -2,6 +2,7 @@ Prado.WebUI.TRatingList = Base.extend( { selectedIndex : -1, enabled : true, + readOnly : false, constructor : function(options) { @@ -20,20 +21,20 @@ Prado.WebUI.TRatingList = Base.extend( _init: function(options) { Element.addClassName($(this.options.ListID),this.options.Style); - var radios = document.getElementsByName(this.options.ListName); this.radios = new Array(); var index=0; - for(var i = 0; i index ? 'removeClassName' : 'addClassName' Element[action](this.radios[i].parentNode, "rating_selected"); } this.setCaption(index); @@ -89,7 +92,7 @@ Prado.WebUI.TRatingList = Base.extend( var value = index > -1 ? this.radios[index].value : this.options.caption; var caption = $(this.options.CaptionID); if(caption) caption.innerHTML = value; - $(this.options.ListName).title = value; + $(this.options.ListID).title = value; }, setEnabled : function(value) @@ -99,7 +102,6 @@ Prado.WebUI.TRatingList = Base.extend( { var action = value ? 'removeClassName' : 'addClassName' Element[action](this.radios[i].parentNode, "rating_disabled"); - Element.removeClassName(this.radios[i].parentNode, "rating_hover"); } } }, -- cgit v1.2.3