r64455 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64454‎ | r64455 | r64456 >
Date:20:23, 31 March 2010
Author:nimishg
Status:ok
Tags:
Comment:
merged changes from r64404. r64167, r64354 into deployment for UX test
Modified paths:
  • /branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -25,15 +25,15 @@
2626 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 27 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 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 ),
3030 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3131 ),
3232 'combined' => array(
33 - array( 'src' => 'css/combined.css', 'version' => 77 ),
 33+ array( 'src' => 'css/combined.css', 'version' => 83 ),
3434 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3535 ),
3636 'minified' => array(
37 - array( 'src' => 'css/combined.min.css', 'version' => 77 ),
 37+ array( 'src' => 'css/combined.min.css', 'version' => 83 ),
3838 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3939 ),
4040 )
@@ -72,8 +72,8 @@
7373 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
7474 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ),
7575 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 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 53 ),
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 23 ),
8080 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 365 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 367 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 365 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 367 ),
9090 ),
9191 ),
9292 );
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css
@@ -310,13 +310,17 @@
311311 body.rtl .wikiEditor-ui-toolbar .page-table td {
312312 text-align: right;
313313 }
 314+.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
314315 .wikiEditor-ui-toolbar .section-help .page-table td.syntax {
315316 font-family: monospace;
316317 }
317318 .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,
318321 .wikiEditor-ui-toolbar .section-help .page-table td.result {
319322 width: 40%;
320323 }
 324+.wikiEditor-ui-toolbar .section-help .page-table td.cell-description,
321325 .wikiEditor-ui-toolbar .section-help .page-table td.description {
322326 width: 20%;
323327 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.css
@@ -1070,13 +1070,17 @@
10711071 body.rtl .wikiEditor-ui-toolbar .page-table td {
10721072 text-align: right;
10731073 }
 1074+.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
10741075 .wikiEditor-ui-toolbar .section-help .page-table td.syntax {
10751076 font-family: monospace;
10761077 }
10771078 .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,
10781081 .wikiEditor-ui-toolbar .section-help .page-table td.result {
10791082 width: 40%;
10801083 }
 1084+.wikiEditor-ui-toolbar .section-help .page-table td.cell-description,
10811085 .wikiEditor-ui-toolbar .section-help .page-table td.description {
10821086 width: 20%;
10831087 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css
@@ -1007,13 +1007,17 @@
10081008 body.rtl .wikiEditor-ui-toolbar .page-table td{
10091009 text-align:right;
10101010 }
 1011+.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
10111012 .wikiEditor-ui-toolbar .section-help .page-table td.syntax{
10121013 font-family:monospace;
10131014 }
10141015 .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,
10151018 .wikiEditor-ui-toolbar .section-help .page-table td.result{
10161019 width:40%;
10171020 }
 1021+.wikiEditor-ui-toolbar .section-help .page-table td.cell-description,
10181022 .wikiEditor-ui-toolbar .section-help .page-table td.description{
10191023 width:20%;
10201024 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -1375,6 +1375,11 @@
13761376 );
13771377 $j( '#wikieditor-toolbar-link-int-target' ).suggestions();
13781378
 1379+ //don't overwrite user's text
 1380+ if( selection != '' ){
 1381+ $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false );
 1382+ }
 1383+
13791384 $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' )
13801385 .each( function() {
13811386 if ( $j(this).val() == '' )
@@ -1601,7 +1606,7 @@
16021607 );
16031608
16041609 // Restore form state
1605 - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 );
 1610+ $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
16061611 $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
16071612 // Simulate clicks instead of setting values, so the according
16081613 // actions are performed
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -72,7 +72,8 @@
7373 $j('#wikieditor-toolbar-link-int-text').val(text).change();if(typeof target!='undefined')
7474 $j('#wikieditor-toolbar-link-int-target').val(target).change();if(typeof type!='undefined')
7575 $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()=='')
7778 $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:'\
7879 <div class="wikieditor-toolbar-dialog-wrapper">\
7980 <fieldset><div class="wikieditor-toolbar-table-form">\
@@ -139,7 +140,7 @@
140141 table=table.substr(0,table.length-1)+"\n";}
141142 var classes=[];if($j('#wikieditor-toolbar-table-wikitable').is(':checked'))
142143 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'))
144145 $j('#wikieditor-toolbar-table-dimensions-header').click();if(!$j('#wikieditor-toolbar-table-wikitable').is(':checked'))
145146 $j('#wikieditor-toolbar-table-wikitable').click();if($j('#wikieditor-toolbar-table-sortable').is(':checked'))
146147 $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 @@
13271327 );
13281328 $j( '#wikieditor-toolbar-link-int-target' ).suggestions();
13291329
 1330+ //don't overwrite user's text
 1331+ if( selection != '' ){
 1332+ $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false );
 1333+ }
 1334+
13301335 $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' )
13311336 .each( function() {
13321337 if ( $j(this).val() == '' )
@@ -1552,7 +1557,7 @@
15531558 );
15541559
15551560 // Restore form state
1556 - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 );
 1561+ $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
15571562 $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
15581563 // Simulate clicks instead of setting values, so the according
15591564 // actions are performed
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -371,7 +371,7 @@
372372 }
373373 break;
374374 case 86: //v
375 - if ( event.ctrlKey ){
 375+ if ( event.ctrlKey && $.browser.msie ){
376376 //paste, intercepted for IE
377377 context.evt.paste( event );
378378 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js
@@ -415,7 +415,7 @@
416416
417417 // Remove this marker
418418 var marker = $(this).data( 'marker' );
419 - if ( typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) {
 419+ if ( marker && typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) {
420420 // Don't remove these either
421421 return true;
422422 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6914,7 +6914,7 @@
69156915 }
69166916 break;
69176917 case 86: //v
6918 - if ( event.ctrlKey ){
 6918+ if ( event.ctrlKey && $.browser.msie ){
69196919 //paste, intercepted for IE
69206920 context.evt.paste( event );
69216921 }
@@ -8984,7 +8984,7 @@
89858985
89868986 // Remove this marker
89878987 var marker = $(this).data( 'marker' );
8988 - if ( typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) {
 8988+ if ( marker && typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) {
89898989 // Don't remove these either
89908990 return true;
89918991 }
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -456,7 +456,7 @@
457457 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];}}}
458458 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;}}
459459 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);}
461461 break;}
462462 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';}
463463 if(context.$content.children().length==0){context.$content.append('<p></p>');}
@@ -611,7 +611,7 @@
612612 $(anchor).data('marker',markers[i]).addClass('wikiEditor-highlight');markers[i].afterWrap(anchor,markers[i]);}else{$(anchor).data('marker',markers[i]);markers[i].onSkip(anchor);}
613613 visited[v++]=anchor;}}
614614 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;}
616616 if(marker&&typeof marker.beforeUnwrap=='function')
617617 marker.beforeUnwrap(this);if((marker&&marker.anchor=='tag')||$(this).is('p')){$(this).removeAttr('class');}else{$(this).replaceWith(this.childNodes);}
618618 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;}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64167link dialog no longer overwrites user's existing entrynimishg18:35, 25 March 2010
r64354fixes the 'templates exploding on paste in FF/win' issuenimishg19:05, 29 March 2010
r64404Fixed minor issues of Usability test: font style for help and default table d...nimishg19:32, 30 March 2010

Status & tagging log