diff --git a/static/js/soft.js b/static/js/soft.js index f20ac8f5b..c00c192f5 100755 --- a/static/js/soft.js +++ b/static/js/soft.js @@ -10,7 +10,7 @@ function resetPluginWinWidth(width){ } //软件管理窗口 -function SoftMan(name, version) { +function softMan(name, version) { var loadT = layer.msg("正在处理,请稍后...", { icon: 16, time: 0, shade: [0.3, '#000'] }); $.get('/plugins/setting?name='+name, function(rdata) { layer.close(loadT); @@ -147,12 +147,17 @@ function GetSList(isdisplay) { var mupdate = '';//(plugin.versions[n] == plugin.updates[n]) '' : '更新 | '; // if (plugin.versions[n] == '') mupdate = ''; - handle = mupdate + '' + lan.soft.setup + ' | 卸载'; - titleClick = 'onclick="SoftMan(\'' + plugin.name + '\',\'' + version_info + '\')" style="cursor:pointer"'; + handle = mupdate + '' + lan.soft.setup + ' | 卸载'; + titleClick = 'onclick="softMan(\'' + plugin.name + '\',\'' + version_info + '\')" style="cursor:pointer"'; // } softPath = ''; - indexshow = '
'; + if (plugin.coexist){ + indexshow = '
'; + } else { + indexshow = '
'; + } + if (plugin.status == true) { state = '' } else { @@ -293,13 +298,14 @@ function uninstallVersion(name, version, title) { //首页显示 -function toIndexDisplay(name, version) { +function toIndexDisplay(name, version, coexist) { + var status = $("#index_" + name).prop("checked") ? "0" : "1"; - if (name == "php") { + if (coexist == "true") { var verinfo = version.replace(/\./, ""); status = $("#index_" + name + verinfo).prop("checked") ? "0" : "1"; } - + console.log(name,status,version); var data = "name=" + name + "&status=" + status + "&version=" + version; $.post("/plugins/set_index", data, function(rdata) {