r52473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52472‎ | r52473 | r52474 >
Date:18:17, 26 June 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Lots of RTL and IE6 fixes in both the skin and the toolbar.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.i18n.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/vector/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/vector/main.css
@@ -57,13 +57,11 @@
5858 top: 0;
5959 right: 0;
6060 width: 100%;
61 - margin-right: 0.75em;
6261 }
6362 body.rtl div#head {
6463 right: auto;
6564 left: 0;
6665 margin-right: auto;
67 - margin-left: 0.75em;
6866 }
6967 div#head ul,
7068 div#head li {
@@ -79,10 +77,10 @@
8078 div#personal {
8179 position: absolute;
8280 top: 0;
83 - right: 0;
 81+ right: 0.75em;
8482 }
8583 body.rtl div#personal {
86 - left: 0;
 84+ left: 0.75em;
8785 right: auto;
8886 }
8987 div#personal h5 {
@@ -98,25 +96,37 @@
9997 margin-left: auto;
10098 margin-right: 0.75em;
10199 }
 100+ body.rtl div#personal > ul > li {
 101+ float: right;
 102+ margin-left: 0;
 103+ margin-right: 0.75em;
 104+ }
102105 /* Navigation */
103106 div#left-navigation {
104107 margin-top: 3em;
105 - margin-left: 12.75em;
 108+ margin-left: 12em;
106109 }
107 - /*
 110+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
108111 body.rtl div#left-navigation {
 112+ margin-left: 0;
 113+ }
 114+ /* IGNORED BY IE6 */
 115+ body.rtl div#head > div#left-navigation {
109116 margin-left: auto;
110 - margin-right: 12.75em;
 117+ margin-right: 12em;
111118 }
112 - */
113119 div#right-navigation {
114120 float: right;
115121 }
116 - /*
 122+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
117123 body.rtl div#right-navigation {
 124+ margin-right: 6em;
 125+ }
 126+ /* IGNORED BY IE6 */
 127+ body.rtl div#head > div#right-navigation {
 128+ margin-right: auto;
118129 float: left;
119130 }
120 - */
121131 /* Navigation Labels */
122132 div#namespaces h5,
123133 div#variants h5,
@@ -134,25 +144,27 @@
135145 background-repeat: no-repeat;
136146 padding-left: 1px;
137147 }
138 - /*
139 - body.rtl div#namespaces,
140 - body.rtl div#views {
 148+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
 149+ body.rtl div#left-navigation div#namespaces {
 150+ padding-left: 0;
 151+ }
 152+ /* IGNORED BY IE6 */
 153+ body.rtl div#left-navigation > div#namespaces,
 154+ body.rtl div#right-navigation > div#views {
141155 float: right;
142156 background-position: bottom right;
143157 padding-left: 0;
144158 padding-right: 1px;
145159 }
146 - */
147160 div#namespaces ul,
148161 div#views ul {
149162 float: left;
150163 }
151 - /*
152 - body.rtl div#namespaces ul,
153 - body.rtl div#views ul {
 164+ /* IGNORED BY IE6 */
 165+ body.rtl div#left-navigation > div#namespaces ul,
 166+ body.rtl div#right-navigation > div#views ul {
154167 float: right;
155168 }
156 - */
157169 div#namespaces li,
158170 div#views li {
159171 float: left;
@@ -161,13 +173,12 @@
162174 background-position: bottom left;
163175 background-repeat: repeat-x;
164176 }
165 - /*
166 - body.rtl div#namespaces li,
167 - body.rtl div#views li {
 177+ /* IGNORED BY IE6 */
 178+ body.rtl div#namespaces > ul > li,
 179+ body.rtl div#views > ul > li {
168180 float: right;
169181 background-position: bottom right;
170182 }
171 - */
172183 div#namespaces li.selected,
173184 div#views li.selected {
174185 background-image: url(images/tab-current-fade.png);
@@ -182,12 +193,11 @@
183194 background-position: bottom right;
184195 background-repeat: no-repeat;
185196 }
186 - /*
187 - body.rtl div#namespaces a,
188 - body.rtl div#views a {
 197+ /* IGNORED BY IE6 */
 198+ body.rtl div#namespaces li > a,
 199+ body.rtl div#views li > a {
189200 background-position: bottom left;
190201 }
191 - */
192202 div#namespaces a span,
193203 div#views a span {
194204 color: #0645ad;
@@ -213,22 +223,20 @@
214224 background-position: center center;
215225 background-repeat: no-repeat;
216226 }
217 - /*
218 - body.rtl div#variants,
219 - body.rtl div#actions {
 227+ /* IGNORED BY IE6 */
 228+ body.rtl div#left-navigation > div#variants,
 229+ body.rtl div#right-navigation > div#actions {
220230 float: right;
221231 }
222 - */
223232 div#variants h5,
224233 div#actions h5 {
225234 float: left;
226235 }
227 - /*
228 - body.rtl div#variants h5,
229 - body.rtl div#actions h5 {
 236+ /* IGNORED BY IE6 */
 237+ body.rtl div#variants > h5,
 238+ body.rtl div#actions > h5 {
230239 float: right;
231240 }
232 - */
233241 div#variants h5 a,
234242 div#actions h5 a {
235243 display: inline-block;
@@ -239,13 +247,12 @@
240248 background-position: bottom right;
241249 background-repeat: no-repeat;
242250 }
243 - /*
244 - body.rtl div#variants h5 a,
245 - body.rtl div#actions h5 a {
 251+ /* IGNORED BY IE6 */
 252+ body.rtl div#variants > h5 a,
 253+ body.rtl div#actions > h5 a {
246254 display: inline-block;
247255 background-position: bottom left;
248256 }
249 - */
250257 div#variants div.menu,
251258 div#actions div.menu {
252259 display: none;
@@ -265,13 +272,18 @@
266273 margin: 0;
267274 margin-left: -1px;
268275 }
269 - /*
 276+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
270277 body.rtl div#variants ul,
271278 body.rtl div#actions ul {
272279 margin-left: 0;
 280+ margin-right: -24px;
 281+ }
 282+ /* IGNORED BY IE6 */
 283+ body.rtl div#variants div.menu > ul,
 284+ body.rtl div#actions div.menu > ul {
 285+ margin-left: 0;
273286 margin-right: -1px;
274287 }
275 - */
276288 div#variants:hover li a,
277289 div#actions li a {
278290 display: inline-block;
@@ -280,26 +292,30 @@
281293 /* Search */
282294 div#search {
283295 float: left;
 296+ margin-right: 0.75em;
284297 }
285 - /*
286 - body.rtl div#search {
 298+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
 299+ body.rtl div#right-navigation div#search {
 300+ margin-right: 0;
 301+ }
 302+ /* IGNORED BY IE6 */
 303+ body.rtl div#right-navigation > div#search {
287304 float: right;
 305+ margin-left: 0.75em;
288306 }
289 - */
290307 div#search form,
291308 div#search input {
292309 float: left;
293310 margin-top: 0.4em;
294311 margin-left: 0.25em;
295312 }
296 - /*
297 - body.rtl div#search form,
298 - body.rtl div#search input {
 313+ /* IGNORED BY IE6 */
 314+ body.rtl div#search > form,
 315+ body.rtl div#search > form > input {
299316 float: right;
300317 margin-left: 0;
301318 margin-right: 0.25em;
302319 }
303 - */
304320 /* Panel */
305321 div#panel {
306322 position: absolute;
@@ -450,7 +466,6 @@
451467 #preftoc {
452468 /* Tabs */
453469 float: left;
454 - zoom: 1;
455470 clear: both;
456471 margin: 0 !important;
457472 padding: 0 !important;
@@ -459,13 +474,14 @@
460475 background-position: bottom left;
461476 background-repeat: no-repeat;
462477 }
463 -body.rtl #preftoc {
 478+/* IGNORED BY IE6 */
 479+body.rtl form > #preftoc {
 480+ float: right;
464481 background-position: bottom right;
465482 }
466483 #preftoc li {
467484 /* Tab */
468485 float: left;
469 - zoom: 1;
470486 margin: 0;
471487 padding: 0;
472488 padding-right: 1px;
@@ -477,10 +493,17 @@
478494 background-position: bottom right;
479495 background-repeat: no-repeat;
480496 }
 497+ /* IGNORED BY IE6 */
481498 #preftoc li:first-child {
482499 margin-left: 1px;
483500 }
484 - body.rtl #preftoc li {
 501+ /* IGNORED BY IE6 */
 502+ body.rtl #preftoc li:first-child {
 503+ margin-left: 0;
 504+ margin-right: 1px;
 505+ }
 506+ /* IGNORED BY IE6 */
 507+ body.rtl #preftoc > li {
485508 float: right;
486509 padding-right: 0;
487510 padding-left: 1px;
@@ -517,19 +540,19 @@
518541 background-color: #f9f9f9;
519542 background-image: url(images/preferences-base.png);
520543 }
521 -#preferences > fieldset.prefsection {
 544+#preferences fieldset.prefsection {
522545 border: none;
523546 padding: 0;
524547 margin: 1em;
525548 }
526 -#preferences > fieldset.prefsection > fieldset {
 549+#preferences fieldset.prefsection fieldset {
527550 border: none;
528551 border-top: solid 1px #cccccc;
529552 }
530553 #preferences legend {
531554 color: #666666;
532555 }
533 -#preferences > fieldset.prefsection > legend.mainLegend {
 556+#preferences fieldset.prefsection legend.mainLegend {
534557 display: none;
535558 }
536559 #preferences td {
Index: trunk/phase3/includes/SkinTemplate.php
@@ -112,7 +112,7 @@
113113 $out->addStyle( 'common/shared.css', 'screen' );
114114 $out->addStyle( 'common/commonPrint.css', 'print' );
115115 }
116 -
 116+
117117 /**
118118 * Create the template engine object; we feed it a bunch of data
119119 * and eventually it spits out some HTML. Should have interface
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css
@@ -4,11 +4,11 @@
55 form#editform {
66 margin: 0;
77 padding: 0;
8 - padding-right: 2px;
 8+ margin-right: 5px;
99 }
1010 body.rtl form#editform {
1111 padding-right: 0;
12 - padding-left: 2px;
 12+ margin-left: 5px;
1313 }
1414 textarea#wpTextbox1 {
1515 border: solid silver 1px;
@@ -64,7 +64,7 @@
6565 }
6666
6767 /* Toolbar Groups and Tabs */
68 -div#edittoolbar ul.tabs,
 68+div#edittoolbar div.tabs,
6969 div#edittoolbar div.group {
7070 float: left;
7171 height: 26px;
@@ -76,7 +76,7 @@
7777 div#edittoolbar div.first {
7878 border-left: none;
7979 }
80 -body.rtl div#edittoolbar ul.tabs,
 80+body.rtl div#edittoolbar div.tabs,
8181 body.rtl div#edittoolbar div.group {
8282 float: right;
8383 padding-left: 0;
@@ -89,19 +89,20 @@
9090 }
9191
9292 /* Tabs */
93 -div#edittoolbar ul.tabs {
 93+div#edittoolbar div.tabs {
9494 list-style: none;
9595 }
96 -div#edittoolbar ul.tabs li.tab {
 96+div#edittoolbar div.tabs span.tab {
9797 display: inline-block;
9898 float: left;
9999 line-height: 26px;
100100 }
101 -body.rtl div#edittoolbar ul.tabs li.tab {
 101+/* IGNORED BY IE6 */
 102+body.rtl div#edittoolbar div.tabs > span.tab {
102103 float: right;
103104 }
104 -div#edittoolbar ul.tabs li.tab a,
105 -div#edittoolbar ul.tabs li.tab a:visited {
 105+div#edittoolbar div.tabs span.tab a,
 106+div#edittoolbar div.tabs span.tab a:visited {
106107 display: inline-block;
107108 float: left;
108109 padding-left: 18px;
@@ -113,24 +114,30 @@
114115 background-position: left center;
115116 background-repeat: no-repeat;
116117 }
117 -body.rtl div#edittoolbar ul.tabs li.tab a,
118 -body.rtl div#edittoolbar ul.tabs li.tab a:visited {
119 - float: right;
 118+body.rtl div#edittoolbar div.tabs span.tab a,
 119+body.rtl div#edittoolbar div.tabs span.tab a:visited {
120120 padding-left: 12px;
121121 padding-right: 18px;
122122 background-image: url(images/arrow-left.png);
123123 background-position: right center;
124124 }
125 -div#edittoolbar ul.tabs li.tab a.current,
126 -div#edittoolbar ul.tabs li.tab a.current:visited {
 125+/* IGNORED BY IE6 */
 126+body.rtl div#edittoolbar div.tabs > span.tab > a,
 127+body.rtl div#edittoolbar div.tabs > pan.tab > a:visited {
 128+ float: right;
 129+}
 130+div#edittoolbar div.tabs span.tab a.current,
 131+div#edittoolbar div.tabs span.tab a.current:visited {
127132 color: #333333;
128133 background-image: url(images/arrow-down.png);
129134 }
130 -body.rtl div#edittoolbar ul.tabs li.tab a.current,
131 -body.rtl div#edittoolbar ul.tabs li.tab a.current:visited {
 135+/*
 136+body.rtl div#edittoolbar div.tabs span.tab a.current,
 137+body.rtl div#edittoolbar div.tabs span.tab a.current:visited {
132138 background-image: url(images/arrow-down.png);
133139 }
134 -div#edittoolbar ul.tabs li.tab a.current:hover {
 140+*/
 141+div#edittoolbar div.tabs span.tab a.current:hover {
135142 text-decoration: none;
136143 }
137144
@@ -146,7 +153,8 @@
147154 color: #777777;
148155 cursor: default;
149156 }
150 -body.rtl div#edittoolbar div.group div.label {
 157+/* IGNORED BY IE6 */
 158+body.rtl div#edittoolbar div.group > div.label {
151159 float: right;
152160 margin-left: 8px;
153161 margin-right: 5px;
@@ -159,7 +167,8 @@
160168 padding: 2px;
161169 cursor: pointer;
162170 }
163 -body.rtl div#edittoolbar div.group input.tool {
 171+/* IGNORED BY IE6 */
 172+body.rtl div#edittoolbar div.group > input.tool {
164173 float: right;
165174 }
166175 div#edittoolbar div.group select {
@@ -168,7 +177,8 @@
169178 height: 22px;
170179 cursor: pointer;
171180 }
172 -body.rtl div#edittoolbar div.group select {
 181+/* IGNORED BY IE6 */
 182+body.rtl div#edittoolbar div.group > select {
173183 float: right;
174184 font-size: 0.9em;
175185 }
@@ -256,7 +266,7 @@
257267 color: black;
258268 text-decoration: none;
259269 }
260 -body.rtl div#edittoolbar-section-characters div.page div a {
 270+body.rtl div#edittoolbar-section-characters div.page > div > a {
261271 direction: rtl;
262272 float: right;
263273 margin-left: 0;
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php
@@ -91,10 +91,9 @@
9292 'edittoolbar-tool-superscript-example',
9393 'edittoolbar-tool-subscript',
9494 'edittoolbar-tool-subscript-example',
95 - 'edittoolbar-group-media',
 95+ 'edittoolbar-group-insert',
9696 'edittoolbar-tool-gallery',
9797 'edittoolbar-tool-gallery-example',
98 - 'edittoolbar-group-whitespace',
9998 'edittoolbar-tool-newline',
10099 /* Special Characters Section */
101100 'edittoolbar-section-characters',
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js
@@ -21,7 +21,7 @@
2222 $(this).addToolbarSection( tools.main, textbox, 'main' );
2323 }
2424 // Appends additional section tabs
25 - var tabUl = $( '<ul />' )
 25+ var tabDiv = $( '<div />' )
2626 .attr( 'class', 'tabs' )
2727 .appendTo( $(this) );
2828 // Appends additional section
@@ -29,7 +29,7 @@
3030 .attr( 'class', 'sections' )
3131 .appendTo( $(this) );
3232 // Appends float-clearing div
33 - $(this).append( $( '<div style="clear:both"></div>' ) );
 33+ $(this).append( $( '<div style="clear:both;"></div>' ) );
3434 // Cookie name for storing section state
3535 var sectionCookie = 'edittoolbar-' + $(this).attr( 'id' ) + '-section';
3636 // Queue for sections to be built asynchonously
@@ -64,8 +64,8 @@
6565 'textbox': textbox
6666 };
6767 // Appends section tab
68 - tabUl.append(
69 - $( '<li />' )
 68+ tabDiv.append(
 69+ $( '<span />' )
7070 .attr( 'class', 'tab' )
7171 .append(
7272 $( '<a />' )
@@ -705,8 +705,8 @@
706706 }
707707 }
708708 },
709 - 'media': {
710 - labelMsg: 'edittoolbar-group-media',
 709+ 'insert': {
 710+ labelMsg: 'edittoolbar-group-insert',
711711 tools: {
712712 'gallery': {
713713 labelMsg: 'edittoolbar-tool-gallery',
@@ -720,12 +720,7 @@
721721 post: "\n</gallery>"
722722 }
723723 }
724 - }
725 - }
726 - },
727 - 'whitespace': {
728 - labelMsg: 'edittoolbar-group-whitespace',
729 - tools: {
 724+ },
730725 'newline': {
731726 labelMsg: 'edittoolbar-tool-newline',
732727 type: 'button',
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.i18n.php
@@ -55,10 +55,9 @@
5656 'edittoolbar-tool-superscript-example' => 'Superscript text',
5757 'edittoolbar-tool-subscript' => 'Subscript',
5858 'edittoolbar-tool-subscript-example' => 'Subscript text',
59 - 'edittoolbar-group-media' => 'Media',
 59+ 'edittoolbar-group-insert' => 'Insert',
6060 'edittoolbar-tool-gallery' => 'Picture gallery',
6161 'edittoolbar-tool-gallery-example' => "File:Example.jpg|Caption1\nFile:Example.jpg|Caption2",
62 - 'edittoolbar-group-whitespace' => 'Whitespace',
6362 'edittoolbar-tool-newline' => 'New line',
6463 /* Special characters Section */
6564 'edittoolbar-section-characters' => 'Special characters',

Status & tagging log