From c5d0cd2824e3c3bb2f6f3834177a71c1d7b78519 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 27 Mar 2007 00:47:38 +0000 Subject: merge from 3.0 branch till 1779. --- framework/Web/Javascripts/ratings/ratings.js | 178 --------------------------- 1 file changed, 178 deletions(-) delete mode 100644 framework/Web/Javascripts/ratings/ratings.js (limited to 'framework/Web/Javascripts/ratings/ratings.js') diff --git a/framework/Web/Javascripts/ratings/ratings.js b/framework/Web/Javascripts/ratings/ratings.js deleted file mode 100644 index c8b19511..00000000 --- a/framework/Web/Javascripts/ratings/ratings.js +++ /dev/null @@ -1,178 +0,0 @@ -Prado.WebUI.TRatingList = Base.extend( -{ - selectedIndex : -1, - rating: -1, - enabled : true, - readOnly : false, - - constructor : function(options) - { - var cap = $(options.CaptionID); - this.options = Object.extend( - { - caption : cap ? cap.innerHTML : '' - }, options || {}); - - Prado.WebUI.TRatingList.register(this); - this._init(); - this.selectedIndex = options.SelectedIndex; - this.rating = options.Rating; - if(options.Rating <= 0 && options.SelectedIndex >= 0) - this.rating = options.SelectedIndex+1; - this.showRating(this.rating); - }, - - _init: function(options) - { - Element.addClassName($(this.options.ListID),this.options.Style); - this.radios = new Array(); - var index=0; - for(var i = 0; i halfMax ? base+1 : base; - for(var i = 0; i halfMax ? base+1 : base; - var hasHalf = remainder >= halfMin && remainder <= halfMax; - for(var i = 0; i index ? 'removeClassName' : 'addClassName'; - Element[action](node, "rating_selected"); - if(i==index+1 && hasHalf) - Element.addClassName(node, "rating_half"); - else - Element.removeClassName(node, "rating_half"); - Element.removeClassName(node,"rating_hover"); - } - }, - - getIndexCaption : function(index) - { - return index > -1 ? this.radios[index].value : this.options.caption; - }, - - showCaption : function(value) - { - var caption = $(this.options.CaptionID); - if(caption) caption.innerHTML = value; - $(this.options.ListID).title = value; - }, - - setCaption : function(value) - { - this.options.caption = value; - this.showCaption(value); - }, - - setEnabled : function(value) - { - this.enabled = value; - for(var i = 0; i