diff --git a/package/lean/luci-app-amule/luasrc/view/amule/overview_status.htm b/package/lean/luci-app-amule/luasrc/view/amule/overview_status.htm index 272bfdd52..dcb672474 100644 --- a/package/lean/luci-app-amule/luasrc/view/amule/overview_status.htm +++ b/package/lean/luci-app-amule/luasrc/view/amule/overview_status.htm @@ -14,16 +14,16 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin/nas/amule/status")%>', null, } else { tb.innerHTML = '<%:aMule daemon is not running.%>'; } - + if (data.amuled_pid == "0") { - btn.innerHTML = btn_tmpl.replace("PID: NUMBER", "<%:Start aMule%>"); + btn.innerHTML = btn_tmpl.replace("PID: NUMBER", "<%:Start aMule%>"); } else { - btn.innerHTML = btn_tmpl.replace("NUMBER", data.amuled_pid); + btn.innerHTML = btn_tmpl.replace("NUMBER", data.amuled_pid); } } - } ); + function _data2elements(x, data) { var btn = document.getElementById("btn_startstop"); if ( ! btn ) { return; } // security check @@ -77,7 +77,7 @@ function openWebUI() { } else { auth_port_value = auth_port.value }; - var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + auth_port_value; + var url = localhostPath + ":" + auth_port_value; window.open(url) }; //]]> diff --git a/package/lean/luci-app-baidupcs-web/luasrc/view/baidupcs-web/baidupcs-web_status.htm b/package/lean/luci-app-baidupcs-web/luasrc/view/baidupcs-web/baidupcs-web_status.htm index 168e66011..9312a91db 100644 --- a/package/lean/luci-app-baidupcs-web/luasrc/view/baidupcs-web/baidupcs-web_status.htm +++ b/package/lean/luci-app-baidupcs-web/luasrc/view/baidupcs-web/baidupcs-web_status.htm @@ -25,7 +25,7 @@ function openClient() { var pos = curWwwPath.indexOf(pathName); var localhostPath = curWwwPath.substring(0, pos); var clientPort = window.document.getElementById("cbid.baidupcs-web.config.port").value - var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + clientPort; + var url = localhostPath + ":" + clientPort; window.open(url) }; //]]> diff --git a/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm b/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm index a0386ec31..bd7874c58 100644 --- a/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm +++ b/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm @@ -20,7 +20,7 @@ function openClient() { var pos = curWwwPath.indexOf(pathName); var localhostPath = curWwwPath.substring(0, pos); var clientPort = window.document.getElementById("cbid.verysync.config.port").value - var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + clientPort; + var url = localhostPath + ":" + clientPort; window.open(url) }; //]]>