r57013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57012‎ | r57013 | r57014 >
Date:10:09, 28 September 2009
Author:catrope
Status:reverted
Tags:
Comment:
Coding style cleanup for r56924; also copypaste main-ltr.css modifications to main-rtl.css; will rebuild later
Modified paths:
  • /trunk/phase3/skins/common/ajaxwatch.js (modified) (history)
  • /trunk/phase3/skins/vector/main-ltr.css (modified) (history)
  • /trunk/phase3/skins/vector/main-rtl.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/ajaxwatch.js
@@ -24,29 +24,29 @@
2525 wgAjaxWatch.iconMode = false; // new icon driven functionality
2626 wgAjaxWatch.imgBasePath = ""; // base img path derived from icons on load
2727
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].firstChild.src = wgAjaxWatch.imgBasePath
 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].firstChild.src = wgAjaxWatch.imgBasePath
3434 + "/common/images/spinner.gif";
35 - } else if( newText==wgAjaxWatch.watchMsg ) {
36 - wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath
 35+ } else if( newText==wgAjaxWatch.watchMsg ) {
 36+ wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath
3737 + "/vector/images/watch_off.gif";
38 - } else if( newText==wgAjaxWatch.unwatchMsg ) {
39 - wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath
 38+ } else if( newText==wgAjaxWatch.unwatchMsg ) {
 39+ wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath
4040 + "/vector/images/watch_on.gif";
41 - }
42 - }
43 - } else{
44 - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) {
45 - changeText( wgAjaxWatch.watchLinks[i], newText );
46 - }
47 - }
 41+ }
 42+ }
 43+ } else {
 44+ for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) {
 45+ changeText( wgAjaxWatch.watchLinks[i], newText );
 46+ }
 47+ }
4848 };
4949
50 -wgAjaxWatch.setLinkID = function(newId) {
 50+wgAjaxWatch.setLinkID = function( newId ) {
5151 // We can only set the first one
5252 wgAjaxWatch.watchLinks[0].parentNode.setAttribute( 'id', newId );
5353 akeytt(newId); // update tooltips for Monobook
@@ -153,25 +153,25 @@
154154 }
155155
156156 // If we're using the icon, add rollover affects
157 - try{
158 - if( el1.firstChild.firstChild.tagName.match( /img/i ) ) {
 157+ try {
 158+ if( el1.firstChild.firstChild.tagName.match( /img/i ) ) {
159159 wgAjaxWatch.iconMode = true;
160 - wgAjaxWatch.imgBasePath = el1.firstChild.firstChild.src
 160+ wgAjaxWatch.imgBasePath = el1.firstChild.firstChild.src
161161 .replace( /\/vector\/images\/watch_(off|on).gif/, "" );
162 - el1.firstChild.onmouseover = function( e ) {
163 - if ( !wgAjaxWatch.inprogress )
164 - this.firstChild.src = wgAjaxWatch.imgBasePath
165 - + "/vector/images/watch_over.gif";
166 - }
167 - el1.firstChild.onmouseout = function( e ) {
168 - if ( !wgAjaxWatch.inprogress )
169 - this.firstChild.src = wgAjaxWatch.imgBasePath
170 - + "/vector/images/watch_" + ( wgAjaxWatch.watching ?
171 - "on.gif" : "off.gif" );
172 - }
173 - }
 162+ el1.firstChild.onmouseover = function( e ) {
 163+ if ( !wgAjaxWatch.inprogress )
 164+ this.firstChild.src = wgAjaxWatch.imgBasePath
 165+ + "/vector/images/watch_over.gif";
 166+ }
 167+ el1.firstChild.onmouseout = function( e ) {
 168+ if ( !wgAjaxWatch.inprogress )
 169+ this.firstChild.src = wgAjaxWatch.imgBasePath
 170+ + "/vector/images/watch_" + ( wgAjaxWatch.watching ?
 171+ "on.gif" : "off.gif" );
 172+ }
 173+ }
174174 } catch( e ) {
175 - // not using the icon
 175+ // not using the icon
176176 }
177177
178178
Index: trunk/phase3/skins/vector/main-ltr.css
@@ -1054,48 +1054,48 @@
10551055
10561056 /* Babaco color scheme */
10571057 /* Still working on this. Needs incorporated above once it's closer to final */
1058 -body{
1059 - background-color:#f9f9f9;
1060 - color:#000000;
 1058+body {
 1059+ background-color: #f9f9f9;
 1060+ color: #000000;
10611061 }
1062 -a{
1063 - color:#003cb3;
 1062+a {
 1063+ color: #003cb3;
10641064 }
1065 -a.new{
1066 - color:#990000;
 1065+a.new {
 1066+ color: #990000;
10671067 }
10681068
10691069 a:visited,
10701070 div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span {
1071 - color:#260e9c;
 1071+ color: #260e9c;
10721072 }
10731073
10741074 html .thumbimage,
1075 -#toc, .toc, .mw-warning, div.thumbinner{
1076 - border-color:#c0c0c0;
1077 - background-color:#f0f0f0;
 1075+#toc, .toc, .mw-warning, div.thumbinner {
 1076+ border-color: #c0c0c0;
 1077+ background-color: #f0f0f0;
10781078 }
10791079
1080 -h1, h2, h3, h4, h5, h6{
1081 - border-color:#8d8d8d;
 1080+h1, h2, h3, h4, h5, h6 {
 1081+ border-color: #8d8d8d;
10821082 }
10831083
10841084
10851085 /* Watch/Unwatch Icon Styling */
10861086 #ca-unwatch,
1087 -#ca-watch{
1088 - background-image:none;
1089 - background-color:#ffffff;
 1087+#ca-watch {
 1088+ background-image: none;
 1089+ background-color: #ffffff;
10901090 }
10911091 #ca-unwatch a,
1092 -#ca-watch a{
1093 - outline:none;
 1092+#ca-watch a {
 1093+ outline: none;
10941094 }
10951095 #ca-unwatch a img,
1096 -#ca-watch a img{
1097 - padding-top:1.35em;
1098 - display:block;
1099 - font-size:0.8em;
1100 - max-height:14px;
1101 - max-width:14px;
 1096+#ca-watch a img {
 1097+ padding-top: 1.35em;
 1098+ display: block;
 1099+ font-size: 0.8em;
 1100+ max-height: 14px;
 1101+ max-width: 14px;
11021102 }
\ No newline at end of file
Index: trunk/phase3/skins/vector/main-rtl.css
@@ -1049,4 +1049,51 @@
10501050 line-height: 1.5em;
10511051 }
10521052
1053 -
\ No newline at end of file
 1053+
 1054+/* Babaco color scheme */
 1055+/* Still working on this. Needs incorporated above once it's closer to final */
 1056+body {
 1057+ background-color: #f9f9f9;
 1058+ color: #000000;
 1059+}
 1060+a {
 1061+ color: #003cb3;
 1062+}
 1063+a.new {
 1064+ color: #990000;
 1065+}
 1066+
 1067+a:visited,
 1068+div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span {
 1069+ color: #260e9c;
 1070+}
 1071+
 1072+html .thumbimage,
 1073+#toc, .toc, .mw-warning, div.thumbinner {
 1074+ border-color: #c0c0c0;
 1075+ background-color: #f0f0f0;
 1076+}
 1077+
 1078+h1, h2, h3, h4, h5, h6 {
 1079+ border-color: #8d8d8d;
 1080+}
 1081+
 1082+
 1083+/* Watch/Unwatch Icon Styling */
 1084+#ca-unwatch,
 1085+#ca-watch {
 1086+ background-image: none;
 1087+ background-color: #ffffff;
 1088+}
 1089+#ca-unwatch a,
 1090+#ca-watch a {
 1091+ outline: none;
 1092+}
 1093+#ca-unwatch a img,
 1094+#ca-watch a img {
 1095+ padding-top: 1.35em;
 1096+ display: block;
 1097+ font-size: 0.8em;
 1098+ max-height: 14px;
 1099+ max-width: 14px;
 1100+}
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r57125Revert r56924 (new watch icon and color changes for Vector) and followups r57...catrope17:58, 30 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56924Moving watch/unwatch action out of the drop downadam18:04, 25 September 2009

Status & tagging log