r61995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61994‎ | r61995 | r61996 >
Date:22:48, 4 February 2010
Author:catrope
Status:deferred (Comments)
Tags:
Comment:
wmf-deployment: UsabilityInitiative_alpha: Comment out undo functionality, not quite stable yet
Modified paths:
  • /branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.js
@@ -273,6 +273,7 @@
274274 * processing of events which did not actually change the content of the iframe.
275275 */
276276 'keydown': function( event ) {
 277+ /*
277278 switch ( event.which ) {
278279 case 90: // z
279280 if ( ( event.ctrlKey || event.metaKey ) && context.history.length ) {
@@ -302,6 +303,7 @@
303304 }
304305 break;
305306 }
 307+ */
306308 return true;
307309 },
308310 'change': function( event ) {
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.js
@@ -6706,6 +6706,7 @@
67076707 * processing of events which did not actually change the content of the iframe.
67086708 */
67096709 'keydown': function( event ) {
 6710+ /*
67106711 switch ( event.which ) {
67116712 case 90: // z
67126713 if ( ( event.ctrlKey || event.metaKey ) && context.history.length ) {
@@ -6735,6 +6736,7 @@
67366737 }
67376738 break;
67386739 }
 6740+ */
67396741 return true;
67406742 },
67416743 'change': function( event ) {
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.min.js
@@ -444,11 +444,7 @@
445445 return src+'?'+wgWikiEditorIconVersion;}};$.fn.wikiEditor=function(){if(!$j.wikiEditor.isSupported()){return $(this);}
446446 var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){context={'$textarea':$(this),'views':{},'modules':{},'data':{},'instance':$.wikiEditor.instances.push($(this))-1,'offsets':null,'htmlToTextMap':{},'oldHTML':null,'oldDelayedHTML':null,'savedSelection':null,'history':[],'historyPosition':-1};context.api={'addModule':function(context,data){var modules={};if(typeof data=='string'){modules[data]={};}else if(typeof data=='object'){modules=data;}
447447 for(var module in modules){if(typeof module=='string'&&module in $.wikiEditor.modules){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];}}}
448 -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 90:if((event.ctrlKey||event.metaKey)&&context.history.length){if(event.shiftKey){context.historyPosition++;}else{context.historyPosition--;}
449 -if(context.history.length+context.historyPosition>=0&&context.historyPosition<0){context.$content.html(context.history[context.history.length+context.historyPosition].html);}else{context.historyPosition=Math.max(-context.history.length,Math.min(context.historyPosition,-1));}
450 -return false;}
451 -break;}
452 -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';}
 448+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){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';}
453449 switch(event.which){case 8:break;}
454450 return true;},'delayedChange':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldDelayedHTML!=newHTML){context.fn.purgeOffsets();context.oldDelayedHTML=newHTML;event.data.scope='realchange';if(newHTML!==context.history[context.history.length+context.historyPosition].html){context.historyPosition=-1;}
455451 context.history.push({'html':newHTML});while(context.history.length>10){context.history.shift();}}

Comments

#Comment by Tim Starling (talk | contribs)   04:00, 24 March 2010

Suggest merge to trunk.

#Comment by Catrope (talk | contribs)   10:45, 24 March 2010

Not needed, undo code in trunk is better now, and the iframe is disabled on WMF anyway.

#Comment by Tim Starling (talk | contribs)   04:03, 24 March 2010

r62000 is equivalent.

Status & tagging log