通用的手动编辑
This commit is contained in:
parent
5bc2fa461e
commit
85e57b9253
|
|
@ -3,7 +3,8 @@
|
|||
<div class="bt-w-menu">
|
||||
<p class="bgw" onclick="pluginService('gogs');">服务</p>
|
||||
<p onclick="pluginInitD('gogs');">自启动</p>
|
||||
<p onclick="pluginConfig('gogs',null, 'init_conf');">自启动配置</p>
|
||||
<p onclick="pluginConfig('gogs',null, 'init_conf');">启动配置</p>
|
||||
<p onclick="gogsEdit();">手动编辑</p>
|
||||
<p onclick="pluginConfig('gogs',null, 'conf');">配置文件</p>
|
||||
<p onclick="gogsSetConfig();">配置修改</p>
|
||||
<p onclick="gogsUserList();">用户列表</p>
|
||||
|
|
|
|||
|
|
@ -566,6 +566,13 @@ def projectScriptDebug():
|
|||
|
||||
return public.getJson(data)
|
||||
|
||||
|
||||
def gogsEdit():
|
||||
data = {}
|
||||
data['post_receive'] = getPluginDir() + '/hook/post-receive.tpl'
|
||||
data['commit'] = getPluginDir() + '/hook/commit.tpl'
|
||||
return public.getJson(data)
|
||||
|
||||
if __name__ == "__main__":
|
||||
func = sys.argv[1]
|
||||
if func == 'status':
|
||||
|
|
@ -608,5 +615,7 @@ if __name__ == "__main__":
|
|||
print projectScriptUnload()
|
||||
elif func == 'project_script_debug':
|
||||
print projectScriptDebug()
|
||||
elif func == 'gogs_edit':
|
||||
print gogsEdit()
|
||||
else:
|
||||
print 'fail'
|
||||
|
|
|
|||
|
|
@ -111,6 +111,20 @@ function submitGogsConf() {
|
|||
});
|
||||
}
|
||||
|
||||
function gogsEdit(){
|
||||
|
||||
gogsPost('gogs_edit',{} , function(data){
|
||||
// console.log(data);
|
||||
var rdata = $.parseJSON(data.data);
|
||||
var edit = '<p class="status">通用的手动编辑:</p>';
|
||||
edit +='<div class="sfm-opt">\
|
||||
<button class="btn btn-default btn-sm" onclick="onlineEditFile(0,\''+rdata['post_receive']+'\');">post-receive.tpl</button>\
|
||||
<button class="btn btn-default btn-sm" onclick="onlineEditFile(0,\''+rdata['commit']+'\');">commit.tpl</button>\
|
||||
</div>';
|
||||
$(".soft-man-con").html(edit);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function gogsUserList(page, search) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue