Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1334 from consul/budgets
WIP Budgets
- Loading branch information
Showing
226 changed files
with
9,597 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -522,6 +522,3 @@ DEPENDENCIES | |
unicorn (~> 5.2.0) | ||
web-console (= 3.3.0) | ||
whenever | ||
|
||
BUNDLED WITH | ||
1.13.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
App.AllowParticipation = | ||
|
||
initialize: -> | ||
$(document).on { | ||
'mouseenter focus': -> | ||
$(this).find(".js-participation-not-allowed").show(); | ||
$(this).find(".js-participation-allowed").hide(); | ||
mouseleave: -> | ||
$(this).find(".js-participation-not-allowed").hide(); | ||
$(this).find(".js-participation-allowed").show(); | ||
}, ".js-participation" | ||
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/assets/javascripts/valuation_budget_investment_form.js.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
App.ValuationBudgetInvestmentForm = | ||
|
||
showFeasibleFields: -> | ||
$('#valuation_budget_investment_edit_form #unfeasible_fields').hide('down') | ||
$('#valuation_budget_investment_edit_form #feasible_fields').show() | ||
|
||
showNotFeasibleFields: -> | ||
$('#valuation_budget_investment_edit_form #feasible_fields').hide('down') | ||
$('#valuation_budget_investment_edit_form #unfeasible_fields').show() | ||
|
||
showAllFields: -> | ||
$('#valuation_budget_investment_edit_form #feasible_fields').show('down') | ||
$('#valuation_budget_investment_edit_form #unfeasible_fields').show('down') | ||
|
||
showFeasibilityFields: -> | ||
feasibility = $("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']:checked").val() | ||
if feasibility == 'feasible' | ||
App.ValuationBudgetInvestmentForm.showFeasibleFields() | ||
else if feasibility == 'unfeasible' | ||
App.ValuationBudgetInvestmentForm.showNotFeasibleFields() | ||
|
||
|
||
showFeasibilityFieldsOnChange: -> | ||
$("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']").change -> | ||
App.ValuationBudgetInvestmentForm.showAllFields() | ||
App.ValuationBudgetInvestmentForm.showFeasibilityFields() | ||
|
||
|
||
initialize: -> | ||
App.ValuationBudgetInvestmentForm.showFeasibilityFields() | ||
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange() | ||
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.