Changeset 3010

Show
Ignore:
Timestamp:
01/09/08 12:18:32 (11 months ago)
Author:
bobbysmith007
Message:

Working on creating first version.

outline of template is there.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • estimatorplugin/0.10/estimatorplugin/templates/estimate.cs

    r3002 r3010  
    22<?cs include "macros.cs"?> 
    33 
    4 <form method="post" action="<?cs var:estimate.href ?>" > 
     4    <form method="post" action="<?cs var:estimate.href ?>" > 
    55 
    6 <div id="content" class="estimate"> 
    7   <div id="messages" > 
    8     <?cs each:item = estimate.messages ?> 
    9       <div class="message" ><?cs var:item ?></div> 
    10     <?cs /each ?> 
    11   </div> 
    12 </div> 
     6      <div id="content" class="estimate"> 
     7        <div id="messages" > 
     8          <?cs each:item = estimate.messages ?> 
     9            <div class="message" ><?cs var:item ?></div> 
     10          <?cs /each ?> 
     11        </div> 
    1312 
    14 </form> 
     13        <table border="0" cellpadding="3" cellspacing="0" > 
     14          <tr> 
     15            <td ><label for="tickets">Ticket Numbers:</label></td> 
     16            <td><input id="tickets" type="text" /></td> 
     17          </tr> 
     18          <tr> 
     19            <td ><label for="rate">Rate</label></td> 
     20            <td><input id="rate" type="text" /></td> 
     21          </tr> 
     22          <tr> 
     23            <td ><label for="variability">Variability</label></td> 
     24            <td><input id="variability" type="text" /></td> 
     25          </tr> 
     26          <tr> 
     27            <td ><label for="communication">Communication</label></td> 
     28            <td><input id="communication" type="text" /></td> 
     29          </tr> 
     30        </table> 
     31 
     32        <script language="javascript" > 
     33          var cn = ADW.Controls.createNode; 
     34          var lineItems 
     35          function lineItemRow (lineitem){ 
     36            var uid = function (str){ 
     37              return uid+lineitem.id; 
     38            } 
     39            var valFn = function(str){ 
     40              if (lineitem[str]) return lineitem[str]; 
     41              else return ""; 
     42            } 
     43            return cn('tr', {}, 
     44              cn('td', {}, 
     45                 cn('textarea', {id:uid("description")}, 
     46                   valFn('description'))), 
     47              cn('td', {}, 
     48                 cn('input', {id:uid('low'), type:'text', value: valFn('low')})), 
     49 
     50              cn('td', {}, 
     51                 cn('input', {id:uid('high'), type:'text', value: valFn('high')})), 
     52              cn('td', {id:uid('ave')}, 
     53                 )) 
     54          } 
     55        </script > 
     56 
     57        <table border="0" cellpadding="3" cellspacing="0" > 
     58          <tr id="header"> 
     59            <th>Description</th> 
     60            <th>Low </th> 
     61            <th>High </th> 
     62            <th>Ave </th> 
     63          </tr> 
     64           
     65          <!-- Item Rows Go Here --> 
     66 
     67          <tr id="footer"> 
     68            <th>Total:</th> 
     69            <td id="lowTotal" ></td> 
     70            <td id="highTotal"></td> 
     71            <td id="aveTotal"></td> 
     72          </tr> 
     73          <tr> 
     74            <th>Adjusted Hours:</th> 
     75            <td id="lowAdjusted"></td> 
     76            <td id="highAdjusted"></td> 
     77            <td id="aveAdjusted"></td> 
     78          </tr> 
     79          <tr> 
     80            <th>Cost:</th> 
     81            <td id="lowCost"></td> 
     82            <td id="highCost"></td> 
     83            <td id="aveCost"></td> 
     84          </tr> 
     85        </table> 
     86 
     87<!-- 
     88        <div> 
     89          <h3>Comment Preview</h3> 
     90          <div id="estimateoutput" > 
     91             
     92          </div> 
     93        </div> 
     94--> 
     95      </div> 
     96    <input type="submit" >Save Estimate</input>    
     97    </form> 
    1598<?cs include "footer.cs"?> 
     99     
  • estimatorplugin/0.10/estimatorplugin/webui.py

    r3002 r3010  
    3131                             "messages":   messages, 
    3232                   } 
     33        add_script(req, "Estimate/JsHelper.js") 
     34        add_script(req, "Estimate/Controls.js") 
    3335        add_stylesheet(req, "Estimate/estimate.css") 
    3436        return 'estimate.cs', 'text/html'