Remove unnecessary return false statements
The `initialize` functions don't need to return anything, since their returned value is never used. Returning false is a common practice in jQuery to stop an event, but in plain JavaScript methods it doesn't have any side effects.
This commit is contained in:
@@ -9,4 +9,3 @@ App.AllowParticipation =
|
||||
$(this).find(".js-participation-not-allowed").hide()
|
||||
$(this).find(".js-participation-allowed").show()
|
||||
}, ".js-participation"
|
||||
false
|
||||
|
||||
@@ -58,4 +58,3 @@ App.Forms =
|
||||
App.Forms.toggleLink()
|
||||
App.Forms.synchronizeInputs()
|
||||
App.Forms.hideOrShowFieldsAfterSelection()
|
||||
false
|
||||
|
||||
@@ -34,5 +34,3 @@ App.PreventDoubleSubmission =
|
||||
buttons = $(this).find(":button, :submit")
|
||||
App.PreventDoubleSubmission.reset_buttons(buttons)
|
||||
)
|
||||
|
||||
false
|
||||
|
||||
@@ -2,4 +2,3 @@ App.Users =
|
||||
|
||||
initialize: ->
|
||||
$(".initialjs-avatar").initial()
|
||||
false
|
||||
|
||||
@@ -29,4 +29,3 @@ App.ValuationBudgetInvestmentForm =
|
||||
initialize: ->
|
||||
App.ValuationBudgetInvestmentForm.showFeasibilityFields()
|
||||
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange()
|
||||
false
|
||||
|
||||
@@ -41,5 +41,3 @@ App.Votations =
|
||||
url = "/admin/get_options_traductions.json"
|
||||
params = { enum_type: $("#votation_type_enum_type").val() }
|
||||
$.get(url, params, (response) -> App.Votations.setTraduction response, "json")
|
||||
|
||||
false
|
||||
|
||||
@@ -15,4 +15,3 @@ App.Votes =
|
||||
App.Votes.hoverize "div.supports"
|
||||
App.Votes.hoverize "div.debate-questions"
|
||||
App.Votes.hoverize "div.comment-footer"
|
||||
false
|
||||
|
||||
@@ -26,5 +26,3 @@ App.WatchFormChanges =
|
||||
App.WatchFormChanges.forms().each ->
|
||||
form = $(this)
|
||||
form.data("watchChanges", form.serialize())
|
||||
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user