Index: branches/usability/phase3/skins/common/ajaxwatch.js |
— | — | @@ -21,16 +21,29 @@ |
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 |
25 | 27 | |
26 | | -wgAjaxWatch.setLinkText = function(newText) { |
27 | | - for (i = 0; i < wgAjaxWatch.watchLinks.length; i++) { |
28 | | - changeText(wgAjaxWatch.watchLinks[i], newText); |
| 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 | + } |
29 | 42 | } |
30 | 43 | }; |
31 | 44 | |
32 | | -wgAjaxWatch.setLinkID = function(newId) { |
| 45 | +wgAjaxWatch.setLinkID = function( newId ) { |
33 | 46 | // We can only set the first one |
34 | | - wgAjaxWatch.watchLinks[0].setAttribute( 'id', newId ); |
| 47 | + wgAjaxWatch.watchLinks[0].parentNode.setAttribute( 'id', newId ); |
35 | 48 | akeytt(newId); // update tooltips for Monobook |
36 | 49 | }; |
37 | 50 | |
— | — | @@ -112,27 +125,33 @@ |
113 | 126 | wgAjaxWatch.onLoad = function() { |
114 | 127 | // This document structure hardcoding sucks. We should make a class and |
115 | 128 | // toss all this out the window. |
| 129 | + |
116 | 130 | var el1 = document.getElementById("ca-unwatch"); |
117 | 131 | var el2 = null; |
118 | | - if (!el1) { |
| 132 | + if ( !el1 ) { |
119 | 133 | el1 = document.getElementById("mw-unwatch-link1"); |
120 | 134 | el2 = document.getElementById("mw-unwatch-link2"); |
121 | 135 | } |
122 | | - if(el1) { |
| 136 | + if( el1 ) { |
123 | 137 | wgAjaxWatch.watching = true; |
124 | 138 | } else { |
125 | 139 | wgAjaxWatch.watching = false; |
126 | 140 | el1 = document.getElementById("ca-watch"); |
127 | | - if (!el1) { |
| 141 | + if ( !el1 ) { |
128 | 142 | el1 = document.getElementById("mw-watch-link1"); |
129 | 143 | el2 = document.getElementById("mw-watch-link2"); |
130 | 144 | } |
131 | | - if(!el1) { |
| 145 | + if( !el1 ) { |
132 | 146 | wgAjaxWatch.supported = false; |
133 | 147 | return; |
134 | 148 | } |
135 | 149 | } |
136 | | - |
| 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 | + |
137 | 156 | // The id can be either for the parent (Monobook-based) or the element |
138 | 157 | // itself (non-Monobook) |
139 | 158 | wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" |
Index: branches/usability/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; |
64 | | - global $wgDisableLangConversion; |
| 63 | + global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath; |
| 64 | + global $wgDisableLangConversion, $wgVectorUseIconWatch; |
65 | 65 | |
66 | 66 | wfProfileIn( __METHOD__ ); |
67 | 67 | |
— | — | @@ -271,7 +271,6 @@ |
272 | 272 | } |
273 | 273 | } |
274 | 274 | wfProfileOut( __METHOD__ . '-live' ); |
275 | | - |
276 | 275 | /** |
277 | 276 | * The following actions use messages which, if made particular to |
278 | 277 | * the Vector skin, would break the Ajax code which makes this |
— | — | @@ -282,29 +281,21 @@ |
283 | 282 | * the global versions. |
284 | 283 | */ |
285 | 284 | // Checks if the user is logged in |
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 | | - ); |
| 285 | + if ( $this->loggedin ) { |
| 286 | + if ( $wgVectorUseIconWatch ) { |
| 287 | + $class = 'icon '; |
| 288 | + $place = 'views'; |
297 | 289 | } else { |
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 | | - ); |
| 290 | + $class = ''; |
| 291 | + $place = 'actions'; |
306 | 292 | } |
| 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 | + ); |
307 | 299 | } |
308 | | - |
309 | 300 | // This is instead of SkinTemplateTabs - which uses a flat array |
310 | 301 | wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) ); |
311 | 302 | |
— | — | @@ -722,7 +713,7 @@ |
723 | 714 | <h5><?php $this->msg('views') ?></h5> |
724 | 715 | <ul <?php $this->html('userlangattributes') ?>> |
725 | 716 | <?php foreach ($this->data['view_urls'] as $key => $link ): ?> |
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> |
| 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> |
727 | 718 | <?php endforeach; ?> |
728 | 719 | </ul> |
729 | 720 | </div> |
Index: branches/usability/phase3/skins/vector/images/watch-icons.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/usability/phase3/skins/vector/images/watch-icons.png |
___________________________________________________________________ |
Name: svn:mime-type |
730 | 721 | + application/octet-stream |
Index: branches/usability/phase3/skins/vector/images/watch-icon-loading.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/usability/phase3/skins/vector/images/watch-icon-loading.gif |
___________________________________________________________________ |
Name: svn:mime-type |
731 | 722 | + application/octet-stream |
Index: branches/usability/phase3/skins/vector/main-ltr.css |
— | — | @@ -24,8 +24,9 @@ |
25 | 25 | font-size: 1em; |
26 | 26 | } |
27 | 27 | body { |
28 | | - background-color: #f3f3f3; |
29 | 28 | background-image: url(images/page-base.png); |
| 29 | + background-color: #f9f9f9; |
| 30 | + color: #000000; |
30 | 31 | } |
31 | 32 | /* Content */ |
32 | 33 | #content { |
— | — | @@ -186,14 +187,14 @@ |
187 | 188 | div.vectorTabs li.selected a span, |
188 | 189 | div.vectorTabs li.selected a:visited |
189 | 190 | div.vectorTabs li.selected a:visited span { |
190 | | - color: #333333; |
| 191 | + color: #be5900; |
191 | 192 | text-decoration: none; |
192 | 193 | } |
193 | 194 | div.vectorTabs li.new a, |
194 | 195 | div.vectorTabs li.new a span, |
195 | 196 | div.vectorTabs li.new a:visited, |
196 | 197 | div.vectorTabs li.new a:visited span { |
197 | | - color: #a55858; |
| 198 | + color: #990000; |
198 | 199 | } |
199 | 200 | /* Variants and Actions */ |
200 | 201 | /* @noflip */ |
— | — | @@ -590,11 +591,11 @@ |
591 | 592 | /* Links */ |
592 | 593 | a { |
593 | 594 | text-decoration: none; |
594 | | - color: #0645ad; |
| 595 | + color: #003cb3; |
595 | 596 | background: none; |
596 | 597 | } |
597 | 598 | a:visited { |
598 | | - color: #0b0080; |
| 599 | + color: #004d99; |
599 | 600 | } |
600 | 601 | a:active { |
601 | 602 | color: #faa700; |
— | — | @@ -606,7 +607,7 @@ |
607 | 608 | color: #772233; |
608 | 609 | } |
609 | 610 | a.new, #p-personal a.new { |
610 | | - color: #ba0000; |
| 611 | + color: #990000; |
611 | 612 | } |
612 | 613 | a.new:visited, #p-personal a.new:visited { |
613 | 614 | color: #a55858; |
— | — | @@ -638,7 +639,7 @@ |
639 | 640 | margin: 0; |
640 | 641 | padding-top: .5em; |
641 | 642 | padding-bottom: .17em; |
642 | | - border-bottom: 1px solid #aaa; |
| 643 | + border-bottom: 1px solid #8d8d8d; |
643 | 644 | width: auto; |
644 | 645 | } |
645 | 646 | h1 { font-size: 188%; } |
— | — | @@ -765,8 +766,8 @@ |
766 | 767 | #toc, |
767 | 768 | .toc, |
768 | 769 | .mw-warning { |
769 | | - border: 1px solid #aaa; |
770 | | - background-color: #f9f9f9; |
| 770 | + border: 1px solid #c0c0c0; |
| 771 | + background-color: #f0f0f0; |
771 | 772 | padding: 5px; |
772 | 773 | font-size: 95%; |
773 | 774 | } |
— | — | @@ -826,15 +827,16 @@ |
827 | 828 | background-color: transparent; |
828 | 829 | } |
829 | 830 | div.thumbinner { |
830 | | - border: 1px solid #ccc; |
| 831 | + border: 1px solid #c0c0c0; |
831 | 832 | padding: 3px !important; |
832 | | - background-color: #f9f9f9; |
| 833 | + background-color: #f0f0f0; |
833 | 834 | font-size: 94%; |
834 | 835 | text-align: center; |
835 | 836 | overflow: hidden; |
836 | 837 | } |
837 | 838 | html .thumbimage { |
838 | | - border: 1px solid #ccc; |
| 839 | + border: 1px solid #c0c0c0; |
| 840 | + background-color: #f0f0f0; |
839 | 841 | } |
840 | 842 | html .thumbcaption { |
841 | 843 | border: none; |
— | — | @@ -954,6 +956,7 @@ |
955 | 957 | line-height: 1.2em; |
956 | 958 | font-size: 1.6em; |
957 | 959 | padding-bottom: 0; |
| 960 | + color:#005780; |
958 | 961 | } |
959 | 962 | #content a.external, |
960 | 963 | #content a[href ^="gopher://"] { |
— | — | @@ -1031,7 +1034,6 @@ |
1032 | 1035 | padding-left: 15px !important; |
1033 | 1036 | text-transform: none; |
1034 | 1037 | } |
1035 | | - |
1036 | 1038 | .toccolours { |
1037 | 1039 | border: 1px solid #aaa; |
1038 | 1040 | background-color: #f9f9f9; |
— | — | @@ -1042,10 +1044,48 @@ |
1043 | 1045 | position: relative; |
1044 | 1046 | width: 100%; |
1045 | 1047 | } |
| 1048 | + |
1046 | 1049 | #mw-js-message { |
1047 | 1050 | font-size: 0.8em; |
1048 | 1051 | } |
1049 | 1052 | div#bodyContent { |
1050 | 1053 | line-height: 1.5em; |
1051 | 1054 | } |
1052 | | - |
| 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 |
Index: branches/usability/phase3/skins/vector/main-rtl.css |
— | — | @@ -1042,6 +1042,7 @@ |
1043 | 1043 | position: relative; |
1044 | 1044 | width: 100%; |
1045 | 1045 | } |
| 1046 | + |
1046 | 1047 | #mw-js-message { |
1047 | 1048 | font-size: 0.8em; |
1048 | 1049 | } |
— | — | @@ -1049,4 +1050,71 @@ |
1050 | 1051 | line-height: 1.5em; |
1051 | 1052 | } |
1052 | 1053 | |
1053 | | - |
\ No newline at end of file |
| 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 |
Index: branches/usability/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 = '241'; |
| 1610 | +$wgStyleVersion = '243'; |
1611 | 1611 | |
1612 | 1612 | |
1613 | 1613 | # Server-side caching: |
— | — | @@ -4096,13 +4096,20 @@ |
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 | +/** |
4107 | 4114 | * Preprocessor caching threshold |
4108 | 4115 | */ |
4109 | 4116 | $wgPreprocessorCacheThreshold = 1000; |