r52168 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52167‎ | r52168 | r52169 >
Date:16:28, 19 June 2009
Author:thomasv
Status:deferred
Tags:
Comment:
fill header and footer fields with default values
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)
  • /trunk/extensions/ProofreadPage/proofread_index.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread_index.js
@@ -45,6 +45,9 @@
4646 value = findparam(params,param_name);
4747 value = value.replace(/\{\{!\}\}/g,'|');
4848
 49+ if( (m[0]=="Header") && (value=="") ) value = prp_default_header;
 50+ if( (m[0]=="Footer") && (value=="") ) value = prp_default_footer;
 51+
4952 if(m[2]) size=m[2]; else size="1";
5053 if(size=="1") {
5154 str = str + '<td><input name="'+param_name+'" size=60 value="'+value+'"/></td></tr>';
@@ -52,7 +55,6 @@
5356 else{
5457 str = str +'<td><textarea name="'+param_name+'" cols=60 rows='+size+'>'+value+'</textarea></td></tr>';
5558 }
56 -
5759 }
5860 str = str +'</table>';
5961 container.innerHTML = str;
Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -18,7 +18,7 @@
1919 $wgDjvutxt = null;
2020
2121 # Bump the version number every time you change proofread.js
22 -$wgProofreadPageVersion = 21;
 22+$wgProofreadPageVersion = 22;
2323
2424 # Max width of zoomable image
2525 $wgProofreadPageMaxWidth = 2048;
@@ -288,9 +288,10 @@
289289 );
290290 $out->addScript( "<script type=\"{$wgJsMimeType}\">
291291 var prp_index_attributes = \"" . Xml::escapeJsString( wfMsgForContent( 'proofreadpage_index_attributes' ) ) . "\";
 292+var prp_default_header = \"" . Xml::escapeJsString( wfMsgForContent( 'proofreadpage_default_header' ) ) . "\";
 293+var prp_default_footer = \"" . Xml::escapeJsString( wfMsgForContent( 'proofreadpage_default_footer' ) ) . "\";
292294 </script>\n"
293295 );
294 -
295296 }
296297
297298

Status & tagging log