diff --git a/class/core/plugin_api.py b/class/core/plugin_api.py index b7422dc09..fff69dd96 100755 --- a/class/core/plugin_api.py +++ b/class/core/plugin_api.py @@ -122,6 +122,8 @@ class plugin_api: if type(data['versions']) == list and data['name'] == 'php': for index in range(len(data['versions'])): tmp = data.copy() + tmp['title'] = tmp['title'] + \ + '-' + data['versions'][index] tmp['versions'] = data['versions'][index] pg = self.getPluginInfo(tmp) if sType == '0': diff --git a/static/js/soft.js b/static/js/soft.js index 37fa4cbd0..33ad863b1 100755 --- a/static/js/soft.js +++ b/static/js/soft.js @@ -124,7 +124,7 @@ function GetSList(isdisplay) { $(".task").text(rdata.data[rdata.length - 1]); for (var i = 0; i < rdata.data.length; i++) { var plugin = rdata.data[i]; - var len = rdata.data[i].versions.length; + var len = plugin.versions.length; var version_info = ''; var version = ''; var softPath = ''; @@ -134,6 +134,8 @@ function GetSList(isdisplay) { var checked = ''; checked = plugin.display ? 'checked' : ''; + + console.log(plugin.versions); if (typeof plugin.versions == "string"){ version_info += plugin.versions + '|'; @@ -146,22 +148,24 @@ function GetSList(isdisplay) { version_info = version_info.substring(0, version_info.length - 1); } - var handle = '安装'; + console.log(version_info); + + var handle = '安装'; var isSetup = false; for (var n = 0; n < len; n++) { if (plugin.status == true) { isSetup = true; - if (plugin.tip == 'lib') { - var mupdate = (plugin.versions[n].no == plugin.versions[n].version) ? '' : '更新 | '; - handle = mupdate + '' + lan.soft.setup + ' | 卸载'; - titleClick = 'onclick="PluginMan(\'' + plugin.name + '\',\'' + plugin.title + '\')" style="cursor:pointer"'; - } else { + // if (plugin.tip == 'lib') { + // var mupdate = (plugin.versions[n].no == plugin.versions[n].version) ? '' : '更新 | '; + // handle = mupdate + '' + lan.soft.setup + ' | 卸载'; + // titleClick = 'onclick="PluginMan(\'' + plugin.name + '\',\'' + plugin.title + '\')" style="cursor:pointer"'; + // } else { 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"'; - } + // } version = plugin.version; softPath = ''; @@ -180,10 +184,15 @@ function GetSList(isdisplay) { } } + var plugin_title = plugin.title + if (isSetup){ + plugin_title = plugin.title + ' ' + version_info; + } + sBody += '