diff --git a/static/js/ep_email.js b/static/js/ep_email.js index 0944f8e..16ffebf 100644 --- a/static/js/ep_email.js +++ b/static/js/ep_email.js @@ -67,7 +67,7 @@ function askClientToEnterEmail(){ // (string | mandatory) the heading of the notification title: "Enter your email to recieve an email when someone modifies this pad", // (string | mandatory) the text inside the notification - text: "
", + text: "", // (bool | optional) if you want it to fade out on its own or just sit there sticky: true, // (int | optional) the time you want it to be alive for before fading out @@ -85,6 +85,9 @@ function askClientToEnterEmail(){ function sendEmailToServer(){ var email = $('#ep_email').val(); + if(!email){ // if we're not using the top value use the notification value + email = $('#ep_email_notification').val(); + } var userId = pad.getUserId(); var message = {}; message.type = 'USERINFO_UPDATE'; @@ -92,8 +95,8 @@ function sendEmailToServer(){ message.padId = pad.getPadId(); message.userInfo.email = email; message.userInfo.userId = userId; - if(email){ pad.collabClient.sendMessage(message); } } +