1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[repo details] added 'file count'

This commit is contained in:
llj
2017-06-27 18:58:08 +08:00
parent 067a17b106
commit 88c79b4894
4 changed files with 30 additions and 2 deletions

View File

@@ -333,7 +333,26 @@ define([
icon_url: this.model.getIconUrl(icon_size),
big_icon_url: this.model.getIconUrl(96)
});
this.myReposView.repoDetailsView.show(data);
var detailsView = this.myReposView.repoDetailsView;
detailsView.show(data);
// fetch other data
$.ajax({
url: Common.getUrl({
'name': 'repo_v2.1',
'repo_id': this.model.get('id')
}),
cache: false,
dataType: 'json',
success: function(data) {
detailsView.update({
'file_count': data.file_count
});
},
error: function() {
detailsView.update({'error': true});
}
});
this.togglePopup(); // close the popup
return false;