Ignore:
Timestamp:
Dec 27, 2009, 12:21:03 PM (15 years ago)
Author:
broder
Message:

Don't over-escape Javascript in the web templates.

$ doesn't need to be escaped in Mako templates when it's followed by
an open parenthesis.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/templates/list.mako

    r2737 r2790  
    5555          <td>Autoinstall${self.fn.helppopup('Autoinstalls')}</td>
    5656          <td><input type="radio" name="cd_or_auto" id="cd_or_auto_auto"
    57                  onchange="\$('cdromlist').value = ''; \$('vmtype-linux').checked = true">
     57                 onchange="$('cdromlist').value = ''; $('vmtype-linux').checked = true">
    5858${self.fn.autoList(defaults.cdrom, "$('cd_or_auto_auto').checked = true;$('cdromlist').value = '';$('vmtype-linux').checked = true")}
    5959              (experimental; 2-3 minutes, and you have a machine with empty root password.)
     
    6363          <td>Boot CD</td>
    6464          <td><input type="radio" name="cd_or_auto" id="cd_or_auto_cd" checked="checked"
    65                 onchange="\$('autoinstalllist').value = ''; \$('vmtype-linux-hvm').checked = true">
     65                onchange="$('autoinstalllist').value = ''; $('vmtype-linux-hvm').checked = true">
    6666${self.fn.cdromList(defaults.cdrom, "$('cd_or_auto_cd').checked = true;$('autoinstalllist').value = '';$('vmtype-linux-hvm').checked = true")}
    6767</td>
     
    148148    <script type="text/javascript">
    149149        document.observe("dom:loaded", function() {
    150             stripe(\$('machinelist').getElementsByTagName('table')[0],
     150            stripe($('machinelist').getElementsByTagName('table')[0],
    151151                   'stripedrow');
    152152        });
Note: See TracChangeset for help on using the changeset viewer.