Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 27755
Line 5... Line 5...
5
	});
5
	});
6
	$(document).on('click', ".change-auth-user-password", function() {
6
	$(document).on('click', ".change-auth-user-password", 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")
10
	$(document).on('click', ".mk_gmail_edit",
11
		.live(
-
 
12
			'click',
-
 
13
			function() {
11
			function() {
14
				var $that = $(this);
12
				var $that = $(this);
15
				bootbox
13
				bootbox
16
					.prompt(
14
					.prompt(
17
						"New Gmail Id",
15
						"New Gmail Id",
Line 52... Line 50...
52
									.alert("Gmail id is required");
50
									.alert("Gmail id is required");
53
							}
51
							}
54
						});
52
						});
55
			});
53
			});
56
 
54
 
57
	$(".reset-password")
55
	$(document).on('click', ".reset-password",
58
		.live(
-
 
59
			'click',
-
 
60
			function() {
56
			function() {
61
				console.log("reset-password clicked......");
57
				console.log("reset-password clicked......");
62
				var emailId = $(this).data('id');
58
				var emailId = $(this).data('id');
63
				console.log(emailId);
59
				console.log(emailId);
64
				if (confirm("Are you sure you want to reset password of Auth userEmail=!"
60
				if (confirm("Are you sure you want to reset password of Auth userEmail=!"
65
					+ emailId) == true) {
61
					+ emailId) == true) {
66
					resetAuthUserPassword("main-content", emailId);
62
					resetAuthUserPassword("main-content", emailId);
67
				}
63
				}
68
			});
64
			});
69
 
65
 
70
	$(".remove-user").live(
66
	$(document).on('click', ".remove-user",
71
		'click',
-
 
72
		function() {
67
		function() {
73
			console.log("heelo");
68
			console.log("heelo");
74
			var $that = $(this);
69
			var $that = $(this);
75
 
70
 
76
			if (confirm("Are you sure you want to remove the user")) {
71
			if (confirm("Are you sure you want to remove the user")) {
Line 82... Line 77...
82
						}
77
						}
83
					});
78
					});
84
			}
79
			}
85
		});
80
		});
86
 
81
 
87
	$(".change-password")
82
	$(document).on('click', ".change-password",
88
		.live(
-
 
89
			'click',
-
 
90
			function() {
83
			function() {
91
				console.log("change-password button clicked......");
84
				console.log("change-password button clicked......");
92
				var oldPassword = $("#currentPassword").val();
85
				var oldPassword = $("#currentPassword").val();
93
				var newPassword = $("#newPassword").val();
86
				var newPassword = $("#newPassword").val();
94
				var confirmPassword = $("#confirmPassword").val();
87
				var confirmPassword = $("#confirmPassword").val();
Line 113... Line 106...
113
					}
106
					}
114
				} else {
107
				} else {
115
					alert("new Password and confirm Password must be match");
108
					alert("new Password and confirm Password must be match");
116
				}
109
				}
117
			});
110
			});
118
	$(".create-auth-user")
111
	$(document).on('click', ".create-auth-user",
119
		.live(
-
 
120
			'click',
-
 
121
			function() {
112
			function() {
122
				console.log("Create Auth User button clicked......");
113
				console.log("Create Auth User button clicked......");
123
				var emailId = $("#authUserEmail").val();
114
				var emailId = $("#authUserEmail").val();
124
				var firstName = $("#authUserFirstName").val();
115
				var firstName = $("#authUserFirstName").val();
125
				var lastName = $("#authUserLastName").val();
116
				var lastName = $("#authUserLastName").val();
Line 168... Line 159...
168
				if (confirm("Are you sure you want to create Auth user!") == true) {
159
				if (confirm("Are you sure you want to create Auth user!") == true) {
169
					addAuthUser(emailId, firstName, lastName,
160
					addAuthUser(emailId, firstName, lastName,
170
						mobileNumber, gmailId, employeeCode);
161
						mobileNumber, gmailId, employeeCode);
171
				}
162
				}
172
			});
163
			});
173
	$("#authUsers-paginated .next").live(
164
	$(document).on('click', "#authUsers-paginated .next",
174
		'click',
-
 
175
		function() {
165
		function() {
176
 
166
 
177
			loadPaginatedNextItems('/getPaginatedAuthUser', null,
167
			loadPaginatedNextItems('/getPaginatedAuthUser', null,
178
				'authUsers-paginated', 'auth-user-table',
168
				'authUsers-paginated', 'auth-user-table',
179
				'auth-user-details-container');
169
				'auth-user-details-container');
180
			$(this).blur();
170
			$(this).blur();
181
		});
171
		});
182
 
172
 
183
	$("#authUsers-paginated .previous").live(
173
	$(document).on('click', "#authUsers-paginated .previous",
184
		'click',
-
 
185
		function() {
174
		function() {
186
 
175
 
187
			loadPaginatedPreviousItems('/getPaginatedAuthUser', null,
176
			loadPaginatedPreviousItems('/getPaginatedAuthUser', null,
188
				'authUsers-paginated', 'auth-user-table',
177
				'authUsers-paginated', 'auth-user-table',
189
				'auth-user-details-container');
178
				'auth-user-details-container');