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

(-)a/koha-tmpl/opac-tmpl/bootstrap/js/global.js (-2 / +16 lines)
Lines 251-257 var facetHandler = function (e) { Link Here
251
251
252
function setPlaceholder(){
252
function setPlaceholder(){
253
    let search_placeholder = $("#masthead_search option:selected").data("placeholder");
253
    let search_placeholder = $("#masthead_search option:selected").data("placeholder");
254
    $("#translControl1").attr("placeholder", search_placeholder );
254
    let clearButton = $('<span class="clear-search"><i class="fa-sharp fa-regular fa-circle-xmark"></i></span>');
255
256
    $("#translControl1").attr("placeholder", search_placeholder ).after(clearButton);
257
258
       clearButton.click(function() {
259
        $("#translControl1").val('').focus();
260
        $(this).hide();
261
    });
262
263
 $("#translControl1").on('input', function() {
264
        if ($(this).val() !== '') {
265
            clearButton.show();
266
        } else {
267
            clearButton.hide();
268
        }
269
    });
255
}
270
}
256
271
257
$(document).ready(function(){
272
$(document).ready(function(){
258
- 

Return to bug 33668