Index: trunk/extensions/CentralNotice/CentralNotice.i18n.php |
— | — | @@ -108,10 +108,11 @@ |
109 | 109 | 'centralnotice-clone-name' => 'Name:', |
110 | 110 | 'centralnotice-preview-all-template-translations' => 'Preview all available translations of banner', |
111 | 111 | 'centralnotice-insert' => 'Insert: $1', |
112 | | - 'centralnotice-hide-button' => '{{int:centralnotice-shared-hide}} button', |
113 | | - 'centralnotice-collapse-button' => '{{int:centralnotice-shared-collapse}} button', |
114 | | - 'centralnotice-expand-button' => '{{int:centralnotice-shared-expand}} button', |
115 | | - 'centralnotice-translate-button' => 'Help translate button', |
| 112 | + 'centralnotice-hide-button' => '{{int:centralnotice-shared-hide}} link', |
| 113 | + 'centralnotice-collapse-button' => '{{int:centralnotice-shared-collapse}} link', |
| 114 | + 'centralnotice-expand-button' => '{{int:centralnotice-shared-expand}} link', |
| 115 | + 'centralnotice-close-button' => 'Close button', |
| 116 | + 'centralnotice-translate-button' => 'Help translate link', |
116 | 117 | 'centralnotice-donate-button' => 'Donate button', |
117 | 118 | 'centralnotice-expanded-banner' => 'Expanded banner', |
118 | 119 | 'centralnotice-collapsed-banner' => 'Collapsed banner', |
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -241,6 +241,7 @@ |
242 | 242 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) ); |
243 | 243 | $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' ); |
244 | 244 | $buttons = array(); |
| 245 | + $buttons[] = '<a href="#" onclick="insertButton(\'close\');return false;">' . wfMsg( 'centralnotice-close-button' ) . '</a>'; |
245 | 246 | $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>'; |
246 | 247 | $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'; |
247 | 248 | $htmlOut .= Xml::tags( 'div', |
— | — | @@ -488,6 +489,7 @@ |
489 | 490 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) ); |
490 | 491 | $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' ); |
491 | 492 | $buttons = array(); |
| 493 | + $buttons[] = '<a href="#" onclick="insertButton(\'close\');return false;">' . wfMsg( 'centralnotice-close-button' ) . '</a>'; |
492 | 494 | $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>'; |
493 | 495 | $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'; |
494 | 496 | $htmlOut .= Xml::tags( 'div', |
Index: trunk/extensions/CentralNotice/centralnotice.js |
— | — | @@ -20,11 +20,14 @@ |
21 | 21 | var bannerField = document.getElementById('templateBody'); |
22 | 22 | switch( buttonType ) { |
23 | 23 | case 'translate': |
24 | | - var buttonValue = '[<a href="http://meta.wikimedia.org/wiki/CentralNotice">{{int:centralnotice-shared-help-translate}}</a>]'; |
25 | | - break; |
| 24 | + var buttonValue = '[<a href="http://meta.wikimedia.org/wiki/CentralNotice">{{int:centralnotice-shared-help-translate}}</a>]'; |
| 25 | + break; |
26 | 26 | case 'hide': |
27 | | - var buttonValue = '[<a href="#" onclick="toggleNotice();return false">{{int:centralnotice-shared-hide}}</a>]'; |
28 | | - break; |
| 27 | + var buttonValue = '[<a href="#" onclick="toggleNotice();return false">{{int:centralnotice-shared-hide}}</a>]'; |
| 28 | + break; |
| 29 | + case 'close': |
| 30 | + var buttonValue = '<a href="#" onclick="toggleNotice();return false"><img border="0" src="http://upload.wikimedia.org/wikipedia/commons/1/1b/Close_window_X.gif" width="10" height="10" alt="Close" /></a>'; |
| 31 | + break; |
29 | 32 | } |
30 | 33 | if (document.selection) { |
31 | 34 | // IE support |