Index: trunk/extensions/ProofreadPage/proofread_index.js |
— | — | @@ -45,6 +45,9 @@ |
46 | 46 | value = findparam(params,param_name); |
47 | 47 | value = value.replace(/\{\{!\}\}/g,'|'); |
48 | 48 | |
| 49 | + if( (m[0]=="Header") && (value=="") ) value = prp_default_header; |
| 50 | + if( (m[0]=="Footer") && (value=="") ) value = prp_default_footer; |
| 51 | + |
49 | 52 | if(m[2]) size=m[2]; else size="1"; |
50 | 53 | if(size=="1") { |
51 | 54 | str = str + '<td><input name="'+param_name+'" size=60 value="'+value+'"/></td></tr>'; |
— | — | @@ -52,7 +55,6 @@ |
53 | 56 | else{ |
54 | 57 | str = str +'<td><textarea name="'+param_name+'" cols=60 rows='+size+'>'+value+'</textarea></td></tr>'; |
55 | 58 | } |
56 | | - |
57 | 59 | } |
58 | 60 | str = str +'</table>'; |
59 | 61 | container.innerHTML = str; |
Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | $wgDjvutxt = null; |
20 | 20 | |
21 | 21 | # Bump the version number every time you change proofread.js |
22 | | -$wgProofreadPageVersion = 21; |
| 22 | +$wgProofreadPageVersion = 22; |
23 | 23 | |
24 | 24 | # Max width of zoomable image |
25 | 25 | $wgProofreadPageMaxWidth = 2048; |
— | — | @@ -288,9 +288,10 @@ |
289 | 289 | ); |
290 | 290 | $out->addScript( "<script type=\"{$wgJsMimeType}\"> |
291 | 291 | 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' ) ) . "\"; |
292 | 294 | </script>\n" |
293 | 295 | ); |
294 | | - |
295 | 296 | } |
296 | 297 | |
297 | 298 | |