r86731 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86730‎ | r86731 | r86732 >
Date:19:49, 22 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed issue with lame jquery plugin that goes mad when adding an id >_>
Modified paths:
  • /trunk/extensions/Ratings/allrating/RatingsAllRating.php (modified) (history)
  • /trunk/extensions/Ratings/allrating/ext.ratings.allrating.js (modified) (history)
  • /trunk/extensions/Ratings/allrating/index.html (modified) (history)

Diff [purge]

Index: trunk/extensions/Ratings/allrating/index.html
@@ -11,7 +11,7 @@
1212 <script type="text/javascript" >
1313 $(document).ready(function() {
1414 $('.example1').allRating({
15 - theme: 'bar',
 15+ //theme: 'bar',
1616 onClickEvent: function(input) {
1717 alert(input.val());
1818 },
Index: trunk/extensions/Ratings/allrating/RatingsAllRating.php
@@ -111,14 +111,14 @@
112112 array(
113113 'value' => $i,
114114 ),
115 - null
 115+ $i
116116 );
117117 }
118118
119119 $output = Html::rawElement(
120120 'select',
121121 array(
122 - 'id' => "allrating_$ratingStarNr",
 122+ 'name' => "allrating_$ratingStarNr",
123123 'class' => 'allrating',
124124 'page' => $parameters['page']->getFullText(),
125125 'tag' => $parameters['tag'],
Index: trunk/extensions/Ratings/allrating/ext.ratings.allrating.js
@@ -7,7 +7,7 @@
88 */
99
1010 (function($) { $( document ).ready( function() {
11 -
 11+
1212 var canRate = true; // TODO
1313
1414 if ( !canRate && !window.wgRatingsShowDisabled ) {
@@ -21,16 +21,15 @@
2222 */
2323 (function setupRatingElements() {
2424 $.each($(".allrating"), function(i,v) {
25 - var self = $(this);
 25+ var self = $(this);
2626
2727 self.allRating({
2828 onClickEvent: function(input) {
29 - // TODO
 29+ alert(input.val());
3030 },
3131 showHover: false
32 - });
 32+ });
3333 });
3434 })();
3535
36 -
3736 } ); })(jQuery);
\ No newline at end of file

Status & tagging log