diff --git a/UI/WebServerResources/js/Preferences.js b/UI/WebServerResources/js/Preferences.js index f4831907b..4c64b8eae 100644 --- a/UI/WebServerResources/js/Preferences.js +++ b/UI/WebServerResources/js/Preferences.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e,t){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}}}).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"}}}),t.rules.otherwise("/general")}function t(e,t,i,s){e.DebugEnabled||s.defaultErrorHandler(function(){}),i.onError({to:"preferences.**"},function(e){"preferences"==e.to().name||e.ignored()||(t.error("transition error to "+e.to().name+": "+e.error().detail),s.go({state:"preferences"}))})}angular.module("SOGo.PreferencesUI",["ui.router","sgCkeditor","angularFileUpload","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(t),e.$inject=["$stateProvider","$urlServiceProvider"],t.$inject=["$window","$log","$transitions","$state"]}(),function(){"use strict";function e(a,e,t,i,r,s,n,o,c,d,f){var u=this,h=e.usesCASAuthentication||e.usesSAML2Authentication;function p(){u.account.security&&u.account.security.hasCertificate&&u.account.$certificate().then(function(e){u.certificate=e},function(){delete u.account.security.hasCertificate})}function m(e){e=0this.maxSize?r.alert(l("Error"),l("Data too big. Please contact technical support.")):t.hide()}}e.$inject=["$timeout","$window","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled","maxSize"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,i,s,a,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled,u=t.notificationEnabled;t.vacationEnabled;this.filter=a,this.mailboxes=r,this.labels=n,this.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")},-1e.endDate.getTime()&&(e.startDate=new Date(e.endDate.getTime()),e.startDate.addDays(-1))},this.toggleVacationEndDate=function(){var e=this.preferences.defaults.Vacation;e.endDateEnabled&&(e.endDate||(e.endDate=new Date),e.startDateEnabled)&&e.startDate&&e.endDate.getTime()=t.Vacation.startDate.getTime():i},this.toggleVacationStartTime=function(){var e=this.preferences.defaults.Vacation;e.startTimeEnabled&&!e.startTime&&(e.startTime=new Date)},this.toggleVacationEndTime=function(){var e=this.preferences.defaults.Vacation;e.endTimeEnabled&&!e.endTime&&(e.endTime=new Date)},this.contactFilter=function(e){return m.$filterAll(e,[],{priority:"gcs"}).then(function(e){var t=[];return _.forEach(_.invokeMap(e,"explode"),function(e){_.forEach(e,function(e){t.push(e)})}),_.uniqBy(t,function(e){return e.$$fullname+" "+e.$$email+" "+e.containername})})},this.ignoreReturn=function(e){if(13==e.keyCode)return e.stopPropagation(),e.preventDefault(),!1;186==e.keyCode&&"ü"==e.key&&(e.stopPropagation(),e.preventDefault(),(e=r.document.getElementById(e.target.id)).value=e.value+"ü")},this.addRecipient=function(e,t){var i,s,a,r,n=this.autocomplete[t];if(angular.isString(e)){for(r="",a=0;athis.maxSize?r.alert(l("Error"),l("Data too big. Please contact technical support.")):t.hide()}}e.$inject=["$timeout","$window","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled","maxSize"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,i,s,a,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled,u=t.notificationEnabled;t.vacationEnabled;this.filter=a,this.mailboxes=r,this.labels=n,this.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")},-1e.endDate.getTime()&&(e.startDate=new Date(e.endDate.getTime()),e.startDate.addDays(-1))},this.toggleVacationEndDate=function(){var e=this.preferences.defaults.Vacation;e.endDateEnabled&&(e.endDate||(e.endDate=new Date),e.startDateEnabled)&&e.startDate&&e.endDate.getTime()=t.Vacation.startDate.getTime():i},this.toggleVacationStartTime=function(){var e=this.preferences.defaults.Vacation;e.startTimeEnabled&&!e.startTime&&(e.startTime=new Date)},this.toggleVacationEndTime=function(){var e=this.preferences.defaults.Vacation;e.endTimeEnabled&&!e.endTime&&(e.endTime=new Date)},this.contactFilter=function(e){return p.$filterAll(e,[],{priority:"gcs"}).then(function(e){var t=[];return _.forEach(_.invokeMap(e,"explode"),function(e){_.forEach(e,function(e){t.push(e)})}),_.uniqBy(t,function(e){return e.$$fullname+" "+e.$$email+" "+e.containername})})},this.ignoreReturn=function(e){if(13==e.keyCode)return e.stopPropagation(),e.preventDefault(),!1;186==e.keyCode&&"ü"==e.key&&(e.stopPropagation(),e.preventDefault(),(e=r.document.getElementById(e.target.id)).value=e.value+"ü")},this.addRecipient=function(e,t){var i,s,a,r,n=this.autocomplete[t];if(angular.isString(e)){for(r="",a=0;a The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility. - * - * - * module.controller('AppCtrl', function($mdLiveAnnouncer) { - * // Basic announcement (Polite Mode) - * $mdLiveAnnouncer.announce('Hey Google'); - * - * // Custom announcement (Assertive Mode) - * $mdLiveAnnouncer.announce('Hey Google', 'assertive'); - * }); - * - * - */ -function MdLiveAnnouncer($timeout) { - /** @private @const @type {!angular.$timeout} */ - this._$timeout = $timeout; - - /** @private @const @type {!HTMLElement} */ - this._liveElement = this._createLiveElement(); - - /** @private @const @type {!number} */ - this._announceTimeout = 100; -} - -/** - * @ngdoc method - * @name $mdLiveAnnouncer#announce - * @description Announces messages to supported screenreaders. - * @param {string} message Message to be announced to the screenreader - * @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element. - */ -MdLiveAnnouncer.prototype.announce = function(message, politeness) { - if (!politeness) { - politeness = 'polite'; - } - - var self = this; - - self._liveElement.textContent = ''; - self._liveElement.setAttribute('aria-live', politeness); - - // This 100ms timeout is necessary for some browser + screen-reader combinations: - // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout. - // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a - // second time without clearing and then using a non-zero delay. - // (using JAWS 17 at time of this writing). - self._$timeout(function() { - self._liveElement.textContent = message; - }, self._announceTimeout, false); -}; - -/** - * Creates a live announcer element, which listens for DOM changes and announces them - * to the screenreaders. - * @returns {!HTMLElement} - * @private - */ -MdLiveAnnouncer.prototype._createLiveElement = function() { - var liveEl = document.createElement('div'); - - liveEl.classList.add('md-visually-hidden'); - liveEl.setAttribute('role', 'status'); - liveEl.setAttribute('aria-atomic', 'true'); - liveEl.setAttribute('aria-live', 'polite'); - - document.body.appendChild(liveEl); - - return liveEl; -}; +/** + * @ngdoc module + * @name material.core.liveannouncer + * @description + * AngularJS Material Live Announcer to provide accessibility for Voice Readers. + */ +MdLiveAnnouncer.$inject = ["$timeout"]; +angular + .module('material.core') + .service('$mdLiveAnnouncer', MdLiveAnnouncer); + +/** + * @ngdoc service + * @name $mdLiveAnnouncer + * @module material.core.liveannouncer + * + * @description + * + * Service to announce messages to supported screenreaders. + * + * > The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility. + * + * + * module.controller('AppCtrl', function($mdLiveAnnouncer) { + * // Basic announcement (Polite Mode) + * $mdLiveAnnouncer.announce('Hey Google'); + * + * // Custom announcement (Assertive Mode) + * $mdLiveAnnouncer.announce('Hey Google', 'assertive'); + * }); + * + * + */ +function MdLiveAnnouncer($timeout) { + /** @private @const @type {!angular.$timeout} */ + this._$timeout = $timeout; + + /** @private @const @type {!HTMLElement} */ + this._liveElement = this._createLiveElement(); + + /** @private @const @type {!number} */ + this._announceTimeout = 100; +} + +/** + * @ngdoc method + * @name $mdLiveAnnouncer#announce + * @description Announces messages to supported screenreaders. + * @param {string} message Message to be announced to the screenreader + * @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element. + */ +MdLiveAnnouncer.prototype.announce = function(message, politeness) { + if (!politeness) { + politeness = 'polite'; + } + + var self = this; + + self._liveElement.textContent = ''; + self._liveElement.setAttribute('aria-live', politeness); + + // This 100ms timeout is necessary for some browser + screen-reader combinations: + // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout. + // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a + // second time without clearing and then using a non-zero delay. + // (using JAWS 17 at time of this writing). + self._$timeout(function() { + self._liveElement.textContent = message; + }, self._announceTimeout, false); +}; + +/** + * Creates a live announcer element, which listens for DOM changes and announces them + * to the screenreaders. + * @returns {!HTMLElement} + * @private + */ +MdLiveAnnouncer.prototype._createLiveElement = function() { + var liveEl = document.createElement('div'); + + liveEl.classList.add('md-visually-hidden'); + liveEl.setAttribute('role', 'status'); + liveEl.setAttribute('aria-atomic', 'true'); + liveEl.setAttribute('aria-live', 'polite'); + + document.body.appendChild(liveEl); + + return liveEl; +}; })(); (function(){ @@ -17364,7 +17364,7 @@ angular.module('material.components.datepicker', [ var CALENDAR_PANE_WIDTH = 360; /** Used for checking whether the current user agent is on iOS or Android. */ - var IS_MOBILE_REGEX = false;///ipad|iphone|ipod|android/i; + var IS_MOBILE_REGEX = /ipad|iphone|ipod|android/i; /** * Controller for md-datepicker.