fixed mailthingy, so it works on both channel and frontpage

This commit is contained in:
Kasper Rynning-Tønnesen
2016-02-10 12:21:08 +01:00
parent a3f420535e
commit fa4e7b3912
5 changed files with 20 additions and 19 deletions

View File

@@ -172,6 +172,12 @@ var Helper = {
if(from != "" && message != ""){
$("#submit-contact-form").addClass("hide");
$("#send-loader").removeClass("hide");
$("#contact-form-from").attr("disabled", "true");
$("#contact-form-message").attr("disabled", "true");
/*
$.ajax({
type: "POST",
@@ -199,6 +205,16 @@ var Helper = {
}
$(document).on('submit', '#contact-form', function(e){
e.preventDefault();
var message = $("#contact-form-message").val();
var from = $("#contact-form-from").val();
Helper.send_mail(from, message);
});
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
}

View File

@@ -350,21 +350,6 @@ function initfp(){
window.initfp = initfp;
$(document).on('submit', '#contact-form', function(e){
e.preventDefault();
var message = $("#contact-form-message").val();
var from = $("#contact-form-from").val();
$("#submit-contact-form").addClass("hide");
$("#send-loader").removeClass("hide");
$("#contact-form-from").attr("disabled", "true");
$("#contact-form-message").attr("disabled", "true");
Helper.send_mail(from, message);
});
$(document).on('click', '#cookieok', function() {
$(this).fadeOut(function(){
$(this).remove();