Index: trunk/extensions/Nuke/Nuke_body.php |
— | — | @@ -44,6 +44,9 @@ |
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
| 48 | + /** |
| 49 | + * Prompt for a username or IP address |
| 50 | + */ |
48 | 51 | function promptForm() { |
49 | 52 | global $wgOut; |
50 | 53 | |
— | — | @@ -61,6 +64,9 @@ |
62 | 65 | $wgOut->addHTML( "</form>" ); |
63 | 66 | } |
64 | 67 | |
| 68 | + /** |
| 69 | + * Display list of pages to delete |
| 70 | + */ |
65 | 71 | function listForm( $username, $reason ) { |
66 | 72 | global $wgUser, $wgOut, $wgLang; |
67 | 73 | |
— | — | @@ -75,15 +81,50 @@ |
76 | 82 | $nuke = $this->getTitle(); |
77 | 83 | $submit = Xml::submitButton( wfMsg( 'nuke-submit-delete' ) ); |
78 | 84 | |
| 85 | + $script = <<<JAVASCRIPT |
| 86 | +<script type="text/javascript"> |
| 87 | +function selectPages( bool ) { |
| 88 | + var inputs = document.getElementsByTagName("input"); |
| 89 | + for (i = 0; i < inputs.length; i++) { |
| 90 | + if (inputs[i].type == "checkbox") { |
| 91 | + inputs[i].checked = bool; |
| 92 | + } |
| 93 | + } |
| 94 | +} |
| 95 | +</script> |
| 96 | +JAVASCRIPT; |
| 97 | + $wgOut->addScript( $script ); |
| 98 | + |
79 | 99 | $wgOut->addHTML( |
80 | 100 | Xml::openElement( 'form', array( |
81 | 101 | 'action' => $nuke->getLocalURL( 'action=delete' ), |
82 | | - 'method' => 'post' ) |
| 102 | + 'method' => 'post', |
| 103 | + 'name' => 'nukelist') |
83 | 104 | ) . |
84 | 105 | Html::hidden( 'wpEditToken', $wgUser->editToken() ) . |
85 | | - Xml::inputLabel( |
86 | | - wfMsg( 'deletecomment' ), 'wpReason', 'wpReason', 60, $reason |
87 | | - ) . '<br /><br />' . |
| 106 | + Xml::tags( 'p', |
| 107 | + null, |
| 108 | + Xml::inputLabel( |
| 109 | + wfMsg( 'deletecomment' ), 'wpReason', 'wpReason', 60, $reason |
| 110 | + ) |
| 111 | + ) |
| 112 | + ); |
| 113 | + |
| 114 | + // Select: All, None |
| 115 | + $links = array(); |
| 116 | + $links[] = '<a href="#" onclick="selectPages( true ); return false;">' . |
| 117 | + wfMsg( 'powersearch-toggleall' ) . '</a>'; |
| 118 | + $links[] = '<a href="#" onclick="selectPages( false ); return false;">' . |
| 119 | + wfMsg( 'powersearch-togglenone' ) . '</a>'; |
| 120 | + $wgOut->addHTML( |
| 121 | + Xml::tags( 'p', |
| 122 | + null, |
| 123 | + wfMsg( 'nuke-select', $wgLang->commaList( $links ) ) |
| 124 | + ) |
| 125 | + ); |
| 126 | + |
| 127 | + // Delete button |
| 128 | + $wgOut->addHTML( |
88 | 129 | Xml::submitButton( wfMsg( 'nuke-submit-delete' ) ) |
89 | 130 | ); |
90 | 131 | |
Index: trunk/extensions/Nuke/Nuke.i18n.php |
— | — | @@ -24,6 +24,7 @@ |
25 | 25 | 'nuke-submit-user' => 'Go', |
26 | 26 | 'nuke-submit-delete' => 'Delete selected', |
27 | 27 | 'right-nuke' => 'Mass delete pages', |
| 28 | + 'nuke-select' => 'Select: $1', |
28 | 29 | ); |
29 | 30 | |
30 | 31 | /** Message documentation (Message documentation) |
— | — | @@ -36,6 +37,7 @@ |
37 | 38 | 'nuke-desc' => '{{desc}}', |
38 | 39 | 'nuke-submit-user' => '{{Identical|Go}}', |
39 | 40 | 'right-nuke' => '{{doc-right}}', |
| 41 | + 'nuke-select' => '{{Identical|Select}}', |
40 | 42 | ); |
41 | 43 | |
42 | 44 | /** Niuean (ko e vagahau Niuē) |
— | — | @@ -55,6 +57,7 @@ |
56 | 58 | 'nuke-submit-user' => 'Laat waai', |
57 | 59 | 'nuke-submit-delete' => 'Skrap geselekteerde', |
58 | 60 | 'right-nuke' => 'Massa verwydering van bladsye', |
| 61 | + 'nuke-select' => 'Selekteer: $1', |
59 | 62 | ); |
60 | 63 | |
61 | 64 | /** Aragonese (Aragonés) |
— | — | @@ -346,6 +349,7 @@ |
347 | 350 | 'nuke-submit-user' => 'Hole die Liste', |
348 | 351 | 'nuke-submit-delete' => 'Ausgewählte Seiten löschen', |
349 | 352 | 'right-nuke' => 'Massenlöschung von Seiten', |
| 353 | + 'nuke-select' => 'Auswählen: $1', |
350 | 354 | ); |
351 | 355 | |
352 | 356 | /** German (formal address) (Deutsch (Sie-Form)) |