diff options
author | ybosy <author@example.com> | 2017-04-07 10:46:35 +0200 |
---|---|---|
committer | Florian Zschocke <zschocke@gmx.de> | 2019-06-15 13:37:34 +0200 |
commit | 150ff287d220b93092e689c887a64b00a21a2693 (patch) | |
tree | 343bd9a2d64c1b28e5428aa419b54861524bac5e /src/main/resources | |
parent | d05e9eeed11c36594b049b22705709d1ebfb97b9 (diff) | |
download | gitblit-150ff287d220b93092e689c887a64b00a21a2693.tar.gz gitblit-150ff287d220b93092e689c887a64b00a21a2693.zip |
collapsible group repositories
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/gitblit/js/collapsible-table.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/resources/gitblit/js/collapsible-table.js b/src/main/resources/gitblit/js/collapsible-table.js new file mode 100644 index 00000000..538b412e --- /dev/null +++ b/src/main/resources/gitblit/js/collapsible-table.js @@ -0,0 +1,32 @@ +$(function() {
+ $('i.table-group-collapsible')
+ .click(function(){
+ $(this).closest('tr.group.collapsible').nextUntil('tr.group.collapsible').toggle();
+ $(this).toggleClass('fa-minus-square-o');
+ $(this).toggleClass('fa-plus-square-o');
+ });
+
+ $('i.table-openall-collapsible')
+ .click(function(){
+ $('tr.group.collapsible').first().find('i').addClass('fa-minus-square-o');
+ $('tr.group.collapsible').first().find('i').removeClass('fa-plus-square-o');
+ $('tr.group.collapsible').first().nextAll('tr:not(tr.group.collapsible)').show();
+ $('tr.group.collapsible').first().nextAll('tr.group.collapsible').find('i').addClass('fa-minus-square-o');
+ $('tr.group.collapsible').first().nextAll('tr.group.collapsible').find('i').removeClass('fa-plus-square-o');
+ });
+
+ $('i.table-closeall-collapsible')
+ .click(function(){
+ $('tr.group.collapsible').first().find('i').addClass('fa-plus-square-o');
+ $('tr.group.collapsible').first().find('i').removeClass('fa-minus-square-o');
+ $('tr.group.collapsible').first().nextAll('tr:not(tr.group.collapsible)').hide();
+ $('tr.group.collapsible').first().nextAll('tr.group.collapsible').find('i').addClass('fa-plus-square-o');
+ $('tr.group.collapsible').first().nextAll('tr.group.collapsible').find('i').removeClass('fa-minus-square-o');
+ });
+
+ $( document ).ready(function() {
+ if($('tr.group.collapsible').first().find('i').hasClass('fa-plus-square-o')) {
+ $('tr.group.collapsible').first().nextAll('tr:not(tr.group.collapsible)').hide();
+ }
+ });
+});
\ No newline at end of file |