Prevent browser tooltip from appearing

Bootstrap JS was clearing the `title` attribute, but then Mithril was redrawing and filling it back in.
This commit is contained in:
Toby Zerner 2015-11-03 17:41:31 +10:30
parent 8785baf1a1
commit 18f1960481

View File

@ -63,14 +63,16 @@ export default class SubscriptionMenu extends Component {
const notifyAlert = preferences['notify_newPost_alert']; const notifyAlert = preferences['notify_newPost_alert'];
if ((notifyEmail || notifyAlert) && subscription === false) { if ((notifyEmail || notifyAlert) && subscription === false) {
buttonProps.title = app.translator.trans(notifyEmail buttonProps.config = element => {
? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' $(element).tooltip({
: 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'); container: '.SubscriptionMenu',
buttonProps.config = element => $(element).tooltip({ placement: 'bottom',
container: '.SubscriptionMenu', delay: 250,
placement: 'bottom', title: app.translator.trans(notifyEmail
delay: 250 ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip'
}); : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip')
});
}
} else { } else {
buttonProps.config = element => $(element).tooltip('destroy'); buttonProps.config = element => $(element).tooltip('destroy');
} }