Changeset 205 for trunk/web/templates/skeleton.tmpl
- Timestamp:
- Oct 20, 2007, 8:28:32 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/templates/skeleton.tmpl
r187 r205 1 #from functions import functions 2 #extends functions 3 4 #def full_body 5 <!DOCTYPE html 6 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1 8 <html> 2 9 <head><title>$title</title> … … 4 11 <link rel="stylesheet" href="static/style.css" type="text/css" /> 5 12 <link rel="stylesheet" href="static/layout.css" type="text/css" media="screen" /> 13 <script type="text/javascript" src="static/prototype.js"></script> 6 14 <script type="text/javascript"> 7 15 var helpWin = null; … … 20 28 return false; 21 29 } 30 31 Ajax.Responders.register({ 32 onCreate: function(){ 33 if (Ajax.activeRequestCount > 0) { 34 document.getElementById("loadingnotice").style.display = 'block'; 35 } 36 }, 37 onComplete: function(){ 38 if (Ajax.activeRequestCount == 0) { 39 document.getElementById("loadingnotice").style.display = 'none'; 40 } 41 } 42 }); 43 function replaceFunc(transport) { 44 try { 45 d = transport.responseText.evalJSON(); 46 } catch (e) { 47 \$('body').innerHTML = '<pre>'+transport.responseText+'</pre>' 48 return; 49 } 50 for(key in d) { 51 \$(key).innerHTML = d[key]; 52 } 53 } 54 55 function jsFormSubmit(location, elt){ 56 new Ajax.Request(location, {method: 'post', 57 parameters: Form.serialize(elt)+'&js=true', 58 onSuccess: replaceFunc, 59 onComplete: function() {Form.enable(elt);} 60 }); 61 Form.disable(elt); 62 return false; 63 } 64 65 function rowFormSubmit(elt, retpage){ 66 new Ajax.Request('command', {method: 'post', 67 parameters: Form.serialize(elt)+'&js='+retpage, 68 onSuccess: replaceFunc 69 }); 70 return false; 71 } 72 73 window.onload = { 74 //Fix bug with disabled elements 75 $$('form').each(Form.enable); 76 } 77 22 78 </script> 23 79 </head> 24 <body> 80 <body id="body"> 81 82 <div id="err"> 83 #if $varExists('error_text') 84 <p>STDERR:</p><pre>$error_text</pre> 85 #end if 86 </div> 87 25 88 #if not $varExists('simple') or not $simple 26 89 <p>[You are logged in as $user.username.]</p> 90 91 <div class="navigation"> 27 92 <p><a href="list">List</a> 28 93 #if $varExists('machine') … … 32 97 <a href="help">Help</a></p> 33 98 #end if 99 </div> 100 101 <div id="loadingnotice" class="loadingnotice">LOADING</div> 102 <div id="result" class="result"></div> 103 34 104 $body 35 105 #if not $varExists('simple') or not $simple … … 39 109 </body> 40 110 </html> 111 #end def
Note: See TracChangeset
for help on using the changeset viewer.