r105694 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105693‎ | r105694 | r105695 >
Date:19:01, 9 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Moved $form to es.Inspector and added submit -> close handler
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/bases/es.Inspector.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/es/inspectors/es.LinkInspector.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/inspectors/es.LinkInspector.js
@@ -12,7 +12,6 @@
1313 // Properties
1414 this.$clearButton = $( '<div class="es-inspector-clearButton"></div>' ).prependTo( this.$ );
1515 this.$.prepend( '<div class="es-inspector-title">Link inspector</div>' );
16 - this.$form = $( '<form></form>' ).appendTo( this.$ );
1716 this.$locationLabel = $( '<label>Page title</label>' ).appendTo( this.$form );
1817 this.$locationInput = $( '<input type="text">' ).appendTo( this.$form );
1918
Index: trunk/extensions/VisualEditor/modules/es/bases/es.Inspector.js
@@ -18,12 +18,18 @@
1919 this.context = context;
2020 this.$ = $( '<div class="es-inspector"></div>' );
2121 this.$closeButton = $( '<div class="es-inspector-closeButton"></div>' ).appendTo( this.$ );
 22+ this.$form = $( '<form></form>' ).appendTo( this.$ );
2223
2324 // Events
2425 var _this = this;
2526 this.$closeButton.click( function() {
2627 _this.context.closeInspector();
2728 } );
 29+ this.$form.submit( function( e ) {
 30+ _this.context.closeInspector();
 31+ e.preventDefault();
 32+ return false;
 33+ } );
2834 };
2935
3036 /* Methods */

Status & tagging log