Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -21,17 +21,17 @@ |
22 | 22 | array( 'src' => 'css/suggestions.css', 'version' => 6 ), |
23 | 23 | array( 'src' => 'css/wikiEditor.css', 'version' => 7 ), |
24 | 24 | 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 ), |
26 | 26 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 23 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
29 | 29 | ), |
30 | 30 | 'combined' => array( |
31 | | - array( 'src' => 'css/combined.css', 'version' => 31 ), |
| 31 | + array( 'src' => 'css/combined.css', 'version' => 32 ), |
32 | 32 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
33 | 33 | ), |
34 | 34 | 'minified' => array( |
35 | | - array( 'src' => 'css/combined.min.css', 'version' => 31 ), |
| 35 | + array( 'src' => 'css/combined.min.css', 'version' => 32 ), |
36 | 36 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
37 | 37 | ), |
38 | 38 | ) |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | z-index: 1099; |
16 | 16 | } |
17 | 17 | |
18 | | -#wikieditor-toolbar-link-dialog .status-invalid input { |
| 18 | +.ui-dialog-content .status-invalid input { |
19 | 19 | border: 2px solid red; |
20 | 20 | padding: 2px 1px; |
21 | 21 | } |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | z-index: 1099; |
176 | 176 | } |
177 | 177 | |
178 | | -#wikieditor-toolbar-link-dialog .status-invalid input { |
| 178 | +.ui-dialog-content .status-invalid input { |
179 | 179 | border: 2px solid red; |
180 | 180 | padding: 2px 1px; |
181 | 181 | }/* wikiEditor toc module */ |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -163,7 +163,7 @@ |
164 | 164 | div.suggestions{ |
165 | 165 | z-index:1099; |
166 | 166 | } |
167 | | -#wikieditor-toolbar-link-dialog .status-invalid input{ |
| 167 | +.ui-dialog-content .status-invalid input{ |
168 | 168 | border:2px solid red; |
169 | 169 | padding:2px 1px; |
170 | 170 | } |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,13 +16,13 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 2 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 1 ), |
19 | 19 | 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 ), |
21 | 21 | ), |
22 | 22 | 'combined' => array( |
23 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 9 ), |
| 23 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 10 ), |
24 | 24 | ), |
25 | 25 | 'minified' => array( |
26 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 9 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 10 ), |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -931,8 +931,12 @@ |
932 | 932 | function updateExistence() { |
933 | 933 | function updateWidget( status ) { |
934 | 934 | $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 | + } |
937 | 941 | } |
938 | 942 | // Abort previous request |
939 | 943 | var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' ); |
— | — | @@ -948,7 +952,7 @@ |
949 | 953 | } |
950 | 954 | if ( target == '' ) { |
951 | 955 | // Hide the widget when the textbox is empty |
952 | | - $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide(); |
| 956 | + updateWidget( false ); |
953 | 957 | return; |
954 | 958 | } |
955 | 959 | if ( isExternalLink( target ) ) { |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -33,10 +33,10 @@ |
34 | 34 | </tr>\ |
35 | 35 | </table></fieldset>',init:function(){function isExternalLink(s){if(typeof arguments.callee.regex=='undefined'){arguments.callee.regex=new RegExp("(^("+urlprotocols+"))|(^www\\.)|([^.]\\.[a-z]{2,}($|\\/))",'i');} |
36 | 36 | 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);}} |
38 | 38 | var request=$j('#wikieditor-toolbar-link-int-target-status').data('request');if(request){request.abort();} |
39 | 39 | 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;} |
41 | 41 | if(isExternalLink(target)){updateWidget('external');return;} |
42 | 42 | if(target.indexOf('|')!=-1){updateWidget('invalid');return;} |
43 | 43 | 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 @@ |
884 | 884 | function updateExistence() { |
885 | 885 | function updateWidget( status ) { |
886 | 886 | $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 | + } |
889 | 893 | } |
890 | 894 | // Abort previous request |
891 | 895 | var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' ); |
— | — | @@ -900,7 +904,7 @@ |
901 | 905 | } |
902 | 906 | if ( target == '' ) { |
903 | 907 | // Hide the widget when the textbox is empty |
904 | | - $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide(); |
| 908 | + updateWidget( false ); |
905 | 909 | return; |
906 | 910 | } |
907 | 911 | if ( isExternalLink( target ) ) { |