Subversion Repositories SmartDukaan

Rev

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

Rev 36899 Rev 36902
Line 69... Line 69...
69
                                </td>
69
                                </td>
70
                            </tr>
70
                            </tr>
71
                            #end
71
                            #end
72
                        </tbody>
72
                        </tbody>
73
                    </table>
73
                    </table>
-
 
74
                    #if($pendingTotal > 0)
-
 
75
                    <div class="row">
-
 
76
                        <div class="col-lg-12">
-
 
77
                            <div class="pagination-wrapper">
-
 
78
                                <span class="pagination-info">Showing $pendingStartRecord - $pendingEndRecord of $pendingTotal</span>
-
 
79
                                <ul class="pagination pagination-sm">
-
 
80
                                    #if($pendingCurrentPage > 0)
-
 
81
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="0">First</a></li>
-
 
82
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingPrevPage">Prev</a></li>
-
 
83
                                    #else
-
 
84
                                        <li class="disabled"><span>First</span></li>
-
 
85
                                        <li class="disabled"><span>Prev</span></li>
-
 
86
                                    #end
-
 
87
                                    <li class="active"><span>Page $pendingCurrentPageDisplay of $pendingTotalPages</span></li>
-
 
88
                                    #if($pendingCurrentPage < $pendingLastPage)
-
 
89
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingNextPage">Next</a></li>
-
 
90
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingLastPage">Last</a></li>
-
 
91
                                    #else
-
 
92
                                        <li class="disabled"><span>Next</span></li>
-
 
93
                                        <li class="disabled"><span>Last</span></li>
-
 
94
                                    #end
-
 
95
                                </ul>
-
 
96
                                <select class="form-control page-size-select pending-page-size">
-
 
97
                                    <option value="25" #if($pendingPageSize == 25)selected#end>25 per page</option>
-
 
98
                                    <option value="50" #if($pendingPageSize == 50)selected#end>50 per page</option>
-
 
99
                                    <option value="100" #if($pendingPageSize == 100)selected#end>100 per page</option>
-
 
100
                                </select>
-
 
101
                            </div>
-
 
102
                        </div>
-
 
103
                    </div>
-
 
104
                    #end
74
                </div>
105
                </div>
75
                <div id="approved" class="tab-pane fade">
106
                <div id="approved" class="tab-pane fade">
76
                    <table class="table table-bordered table-condensed approvedRequestedAllocationList"
107
                    <table class="table table-bordered table-condensed approvedRequestedAllocationList"
77
                           style="width:100%">
108
                           style="width:100%">
78
                        <thead class="row htable" style="background:#F5F5F5;">
109
                        <thead class="row htable" style="background:#F5F5F5;">
Line 163... Line 194...
163
 
194
 
164
</section>
195
</section>
165
 
196
 
166
<script>
197
<script>
167
 
198
 
168
    $(document).ready(function () {
-
 
169
        // Initialize first table
-
 
170
        var sanctionTable = $('.pendingRequestedAllocationList').DataTable({
-
 
171
            "scrollX": true,
-
 
172
            scrollCollapse: true,
-
 
173
            "fixedHeader": true,
-
 
174
            "order": [[0, "desc"]],
-
 
175
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
-
 
176
        });
-
 
177
 
-
 
178
        // Approved table is server-paginated (50/page) — no client-side DataTable.
199
    // Both Pending and Approved tabs are server-paginated (50/page); no client-side DataTable.
179
 
-
 
180
        // Adjust columns when tab changes
-
 
181
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
-
 
182
            // Wait for tab switch and then adjust columns
-
 
183
            setTimeout(function () {
-
 
184
                sanctionTable.columns.adjust().draw();
-
 
185
            }, 100); // Delay adjustment slightly to ensure tab switch is complete
-
 
186
        });
-
 
187
    });
-
 
188
 
200
 
189
</script>
201
</script>
190
202