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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-20 / +21 lines)
Lines 4-9 Link Here
4
[% USE Categories %]
4
[% USE Categories %]
5
[% USE AuthClient %]
5
[% USE AuthClient %]
6
[% USE AdditionalContents %]
6
[% USE AdditionalContents %]
7
[% PROCESS 'i18n.inc' %]
7
[% PROCESS 'html_helpers.inc' %]
8
[% PROCESS 'html_helpers.inc' %]
8
[% IF Koha.Preference( 'CookieConsent' ) %]
9
[% IF Koha.Preference( 'CookieConsent' ) %]
9
    [% USE JSConsents %]
10
    [% USE JSConsents %]
Lines 192-242 Link Here
192
                                            <div class="col-sm-auto order-2 order-sm-2">
193
                                            <div class="col-sm-auto order-2 order-sm-2">
193
                                                <select name="idx" id="masthead_search" class="form-control">
194
                                                <select name="idx" id="masthead_search" class="form-control">
194
                                                    [% IF ( ms_kw ) %]
195
                                                    [% IF ( ms_kw ) %]
195
                                                        <option selected="selected" value="">Library catalog</option>
196
                                                        <option selected="selected" value="" data-placeholder="[% t("Search the catalog by keyword") | html %]">Library catalog</option>
196
                                                    [% ELSE %]
197
                                                    [% ELSE %]
197
                                                        <option value="">Library catalog</option>
198
                                                        <option value="" data-placeholder="[% t("Search the catalog by keyword") | html %]">Library catalog</option>
198
                                                    [% END # /ms_kw %]
199
                                                    [% END # /ms_kw %]
199
                                                    [% IF ( ms_ti ) %]
200
                                                    [% IF ( ms_ti ) %]
200
                                                        <option selected="selected" value="ti">Title</option>
201
                                                        <option selected="selected" value="ti" data-placeholder="[% t("Search the catalog by title") | html %]">Title</option>
201
                                                    [% ELSE %]
202
                                                    [% ELSE %]
202
                                                        <option value="ti">Title</option>
203
                                                        <option value="ti" data-placeholder="[% t("Search the catalog by title") | html %]">Title</option>
203
                                                    [% END # /ms_ti %]
204
                                                    [% END # /ms_ti %]
204
                                                    [% IF ( ms_au ) %]
205
                                                    [% IF ( ms_au ) %]
205
                                                        <option selected="selected" value="au">Author</option>
206
                                                        <option selected="selected" value="au" data-placeholder="[% t("Search the catalog by author") | html %]">Author</option>
206
                                                    [% ELSE %]
207
                                                    [% ELSE %]
207
                                                        <option value="au">Author</option>
208
                                                        <option value="au" data-placeholder="[% t("Search the catalog by author") | html %]">Author</option>
208
                                                    [% END # /ms_au%]
209
                                                    [% END # /ms_au%]
209
                                                    [% IF ( ms_su ) %]
210
                                                    [% IF ( ms_su ) %]
210
                                                        <option selected="selected" value="su">Subject</option>
211
                                                        <option selected="selected" value="su" data-placeholder="[% t("Search the catalog by subject") | html %]">Subject</option>
211
                                                    [% ELSE %]
212
                                                    [% ELSE %]
212
                                                        <option value="su">Subject</option>
213
                                                        <option value="su" data-placeholder="[% t("Search the catalog by subject") | html %]">Subject</option>
213
                                                    [% END # /ms_su %]
214
                                                    [% END # /ms_su %]
214
                                                    [% IF ( ms_nb ) %]
215
                                                    [% IF ( ms_nb ) %]
215
                                                        <option selected="selected" value="nb">ISBN</option>
216
                                                        <option selected="selected" value="nb" data-placeholder="[% t("Search the catalog by ISBN") | html %]">ISBN</option>
216
                                                    [% ELSE %]
217
                                                    [% ELSE %]
217
                                                        <option value="nb">ISBN</option>
218
                                                        <option value="nb" data-placeholder="[% t("Search the catalog by ISBN") | html %]">ISBN</option>
218
                                                    [% END # /ms_nb%]
219
                                                    [% END # /ms_nb%]
219
                                                    [% IF ( ms_ns ) %]
220
                                                    [% IF ( ms_ns ) %]
220
                                                        <option selected="selected" value="ns">ISSN</option>
221
                                                        <option selected="selected" value="ns" data-placeholder="[% t("Search the catalog by ISSN") | html %]">ISSN</option>
221
                                                    [% ELSE %]
222
                                                    [% ELSE %]
222
                                                        <option value="ns">ISSN</option>
223
                                                        <option value="ns" data-placeholder="[% t("Search the catalog by ISSN") | html %]">ISSN</option>
223
                                                    [% END # /ms_ns%]
224
                                                    [% END # /ms_ns%]
224
                                                    [% IF ( ms_se ) %]
225
                                                    [% IF ( ms_se ) %]
225
                                                        <option selected="selected" value="se">Series</option>
226
                                                        <option selected="selected" value="se" data-placeholder="[% t("Search the catalog by series") | html %]">Series</option>
226
                                                    [% ELSE %]
227
                                                    [% ELSE %]
227
                                                        <option value="se">Series</option>
228
                                                        <option value="se" data-placeholder="[% t("Search the catalog by series") | html %]">Series</option>
228
                                                    [% END # /ms_se %]
229
                                                    [% END # /ms_se %]
229
                                                    [% IF ( Koha.Preference('OPACNumbersPreferPhrase') ) %]
230
                                                    [% IF ( Koha.Preference('OPACNumbersPreferPhrase') ) %]
230
                                                        [% IF ( ms_callnumcommaphr ) %]
231
                                                        [% IF ( ms_callnumcommaphr ) %]
231
                                                            <option selected="selected" value="callnum,phr">Call number</option>
232
                                                            <option selected="selected" value="callnum,phr" data-placeholder="[% t("Search the catalog by call number") | html %]">Call number</option>
232
                                                        [% ELSE %]
233
                                                        [% ELSE %]
233
                                                            <option value="callnum,phr">Call number</option>
234
                                                            <option value="callnum,phr" data-placeholder="[% t("Search the catalog by call number") | html %]">Call number</option>
234
                                                        [% END #/ms_callnumcommaphr %]
235
                                                        [% END #/ms_callnumcommaphr %]
235
                                                    [% ELSE %]
236
                                                    [% ELSE %]
236
                                                        [% IF ( ms_callnum ) %]
237
                                                        [% IF ( ms_callnum ) %]
237
                                                            <option selected="selected" value="callnum">Call number</option>
238
                                                            <option selected="selected" value="callnum" data-placeholder="[% t("Search the catalog by call number") | html %]">Call number</option>
238
                                                        [% ELSE %]
239
                                                        [% ELSE %]
239
                                                            <option value="callnum">Call number</option>
240
                                                            <option value="callnum" data-placeholder="[% t("Search the catalog by call number") | html %]">Call number</option>
240
                                                        [% END # /ms_callnum %]
241
                                                        [% END # /ms_callnum %]
241
                                                    [% END # /IF OPACNumbersPreferPhrase %]
242
                                                    [% END # /IF OPACNumbersPreferPhrase %]
242
                                                </select>
243
                                                </select>
Lines 244-252 Link Here
244
245
245
                                            <div class="col order-4 order-sm-3">
246
                                            <div class="col order-4 order-sm-3">
246
                                                [% IF ( !Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && mylibraryfirst ) %]
247
                                                [% IF ( !Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && mylibraryfirst ) %]
247
                                                    <input type="text" class="transl1 form-control form-control-filtered" id="translControl1" name="q" value="[% ms_value | html %]" data-toggle="tooltip" data-placement="top" title="Searching in [% Branches.GetName( mylibraryfirst ) | html %] only" /><span id="translControl"></span>
248
                                                    <input type="text" class="transl1 form-control form-control-filtered" id="translControl1" name="q" value="[% ms_value | html %]" data-toggle="tooltip" data-placement="top" title="Searching in [% Branches.GetName( mylibraryfirst ) | html %] only" placeholder="Search the catalog by keyword" /><span id="translControl"></span>
248
                                                [% ELSE %]
249
                                                [% ELSE %]
249
                                                    <input type="text" class="transl1 form-control" id="translControl1" name="q" value="[% ms_value | html %]" /><span id="translControl"></span>
250
                                                    <input type="text" class="transl1 form-control" id="translControl1" name="q" value="[% ms_value | html %]" placeholder="Search the catalog by keyword" /><span id="translControl"></span>
250
                                                [% END # /ms_value %]
251
                                                [% END # /ms_value %]
251
                                            </div> <!-- /.col -->
252
                                            </div> <!-- /.col -->
252
253
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/global.js (-2 / +11 lines)
Lines 249-255 var facetHandler = function (e) { Link Here
249
    $(".menu-collapse").toggle();
249
    $(".menu-collapse").toggle();
250
};
250
};
251
251
252
$(document).ready(function () {
252
function setPlaceholder(){
253
    let search_placeholder = $("#masthead_search option:selected").data("placeholder");
254
    $("#translControl1").attr("placeholder", search_placeholder );
255
}
256
257
$(document).ready(function(){
253
    $("html").removeClass("no-js").addClass("js");
258
    $("html").removeClass("no-js").addClass("js");
254
    $(".close").click(function () {
259
    $(".close").click(function () {
255
        window.close();
260
        window.close();
Lines 337-340 $(document).ready(function () { Link Here
337
        e.preventDefault();
342
        e.preventDefault();
338
        $("html,body").animate({ scrollTop: 0 }, "slow");
343
        $("html,body").animate({ scrollTop: 0 }, "slow");
339
    });
344
    });
345
346
    setPlaceholder();
347
    $("#masthead_search").on("change", function(){
348
        setPlaceholder();
349
    });
340
});
350
});
341
- 

Return to bug 36651