Don't over-escape Javascript in the web templates.
[invirt/packages/invirt-web.git] / code / templates / list.mako
index 7b1fd92..288e44f 100644 (file)
@@ -54,7 +54,7 @@ VM List
        <tr>
          <td>Autoinstall${self.fn.helppopup('Autoinstalls')}</td>
          <td><input type="radio" name="cd_or_auto" id="cd_or_auto_auto"
-                 onchange="\$('cdromlist').value = ''; \$('vmtype-linux').checked = true">
+                 onchange="$('cdromlist').value = ''; $('vmtype-linux').checked = true">
 ${self.fn.autoList(defaults.cdrom, "$('cd_or_auto_auto').checked = true;$('cdromlist').value = '';$('vmtype-linux').checked = true")}
              (experimental; 2-3 minutes, and you have a machine with empty root password.)
          </input>
@@ -62,7 +62,7 @@ ${self.fn.autoList(defaults.cdrom, "$('cd_or_auto_auto').checked = true;$('cdrom
        <tr>
          <td>Boot CD</td>
          <td><input type="radio" name="cd_or_auto" id="cd_or_auto_cd" checked="checked"
-                onchange="\$('autoinstalllist').value = ''; \$('vmtype-linux-hvm').checked = true">
+                onchange="$('autoinstalllist').value = ''; $('vmtype-linux-hvm').checked = true">
 ${self.fn.cdromList(defaults.cdrom, "$('cd_or_auto_cd').checked = true;$('autoinstalllist').value = '';$('vmtype-linux-hvm').checked = true")}
 </td>
          </input>
@@ -104,7 +104,7 @@ ${self.fn.cdromList(defaults.cdrom, "$('cd_or_auto_cd').checked = true;$('autoin
        <td>${machine.owner}</td>
        <td>${machine.administrator}</td>
 % if machine.nics:
-       <td>${', '.join(map(lambda x: x.ip, machine.nics))}</td>
+       <td>${', '.join(nic.ip for nic in machine.nics)}</td>
 % else:
        <td></td>
 % endif
@@ -147,7 +147,7 @@ ${has_vnc[machine]}
     <script type="text/javascript" src="/static/stripe.js"></script>
     <script type="text/javascript">
         document.observe("dom:loaded", function() {
-            stripe(\$('machinelist').getElementsByTagName('table')[0],
+            stripe($('machinelist').getElementsByTagName('table')[0],
                    'stripedrow');
         });
     </script>