Remove unnecessary return statements
These statements were automatically added by CoffeeScript. I'm only removing the obvious cases; there might be more cases where the `return` statement isn't necessary.
This commit is contained in:
@@ -1,22 +1,21 @@
|
||||
// Generated by CoffeeScript 1.12.6
|
||||
(function() {
|
||||
"use strict";
|
||||
App.Forms = {
|
||||
disableEnter: function() {
|
||||
return $("form.js-enter-disabled").on("keyup keypress", function(event) {
|
||||
$("form.js-enter-disabled").on("keyup keypress", function(event) {
|
||||
if (event.which === 13) {
|
||||
return event.preventDefault();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
},
|
||||
submitOnChange: function() {
|
||||
return $(".js-submit-on-change").unbind("change").on("change", function() {
|
||||
$(".js-submit-on-change").unbind("change").on("change", function() {
|
||||
$(this).closest("form").submit();
|
||||
return false;
|
||||
});
|
||||
},
|
||||
toggleLink: function() {
|
||||
return $(".js-toggle-link").unbind("click").on("click", function() {
|
||||
$(".js-toggle-link").unbind("click").on("click", function() {
|
||||
var toggle_txt;
|
||||
$($(this).data("toggle-selector")).toggle("down");
|
||||
if ($(this).data("toggle-text") !== void 0) {
|
||||
@@ -35,10 +34,10 @@
|
||||
inputs = $(progress_bar + ", " + processes + ", " + banners);
|
||||
inputs.on({
|
||||
input: function() {
|
||||
return $("[name='" + this.name + "']").val($(this).val());
|
||||
$("[name='" + this.name + "']").val($(this).val());
|
||||
}
|
||||
});
|
||||
return inputs.trigger("input");
|
||||
inputs.trigger("input");
|
||||
},
|
||||
hideOrShowFieldsAfterSelection: function() {
|
||||
$("[name='progress_bar[kind]']").on({
|
||||
@@ -48,21 +47,21 @@
|
||||
title_field = $(".translatable-fields[data-locale=" + locale + "]");
|
||||
if (this.value === "primary") {
|
||||
title_field.hide();
|
||||
return $(".globalize-languages").hide();
|
||||
$(".globalize-languages").hide();
|
||||
} else {
|
||||
title_field.show();
|
||||
return $(".globalize-languages").show();
|
||||
$(".globalize-languages").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
return $("[name='progress_bar[kind]']").change();
|
||||
$("[name='progress_bar[kind]']").change();
|
||||
},
|
||||
initialize: function() {
|
||||
App.Forms.disableEnter();
|
||||
App.Forms.submitOnChange();
|
||||
App.Forms.toggleLink();
|
||||
App.Forms.synchronizeInputs();
|
||||
return App.Forms.hideOrShowFieldsAfterSelection();
|
||||
App.Forms.hideOrShowFieldsAfterSelection();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user