1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

show group name in path for 'group dir view'; fix updateGroups in side-nav.js

This commit is contained in:
llj
2016-01-13 14:54:46 +08:00
parent e669b7e7e8
commit 13ea3fcb6a
4 changed files with 40 additions and 5 deletions

View File

@@ -103,10 +103,21 @@ define([
dataType: 'json',
cache: false,
success: function(data) {
data.sort(function(a, b) {
var groups = [];
for (var i = 0, len = data.length; i < len; i++) {
groups.push({
'id': data[i].id,
'name': data[i].name
});
}
groups.sort(function(a, b) {
return Common.compareTwoWord(a.name, b.name);
});
_this.data.groups = data;
// update app.pageOptions.groups
app.pageOptions.groups = groups;
_this.data.groups = groups;
_this.render();
},
error: function() {