Subversion Repositories SmartDukaan

Rev

Rev 25781 | Rev 27754 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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