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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+29 lines)
Lines 1237-1242 fieldset { Link Here
1237
    }
1237
    }
1238
}
1238
}
1239
1239
1240
legend {
1241
    &.collapsed,
1242
    &.expanded {
1243
        border: 1px solid #FFF;
1244
        margin-left: -.7em;
1245
        margin-top: -.7em;
1246
        padding: .7em;
1247
1248
        &:hover {
1249
            border: 1px solid #6FAF44;
1250
            cursor: pointer;
1251
        }
1252
1253
        i {
1254
            color: #4C7AA8;
1255
            font-size: 80%;
1256
            padding-right: .2rem;
1257
        }
1258
    }
1259
1260
    &.collapsed {
1261
        margin-bottom: -.5em;
1262
1263
        i.fa.fa-caret-down::before {
1264
            content: "\f0da";
1265
        }
1266
    }
1267
}
1268
1240
details {
1269
details {
1241
    > summary {
1270
    > summary {
1242
        cursor: pointer;
1271
        cursor: pointer;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc (-2 / +4 lines)
Lines 10-17 Link Here
10
            <input type="hidden" name="op" value="do_search" />
10
            <input type="hidden" name="op" value="do_search" />
11
            <input type="hidden" name="type" value="intranet" />
11
            <input type="hidden" name="type" value="intranet" />
12
            <input type="hidden" name="index" value="[% index | html %]" />
12
            <input type="hidden" name="index" value="[% index | html %]" />
13
                <fieldset class="rows"><legend>Search options</legend>
13
                <fieldset class="rows">
14
                <ol><li>
14
                    <legend class="collapsed"><i class="fa fa-caret-down" title="Collapse this section"></i> Search options</legend>
15
                <ol style="display:none">
16
                    <li>
15
                    <span class="label">Authority type: </span>
17
                    <span class="label">Authority type: </span>
16
                    [% authtypecode | html %]
18
                    [% authtypecode | html %]
17
                    <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
19
                    <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-39 lines)
Lines 26-57 Link Here
26
    [% t("Koha") | html %]
26
    [% t("Koha") | html %]
27
[% END %]</title>
27
[% END %]</title>
28
[% INCLUDE 'doc-head-close.inc' %]
28
[% INCLUDE 'doc-head-close.inc' %]
29
<style>[% FILTER collapse %]
30
fieldset legend {
31
    border: 1px solid #FFF;
32
    margin-left: -.5em;
33
    margin-top: -.5em;
34
    padding: .7em;
35
}
36
fieldset legend:hover {
37
    border: 1px solid #6FAF44;
38
    cursor: pointer;
39
}
40
41
fieldset legend i {
42
    color: #4C7AA8;
43
    font-size: 80%;
44
    padding-right: .2rem;
45
}
46
47
fieldset legend.collapsed {
48
    margin-bottom: -.5em;
49
}
50
51
legend.collapsed i.fa.fa-caret-down::before {
52
    content: "\f0da";
53
}
54
[% END %]</style>
55
</head>
29
</head>
56
30
57
<body id="pat_memberentrygen" class="pat">
31
<body id="pat_memberentrygen" class="pat">
Lines 1871-1888 legend.collapsed i.fa.fa-caret-down::before { Link Here
1871
            [% END %]
1845
            [% END %]
1872
        }
1846
        }
1873
1847
1874
        function togglePanel( node ){
1875
            var panel = node.nextAll();
1876
            if(panel.is(":visible")){
1877
                node.addClass("collapsed").removeClass("expanded").attr("title", _("Click to expand this section") );
1878
                panel.hide();
1879
            } else {
1880
                node.addClass("expanded").removeClass("collapsed").attr("title", _("Click to collapse this section") );
1881
                panel.show();
1882
                panel.find("input, select, textarea").eq(0).focus();
1883
            }
1884
        }
1885
1886
        $(document).ready(function() {
1848
        $(document).ready(function() {
1887
            showHideFields();
1849
            showHideFields();
1888
            $("#toggle_hidden_fields").change(function(){
1850
            $("#toggle_hidden_fields").change(function(){
Lines 1890-1896 legend.collapsed i.fa.fa-caret-down::before { Link Here
1890
            });
1852
            });
1891
1853
1892
            $(".collapsed,.expanded").on("click",function(){
1854
            $(".collapsed,.expanded").on("click",function(){
1893
                togglePanel( $(this) );
1894
                $("#messaging_prefs_loading").hide();
1855
                $("#messaging_prefs_loading").hide();
1895
                $("#guarantor_template").hide();
1856
                $("#guarantor_template").hide();
1896
            });
1857
            });
(-)a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js (+8 lines)
Lines 134-139 $(document).ready(function(){ Link Here
134
        minLength: 3,
134
        minLength: 3,
135
    });
135
    });
136
    $("#clear-form").click(function(){
136
    $("#clear-form").click(function(){
137
        let legend = $("legend");
138
        if( legend.hasClass("collapsed") ){
139
            legend.click();
140
        };
137
        setTimeout(function(){
141
        setTimeout(function(){
138
            $(":input[type='text']").val('');
142
            $(":input[type='text']").val('');
139
            $("#mainmainentry").val("contains");
143
            $("#mainmainentry").val("contains");
Lines 144-149 $(document).ready(function(){ Link Here
144
        }, 50);
148
        }, 50);
145
        return true;
149
        return true;
146
    });
150
    });
151
152
    if( $("#resultlist").length === 0 ){
153
        $("legend").click();
154
    }
147
});
155
});
148
156
149
function finderjump(page, full){
157
function finderjump(page, full){
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +16 lines)
Lines 59-64 $.fn.selectTabByID = function (tabID) { Link Here
59
    $("a[href='" + tabID + "']", $(this)).tab("show");
59
    $("a[href='" + tabID + "']", $(this)).tab("show");
60
};
60
};
61
61
62
function togglePanel( node ){
63
    var panel = node.nextAll();
64
    if(panel.is(":visible")){
65
        node.addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") );
66
        panel.hide();
67
    } else {
68
        node.addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") );
69
        panel.show();
70
        panel.find("input, select, textarea").eq(0).focus();
71
    }
72
}
73
62
$(document).ready(function () {
74
$(document).ready(function () {
63
    //check if sticky element is stuck, if so add floating class
75
    //check if sticky element is stuck, if so add floating class
64
    if ( $('.sticky').length ) {
76
    if ( $('.sticky').length ) {
Lines 392-397 $(document).ready(function () { Link Here
392
        $('[data-bs-toggle="tooltip"]').tooltip();
404
        $('[data-bs-toggle="tooltip"]').tooltip();
393
    }
405
    }
394
406
407
    $(".collapsed,.expanded").on("click",function(e){
408
        e.preventDefault();
409
        togglePanel( $(this) );
410
    });
395
});
411
});
396
412
397
function removeLastBorrower() {
413
function removeLastBorrower() {
398
- 

Return to bug 38227