Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -20,6 +20,8 @@ |
21 | 21 | |
22 | 22 | .mw-float-start { float: left; } |
23 | 23 | .mw-float-end { float: right; } |
| 24 | +.mw-align-start { text-align: left; } |
| 25 | +.mw-align-end { text-align: left; } |
24 | 26 | |
25 | 27 | /* The scripts of these languages are very hard to read with underlines */ |
26 | 28 | [lang="ar"] a, [lang="ckb"] a, [lang="fa"] a, [lang="kk-arab"] a, |
Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | $dir = dirname( __FILE__ ) . '/'; |
35 | 35 | |
36 | 36 | # Extension version |
37 | | -$wgCollectionVersion = "1.4"; |
| 37 | +$wgCollectionVersion = "1.5"; |
38 | 38 | |
39 | 39 | # ============================================================================== |
40 | 40 | |
Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -235,7 +235,7 @@ |
236 | 236 | $addRemoveState = $mode; |
237 | 237 | |
238 | 238 | $html = Xml::element( 'div', |
239 | | - array( 'style' => wfMsg( 'coll-book_creator_box_style' ) ), |
| 239 | + array( 'class' => 'collection-creatorbox' ), |
240 | 240 | null |
241 | 241 | ); |
242 | 242 | |
— | — | @@ -245,16 +245,16 @@ |
246 | 246 | 'alt' => '', |
247 | 247 | 'width' => '80', |
248 | 248 | 'height' => '45', |
249 | | - 'style' => 'float: left;', |
| 249 | + 'class' => 'mw-float-start collection-creatorbox-book', |
250 | 250 | ), |
251 | 251 | '', |
252 | 252 | true |
253 | 253 | ); |
254 | 254 | |
255 | 255 | $html .= Xml::tags( 'div', |
256 | | - array( 'style' => 'margin-left: 90px;' ), |
| 256 | + array( 'class' => 'collection-creatorbox-row' ), |
257 | 257 | Xml::tags( 'div', |
258 | | - array( 'style' => 'float: right' ), |
| 258 | + array( 'class' => 'mw-float-end' ), |
259 | 259 | $skin->link( |
260 | 260 | Title::newFromText( wfMsg( 'coll-helppage' ) ), |
261 | 261 | Xml::element( 'img', |
— | — | @@ -275,8 +275,8 @@ |
276 | 276 | array( 'known', 'noclasses' ) |
277 | 277 | ) |
278 | 278 | ) |
279 | | - . Xml::tags( 'strong', |
280 | | - array( 'style' => 'font-size: 1.2em' ), |
| 279 | + . Xml::tags( 'span', |
| 280 | + array( 'class' => 'collection-creatorbox-title' ), |
281 | 281 | wfMsgHtml( 'coll-book_creator' ) |
282 | 282 | ) |
283 | 283 | . ' (' |
— | — | @@ -296,7 +296,7 @@ |
297 | 297 | $html .= Xml::tags( 'div', |
298 | 298 | array( |
299 | 299 | 'id' => 'coll-book_creator_box', |
300 | | - 'style' => 'margin-left: 90px; margin-bottom: 0;', |
| 300 | + 'class' => 'collection-creatorbox-row', |
301 | 301 | ), |
302 | 302 | self::getBookCreatorBoxContent( $skin, $title, $addRemoveState, $oldid ) |
303 | 303 | ); |
— | — | @@ -371,7 +371,6 @@ |
372 | 372 | 'alt' => '', |
373 | 373 | 'width' => '16', |
374 | 374 | 'height' => '16', |
375 | | - 'style' => 'vertical-align: text-bottom', |
376 | 375 | ) |
377 | 376 | ) |
378 | 377 | . ' ' . wfMsgHtml( $captionMsg ), |
— | — | @@ -392,7 +391,7 @@ |
393 | 392 | if ( $ajaxHint == 'showbook' ) { |
394 | 393 | return Xml::tags( 'strong', |
395 | 394 | array( |
396 | | - 'style' => 'margin-left: 10px;', |
| 395 | + 'class' => 'collection-creatorbox-iconlink', |
397 | 396 | ), |
398 | 397 | Xml::element( 'img', |
399 | 398 | array( |
— | — | @@ -400,7 +399,6 @@ |
401 | 400 | 'alt' => '', |
402 | 401 | 'width' => '16', |
403 | 402 | 'height' => '16', |
404 | | - 'style' => 'vertical-align: text-bottom', |
405 | 403 | ) |
406 | 404 | ) |
407 | 405 | . ' ' . wfMsgHtml( 'coll-show_collection' ) |
— | — | @@ -415,7 +413,6 @@ |
416 | 414 | 'alt' => '', |
417 | 415 | 'width' => '16', |
418 | 416 | 'height' => '16', |
419 | | - 'style' => 'vertical-align: text-bottom', |
420 | 417 | ) |
421 | 418 | ) |
422 | 419 | . ' ' . wfMsgHtml( 'coll-show_collection' ) |
— | — | @@ -423,7 +420,7 @@ |
424 | 421 | array( |
425 | 422 | 'rel' => 'nofollow', |
426 | 423 | 'title' => wfMsg( 'coll-show_collection_tooltip' ), |
427 | | - 'style' => 'margin-left: 10px', |
| 424 | + 'class' => 'collection-creatorbox-iconlink', |
428 | 425 | ), |
429 | 426 | array(), |
430 | 427 | array( 'known', 'noclasses' ) |
— | — | @@ -439,7 +436,7 @@ |
440 | 437 | if ( $ajaxHint == 'suggest' ) { |
441 | 438 | return Xml::tags( 'strong', |
442 | 439 | array( |
443 | | - 'style' => 'margin-left: 10px;', |
| 440 | + 'class' => 'collection-creatorbox-iconlink', |
444 | 441 | ), |
445 | 442 | Xml::element( 'img', |
446 | 443 | array( |
— | — | @@ -468,7 +465,7 @@ |
469 | 466 | array( |
470 | 467 | 'rel' => 'nofollow', |
471 | 468 | 'title' => wfMsg( 'coll-make_suggestions_tooltip' ), |
472 | | - 'style' => 'margin-left: 10px', |
| 469 | + 'class' => 'collection-creatorbox-iconlink', |
473 | 470 | ), |
474 | 471 | array( 'bookcmd' => 'suggest', ), |
475 | 472 | array( 'known', 'noclasses' ) |
Index: trunk/extensions/Collection/CollectionCore.i18n.php |
— | — | @@ -32,7 +32,6 @@ |
33 | 33 | 'coll-book_creator' => 'Book creator', |
34 | 34 | 'coll-download_as' => 'Download as $1', |
35 | 35 | 'coll-download_as_tooltip' => 'Download a $1 version of this wiki page', |
36 | | - 'coll-book_creator_box_style' => 'text-align: left; margin: 10px 0; padding: 5px 10px; border: 1px solid #aaa; background-color: #f9f9ff;', |
37 | 36 | 'coll-disable' => 'disable', |
38 | 37 | 'coll-book_creator_disable' => 'Disable book creator', |
39 | 38 | 'coll-book_creator_disable_tooltip' => 'Stop using the book creator', |
Index: trunk/extensions/Collection/js/bookcreator.css |
— | — | @@ -8,6 +8,66 @@ |
9 | 9 | font-size: 10pt; |
10 | 10 | } |
11 | 11 | |
| 12 | +/* |
| 13 | + * Special page |
| 14 | + */ |
| 15 | + |
| 16 | +.collection-column { |
| 17 | + width: 47%; |
| 18 | +} |
| 19 | + |
| 20 | +.collection-column-left { |
| 21 | + margin-right: 5%; |
| 22 | +} |
| 23 | + |
| 24 | +.collection-column-right-box { |
| 25 | + margin-bottom: 10px; |
| 26 | + padding: 10px; |
| 27 | + border: 1px solid #aaa; |
| 28 | + background-color: #f9f9f9; |
| 29 | +} |
| 30 | + |
| 31 | +/* Input follows user direction */ |
| 32 | +#mw-collection-title-form input { |
| 33 | + direction: ltr; |
| 34 | +} |
| 35 | + |
| 36 | +.collection-create-chapter-links { |
| 37 | + text-align: center; |
| 38 | + padding: 2px; |
| 39 | + margin-top: 20px; |
| 40 | + margin-bottom: 2px; |
| 41 | + border: 1px solid #aaa; |
| 42 | + background-color: #f9f9f9; |
| 43 | +} |
| 44 | + |
| 45 | +.collection-create-chapter-links a { |
| 46 | + margin: 0 1em; |
| 47 | +} |
| 48 | + |
| 49 | +.collection-create-chapter-list { |
| 50 | + padding: 10px 20px; |
| 51 | + border: 1px solid rgb(170, 170, 170); |
| 52 | +} |
| 53 | + |
| 54 | +.collection-create-chapter-list-text { |
| 55 | + text-align: center; |
| 56 | + margin-bottom: 10px; |
| 57 | +} |
| 58 | + |
| 59 | +.collection-create-chapter-list ul { |
| 60 | + list-style: none; |
| 61 | + margin-left: 0; |
| 62 | +} |
| 63 | + |
| 64 | +.collection-create-chapter-list .chapter { |
| 65 | + margin-top:0.3em; |
| 66 | +} |
| 67 | + |
| 68 | +.collection-create-chapter-list .article .title { |
| 69 | + margin-left: 1em; |
| 70 | +} |
| 71 | + |
12 | 72 | .collection-button { |
13 | 73 | float: left; |
14 | 74 | padding: 0 10px; |
— | — | @@ -38,3 +98,42 @@ |
39 | 99 | .collection-button a:hover { |
40 | 100 | text-decoration: none; |
41 | 101 | } |
| 102 | + |
| 103 | +/* |
| 104 | + * Creator box |
| 105 | + */ |
| 106 | + |
| 107 | +.collection-creatorbox { |
| 108 | + text-align: left; |
| 109 | + margin: 10px 0; |
| 110 | + padding: 5px 10px; |
| 111 | + border: 1px solid #aaa; |
| 112 | + background-color: #f9f9ff; |
| 113 | +} |
| 114 | + |
| 115 | +.collection-creatorbox-row { |
| 116 | + margin-left: 90px; |
| 117 | + margin-bottom: 0; |
| 118 | +} |
| 119 | + |
| 120 | +/* Trivial but nicer for the browsers that support it */ |
| 121 | +.rtl .collection-creatorbox-book { |
| 122 | + --ms-transform: scaleX(-1); |
| 123 | + -moz-transform: scaleX(-1); |
| 124 | + -o-transform: scaleX(-1); |
| 125 | + -webkit-transform: scaleX(-1); |
| 126 | + transform: scaleX(-1); |
| 127 | +} |
| 128 | + |
| 129 | +.collection-creatorbox-title { |
| 130 | + font-weight: bold; |
| 131 | + font-size: 1.2em; |
| 132 | +} |
| 133 | + |
| 134 | +.collection-creatorbox-iconlink { |
| 135 | + margin-left: 10px; |
| 136 | +} |
| 137 | + |
| 138 | +.collection-creatorbox-row img { |
| 139 | + vertical-align: text-bottom; |
| 140 | +} |
\ No newline at end of file |
Index: trunk/extensions/Collection/Collection.templates.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | $mediapath = $GLOBALS['wgScriptPath'] . '/extensions/Collection/images/'; |
17 | 17 | ?> |
18 | 18 | |
19 | | -<div style="width: 47%; float: left; margin-right: 5%"> |
| 19 | +<div class="mw-float-start collection-column collection-column-left"> |
20 | 20 | |
21 | 21 | <form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post" id="mw-collection-title-form"> |
22 | 22 | <table id="mw-collection-title-table" style="width: 80%; background-color: transparent;" align="center"> |
— | — | @@ -51,16 +51,16 @@ |
52 | 52 | |
53 | 53 | </div> |
54 | 54 | |
55 | | -<div style="width: 47%; float: left"> |
| 55 | +<div class="mw-float-start collection-column collection-column-right"> |
56 | 56 | |
57 | | - <div style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;"> |
| 57 | + <div class="collection-column-right-box"> |
58 | 58 | <h2><span class="mw-headline"><?php $this->msg( 'coll-book_title' ) ?></span></h2> |
59 | 59 | <?php |
60 | 60 | $partnerData = $this->data['podpartners']['pediapress']; |
61 | 61 | $this->msgWiki( 'coll-book_text' ); |
62 | 62 | ?> |
63 | 63 | <div> |
64 | | - <div style="float:right"> |
| 64 | + <div class="mw-float-end"> |
65 | 65 | <form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post"> |
66 | 66 | <input type="hidden" name="bookcmd" value="post_zip" /> |
67 | 67 | <input type="hidden" name="partner" value="pediapress" /> |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | <?php } ?> |
92 | 92 | </div> |
93 | 93 | |
94 | | - <div style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;"> |
| 94 | + <div class="collection-column-right-box"> |
95 | 95 | <h2><span class="mw-headline"><?php $this->msg( 'coll-download_title' ) ?></span></h2> |
96 | 96 | <?php if ( count( $this->data['formats'] ) == 1 ) { |
97 | 97 | $writer = array_rand( $this->data['formats'] ); |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | <?php } ?> |
114 | 114 | </select> |
115 | 115 | <?php } ?> |
116 | | - </td><td style="text-align:right; vertical-align:bottom;"> |
| 116 | + </td><td class="mw-align-end" style="vertical-align:bottom;"> |
117 | 117 | <input type="hidden" name="bookcmd" value="render" /> |
118 | 118 | <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> /> |
119 | 119 | </td></tr></tbody></table> |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | } |
131 | 131 | if ( $GLOBALS['wgEnableWriteAPI'] && ( $canSaveUserPage || $canSaveCommunityPage ) ) { |
132 | 132 | ?> |
133 | | - <div id="coll-savebox" style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;"> |
| 133 | + <div class="collection-column-right-box" id="coll-savebox"> |
134 | 134 | <h2><span class="mw-headline"><?php $this->msg( 'coll-save_collection_title' ) ?></span></h2> |
135 | 135 | <?php |
136 | 136 | $this->msgWiki( 'coll-save_collection_text' ); |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | <?php } ?> |
148 | 148 | <label for="personalCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['user-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['user-book-prefix'] ) ?></a></label> |
149 | 149 | </td> |
150 | | - <td style="text-align:right;"> |
| 150 | + <td class="mw-align-end"> |
151 | 151 | <input id="personalCollTitle" type="text" name="pcollname" /> |
152 | 152 | </td></tr> |
153 | 153 | <?php } // if ($canSaveUserPage) ?> |
— | — | @@ -159,11 +159,11 @@ |
160 | 160 | <?php } ?> |
161 | 161 | <label for="communityCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['community-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['community-book-prefix'] ) ?></a></label> |
162 | 162 | </td> |
163 | | - <td style="text-align:right;"> |
| 163 | + <td class="mw-align-end"> |
164 | 164 | <input id="communityCollTitle" type="text" name="ccollname" disabled="disabled" /> |
165 | 165 | </td></tr> |
166 | 166 | <?php } // if ($canSaveCommunityPage) ?> |
167 | | - <tr><td> </td><td style="text-align:right;"> |
| 167 | + <tr><td> </td><td class="mw-align-end"> |
168 | 168 | <input id="saveButton" type="submit" value="<?php $this->msg( 'coll-save_collection' ) ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> /> |
169 | 169 | </tr></tbody></table> |
170 | 170 | <input name="token" type="hidden" value="<?php echo htmlspecialchars( $GLOBALS['wgUser']->editToken() ) ?>" /> |
— | — | @@ -196,29 +196,26 @@ |
197 | 197 | $mediapath = $GLOBALS['wgScriptPath'] . '/extensions/Collection/images/'; |
198 | 198 | ?> |
199 | 199 | |
200 | | -<div style="text-align: center; padding: 2px; margin-top: 20px; margin-bottom: 2px; border: 1px solid #aaa; background-color: #f9f9f9;"> |
201 | | -<div> |
202 | | -<a class="makeVisible" style="margin-right: 3em;<?php if ( !isset( $this->data['is_ajax'] ) ) { echo ' display:none;'; } ?>" onclick="return coll_create_chapter()" href="javascript:void(0);"><?php $this->msg( 'coll-create_chapter' ) ?></a> |
| 200 | +<div class="collection-create-chapter-links"> |
| 201 | +<a class="makeVisible" style="<?php if ( !isset( $this->data['is_ajax'] ) ) { echo ' display:none;'; } ?>" onclick="return coll_create_chapter()" href="javascript:void(0);"><?php $this->msg( 'coll-create_chapter' ) ?></a> |
203 | 202 | <?php if ( count( $this->data['collection']['items'] ) > 0 ) { ?> |
204 | | -<a style="margin-right: 3em" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'sort_items' ) ) ) ?>"><?php $this->msg( 'coll-sort_alphabetically' ) ?></a> |
| 203 | +<a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'sort_items' ) ) ) ?>"><?php $this->msg( 'coll-sort_alphabetically' ) ?></a> |
205 | 204 | <a onclick="return coll_clear_collection()" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'clear_collection' ) ) ) ?>"><?php $this->msg( 'coll-clear_collection' ) ?></a> |
206 | 205 | <?php } ?> |
207 | 206 | </div> |
208 | | -</div> |
209 | 207 | |
| 208 | +<div class="collection-create-chapter-list"> |
210 | 209 | |
211 | | -<div style="padding: 10px 20px; border: 1px solid rgb(170, 170, 170)"> |
212 | | - |
213 | 210 | <?php |
214 | 211 | if ( count( $this->data['collection']['items'] ) == 0 ) { ?> |
215 | 212 | <em id="emptyCollection"><?php $this->msg( 'coll-empty_collection' ); ?></em> |
216 | 213 | <?php } else { ?> |
217 | | -<div style="text-align: center; margin-bottom: 10px"> |
| 214 | +<div style="collection-create-chapter-list-text"> |
218 | 215 | <em class="makeVisible" style="display:none; font-size: 95%"><?php $this->msg( 'coll-drag_and_drop' ) ?></em> |
219 | 216 | </div> |
220 | 217 | <?php } ?> |
221 | 218 | |
222 | | -<ul id="collectionList" style="list-style: none; margin-left: 0;"> |
| 219 | +<ul id="collectionList"> |
223 | 220 | |
224 | 221 | <?php |
225 | 222 | foreach ( $this->data['collection']['items'] as $index => $item ) { |
— | — | @@ -244,7 +241,7 @@ |
245 | 242 | } |
246 | 243 | ?> |
247 | 244 | <a href="<?php echo htmlspecialchars( $url ) ?>" title="<?php $this->msg( 'coll-show' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "show.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-show' ) ?>" /></a> |
248 | | - <span class="title sortableitem" style="margin-left: 1em;"> |
| 245 | + <span class="title sortableitem"> |
249 | 246 | <?php if ( isset( $item['displaytitle'] ) && $item['displaytitle'] != '' ) { |
250 | 247 | echo htmlspecialchars( $item['displaytitle'] ); |
251 | 248 | } else { |
— | — | @@ -253,7 +250,7 @@ |
254 | 251 | </span> |
255 | 252 | </li> |
256 | 253 | <?php } elseif ( $item['type'] == 'chapter' ) { ?> |
257 | | - <li id="item-<?php echo intval( $index ) ?>" class="chapter" style="margin-top:0.3em;"> |
| 254 | + <li id="item-<?php echo intval( $index ) ?>" class="chapter"> |
258 | 255 | <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'remove_item', 'index=' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-remove' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "remove.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-remove' ) ?>" /></a> |
259 | 256 | <noscript> |
260 | 257 | <?php if ( $index == 0 ) { ?> |
— | — | @@ -421,7 +418,7 @@ |
422 | 419 | (<a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'resetbans' => '1' ) ) ) ?>" title="<?php $this->msg( 'coll-suggest_reset_bans_tooltip' ) ?>"><?php $this->msg( 'coll-suggest_reset_bans' ) ?></a>) |
423 | 420 | <?php if ( count( $this->data['proposals'] ) > 0 ) { ?> |
424 | 421 | <noscript> |
425 | | - <div style="float: right;"> |
| 422 | + <div class="mw-float-end"> |
426 | 423 | <input type="submit" value="<?php $this->msg( 'coll-suggest_add_selected' ) ?>" name="addselected" /> |
427 | 424 | </div> |
428 | 425 | </noscript> |