diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2016-12-13 18:40:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 18:40:47 +0300 |
commit | bce2acd2c50d708cc080980787101c19c749da6c (patch) | |
tree | f69b9fc00479cdc19ba16d1ae0d657ac3ddd92f6 /interface/js/rspamd.js | |
parent | 634a8b69dd407a79ca2fae32493710985bffa32c (diff) | |
download | rspamd-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.js | 12 |
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); } |