Subversion Repositories SmartDukaan

Rev

Rev 24011 | Rev 24098 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24011 Rev 24014
Line 13... Line 13...
13
		var longNotificationtext = $('#longNotificationtext').val();
13
		var longNotificationtext = $('#longNotificationtext').val();
14
		var imageUrl = $('input[name="imageUrl"]').val();
14
		var imageUrl = $('input[name="imageUrl"]').val();
15
		var type = $('#type').val();
15
		var type = $('#type').val();
16
		var expiryTime=$('#expireSat').val();
16
		var expiryTime=$('#expireSat').val();
17
		var url = $('input[name="url"]').val();
17
		var url = $('input[name="url"]').val();
-
 
18
		var notification_type =$('#notification_type').val();
-
 
19
		var messageText=$('#messageText').val();
18
		$('#sendsms').on('change', function(){
20
		$('#sendsms').on('change', function(){
19
			   this.value = this.checked ? 1 : 0;
21
			   this.value = this.checked ? true : false;
20
			}).change();		
22
			}).change();		
-
 
23
			
-
 
24
	   
21
	
25
	
22
		if(userIds.length === 0 && campaignName === "" && title === "" && message === "" && expiryTime==="" && type===""){
26
		if(userIds.length === 0 && campaignName === "" && title === "" && message === "" && expiryTime==="" && type===""){
23
		alert("Field can't be empty");
27
		alert("Field can't be empty");
24
		return;
28
		return;
25
	}
29
	}
Line 66... Line 70...
66
		notificationData['imageUrl']=$('input[name="imageUrl"]').val();
70
		notificationData['imageUrl']=$('input[name="imageUrl"]').val();
67
		notificationData['type']=$('#type').val();
71
		notificationData['type']=$('#type').val();
68
		notificationData['url']=$('input[name="url"]').val();
72
		notificationData['url']=$('input[name="url"]').val();
69
		notificationData['expiresat']=startDate;
73
		notificationData['expiresat']=startDate;
70
		notificationData['sendsms']=$('input[name="sendsms"]').val();
74
		notificationData['sendsms']=$('input[name="sendsms"]').val();
71
		notificationData['notificationtype']=$('input[name="notification_type"]').val();
75
		notificationData['notification_type']=$('#notification_type').val();
72
		notificationData['messageText']=$('input[name="messageText"]').val();
76
		notificationData['messageText']=$('#messageText').val();
73
		console.log(notificationData)
77
		console.log(notificationData)
74
		
78
		
75
	if(confirm("Are you sure you want to send notification!") == true){
79
	if(confirm("Are you sure you want to send notification!") == true){
76
	doPostAjaxRequestWithJsonHandler(context+"/sendNotification", JSON.stringify(notificationData), function(response){
80
	doPostAjaxRequestWithJsonHandler(context+"/sendNotification", JSON.stringify(notificationData), function(response){
77
	               if (response == 'true') {
81
	               if (response == 'true') {