Hide budget field, added text for budget. #1134
This commit is contained in:
@@ -33,7 +33,10 @@
|
|||||||
<%= field_with_budget_observer_and_totals(f, :materials) %>
|
<%= field_with_budget_observer_and_totals(f, :materials) %>
|
||||||
<%= field_with_budget_observer_and_totals(f, :profit) %>
|
<%= field_with_budget_observer_and_totals(f, :profit) %>
|
||||||
|
|
||||||
<p><%= f.text_field :budget, :size => 7, :disabled => true %></p>
|
<%= content_tag(:p,"Total Budget:" + content_tag(:span, 0, :id => 'total-budget-calculation', :class => "budget-calculation"),
|
||||||
|
:class => "total-budget") %>
|
||||||
|
|
||||||
|
<p><%= f.hidden_field :budget %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="clear:both;"> </div>
|
<div style="clear:both;"> </div>
|
||||||
@@ -106,7 +109,9 @@ Object.extend(BudgetModule.prototype, {
|
|||||||
Budget.updateAmount($('materials_subtotal'), materials_subtotal);
|
Budget.updateAmount($('materials_subtotal'), materials_subtotal);
|
||||||
Budget.updateAmount($('profit_subtotal'), profit_subtotal);
|
Budget.updateAmount($('profit_subtotal'), profit_subtotal);
|
||||||
|
|
||||||
$('deliverable_budget').value = variableCost + overhead_subtotal + materials_subtotal + profit_subtotal;
|
var total = variableCost + overhead_subtotal + materials_subtotal + profit_subtotal;
|
||||||
|
$('deliverable_budget').value = total;
|
||||||
|
$('total-budget-calculation').innerHTML = Budget.number_to_currency(total);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateAmount: function(element, value) {
|
updateAmount: function(element, value) {
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ tr.deliverable td.done_ratio table.progress { margin-left:auto; margin-right: au
|
|||||||
#deliverable-form .splitcontentright p { padding-right: 30px; }
|
#deliverable-form .splitcontentright p { padding-right: 30px; }
|
||||||
#deliverable-form .splitcontentright input { float:left }
|
#deliverable-form .splitcontentright input { float:left }
|
||||||
|
|
||||||
span.budget-calculation { color:#999999; font-weight:bold; display:block; text-align:right; width: 100%;}
|
span.budget-calculation { color:#999999; font-weight:bold; display:block; text-align:right; width: 100%;}
|
||||||
|
p.total-budget { font-weight: bold; }
|
||||||
|
p.total-budget #total-budget-calculation { }
|
||||||
Reference in New Issue
Block a user