Subversion Repositories SmartDukaan

Rev

Rev 24106 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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