Subversion Repositories SmartDukaan

Rev

Rev 15490 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12256 kshitij.so 1
<html>
2
<head>
3
<meta http-equiv="refresh" content="60">
4
<script src="/Support/js/jquery-1.5.1.min.js"></script>
5
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
6
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
7
<script type="text/javascript">
8
  $(function(){	
9
	$(".sheet-upload").live('click', function() {
10
		loadSheet("content");
11
    });	
12
 
13
	$(".add-items").live('click', function() {
14
		loadItem("content");
15
    });
16
 
17
	$(".viewReport").live('click', function() {
18
		var up_id = $(this).attr('uploadId');
19
		viewReport(up_id);
20
    });
21
 
22
$("#uploadBulkFile").live('submit', function(){
23
    var formData = new FormData($(this)[0]);
24
 
25
    jQuery.ajax({
26
        url: "/Support/competition-scraping!uploadBulkFile",
27
        type: 'POST',
28
        data: formData,
29
        async: false,
30
		beforeSend: function(){
31
        $('#loader').show();
32
		$('#scui-alert').hide();
33
        },
34
        success: function (data) {
35
			$('#uploadBulkFile')[0].reset();
36
			$('#scui-alert').show();
37
			$('#' + 'previous-data').html(data);
38
			$('#loader').hide();
39
        },
40
		 error : function() {
12313 kshitij.so 41
		 	jAlert("OOPS!!!Unable to upload.No of items can exceed 100.",'ERROR');
12256 kshitij.so 42
			$('#loader').hide();
43
		 },
44
        cache: false,
45
        contentType: false,
46
        processData: false
47
    });
48
 
49
    return false;
50
});
51
});
52
</script>
53
<script type="text/javascript">
54
function loadSheet(domId){
55
jQuery.ajax({
56
        type : "GET",
57
        url : "/Support/competition-scraping!uploadSheet",
58
        success : function(response) {
59
            $('#' + domId).html(response);
60
        }
61
    });  
62
}
63
function loadItem(domId){
64
jQuery.ajax({
65
        type : "GET",
66
        url : "/Support/competition-scraping!addItems",
67
        success : function(response) {
68
            $('#' + domId).html(response);
69
        }
70
    });  
71
}
72
function downloadReport(uploadId){
73
jQuery.ajax({
74
        type : "GET",
75
        url : "/Support/competition-scraping!downloadReport?requestId="+uploadId,
76
		error : function() {
77
		 	jAlert("OOPS!!!Unable to stream",'ERROR');
78
		 },
79
    });  
80
}
81
function viewReport(uploadId){
82
jQuery.ajax({
83
        type : "GET",
84
        url : "/Support/competition-scraping!getUploadData?requestId="+uploadId,
85
		success: function (data) {
86
			$('#' + 'report-data').html(data);
87
        },
88
		error : function() {
89
		 	jAlert("OOPS!!!Unable to render report",'ERROR');
90
		 },
91
    });  
92
}
93
</script>
94
<script type="text/javascript">
95
		$(function(){
96
jQuery.ajax({
97
        type : "GET",
98
        url : "/Support/competition-scraping!getPreviousData",
99
		beforeSend: function(){
100
			$('#loader').show();
101
        },
102
        complete: function(){
103
			$('#loader').hide();
104
        },
105
        success : function(response) {
106
        $('#' + 'previous-data').html(response);
107
        }
108
    });  
109
});
110
</script>
111
<script type="text/javascript">
112
$(function(){	
113
$("#itemForm").live('submit', function(){
114
	$('input[type=checkbox]').each(function () {
115
	if(this.checked){
116
		$(this).val('true');
117
	}
118
	else{
119
		$(this).attr('checked','checked');
120
		$(this).val('false');
121
	}	
122
	});
123
	var data = $('#itemForm').serialize() 
124
    jQuery.ajax({
125
        url: "/Support/competition-scraping!processItems",
126
        type: 'POST',
127
        data: data,
128
        async: false,
129
		beforeSend: function(){
130
        $('#loader').show();
131
		$('#scui-alert').hide();
132
        },
133
        success: function (data) {
134
			$('#scui-alert').show();
135
			$('#' + 'previous-data').html(data);
136
			$('#loader').hide();
137
			$('#content').hide();
138
        },
139
		 error : function() {
140
		 	jAlert("OOPS!!!Unable to upload.Try Again.",'ERROR');
141
			$('#loader').hide();
142
		 },
143
        cache: false,
144
        contentType: "application/x-www-form-urlencoded",
145
        processData: false
146
    });
147
    return false;
148
});
149
});
150
</script>
151
 
152
 
153
<style>
154
	a{
155
		text-decoration:none;
156
	}
157
	#content{
158
		margin-top:20px;
159
	}
160
	td{
161
		text-align:center;
162
	}
163
	th{
164
		text-align:center;
165
	}
166
* { font-family: Verdana; font-size: 96%; }
167
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
168
p { clear: both; }
169
.submit { margin-left: 12em; }
170
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
171
ul { padding-left: 13px;}
172
td{background-color:gainsboro};
173
.diffColor {
174
    background: grey;
175
}
176
    border-color: #89cd89;
177
}
178
#scui-alert {
179
    background-color: white;
180
    border: 1px solid black;
181
    border-radius: 4px;
182
    line-height: 18px;
183
}
184
</style>
185
</head>
186
<body>
12266 kshitij.so 187
<div style="padding: 10px 0px;">
12265 kshitij.so 188
	   <a style="padding-left: 10px;" href="/Support/reports">Back</a>
189
	   <a style="padding-left: 10px;" href="/Support/logout">Logout</a>
190
</div>
12256 kshitij.so 191
<div style="margin: 5px; color: blue;"><h3>Competition Scraping</h3></div>
192
<div class="options">
193
<hr>
12267 kshitij.so 194
<a target="_blank" href="http://173.255.253.139/competitor-scraping-template.xls">Download Bulk Upload Template</a>
12256 kshitij.so 195
<br>
196
<br>
197
<a href="#" class="sheet-upload">Upload Item Sheet</a>
198
<br>
199
<br>
200
<a href="#" class="add-items">Add Items To Process</a>
201
<hr>
202
</div>
12313 kshitij.so 203
<div style="color:red;">
204
    #sactionerror()
205
</div>
12256 kshitij.so 206
<div id="content">
207
</div>
208
<div style="margin-bottom: 10px; margin-top: 10px; border: 1px solid black;display:none;" id="scui-alert">  
209
        <div class="scui-alert-inner">
210
	    <h4 style="margin-bottom: 0px; color: green; margin-left: 15px; margin-top: 10px;">Success</h4>
211
	    <ul style="margin-top: 5px; margin-bottom: 5px;" class="multiple">
15491 kshitij.so 212
	    <li style="list-style: none outside none;"><strong>Your request accepted.</strong>You will be notified about status by email.</li>
12256 kshitij.so 213
	    </ul>
214
	</div>
215
</div>
216
<div id="loader" style="display:none;">
217
	<table width="100%">
218
		<tr>
219
			<td style="background-color:white;width:0%;"></td>
220
			<td style="background-color:white;"><img src="/Support/images/galary_loading.gif" /></td>
221
		</tr>
222
	</table>
223
</div>
224
<div id="previous-data">
225
</div>
226
<div id="report-data" style="margin-top:30px;">
227
</div>
228
</body>
229
</html>