r113538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113537‎ | r113538 | r113539 >
Date:22:51, 9 March 2012
Author:tparscal
Status:deferred
Tags:
Comment:
More cleanup (jshint complaints)
Modified paths:
  • /trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js
@@ -14,20 +14,23 @@
1515
1616 setTimeout( function() {
1717 if ( !_this.documentView.$.is(':focus') ) {
18 - if ( _this.anchorNode !== null
19 - || _this.anchorOffset !== null
20 - || _this.focusNode !== null
21 - || _this.focusOffset !== null ) {
22 - _this.anchorNode = _this.anchorOffset = _this.focusNode = _this.focusOffset = null;
23 - _this.emit( 'change', null )
 18+ if (
 19+ _this.anchorNode !== null ||
 20+ _this.anchorOffset !== null ||
 21+ _this.focusNode !== null ||
 22+ _this.focusOffset !== null
 23+ ) {
 24+ _this.anchorNode = _this.anchorOffset = _this.focusNode = _this.focusOffset = null;
 25+ _this.emit( 'change', null );
2426 }
2527 } else {
2628 var rangySel = rangy.getSelection(),
2729 range;
28 - if ( rangySel.anchorNode !== _this.anchorNode
29 - || rangySel.anchorOffset !== _this.anchorOffset
30 - || rangySel.focusNode !== _this.focusNode
31 - || rangySel.focusOffset !== _this.focusOffset ) {
 30+ if ( rangySel.anchorNode !== _this.anchorNode ||
 31+ rangySel.anchorOffset !== _this.anchorOffset ||
 32+ rangySel.focusNode !== _this.focusNode ||
 33+ rangySel.focusOffset !== _this.focusOffset
 34+ ) {
3235 _this.anchorNode = rangySel.anchorNode;
3336 _this.anchorOffset = rangySel.anchorOffset;
3437 _this.focusNode = rangySel.focusNode;
@@ -41,7 +44,7 @@
4245 _this.getOffset( _this.focusNode, _this.focusOffset )
4346 );
4447 }
45 - _this.emit( 'change', range )
 48+ _this.emit( 'change', range );
4649 }
4750 }
4851 }, 0 );
@@ -92,4 +95,4 @@
9396
9497 /* Inheritance */
9598
96 -ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter );
\ No newline at end of file
 99+ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter );
Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js
@@ -163,7 +163,9 @@
164164 sel = rangy.getSelection(),
165165 key = sel.getRangeAt(0).toString().replace( /\s/gm, '' );
166166
167 - _this.clipboard[key] = ve.copyArray( _this.documentView.model.getData( _this.getSelectionRange() ) );
 167+ _this.clipboard[key] = ve.copyArray(
 168+ _this.documentView.model.getData( _this.getSelectionRange() )
 169+ );
168170
169171 if ( event.type == 'cut' ) {
170172 setTimeout( function() {
Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js
@@ -104,8 +104,7 @@
105105 '\'': ''',
106106 '"': '"',
107107 '\n': '<span class="es-contentView-whitespace">&#182;</span>',
108 - '\t': '<span class="es-contentView-whitespace">&#8702;</span>',
109 - //' ': '&nbsp;'
 108+ '\t': '<span class="es-contentView-whitespace">&#8702;</span>'
110109 };
111110
112111 /* Static Methods */
@@ -248,8 +247,8 @@
249248 view = view.parent;
250249 }
251250 return view.surfaceView;
252 -}
 251+};
253252
254253 /* Inheritance */
255254
256 -ve.extendClass( ve.ce.Content, ve.EventEmitter );
\ No newline at end of file
 255+ve.extendClass( ve.ce.Content, ve.EventEmitter );

Status & tagging log