r104501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104500‎ | r104501 | r104502 >
Date:22:47, 28 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Support for select all (ctrl+a)
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js
@@ -424,6 +424,18 @@
425425 }
426426 handleInsert();
427427 break;
 428+
 429+ // a (select all)
 430+ case 65:
 431+ if ( e.ctrlKey ) {
 432+ this.model.select( new es.Range(
 433+ this.model.getDocument().getRelativeContentOffset( 0, 1 ),
 434+ this.model.getDocument().getRelativeContentOffset(
 435+ this.model.getDocument().getContentLength(), -1
 436+ )
 437+ ), true );
 438+ break;
 439+ }
428440 // Insert content (maybe)
429441 default:
430442 handleInsert();
@@ -570,6 +582,7 @@
571583 val = this.$input.val();
572584 this.$input.val( '' );
573585 if ( val.length > 0 ) {
 586+ //debugger;
574587 var tx;
575588 if ( selection.from != selection.to ) {
576589 tx = this.model.getDocument().prepareRemoval( selection );

Status & tagging log