Ignore:
Timestamp:
Oct 20, 2007, 10:14:51 AM (17 years ago)
Author:
ecprice
Message:

Removed the Javascript, since I realized that

  • The way it was was worthless
  • The architecture has serious trouble supporting useful js
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/skeleton.tmpl

    r206 r207  
    2828   return false;
    2929}
    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 = function (){
    74   //Fix bug with disabled elements
    75   \$\$('form').each(Form.enable);
    76 }
    77 
    7830</script>
    7931</head>
     
    10052
    10153<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>
    10359
    10460$body
Note: See TracChangeset for help on using the changeset viewer.