Subversion Repositories SmartDukaan

Rev

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

Rev 24417 Rev 24478
Line 5... Line 5...
5
	});
5
	});
6
	$(".change-auth-user-password").live('click', function() {
6
	$(".change-auth-user-password").live('click', function() {
7
		console.log("change auth user password clicked......");
7
		console.log("change auth user password clicked......");
8
		loadChangeAuthUserPassword("main-content");
8
		loadChangeAuthUserPassword("main-content");
9
	});
9
	});
-
 
10
	$(".mk_gmail_edit").live('click', function(){
-
 
11
		bootbox.prompt("New Gmail Id", function(result){
-
 
12
			if(result && result.indexOf('@gmail.com') > 0) {
-
 
13
				doGetAjaxRequestHandler(context + "/authuser/edit?emailId=" + $(this.data("id"))+ "&gmailId=" + result, function(response) {
-
 
14
					if(response=="true") {
-
 
15
						bootbox.alert("Gmail Id updated successfully");
-
 
16
						$(this).closest('td').find('span').html(result);
-
 
17
						$(this).closest('td').find('button').html('Edit');
-
 
18
						return;
-
 
19
					}
-
 
20
				});
-
 
21
			} else {
-
 
22
				bootbox.alert("Gmail id is required");
-
 
23
			}
-
 
24
		});
-
 
25
	});
10
 
26
 
11
	$(".reset-password")
27
	$(".reset-password")
12
			.live(
28
			.live(
13
					'click',
29
					'click',
14
					function() {
30
					function() {
Line 58... Line 74...
58
						console.log("Create Auth User button clicked......");
74
						console.log("Create Auth User button clicked......");
59
						var emailId = $("#authUserEmail").val();
75
						var emailId = $("#authUserEmail").val();
60
						var firstName = $("#authUserFirstName").val();
76
						var firstName = $("#authUserFirstName").val();
61
						var lastName = $("#authUserLastName").val();
77
						var lastName = $("#authUserLastName").val();
62
						var mobileNumber = $("#authUserMobileNumber").val();
78
						var mobileNumber = $("#authUserMobileNumber").val();
-
 
79
						var gmailId = $("#authUserGmailId").val();
63
 
80
 
64
						if (emailId == "" || emailId == null
81
						if (emailId == "" || emailId == null
65
								|| emailId == undefined) {
82
								|| emailId == undefined) {
66
							alert("emailId cann't be blank");
83
							alert("emailId cann't be blank");
67
							return;
84
							return;
68
						}
85
						}
-
 
86
						
-
 
87
						if (gmailId == "" || gmailId == null
-
 
88
								|| gmailId == undefined) {
-
 
89
							gmailId=null;
-
 
90
						}
69
						validateEmail(emailId);
91
						validateEmail(emailId);
70
						if (firstName == "" || firstName == null
92
						if (firstName == "" || firstName == null
71
								|| firstName == undefined) {
93
								|| firstName == undefined) {
72
							alert("firstName cann't be blank");
94
							alert("firstName can't be blank");
73
							return;
95
							return;
74
						}
96
						}
75
						if (lastName == "" || lastName == null
97
						if (lastName == "" || lastName == null
76
								|| lastName == undefined) {
98
								|| lastName == undefined) {
77
							alert("lastName cann't be blank");
99
							alert("lastName can't be blank");
78
							return;
100
							return;
79
						}
101
						}
80
						if (mobileNumber == "" || mobileNumber == null
102
						if (mobileNumber == "" || mobileNumber == null
81
								|| mobileNumber == undefined) {
103
								|| mobileNumber == undefined) {
82
							alert("mobileNumber cann't be blank");
104
							alert("mobileNumber can't be blank");
83
							return;
105
							return;
84
						}
106
						}
85
						if (mobileNumber.length != 10) {
107
						if (mobileNumber.length != 10) {
86
 
108
 
87
							alert("required 10 digits, match requested format!");
109
							alert("required 10 digits, match requested format!");