[buddypress-trac] [BuddyPress Trac] #5513: Bulk Notifications Management
buddypress-trac
noreply at wordpress.org
Wed Nov 12 18:38:08 UTC 2014
#5513: Bulk Notifications Management
---------------------------+---------------------------
Reporter: colabsadmin | Owner: boonebgorges
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.2
Component: Notifications | Version: 2.0
Severity: normal | Resolution:
Keywords: needs-patch |
---------------------------+---------------------------
Comment (by hnla):
@lakrisgubben
looking at that JS was wondering whether we shouldn't just default the
submit to disabled then remove on change of select value and back again if
selection reverted then style on the attr 'disabled to remove background,
cursor, opacity etc; so something like:
{{{
/* Make sure a 'Bulk Action' is choosed before submiting the form
*/
jq('#notification-bulk-manage').attr('disabled', 'disabled');
/* Remove the disabled attribute from the form submit button when
bulk action has a value */
jq('#notification-select').on('change', function(){
if ( jq(this).val() !== '' ) {
jq('#notification-bulk-manage').removeAttr('disabled');
}else {
jq('#notification-bulk-manage').attr('disabled', 'disabled');
}
});
}}}
Something like that with perhaps a more elegant or stronger approach using
? .toggle
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5513#comment:27>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list