sogo/UI/WebServerResources/js/Preferences.js

2 lines
11 KiB
JavaScript
Raw Normal View History

!function(){"use strict";function configure($stateProvider,$urlRouterProvider){$stateProvider.state("preferences",{"abstract":!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}},resolve:{statePreferences:statePreferences}}).state("preferences.general",{url:"/general",views:{module:{templateUrl:"generalPreferences.html"}}}).state("preferences.calendars",{url:"/calendars",views:{module:{templateUrl:"calendarsPreferences.html"}}}).state("preferences.addressbooks",{url:"/addressbooks",views:{module:{templateUrl:"addressbooksPreferences.html"}}}).state("preferences.mailer",{url:"/mailer",views:{module:{templateUrl:"mailerPreferences.html"}}}),$urlRouterProvider.otherwise("/general")}function statePreferences(Preferences){return Preferences}function runBlock($rootScope){$rootScope.$on("$routeChangeError",function(event,current,previous,rejection){console.error(event,current,previous,rejection)})}angular.module("SOGo.PreferencesUI",["ngSanitize","ui.router","ck","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication"]).config(configure).run(runBlock),configure.$inject=["$stateProvider","$urlRouterProvider"],statePreferences.$inject=["Preferences"],runBlock.$inject=["$rootScope"]}(),function(){"use strict";function AccountDialogController($mdDialog,defaults,account,accountId,mailCustomFromEnabled){function customFromIsReadonly(){return accountId>0?!1:!mailCustomFromEnabled}function cancel(){$mdDialog.cancel()}function save(){$mdDialog.hide()}var vm=this;vm.defaults=defaults,vm.account=account,vm.accountId=accountId,vm.customFromIsReadonly=customFromIsReadonly,vm.cancel=cancel,vm.save=save}AccountDialogController.$inject=["$mdDialog","defaults","account","accountId","mailCustomFromEnabled"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",AccountDialogController)}(),function(){"use strict";function FiltersDialogController($scope,$window,$mdDialog,filter,mailboxes,labels){function cancel(){$mdDialog.cancel()}function save(form){$mdDialog.hide()}function addMailFilterRule(event){vm.filter.rules||(vm.filter.rules=[]),vm.filter.rules.push({field:"subject",operator:"contains"})}function removeMailFilterRule(index){vm.filter.rules.splice(index,1)}function addMailFilterAction(event){vm.filter.actions||(vm.filter.actions=[]),vm.filter.actions.push({method:"discard"})}function removeMailFilterAction(index){vm.filter.actions.splice(index,1)}var vm=this,sieveCapabilities=$window.sieveCapabilities;vm.filter=filter,vm.mailboxes=mailboxes,vm.labels=labels,vm.cancel=cancel,vm.save=save,vm.addMailFilterRule=addMailFilterRule,vm.removeMailFilterRule=removeMailFilterRule,vm.addMailFilterAction=addMailFilterAction,vm.removeMailFilterAction=removeMailFilterAction,vm.fieldLabels={subject:l("Subject"),from:l("From"),to:l("To"),cc:l("Cc"),to_or_cc:l("To or Cc"),size:l("Size (Kb)"),header:l("Header")},sieveCapabilities.indexOf("body")>-1&&(vm.fieldLabels.body=l("Body")),vm.methodLabels={discard:l("Discard the message"),keep:l("Keep the message"),redirect:l("Forward the message to:"),vacation:l("Send a vacation message"),stop:l("Stop processing filter rules")},sieveCapabilities.indexOf("reject")>-1&&(vm.methodLabels.reject=l("Send a reject message:")),sieveCapabilities.indexOf("fileinto")>-1&&(vm.methodLabels.fileinto=l("File the message in:")),(sieveCapabilities.indexOf("imapflags")>-1||sieveCapabilities.indexOf("imap4flags")>-1)&&(vm.methodLabels.addflag=l("Flag the message with:")),vm.numberOperatorLabels={under:l("is under"),over:l("is over")},vm.textOperatorLabels={is:l("is"),is_not:l("is not"),contains:l("contains"),contains_not:l("does not contain"),matches:l("matches"),matches_not:l("does not match")},sieveCapabilities.indexOf("regex")>-1&&(vm.textOperatorLabels.regex=l("matches regex"),vm.textOperatorLabels.regex_not=l("does not match regex")),vm.flagLabels={seen:l("Seen"),deleted:l("Deleted"),answered:l("Answered"),flagged:l("Flagged"),junk:l("Junk"),not_junk:l("Not Junk")}}FiltersDialogController.$inject=["$scope","$window","$mdDialog","filter","m
//# sourceMappingURL=Preferences.js.map