r91787 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91786‎ | r91787 | r91788 >
Date:15:13, 9 July 2011
Author:salvatoreingala
Status:deferred
Tags:
Comment:
Fixing bug in 'intro' fields (it didn't work if it contained a message).
Modified paths:
  • /branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.js (modified) (history)

Diff [purge]

Index: branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.js
@@ -534,11 +534,15 @@
535535 }
536536
537537 var $form = $( '<form/>' ).addClass( 'formbuilder' );
 538+ var prefix = options.gadget === undefined ? '' : ( 'Gadget-' + options.gadget + '-' );
 539+ $form.data( 'formBuilder', {
 540+ prefix: prefix, //prefix for messages
 541+ } );
538542
539543 //If there is an "intro", adds it to the form as a label
540544 if ( typeof description.intro == 'string' ) {
541545 $( '<p/>' )
542 - .text( preproc( this.$form, description.intro ) )
 546+ .text( preproc( $form, description.intro ) )
543547 .addClass( 'formBuilder-intro' )
544548 .appendTo( $form );
545549 }
@@ -548,11 +552,6 @@
549553 return null;
550554 }
551555
552 - var prefix = options.gadget === undefined ? '' : ( 'Gadget-' + options.gadget + '-' );
553 - $form.data( 'formBuilder', {
554 - prefix: prefix, //prefix for messages
555 - } );
556 -
557556 var fields = [];
558557
559558 var settings = {}; //validator settings

Status & tagging log