Commit 218bb36f authored by Francois Marier's avatar Francois Marier
Browse files

jquery rating: New upstream release 3.14 (bug #923192)

Not advertised yet on the homepage (http://www.fyneworks.com/jquery/star-rating/),
but available from Google Code (http://code.google.com/p/jquery-star-rating-plugin/):

  http://jquery-star-rating-plugin.googlecode.com/svn/trunk/star-rating.zip



Change-Id: Idb39d31516d2e1dd4b3e3984afd43a81c4c39a71
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 89825279
......@@ -2,7 +2,7 @@ jquery.rating.js
=================
Website: http://code.google.com/p/jquery-star-rating-plugin/
Version: 3.13
Version: 3.14
Changes:
......
/*
### jQuery Star Rating Plugin v3.13 - 2009-03-26 ###
### jQuery Star Rating Plugin v3.14 - 2012-01-26 ###
* Home: http://www.fyneworks.com/jquery/star-rating/
* Code: http://code.google.com/p/jquery-star-rating-plugin/
*
......@@ -73,7 +73,7 @@
else{
// create new control if first star or control element was removed/replaced
// Initialize options for this raters
// Initialize options for this rater
control = $.extend(
{}/* new object */,
options || {} /* current call options */,
......@@ -92,7 +92,10 @@
rater.addClass('rating-to-be-drawn');
// Accept readOnly setting from 'disabled' property
if(input.attr('disabled')) control.readOnly = true;
if(input.attr('disabled') || input.hasClass('disabled')) control.readOnly = true;
// Accept required setting from class property (class='required')
if(input.hasClass('required')) control.required = true;
// Create 'cancel' button
rater.append(
......@@ -164,6 +167,12 @@
// set current selection
if(this.checked) control.current = star;
// set current select for links
if(this.nodeName=="A"){
if($(this).hasClass('selected'))
control.current = star;
};
// hide input element
input.hide();
......@@ -375,21 +384,9 @@
$(function(){
$('input[type=radio].star').rating();
});
/* START OF MAHARA CUSTOMISATONS */
/* Make sure radio buttons are reskinned when paging */
function reskinRadioButtons() {
$('input[type=radio].star').rating();
}
$(function(){
var self = this;
if (typeof paginatorProxy != 'undefined') {
paginatorProxy.addObserver(self);
connect(self, 'pagechanged', reskinRadioButtons);
}
});
/* END OF MAHARA CUSTOMISATONS */
/*# AVOID COLLISIONS #*/
})(jQuery);
/*# AVOID COLLISIONS #*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment