Viewing File: /usr/local/cpanel/base/frontend/jupiter/mail/spam/views/spamBox.min.js

define(["angular","cjt/util/locale","app/services/spamAssassin","cjt/directives/toggleSwitchDirective","cjt/directives/actionButtonDirective"],(function(e,n){"use strict";return e.module("cpanel.apacheSpamAssassin").controller("spamBox",["$scope","spamAssassin",function(t,r){var o=r.enableSpamBox,s=r.disableSpamBox,i=!1;function l(){if(!i)return i=!0,r.getSpamBoxSize().then((function(e){t.folderSizeString=n.format_bytes(e),t.folderSize=e}),(function(){i=!1}))}e.extend(t,{toggleEnable:function(){return t.settings.spam_box_enabled?s():o()},showConfirmClearAll:!1,folderSize:0,clearFolder:function(){return r.clearSpamBoxFolder().then((function(){return i=!1,l()}))},clearAllSpamBoxFolders:function(){return r.clearAllSpamBoxFolders().then((function(){return i=!1,l()})).finally((function(){t.showConfirmClearAll=!1}))},settings:r.spamAssassinSettings,preferences:r.userPreferences,toggleConfirmDeleteAll:function(){t.showConfirmClearAll=!t.showConfirmClearAll}}),t.$watch("settings.spam_box_enabled",(function(){t.settings.spam_box_enabled&&l()}))}])}));
Back to Directory File Manager