From dd852b45ee19a78a6dab0ab39f02f2238df8cb7b Mon Sep 17 00:00:00 2001 From: Santiago Siri Date: Mon, 30 Oct 2017 17:21:46 -0700 Subject: [PATCH] quick fix on popup animation ghost --- i18n/en.i18n.json | 3 ++- imports/ui/modules/popup.js | 1 - .../identity/login/ForgotPassword.jsx | 3 +++ imports/ui/templates/widgets/popup/popup.js | 18 ++---------------- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 81fe69a9c..4c636e634 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -461,5 +461,6 @@ "you": "You", "all-members": "Other Members", "your-delegations": "Your Delegations", - "unlogged-cant-vote": "You need to be logged in to vote." + "unlogged-cant-vote": "You need to be logged in to vote.", + "email-recovery-instructions": "Password reset instructions will be sent to the Email used to register an account." } diff --git a/imports/ui/modules/popup.js b/imports/ui/modules/popup.js index 040784054..05cacc701 100644 --- a/imports/ui/modules/popup.js +++ b/imports/ui/modules/popup.js @@ -149,7 +149,6 @@ const _animate = (display, id) => { $(divId).css('opacity', '0'); $(divId).velocity({ opacity: 1 }, { duration: (animationSettings.duration / 2) }); } else { - console.log('HIDE IT'); $(divId).css('opacity', '1'); $(divId).velocity({ opacity: 0 }, { duration: (animationSettings.duration / 2), diff --git a/imports/ui/templates/components/identity/login/ForgotPassword.jsx b/imports/ui/templates/components/identity/login/ForgotPassword.jsx index 7ad94a0b6..1d2b1df7e 100644 --- a/imports/ui/templates/components/identity/login/ForgotPassword.jsx +++ b/imports/ui/templates/components/identity/login/ForgotPassword.jsx @@ -75,6 +75,9 @@ export default class ForgotPassword extends Component { {warning} +
+ {TAPi18n.__('email-recovery-instructions')} +
{TAPi18n.__('continue-password-recovery')}
diff --git a/imports/ui/templates/widgets/popup/popup.js b/imports/ui/templates/widgets/popup/popup.js index 7afd4c587..acc3f84c4 100644 --- a/imports/ui/templates/widgets/popup/popup.js +++ b/imports/ui/templates/widgets/popup/popup.js @@ -9,29 +9,22 @@ import { animationSettings } from '/imports/ui/modules/animation'; import './popup.html'; function autoPosition(height) { - console.log('TEST - autoPosition()'); const screenH = $(window).height(); let pos = parseInt(((screenH - height) / 2) - 10, 10); if (pos <= 70) { - console.log('TEST - pos <=70'); pos = 70; } - console.log('TEST - pos: ', pos); return pos; } Template.popup.onRendered(() => { - console.log('TEST - onRendered()'); $(`#card-${Template.instance().data.id}`).attr('legacyheight', $(`#card-${Template.instance().data.id}`)[0].getBoundingClientRect().height); $(`#card-${Template.instance().data.id}`).resize(function () { if (Meteor.Device.isPhone()) { const divId = `#${this.id}`; - console.log('TEST - divId: ', divId); - if (!$(divId).is('.velocity-animating')) { - console.log('TEST - invoke autoPosition from onRendered'); + if (!$(divId).is('.velocity-animating') && divId !== '#login-null') { const newMargin = autoPosition($(divId)[0].getBoundingClientRect().height); const newHeight = $(divId)[0].getBoundingClientRect().height; - // $(divId).css('height', $(divId).attr('legacyheight')); $(divId).velocity({ marginTop: newMargin }, { duration: animationSettings.duration, easing: 'ease-out' }); Meteor.setTimeout(function () { $(divId).velocity('stop'); @@ -53,11 +46,7 @@ Template.popup.helpers({ return Meteor.Device.isPhone(); }, modalPosition() { - console.log('TEST - modalPosition()'); if (Session.get(this.id).position.height) { - console.log('TEST - true IF in modalPosition()'); - console.log('TEST - this.id ', this.id); - console.log('TEST - invoke autoPosition from modalPosition'); return `margin-top: ${autoPosition($(`#card-${this.id}`)[0].getBoundingClientRect().height)}px;`; } return ''; @@ -71,10 +60,7 @@ Template.popup.events({ animatePopup(false, this.id); } }, - 'click .modal'(event) { - console.log('click'); - console.log(event.target.id); - console.log(this.id); + 'mousedown .modal'(event) { event.stopPropagation(); if (event.target.id === this.id) { animatePopup(false, this.id);