Subversion Repositories SmartDukaan

Rev

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

Rev 27756 Rev 27839
Line 120... Line 120...
120
 
120
 
121
</section>
121
</section>
122
<script type="text/javascript">
122
<script type="text/javascript">
123
$(document).ready(function() {
123
$(document).ready(function() {
124
	 $('#warehousePartnerBrandSale thead tr').clone(true).appendTo( '#warehousePartnerBrandSale thead' );
124
	 $('#warehousePartnerBrandSale thead tr').clone(true).appendTo( '#warehousePartnerBrandSale thead' );
125
	    $('#warehousePartnerBrandSale thead tr:eq(1) th').each( function (i) {
125
	 $('#warehousePartnerBrandSale thead tr:eq(1) th').each( function (i) {
126
	        var title = $(this).text();
126
        var title = $(this).text();
127
	        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
127
        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
128
	 
128
 
129
	        $( 'input', this ).on( 'keyup change', function () {
129
        $( 'input', this ).on( 'keyup change', function () {
130
	            if ( table.column(i).search() !== this.value ) {
130
            if ( table.column(i).search() !== this.value ) {
131
	                table
131
                table
132
	                    .column(i)
132
                    .column(i)
133
	                    .search( this.value )
133
                    .search( this.value )
134
	                    .draw();
134
                    .draw();
135
	            }
135
            }
136
	        });
136
        });
137
	    })
137
    });
138
	  var table = $('#warehousePartnerBrandSale').DataTable( {
138
	    var table = $('#warehousePartnerBrandSale').DataTable( {
139
	        orderCellsTop: true,
139
	        orderCellsTop: true,
140
	        fixedHeader: true
140
	        fixedHeader: true
141
	    });
141
	    });
142
 
142
 
143
    
-
 
144
     $('#warehousePartnerBrandSale tbody').on('click', 'tr', function () {
143
    $('#warehousePartnerBrandSale tbody').find('tr').click(function () {
145
        var data = table.row( this ).data();
144
     	var data = table.row( this ).data();
146
        
-
 
147
       var brand = $('#brands').val();
145
     	var brand = $('#brands').val();
148
       doGetAjaxRequestHandler(context + "/getWarehouseAccesoriesBrandWiseItemSale?warehouseId="+data[0]+"&brand="+brand,
146
     	doGetAjaxRequestHandler(context + "/getWarehouseAccesoriesBrandWiseItemSale?warehouseId="+data[0]+"&brand="+brand, function(response) {
149
			function(response) {
-
 
150
				$('.warehouse-brand-item-sale-container').html(response);
147
			$('.warehouse-brand-item-sale-container').html(response);
151
				console.log(response)
148
			console.log(response)
152
			
-
 
153
		});
149
		});
154
		
-
 
155
 
-
 
156
    });
-
 
157
 
-
 
158
});
150
	});
159
 
-
 
160
 
-
 
161
$(document).ready(function() {
151
	$("#warehouse-partner-brand-sale").click(function() {
162
$(document).on('click', "#warehouse-partner-brand-sale",
-
 
163
			function() {
-
 
164
		var brand = $('#brands').val();
152
		var brand = $('#brands').val();
165
          doGetAjaxRequestHandler(context + "/getWarehouseWiseAccesoriesBrandPartnerSale?brand="+brand,
153
		doGetAjaxRequestHandler(context + "/getWarehouseWiseAccesoriesBrandPartnerSale?brand="+brand, function(response) {
166
			function(response) {
-
 
167
				$('#' + "main-content").html(response);
154
			$('#' + "main-content").html(response);
168
				console.log(response)
155
			console.log(response)
169
			});
156
		});
170
	});
157
	});
171
});
-
 
172
 
158
 
-
 
159
});
173
</script>
160
</script>
174
161