http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74110
Revision: 74110
Author: kaldari
Date: 2010-10-01 21:27:21 +0000 (Fri, 01 Oct 2010)
Log Message:
-----------
add in close button stuff
Modified Paths:
--------------
trunk/extensions/CentralNotice/CentralNotice.i18n.php
trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
trunk/extensions/CentralNotice/centralnotice.js
Modified: trunk/extensions/CentralNotice/CentralNotice.i18n.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.i18n.php 2010-10-01
21:06:32 UTC (rev 74109)
+++ trunk/extensions/CentralNotice/CentralNotice.i18n.php 2010-10-01
21:27:21 UTC (rev 74110)
@@ -108,10 +108,11 @@
'centralnotice-clone-name' => 'Name:',
'centralnotice-preview-all-template-translations' => 'Preview all
available translations of banner',
'centralnotice-insert' => 'Insert: $1',
- 'centralnotice-hide-button' => '{{int:centralnotice-shared-hide}}
button',
- 'centralnotice-collapse-button' =>
'{{int:centralnotice-shared-collapse}} button',
- 'centralnotice-expand-button' => '{{int:centralnotice-shared-expand}}
button',
- 'centralnotice-translate-button' => 'Help translate button',
+ 'centralnotice-hide-button' => '{{int:centralnotice-shared-hide}} link',
+ 'centralnotice-collapse-button' =>
'{{int:centralnotice-shared-collapse}} link',
+ 'centralnotice-expand-button' => '{{int:centralnotice-shared-expand}}
link',
+ 'centralnotice-close-button' => 'Close button',
+ 'centralnotice-translate-button' => 'Help translate link',
'centralnotice-donate-button' => 'Donate button',
'centralnotice-expanded-banner' => 'Expanded banner',
'centralnotice-collapsed-banner' => 'Collapsed banner',
Modified: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialNoticeTemplate.php 2010-10-01
21:06:32 UTC (rev 74109)
+++ trunk/extensions/CentralNotice/SpecialNoticeTemplate.php 2010-10-01
21:27:21 UTC (rev 74110)
@@ -241,6 +241,7 @@
$htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) );
$htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
$buttons = array();
+ $buttons[] = '<a href="#"
onclick="insertButton(\'close\');return false;">' . wfMsg(
'centralnotice-close-button' ) . '</a>';
$buttons[] = '<a href="#"
onclick="insertButton(\'hide\');return false;">' . wfMsg(
'centralnotice-hide-button' ) . '</a>';
$buttons[] = '<a href="#"
onclick="insertButton(\'translate\');return false;">' . wfMsg(
'centralnotice-translate-button' ) . '</a>';
$htmlOut .= Xml::tags( 'div',
@@ -488,6 +489,7 @@
$htmlOut .= Xml::fieldset( wfMsg(
'centralnotice-edit-template' ) );
$htmlOut .= wfMsg(
'centralnotice-edit-template-summary' );
$buttons = array();
+ $buttons[] = '<a href="#"
onclick="insertButton(\'close\');return false;">' . wfMsg(
'centralnotice-close-button' ) . '</a>';
$buttons[] = '<a href="#"
onclick="insertButton(\'hide\');return false;">' . wfMsg(
'centralnotice-hide-button' ) . '</a>';
$buttons[] = '<a href="#"
onclick="insertButton(\'translate\');return false;">' . wfMsg(
'centralnotice-translate-button' ) . '</a>';
$htmlOut .= Xml::tags( 'div',
Modified: trunk/extensions/CentralNotice/centralnotice.js
===================================================================
--- trunk/extensions/CentralNotice/centralnotice.js 2010-10-01 21:06:32 UTC
(rev 74109)
+++ trunk/extensions/CentralNotice/centralnotice.js 2010-10-01 21:27:21 UTC
(rev 74110)
@@ -20,11 +20,14 @@
var bannerField = document.getElementById('templateBody');
switch( buttonType ) {
case 'translate':
- var buttonValue = '[<a
href="http://meta.wikimedia.org/wiki/CentralNotice">{{int:centralnotice-shared-help-translate}}</a>]';
- break;
+ var buttonValue = '[<a
href="http://meta.wikimedia.org/wiki/CentralNotice">{{int:centralnotice-shared-help-translate}}</a>]';
+ break;
case 'hide':
- var buttonValue = '[<a href="#" onclick="toggleNotice();return
false">{{int:centralnotice-shared-hide}}</a>]';
- break;
+ var buttonValue = '[<a href="#" onclick="toggleNotice();return
false">{{int:centralnotice-shared-hide}}</a>]';
+ break;
+ case 'close':
+ 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>';
+ break;
}
if (document.selection) {
// IE support
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs