Subversion Repositories SmartDukaan

Rev

Rev 24106 | Rev 25781 | 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
 
35
	doGetAjaxRequestHandler(context + "/notificationPanel", function(response) {
36
		$('#' + domId).html(response);
37
		CKEDITOR.replace("editor");
38
 
24098 tejbeer 39
	});
40
}
25760 amit.gupta 41
$(document).ready(
42
	function() {
43
		messageType = $(this).data("messagetype");
44
		if($(this).hasClass('btn-pressed')) {
45
			messageType="";
46
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
47
		} else {
48
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
49
			$(this).addClass('btn-pressed').removeClass('btn-default');
50
		}
51
		notifyTypeChange(messageType);
52
	});
53
	notifyTypeChange("");
54
 
55
});
56