http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70615
Revision: 70615
Author: kaldari
Date: 2010-08-07 01:59:26 +0000 (Sat, 07 Aug 2010)
Log Message:
-----------
adding component insertion to editing interface
Modified Paths:
--------------
trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
trunk/extensions/CentralNotice/centralnotice.js
Modified: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialNoticeTemplate.php 2010-08-07
01:46:30 UTC (rev 70614)
+++ trunk/extensions/CentralNotice/SpecialNoticeTemplate.php 2010-08-07
01:59:26 UTC (rev 70615)
@@ -221,9 +221,11 @@
* View or edit an individual banner
*/
private function showView() {
- global $wgOut, $wgUser, $wgRequest, $wgContLanguageCode;
-
+ global $wgOut, $wgUser, $wgRequest, $wgContLanguageCode,
$wgScriptPath;
+
+ $scriptPath = "$wgScriptPath/extensions/CentralNotice";
$sk = $wgUser->getSkin();
+
if ( $this->editable ) {
$readonly = array();
} else {
@@ -394,16 +396,11 @@
}
$htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template'
) );
$htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
- $htmlOut .= Xml::openElement( 'table',
- array(
- 'cellpadding' => 9,
- 'width' => '100%'
- )
+ $htmlOut .= Xml::tags( 'div',
+ array( 'style' => 'margin-bottom: 0.2em;' ),
+ '<img src="'.$scriptPath.'/down-arrow.png"
style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert' ) . ': <a
href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg(
'centralnotice-hide-button' ) . '</a>, <a href="#"
onclick="insertButton(\'translate\');return false;">' . wfMsg(
'centralnotice-translate-button' ) . '</a>'
);
- $htmlOut .= Xml::tags( 'tr', null,
- Xml::tags( 'td', null, Xml::textarea( 'templateBody',
$body, 60, 20, $readonly ) )
- );
- $htmlOut .= Xml::closeElement( 'table' );
+ $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20,
$readonly );
if ( $this->editable ) {
$htmlOut .= Xml::hidden( 'authtoken',
$wgUser->editToken() );
$htmlOut .= Xml::tags( 'div',
Modified: trunk/extensions/CentralNotice/centralnotice.js
===================================================================
--- trunk/extensions/CentralNotice/centralnotice.js 2010-08-07 01:46:30 UTC
(rev 70614)
+++ trunk/extensions/CentralNotice/centralnotice.js 2010-08-07 01:59:26 UTC
(rev 70615)
@@ -40,4 +40,5 @@
} else {
bannerField.value += buttonValue;
}
+ bannerField.focus();
}
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs