Subversion Repositories SmartDukaan

Rev

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

Rev 27541 Rev 27550
Line 120... Line 120...
120
					
120
					
121
 
121
 
122
</section>
122
</section>
123
<script type="text/javascript">
123
<script type="text/javascript">
124
$(document).ready(function() {
124
$(document).ready(function() {
-
 
125
    
-
 
126
    $('#warehouseBrandStock thead tr').clone(true).appendTo( '#warehouseBrandStock thead' );
-
 
127
    $('#warehouseBrandStock thead tr:eq(1) th').each( function (i) {
-
 
128
        var title = $(this).text();
-
 
129
        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
-
 
130
 
-
 
131
        $( 'input', this ).on( 'keyup change', function () {
-
 
132
            if ( table.column(i).search() !== this.value ) {
-
 
133
                table
-
 
134
                    .column(i)
-
 
135
                    .search( this.value )
-
 
136
                    .draw();
-
 
137
            }
-
 
138
        } );
-
 
139
    } )
125
    indentTable = $('#warehouseBrandStock').DataTable();
140
    var table = $('#warehouseBrandStock').DataTable( {
-
 
141
        orderCellsTop: true,
-
 
142
        fixedHeader: true
-
 
143
    } );
126
    
144
    
127
    
145
    
128
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
146
    $('#warehouseBrandStock tbody').on('click', 'tr', function () {
129
        var data = indentTable.row( this ).data();
147
        var data = indentTable.row( this ).data();
130
        
148