Remove unused JavaScript (#6621)
This commit is contained in:
parent
da89b9854e
commit
cb82bbcc87
1 changed files with 0 additions and 21 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue