Subversion Repositories SmartDukaan

Rev

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

Rev 36895 Rev 36899
Line 121... Line 121...
121
                                </td>
121
                                </td>
122
                            </tr>
122
                            </tr>
123
                            #end
123
                            #end
124
                        </tbody>
124
                        </tbody>
125
                    </table>
125
                    </table>
-
 
126
                    #if($approvedTotal > 0)
-
 
127
                    <div class="row">
-
 
128
                        <div class="col-lg-12">
-
 
129
                            <div class="pagination-wrapper">
-
 
130
                                <span class="pagination-info">Showing $approvedStartRecord - $approvedEndRecord of $approvedTotal</span>
-
 
131
                                <ul class="pagination pagination-sm">
-
 
132
                                    #if($approvedCurrentPage > 0)
-
 
133
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="0">First</a></li>
-
 
134
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedPrevPage">Prev</a></li>
-
 
135
                                    #else
-
 
136
                                        <li class="disabled"><span>First</span></li>
-
 
137
                                        <li class="disabled"><span>Prev</span></li>
-
 
138
                                    #end
-
 
139
                                    <li class="active"><span>Page $approvedCurrentPageDisplay of $approvedTotalPages</span></li>
-
 
140
                                    #if($approvedCurrentPage < $approvedLastPage)
-
 
141
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedNextPage">Next</a></li>
-
 
142
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedLastPage">Last</a></li>
-
 
143
                                    #else
-
 
144
                                        <li class="disabled"><span>Next</span></li>
-
 
145
                                        <li class="disabled"><span>Last</span></li>
-
 
146
                                    #end
-
 
147
                                </ul>
-
 
148
                                <select class="form-control page-size-select allocation-page-size">
-
 
149
                                    <option value="25" #if($approvedPageSize == 25)selected#end>25 per page</option>
-
 
150
                                    <option value="50" #if($approvedPageSize == 50)selected#end>50 per page</option>
-
 
151
                                    <option value="100" #if($approvedPageSize == 100)selected#end>100 per page</option>
-
 
152
                                </select>
-
 
153
                            </div>
-
 
154
                        </div>
-
 
155
                    </div>
-
 
156
                    #end
126
                </div>
157
                </div>
127
 
158
 
128
            </div>
159
            </div>
129
        </div>
160
        </div>
130
 
161
 
Line 142... Line 173...
142
            "fixedHeader": true,
173
            "fixedHeader": true,
143
            "order": [[0, "desc"]],
174
            "order": [[0, "desc"]],
144
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
175
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
145
        });
176
        });
146
 
177
 
147
        // Initialize second table
-
 
148
        var sanctionTableApproved = $('.approvedRequestedAllocationList').DataTable({
178
        // Approved table is server-paginated (50/page) — no client-side DataTable.
149
            "scrollX": true,
-
 
150
            scrollCollapse: true,
-
 
151
            "fixedHeader": true,
-
 
152
            "order": [[0, "desc"]],
-
 
153
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
-
 
154
        });
-
 
155
 
179
 
156
        // Adjust columns when tab changes
180
        // Adjust columns when tab changes
157
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
181
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
158
            // Wait for tab switch and then adjust columns
182
            // Wait for tab switch and then adjust columns
159
            setTimeout(function () {
183
            setTimeout(function () {
160
                sanctionTable.columns.adjust().draw();
184
                sanctionTable.columns.adjust().draw();
161
                sanctionTableApproved.columns.adjust().draw();
-
 
162
            }, 100); // Delay adjustment slightly to ensure tab switch is complete
185
            }, 100); // Delay adjustment slightly to ensure tab switch is complete
163
        });
186
        });
164
    });
187
    });
165
 
188
 
166
</script>
189
</script>
167
190