r98982 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98981‎ | r98982 | r98983 >
Date:06:30, 5 October 2011
Author:tstarling
Status:ok (Comments)
Tags:
Comment:
(bug 31360) Use removeAttr('disabled') instead of attr('disabled', ''). Console testing indicates that the latter doesn't work with the version of jQuery deployed with MW 1.18, at least for some browsers. It is possible to remove attributes with attr('disabled', null), but this is undocumented so removeAttr() is better.
Modified paths:
  • /trunk/extensions/Collection/js/collection.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/js/collection.js
@@ -151,8 +151,8 @@
152152 $('input.order').attr('disabled', 'disabled');
153153 return;
154154 } else {
155 - $('#downloadButton').attr('disabled', '');
156 - $('input.order').attr('disabled', '');
 155+ $('#downloadButton').removeAttr('disabled');
 156+ $('input.order').removeAttr('disabled');
157157 }
158158 if (!$('#saveButton').length) {
159159 return;
@@ -165,14 +165,14 @@
166166 return;
167167 }
168168 } else if (!$('#personalCollTitle').length || $('#communityCollType:checked').val()) {
169 - $('#communityCollTitle').attr('disabled', '');
 169+ $('#communityCollTitle').removeAttr('disabled');
170170 $('#personalCollTitle').attr('disabled', 'disabled');
171171 if (!$.trim($('#communityCollTitle').val())) {
172172 $('#saveButton').attr('disabled', 'disabled');
173173 return;
174174 }
175175 }
176 - $('#saveButton').attr('disabled', '');
 176+ $('#saveButton').removeAttr('disabled');
177177 }
178178
179179 function make_sortable() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r98983MFT r98982: fix disabled download buttonststarling06:32, 5 October 2011
r100383REL1_18 MFT r97886, r97899, r97969, r98179, r98497, r98654, r98773, r98801, r...reedy21:36, 20 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75348fix for enabling/disabling buttons for collections w/ chapter(s) onlyjojo11:11, 25 October 2010

Comments

#Comment by G.Hagedorn (talk | contribs)   12:44, 5 October 2011

has been applied to 1.18wmf1, perhaps tag for 1.18 as well?

#Comment by Catrope (talk | contribs)   12:51, 5 October 2011

Tagged

Status & tagging log