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' => 66 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 67 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 70 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 71 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 70 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 71 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1373,6 +1373,11 @@ |
1374 | 1374 | ); |
1375 | 1375 | $j( '#wikieditor-toolbar-link-int-target' ).suggestions(); |
1376 | 1376 | |
| 1377 | + //don't overwrite user's text |
| 1378 | + if( selection != '' ){ |
| 1379 | + $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false ); |
| 1380 | + } |
| 1381 | + |
1377 | 1382 | $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' ) |
1378 | 1383 | .each( function() { |
1379 | 1384 | if ( $j(this).val() == '' ) |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -72,7 +72,8 @@ |
73 | 73 | $j('#wikieditor-toolbar-link-int-text').val(text).change();if(typeof target!='undefined') |
74 | 74 | $j('#wikieditor-toolbar-link-int-target').val(target).change();if(typeof type!='undefined') |
75 | 75 | $j('#wikieditor-toolbar-link-'+type).attr('checked','checked');} |
76 | | -$j('#wikieditor-toolbar-link-int-text').data('untouched',$j('#wikieditor-toolbar-link-int-text').val()==$j('#wikieditor-toolbar-link-int-target').val()||$j('#wikieditor-toolbar-link-int-text').hasClass('wikieditor-toolbar-dialog-hint'));$j('#wikieditor-toolbar-link-int-target').suggestions();$j('#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target').each(function(){if($j(this).val()=='') |
| 76 | +$j('#wikieditor-toolbar-link-int-text').data('untouched',$j('#wikieditor-toolbar-link-int-text').val()==$j('#wikieditor-toolbar-link-int-target').val()||$j('#wikieditor-toolbar-link-int-text').hasClass('wikieditor-toolbar-dialog-hint'));$j('#wikieditor-toolbar-link-int-target').suggestions();if(selection!=''){$j('#wikieditor-toolbar-link-int-text').data('untouched',false);} |
| 77 | +$j('#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target').each(function(){if($j(this).val()=='') |
77 | 78 | $j(this).parent().find('label').show();});if(!($j(this).data('dialogkeypressset'))){$j(this).data('dialogkeypressset',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});}}}},'insert-table':{filters:['#wpTextbox1.toolbar-dialogs'],titleMsg:'wikieditor-toolbar-tool-table-title',id:'wikieditor-toolbar-table-dialog',html:'\ |
78 | 79 | <div class="wikieditor-toolbar-dialog-wrapper">\ |
79 | 80 | <fieldset><div class="wikieditor-toolbar-table-form">\ |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1324,6 +1324,11 @@ |
1325 | 1325 | ); |
1326 | 1326 | $j( '#wikieditor-toolbar-link-int-target' ).suggestions(); |
1327 | 1327 | |
| 1328 | + //don't overwrite user's text |
| 1329 | + if( selection != '' ){ |
| 1330 | + $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false ); |
| 1331 | + } |
| 1332 | + |
1328 | 1333 | $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' ) |
1329 | 1334 | .each( function() { |
1330 | 1335 | if ( $j(this).val() == '' ) |