1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +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,15 +120,19 @@ define([
dataType: 'json',
success: function(data) {
$.modal.close();
_this.repos.add({
'id': data["sub_repo_id"],
'name': data["name"],
'origin_repo_id': ori_repo_id,
'origin_path': path,
'abbrev_origin_path': data["abbrev_origin_path"],
'mtime': new Date().getTime() / 1000,
'mtime_relative': gettext("Just now")
}, {prepend: true});
if (_this.repos.length > 0) {
_this.repos.add({
'id': data["sub_repo_id"],
'name': data["name"],
'origin_repo_id': ori_repo_id,
'origin_path': path,
'abbrev_origin_path': data["abbrev_origin_path"],
'mtime': new Date().getTime() / 1000,
'mtime_relative': gettext("Just now")
}, {prepend: true});
} else {
_this.showMyRepos();
}
},
error: function(xhr, textStatus, errorThrown) {
var err;
@@ -144,7 +148,6 @@ define([
});
}
});
return ReposView;