Merge pull request #3386 from ashleytqy/trusted-widget-edits

Adding description for 'Trusted' widgets
This commit is contained in:
Min RK 2018-03-01 11:09:06 +01:00 committed by GitHub
commit e9da502dd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,12 +394,17 @@ define([
// Notebook trust events
this.events.on('trust_changed.Notebook', function (event, trusted) {
if (trusted) {
tnw.set_message(i18n.msg._("Trusted"));
tnw.set_message(i18n.msg._("Trusted"), undefined, function() {
return false;
}, {'title':'Javascript enabled for notebook display'});
// don't allow 'Trusted' button to be clicked
$(tnw.selector).attr('disabled', true)
$(tnw.selector).css('cursor', 'help');
} else {
tnw.set_message(i18n.msg._("Not Trusted"), undefined, function() {
that.notebook.trust_notebook();
return false;
});
}, {'title':'Javascript disabled for notebook display'});
}
});
};