display site count for folders in optimized view as well
This commit is contained in:
parent
8a8e2bdf80
commit
fef2d38101
|
@ -60,6 +60,18 @@
|
||||||
$rootScope.vaultFolders = decFolders;
|
$rootScope.vaultFolders = decFolders;
|
||||||
$rootScope.vaultLogins = decLogins;
|
$rootScope.vaultLogins = decLogins;
|
||||||
|
|
||||||
|
// compute site count for each folder
|
||||||
|
for (var i = 0; i < $rootScope.vaultFolders.length; i++) {
|
||||||
|
var siteCount = 0;
|
||||||
|
for (var j = 0; j < $rootScope.vaultLogins.length; j++) {
|
||||||
|
if ($rootScope.vaultLogins[j].folderId == $rootScope.vaultFolders[i].id) {
|
||||||
|
siteCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$rootScope.vaultFolders[i].siteCount = siteCount;
|
||||||
|
}
|
||||||
|
|
||||||
if (!delayLoad) {
|
if (!delayLoad) {
|
||||||
setScrollY();
|
setScrollY();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
ng-repeat="folder in vaultFolders | orderBy: folderSort">
|
ng-repeat="folder in vaultFolders | orderBy: folderSort">
|
||||||
{{folder.name}}
|
{{folder.name}}
|
||||||
<i class="fa fa-chevron-right fa-lg"></i>
|
<i class="fa fa-chevron-right fa-lg"></i>
|
||||||
|
<span class="item-sub-label">{{folder.siteCount}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<div class="list-section" style="padding-bottom: 0;">
|
<div class="list-section" style="padding-bottom: 0;">
|
||||||
<div class="list-section-header">
|
<div class="list-section-header">
|
||||||
{{folder.name}}
|
{{folder.name}}
|
||||||
|
<span>{{vaultLogins.length}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0)" ng-click="viewLogin(login)"
|
<a href="javascript:void(0)" ng-click="viewLogin(login)"
|
||||||
class="list-section-item condensed" title="{{i18n.edit}} {{login.name}}"
|
class="list-section-item condensed" title="{{i18n.edit}} {{login.name}}"
|
||||||
|
|
|
@ -214,6 +214,10 @@
|
||||||
label {
|
label {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-section-items {
|
.list-section-items {
|
||||||
|
@ -334,10 +338,16 @@
|
||||||
|
|
||||||
.fa-chevron-right {
|
.fa-chevron-right {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 3px;
|
margin-top: 4px;
|
||||||
color: @list-icon-color;
|
color: @list-icon-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-sub-label {
|
||||||
|
float: right;
|
||||||
|
margin-right: 15px;
|
||||||
|
color: @gray-light;
|
||||||
|
}
|
||||||
|
|
||||||
&.condensed {
|
&.condensed {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue