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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-17 / +14 lines)
Lines 196-219 function verify_images() { Link Here
196
    browser.show();
196
    browser.show();
197
197
198
    function activate_filters(id) {
198
    function activate_filters(id) {
199
        table = $("#" + id + " table");
199
        var table = $("#" + id + " table");
200
        if (table.length == 1) {
200
        if (table.length == 1) {
201
            filters_row = table.find('thead tr.filters_row');
201
            filters_row = table.find('thead tr.filters_row');
202
202
203
            [% IF StaffDetailItemSelection %]
204
                var aoColumns = [];
203
                var aoColumns = [];
205
                filters_row.find('th').each(function() {
204
                filters_row.find('th').each(function() {
206
                    aoColumns.push('text');
205
                    if(this.className === "NoSort"){
206
                        aoColumns.push(null);
207
                    } else {
208
                        aoColumns.push('text');
209
                    }
207
                });
210
                });
208
                aoColumns[0] = null;
209
            [% END %]
210
211
211
            if (table.find('thead tr.columnFilter').length == 0) {
212
            if (table.find('thead tr.columnFilter').length == 0) {
212
                table.dataTable().columnFilter({
213
                table.dataTable().columnFilter({
213
                    'sPlaceHolder': 'head:after'
214
                    'sPlaceHolder': 'head:after'
214
                    [% IF StaffDetailItemSelection %]
215
                    ,   'aoColumns': aoColumns
215
                    ,   'aoColumns': aoColumns
216
                    [% END %]
217
                });
216
                });
218
                filters_row.addClass('columnFilter');
217
                filters_row.addClass('columnFilter');
219
            }
218
            }
Lines 251-273 function verify_images() { Link Here
251
        var ids = ['holdings', 'otherholdings'];
250
        var ids = ['holdings', 'otherholdings'];
252
        for (var i in ids) {
251
        for (var i in ids) {
253
            var id = ids[i];
252
            var id = ids[i];
254
            table = $('#' + id + ' table');
253
            var table = $('#' + id + ' table');
255
254
256
            // Duplicate the table header row for columnFilter
255
            // Duplicate the table header row for columnFilter
257
            thead_row = table.find('thead tr');
256
            thead_row = table.find('thead tr');
258
            clone = thead_row.clone().addClass('filters_row');
257
            clone = thead_row.clone().addClass('filters_row');
258
            clone.find("th.NoSort").html('');
259
            thead_row.before(clone);
259
            thead_row.before(clone);
260
260
261
            // Enable sorting
261
            // Enable sorting
262
            table.dataTable($.extend(true, {}, dataTablesDefaults, {
262
            table.dataTable($.extend(true, {}, dataTablesDefaults, {
263
                'sDom': 't',
263
                'sDom': 't',
264
                'bPaginate': false,
264
                'bPaginate': false,
265
                'bAutoWidth': false
265
                'bAutoWidth': false,
266
                [% IF StaffDetailItemSelection %]
266
                "aoColumnDefs": [
267
                ,   "aoColumnDefs": [
267
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
268
                        { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
268
                ]
269
                    ]
270
                [% END %]
271
            }));
269
            }));
272
270
273
            // Show a link to activate filtering
271
            // Show a link to activate filtering
Lines 542-548 function verify_images() { Link Here
542
    <table class="items_table">
540
    <table class="items_table">
543
        <thead>
541
        <thead>
544
            <tr>
542
            <tr>
545
                [% IF (StaffDetailItemSelection) %]<th></th>[% END %]
543
                [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %]
546
                [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
544
                [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
547
                <th>Current location</th>
545
                <th>Current location</th>
548
                <th>Home library</th>
546
                <th>Home library</th>
Lines 560-566 function verify_images() { Link Here
560
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
558
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
561
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
559
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
562
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
560
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
563
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th>Edit</th>[% END %]
561
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">Edit</th>[% END %]
564
            </tr>
562
            </tr>
565
        </thead>
563
        </thead>
566
        <tbody>
564
        <tbody>
567
- 

Return to bug 13036