Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371017 )

Change subject: Use prop instead of removeAttr
......................................................................

Use prop instead of removeAttr

Change-Id: Ie272357a6ba7929ca4cfd410640bdc9adea18971
---
M modules/collection.js
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/17/371017/1

diff --git a/modules/collection.js b/modules/collection.js
index f63971e..b36d51a 100644
--- a/modules/collection.js
+++ b/modules/collection.js
@@ -165,30 +165,30 @@
 
        function update_buttons() {
                if ( $( '#collectionList .article' ).length === 0 ) {
-                       $( '#saveButton, #downloadButton, input.order' ).attr( 
'disabled', 'disabled' );
+                       $( '#saveButton, #downloadButton, input.order' ).prop( 
'disabled', true );
                        return;
                } else {
-                       $( '#downloadButton, input.order' ).removeAttr( 
'disabled' );
+                       $( '#downloadButton, input.order' ).prop( 'disabled', 
false );
                }
                if ( !$( '#saveButton' ).length ) {
                        return;
                }
                if ( !$( '#communityCollTitle' ).length || $( 
'#personalCollType:checked' ).val() ) {
-                       $( '#personalCollTitle' ).removeAttr( 'disabled' );
-                       $( '#communityCollTitle' ).attr( 'disabled', 'disabled' 
);
+                       $( '#personalCollTitle' ).prop( 'disabled', false );
+                       $( '#communityCollTitle' ).prop( 'disabled', true );
                        if ( !$.trim( $( '#personalCollTitle' ).val() ) ) {
-                               $( '#saveButton' ).attr( 'disabled', 'disabled' 
);
+                               $( '#saveButton' ).prop( 'disabled', true );
                                return;
                        }
                } else if ( !$( '#personalCollTitle' ).length || $( 
'#communityCollType:checked' ).val() ) {
-                       $( '#communityCollTitle' ).removeAttr( 'disabled' );
-                       $( '#personalCollTitle' ).attr( 'disabled', 'disabled' 
);
+                       $( '#communityCollTitle' ).prop( 'disabled', false );
+                       $( '#personalCollTitle' ).prop( 'disabled', true );
                        if ( !$.trim( $( '#communityCollTitle' ).val() ) ) {
-                               $( '#saveButton' ).attr( 'disabled', 'disabled' 
);
+                               $( '#saveButton' ).prop( 'disabled', true );
                                return;
                        }
                }
-               $( '#saveButton' ).removeAttr( 'disabled' );
+               $( '#saveButton' ).prop( 'disabled', false );
        }
 
        function make_sortable() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie272357a6ba7929ca4cfd410640bdc9adea18971
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <kren...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to