Subversion Repositories SmartDukaan

Rev

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

Rev 24098 Rev 24106
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
   
2
 
3
	$(".notification-panel").live('click', function() {
3
	$(".notification-panel").live('click', function() {
4
		loadNotificationfocoPanel("main-content");
4
		loadNotificationfocoPanel("main-content");
5
	});
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
 
6
 
-
 
7
	$("#submitEditor")
-
 
8
			.live(
-
 
9
					'click',
-
 
10
					function() {
-
 
11
						var editorData = CKEDITOR.instances['editor'].getData();
-
 
12
						console.log(editorData)
-
 
13
						var notificationData = {};
-
 
14
 
-
 
15
						notificationData['data'] = editorData;
-
 
16
 
-
 
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
								}
42
           });
26
							});
-
 
27
 
-
 
28
							return false;
-
 
29
						}
-
 
30
					});
43
  	
31
});
-
 
32
 
-
 
33
function loadNotificationfocoPanel(domId) {
-
 
34
 
-
 
35
	doGetAjaxRequestHandler(context + "/notificationPanel", function(response) {
-
 
36
		$('#' + domId).html(response);
-
 
37
		CKEDITOR.replace("editor");
-
 
38
 
44
	});
39
	});
45
}
40
}
46
 
-
 
47
   
-
 
48
     
-
 
49
    
-
 
50
41