r59747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59746‎ | r59747 | r59748 >
Date:21:59, 4 December 2009
Author:adam
Status:ok
Tags:
Comment:
Follow up improvements to r59687
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' => 3 ),
 25+ array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 4 ),
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' => 31 ),
 31+ array( 'src' => 'css/combined.css', 'version' => 32 ),
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' => 31 ),
 35+ array( 'src' => 'css/combined.min.css', 'version' => 32 ),
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
@@ -14,7 +14,7 @@
1515 z-index: 1099;
1616 }
1717
18 -#wikieditor-toolbar-link-dialog .status-invalid input {
 18+.ui-dialog-content .status-invalid input {
1919 border: 2px solid red;
2020 padding: 2px 1px;
2121 }
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -174,7 +174,7 @@
175175 z-index: 1099;
176176 }
177177
178 -#wikieditor-toolbar-link-dialog .status-invalid input {
 178+.ui-dialog-content .status-invalid input {
179179 border: 2px solid red;
180180 padding: 2px 1px;
181181 }/* wikiEditor toc module */
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -163,7 +163,7 @@
164164 div.suggestions{
165165 z-index:1099;
166166 }
167 -#wikieditor-toolbar-link-dialog .status-invalid input{
 167+.ui-dialog-content .status-invalid input{
168168 border:2px solid red;
169169 padding:2px 1px;
170170 }
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' => 11 ),
 20+ array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 12 ),
2121 ),
2222 'combined' => array(
23 - array( 'src' => 'WikiEditor.combined.js', 'version' => 9 ),
 23+ array( 'src' => 'WikiEditor.combined.js', 'version' => 10 ),
2424 ),
2525 'minified' => array(
26 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 9 ),
 26+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 10 ),
2727 ),
2828 );
2929 static $messages = array(
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -931,8 +931,12 @@
932932 function updateExistence() {
933933 function updateWidget( status ) {
934934 $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
935 - $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
936 - $j( '#wikieditor-toolbar-link-int-target' ).parent().removeClass().addClass( 'status-' + status );
 935+ $j( '#wikieditor-toolbar-link-int-target' ).parent()
 936+ .removeClass( 'status-invalid status-external status-notexists status-exists status-loading' );
 937+ if ( status ) {
 938+ $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
 939+ $j( '#wikieditor-toolbar-link-int-target' ).parent().addClass( 'status-' + status );
 940+ }
937941 }
938942 // Abort previous request
939943 var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
@@ -948,7 +952,7 @@
949953 }
950954 if ( target == '' ) {
951955 // Hide the widget when the textbox is empty
952 - $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
 956+ updateWidget( false );
953957 return;
954958 }
955959 if ( isExternalLink( target ) ) {
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -33,10 +33,10 @@
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();$j('#wikieditor-toolbar-link-int-target').parent().removeClass().addClass('status-'+status);}
 37+function updateExistence(){function updateWidget(status){$j('#wikieditor-toolbar-link-int-target-status').children().hide();$j('#wikieditor-toolbar-link-int-target').parent().removeClass('status-invalid status-external status-notexists status-exists status-loading');if(status){$j('#wikieditor-toolbar-link-int-target-status-'+status).show();$j('#wikieditor-toolbar-link-int-target').parent().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;}
40 -if(target==''){$j('#wikieditor-toolbar-link-int-target-status').children().hide();return;}
 40+if(target==''){updateWidget(false);return;}
4141 if(isExternalLink(target)){updateWidget('external');return;}
4242 if(target.indexOf('|')!=-1){updateWidget('invalid');return;}
4343 updateWidget('loading');$j('#wikieditor-toolbar-link-int-target-status').data('request',$j.ajax({url:wgScriptPath+'/api.php',dataType:'json',data:{'action':'query','indexpageids':'','titles':target,'format':'json'},success:function(data){var status;if(typeof data.query=='undefined'){status='invalid';}else{var page=data.query.pages[data.query.pageids[0]];status='exists';if(typeof page.missing!='undefined')
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -883,8 +883,12 @@
884884 function updateExistence() {
885885 function updateWidget( status ) {
886886 $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
887 - $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
888 - $j( '#wikieditor-toolbar-link-int-target' ).parent().removeClass().addClass( 'status-' + status );
 887+ $j( '#wikieditor-toolbar-link-int-target' ).parent()
 888+ .removeClass( 'status-invalid status-external status-notexists status-exists status-loading' );
 889+ if ( status ) {
 890+ $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
 891+ $j( '#wikieditor-toolbar-link-int-target' ).parent().addClass( 'status-' + status );
 892+ }
889893 }
890894 // Abort previous request
891895 var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
@@ -900,7 +904,7 @@
901905 }
902906 if ( target == '' ) {
903907 // Hide the widget when the textbox is empty
904 - $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
 908+ updateWidget( false );
905909 return;
906910 }
907911 if ( isExternalLink( target ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59687adding invalid border coloring to link dialogadam23:49, 2 December 2009

Status & tagging log