fix getting email
This commit is contained in:
		
							parent
							
								
									9eab1c29a6
								
							
						
					
					
						commit
						8b5e708480
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -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: "<form class='ep_email_form'><label for='ep_email'><input id='ep_email' placeholder='your@email.com' style='padding:5px;width:200px;' type=email><input type=submit style='padding:5px;'></form>", | ||||
|     text: "<form class='ep_email_form'><label for='ep_email'><input id='ep_email_notification' placeholder='your@email.com' style='padding:5px;width:200px;' type=email><input type=submit style='padding:5px;'></form>", | ||||
|     // (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); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John McLear
						John McLear