https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113538

Revision: 113538
Author:   tparscal
Date:     2012-03-09 22:51:00 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
More cleanup (jshint complaints)

Modified Paths:
--------------
    trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js
    trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js
    trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js

Modified: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js
===================================================================
--- trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js        
2012-03-09 22:45:22 UTC (rev 113537)
+++ trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js        
2012-03-09 22:51:00 UTC (rev 113538)
@@ -104,8 +104,7 @@
        '\'': ''',
        '"': '"',
        '\n': '<span class="es-contentView-whitespace">&#182;</span>',
-       '\t': '<span class="es-contentView-whitespace">&#8702;</span>',
-       //' ': '&nbsp;'
+       '\t': '<span class="es-contentView-whitespace">&#8702;</span>'
 };
 
 /* Static Methods */
@@ -248,8 +247,8 @@
                view = view.parent;
        }
        return view.surfaceView;
-}
+};
 
 /* Inheritance */
 
-ve.extendClass( ve.ce.Content, ve.EventEmitter );
\ No newline at end of file
+ve.extendClass( ve.ce.Content, ve.EventEmitter );

Modified: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js
===================================================================
--- trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js 
2012-03-09 22:45:22 UTC (rev 113537)
+++ trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js 
2012-03-09 22:51:00 UTC (rev 113538)
@@ -14,20 +14,23 @@
 
        setTimeout( function() {
                if ( !_this.documentView.$.is(':focus') ) {
-                       if ( _this.anchorNode !== null
-                                       || _this.anchorOffset !== null
-                                       || _this.focusNode !== null
-                                       || _this.focusOffset !== null ) {
-                               _this.anchorNode = _this.anchorOffset = 
_this.focusNode = _this.focusOffset = null;                     
-                               _this.emit( 'change', null )
+                       if (
+                               _this.anchorNode !== null ||
+                               _this.anchorOffset !== null ||
+                               _this.focusNode !== null ||
+                               _this.focusOffset !== null
+                       ) {
+                               _this.anchorNode = _this.anchorOffset = 
_this.focusNode = _this.focusOffset = null;
+                               _this.emit( 'change', null );
                        }
                } else {
                        var     rangySel = rangy.getSelection(),
                                range;
-                       if ( rangySel.anchorNode !== _this.anchorNode
-                                       || rangySel.anchorOffset !== 
_this.anchorOffset
-                                       || rangySel.focusNode !== 
_this.focusNode
-                                       || rangySel.focusOffset !== 
_this.focusOffset ) {
+                       if ( rangySel.anchorNode !== _this.anchorNode ||
+                               rangySel.anchorOffset !== _this.anchorOffset ||
+                               rangySel.focusNode !== _this.focusNode ||
+                               rangySel.focusOffset !== _this.focusOffset
+                       ) {
                                _this.anchorNode = rangySel.anchorNode;
                                _this.anchorOffset = rangySel.anchorOffset;
                                _this.focusNode = rangySel.focusNode;
@@ -41,7 +44,7 @@
                                                _this.getOffset( 
_this.focusNode, _this.focusOffset )
                                        );
                                }
-                               _this.emit( 'change', range )
+                               _this.emit( 'change', range );
                        }
                }
        }, 0 );
@@ -92,4 +95,4 @@
 
 /* Inheritance */
 
-ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter );
\ No newline at end of file
+ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter );

Modified: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js
===================================================================
--- trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js        
2012-03-09 22:45:22 UTC (rev 113537)
+++ trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js        
2012-03-09 22:51:00 UTC (rev 113538)
@@ -163,7 +163,9 @@
                sel = rangy.getSelection(),
                key = sel.getRangeAt(0).toString().replace( /\s/gm, '' );
 
-       _this.clipboard[key] = ve.copyArray( _this.documentView.model.getData( 
_this.getSelectionRange() ) );
+       _this.clipboard[key] = ve.copyArray(
+               _this.documentView.model.getData( _this.getSelectionRange() )
+       );
 
        if ( event.type == 'cut' ) {
                setTimeout( function() {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to