http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95123
Revision: 95123
Author: maxsem
Date: 2011-08-21 07:35:09 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
eol-style
Modified Paths:
--------------
trunk/extensions/wikihiero/SpecialHieroglyphs.php
trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js
trunk/extensions/wikihiero/wikihiero.alias.php
Property Changed:
----------------
trunk/extensions/wikihiero/SpecialHieroglyphs.php
trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js
trunk/extensions/wikihiero/wikihiero.alias.php
Modified: trunk/extensions/wikihiero/SpecialHieroglyphs.php
===================================================================
--- trunk/extensions/wikihiero/SpecialHieroglyphs.php 2011-08-21 06:58:35 UTC
(rev 95122)
+++ trunk/extensions/wikihiero/SpecialHieroglyphs.php 2011-08-21 07:35:09 UTC
(rev 95123)
@@ -1,63 +1,63 @@
-<?php
-
-/**
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-class SpecialHieroglyphs extends SpecialPage {
- public function __construct() {
- parent::__construct( 'Hieroglyphs' );
- }
-
- public function execute( $par ) {
- $this->setHeaders();
- $out = $this->getContext()->getOutput();
- $out->addModules( 'ext.wikihiero.Special' );
- $out->addWikiMsg( 'wikihiero-special-page-text' );
-
- $out->addHTML( '<div id="hiero-result">' );
-
- $text = trim( $this->getContext()->getRequest()->getVal(
'text', '' ) );
- if ( $text !== '' ) {
- $hiero = new WikiHiero();
- $out->addHTML( '<table class="wikitable">'
- . '<tr><th>' . wfMsg( 'wikihiero-input' ) .
'</th><th>'
- . wfMsg( 'wikihiero-result' ) . '</th></tr>'
- . '<tr><td><code><hiero>' .
htmlspecialchars( $text ) . '</hiero></code></td>'
- . "<td>{$hiero->renderHtml( $text
)}</td></tr></table>"
- );
- }
-
- $out->addHTML( '</div>' ); // id="hiero-result"
-
- $out->addHTML(
- Html::openElement( 'form',
- array(
- 'method' => 'get',
- 'action' => SpecialPage::getTitleFor(
'Hieroglyphs' )->getLinkUrl(),
- )
- )
- . Html::element( 'textarea', array( 'id' =>
'hiero-text', 'name' => 'text' ), $text )
- . Html::element( 'input', array(
- 'type' => 'submit',
- 'id' => 'hiero-submit',
- 'name' => 'submit',
- ) )
- . Html::closeElement( 'form' )
- );
-
- }
+<?php
+
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+class SpecialHieroglyphs extends SpecialPage {
+ public function __construct() {
+ parent::__construct( 'Hieroglyphs' );
+ }
+
+ public function execute( $par ) {
+ $this->setHeaders();
+ $out = $this->getContext()->getOutput();
+ $out->addModules( 'ext.wikihiero.Special' );
+ $out->addWikiMsg( 'wikihiero-special-page-text' );
+
+ $out->addHTML( '<div id="hiero-result">' );
+
+ $text = trim( $this->getContext()->getRequest()->getVal(
'text', '' ) );
+ if ( $text !== '' ) {
+ $hiero = new WikiHiero();
+ $out->addHTML( '<table class="wikitable">'
+ . '<tr><th>' . wfMsg( 'wikihiero-input' ) .
'</th><th>'
+ . wfMsg( 'wikihiero-result' ) . '</th></tr>'
+ . '<tr><td><code><hiero>' .
htmlspecialchars( $text ) . '</hiero></code></td>'
+ . "<td>{$hiero->renderHtml( $text
)}</td></tr></table>"
+ );
+ }
+
+ $out->addHTML( '</div>' ); // id="hiero-result"
+
+ $out->addHTML(
+ Html::openElement( 'form',
+ array(
+ 'method' => 'get',
+ 'action' => SpecialPage::getTitleFor(
'Hieroglyphs' )->getLinkUrl(),
+ )
+ )
+ . Html::element( 'textarea', array( 'id' =>
'hiero-text', 'name' => 'text' ), $text )
+ . Html::element( 'input', array(
+ 'type' => 'submit',
+ 'id' => 'hiero-submit',
+ 'name' => 'submit',
+ ) )
+ . Html::closeElement( 'form' )
+ );
+
+ }
}
\ No newline at end of file
Property changes on: trunk/extensions/wikihiero/SpecialHieroglyphs.php
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js
===================================================================
--- trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js 2011-08-21
06:58:35 UTC (rev 95122)
+++ trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js 2011-08-21
07:35:09 UTC (rev 95123)
@@ -1,43 +1,43 @@
-jQuery( function ( $ ) {
-
-var $textarea = $( '#hiero-text' );
-var $submit = $( '#hiero-submit' );
-var $result = $( '#hiero-result' );
-
-$textarea.keyup( function() {
- if ( $textarea.val().length == 0 ) {
- $submit.attr( 'disabled', 'disabled' );
- } else {
- $submit.removeAttr( 'disabled' );
- }
-});
-$textarea.keyup();
-
-$submit.click( function( e ) {
- e.preventDefault();
- $result.hide();
- var text = $textarea.val();
- var data = {
- 'format': 'json',
- 'action': 'parse',
- 'text': '<hiero>' + text + '</hiero>',
- 'disablepp': ''
- };
- $.getJSON( mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath'
) + '/api' + mw.config.get( 'wgScriptExtension' ),
- data,
- function( data ) {
- var html = '<table class="wikitable">'
- + '<tr><th>' + mw.msg( 'wikihiero-input' ) +
'</th><th>'
- + mw.msg( 'wikihiero-result' ) + '</th></tr>'
- + '<tr><td><code><hiero>' +
mw.html.escape( text ) + '</hiero></code></td>'
- + '<td>' + data.parse.text['*'] +
'</td></tr></table>';
- $result.html( html );
- $result.show();
- }
- ).error( function() {
- $result.text( mw.msg( 'wikihiero-load-error' ) );
- $result.show();
- });
-});
-
+jQuery( function ( $ ) {
+
+var $textarea = $( '#hiero-text' );
+var $submit = $( '#hiero-submit' );
+var $result = $( '#hiero-result' );
+
+$textarea.keyup( function() {
+ if ( $textarea.val().length == 0 ) {
+ $submit.attr( 'disabled', 'disabled' );
+ } else {
+ $submit.removeAttr( 'disabled' );
+ }
+});
+$textarea.keyup();
+
+$submit.click( function( e ) {
+ e.preventDefault();
+ $result.hide();
+ var text = $textarea.val();
+ var data = {
+ 'format': 'json',
+ 'action': 'parse',
+ 'text': '<hiero>' + text + '</hiero>',
+ 'disablepp': ''
+ };
+ $.getJSON( mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath'
) + '/api' + mw.config.get( 'wgScriptExtension' ),
+ data,
+ function( data ) {
+ var html = '<table class="wikitable">'
+ + '<tr><th>' + mw.msg( 'wikihiero-input' ) +
'</th><th>'
+ + mw.msg( 'wikihiero-result' ) + '</th></tr>'
+ + '<tr><td><code><hiero>' +
mw.html.escape( text ) + '</hiero></code></td>'
+ + '<td>' + data.parse.text['*'] +
'</td></tr></table>';
+ $result.html( html );
+ $result.show();
+ }
+ ).error( function() {
+ $result.text( mw.msg( 'wikihiero-load-error' ) );
+ $result.show();
+ });
+});
+
});
\ No newline at end of file
Property changes on: trunk/extensions/wikihiero/modules/ext.wikihiero.Special.js
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/extensions/wikihiero/wikihiero.alias.php
===================================================================
--- trunk/extensions/wikihiero/wikihiero.alias.php 2011-08-21 06:58:35 UTC
(rev 95122)
+++ trunk/extensions/wikihiero/wikihiero.alias.php 2011-08-21 07:35:09 UTC
(rev 95123)
@@ -1,7 +1,7 @@
-<?php
-
-$aliases = array();
-
-$aliases['en'] = array(
- 'Hieroglyphs' => array( 'Hieroglyphs' ),
-);
+<?php
+
+$aliases = array();
+
+$aliases['en'] = array(
+ 'Hieroglyphs' => array( 'Hieroglyphs' ),
+);
Property changes on: trunk/extensions/wikihiero/wikihiero.alias.php
___________________________________________________________________
Added: svn:eol-style
+ native
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs