r70805 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70804‎ | r70805 | r70806 >
Date:10:17, 10 August 2010
Author:thomasv
Status:ok
Tags:
Comment:
always create input fields, even if AddButtons is false
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -917,11 +917,19 @@
918918
919919 function pr_add_quality_buttons(){
920920
921 - if( !proofreadPageAddButtons ) return;
922921 var ig = document.getElementById("wpWatchthis");
923922 if( !ig ) ig = document.getElementById("wpSummary");
924923 if( !ig ) return;
925924 var f = document.createElement("span");
 925+ ig.parentNode.insertBefore(f,ig.nextSibling.nextSibling.nextSibling);
 926+
 927+ if( !proofreadPageAddButtons ) {
 928+ f.innerHTML =
 929+ ' <input type="hidden" name="wpProofreader" value="' + self.proofreadpage_username + '">'
 930+ +'<input type="hidden" name="quality" value=' + self.proofreadpage_quality + ' >';
 931+ return;
 932+ }
 933+
926934 f.innerHTML =
927935 ' <input type="hidden" name="wpProofreader" value="'+self.proofreadpage_username+'">'
928936 +'<span class="quality0"> <input type="radio" name="quality" value=0 onclick="pr_add_quality(this.form,0)" tabindex=4> </span>'
@@ -931,8 +939,6 @@
932940 +'<span class="quality4"> <input type="radio" name="quality" value=4 onclick="pr_add_quality(this.form,4)" tabindex=4> </span>';
933941 f.innerHTML = f.innerHTML + '&nbsp;' + escapeQuotesHTML(proofreadPageMessageStatus);
934942
935 - ig.parentNode.insertBefore(f,ig.nextSibling.nextSibling.nextSibling);
936 -
937943 if( ! ( ( self.proofreadpage_quality == 4 ) || ( ( self.proofreadpage_quality == 3 ) && ( self.proofreadpage_username != proofreadPageUserName ) ) ) ) {
938944 document.editform.quality[4].parentNode.style.cssText = 'display:none';
939945 document.editform.quality[4].disabled = true;

Status & tagging log