Index: trunk/phase3/skins/common/ajaxwatch.js |
— | — | @@ -21,29 +21,16 @@ |
22 | 22 | wgAjaxWatch.inprogress = false; // ajax request in progress |
23 | 23 | wgAjaxWatch.timeoutID = null; // see wgAjaxWatch.ajaxCall |
24 | 24 | wgAjaxWatch.watchLinks = []; // "watch"/"unwatch" links |
25 | | -wgAjaxWatch.iconMode = false; // new icon driven functionality |
26 | | -wgAjaxWatch.imgBasePath = ""; // base img path derived from icons on load |
27 | 25 | |
28 | | -wgAjaxWatch.setLinkText = function( newText ) { |
29 | | - if( wgAjaxWatch.iconMode ) { |
30 | | - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { |
31 | | - wgAjaxWatch.watchLinks[i].firstChild.alt = newText; |
32 | | - if ( newText == wgAjaxWatch.watchingMsg || newText == wgAjaxWatch.unwatchingMsg ) { |
33 | | - wgAjaxWatch.watchLinks[i].className += ' loading'; |
34 | | - } else if ( newText == wgAjaxWatch.watchMsg || newText == wgAjaxWatch.unwatchMsg ) { |
35 | | - wgAjaxWatch.watchLinks[i].className = wgAjaxWatch.watchLinks[i].className.replace( /loading/i, '' ); |
36 | | - } |
37 | | - } |
38 | | - } else { |
39 | | - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { |
40 | | - changeText( wgAjaxWatch.watchLinks[i], newText ); |
41 | | - } |
| 26 | +wgAjaxWatch.setLinkText = function(newText) { |
| 27 | + for (i = 0; i < wgAjaxWatch.watchLinks.length; i++) { |
| 28 | + changeText(wgAjaxWatch.watchLinks[i], newText); |
42 | 29 | } |
43 | 30 | }; |
44 | 31 | |
45 | | -wgAjaxWatch.setLinkID = function( newId ) { |
| 32 | +wgAjaxWatch.setLinkID = function(newId) { |
46 | 33 | // We can only set the first one |
47 | | - wgAjaxWatch.watchLinks[0].parentNode.setAttribute( 'id', newId ); |
| 34 | + wgAjaxWatch.watchLinks[0].setAttribute( 'id', newId ); |
48 | 35 | akeytt(newId); // update tooltips for Monobook |
49 | 36 | }; |
50 | 37 | |
— | — | @@ -125,33 +112,27 @@ |
126 | 113 | wgAjaxWatch.onLoad = function() { |
127 | 114 | // This document structure hardcoding sucks. We should make a class and |
128 | 115 | // toss all this out the window. |
129 | | - |
130 | 116 | var el1 = document.getElementById("ca-unwatch"); |
131 | 117 | var el2 = null; |
132 | | - if ( !el1 ) { |
| 118 | + if (!el1) { |
133 | 119 | el1 = document.getElementById("mw-unwatch-link1"); |
134 | 120 | el2 = document.getElementById("mw-unwatch-link2"); |
135 | 121 | } |
136 | | - if( el1 ) { |
| 122 | + if(el1) { |
137 | 123 | wgAjaxWatch.watching = true; |
138 | 124 | } else { |
139 | 125 | wgAjaxWatch.watching = false; |
140 | 126 | el1 = document.getElementById("ca-watch"); |
141 | | - if ( !el1 ) { |
| 127 | + if (!el1) { |
142 | 128 | el1 = document.getElementById("mw-watch-link1"); |
143 | 129 | el2 = document.getElementById("mw-watch-link2"); |
144 | 130 | } |
145 | | - if( !el1 ) { |
| 131 | + if(!el1) { |
146 | 132 | wgAjaxWatch.supported = false; |
147 | 133 | return; |
148 | 134 | } |
149 | 135 | } |
150 | | - |
151 | | - // Detect if the watch/unwatch feature is in icon mode |
152 | | - if ( el1.className.match( /icon/i ) ) { |
153 | | - wgAjaxWatch.iconMode = true; |
154 | | - } |
155 | | - |
| 136 | + |
156 | 137 | // The id can be either for the parent (Monobook-based) or the element |
157 | 138 | // itself (non-Monobook) |
158 | 139 | wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" |
Index: trunk/phase3/skins/Vector.php |
— | — | @@ -59,8 +59,8 @@ |
60 | 60 | * @private |
61 | 61 | */ |
62 | 62 | function buildNavigationUrls() { |
63 | | - global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath; |
64 | | - global $wgDisableLangConversion, $wgVectorUseIconWatch; |
| 63 | + global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle; |
| 64 | + global $wgDisableLangConversion; |
65 | 65 | |
66 | 66 | wfProfileIn( __METHOD__ ); |
67 | 67 | |
— | — | @@ -271,6 +271,7 @@ |
272 | 272 | } |
273 | 273 | } |
274 | 274 | wfProfileOut( __METHOD__ . '-live' ); |
| 275 | + |
275 | 276 | /** |
276 | 277 | * The following actions use messages which, if made particular to |
277 | 278 | * the Vector skin, would break the Ajax code which makes this |
— | — | @@ -281,21 +282,29 @@ |
282 | 283 | * the global versions. |
283 | 284 | */ |
284 | 285 | // Checks if the user is logged in |
285 | | - if ( $this->loggedin ) { |
286 | | - if ( $wgVectorUseIconWatch ) { |
287 | | - $class = 'icon '; |
288 | | - $place = 'views'; |
| 286 | + if( $this->loggedin ) { |
| 287 | + // Checks if the user is watching this page |
| 288 | + if( !$this->mTitle->userIsWatching() ) { |
| 289 | + // Adds watch action link |
| 290 | + $links['actions']['watch'] = array( |
| 291 | + 'class' => |
| 292 | + ( $action == 'watch' or $action == 'unwatch' ) ? |
| 293 | + 'selected' : false, |
| 294 | + 'text' => wfMsg( 'watch' ), |
| 295 | + 'href' => $this->mTitle->getLocalUrl( 'action=watch' ) |
| 296 | + ); |
289 | 297 | } else { |
290 | | - $class = ''; |
291 | | - $place = 'actions'; |
| 298 | + // Adds unwatch action link |
| 299 | + $links['actions']['unwatch'] = array( |
| 300 | + 'class' => |
| 301 | + ($action == 'unwatch' or $action == 'watch') ? |
| 302 | + 'selected' : false, |
| 303 | + 'text' => wfMsg( 'unwatch' ), |
| 304 | + 'href' => $this->mTitle->getLocalUrl( 'action=unwatch' ) |
| 305 | + ); |
292 | 306 | } |
293 | | - $mode = $this->mTitle->userIsWatching() ? 'unwatch' : 'watch'; |
294 | | - $links[$place][$mode] = array( |
295 | | - 'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ), |
296 | | - 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message |
297 | | - 'href' => $this->mTitle->getLocalUrl( 'action=' . $mode ) |
298 | | - ); |
299 | 307 | } |
| 308 | + |
300 | 309 | // This is instead of SkinTemplateTabs - which uses a flat array |
301 | 310 | wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) ); |
302 | 311 | |
— | — | @@ -713,7 +722,7 @@ |
714 | 723 | <h5><?php $this->msg('views') ?></h5> |
715 | 724 | <ul <?php $this->html('userlangattributes') ?>> |
716 | 725 | <?php foreach ($this->data['view_urls'] as $key => $link ): ?> |
717 | | - <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li> |
| 726 | + <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li> |
718 | 727 | <?php endforeach; ?> |
719 | 728 | </ul> |
720 | 729 | </div> |
Index: trunk/phase3/skins/vector/images/watch-icons.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: trunk/phase3/skins/vector/images/watch-icon-loading.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: trunk/phase3/skins/vector/main-ltr.css |
— | — | @@ -24,9 +24,8 @@ |
25 | 25 | font-size: 1em; |
26 | 26 | } |
27 | 27 | body { |
| 28 | + background-color: #f3f3f3; |
28 | 29 | background-image: url(images/page-base.png); |
29 | | - background-color: #f9f9f9; |
30 | | - color: #000000; |
31 | 30 | } |
32 | 31 | /* Content */ |
33 | 32 | #content { |
— | — | @@ -187,14 +186,14 @@ |
188 | 187 | div.vectorTabs li.selected a span, |
189 | 188 | div.vectorTabs li.selected a:visited |
190 | 189 | div.vectorTabs li.selected a:visited span { |
191 | | - color: #be5900; |
| 190 | + color: #333333; |
192 | 191 | text-decoration: none; |
193 | 192 | } |
194 | 193 | div.vectorTabs li.new a, |
195 | 194 | div.vectorTabs li.new a span, |
196 | 195 | div.vectorTabs li.new a:visited, |
197 | 196 | div.vectorTabs li.new a:visited span { |
198 | | - color: #990000; |
| 197 | + color: #a55858; |
199 | 198 | } |
200 | 199 | /* Variants and Actions */ |
201 | 200 | /* @noflip */ |
— | — | @@ -591,11 +590,11 @@ |
592 | 591 | /* Links */ |
593 | 592 | a { |
594 | 593 | text-decoration: none; |
595 | | - color: #003cb3; |
| 594 | + color: #0645ad; |
596 | 595 | background: none; |
597 | 596 | } |
598 | 597 | a:visited { |
599 | | - color: #004d99; |
| 598 | + color: #0b0080; |
600 | 599 | } |
601 | 600 | a:active { |
602 | 601 | color: #faa700; |
— | — | @@ -607,7 +606,7 @@ |
608 | 607 | color: #772233; |
609 | 608 | } |
610 | 609 | a.new, #p-personal a.new { |
611 | | - color: #990000; |
| 610 | + color: #ba0000; |
612 | 611 | } |
613 | 612 | a.new:visited, #p-personal a.new:visited { |
614 | 613 | color: #a55858; |
— | — | @@ -639,7 +638,7 @@ |
640 | 639 | margin: 0; |
641 | 640 | padding-top: .5em; |
642 | 641 | padding-bottom: .17em; |
643 | | - border-bottom: 1px solid #8d8d8d; |
| 642 | + border-bottom: 1px solid #aaa; |
644 | 643 | width: auto; |
645 | 644 | } |
646 | 645 | h1 { font-size: 188%; } |
— | — | @@ -766,8 +765,8 @@ |
767 | 766 | #toc, |
768 | 767 | .toc, |
769 | 768 | .mw-warning { |
770 | | - border: 1px solid #c0c0c0; |
771 | | - background-color: #f0f0f0; |
| 769 | + border: 1px solid #aaa; |
| 770 | + background-color: #f9f9f9; |
772 | 771 | padding: 5px; |
773 | 772 | font-size: 95%; |
774 | 773 | } |
— | — | @@ -827,16 +826,15 @@ |
828 | 827 | background-color: transparent; |
829 | 828 | } |
830 | 829 | div.thumbinner { |
831 | | - border: 1px solid #c0c0c0; |
| 830 | + border: 1px solid #ccc; |
832 | 831 | padding: 3px !important; |
833 | | - background-color: #f0f0f0; |
| 832 | + background-color: #f9f9f9; |
834 | 833 | font-size: 94%; |
835 | 834 | text-align: center; |
836 | 835 | overflow: hidden; |
837 | 836 | } |
838 | 837 | html .thumbimage { |
839 | | - border: 1px solid #c0c0c0; |
840 | | - background-color: #f0f0f0; |
| 838 | + border: 1px solid #ccc; |
841 | 839 | } |
842 | 840 | html .thumbcaption { |
843 | 841 | border: none; |
— | — | @@ -956,7 +954,6 @@ |
957 | 955 | line-height: 1.2em; |
958 | 956 | font-size: 1.6em; |
959 | 957 | padding-bottom: 0; |
960 | | - color:#005780; |
961 | 958 | } |
962 | 959 | #content a.external, |
963 | 960 | #content a[href ^="gopher://"] { |
— | — | @@ -1034,6 +1031,7 @@ |
1035 | 1032 | padding-left: 15px !important; |
1036 | 1033 | text-transform: none; |
1037 | 1034 | } |
| 1035 | + |
1038 | 1036 | .toccolours { |
1039 | 1037 | border: 1px solid #aaa; |
1040 | 1038 | background-color: #f9f9f9; |
— | — | @@ -1044,48 +1042,10 @@ |
1045 | 1043 | position: relative; |
1046 | 1044 | width: 100%; |
1047 | 1045 | } |
1048 | | - |
1049 | 1046 | #mw-js-message { |
1050 | 1047 | font-size: 0.8em; |
1051 | 1048 | } |
1052 | 1049 | div#bodyContent { |
1053 | 1050 | line-height: 1.5em; |
1054 | 1051 | } |
1055 | | -/* Watch/Unwatch Icon Styling */ |
1056 | | -#ca-unwatch.icon, |
1057 | | -#ca-watch.icon { |
1058 | | -} |
1059 | | -#ca-unwatch.icon a, |
1060 | | -#ca-watch.icon a { |
1061 | | - margin: 0; |
1062 | | - padding: 0; |
1063 | | - outline: none; |
1064 | | - display: block; |
1065 | | - width: 26px; |
1066 | | - height: 2.5em; |
1067 | | -} |
1068 | | -#ca-unwatch.icon a { |
1069 | | - background-image: url(images/watch-icons.png); |
1070 | | - background-position: -43px 60%; |
1071 | | -} |
1072 | | -#ca-watch.icon a { |
1073 | | - background-image: url(images/watch-icons.png); |
1074 | | - background-position: 5px 60%; |
1075 | | -} |
1076 | | -#ca-unwatch.icon a:hover { |
1077 | | - background-image: url(images/watch-icons.png); |
1078 | | - background-position: -67px 60%; |
1079 | | -} |
1080 | | -#ca-watch.icon a:hover { |
1081 | | - background-image: url(images/watch-icons.png); |
1082 | | - background-position: -19px 60%; |
1083 | | -} |
1084 | | -#ca-unwatch.icon a.loading, |
1085 | | -#ca-watch.icon a.loading { |
1086 | | - background-image: url(images/watch-icon-loading.gif); |
1087 | | - background-position: center 60%; |
1088 | | -} |
1089 | | -#ca-unwatch.icon a span, |
1090 | | -#ca-watch.icon a span { |
1091 | | - display: none; |
1092 | | -} |
\ No newline at end of file |
| 1052 | + |
Index: trunk/phase3/skins/vector/main-rtl.css |
— | — | @@ -1042,7 +1042,6 @@ |
1043 | 1043 | position: relative; |
1044 | 1044 | width: 100%; |
1045 | 1045 | } |
1046 | | - |
1047 | 1046 | #mw-js-message { |
1048 | 1047 | font-size: 0.8em; |
1049 | 1048 | } |
— | — | @@ -1050,71 +1049,4 @@ |
1051 | 1050 | line-height: 1.5em; |
1052 | 1051 | } |
1053 | 1052 | |
1054 | | - |
1055 | | - |
1056 | | -/* Babaco color scheme */ |
1057 | | -/* Still working on this. Needs incorporated above once it's closer to final */ |
1058 | | -body { |
1059 | | - background-color: #f9f9f9; |
1060 | | - color: #000000; |
1061 | | -} |
1062 | | -a { |
1063 | | - color: #003cb3; |
1064 | | -} |
1065 | | -a.new { |
1066 | | - color: #990000; |
1067 | | -} |
1068 | | - |
1069 | | -a:visited, |
1070 | | -div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span { |
1071 | | - color: #260e9c; |
1072 | | -} |
1073 | | - |
1074 | | -html .thumbimage, |
1075 | | -#toc, .toc, .mw-warning, div.thumbinner { |
1076 | | - border-color: #c0c0c0; |
1077 | | - background-color: #f0f0f0; |
1078 | | -} |
1079 | | - |
1080 | | -h1, h2, h3, h4, h5, h6 { |
1081 | | - border-color: #8d8d8d; |
1082 | | -} |
1083 | | - |
1084 | | -/* Watch/Unwatch Icon Styling */ |
1085 | | -#ca-unwatch.icon, |
1086 | | -#ca-watch.icon { |
1087 | | -} |
1088 | | -#ca-unwatch.icon a, |
1089 | | -#ca-watch.icon a { |
1090 | | - margin: 0; |
1091 | | - padding: 0; |
1092 | | - outline: none; |
1093 | | - display: block; |
1094 | | - width: 26px; |
1095 | | - height: 2.5em; |
1096 | | -} |
1097 | | -#ca-unwatch.icon a { |
1098 | | - background-image: url(images/watch-icons.png); |
1099 | | - background-position: -43px 60%; |
1100 | | -} |
1101 | | -#ca-watch.icon a { |
1102 | | - background-image: url(images/watch-icons.png); |
1103 | | - background-position: 5px 60%; |
1104 | | -} |
1105 | | -#ca-unwatch.icon a:hover { |
1106 | | - background-image: url(images/watch-icons.png); |
1107 | | - background-position: -67px 60%; |
1108 | | -} |
1109 | | -#ca-watch.icon a:hover { |
1110 | | - background-image: url(images/watch-icons.png); |
1111 | | - background-position: -19px 60%; |
1112 | | -} |
1113 | | -#ca-unwatch.icon a.loading, |
1114 | | -#ca-watch.icon a.loading { |
1115 | | - background-image: url(images/watch-icon-loading.gif); |
1116 | | - background-position: center 60%; |
1117 | | -} |
1118 | | -#ca-unwatch.icon a span, |
1119 | | -#ca-watch.icon a span { |
1120 | | - display: none; |
1121 | | -} |
\ No newline at end of file |
| 1053 | + |
\ No newline at end of file |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1606,7 +1606,7 @@ |
1607 | 1607 | * to ensure that client-side caches do not keep obsolete copies of global |
1608 | 1608 | * styles. |
1609 | 1609 | */ |
1610 | | -$wgStyleVersion = '243'; |
| 1610 | +$wgStyleVersion = '241'; |
1611 | 1611 | |
1612 | 1612 | |
1613 | 1613 | # Server-side caching: |
— | — | @@ -4096,20 +4096,13 @@ |
4097 | 4097 | $wgUseTwoButtonsSearchForm = true; |
4098 | 4098 | |
4099 | 4099 | /** |
4100 | | - * Search form behavior for Vector skin only |
| 4100 | + * Search form behavior for Vector skin only |
4101 | 4101 | * true = use an icon search button |
4102 | 4102 | * false = use Go & Search buttons |
4103 | 4103 | */ |
4104 | 4104 | $wgVectorUseSimpleSearch = false; |
4105 | 4105 | |
4106 | 4106 | /** |
4107 | | - * Watch and unwatch as an icon rather than a link for Vector skin only |
4108 | | - * true = use an icon watch/unwatch button |
4109 | | - * false = use watch/unwatch text link |
4110 | | - */ |
4111 | | -$wgVectorUseIconWatch = false; |
4112 | | - |
4113 | | -/** |
4114 | 4107 | * Preprocessor caching threshold |
4115 | 4108 | */ |
4116 | 4109 | $wgPreprocessorCacheThreshold = 1000; |