Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -1026,7 +1026,10 @@ |
1027 | 1027 | */ |
1028 | 1028 | getFormData: function () { |
1029 | 1029 | var data = {}; |
1030 | | - data.rating = $.articleFeedbackv5.find( '.articleFeedbackv5-rating input:hidden' ).val(); |
| 1030 | + var rating = $.articleFeedbackv5.find( '.articleFeedbackv5-rating input:hidden' ).val(); |
| 1031 | + if ( '0' != rating ) { |
| 1032 | + data.rating = rating; |
| 1033 | + } |
1031 | 1034 | data.comment = $.articleFeedbackv5.find( '.articleFeedbackv5-comment textarea' ).val(); |
1032 | 1035 | if ( data.comment == mw.msg( 'articlefeedbackv5-bucket3-comment-default' ) ) { |
1033 | 1036 | data.comment = ''; |
— | — | @@ -1719,7 +1722,10 @@ |
1720 | 1723 | var info = $.articleFeedbackv5.currentBucket().ratingInfo; |
1721 | 1724 | for ( var i = 0; i < info.length; i++ ) { |
1722 | 1725 | var key = info[i]; |
1723 | | - data[key] = $.articleFeedbackv5.find( 'input[name="' + key + '"]' ).val(); |
| 1726 | + var val = $.articleFeedbackv5.find( 'input[name="' + key + '"]' ).val(); |
| 1727 | + if ( '0' != val ) { |
| 1728 | + data[key] = val; |
| 1729 | + } |
1724 | 1730 | } |
1725 | 1731 | $.articleFeedbackv5.find( '.articleFeedbackv5-expertise input:checked' ).each( function () { |
1726 | 1732 | data['expertise-' + $( this ).val()] = 1; |