r68581 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68580‎ | r68581 | r68582 >
Date:18:57, 25 June 2010
Author:kaldari
Status:ok
Tags:
Comment:
don't need extra linebreaks in javascript
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -1294,24 +1294,24 @@
12951295 $options .= Xml::option( "$code - $name", $code, in_array( $code, $selected ) ) . "\n";
12961296 }
12971297 $htmlOut = "
1298 -<script type=\"text/javascript\">\n
1299 -function selectLanguages(selectAll) {\n
1300 - var selectBox = document.getElementById(\"project_languages[]\");\n
1301 - var firstSelect = selectBox.options.length - 1;\n
1302 - for (var i = firstSelect; i >= 0; i--) {\n
1303 - selectBox.options[i].selected = selectAll;\n
1304 - }\n
1305 -}\n
1306 -function top10Languages() {\n
1307 - var selectBox = document.getElementById(\"project_languages[]\");\n
1308 - var top10 = new Array('en','de','fr','it','pt','ja','es','pl','ru','nl');\n
1309 - for (var i = 0; i < selectBox.options.length; i++) {\n
1310 - var lang = selectBox.options[i].value;\n
1311 - if (top10.toString().indexOf(lang)!==-1) {\n
1312 - selectBox.options[i].selected = true;\n
1313 - }\n
1314 - }\n
1315 -}\n
 1298+<script type=\"text/javascript\">
 1299+function selectLanguages(selectAll) {
 1300+ var selectBox = document.getElementById(\"project_languages[]\");
 1301+ var firstSelect = selectBox.options.length - 1;
 1302+ for (var i = firstSelect; i >= 0; i--) {
 1303+ selectBox.options[i].selected = selectAll;
 1304+ }
 1305+}
 1306+function top10Languages() {
 1307+ var selectBox = document.getElementById(\"project_languages[]\");
 1308+ var top10 = new Array('en','de','fr','it','pt','ja','es','pl','ru','nl');
 1309+ for (var i = 0; i < selectBox.options.length; i++) {
 1310+ var lang = selectBox.options[i].value;
 1311+ if (top10.toString().indexOf(lang)!==-1) {
 1312+ selectBox.options[i].selected = true;
 1313+ }
 1314+ }
 1315+}
13161316 </script>";
13171317 $htmlOut .=
13181318 Xml::tags( 'select',

Status & tagging log