Subversion Repositories SmartDukaan

Rev

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

Rev 8578 Rev 8590
Line 46... Line 46...
46
        url: "/user-image!createNewsletter?newsletterName="+name,
46
        url: "/user-image!createNewsletter?newsletterName="+name,
47
        type: 'POST',
47
        type: 'POST',
48
        data: formData,
48
        data: formData,
49
        async: false,
49
        async: false,
50
        success: function (data) {
50
        success: function (data) {
51
            alert("Changes propagated successfully");
51
			$('html').html(data.replace(/<html>(.*)<\/html>/, "$1"));
52
			window.location.reload();
-
 
53
			$('#uploadContentFile')[0].reset();
-
 
54
        },
52
        },
55
		 error : function() {
53
		 error : function() {
56
		 	alert("OOPS!!!Failed to do changes.Try Again.");
54
		 	alert("OOPS!!!Failed to do changes.Try Again.");
57
		 },
55
		 },
58
        cache: false,
56
        cache: false,
Line 66... Line 64...
66
</script>
64
</script>
67
<script type="text/javascript">
65
<script type="text/javascript">
68
$(function(){	
66
$(function(){	
69
$(".delete").live('click', function(){
67
$(".delete").live('click', function(){
70
	var id = $((this)).attr("id");
68
	var id = $((this)).attr("id");
-
 
69
	var name = $('#newsletterName').val();
71
	jQuery.ajax({
70
	jQuery.ajax({
72
		url: "/user-image!deleteCampaign?campaignId="+id,
71
		url: "/user-image!deleteCampaign?campaignId="+id+"&newsletterName="+name,
73
		type: 'POST',
72
		type: 'POST',
-
 
73
		async: false,
74
		success: function (data) {
74
		success: function (data) {
75
            alert("Changes propagated successfully");
75
			$('html').html(data.replace(/<html>(.*)<\/html>/, "$1"));
76
			window.location.reload();
-
 
77
        },
76
        },
78
		error : function() {
77
		error : function() {
79
		 	alert("OOPS!!!Failed to do changes.Try Again.");
78
		 	alert("OOPS!!!Failed to do changes.Try Again.");
80
		 },
79
		 },
81
		 cache: false,
80
		 cache: false,
Line 86... Line 85...
86
});
85
});
87
});
86
});
88
</script>
87
</script>
89
</head>
88
</head>
90
<body>
89
<body>
-
 
90
<div id="content">
91
<h3>Upload Campaign Images For $campaignName</h3>
91
<h3>Upload Campaign Images For $campaignName</h3>
92
<div style="display: none;" class="msgSuccess">
92
<div style="color:blue;padding:0px;">
93
<p style="font-size: 12px; color: green;">Image Uploaded Sucessfully</p>
93
    #sactionmessage()
94
</div>
94
    </div>
95
<div style="display: none;" class="msgError">
95
    <div style="color:red;padding:0px">
96
<p style="font-size: 12px; color: red;">Image Failed to upload</p>
96
    #sactionerror()
97
</div>
97
</div>
98
<div style="padding-top: 20px;">
98
<div style="padding-top: 20px;">
99
<label for="newsletterName">NewsLetter Name : </label>
99
<label for="newsletterName">NewsLetter Name : </label>
100
<input id="newsletterName" name="newsletterName" type="text" value="$campaignName" readonly="readonly"/>
100
<input id="newsletterName" name="newsletterName" type="text" value="$campaignName" readonly="readonly"/>
101
<br></br>
101
<br></br>
Line 115... Line 115...
115
		<a target="_blank" href="/images/campaignImages/$campaign.getImageName()"><img src="/images/campaignImages/$campaign.getImageName()" width="200" height="120"></a>
115
		<a target="_blank" href="/images/campaignImages/$campaign.getImageName()"><img src="/images/campaignImages/$campaign.getImageName()" width="200" height="120"></a>
116
		<div class="desc"><a class="delete" id="$campaign.getId()" href="#" style="text-align:center;">Delete</a></div>
116
		<div class="desc"><a class="delete" id="$campaign.getId()" href="#" style="text-align:center;">Delete</a></div>
117
</div>
117
</div>
118
#end
118
#end
119
</div>	
119
</div>	
120
 
120
</div>
121
</body>
121
</body>
122
122