Index: trunk/extensions/Reviews/resources/jquery.reviewControl.js |
— | — | @@ -24,14 +24,17 @@ |
25 | 25 | |
26 | 26 | this.buildRatingsControl = function() { |
27 | 27 | var ratings = this.review.fields.ratings; |
28 | | - var $tr = $( '<tr />' ).html( '' ); |
| 28 | + var $tr = $( '<tr>' ).html( '' ); |
29 | 29 | |
30 | 30 | for ( rating in ratings ) { |
31 | 31 | if ( ratings.hasOwnProperty( rating ) ) { |
32 | | - $tr.append( $( '<td />' ).append( |
33 | | - $( '<div class="review-ratings-div" />' ) |
34 | | - .attr( 'id', this.fieldName( 'ratingdiv' + rating ) ) |
35 | | - .attr( 'data-type', rating ) |
| 32 | + $tr.append( $( '<td>' ).append( |
| 33 | + $( '<div>' ) |
| 34 | + .attr( { |
| 35 | + 'id': this.fieldName( 'ratingdiv' + rating ), |
| 36 | + 'data-type': rating, |
| 37 | + 'class': 'review-ratings-div' |
| 38 | + } ) |
36 | 39 | .html( reviews.htmlSelect( |
37 | 40 | { 1: 1, 2: 2, 3: 3, 4: 4, 5: 5 }, // TODO |
38 | 41 | ratings[rating], |
— | — | @@ -40,7 +43,7 @@ |
41 | 44 | 'id': this.fieldName( 'rating' + rating ), |
42 | 45 | 'class': 'review-specificratinginput' |
43 | 46 | } |
44 | | - ) ).prepend( $( '<label />' ).attr( { |
| 47 | + ) ).prepend( $( '<label>' ).attr( { |
45 | 48 | 'for': this.fieldName( 'ratingdiv' + rating ), |
46 | 49 | 'class': 'review-ratings-label' |
47 | 50 | } ).text( rating ) ) |
— | — | @@ -49,18 +52,18 @@ |
50 | 53 | } |
51 | 54 | } |
52 | 55 | |
53 | | - this.ratingsInput = $( '<div />' ).attr( { 'class': 'review-ratings-table-div' } ).html( $( '<table />' ).html( $tr ) ); |
| 56 | + this.ratingsInput = $( '<div>' ).attr( { 'class': 'review-ratings-table-div' } ).html( $( '<table>' ).html( $tr ) ); |
54 | 57 | }; |
55 | 58 | |
56 | 59 | this.buildInterface = function() { |
57 | | - this.titleInput = $( '<input />' ).attr( { |
| 60 | + this.titleInput = $( '<input>' ).attr( { |
58 | 61 | 'type': 'text', |
59 | 62 | 'size': 45, |
60 | 63 | 'name': this.fieldName( 'title' ), |
61 | 64 | 'class': 'review-titleinput' |
62 | 65 | } ).val( this.review.fields.title ); |
63 | 66 | |
64 | | - this.textInput = $( '<textarea />' ).attr( { |
| 67 | + this.textInput = $( '<textarea>' ).attr( { |
65 | 68 | 'name': this.fieldName( 'text' ), |
66 | 69 | 'class': 'review-textinput' |
67 | 70 | } ).text( this.review.fields.text ); |
— | — | @@ -75,14 +78,15 @@ |
76 | 79 | } |
77 | 80 | ); |
78 | 81 | |
79 | | - this.ratingInput = $( '<div />' ).attr( { |
| 82 | + this.ratingInput = $( '<div>' ).attr( { |
80 | 83 | 'id': this.fieldName( 'ratingdiv' ), |
81 | 84 | 'class': 'review-ratingdiv' |
82 | 85 | } ).html( this.ratingInput ); |
83 | 86 | |
84 | 87 | this.buildRatingsControl(); |
85 | 88 | |
86 | | - this.button = $( '<button class="review-save" />' ) |
| 89 | + this.button = $( '<button>' ) |
| 90 | + .attr( { 'class': 'review-save' } ) |
87 | 91 | .button( { 'label': mw.msg( 'reviews-submission-submit' ) } ) |
88 | 92 | .click( function() { |
89 | 93 | _this.save(); |
— | — | @@ -91,17 +95,17 @@ |
92 | 96 | $this.html( '' ); |
93 | 97 | |
94 | 98 | $this.append( |
95 | | - $( '<label />' ).attr( { 'for': this.fieldName( 'title' ) } ).text( mw.msg( 'reviews-submission-title' ) + ' ' ), |
| 99 | + $( '<label>' ).attr( { 'for': this.fieldName( 'title' ) } ).text( mw.msg( 'reviews-submission-title' ) + ' ' ), |
96 | 100 | this.titleInput |
97 | | - ).append( '<br />' ); |
| 101 | + ).append( '<br>' ); |
98 | 102 | |
99 | 103 | $this.append( |
100 | | - $( '<label />' ).attr( { 'for': this.fieldName( 'text' ) } ).text( mw.msg( 'reviews-submission-text' ) ).append( '<br />' ), |
| 104 | + $( '<label>' ).attr( { 'for': this.fieldName( 'text' ) } ).text( mw.msg( 'reviews-submission-text' ) ).append( '<br />' ), |
101 | 105 | this.textInput |
102 | | - ).append( '<br />' ); |
| 106 | + ).append( '<br>' ); |
103 | 107 | |
104 | 108 | $this.append( |
105 | | - this.ratingInput.prepend( $( '<label />' ).attr( { |
| 109 | + this.ratingInput.prepend( $( '<label>' ).attr( { |
106 | 110 | 'for': this.fieldName( 'rating' ), |
107 | 111 | 'class': 'review-rating-label' |
108 | 112 | } ).text( mw.msg( 'reviews-submission-rating' ) ) ) |