r59687 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59686‎ | r59687 | r59688 >
Date:23:49, 2 December 2009
Author:adam
Status:resolved (Comments)
Tags:
Comment:
adding invalid border coloring to link dialog
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -21,17 +21,17 @@
2222 array( 'src' => 'css/suggestions.css', 'version' => 6 ),
2323 array( 'src' => 'css/wikiEditor.css', 'version' => 7 ),
2424 array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 7 ),
25 - array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 2 ),
 25+ array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 3 ),
2626 array( 'src' => 'css/wikiEditor.toc.css', 'version' => 23 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
2929 ),
3030 'combined' => array(
31 - array( 'src' => 'css/combined.css', 'version' => 30 ),
 31+ array( 'src' => 'css/combined.css', 'version' => 31 ),
3232 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3333 ),
3434 'minified' => array(
35 - array( 'src' => 'css/combined.min.css', 'version' => 30 ),
 35+ array( 'src' => 'css/combined.min.css', 'version' => 31 ),
3636 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3737 ),
3838 )
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -13,3 +13,8 @@
1414 div.suggestions {
1515 z-index: 1099;
1616 }
 17+
 18+#wikieditor-toolbar-link-dialog .status-invalid input {
 19+ border: 2px solid red;
 20+ padding: 2px 1px;
 21+}
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -133,7 +133,9 @@
134134 padding-left: 1em;
135135 border-top: solid 1px white;
136136 }
137 -
 137+.wikiEditor-ui-buttons button {
 138+ margin-left: 0.5em;
 139+}
138140 .wikiEditor-ui-tabs div {
139141 float: left;
140142 height: 2.5em;
@@ -171,7 +173,11 @@
172174 div.suggestions {
173175 z-index: 1099;
174176 }
175 -/* wikiEditor toc module */
 177+
 178+#wikieditor-toolbar-link-dialog .status-invalid input {
 179+ border: 2px solid red;
 180+ padding: 2px 1px;
 181+}/* wikiEditor toc module */
176182 body.rtl .wikiEditor-ui-text {
177183 border-right: none;
178184 border-left: solid silver 1px;
@@ -406,17 +412,19 @@
407413 float: left;
408414 width: 100%;
409415 border-top: solid 1px #DDDDDD;
410 - background-color: #F3F3F3;
 416+ background-color: #E0EEf7;
411417 }
412418 .wikiEditor-ui-toolbar {
413419 background-image: url(../images/wikiEditor/toolbar/base.png);
414420 background-position: left top;
415421 background-repeat: repeat-x;
416422 }
 423+/*
417424 .wikiEditor-ui-toolbar .toolbar {
418425 background-image: url(../images/wikiEditor/toolbar/base.png);
419426 background-position: left top;
420427 }
 428+*/
421429 body.rtl .wikiEditor-ui-toolbar .sections .section {
422430 float: right;
423431 }
@@ -582,6 +590,7 @@
583591 padding-right: 22px;
584592 margin-right: 4px;
585593 cursor: pointer;
 594+ color: #333333;
586595 }
587596 body.rtl .wikiEditor-ui-toolbar .group .tool-select .label {
588597 background-position: center left;
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -126,6 +126,9 @@
127127 padding-left:1em;
128128 border-top:solid 1px white;
129129 }
 130+.wikiEditor-ui-buttons button{
 131+margin-left:0.5em;
 132+}
130133 .wikiEditor-ui-tabs div{
131134 float:left;
132135 height:2.5em;
@@ -160,6 +163,10 @@
161164 div.suggestions{
162165 z-index:1099;
163166 }
 167+#wikieditor-toolbar-link-dialog .status-invalid input{
 168+border:2px solid red;
 169+padding:2px 1px;
 170+}
164171 body.rtl .wikiEditor-ui-text{
165172 border-right:none;
166173 border-left:solid silver 1px;
@@ -377,17 +384,19 @@
378385 float:left;
379386 width:100%;
380387 border-top:solid 1px #DDDDDD;
381 -background-color:#F3F3F3;
 388+background-color:#E0EEf7;
382389 }
383390 .wikiEditor-ui-toolbar{
384391 background-image:url(../images/wikiEditor/toolbar/base.png);
385392 background-position:left top;
386393 background-repeat:repeat-x;
387394 }
 395+/*
388396 .wikiEditor-ui-toolbar .toolbar{
389397 background-image:url(../images/wikiEditor/toolbar/base.png);
390398 background-position:left top;
391399 }
 400+*/
392401 body.rtl .wikiEditor-ui-toolbar .sections .section{
393402 float:right;
394403 }
@@ -542,6 +551,7 @@
543552 padding-right:22px;
544553 margin-right:4px;
545554 cursor:pointer;
 555+color:#333333;
546556 }
547557 body.rtl .wikiEditor-ui-toolbar .group .tool-select .label{
548558 background-position:center left;
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -16,13 +16,13 @@
1717 array( 'src' => 'Modules/Preview/Preview.js', 'version' => 2 ),
1818 array( 'src' => 'Modules/Publish/Publish.js', 'version' => 1 ),
1919 array( 'src' => 'Modules/Toc/Toc.js', 'version' => 1 ),
20 - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 9 ),
 20+ array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 10 ),
2121 ),
2222 'combined' => array(
23 - array( 'src' => 'WikiEditor.combined.js', 'version' => 7 ),
 23+ array( 'src' => 'WikiEditor.combined.js', 'version' => 8 ),
2424 ),
2525 'minified' => array(
26 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 7 ),
 26+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 8 ),
2727 ),
2828 );
2929 static $messages = array(
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -932,6 +932,7 @@
933933 function updateWidget( status ) {
934934 $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
935935 $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
 936+ $j( '#wikieditor-toolbar-link-int-target' ).parent().removeClass().addClass( 'status-' + status );
936937 }
937938 // Abort previous request
938939 var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -33,7 +33,7 @@
3434 </tr>\
3535 </table></fieldset>',init:function(){function isExternalLink(s){if(typeof arguments.callee.regex=='undefined'){arguments.callee.regex=new RegExp("(^("+urlprotocols+"))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))",'i');}
3636 return s.match(arguments.callee.regex);}
37 -function updateExistence(){function updateWidget(status){$j('#wikieditor-toolbar-link-int-target-status').children().hide();$j('#wikieditor-toolbar-link-int-target-status-'+status).show();}
 37+function updateExistence(){function updateWidget(status){$j('#wikieditor-toolbar-link-int-target-status').children().hide();$j('#wikieditor-toolbar-link-int-target-status-'+status).show();$j('#wikieditor-toolbar-link-int-target').parent().removeClass().addClass('status-'+status);}
3838 var request=$j('#wikieditor-toolbar-link-int-target-status').data('request');if(request){request.abort();}
3939 var target=$j('#wikieditor-toolbar-link-int-target').val();var cache=$j('#wikieditor-toolbar-link-int-target-status').data('existencecache');if(cache[target]){updateWidget(cache[target]);return;}
4040 if(target==''){$j('#wikieditor-toolbar-link-int-target-status').children().hide();return;}
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -884,6 +884,7 @@
885885 function updateWidget( status ) {
886886 $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
887887 $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
 888+ $j( '#wikieditor-toolbar-link-int-target' ).parent().removeClass().addClass( 'status-' + status );
888889 }
889890 // Abort previous request
890891 var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r59747Follow up improvements to r59687adam21:59, 4 December 2009

Comments

#Comment by Catrope (talk | contribs)   10:52, 3 December 2009
#wikieditor-toolbar-link-dialog .status-invalid input {

Please don't use IDs for wikieditor components, as (in theory) multiple wikieditor instances can be active on one page. If you must use an ID, use something like 'wikieditor-' + context.instance + '-blah' , but use classes where possible. The fact that these IDs are hardcoded in Toolbar.js is undesirable, and should be fixed.

Did you have other local changes that you didn't commit and accidentally ended up in combined.css , or did other committers simply forget to recombine before?

$j( '#wikieditor-toolbar-link-int-target' ).parent().removeClass().addClass( 'status-' + status );

This removes all classes from link-int-target. I don't think we're putting other classes on it right now, but it'd be cleaner if you could just remove the relevant class, or maybe just remove all status-* classes with .removeClass('status-foo status-bar status-baz') .

#Comment by Adammiller~mediawikiwiki (talk | contribs)   19:07, 4 December 2009

I committed all local changes with that, so I'm guessing someone else forgot to recombine?

Making all other suggested changes right now.

#Comment by Adammiller~mediawikiwiki (talk | contribs)   20:41, 4 December 2009

After some further thinking.....Toolbar.js is just our configuration of the plugin, so why can't it use ID's? I know it's not ideal, but it also doesn't seem wrong by any means.

#Comment by Catrope (talk | contribs)   11:14, 5 December 2009

That's a good point, I guess it's probably OK in Toolbar.js . I guess I've been mixing up my own guidelines here :)

Status & tagging log