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

(-)a/koha-tmpl/intranet-tmpl/prog/css/reports.css (-4 / +4 lines)
Lines 21-27 del { Link Here
21
    background-color: #ffe6e6;
21
    background-color: #ffe6e6;
22
}
22
}
23
23
24
#mana_results_datatable tbody { 
24
#mana_results_datatable tbody {
25
    display:flex;
25
    display:flex;
26
    flex-wrap: wrap;
26
    flex-wrap: wrap;
27
    justify-content: center;
27
    justify-content: center;
Lines 45-51 del { Link Here
45
}
45
}
46
46
47
#mana_results_datatable td{
47
#mana_results_datatable td{
48
    width: 100%; 
48
    width: 100%;
49
    display: inline-block;
49
    display: inline-block;
50
    border: none;
50
    border: none;
51
    background-color: transparent;
51
    background-color: transparent;
Lines 91-97 del { Link Here
91
}
91
}
92
92
93
.report-description {
93
.report-description {
94
    height:5rem; 
94
    height:5rem;
95
}
95
}
96
96
97
#mana_results_datatable .w-40 {
97
#mana_results_datatable .w-40 {
Lines 99-105 del { Link Here
99
}
99
}
100
100
101
.report_info {
101
.report_info {
102
    color: #696969;    
102
    color: #696969;
103
    text-align: right;
103
    text-align: right;
104
    margin: 0 5px;
104
    margin: 0 5px;
105
}
105
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (+4 lines)
Lines 1462-1467 function update_search_description( Link Here
1462
1462
1463
        settings["buttons"] = _dt_buttons({ settings, table_settings });
1463
        settings["buttons"] = _dt_buttons({ settings, table_settings });
1464
1464
1465
        if (options.buttons) {
1466
            settings["buttons"].push(options.buttons);
1467
        }
1468
1465
        if (add_filters) {
1469
        if (add_filters) {
1466
            settings["orderCellsTop"] = true;
1470
            settings["orderCellsTop"] = true;
1467
        }
1471
        }
(-)a/koha-tmpl/intranet-tmpl/prog/js/mana.js (-2 / +52 lines)
Lines 171-179 $(document).ready(function () { Link Here
171
                    var dataSet = {
171
                    var dataSet = {
172
                        _page: Math.floor(start / length) + 1,
172
                        _page: Math.floor(start / length) + 1,
173
                        _per_page: length,
173
                        _per_page: length,
174
                        _order_by: "",
175
                    };
174
                    };
176
175
176
                    if (data.order[0]) {
177
                        dataSet._order_by =
178
                            data.columns[data.order[0].column].data + ":" + data.order[0].dir;
179
                    }
180
177
                    //This is why the kohaTables data function is overwritten, to allow passing the search query as a string.
181
                    //This is why the kohaTables data function is overwritten, to allow passing the search query as a string.
178
                    if (data.search) {
182
                    if (data.search) {
179
                        dataSet.q = data.search.value;
183
                        dataSet.q = data.search.value;
Lines 215-220 $(document).ready(function () { Link Here
215
                { data: "nbofusers" },
219
                { data: "nbofusers" },
216
                { data: "lastimport" },
220
                { data: "lastimport" },
217
            ],
221
            ],
222
            dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"fB>>tr<"bottom pager"ip>',
223
            buttons: [
224
                {
225
                    extend: "collection",
226
                    text:  '<i class="fa-solid fa-arrow-down-short-wide" style="margin-right: 5px;"></i>Sort by',
227
                    attr: {id: 'sort-by-button'},
228
                    align: 'button-right',
229
                    buttons: [
230
                        {
231
                            text: __("Name (A-Z)"),
232
                            action: function (e, dt, node, config) {
233
                                dt.order([1, "asc"]).draw();
234
                                $(".dt-button-background").trigger("click");
235
                            },
236
                        },
237
                        {
238
                            text: __("Name (Z-A)"),
239
                            action: function (e, dt, node, config) {
240
                                dt.order([1, "desc"]).draw();
241
                                $(".dt-button-background").trigger("click");
242
                            },
243
                        },
244
                        {
245
                            text: __("Date (from newest)"),
246
                            action: function (e, dt, node, config) {
247
                                dt.order([4, "desc"]).draw();
248
                                $(".dt-button-background").trigger("click");
249
                            },
250
                        },
251
                        {
252
                            text: __("Date (from oldest)"),
253
                            action: function (e, dt, node, config) {
254
                                dt.order([4, "asc"]).draw();
255
                                $(".dt-button-background").trigger("click");
256
                            },
257
                        },
258
                        {
259
                            text: __('Popularity'),
260
                            action: function (e, dt, node, config) {
261
                                dt.order([3, "desc"]).draw();
262
                                $(".dt-button-background").trigger("click");
263
                            },
264
                        },
265
266
                    ],
267
                },
268
            ],
218
        });
269
        });
219
270
220
        let thead = $("#mana_results_datatable thead");
271
        let thead = $("#mana_results_datatable thead");
221
- 

Return to bug 40906