aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/rspamd.js
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-13 17:49:12 +0000
committerGitHub <noreply@github.com>2016-12-13 17:49:12 +0000
commitc5c33ded60fc05166f2f9cea94290eca3148edd1 (patch)
treefdbfc509568cdc1e64cd61f7e37fc22bb982ae96 /interface/js/rspamd.js
parentab0175131d67df8735f48dd86f6875cdaf3ed3c5 (diff)
parentbce2acd2c50d708cc080980787101c19c749da6c (diff)
downloadrspamd-c5c33ded60fc05166f2f9cea94290eca3148edd1.tar.gz
rspamd-c5c33ded60fc05166f2f9cea94290eca3148edd1.zip
Merge pull request #1258 from moisseev/patch-1
[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 742302bd7..fcc63f809 100644
--- a/interface/js/rspamd.js
+++ b/interface/js/rspamd.js
@@ -1185,15 +1185,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();
@@ -1230,15 +1228,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);
}