Changeset 207 for trunk/web/templates/skeleton.tmpl
- Timestamp:
- Oct 20, 2007, 10:14:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/templates/skeleton.tmpl
r206 r207 28 28 return false; 29 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: replaceFunc69 });70 return false;71 }72 73 window.onload = function (){74 //Fix bug with disabled elements75 \$\$('form').each(Form.enable);76 }77 78 30 </script> 79 31 </head> … … 100 52 101 53 <div id="loadingnotice" class="loadingnotice">LOADING</div> 102 <div id="result" class="result"></div> 54 <div id="result" class="result"> 55 #if $varExists('result') 56 $result 57 #end if 58 </div> 103 59 104 60 $body
Note: See TracChangeset
for help on using the changeset viewer.