r54300 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54299‎ | r54300 | r54301 >
Date:19:16, 3 August 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed bug that broke select tools.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/jquery.wikiEditor.js
@@ -90,18 +90,19 @@
9191 addSection: function( $section, section, sectionId ) {
9292 /**
9393 * Wraps performAction with tool specific UI interaction
94 - * @param {Object} tool
95 - * @param {Object} element
9694 */
9795 var useTool = function() {
9896 var tool = $(this).data( 'tool' );
99 - if ( 'type' in tool && 'action' in tool ) {
 97+ if ( 'type' in tool ) {
 98+ console.log( tool.type );
10099 switch ( tool.type ) {
101100 case 'button':
102101 case 'link':
103 - context.modules.toolbar.performAction(
104 - tool.action
105 - );
 102+ if ( 'action' in tool ) {
 103+ context.modules.toolbar.performAction(
 104+ tool.action
 105+ );
 106+ }
106107 break;
107108 case 'select':
108109 if ( 'list' in tool && $(this).val() in tool.list ) {

Status & tagging log