1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

[sub lib create] bugfix

This commit is contained in:
llj
2015-04-08 19:05:51 +08:00
committed by Daniel Pan
parent 9d6dfdabeb
commit 49c8695c37

View File

@@ -120,6 +120,7 @@ define([
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
$.modal.close(); $.modal.close();
if (_this.repos.length > 0) {
_this.repos.add({ _this.repos.add({
'id': data["sub_repo_id"], 'id': data["sub_repo_id"],
'name': data["name"], 'name': data["name"],
@@ -129,6 +130,9 @@ define([
'mtime': new Date().getTime() / 1000, 'mtime': new Date().getTime() / 1000,
'mtime_relative': gettext("Just now") 'mtime_relative': gettext("Just now")
}, {prepend: true}); }, {prepend: true});
} else {
_this.showMyRepos();
}
}, },
error: function(xhr, textStatus, errorThrown) { error: function(xhr, textStatus, errorThrown) {
var err; var err;
@@ -144,7 +148,6 @@ define([
}); });
} }
}); });
return ReposView; return ReposView;