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 1208-1213 fieldset { Link Here
1208
    }
1208
    }
1209
}
1209
}
1210
1210
1211
legend {
1212
    &.collapsed,
1213
    &.expanded {
1214
        border: 1px solid #FFF;
1215
        margin-left: -.7em;
1216
        margin-top: -.7em;
1217
        padding: .7em;
1218
1219
        &:hover {
1220
            border: 1px solid #6FAF44;
1221
            cursor: pointer;
1222
        }
1223
1224
        i {
1225
            color: #4C7AA8;
1226
            font-size: 80%;
1227
            padding-right: .2rem;
1228
        }
1229
    }
1230
1231
    &.collapsed {
1232
        margin-bottom: -.5em;
1233
1234
        i.fa.fa-caret-down::before {
1235
            content: "\f0da";
1236
        }
1237
    }
1238
}
1239
1211
details {
1240
details {
1212
    > summary {
1241
    > summary {
1213
        cursor: pointer;
1242
        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 1856-1873 legend.collapsed i.fa.fa-caret-down::before { Link Here
1856
            [% END %]
1830
            [% END %]
1857
        }
1831
        }
1858
1832
1859
        function togglePanel( node ){
1860
            var panel = node.nextAll();
1861
            if(panel.is(":visible")){
1862
                node.addClass("collapsed").removeClass("expanded").attr("title", _("Click to expand this section") );
1863
                panel.hide();
1864
            } else {
1865
                node.addClass("expanded").removeClass("collapsed").attr("title", _("Click to collapse this section") );
1866
                panel.show();
1867
                panel.find("input, select, textarea").eq(0).focus();
1868
            }
1869
        }
1870
1871
        $(document).ready(function() {
1833
        $(document).ready(function() {
1872
            showHideFields();
1834
            showHideFields();
1873
            $("#toggle_hidden_fields").change(function(){
1835
            $("#toggle_hidden_fields").change(function(){
Lines 1875-1881 legend.collapsed i.fa.fa-caret-down::before { Link Here
1875
            });
1837
            });
1876
1838
1877
            $(".collapsed,.expanded").on("click",function(){
1839
            $(".collapsed,.expanded").on("click",function(){
1878
                togglePanel( $(this) );
1879
                $("#messaging_prefs_loading").hide();
1840
                $("#messaging_prefs_loading").hide();
1880
                $("#guarantor_template").hide();
1841
                $("#guarantor_template").hide();
1881
            });
1842
            });
(-)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