View | Details | Raw Unified | Return to bug 29648
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +1 lines)
Lines 838-844 Link Here
838
    <script>
838
    <script>
839
        var prefilters = '[% prefilters | $raw %]';
839
        var prefilters = '[% prefilters | $raw %]';
840
        // Set column settings
840
        // Set column settings
841
        var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
841
        var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
842
842
843
        [% IF services_json.length > 0 %]
843
        [% IF services_json.length > 0 %]
844
        var services = [% services_json | $raw %];
844
        var services = [% services_json | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt (-1 / +1 lines)
Lines 59-65 Link Here
59
        <script>
59
        <script>
60
            var prefilters = '[% prefilters | html %]';
60
            var prefilters = '[% prefilters | html %]';
61
            // Set column settings
61
            // Set column settings
62
            var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
62
            var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
63
        </script>
63
        </script>
64
        [% INCLUDE 'ill-list-table-strings.inc' %]
64
        [% INCLUDE 'ill-list-table-strings.inc' %]
65
        [% Asset.js("js/ill-list-table.js") | $raw %]
65
        [% Asset.js("js/ill-list-table.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js (-39 / +41 lines)
Lines 188-238 $(document).ready(function() { Link Here
188
            // Initialise the table
188
            // Initialise the table
189
            // Since we're not able to use the columns settings in core,
189
            // Since we're not able to use the columns settings in core,
190
            // we need to mock the object that it would return
190
            // we need to mock the object that it would return
191
            var columns_settings = [
191
            var table_settings = {
192
				{
192
                "columns": [
193
					cannot_be_modified: 0,
193
                    {
194
					cannot_be_toggled: 0,
194
                        cannot_be_modified : 0,
195
					columnname: 'source',
195
                        cannot_be_toggled  : 0,
196
					is_hidden: 0
196
                        columnname         : 'source',
197
				},
197
                        is_hidden          : 0
198
				{
198
                    },
199
					cannot_be_modified: 0,
199
                    {
200
					cannot_be_toggled: 0,
200
                        cannot_be_modified : 0,
201
					columnname: 'title',
201
                        cannot_be_toggled  : 0,
202
					is_hidden: 0
202
                        columnname         : 'title',
203
				},
203
                        is_hidden          : 0
204
				{
204
                    },
205
					cannot_be_modified: 0,
205
                    {
206
					cannot_be_toggled: 0,
206
                        cannot_be_modified : 0,
207
					columnname: 'author',
207
                        cannot_be_toggled  : 0,
208
					is_hidden: 0
208
                        columnname         : 'author',
209
				},
209
                        is_hidden          : 0
210
				{
210
                    },
211
					cannot_be_modified: 0,
211
                    {
212
					cannot_be_toggled: 0,
212
                        cannot_be_modified : 0,
213
					columnname: 'isbn',
213
                        cannot_be_toggled  : 0,
214
					is_hidden: 0
214
                        columnname         : 'isbn',
215
				},
215
                        is_hidden          : 0
216
				{
216
                    },
217
					cannot_be_modified: 0,
217
                    {
218
					cannot_be_toggled: 0,
218
                        cannot_be_modified : 0,
219
					columnname: 'issn',
219
                        cannot_be_toggled  : 0,
220
					is_hidden: 0
220
                        columnname         : 'issn',
221
				},
221
                        is_hidden          : 0
222
				{
222
                    },
223
					cannot_be_modified: 0,
223
                    {
224
					cannot_be_toggled: 0,
224
                        cannot_be_modified : 0,
225
					columnname: 'date',
225
                        cannot_be_toggled  : 0,
226
					is_hidden: 0
226
                        columnname         : 'date',
227
				}
227
                        is_hidden          : 0
228
            ];
228
                    }
229
                ]
230
            };
229
            // Hide pagination buttons if appropriate
231
            // Hide pagination buttons if appropriate
230
            tableDef.drawCallback = function() {
232
            tableDef.drawCallback = function() {
231
                var pagination = $(this).closest('.dataTables_wrapper')
233
                var pagination = $(this).closest('.dataTables_wrapper')
232
                    .find('.dataTables_paginate');
234
                    .find('.dataTables_paginate');
233
                pagination.toggle(this.api().page.info().pages > 1);
235
                pagination.toggle(this.api().page.info().pages > 1);
234
            }
236
            }
235
            KohaTable(service.id, tableDef, columns_settings);
237
            KohaTable(service.id, tableDef, table_settings);
236
        });
238
        });
237
    }
239
    }
238
240
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js (-3 / +3 lines)
Lines 405-411 $(document).ready(function() { Link Here
405
            // Assemble an array of column definitions for passing
405
            // Assemble an array of column definitions for passing
406
            // to datatables
406
            // to datatables
407
            var colData = [];
407
            var colData = [];
408
            columns_settings.forEach(function(thisCol) {
408
            var columns = table_settings['columns'];
409
            columns.forEach(function(thisCol) {
409
                var colName = thisCol.columnname;
410
                var colName = thisCol.columnname;
410
                // Create the base column object
411
                // Create the base column object
411
                var colObj = $.extend({}, thisCol);
412
                var colObj = $.extend({}, thisCol);
Lines 494-500 $(document).ready(function() { Link Here
494
                    }
495
                    }
495
496
496
                }
497
                }
497
            }, columns_settings);
498
            }, table_settings);
498
499
499
            // Custom date range filtering
500
            // Custom date range filtering
500
            $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
501
            $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
501
- 

Return to bug 29648