Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,14 +16,14 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | | - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 50 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 51 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 4 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 52 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 53 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 52 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 53 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1088,11 +1088,13 @@ |
1089 | 1089 | // $j(this).val() is the old value, before the keypress |
1090 | 1090 | // Defer this until $j(this).val() has been updated |
1091 | 1091 | setTimeout( function() { |
1092 | | - if ( isExternalLink( $j( '#wikieditor-toolbar-link-int-target' ).val() ) ) |
| 1092 | + if ( isExternalLink( $j( '#wikieditor-toolbar-link-int-target' ).val() ) ) { |
1093 | 1093 | $j( '#wikieditor-toolbar-link-type-ext' ).attr( 'checked', 'checked' ); |
1094 | | - else |
| 1094 | + updateWidget( 'external' ); |
| 1095 | + } else { |
1095 | 1096 | $j( '#wikieditor-toolbar-link-type-int' ).attr( 'checked', 'checked' ); |
1096 | | - |
| 1097 | + updateExistence(); |
| 1098 | + } |
1097 | 1099 | if ( $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched' ) ) |
1098 | 1100 | if ( $j( '#wikieditor-toolbar-link-int-target' ).val() == |
1099 | 1101 | $j( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip' ) ) { |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -42,9 +42,8 @@ |
43 | 43 | $j('#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext').click(function(){if($j('#wikieditor-toolbar-link-type-ext').is(':checked')) |
44 | 44 | updateWidget('external');if($j('#wikieditor-toolbar-link-type-int').is(':checked')) |
45 | 45 | updateExistence();});var u=mw.usability;$j(this).find('[rel]').each(function(){$j(this).text(u.getMsg($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target').data('tooltip',u.getMsg('wikieditor-toolbar-tool-link-int-target-tooltip'));$j('#wikieditor-toolbar-link-int-text').data('tooltip',u.getMsg('wikieditor-toolbar-tool-link-int-text-tooltip'));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').each(function(){var tooltip=u.getMsg($j(this).attr('id')+'-tooltip');if($j(this).val()=='') |
46 | | -$j(this).addClass('wikieditor-toolbar-dialog-hint').val($j(this).data('tooltip')).data('tooltip-mode',true);}).focus(function(){if($j(this).val()==$j(this).data('tooltip')){$j(this).val('').removeClass('wikieditor-toolbar-dialog-hint').data('tooltip-mode',false);}}).bind('change',function(){if($j(this).val()!=$j(this).data('tooltip')){$j(this).removeClass('wikieditor-toolbar-dialog-hint').data('tooltip-mode',false);}}).bind('blur',function(){if($j(this).val()==''){$j(this).addClass('wikieditor-toolbar-dialog-hint').val($j(this).data('tooltip')).data('tooltip-mode',true);}});$j('#wikieditor-toolbar-link-int-target').bind('change keydown paste cut',function(){setTimeout(function(){if(isExternalLink($j('#wikieditor-toolbar-link-int-target').val())) |
47 | | -$j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else |
48 | | -$j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
| 46 | +$j(this).addClass('wikieditor-toolbar-dialog-hint').val($j(this).data('tooltip')).data('tooltip-mode',true);}).focus(function(){if($j(this).val()==$j(this).data('tooltip')){$j(this).val('').removeClass('wikieditor-toolbar-dialog-hint').data('tooltip-mode',false);}}).bind('change',function(){if($j(this).val()!=$j(this).data('tooltip')){$j(this).removeClass('wikieditor-toolbar-dialog-hint').data('tooltip-mode',false);}}).bind('blur',function(){if($j(this).val()==''){$j(this).addClass('wikieditor-toolbar-dialog-hint').val($j(this).data('tooltip')).data('tooltip-mode',true);}});$j('#wikieditor-toolbar-link-int-target').bind('change keydown paste cut',function(){setTimeout(function(){if(isExternalLink($j('#wikieditor-toolbar-link-int-target').val())){$j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');updateWidget('external');}else{$j('#wikieditor-toolbar-link-type-int').attr('checked','checked');updateExistence();} |
| 47 | +if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
49 | 48 | if($j('#wikieditor-toolbar-link-int-target').val()==$j('#wikieditor-toolbar-link-int-target').data('tooltip')){$j('#wikieditor-toolbar-link-int-text').addClass('wikieditor-toolbar-dialog-hint').val($j('#wikieditor-toolbar-link-int-text').data('tooltip')).change();}else{$j('#wikieditor-toolbar-link-int-text').val($j('#wikieditor-toolbar-link-int-target').val()).change();}},0);});$j('#wikieditor-toolbar-link-int-text').bind('change keydown paste cut',function(){var oldVal=$j(this).val();var that=this;setTimeout(function(){if($j(that).val()!=oldVal) |
50 | 49 | $j(that).data('untouched',false);},0);});var existsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-exists');var notexistsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-notexists');var invalidMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-invalid');var externalMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-external');var loadingMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-loading');$j('#wikieditor-toolbar-link-int-target-status').append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-exists').append(existsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-notexists').append(notexistsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-invalid').append(invalidMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-external').append(externalMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-loading').append($j('<img />').attr({'src':$j.wikiEditor.imgPath+'dialogs/'+'loading.gif','alt':loadingMsg,'title':loadingMsg}))).data('existencecache',{}).children().hide();$j('#wikieditor-toolbar-link-int-target').bind('keyup paste cut',function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
51 | 50 | var timerID=setTimeout(updateExistence,120);$j(this).data('timerID',timerID);}).change(function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1039,11 +1039,13 @@ |
1040 | 1040 | // $j(this).val() is the old value, before the keypress |
1041 | 1041 | // Defer this until $j(this).val() has been updated |
1042 | 1042 | setTimeout( function() { |
1043 | | - if ( isExternalLink( $j( '#wikieditor-toolbar-link-int-target' ).val() ) ) |
| 1043 | + if ( isExternalLink( $j( '#wikieditor-toolbar-link-int-target' ).val() ) ) { |
1044 | 1044 | $j( '#wikieditor-toolbar-link-type-ext' ).attr( 'checked', 'checked' ); |
1045 | | - else |
| 1045 | + updateWidget( 'external' ); |
| 1046 | + } else { |
1046 | 1047 | $j( '#wikieditor-toolbar-link-type-int' ).attr( 'checked', 'checked' ); |
1047 | | - |
| 1048 | + updateExistence(); |
| 1049 | + } |
1048 | 1050 | if ( $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched' ) ) |
1049 | 1051 | if ( $j( '#wikieditor-toolbar-link-int-target' ).val() == |
1050 | 1052 | $j( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip' ) ) { |