r92123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92122‎ | r92123 | r92124 >
Date:23:16, 13 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Templates!
Modified paths:
  • /trunk/parsers/wikidom/demos/es/index.html (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Content.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Surface.css (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Surface.css
@@ -68,6 +68,12 @@
6969 display: none;
7070 }
7171
 72+.editSurface-format-template {
 73+ background-color: rgba(0,0,0,0.125);
 74+ border-radius: 0.25em;
 75+ padding: 0.25em 0;
 76+}
 77+
7278 .editSurface-format-italic {
7379 font-style: italic;
7480 }
@@ -76,7 +82,7 @@
7783 font-weight: bold;
7884 }
7985
80 -.editSurface-format-xlink {
 86+.editSurface-format-link {
8187 color: blue;
8288 text-decoration: underline;
8389 }
Index: trunk/parsers/wikidom/lib/es/es.Content.js
@@ -114,6 +114,12 @@
115115 };
116116
117117 Content.annotationRenderers = {
 118+ 'template': {
 119+ 'open': function( data ) {
 120+ return '<span class="editSurface-format-template">' + data.html;
 121+ },
 122+ 'close': '</span>',
 123+ },
118124 'bold': {
119125 'open': '<span class="editSurface-format-bold">',
120126 'close': '</span>',
@@ -134,9 +140,9 @@
135141 },
136142 'close': '</span>',
137143 },
138 - 'xlink': {
 144+ 'link': {
139145 'open': function( data ) {
140 - return '<span class="editSurface-format-xlink" data-href="' + data.href + '">';
 146+ return '<span class="editSurface-format-link" data-href="' + data.href + '">';
141147 },
142148 'close': '</span>'
143149 }
Index: trunk/parsers/wikidom/demos/es/index.html
@@ -74,7 +74,7 @@
7575 { 'type': 'italic', 'range': { 'start': 17, 'end': 26 } },
7676 // "wrap is" should be a link to "#"
7777 {
78 - 'type': 'xlink',
 78+ 'type': 'link',
7979 'data': { 'href': './' },
8080 'range': { 'start': 22, 'end': 29 }
8181 },
@@ -82,19 +82,15 @@
8383 },
8484 { 'text': "Word wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line." },
8585 {
86 - 'text': "It is usually done on the fly when viewing or printing a document, so no line break code is manually entered, or stored.[citation needed] If the user changes the margins, the editor will either automatically reposition the line breaks to ensure that all the text will \"flow\" within the margins and remain visible, or provide the typist some convenient way to reposition the line breaks.",
 86+ 'text': "It is usually done on the fly when viewing or printing a document, so no line break code is manually entered, or stored. If the user changes the margins, the editor will either automatically reposition the line breaks to ensure that all the text will \"flow\" within the margins and remain visible, or provide the typist some convenient way to reposition the line breaks.",
8787 'annotations': [
8888 // "[citation needed]" should be super
8989 {
90 - 'type': 'script',
91 - 'data': { 'type': 'super' },
92 - 'range': { 'start': 120, 'end': 137 }
93 - },
94 - // "[citation needed]" should be a linke to "#"
95 - {
96 - 'type': 'xlink',
97 - 'data': { 'href': './' },
98 - 'range': { 'start': 120, 'end': 137 }
 90+ 'type': 'template',
 91+ 'data': {
 92+ 'html': '<span class="editSurface-format-link editSurface-format-super">[citation needed]</span>'
 93+ },
 94+ 'range': { 'start': 120, 'end': 121 }
9995 }
10096 ]
10197 },

Status & tagging log