Index: trunk/extensions/SemanticForms/libs/SF_autoedit.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | * @author Stephan Gambke |
6 | 6 | */ |
7 | 7 | |
8 | | -jQuery(function($){ |
| 8 | +jQuery( function( $ ) { |
9 | 9 | |
10 | 10 | $('.autoedit-trigger').click(function(){ |
11 | 11 | |
Index: trunk/extensions/SemanticForms/libs/SF_submit.js |
— | — | @@ -2,12 +2,12 @@ |
3 | 3 | * Javascript handler for the save-and-continue button |
4 | 4 | */ |
5 | 5 | |
6 | | -jQuery(function($){ |
| 6 | +jQuery( function( $ ) { |
7 | 7 | |
8 | 8 | var sacButtons; |
9 | 9 | var form; |
10 | 10 | |
11 | | - if ( mw.config.get( 'wgAction' ) == "formedit" || mw.config.get( 'wgCanonicalSpecialPageName' ) == "FormEdit" ) { |
| 11 | + if ( mw.config.get( 'wgAction' ) === "formedit" || mw.config.get( 'wgCanonicalSpecialPageName' ) === "FormEdit" ) { |
12 | 12 | |
13 | 13 | form = $('#sfForm'); |
14 | 14 | |
— | — | @@ -30,11 +30,9 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | function setChanged( event ) { |
34 | | - |
35 | | - sacButtons.removeAttr("disabled"); |
36 | | - |
37 | 34 | sacButtons |
38 | | - .addClass("sf-save_and_continue-changed"); |
| 35 | + .removeAttr("disabled"); |
| 36 | + .addClass("sf-save_and_continue-changed"); |
39 | 37 | |
40 | 38 | return true; |
41 | 39 | } |
Index: trunk/extensions/SemanticForms/libs/SF_imagePreview.js |
— | — | @@ -69,4 +69,4 @@ |
70 | 70 | } ); |
71 | 71 | } ); |
72 | 72 | |
73 | | -})( window.jQuery ); |
| 73 | +})( jQuery ); |
Index: trunk/extensions/SemanticForms/libs/SF_ajax_form_preview.js |
— | — | @@ -253,10 +253,6 @@ |
254 | 254 | } |
255 | 255 | } |
256 | 256 | |
257 | | -if (mw.config.get( 'wgAction' )=='formedit' || mw.config.get( 'wgCanonicalSpecialPageName' ) == 'FormEdit') { |
258 | | - if ( typeof( addOnloadHook ) != 'undefined' ) addOnloadHook(ajaxFormPreviewInit); |
259 | | - else if ( typeof( jQuery ) != 'undefined' ) jQuery(function(){ |
260 | | - ajaxFormPreviewInit() |
261 | | - }); |
262 | | -// else sorry, no Ajax preview for you |
| 257 | +if ( mw.config.get( 'wgAction' ) ==='formedit' || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'FormEdit' ) { |
| 258 | + jQuery( ajaxFormPreviewInit ); |
263 | 259 | } |
Index: trunk/extensions/SemanticForms/libs/SF_autogrow.js |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | * @author Yaron Koren |
14 | 14 | */ |
15 | 15 | |
16 | | -var autoGrowColsDefault = new Array(); |
17 | | -var autoGrowRowsDefault = new Array(); |
| 16 | +var autoGrowColsDefault = []; |
| 17 | +var autoGrowRowsDefault = []; |
18 | 18 | |
19 | 19 | function autoGrowSetDefaultValues(textArea) { |
20 | 20 | var id = textArea.id |
Index: trunk/extensions/SemanticForms/libs/SF_popupform.js |
— | — | @@ -6,31 +6,31 @@ |
7 | 7 | */ |
8 | 8 | |
9 | 9 | // initialise |
10 | | -jQuery(function(){ |
| 10 | +jQuery( function( $ ) { |
11 | 11 | |
12 | 12 | // register eventhandlers on 'edit' links and buttons |
13 | 13 | |
14 | 14 | // register formlink with link |
15 | | - jQuery('a.popupformlink').click(function(evt){ |
| 15 | + $('a.popupformlink').click(function(evt){ |
16 | 16 | return ext.popupform.handlePopupFormLink( this.getAttribute('href'), this ); |
17 | 17 | }); |
18 | 18 | |
19 | 19 | // register formlink with button |
20 | | - jQuery( 'form.popupformlink' ).submit(function(evt){ |
| 20 | + $( 'form.popupformlink' ).submit(function(evt){ |
21 | 21 | return ext.popupform.handlePopupFormLink( this.getAttribute( 'action' ), this ); |
22 | 22 | }); |
23 | 23 | |
24 | 24 | |
25 | 25 | // register forminput |
26 | | - jQuery( 'form.popupforminput' ).submit(function(evt){ |
| 26 | + $( 'form.popupforminput' ).submit(function(evt){ |
27 | 27 | return ext.popupform.handlePopupFormInput( this.getAttribute( 'action' ), this ); |
28 | 28 | }); |
29 | 29 | |
30 | 30 | }); |
31 | 31 | |
32 | 32 | // create ext if it does not exist yet |
33 | | -if ( typeof( window[ 'ext' ] ) == "undefined" ) { |
34 | | - window[ 'ext' ] = {}; |
| 33 | +if ( typeof( window.ext' ) === "undefined" ) { |
| 34 | + window.ext = {}; |
35 | 35 | } |
36 | 36 | |
37 | 37 | window.ext.popupform = new function() { |
Index: trunk/extensions/SemanticForms/libs/SF_wikieditor.js |
— | — | @@ -1,12 +1,12 @@ |
2 | 2 | // create ext if it does not exist yet |
3 | | -if ( typeof( window[ 'ext' ] ) == "undefined" ) { |
4 | | - window[ 'ext' ] = {}; |
| 3 | +if ( typeof( window.ext' ) === "undefined" ) { |
| 4 | + window.ext = {}; |
5 | 5 | } |
6 | 6 | |
7 | 7 | window.ext.wikieditor = new function(){ |
8 | 8 | |
9 | 9 | // initialize the wikieditor on the specified element |
10 | | - this.init = function init ( input_id, params ) { |
| 10 | + this.init = function init ( input_id, params ) { |
11 | 11 | |
12 | 12 | if ( window.mediaWiki ) { |
13 | 13 | mediaWiki.loader.using( 'ext.semanticforms.wikieditor', function(){ |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | var input = jQuery( '#' + input_id ); |
16 | 16 | |
17 | 17 | // load toolbar |
18 | | - mediaWiki.loader.using( ['jquery.wikiEditor.toolbar', 'jquery.wikiEditor.toolbar.config'] , function(){ |
| 18 | + mediaWiki.loader.using( ['jquery.wikiEditor.toolbar', 'jquery.wikiEditor.toolbar.config'] , function(){ |
19 | 19 | if ( jQuery.wikiEditor.isSupported( jQuery.wikiEditor.modules.toolbar ) ) { |
20 | 20 | |
21 | 21 | input.wikiEditor( 'addModule', jQuery.wikiEditor.modules.toolbar.config.getDefaultConfig() ); |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | }); |
34 | 34 | |
35 | 35 | // load dialogs |
36 | | - mediaWiki.loader.using( ['jquery.wikiEditor.dialogs', 'jquery.wikiEditor.dialogs.config'] , function(){ |
| 36 | + mediaWiki.loader.using( ['jquery.wikiEditor.dialogs', 'jquery.wikiEditor.dialogs.config'] , function(){ |
37 | 37 | if ( jQuery.wikiEditor.isSupported( jQuery.wikiEditor.modules.dialogs ) ) { |
38 | 38 | |
39 | 39 | jQuery.wikiEditor.modules.dialogs.config.replaceIcons( input ); |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | |
45 | 45 | // load toc |
46 | 46 | // TODO: Can this be enabled? Should it? |
47 | | -// mediaWiki.loader.using( ['jquery.wikiEditor.toc' ] , function(){ |
| 47 | +// mediaWiki.loader.using( ['jquery.wikiEditor.toc' ] , function(){ |
48 | 48 | // if ( jQuery.wikiEditor.isSupported( jQuery.wikiEditor.modules.toc ) ) { |
49 | 49 | // |
50 | 50 | // input.wikiEditor( 'addModule', 'toc' ); |