Index: trunk/extensions/Lingo/LingoMessageLog.php |
— | — | @@ -22,26 +22,26 @@ |
23 | 23 | class LingoMessageLog { |
24 | 24 | |
25 | 25 | private $mMessages = array(); |
26 | | - private $parser = null; |
| 26 | + private $mParser = null; |
27 | 27 | |
28 | 28 | const MESSAGE_ERROR = 1; |
29 | 29 | const MESSAGE_WARNING = 2; |
30 | 30 | const MESSAGE_NOTICE = 3; |
31 | 31 | |
32 | 32 | function addMessage( $message, $severity = self::MESSAGE_NOTICE ) { |
33 | | - $this->mMessages[] = array( $message, $severity ); |
| 33 | + $this->mMessages[] = array($message, $severity); |
34 | 34 | } |
35 | 35 | |
36 | 36 | function addError( $message ) { |
37 | | - $this->mMessages[] = array( $message, self::MESSAGE_ERROR ); |
| 37 | + $this->mMessages[] = array($message, self::MESSAGE_ERROR); |
38 | 38 | } |
39 | 39 | |
40 | 40 | function addWarning( $message ) { |
41 | | - $this->mMessages[] = array( $message, self::MESSAGE_WARNING ); |
| 41 | + $this->mMessages[] = array($message, self::MESSAGE_WARNING); |
42 | 42 | } |
43 | 43 | |
44 | 44 | function addNotice( $message ) { |
45 | | - $this->mMessages[] = array( $message, self::MESSAGE_NOTICE ); |
| 45 | + $this->mMessages[] = array($message, self::MESSAGE_NOTICE); |
46 | 46 | } |
47 | 47 | |
48 | 48 | function getMessagesFormatted( $severity = self::MESSAGE_WARNING, $header = null ) { |
— | — | @@ -49,10 +49,6 @@ |
50 | 50 | |
51 | 51 | $ret = ''; |
52 | 52 | |
53 | | - if ( $header == null ) { |
54 | | - $header = wfMsg( 'semanticglossary-messageheader' ); |
55 | | - } |
56 | | - |
57 | 53 | foreach ( $this->mMessages as $message ) { |
58 | 54 | if ( $message[1] <= $severity ) { |
59 | 55 | $ret .= '* ' . $message[0] . "\n"; |
— | — | @@ -60,12 +56,18 @@ |
61 | 57 | } |
62 | 58 | |
63 | 59 | if ( $ret != '' ) { |
64 | | - if ( !$this->parser ) { |
| 60 | + if ( !$this->mParser ) { |
65 | 61 | $parser = new Parser(); |
66 | 62 | } |
67 | 63 | |
68 | | - $ret = Html::rawElement( 'div', array( 'class' => 'messages' ), |
69 | | - Html::rawElement( 'div', array( 'class' => 'heading' ), $header ) . |
| 64 | + if ( $header == null ) { |
| 65 | + $header = ''; |
| 66 | + } elseif ( $header != '' ) { |
| 67 | + $header = Html::rawElement( 'div', array('class' => 'heading'), $header ); |
| 68 | + } |
| 69 | + |
| 70 | + $ret = Html::rawElement( 'div', array('class' => 'messages'), |
| 71 | + $header . |
70 | 72 | $parser->parse( $ret, $wgTitle, ParserOptions::newFromUser( $wgUser ) )->getText() |
71 | 73 | ); |
72 | 74 | } |
Index: trunk/extensions/Lingo/skins/Lingo.css |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | width: 23em; |
25 | 25 | |
26 | 26 | font-weight: normal; |
27 | | - font-size: medium; |
| 27 | + font-size: small; |
28 | 28 | line-height: 1.2em; |
29 | 29 | |
30 | 30 | z-index: 2; |
Index: trunk/extensions/Lingo/LingoElement.php |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | global $wgScriptPath; |
121 | 121 | |
122 | 122 | $linkimage = $doc->createElement( 'img' ); |
123 | | - $linkimage->setAttribute( 'src', $wgScriptPath . '/extensions/SemanticLingo/skins/linkicon.png' ); |
| 123 | + $linkimage->setAttribute( 'src', $wgScriptPath . '/extensions/Lingo/skins/linkicon.png' ); |
124 | 124 | |
125 | 125 | self::$mLinkTemplate = $doc->createElement( 'a' ); |
126 | 126 | self::$mLinkTemplate->appendChild( $linkimage ); |