mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
[sub lib create] bugfix
This commit is contained in:
@@ -120,15 +120,19 @@ define([
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$.modal.close();
|
$.modal.close();
|
||||||
_this.repos.add({
|
if (_this.repos.length > 0) {
|
||||||
'id': data["sub_repo_id"],
|
_this.repos.add({
|
||||||
'name': data["name"],
|
'id': data["sub_repo_id"],
|
||||||
'origin_repo_id': ori_repo_id,
|
'name': data["name"],
|
||||||
'origin_path': path,
|
'origin_repo_id': ori_repo_id,
|
||||||
'abbrev_origin_path': data["abbrev_origin_path"],
|
'origin_path': path,
|
||||||
'mtime': new Date().getTime() / 1000,
|
'abbrev_origin_path': data["abbrev_origin_path"],
|
||||||
'mtime_relative': gettext("Just now")
|
'mtime': new Date().getTime() / 1000,
|
||||||
}, {prepend: true});
|
'mtime_relative': gettext("Just now")
|
||||||
|
}, {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;
|
||||||
|
Reference in New Issue
Block a user