Index: trunk/extensions/ProofreadPage/proofread.js |
— | — | @@ -1,9 +1,6 @@ |
2 | 2 | // Author : ThomasV - License : GPL |
3 | 3 | |
4 | | -//todo : |
5 | | -//empty pages : detect if textbox is empty |
6 | 4 | |
7 | | - |
8 | 5 | function pr_init_tabs(){ |
9 | 6 | |
10 | 7 | var a = document.getElementById("p-cactions"); |
— | — | @@ -834,7 +831,8 @@ |
835 | 832 | |
836 | 833 | function pr_add_quality(form,value){ |
837 | 834 | |
838 | | - if( ( value == 0 ) && ( form.elements["wpTextbox1"].value != "" ) ) { |
| 835 | + var tbv = form.elements["wpTextbox1"].value; |
| 836 | + if( ( ( value == 0 ) && ( tbv != "" ) ) || ( ( value >= 3 ) && ( tbv == "" ) ) ) { |
839 | 837 | switch( self.proofreadpage_quality ) { |
840 | 838 | case 4: document.editform.quality[4].checked = true; break; |
841 | 839 | case 3: document.editform.quality[3].checked = true; break; |
— | — | @@ -877,14 +875,12 @@ |
878 | 876 | if( ! ( ( self.proofreadpage_quality == 4 ) || ( ( self.proofreadpage_quality == 3 ) && ( self.proofreadpage_username != wgUserName ) ) ) ) { |
879 | 877 | document.editform.quality[4].parentNode.style.cssText = 'display:none'; |
880 | 878 | } |
881 | | - if( self.proofreadpage_quality ) { |
882 | | - switch( self.proofreadpage_quality ) { |
883 | | - case 4: document.editform.quality[4].checked = true; break; |
884 | | - case 3: document.editform.quality[3].checked = true; break; |
885 | | - case 1: document.editform.quality[2].checked = true; break; |
886 | | - case 2: document.editform.quality[1].checked = true; break; |
887 | | - case 0: document.editform.quality[0].checked = true; break; |
888 | | - } |
| 879 | + switch( self.proofreadpage_quality ) { |
| 880 | + case 4: document.editform.quality[4].checked = true; break; |
| 881 | + case 3: document.editform.quality[3].checked = true; break; |
| 882 | + case 1: document.editform.quality[2].checked = true; break; |
| 883 | + case 2: document.editform.quality[1].checked = true; break; |
| 884 | + case 0: document.editform.quality[0].checked = true; break; |
889 | 885 | } |
890 | 886 | } |
891 | 887 | |