diff --git a/plugins/gogs/js/gogs.js b/plugins/gogs/js/gogs.js
index 0e38c5b61..8eb156b66 100755
--- a/plugins/gogs/js/gogs.js
+++ b/plugins/gogs/js/gogs.js
@@ -185,6 +185,31 @@ function gogsUserList(page, search) {
}
function userProjectList(user, search){
+ layer.open({
+ type: 1,
+ title: '用户('+user+')项目列表',
+ area: '500px',
+ content:"
",
+ success:function(){
+ userProjectListPage(user,search);
+ }
+ });
+}
+
+
+function userProjectListPage(user, search){
var req = {};
if (!isNaN(user)){
req['page'] = user;
@@ -200,7 +225,7 @@ function userProjectList(user, search){
if(typeof(search) != 'undefined'){
req['search'] = search;
}
-
+
gogsPost('user_project_list', req, function(data){
var rdata = [];
try {
@@ -226,30 +251,15 @@ function userProjectList(user, search){
';
}
- var page = '';
+ $('#gogs_table tbody').html(list);
- var loadOpen = layer.open({
- type: 1,
- title: '用户('+user+')项目列表',
- area: '500px',
- content:""
- });
+ var page = rdata['data']['list'];
+ $('#gogs_table .gogs_page').html(page);
});
}
+
function projectScript(user, name,has_hook){
// console.log(user,name,has_hook);
var html = '';
@@ -290,7 +300,7 @@ function projectScriptLoad(user,name){
layer.msg('加载成功!',{icon:1,time:2000,shade: [0.3, '#000']});
setTimeout(function(){
- userProjectList(1);
+ userProjectListPage(1);
}, 2000);
});
}
@@ -304,7 +314,7 @@ function projectScriptUnload(user,name){
layer.msg('卸载成功!',{icon:1,time:2000,shade: [0.3, '#000']});
setTimeout(function(){
- userProjectList(1);
+ userProjectListPage(1);
}, 2000);
});
}