jenkins-bot has submitted this change and it was merged.

Change subject: Use .prop() instead of .attr()/.removeAttr() for boolean HTML 
attributes
......................................................................


Use .prop() instead of .attr()/.removeAttr() for boolean HTML attributes

https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Pitfalls

Create elements according to
https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Creating_elements

Change-Id: I14a7f6e8d2c0a43b89d0d186398a4fea76b7d362
---
M modules/jquery.wikiEditor.dialogs.config.js
M modules/jquery.wikiEditor.toolbar.js
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  TheDJ: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/jquery.wikiEditor.dialogs.config.js 
b/modules/jquery.wikiEditor.dialogs.config.js
index 406c674..304b13c 100644
--- a/modules/jquery.wikiEditor.dialogs.config.js
+++ b/modules/jquery.wikiEditor.dialogs.config.js
@@ -127,11 +127,11 @@
                                                }
                                                if ( status === 'invalid' ) {
                                                        $( '.ui-dialog:visible 
.ui-dialog-buttonpane button:first' )
-                                                               .attr( 
'disabled', true )
+                                                               .prop( 
'disabled', true )
                                                                .addClass( 
'disabled' );
                                                } else {
                                                        $( '.ui-dialog:visible 
.ui-dialog-buttonpane button:first' )
-                                                               .removeAttr( 
'disabled' )
+                                                               .prop( 
'disabled', false )
                                                                .removeClass( 
'disabled' );
                                                }
                                        }
@@ -505,7 +505,7 @@
                                                        // Blank form
                                                        $( 
'#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ).val( 
'' );
                                                        $( 
'#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext' )
-                                                               .attr( 
'checked', '' );
+                                                               .prop( 
'checked', false );
                                                },
                                                
'wikieditor-toolbar-tool-link-cancel': function () {
                                                        // Clear any saved 
selection state
diff --git a/modules/jquery.wikiEditor.toolbar.js 
b/modules/jquery.wikiEditor.toolbar.js
index 4227bc5..0bcbec1 100644
--- a/modules/jquery.wikiEditor.toolbar.js
+++ b/modules/jquery.wikiEditor.toolbar.js
@@ -278,7 +278,7 @@
                        var $group = $( '<div>' ).attr( { 'class': 'group 
group-' + id, rel: id } );
                        var label = $.wikiEditor.autoMsg( group, 'label' );
                        if ( label ) {
-                               var $label = $( '<span />' )
+                               var $label = $( '<span>' )
                                        .addClass( 'label' )
                                        .html( label );
                                $group.append( $label );

-- 
To view, visit https://gerrit.wikimedia.org/r/268944
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I14a7f6e8d2c0a43b89d0d186398a4fea76b7d362
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to