aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/rspamd.js
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2016-12-13 18:40:47 +0300
committerGitHub <noreply@github.com>2016-12-13 18:40:47 +0300
commitbce2acd2c50d708cc080980787101c19c749da6c (patch)
treef69b9fc00479cdc19ba16d1ae0d657ac3ddd92f6 /interface/js/rspamd.js
parent634a8b69dd407a79ca2fae32493710985bffa32c (diff)
downloadrspamd-bce2acd2c50d708cc080980787101c19c749da6c.tar.gz
rspamd-bce2acd2c50d708cc080980787101c19c749da6c.zip
[WebUI] Hide learning tab in read-only mode
Diffstat (limited to 'interface/js/rspamd.js')
-rw-r--r--interface/js/rspamd.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js
index 223933473..5831e49c5 100644
--- a/interface/js/rspamd.js
+++ b/interface/js/rspamd.js
@@ -1189,15 +1189,13 @@
}
if (data.read_only) {
read_only = true;
- $('#learning_nav').parent().addClass('disabled');
- $('#learning_nav').removeAttr('data-toggle', 'tab');
+ $('#learning_nav').hide();
$('#resetHistory').attr('disabled', true);
$('#errors-history').hide();
}
else {
read_only = false;
- $('#learning_nav').parent().removeClass('disabled');
- $('#learning_nav').attr('data-toggle', 'tab');
+ $('#learning_nav').show();
$('#resetHistory').removeAttr('disabled', true);
}
displayUI();
@@ -1234,15 +1232,13 @@
} else {
if (data.read_only) {
read_only = true;
- $('#learning_nav').parent().addClass('disabled');
- $('#learning_nav').removeAttr('data-toggle', 'tab');
+ $('#learning_nav').hide();
$('#resetHistory').attr('disabled', true);
$('#errors-history').hide();
}
else {
read_only = false;
- $('#learning_nav').parent().removeClass('disabled')
- $('#learning_nav').attr('data-toggle', 'tab');
+ $('#learning_nav').show();
$('#resetHistory').removeAttr('disabled', true);
}