Subversion Repositories SmartDukaan

Rev

Rev 27754 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24098 tejbeer 1
$(function() {
24106 tejbeer 2
 
27754 amit.gupta 3
	$(document).on('click', ".notification-panel", function() {
24098 tejbeer 4
		loadNotificationfocoPanel("main-content");
5
	});
6
 
27755 amit.gupta 7
	$(document).on('click', "#submitEditor",
24106 tejbeer 8
					function() {
9
						var editorData = CKEDITOR.instances['editor'].getData();
10
						console.log(editorData)
11
						var notificationData = {};
24098 tejbeer 12
 
24106 tejbeer 13
						notificationData['data'] = editorData;
24098 tejbeer 14
 
24106 tejbeer 15
						if (confirm("Are you sure you want to send notification!") == true) {
16
							doPostAjaxRequestWithJsonHandler(context
17
									+ "/notificationData", JSON
18
									.stringify(notificationData), function(
19
									response) {
20
								if (response == 'true') {
21
									alert("successfully send");
22
									loadNotificationfocoPanel("main-content");
23
								}
24
							});
25
 
26
							return false;
27
						}
28
					});
29
});
30
 
31
function loadNotificationfocoPanel(domId) {
32
	doGetAjaxRequestHandler(context + "/notificationPanel", function(response) {
33
		$('#' + domId).html(response);
34
		CKEDITOR.replace("editor");
35
 
24098 tejbeer 36
	});
37
}
25760 amit.gupta 38
 
26015 amit.gupta 39
 
40