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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-6 / +6 lines)
Lines 1058-1069 function _dt_add_filters(table_node, table_dt, filters_options = {}) { Link Here
1058
                    filters_options[i] = filters_options[i](table_dt);
1058
                    filters_options[i] = filters_options[i](table_dt);
1059
                }
1059
                }
1060
                $(filters_options[i]).each(function () {
1060
                $(filters_options[i]).each(function () {
1061
                    let optionValue =
1062
                        table_dt.settings()[0].ajax !== null
1063
                            ? `^${this._id}$`
1064
                            : this._id;
1061
                    let o = $(
1065
                    let o = $(
1062
                        '<option value="^%s$">%s</option>'.format(
1066
                        `<option value="${optionValue}">${this._str}</option>`
1063
                            this._id,
1064
                            this._str
1065
                        )
1066
                    );
1067
                    );
1068
1067
                    // Compare with lc, or selfreg won't match ^SELFREG$ for instance, see bug 32517
1069
                    // Compare with lc, or selfreg won't match ^SELFREG$ for instance, see bug 32517
1068
                    // This is only for category, we might want to apply it only in this case.
1070
                    // This is only for category, we might want to apply it only in this case.
1069
                    existing_search = existing_search.toLowerCase();
1071
                    existing_search = existing_search.toLowerCase();
Lines 1142-1148 function _dt_add_delay_filters(table_dt, table_node) { Link Here
1142
                .find("select")
1144
                .find("select")
1143
                .unbind()
1145
                .unbind()
1144
                .bind("keyup change", function () {
1146
                .bind("keyup change", function () {
1145
                    let value = this.value.length ? "^" + this.value + "$" : "";
1146
                    col_select_search(i, this.value);
1147
                    col_select_search(i, this.value);
1147
                });
1148
                });
1148
        });
1149
        });
1149
- 

Return to bug 40118