Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -25,15 +25,15 @@ |
26 | 26 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 27 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 30 ), |
29 | | - array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 11 ), |
| 29 | + array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 14 ), |
30 | 30 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
31 | 31 | ), |
32 | 32 | 'combined' => array( |
33 | | - array( 'src' => 'css/combined.css', 'version' => 77 ), |
| 33 | + array( 'src' => 'css/combined.css', 'version' => 83 ), |
34 | 34 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
35 | 35 | ), |
36 | 36 | 'minified' => array( |
37 | | - array( 'src' => 'css/combined.min.css', 'version' => 77 ), |
| 37 | + array( 'src' => 'css/combined.min.css', 'version' => 83 ), |
38 | 38 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
39 | 39 | ), |
40 | 40 | ) |
— | — | @@ -72,8 +72,8 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 178 ), |
77 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 51 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 179 ), |
| 77 | + array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 52 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 53 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 23 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 365 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 367 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 365 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 367 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css |
— | — | @@ -310,13 +310,17 @@ |
311 | 311 | body.rtl .wikiEditor-ui-toolbar .page-table td { |
312 | 312 | text-align: right; |
313 | 313 | } |
| 314 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
314 | 315 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax { |
315 | 316 | font-family: monospace; |
316 | 317 | } |
317 | 318 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax, |
| 319 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
| 320 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-result, |
318 | 321 | .wikiEditor-ui-toolbar .section-help .page-table td.result { |
319 | 322 | width: 40%; |
320 | 323 | } |
| 324 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-description, |
321 | 325 | .wikiEditor-ui-toolbar .section-help .page-table td.description { |
322 | 326 | width: 20%; |
323 | 327 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -1070,13 +1070,17 @@ |
1071 | 1071 | body.rtl .wikiEditor-ui-toolbar .page-table td { |
1072 | 1072 | text-align: right; |
1073 | 1073 | } |
| 1074 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
1074 | 1075 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax { |
1075 | 1076 | font-family: monospace; |
1076 | 1077 | } |
1077 | 1078 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax, |
| 1079 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
| 1080 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-result, |
1078 | 1081 | .wikiEditor-ui-toolbar .section-help .page-table td.result { |
1079 | 1082 | width: 40%; |
1080 | 1083 | } |
| 1084 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-description, |
1081 | 1085 | .wikiEditor-ui-toolbar .section-help .page-table td.description { |
1082 | 1086 | width: 20%; |
1083 | 1087 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -1007,13 +1007,17 @@ |
1008 | 1008 | body.rtl .wikiEditor-ui-toolbar .page-table td{ |
1009 | 1009 | text-align:right; |
1010 | 1010 | } |
| 1011 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
1011 | 1012 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax{ |
1012 | 1013 | font-family:monospace; |
1013 | 1014 | } |
1014 | 1015 | .wikiEditor-ui-toolbar .section-help .page-table td.syntax, |
| 1016 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax, |
| 1017 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-result, |
1015 | 1018 | .wikiEditor-ui-toolbar .section-help .page-table td.result{ |
1016 | 1019 | width:40%; |
1017 | 1020 | } |
| 1021 | +.wikiEditor-ui-toolbar .section-help .page-table td.cell-description, |
1018 | 1022 | .wikiEditor-ui-toolbar .section-help .page-table td.description{ |
1019 | 1023 | width:20%; |
1020 | 1024 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1375,6 +1375,11 @@ |
1376 | 1376 | ); |
1377 | 1377 | $j( '#wikieditor-toolbar-link-int-target' ).suggestions(); |
1378 | 1378 | |
| 1379 | + //don't overwrite user's text |
| 1380 | + if( selection != '' ){ |
| 1381 | + $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false ); |
| 1382 | + } |
| 1383 | + |
1379 | 1384 | $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' ) |
1380 | 1385 | .each( function() { |
1381 | 1386 | if ( $j(this).val() == '' ) |
— | — | @@ -1601,7 +1606,7 @@ |
1602 | 1607 | ); |
1603 | 1608 | |
1604 | 1609 | // Restore form state |
1605 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1610 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1606 | 1611 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1607 | 1612 | // Simulate clicks instead of setting values, so the according |
1608 | 1613 | // actions are performed |
Index: branches/wmf-deployment/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">\ |
— | — | @@ -139,7 +140,7 @@ |
140 | 141 | table=table.substr(0,table.length-1)+"\n";} |
141 | 142 | var classes=[];if($j('#wikieditor-toolbar-table-wikitable').is(':checked')) |
142 | 143 | classes.push('wikitable');if($j('#wikieditor-toolbar-table-sortable').is(':checked')) |
143 | | -classes.push('sortable');var classStr=classes.length>0?' class="'+classes.join(' ')+'"':'';$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:'{|'+classStr+"\n",peri:table,post:'|}',ownline:true}},$j(this));$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);if(!$j('#wikieditor-toolbar-table-dimensions-header').is(':checked')) |
| 144 | +classes.push('sortable');var classStr=classes.length>0?' class="'+classes.join(' ')+'"':'';$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:'{|'+classStr+"\n",peri:table,post:'|}',ownline:true}},$j(this));$j('#wikieditor-toolbar-table-dimensions-rows').val(3);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);if(!$j('#wikieditor-toolbar-table-dimensions-header').is(':checked')) |
144 | 145 | $j('#wikieditor-toolbar-table-dimensions-header').click();if(!$j('#wikieditor-toolbar-table-wikitable').is(':checked')) |
145 | 146 | $j('#wikieditor-toolbar-table-wikitable').click();if($j('#wikieditor-toolbar-table-sortable').is(':checked')) |
146 | 147 | $j('#wikieditor-toolbar-table-sortable').click();$j(this).dialog('close');},'wikieditor-toolbar-tool-table-cancel':function(){$j(this).dialog('close');}},open:function(){$j('#wikieditor-toolbar-table-dimensions-rows').focus();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);});}}}},'search-and-replace':{'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2]],'opera':false,'safari':[['>=',3]],'chrome':[['>=',3]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2]],'opera':false,'safari':[['>=',3]],'chrome':[['>=',3]]}},filters:['#wpTextbox1.toolbar-dialogs'],titleMsg:'wikieditor-toolbar-tool-replace-title',id:'wikieditor-toolbar-replace-dialog',html:'\ |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1326,6 +1326,11 @@ |
1327 | 1327 | ); |
1328 | 1328 | $j( '#wikieditor-toolbar-link-int-target' ).suggestions(); |
1329 | 1329 | |
| 1330 | + //don't overwrite user's text |
| 1331 | + if( selection != '' ){ |
| 1332 | + $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false ); |
| 1333 | + } |
| 1334 | + |
1330 | 1335 | $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' ) |
1331 | 1336 | .each( function() { |
1332 | 1337 | if ( $j(this).val() == '' ) |
— | — | @@ -1552,7 +1557,7 @@ |
1553 | 1558 | ); |
1554 | 1559 | |
1555 | 1560 | // Restore form state |
1556 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1561 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1557 | 1562 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1558 | 1563 | // Simulate clicks instead of setting values, so the according |
1559 | 1564 | // actions are performed |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -371,7 +371,7 @@ |
372 | 372 | } |
373 | 373 | break; |
374 | 374 | case 86: //v |
375 | | - if ( event.ctrlKey ){ |
| 375 | + if ( event.ctrlKey && $.browser.msie ){ |
376 | 376 | //paste, intercepted for IE |
377 | 377 | context.evt.paste( event ); |
378 | 378 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js |
— | — | @@ -415,7 +415,7 @@ |
416 | 416 | |
417 | 417 | // Remove this marker |
418 | 418 | var marker = $(this).data( 'marker' ); |
419 | | - if ( typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
| 419 | + if ( marker && typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
420 | 420 | // Don't remove these either |
421 | 421 | return true; |
422 | 422 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6914,7 +6914,7 @@ |
6915 | 6915 | } |
6916 | 6916 | break; |
6917 | 6917 | case 86: //v |
6918 | | - if ( event.ctrlKey ){ |
| 6918 | + if ( event.ctrlKey && $.browser.msie ){ |
6919 | 6919 | //paste, intercepted for IE |
6920 | 6920 | context.evt.paste( event ); |
6921 | 6921 | } |
— | — | @@ -8984,7 +8984,7 @@ |
8985 | 8985 | |
8986 | 8986 | // Remove this marker |
8987 | 8987 | var marker = $(this).data( 'marker' ); |
8988 | | - if ( typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
| 8988 | + if ( marker && typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
8989 | 8989 | // Don't remove these either |
8990 | 8990 | return true; |
8991 | 8991 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | for(var module in modules){if(typeof module=='string'&&$.wikiEditor.isSupported($.wikiEditor.modules[module])){if('api'in $.wikiEditor.modules[module]){for(var call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}} |
458 | 458 | if('fn'in $.wikiEditor.modules[module]&&'create'in $.wikiEditor.modules[module].fn){context.modules[module]={};$.wikiEditor.modules[module].fn.create(context,modules[module]);}}}}};context.evt={'keydown':function(event){switch(event.which){case 9:if(event.ctrlKey||event.altKey||event.shiftKey){return true;}else{var $tabindexList=$j('[tabindex]:visible').sort(function(a,b){return a.tabIndex-b.tabIndex;});for(var i=0;i<$tabindexList.length;i++){if($tabindexList.eq(i).attr('id')==context.$iframe.attr('id')){$tabindexList.get(i+1).focus();break;}} |
459 | 459 | return false;} |
460 | | -break;case 86:if(event.ctrlKey){context.evt.paste(event);} |
| 460 | +break;case 86:if(event.ctrlKey&&$.browser.msie){context.evt.paste(event);} |
461 | 461 | break;} |
462 | 462 | return true;},'change':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldHTML!=newHTML){context.fn.purgeOffsets();context.oldHTML=newHTML;event.data.scope='realchange';} |
463 | 463 | if(context.$content.children().length==0){context.$content.append('<p></p>');} |
— | — | @@ -611,7 +611,7 @@ |
612 | 612 | $(anchor).data('marker',markers[i]).addClass('wikiEditor-highlight');markers[i].afterWrap(anchor,markers[i]);}else{$(anchor).data('marker',markers[i]);markers[i].onSkip(anchor);} |
613 | 613 | visited[v++]=anchor;}} |
614 | 614 | var j=0;context.$content.find('.wikiEditor-highlight').each(function(){if(visited[j]==this){j++;return true;} |
615 | | -var marker=$(this).data('marker');if(typeof marker.skipDivision!='undefined'&&(division==marker.skipDivision)){return true;} |
| 615 | +var marker=$(this).data('marker');if(marker&&typeof marker.skipDivision!='undefined'&&(division==marker.skipDivision)){return true;} |
616 | 616 | if(marker&&typeof marker.beforeUnwrap=='function') |
617 | 617 | marker.beforeUnwrap(this);if((marker&&marker.anchor=='tag')||$(this).is('p')){$(this).removeAttr('class');}else{$(this).replaceWith(this.childNodes);} |
618 | 618 | context.fn.purgeOffsets();});}}};})(jQuery);(function($){$.wikiEditor.modules.preview={'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]]}},fn:{create:function(context,config){if('initialized'in context.modules.preview){return;} |