From 013d8dd0c64732fe72dcd914be7e5d276d41c1db Mon Sep 17 00:00:00 2001 From: Dennis Irmscher Date: Mon, 26 Sep 2016 15:53:22 +0200 Subject: [PATCH 1/4] Suggest for neos-bootstrap --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 205a653..f21dbdb 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,9 @@ "typo3/neos": "~2.3.0", "typo3/neos-nodetypes": "~2.3.0" }, + "suggest": { + "obisconcept/neos-bootstrap": "Provides jQuery which is required by the plugin" + }, "autoload": { "psr-0": { "ObisConcept\\NeosAjaxForm": "Classes" From ee5dfe7f754fd67279322a11405489e4e4a076bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Zwinge?= Date: Tue, 27 Sep 2016 14:58:28 +0200 Subject: [PATCH 2/4] Updated suggestion --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f21dbdb..7164824 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ "typo3/neos-nodetypes": "~2.3.0" }, "suggest": { - "obisconcept/neos-bootstrap": "Provides jQuery which is required by the plugin" + "obisconcept/neos-bootstrap": "Provides jQuery which is required by the plugin", + "obisconcept/neos-jquery": "Add this package, if you don't use obisconcept/neos-bootstrap package or if you don't inluded jQuery by yourself" }, "autoload": { "psr-0": { From fc459a295705d8a15d67dd0be42c582c013ceb7c Mon Sep 17 00:00:00 2001 From: Dennis Irmscher Date: Wed, 28 Sep 2016 10:47:16 +0200 Subject: [PATCH 3/4] Added event handler for multi page forms --- Resources/Private/Assets/JavaScript/main.js | 17 ++++++++++++++++- Resources/Public/JavaScript/main.js | 17 ++++++++++++++++- Resources/Public/JavaScript/main.min.js | 4 ++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Resources/Private/Assets/JavaScript/main.js b/Resources/Private/Assets/JavaScript/main.js index 0c64df8..864b749 100755 --- a/Resources/Private/Assets/JavaScript/main.js +++ b/Resources/Private/Assets/JavaScript/main.js @@ -4,6 +4,15 @@ $(document).ready(function() { }); +window.initButtonClickHandler = function() { + + $('.ajax-form button[type="submit"]').on('click', function() { + $('.ajax-form button[type="submit"]').removeAttr('clicked'); + $(this).attr('clicked', 'true'); + }); + +} + window.initAjaxForm = function() { $.each($('.ajax-form'), function (idx, ajaxForm) { @@ -20,7 +29,9 @@ window.initAjaxForm = function() { var formURL = formObj.attr('action'); var formData = new FormData(this); - formData.append($(this).find('button[type="submit"]').attr('name'), $(this).find('button[type="submit"]').attr('value')); + var trigger = $(this).find('button[clicked="true"]'); + + formData.append($(trigger).attr('name'), $(trigger).attr('value')); $.ajax({ @@ -40,6 +51,8 @@ window.initAjaxForm = function() { $(ajaxForm).find('.ajax-content').replaceWith(data); + initButtonClickHandler(); + if ($(ajaxForm).find('.g-recaptcha').length) { var captcha = $(ajaxForm).find('.g-recaptcha'); var sitekey = captcha.data('sitekey'); @@ -56,6 +69,8 @@ window.initAjaxForm = function() { $(ajaxForm).load(formAjaxUrl + ' .ajax-content', function () { + initButtonClickHandler(); + $(this).css("min-height", $(this).css("height")); if ($(this).find('.g-recaptcha').length) { diff --git a/Resources/Public/JavaScript/main.js b/Resources/Public/JavaScript/main.js index 0c64df8..864b749 100755 --- a/Resources/Public/JavaScript/main.js +++ b/Resources/Public/JavaScript/main.js @@ -4,6 +4,15 @@ $(document).ready(function() { }); +window.initButtonClickHandler = function() { + + $('.ajax-form button[type="submit"]').on('click', function() { + $('.ajax-form button[type="submit"]').removeAttr('clicked'); + $(this).attr('clicked', 'true'); + }); + +} + window.initAjaxForm = function() { $.each($('.ajax-form'), function (idx, ajaxForm) { @@ -20,7 +29,9 @@ window.initAjaxForm = function() { var formURL = formObj.attr('action'); var formData = new FormData(this); - formData.append($(this).find('button[type="submit"]').attr('name'), $(this).find('button[type="submit"]').attr('value')); + var trigger = $(this).find('button[clicked="true"]'); + + formData.append($(trigger).attr('name'), $(trigger).attr('value')); $.ajax({ @@ -40,6 +51,8 @@ window.initAjaxForm = function() { $(ajaxForm).find('.ajax-content').replaceWith(data); + initButtonClickHandler(); + if ($(ajaxForm).find('.g-recaptcha').length) { var captcha = $(ajaxForm).find('.g-recaptcha'); var sitekey = captcha.data('sitekey'); @@ -56,6 +69,8 @@ window.initAjaxForm = function() { $(ajaxForm).load(formAjaxUrl + ' .ajax-content', function () { + initButtonClickHandler(); + $(this).css("min-height", $(this).css("height")); if ($(this).find('.g-recaptcha').length) { diff --git a/Resources/Public/JavaScript/main.min.js b/Resources/Public/JavaScript/main.min.js index ac6e7bf..f068f5e 100755 --- a/Resources/Public/JavaScript/main.min.js +++ b/Resources/Public/JavaScript/main.min.js @@ -1,2 +1,2 @@ -$(document).ready(function(){initAjaxForm()}),window.initAjaxForm=function(){$.each($(".ajax-form"),function(t,a){var e=$(a).attr("data-identifier"),n=$(a).attr("data-preset-name"),i=$(a).attr("data-dimension"),c=location.protocol+"//"+location.host+"/form/"+(""!=i?i+"/":"")+n+"/"+e;$(a).on("submit","form",function(t){var e=$(this),n=e.attr("action"),i=new FormData(this);i.append($(this).find('button[type="submit"]').attr("name"),$(this).find('button[type="submit"]').attr("value")),$.ajax({url:n,type:"POST",data:i,mimeType:"multipart/form-data",contentType:!1,cache:!1,processData:!1,beforeSend:function(){$(a).find(".ajax-content").replaceWith('')},success:function(t){if($(a).find(".ajax-content").replaceWith(t),$(a).find(".g-recaptcha").length){var e=$(a).find(".g-recaptcha"),n=e.data("sitekey");grecaptcha.render(e[0],{sitekey:n})}}}),t.preventDefault()}),$(a).load(c+" .ajax-content",function(){if($(this).css("min-height",$(this).css("height")),$(this).find(".g-recaptcha").length){var t=$(this).find(".g-recaptcha"),a=t.data("sitekey");grecaptcha.render(t[0],{sitekey:a})}})})}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4uanMiXSwibmFtZXMiOlsiJCIsImRvY3VtZW50IiwicmVhZHkiLCJ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GlvbigpIHtcblxuICAgICQuZWFjaCgkKCcuYWpheC1mb3JtJyksIGZ1bmN0aW9uIChpZHgsIGFqYXhGb3JtKSB7XG5cbiAgICAgICAgdmFyIGZvcm1JZGVudGlmaWVyID0gJChhamF4Rm9ybSkuYXR0cignZGF0YS1pZGVudGlmaWVyJyk7XG4gICAgICAgIHZhciBwcmVzZXROYW1lID0gJChhamF4Rm9ybSkuYXR0cignZGF0YS1wcmVzZXQtbmFtZScpO1xuICAgICAgICB2YXIgZGltZW5zaW9uID0gJChhamF4Rm9ybSkuYXR0cignZGF0YS1kaW1lbnNpb24nKTtcblxuICAgICAgICB2YXIgZm9ybUFqYXhVcmwgPSBsb2NhdGlvbi5wcm90b2NvbCArICcvLycgKyBsb2NhdGlvbi5ob3N0ICsgJy9mb3JtLycgICsgKCBkaW1lbnNpb24gIT0gJycgPyBkaW1lbnNpb24gKyAnLycgOiAnJyApICsgcHJlc2V0TmFtZSArICcvJyArIGZvcm1JZGVudGlmaWVyO1xuXG4gICAgICAgICQoYWpheEZvcm0pLm9uKCdzdWJtaXQnLCAnZm9ybScsIGZ1bmN0aW9uIChlKSB7XG5cbiAgICAgICAgICAgIHZhciBmb3JtT2JqID0gJCh0aGlzKTtcbiAgICAgICAgICAgIHZhciBmb3JtVVJMID0gZm9ybU9iai5hdHRyKCdhY3Rpb24nKTtcbiAgICAgICAgICAgIHZhciBmb3JtRGF0YSA9IG5ldyBGb3JtRGF0YSh0aGlzKTtcblxuICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCQodGhpcykuZmluZCgnYnV0dG9uW3R5cGU9XCJzdWJtaXRcIl0nKS5hdHRyKCduYW1lJyksICQodGhpcykuZmluZCgnYnV0dG9uW3R5cGU9XCJzdWJtaXRcIl0nKS5hdHRyKCd2YWx1ZScpKTtcblxuICAgICAgICAgICAgJC5hamF4KHtcblxuICAgICAgICAgICAgICAgIHVybDogZm9ybVVSTCxcbiAgICAgICAgICAgICAgICB0eXBlOiAnUE9TVCcsXG4gICAgICAgICAgICAgICAgZGF0YTogZm9ybURhdGEsXG4gICAgICAgICAgICAgICAgbWltZVR5cGU6ICdtdWx0aXBhcnQvZm9ybS1kYXRhJyxcbiAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgY2FjaGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBiZWZvcmVTZW5kOiBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgJChhamF4Rm9ybSkuZmluZCgnLmFqYXgtY29udGVudCcpLnJlcGxhY2VXaXRoKCc8aSBjbGFzcz1cIiBhamF4LWNvbnRlbnQgZmEgZmEtc3Bpbm5lciBmYS1wdWxzZVwiPjwvaT4nKTtcblxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKGRhdGEpIHtcblxuICAgICAgICAgICAgICAgICAgICAkKGFqYXhGb3JtKS5maW5kKCcuYWpheC1jb250ZW50JykucmVwbGFjZVdpdGgoZGF0YSk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCQoYWpheEZvcm0pLmZpbmQoJy5nLXJlY2FwdGNoYScpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciBjYXB0Y2hhID0gJChhamF4Rm9ybSkuZmluZCgnLmctcmVjYXB0Y2hhJyk7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHNpdGVrZXkgPSBjYXB0Y2hhLmRhdGEoJ3NpdGVrZXknKTtcbiAgICAgICAgICAgICAgICAgICAgICBncmVjYXB0Y2hhLnJlbmRlcihjYXB0Y2hhWzBdLCB7XCJzaXRla2V5XCI6IHNpdGVrZXl9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoYWpheEZvcm0pLmxvYWQoZm9ybUFqYXhVcmwgKyAnIC5hamF4LWNvbnRlbnQnLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICQodGhpcykuY3NzKFwibWluLWhlaWdodFwiLCAkKHRoaXMpLmNzcyhcImhlaWdodFwiKSk7XG5cbiAgICAgICAgICAgIGlmICgkKHRoaXMpLmZpbmQoJy5nLXJlY2FwdGNoYScpLmxlbmd0aCkge1xuICAgICAgICAgICAgICB2YXIgY2FwdGNoYSA9ICQodGhpcykuZmluZCgnLmctcmVjYXB0Y2hhJyk7XG4gICAgICAgICAgICAgIHZhciBzaXRla2V5ID0gY2FwdGNoYS5kYXRhKCdzaXRla2V5Jyk7XG4gICAgICAgICAgICAgIGdyZWNhcHRjaGEucmVuZGVyKGNhcHRjaGFbMF0sIHtcInNpdGVrZXlcIjogc2l0ZWtleX0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0pO1xuXG4gICAgfSk7XG5cbn1cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== +$(document).ready(function(){initAjaxForm()}),window.initButtonClickHandler=function(){$('.ajax-form button[type="submit"]').on("click",function(){$('.ajax-form button[type="submit"]').removeAttr("clicked"),$(this).attr("clicked","true")})},window.initAjaxForm=function(){$.each($(".ajax-form"),function(t,a){var n=$(a).attr("data-identifier"),e=$(a).attr("data-preset-name"),i=$(a).attr("data-dimension"),c=location.protocol+"//"+location.host+"/form/"+(""!=i?i+"/":"")+e+"/"+n;$(a).on("submit","form",function(t){var n=$(this),e=n.attr("action"),i=new FormData(this),c=$(this).find('button[clicked="true"]');i.append($(c).attr("name"),$(c).attr("value")),$.ajax({url:e,type:"POST",data:i,mimeType:"multipart/form-data",contentType:!1,cache:!1,processData:!1,beforeSend:function(){$(a).find(".ajax-content").replaceWith('')},success:function(t){if($(a).find(".ajax-content").replaceWith(t),initButtonClickHandler(),$(a).find(".g-recaptcha").length){var n=$(a).find(".g-recaptcha"),e=n.data("sitekey");grecaptcha.render(n[0],{sitekey:e})}}}),t.preventDefault()}),$(a).load(c+" .ajax-content",function(){if(initButtonClickHandler(),$(this).css("min-height",$(this).css("height")),$(this).find(".g-recaptcha").length){var t=$(this).find(".g-recaptcha"),a=t.data("sitekey");grecaptcha.render(t[0],{sitekey:a})}})})}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4uanMiXSwibmFtZXMiOlsiJCIsImRvY3VtZW50IiwicmVhZHkiLCJpbml0QWpheEZvcm0iLCJ3aW5kb3ciLCJpbml0QnV0dG9uQ2xpY2tIYW5kbGVyIiwib24iLCJyZW1vdmVBdHRyIiwidGhpcyIsImF0dHIiLCJlYWNoIiwiaWR4IiwiYWpheEZvcm0iLCJmb3JtSWRlbnRpZmllciIsInByZXNldE5hbWUiLCJkaW1lbnNpb24iLCJmb3JtQWpheFVybCIsImxvY2F0aW9uIiwicHJvdG9jb2wiLCJob3N0IiwiZSIsImZvcm1PYmoiLCJmb3JtVVJMIiwiZm9ybURhdGEiLCJGb3JtRGF0YSIsInRyaWdnZXIiLCJmaW5kIiwiYXBwZW5kIiwiYWpheCIsInVybCIsInR5cGUiLCJkYXRhIiwibWltZVR5cGUiLCJjb250ZW50VHlwZSIsImNhY2hlIiwicHJvY2Vzc0RhdGEiLCJiZWZvcmVTZW5kIiwicmVwbGFjZVdpdGgiLCJzdWNjZXNzIiwibGVuZ3RoIiwiY2FwdGNoYSIsInNpdGVrZXkiLCJncmVjYXB0Y2hhIiwicmVuZGVyIiwicHJldmVudERlZmF1bHQiLCJsb2FkIiwiY3NzIl0sIm1hcHBpbmdzIjoiQUFBQUEsRUFBQUMsVUFBQUMsTUFBQSxXQUVBQyxpQkFJQUMsT0FBQUMsdUJBQUEsV0FFQUwsRUFBQSxvQ0FBQU0sR0FBQSxRQUFBLFdBQ0FOLEVB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XIgcHJlc2V0TmFtZSA9ICQoYWpheEZvcm0pLmF0dHIoJ2RhdGEtcHJlc2V0LW5hbWUnKTtcbiAgICAgICAgdmFyIGRpbWVuc2lvbiA9ICQoYWpheEZvcm0pLmF0dHIoJ2RhdGEtZGltZW5zaW9uJyk7XG5cbiAgICAgICAgdmFyIGZvcm1BamF4VXJsID0gbG9jYXRpb24ucHJvdG9jb2wgKyAnLy8nICsgbG9jYXRpb24uaG9zdCArICcvZm9ybS8nICArICggZGltZW5zaW9uICE9ICcnID8gZGltZW5zaW9uICsgJy8nIDogJycgKSArIHByZXNldE5hbWUgKyAnLycgKyBmb3JtSWRlbnRpZmllcjtcblxuICAgICAgICAkKGFqYXhGb3JtKS5vbignc3VibWl0JywgJ2Zvcm0nLCBmdW5jdGlvbiAoZSkge1xuXG4gICAgICAgICAgICB2YXIgZm9ybU9iaiA9ICQodGhpcyk7XG4gICAgICAgICAgICB2YXIgZm9ybVVSTCA9IGZvcm1PYmouYXR0cignYWN0aW9uJyk7XG4gICAgICAgICAgICB2YXIgZm9ybURhdGEgPSBuZXcgRm9ybURhdGEodGhpcyk7XG5cbiAgICAgICAgICAgIHZhciB0cmlnZ2VyID0gJCh0aGlzKS5maW5kKCdidXR0b25bY2xpY2tlZD1cInRydWVcIl0nKTtcblxuICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKCQodHJpZ2dlcikuYXR0cignbmFtZScpLCAkKHRyaWdnZXIpLmF0dHIoJ3ZhbHVlJykpO1xuXG4gICAgICAgICAgICAkLmFqYXgoe1xuXG4gICAgICAgICAgICAgICAgdXJsOiBmb3JtVVJMLFxuICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICBkYXRhOiBmb3JtRGF0YSxcbiAgICAgICAgICAgICAgICBtaW1lVHlwZTogJ211bHRpcGFydC9mb3JtLWRhdGEnLFxuICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBjYWNoZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgcHJvY2Vzc0RhdGE6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGJlZm9yZVNlbmQ6IGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgICAgICAkKGFqYXhGb3JtKS5maW5kKCcuYWpheC1jb250ZW50JykucmVwbGFjZVdpdGgoJzxpIGNsYXNzPVwiIGFqYXgtY29udGVudCBmYSBmYS1zcGlubmVyIGZhLXB1bHNlXCI+PC9pPicpO1xuXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAoZGF0YSkge1xuXG4gICAgICAgICAgICAgICAgICAgICQoYWpheEZvcm0pLmZpbmQoJy5hamF4LWNvbnRlbnQnKS5yZXBsYWNlV2l0aChkYXRhKTtcblxuICAgICAgICAgICAgICAgICAgICBpbml0QnV0dG9uQ2xpY2tIYW5kbGVyKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCQoYWpheEZvcm0pLmZpbmQoJy5nLXJlY2FwdGNoYScpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciBjYXB0Y2hhID0gJChhamF4Rm9ybSkuZmluZCgnLmctcmVjYXB0Y2hhJyk7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHNpdGVrZXkgPSBjYXB0Y2hhLmRhdGEoJ3NpdGVrZXknKTtcbiAgICAgICAgICAgICAgICAgICAgICBncmVjYXB0Y2hhLnJlbmRlcihjYXB0Y2hhWzBdLCB7XCJzaXRla2V5XCI6IHNpdGVrZXl9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoYWpheEZvcm0pLmxvYWQoZm9ybUFqYXhVcmwgKyAnIC5hamF4LWNvbnRlbnQnLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgIGluaXRCdXR0b25DbGlja0hhbmRsZXIoKTtcblxuICAgICAgICAgICAgJCh0aGlzKS5jc3MoXCJtaW4taGVpZ2h0XCIsICQodGhpcykuY3NzKFwiaGVpZ2h0XCIpKTtcblxuICAgICAgICAgICAgaWYgKCQodGhpcykuZmluZCgnLmctcmVjYXB0Y2hhJykubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIHZhciBjYXB0Y2hhID0gJCh0aGlzKS5maW5kKCcuZy1yZWNhcHRjaGEnKTtcbiAgICAgICAgICAgICAgdmFyIHNpdGVrZXkgPSBjYXB0Y2hhLmRhdGEoJ3NpdGVrZXknKTtcbiAgICAgICAgICAgICAgZ3JlY2FwdGNoYS5yZW5kZXIoY2FwdGNoYVswXSwge1wic2l0ZWtleVwiOiBzaXRla2V5fSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfSk7XG5cbiAgICB9KTtcblxufVxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 From 508a332673eff57910993a924ab8298566059d9e Mon Sep 17 00:00:00 2001 From: Dennis Irmscher Date: Wed, 28 Sep 2016 12:47:05 +0200 Subject: [PATCH 4/4] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6248562..004f908 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Add the package in your site package composer.json ``` "require": { - "obisconcept/neos-ajax-form": "~1.0" + "obisconcept/neos-ajax-form": "~1.0.0" } ```