From dc164f2f631c866715e70537dcf9718e97c2aca5 Mon Sep 17 00:00:00 2001 From: zinyando Date: Thu, 30 Jun 2016 17:17:44 +0200 Subject: [PATCH] Prevent tooltips from showing when anonymous is set to true --- app/app/authenticators/documize.js | 1 - app/app/mixins/tooltip.js | 12 +++++++++--- app/app/pods/auth/login/controller.js | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/app/authenticators/documize.js b/app/app/authenticators/documize.js index 8fada227..7cfe3886 100644 --- a/app/app/authenticators/documize.js +++ b/app/app/authenticators/documize.js @@ -24,7 +24,6 @@ export default Base.extend({ }, authenticate({password, email}) { - debugger; let domain = netUtil.getSubdomain(); if (!isPresent(password) || !isPresent(email)) { diff --git a/app/app/mixins/tooltip.js b/app/app/mixins/tooltip.js index 45f3c9b6..bb7a0a04 100644 --- a/app/app/mixins/tooltip.js +++ b/app/app/mixins/tooltip.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . All rights reserved. // -// This software (Documize Community Edition) is licensed under +// This software (Documize Community Edition) is licensed under // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html // // You can operate outside the AGPL restrictions by purchasing // Documize Enterprise Edition and obtaining a commercial license -// by contacting . +// by contacting . // // https://documize.com @@ -15,9 +15,15 @@ export default Ember.Mixin.create({ tooltips: [], addTooltip(elem) { + + if(elem == null) { + return; + } + let t = new Tooltip({ target: elem }); + let tt = this.get('tooltips'); tt.push(t); }, @@ -33,4 +39,4 @@ export default Ember.Mixin.create({ this.set('tooltips', tt); } -}); \ No newline at end of file +}); diff --git a/app/app/pods/auth/login/controller.js b/app/app/pods/auth/login/controller.js index 925f4e38..f51ab1ce 100644 --- a/app/app/pods/auth/login/controller.js +++ b/app/app/pods/auth/login/controller.js @@ -27,6 +27,7 @@ export default Ember.Controller.extend({ this.get('session').authenticate('authenticator:documize', creds) .then((response) => { this.get('audit').record("logged-in"); + this.transitionToRoute('folders.folder'); return response; }).catch(() => { this.set('invalidCredentials', true);