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 1201-1206 fieldset { Link Here
1201
    }
1201
    }
1202
}
1202
}
1203
1203
1204
legend {
1205
    &.collapsed,
1206
    &.expanded {
1207
        border: 1px solid #FFF;
1208
        margin-left: -.7em;
1209
        margin-top: -.7em;
1210
        padding: .7em;
1211
1212
        &:hover {
1213
            border: 1px solid #6FAF44;
1214
            cursor: pointer;
1215
        }
1216
1217
        i {
1218
            color: #4C7AA8;
1219
            font-size: 80%;
1220
            padding-right: .2rem;
1221
        }
1222
    }
1223
1224
    &.collapsed {
1225
        margin-bottom: -.5em;
1226
1227
        i.fa.fa-caret-down::before {
1228
            content: "\f0da";
1229
        }
1230
    }
1231
}
1232
1204
details {
1233
details {
1205
    > summary {
1234
    > summary {
1206
        cursor: pointer;
1235
        cursor: pointer;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc (-4 / +4 lines)
Lines 12-21 Link Here
12
    <input type="hidden" name="op" value="do_search" />
12
    <input type="hidden" name="op" value="do_search" />
13
    <input type="hidden" name="type" value="intranet" />
13
    <input type="hidden" name="type" value="intranet" />
14
    <input type="hidden" name="index" value="[% index | html %]" />
14
    <input type="hidden" name="index" value="[% index | html %]" />
15
    <fieldset class="rows"
15
    <fieldset class="rows">
16
        ><legend>Search options</legend>
16
        <legend class="collapsed"><i class="fa fa-caret-down" title="Collapse this section"></i> Search options</legend>
17
        <ol
17
        <ol style="display:none">
18
            ><li>
18
            <li>
19
                <span class="label">Authority type: </span>
19
                <span class="label">Authority type: </span>
20
                [% authtypecode | html %]
20
                [% authtypecode | html %]
21
                <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
21
                <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-41 lines)
Lines 27-60 Link Here
27
    [% END %]</title
27
    [% END %]</title
28
>
28
>
29
[% INCLUDE 'doc-head-close.inc' %]
29
[% INCLUDE 'doc-head-close.inc' %]
30
[% FILTER collapse %]
31
    <style>
32
        fieldset legend {
33
            border: 1px solid #fff;
34
            margin-left: -0.5em;
35
            margin-top: -0.5em;
36
            padding: 0.7em;
37
        }
38
        fieldset legend:hover {
39
            border: 1px solid #6faf44;
40
            cursor: pointer;
41
        }
42
43
        fieldset legend i {
44
            color: #4c7aa8;
45
            font-size: 80%;
46
            padding-right: 0.2rem;
47
        }
48
49
        fieldset legend.collapsed {
50
            margin-bottom: -0.5em;
51
        }
52
53
        legend.collapsed i.fa.fa-caret-down::before {
54
            content: "\f0da";
55
        }
56
    </style>
57
[% END %]
58
</head>
30
</head>
59
31
60
<body id="pat_memberentrygen" class="pat">
32
<body id="pat_memberentrygen" class="pat">
Lines 1771-1788 Link Here
1771
            [% END %]
1743
            [% END %]
1772
        }
1744
        }
1773
1745
1774
        function togglePanel( node ){
1775
            var panel = node.nextAll();
1776
            if(panel.is(":visible")){
1777
                node.addClass("collapsed").removeClass("expanded").attr("title", _("Click to expand this section") );
1778
                panel.hide();
1779
            } else {
1780
                node.addClass("expanded").removeClass("collapsed").attr("title", _("Click to collapse this section") );
1781
                panel.show();
1782
                panel.find("input, select, textarea").eq(0).focus();
1783
            }
1784
        }
1785
1786
        $(document).ready(function() {
1746
        $(document).ready(function() {
1787
            showHideFields();
1747
            showHideFields();
1788
            $("#toggle_hidden_fields").change(function(){
1748
            $("#toggle_hidden_fields").change(function(){
Lines 1790-1796 Link Here
1790
            });
1750
            });
1791
1751
1792
            $(".collapsed,.expanded").on("click",function(){
1752
            $(".collapsed,.expanded").on("click",function(){
1793
                togglePanel( $(this) );
1794
                $("#messaging_prefs_loading").hide();
1753
                $("#messaging_prefs_loading").hide();
1795
                $("#guarantor_template").hide();
1754
                $("#guarantor_template").hide();
1796
            });
1755
            });
(-)a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js (+8 lines)
Lines 145-150 $(document).ready(function () { Link Here
145
        minLength: 3,
145
        minLength: 3,
146
    });
146
    });
147
    $("#clear-form").click(function () {
147
    $("#clear-form").click(function () {
148
        let legend = $("legend");
149
        if (legend.hasClass("collapsed")) {
150
            legend.click();
151
        }
148
        setTimeout(function () {
152
        setTimeout(function () {
149
            $(":input[type='text']").val("");
153
            $(":input[type='text']").val("");
150
            $("#mainmainentry").val("contains");
154
            $("#mainmainentry").val("contains");
Lines 155-160 $(document).ready(function () { Link Here
155
        }, 50);
159
        }, 50);
156
        return true;
160
        return true;
157
    });
161
    });
162
163
    if ($("#resultlist").length === 0) {
164
        $("legend").click();
165
    }
158
});
166
});
159
167
160
function finderjump(page, full) {
168
function finderjump(page, full) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +21 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")
66
            .removeClass("expanded")
67
            .attr("title", __("Click to expand this section"));
68
        panel.hide();
69
    } else {
70
        node.addClass("expanded")
71
            .removeClass("collapsed")
72
            .attr("title", __("Click to collapse this section"));
73
        panel.show();
74
        panel.find("input, select, textarea").eq(0).focus();
75
    }
76
}
77
62
$(document).ready(function () {
78
$(document).ready(function () {
63
    //check if sticky element is stuck, if so add floating class
79
    //check if sticky element is stuck, if so add floating class
64
    if ($(".sticky").length) {
80
    if ($(".sticky").length) {
Lines 438-443 $(document).ready(function () { Link Here
438
        $(".output.next").prepend(__("Next"));
454
        $(".output.next").prepend(__("Next"));
439
        $(".output.last").prepend(__("Last"));
455
        $(".output.last").prepend(__("Last"));
440
    }
456
    }
457
458
    $(".collapsed,.expanded").on("click", function (e) {
459
        e.preventDefault();
460
        togglePanel($(this));
461
    });
441
});
462
});
442
463
443
function removeLastBorrower() {
464
function removeLastBorrower() {
444
- 

Return to bug 38227