Subversion Repositories SmartDukaan

Rev

Rev 31449 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27873 amit.gupta 1
<style>
28270 tejbeer 2
.grab {
3
	cursor: grab;
4
}
26732 amit.gupta 5
 
28270 tejbeer 6
.grabbed {
7
	box-shadow: 0 0 13px #000;
8
}
26732 amit.gupta 9
 
28270 tejbeer 10
.grabCursor, .grabCursor * {
11
	cursor: grabbing !important;
12
}
13
</style>
26732 amit.gupta 14
 
28270 tejbeer 15
<script>
16
	$(".edit-web-listing").click(function() {
17
		$("#web-editable-container").modal({
18
			backdrop : false
19
		});
20
 
21
	});
22
</script>
23
 
26732 amit.gupta 24
<section class="wrapper">
25
	<div class="row">
26
		<div class="col-lg-12">
28270 tejbeer 27
			<h3 class="page-header">
28
				<i class="icon_document_alt"></i>Web Listing
29
			</h3>
26732 amit.gupta 30
			<ol class="breadcrumb">
28270 tejbeer 31
				<li><i class="fa fa-home"></i><a
32
					href="${rc.contextPath}/dashboard">Home</a></li>
26732 amit.gupta 33
				<li><i class="icon_document_alt"></i>Web Listing</li>
34
			</ol>
35
		</div>
36
	</div>
37
	<div class="col-lg-6">
38
		<div class="row">
28270 tejbeer 39
			<form class="form-inline"
40
				onsubmit="event.preventDefault();addWebListing();">
41
				<div class="form-group">
42
					<label for="web-listing-title">Title</label> <input type="text"
43
						class="form-control" id="web-listing-title"
44
						placeholder="Best Sellers">
45
				</div>
46
				<div class="form-group">
47
					<label for="web-listing-url">Url</label> <input
48
						class="form-control" id="web-listing-url"
49
						placeholder="best-sellers">
50
				</div>
51
 
31447 tejbeer 52
 
53
				<div class="form-group" style="margin-top: 15px">
54
 
55
			      <div class="form-group">
28270 tejbeer 56
					<label for="web-listing-url">Rank</label> <input
57
						class="form-control" id="web-listing-rank" placeholder="Rank">
31447 tejbeer 58
				  </div>
59
					<div class="form-group">
60
					  	<label for="web-listing-source">Source</label>
61
					    <select class="form-control" id="listingSource"
62
                                            name="listingSource" placeholder="Source">
63
                                        <option value="" disabled selected>Source</option>
64
                                        #foreach($source in $sources)
65
                                            <option value="$source">$source</option>
66
                                        #end
67
                                    </select>
68
                    </div>
31568 tejbeer 69
 
70
                    	<div class="form-group">
71
					  	<label for="web-listing-type">Type</label>
72
					    <select class="form-control" id="webType"
73
                                            name="webType" placeholder="Type">
74
                                        <option value="" disabled selected>Type</option>
75
                                        #foreach($type in $types)
76
                                            <option value="$type">$type</option>
77
                                        #end
78
                                    </select>
79
                    </div>
31447 tejbeer 80
 
81
			    </div>
82
 
28301 tejbeer 83
				<div class="form-group" style="margin-top: 15px">
31447 tejbeer 84
 
85
 
28301 tejbeer 86
					<div class="form-group">
28567 tejbeer 87
						<label for="web-listing-bannerurl">Banner Url</label>(365*183)<input
28301 tejbeer 88
							class="form-control" id="web-listing-bannerurl"
89
							placeholder="Banner Url">
90
					</div>
28566 tejbeer 91
 
92
					<div class="form-group">
28567 tejbeer 93
						<label for="web-listing-headerurl">Header Url</label>(272*405)<input
28566 tejbeer 94
							class="form-control" id="web-listing-headerurl"
95
							placeholder="Header Url">
96
					</div>
31447 tejbeer 97
 
98
 
28301 tejbeer 99
					<button type="submit" class="btn btn-default">Add</button>
100
				</div>
26732 amit.gupta 101
			</form>
28270 tejbeer 102
 
103
			<div class="col-lg-4" style="padding: 15px">
104
				<button id="weblisting-update-rank" disabled class="btn btn-default"
105
					type="button">Update Rank</button>
106
			</div>
107
 
26732 amit.gupta 108
		</div>
28270 tejbeer 109
 
26732 amit.gupta 110
		<div class="row">
28270 tejbeer 111
			<table class="table table-border table-condensed table-bordered"
112
				id="catalog-feature-table">
26732 amit.gupta 113
				<thead>
114
					<tr>
26738 amit.gupta 115
						<th>Id</th>
116
						<th>Title</th>
117
						<th>Rank</th>
118
						<th>Url</th>
28301 tejbeer 119
						<th>Banner Url</th>
31447 tejbeer 120
						<th>Source</th>
121
 
28270 tejbeer 122
						<th>Active</th>
123
						<th>Edit</th>
26732 amit.gupta 124
					</tr>
125
				</thead>
28270 tejbeer 126
				<tbody id="web-listing-tbody">
127
					#foreach($webListing in $webListings)
27873 amit.gupta 128
					<tr class="grab" data-id="$webListing.getId()">
26738 amit.gupta 129
						<td>$webListing.getId()</td>
28270 tejbeer 130
						<td><a href="javascript:void(0)"
131
							data-id="$webListing.getId()" class="listing-details">$webListing.getTitle()</a></td>
26738 amit.gupta 132
						<td>$webListing.getRank()</td>
28301 tejbeer 133
						<td>$webListing.getUrl()</td> #if($webListing.getBannerUrl())
134
						<td>$webListing.getBannerUrl()</td> #else
31447 tejbeer 135
						<td></td> #end 
136
 
31449 tejbeer 137
						  <td>$webListing.getTargetSource()</td>
31447 tejbeer 138
 
139
						#if($webListing.isActive())
28270 tejbeer 140
						<td><a data-id="$webListing.getId()"
28342 tejbeer 141
							data-active="$webListing.isActive()" class="web-listing-active">Mark
142
								InActive</a></td> #else
28270 tejbeer 143
						<td><a data-id="$webListing.getId()"
28342 tejbeer 144
							data-active="$webListing.isActive()" class="web-listing-active">Mark
145
								Active</a></td> #end
28270 tejbeer 146
						<td><a data-id="$webListing.getId()"
147
							data-target="#web-listing-edit-modal" data-toggle="modal"
148
							class="web-listing-id">edit</a></td>
26732 amit.gupta 149
					</tr>
28270 tejbeer 150
					#end
151
 
152
 
26732 amit.gupta 153
				</tbody>
154
			</table>
155
		</div>
156
	</div>
31447 tejbeer 157
	<div class="col-lg-5" style="float:right">
26738 amit.gupta 158
		<div id="feature-table">
159
			<div class="row">
28270 tejbeer 160
				<div class="col-lg-12 web-products-container"></div>
161
			</div>
26738 amit.gupta 162
		</div>
163
	</div>
28270 tejbeer 164
</section>
26732 amit.gupta 165
 
28270 tejbeer 166
<div class="web-listing-edit-container">
26732 amit.gupta 167
 
28270 tejbeer 168
	<div id="web-listing-edit-modal" class="modal"
169
		id="web-editable-container" role="dialog">
170
		<div class="modal-dialog modal-md">
171
			<!-- Modal content-->
28343 tejbeer 172
			<div class="modal-content" style="width: 800px; height: 200px;"></div>
28270 tejbeer 173
		</div>
174
	</div>
175
</div>
176
 
177
<script type="text/javascript">
178
	$(document).ready(function() {
179
		$('#catalog-feature-table').DataTable({
180
			"bPaginate" : true,
181
			"bLengthChange" : true,
182
			"bFilter" : true,
183
			"bInfo" : false,
184
			"bAutoWidth" : false,
185
			"pageLength" : 100
186
		});
187
	});
188
</script>