treewide: always include cbi.js
[project/luci.git] / applications / luci-app-commands / luasrc / view / commands.htm
index 3b361558eee5834d6a68acc754a334bb2284a90e..d60a97c5b76fa8f587595fb2e1a7bb173b8645c4 100644 (file)
@@ -34,7 +34,6 @@
 
 <%+header%>
 
-<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
 <script type="text/javascript">//<![CDATA[
        var stxhr = new XHR();
 
 
                if (legend && output)
                {
-                       var prefix = location.protocol + '//' + location.hostname +
-                                  (location.port ? ':' + location.port : '') +
-                                          location.pathname.split(';')[0] + 'command/';
+                       var prefix = location.protocol + '//' + location.host + '<%=url('command')%>/';
                        var suffix = (args ? '/' + args : '');
                        
                        var link = prefix + id + suffix;