Added js file for alert
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
//= require polls
|
||||
//= require sortable
|
||||
//= require table_sortable
|
||||
//= require investment_report_alert
|
||||
|
||||
var initialize_modules = function() {
|
||||
App.Comments.initialize();
|
||||
@@ -115,6 +116,7 @@ var initialize_modules = function() {
|
||||
App.Polls.initialize();
|
||||
App.Sortable.initialize();
|
||||
App.TableSortable.initialize();
|
||||
App.InvestmentReportAlert.initialize();
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
7
app/assets/javascripts/investment_report_alert.js.coffee
Normal file
7
app/assets/javascripts/investment_report_alert.js.coffee
Normal file
@@ -0,0 +1,7 @@
|
||||
App.InvestmentReportAlert =
|
||||
initialize: ->
|
||||
$('#js-investment-report-alert').on 'click', ->
|
||||
if this.checked && $('#budget_investment_feasibility_unfeasible').is(':checked')
|
||||
confirm(this.dataset.alert + "\n" + this.dataset.notFeasibleAlert);
|
||||
else if this.checked
|
||||
confirm(this.dataset.alert);
|
||||
Reference in New Issue
Block a user