diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 17:31:26 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 17:31:26 +0100 |
commit | f9abf75724d33c8b7f793d0fb1646925ed7e80dc (patch) | |
tree | 431fa3b7141b0e2034ac20b1308ab9f73ceab13a | |
parent | 9cb715d77b1f864399023f16c56a6dc088ef5ef1 (diff) | |
download | Ishtar-f9abf75724d33c8b7f793d0fb1646925ed7e80dc.tar.bz2 Ishtar-f9abf75724d33c8b7f793d0fb1646925ed7e80dc.zip |
UI sheet header - add caret to show collapse
-rw-r--r-- | ishtar_common/templates/ishtar/sheet.html | 7 | ||||
-rw-r--r-- | scss/custom.scss | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html index 4596d8ec6..a4a3e2228 100644 --- a/ishtar_common/templates/ishtar/sheet.html +++ b/ishtar_common/templates/ishtar/sheet.html @@ -18,6 +18,7 @@ <a class="card-label" data-toggle="collapse" href="#collapse-{{window_id}}" aria-expanded="true" aria-controls="collapse-{{window_id}}"> + <span class="sheet-caret caret-{{window_id}}"><i class="fa fa-caret-down" aria-hidden="true"></i></span> {% else %} {% if item.qrcode.name %} <table class="window-table-head"> @@ -114,6 +115,12 @@ $('#{{window_id}}-tabs a[href="#{{window_id}}-' + hash + '"]').tab('show'); } + $("#collapse-{{window_id}}").on("hidden.bs.collapse", function () { + $(".card-label .caret-{{window_id}}").html('<i class="fa fa-caret-right" aria-hidden="true"></i>'); + }); + $("#collapse-{{window_id}}").on("shown.bs.collapse", function () { + $(".card-label .caret-{{window_id}}").html('<i class="fa fa-caret-down" aria-hidden="true"></i>'); + }); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $(e.target).resize(); // fix table header refresh for datatable }) diff --git a/scss/custom.scss b/scss/custom.scss index 3cb45a368..0b0da8378 100644 --- a/scss/custom.scss +++ b/scss/custom.scss @@ -440,6 +440,9 @@ textarea { } } +.sheet-caret { display: inline-block; width: 1em; } + +#window-fixed-menu-list .sheet-caret { display: none; } #bookmark-list .input-link{ width: 100%; |