r101649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101648‎ | r101649 | r101650 >
Date:18:19, 2 November 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Using new on/off instead of bind/unbind|live/die - jQuery 1.7 people, get with the times!
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/hype/views/es.SurfaceView.js
@@ -39,7 +39,7 @@
4040 $document = $( document );
4141
4242 // MouseDown on surface
43 - this.$.bind( {
 43+ this.$.on( {
4444 'mousedown' : function(e) {
4545 return surfaceView.onMouseDown( e );
4646 }
@@ -48,11 +48,11 @@
4949 // Hidden input
5050 this.$input = $( '<input class="editSurface-input" />' )
5151 .prependTo( this.$ )
52 - .bind( {
 52+ .on( {
5353 'focus' : function() {
5454 //console.log("focus");
55 - $document.unbind( '.editSurface' );
56 - $document.bind({
 55+ $document.off( '.editSurface' );
 56+ $document.on({
5757 'mousemove.editSurface' : function(e) {
5858 //return surfaceView.onMouseMove( e );
5959 },
@@ -69,7 +69,7 @@
7070 },
7171 'blur': function( e ) {
7272 //console.log("blur");
73 - $document.unbind( '.editSurface' );
 73+ $document.off( '.editSurface' );
7474 surfaceView.hideCursor();
7575 }
7676 } ).focus();

Status & tagging log