Remove unused JavaScript (#6621)

This commit is contained in:
Jacob Herrington 2020-03-13 02:05:18 -05:00 committed by GitHub
parent da89b9854e
commit cb82bbcc87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,24 +63,3 @@
</table>
<%= paginate @mods %>
<script>
function submitForms() {
var form = $(this);
var valuesToSubmit = $(this).serialize();
form.parents(".wrapper").addClass("submitting-no-border")
$.ajax({
type: "POST",
url: $(this).attr('action'), //sumbits it to the given url of the form
data: valuesToSubmit,
// dataType: "JSON" // you want a difference between normal and ajax-calls, and json is standard
}).success(function (json) {
console.log("success")
form.parents(".wrapper").addClass("highlighted-no-border")
});
return false; // prevents normal behaviour
}
$('.wrapper').on("submit", "form", submitForms)
</script>