From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- resources/mediawiki/mediawiki.htmlform.js | 128 ------------------------------ 1 file changed, 128 deletions(-) delete mode 100644 resources/mediawiki/mediawiki.htmlform.js (limited to 'resources/mediawiki/mediawiki.htmlform.js') diff --git a/resources/mediawiki/mediawiki.htmlform.js b/resources/mediawiki/mediawiki.htmlform.js deleted file mode 100644 index de068598..00000000 --- a/resources/mediawiki/mediawiki.htmlform.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Utility functions for jazzing up HTMLForm elements. - */ -( function ( mw, $ ) { - - /** - * jQuery plugin to fade or snap to visible state. - * - * @param {boolean} instantToggle [optional] - * @return {jQuery} - */ - $.fn.goIn = function ( instantToggle ) { - if ( instantToggle === true ) { - return $(this).show(); - } - return $(this).stop( true, true ).fadeIn(); - }; - - /** - * jQuery plugin to fade or snap to hiding state. - * - * @param {boolean} instantToggle [optional] - * @return jQuery - */ - $.fn.goOut = function ( instantToggle ) { - if ( instantToggle === true ) { - return $(this).hide(); - } - return $(this).stop( true, true ).fadeOut(); - }; - - /** - * Bind a function to the jQuery object via live(), and also immediately trigger - * the function on the objects with an 'instant' parameter set to true. - * @param {Function} callback Takes one parameter, which is {true} when the - * event is called immediately, and {jQuery.Event} when triggered from an event. - */ - $.fn.liveAndTestAtStart = function ( callback ){ - $(this) - .live( 'change', callback ) - .each( function () { - callback.call( this, true ); - } ); - }; - - $( function () { - - // Animate the SelectOrOther fields, to only show the text field when - // 'other' is selected. - $( '.mw-htmlform-select-or-other' ).liveAndTestAtStart( function ( instant ) { - var $other = $( '#' + $(this).attr( 'id' ) + '-other' ); - $other = $other.add( $other.siblings( 'br' ) ); - if ( $(this).val() === 'other' ) { - $other.goIn( instant ); - } else { - $other.goOut( instant ); - } - }); - - } ); - - function addMulti( $oldContainer, $container ) { - var name = $oldContainer.find( 'input:first-child' ).attr( 'name' ), - oldClass = ( ' ' + $oldContainer.attr( 'class' ) + ' ' ).replace( /(mw-htmlform-field-HTMLMultiSelectField|mw-chosen)/g, '' ), - $select = $( '