gui: In remote need use index and auto-expand if only one folder (fixes #4759) (#4781)

This commit is contained in:
Simon Frei 2018-03-01 16:21:35 +01:00 committed by Jakob Borg
parent a26778fa9b
commit 3949b750f5

View File

@ -5,12 +5,12 @@
</div> </div>
<div ng-if="sizeOf(remoteNeed) > 0"> <div ng-if="sizeOf(remoteNeed) > 0">
<div class="panel panel-default" ng-repeat="folder in remoteNeedFolders" ng-if="remoteNeed[folder] && remoteNeed[folder].files.length > 0"> <div class="panel panel-default" ng-repeat="folder in remoteNeedFolders" ng-if="remoteNeed[folder] && remoteNeed[folder].files.length > 0">
<button class="btn panel-heading" data-toggle="collapse" data-target="#remoteNeed-{{folder}}" aria-expanded="false"> <button class="btn panel-heading" data-toggle="collapse" data-target="#remoteNeed-{{$index}}" aria-expanded="false">
<h4 class="panel-title"> <h4 class="panel-title">
<span>{{folderLabel(folder)}}</span> <span>{{folderLabel(folder)}}</span>
</h4> </h4>
</button> </button>
<div id="remoteNeed-{{folder}}" class="panel-collapse collapse"> <div id="remoteNeed-{{$index}}" class="panel-collapse" ng-class="{collapse: sizeOf(remoteNeedFolders) > 1}">
<div class="panel-body"> <div class="panel-body">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>