X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-commands%2Fluasrc%2Fview%2Fcommands.htm;h=f094e186d43346e61719bcdeba021f6b5ed0aa53;hp=73b9e6a2ce5fa45c6f5be60b76ff4f01d6e666e5;hb=077ac32635dc0048a684ee0a40345a262e661ecc;hpb=1367f7b624e9ee926cdbd3235a9fec4450c904b5 diff --git a/applications/luci-app-commands/luasrc/view/commands.htm b/applications/luci-app-commands/luasrc/view/commands.htm index 73b9e6a2c..f094e186d 100644 --- a/applications/luci-app-commands/luasrc/view/commands.htm +++ b/applications/luci-app-commands/luasrc/view/commands.htm @@ -108,16 +108,19 @@ if (legend && output) { - var link = location.protocol + '//' + location.hostname + + var prefix = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + - location.pathname.split(';')[0] + 'command/' + - id + (args ? '/' + args : ''); - + location.pathname.split(';')[0] + 'command/'; + var suffix = (args ? '/' + args : ''); + + var link = prefix + id + suffix; + var link_nodownload = prefix + id + "s" + suffix; + legend.style.display = 'none'; output.parentNode.style.display = 'block'; output.innerHTML = String.format( - '
<%:Access command with%> %s
', - link, link + '

<%:Download execution result%> %s

<%:Or display result%> %s

', + link, link, link_nodownload, link_nodownload ); location.hash = '#output';