Changeset 207 for trunk/web/templates/skeleton.py
- Timestamp:
- Oct 20, 2007, 10:14:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/templates/skeleton.py
r206 r207 33 33 VFN=valueForName 34 34 currentTime=time.time 35 __CHEETAH_version__ = '2.0rc 7'36 __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 7)37 __CHEETAH_genTime__ = 119288 3610.43491738 __CHEETAH_genTimestamp__ = 'Sat Oct 20 08:33:302007'35 __CHEETAH_version__ = '2.0rc8' 36 __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8) 37 __CHEETAH_genTime__ = 1192889324.1837969 38 __CHEETAH_genTimestamp__ = 'Sat Oct 20 10:08:44 2007' 39 39 __CHEETAH_src__ = 'skeleton.tmpl' 40 __CHEETAH_srcLastModified__ = 'Sat Oct 20 08:33:052007'40 __CHEETAH_srcLastModified__ = 'Sat Oct 20 10:08:36 2007' 41 41 __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' 42 42 … … 101 101 var helpWin = null; 102 102 function closeWin(){ 103 104 105 106 103 \tif (helpWin != null){ 104 \t\tif(!helpWin.closed) 105 \t\t\thelpWin.close(); 106 \t} 107 107 } 108 108 … … 114 114 return false; 115 115 } 116 117 Ajax.Responders.register({118 onCreate: function(){119 if (Ajax.activeRequestCount > 0) {120 document.getElementById("loadingnotice").style.display = 'block';121 }122 },123 onComplete: function(){124 if (Ajax.activeRequestCount == 0) {125 document.getElementById("loadingnotice").style.display = 'none';126 }127 }128 });129 function replaceFunc(transport) {130 try {131 d = transport.responseText.evalJSON();132 } catch (e) {133 $('body').innerHTML = '<pre>'+transport.responseText+'</pre>'134 return;135 }136 for(key in d) {137 $(key).innerHTML = d[key];138 }139 }140 141 function jsFormSubmit(location, elt){142 new Ajax.Request(location, {method: 'post',143 parameters: Form.serialize(elt)+'&js=true',144 onSuccess: replaceFunc,145 onComplete: function() {Form.enable(elt);}146 });147 Form.disable(elt);148 return false;149 }150 151 function rowFormSubmit(elt, retpage){152 new Ajax.Request('command', {method: 'post',153 parameters: Form.serialize(elt)+'&js='+retpage,154 onSuccess: replaceFunc155 });156 return false;157 }158 159 window.onload = function (){160 //Fix bug with disabled elements161 $$('form').each(Form.enable);162 }163 164 116 </script> 165 117 </head> … … 168 120 <div id="err"> 169 121 ''') 170 if VFFSL(SL,"varExists",False)('error_text'): # generated from line 83, col 1 171 write('<p>STDERR:</p><pre>') 172 _v = VFFSL(SL,"error_text",True) # '$error_text' on line 84, col 20 173 if _v is not None: write(_filter(_v, rawExpr='$error_text')) # from line 84, col 20. 174 write('</pre>\n') 175 write('</div>\n\n') 176 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 88, col 1 177 write('<p>[You are logged in as ') 178 _v = VFFSL(SL,"user.username",True) # '$user.username' on line 89, col 26 179 if _v is not None: write(_filter(_v, rawExpr='$user.username')) # from line 89, col 26. 122 if VFFSL(SL,"varExists",False)('error_text'): # generated from line 35, col 1 123 write('''<p>STDERR:</p><pre>''') 124 _v = VFFSL(SL,"error_text",True) # '$error_text' on line 36, col 20 125 if _v is not None: write(_filter(_v, rawExpr='$error_text')) # from line 36, col 20. 126 write('''</pre> 127 ''') 128 write('''</div> 129 130 ''') 131 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 40, col 1 132 write('''<p>[You are logged in as ''') 133 _v = VFFSL(SL,"user.username",True) # '$user.username' on line 41, col 26 134 if _v is not None: write(_filter(_v, rawExpr='$user.username')) # from line 41, col 26. 180 135 write('''.]</p> 181 136 … … 183 138 <p><a href="list">List</a> 184 139 ''') 185 if VFFSL(SL,"varExists",False)('machine'): # generated from line 93, col 1 186 write('<a href="info?machine_id=') 187 _v = VFFSL(SL,"machine.machine_id",True) # '$machine.machine_id' on line 94, col 26 188 if _v is not None: write(_filter(_v, rawExpr='$machine.machine_id')) # from line 94, col 26. 189 write('">Info</a>\n<a href="vnc?machine_id=') 190 _v = VFFSL(SL,"machine.machine_id",True) # '$machine.machine_id' on line 95, col 25 191 if _v is not None: write(_filter(_v, rawExpr='$machine.machine_id')) # from line 95, col 25. 192 write('">Console</a>\n') 193 write('<a href="help">Help</a></p>\n') 140 if VFFSL(SL,"varExists",False)('machine'): # generated from line 45, col 1 141 write('''<a href="info?machine_id=''') 142 _v = VFFSL(SL,"machine.machine_id",True) # '$machine.machine_id' on line 46, col 26 143 if _v is not None: write(_filter(_v, rawExpr='$machine.machine_id')) # from line 46, col 26. 144 write('''">Info</a> 145 <a href="vnc?machine_id=''') 146 _v = VFFSL(SL,"machine.machine_id",True) # '$machine.machine_id' on line 47, col 25 147 if _v is not None: write(_filter(_v, rawExpr='$machine.machine_id')) # from line 47, col 25. 148 write('''">Console</a> 149 ''') 150 write('''<a href="help">Help</a></p> 151 ''') 194 152 write('''</div> 195 153 196 154 <div id="loadingnotice" class="loadingnotice">LOADING</div> 197 <div id="result" class="result"></div> 198 199 ''') 200 _v = VFFSL(SL,"body",True) # '$body' on line 104, col 1 201 if _v is not None: write(_filter(_v, rawExpr='$body')) # from line 104, col 1. 202 write('\n') 203 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 105, col 1 204 write('<hr />\nQuestions? Contact <a href="mailto:sipb-xen-dev@mit.edu">sipb-xen-dev@mit.edu</a>.\n') 205 write('</body>\n</html>\n') 155 <div id="result" class="result"> 156 ''') 157 if VFFSL(SL,"varExists",False)('result'): # generated from line 55, col 1 158 _v = VFFSL(SL,"result",True) # '$result' on line 56, col 1 159 if _v is not None: write(_filter(_v, rawExpr='$result')) # from line 56, col 1. 160 write(''' 161 ''') 162 write('''</div> 163 164 ''') 165 _v = VFFSL(SL,"body",True) # '$body' on line 60, col 1 166 if _v is not None: write(_filter(_v, rawExpr='$body')) # from line 60, col 1. 167 write(''' 168 ''') 169 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 61, col 1 170 write('''<hr /> 171 Questions? Contact <a href="mailto:sipb-xen-dev@mit.edu">sipb-xen-dev@mit.edu</a>. 172 ''') 173 write('''</body> 174 </html> 175 ''') 206 176 207 177 ######################################## … … 230 200 ## START - generated method body 231 201 232 write('\n') 202 write(''' 203 ''') 233 204 234 205 ########################################
Note: See TracChangeset
for help on using the changeset viewer.