"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tapestry-core/src/main/generated/compiled-coffeescript/META-INF/modules/t5/core/forms.js" between
apache-tapestry-5.7.1-sources.zip and apache-tapestry-5.7.2-sources.zip

About: Apache Tapestry is a framework for creating dynamic, robust, highly scalable web applications in Java. Source code.

forms.js  (apache-tapestry-5.7.1-sources):forms.js  (apache-tapestry-5.7.2-sources)
(function() { (function() {
define(["./events", "./dom", "underscore"], function(events, dom, _) { define(["./events", "./dom", "underscore"], function(events, dom, _) {
var SKIP_VALIDATION, clearSubmittingHidden, defaultValidateAndSubmit, export s, gatherParameters, setSubmittingHidden; var DATA_ATTRIBUTE, DATA_ATTRIBUTE_VALUE, SKIP_VALIDATION, TAPESTRY_CORE_FOR M_SELECTOR, clearSubmittingHidden, defaultValidateAndSubmit, exports, gatherPara meters, setSubmittingHidden;
SKIP_VALIDATION = "t5:skip-validation"; SKIP_VALIDATION = "t5:skip-validation";
DATA_ATTRIBUTE = "data-generator";
DATA_ATTRIBUTE_VALUE = "tapestry/core/form";
TAPESTRY_CORE_FORM_SELECTOR = "form[" + DATA_ATTRIBUTE + "='" + DATA_ATTRIBU
TE_VALUE + "']";
clearSubmittingHidden = function(form) { clearSubmittingHidden = function(form) {
var hidden; var hidden;
hidden = form.findFirst("[name='t:submit']"); hidden = form.findFirst("[name='t:submit']");
hidden && hidden.value(null); hidden && hidden.value(null);
form.meta(SKIP_VALIDATION, null); form.meta(SKIP_VALIDATION, null);
}; };
setSubmittingHidden = function(form, submitter) { setSubmittingHidden = function(form, submitter) {
var firstHidden, hidden, isCancel, mode, name; var firstHidden, hidden, isCancel, mode, name;
mode = submitter.attr("data-submit-mode"); mode = submitter.attr("data-submit-mode");
isCancel = mode === "cancel"; isCancel = mode === "cancel";
skipping to change at line 123 skipping to change at line 126
return "triggering " + events.form.prepareForSubmit + " event (after v alidation)"; return "triggering " + events.form.prepareForSubmit + " event (after v alidation)";
}; };
this.trigger(events.form.prepareForSubmit); this.trigger(events.form.prepareForSubmit);
} catch (error1) { } catch (error1) {
error = error1; error = error1;
console.error("Form validiation/submit error `" + (error.toString()) + " ', in form " + (this.toString()) + ", " + (where())); console.error("Form validiation/submit error `" + (error.toString()) + " ', in form " + (this.toString()) + ", " + (where()));
console.error(error); console.error(error);
return false; return false;
} }
}; };
dom.onDocument("submit", "form", defaultValidateAndSubmit); dom.onDocument("submit", TAPESTRY_CORE_FORM_SELECTOR, defaultValidateAndSubm
dom.onDocument("click", "input[type=submit], input[type=image]", function() it);
{ dom.onDocument("click", TAPESTRY_CORE_FORM_SELECTOR + " input[type=submit],
" + TAPESTRY_CORE_FORM_SELECTOR + " input[type=image]", function() {
setSubmittingHidden(dom(this.element.form), this); setSubmittingHidden(dom(this.element.form), this);
}); });
dom.onDocument("click", "a[data-submit-mode]", function() { dom.onDocument("click", "a[data-submit-mode]", function() {
var form; var form;
form = this.findParent("form"); form = this.findParent("form");
if (!form) { if (!form) {
console.error("Submitting link element not contained inside a form eleme nt."); console.error("Submitting link element not contained inside a form eleme nt.");
return false; return false;
} }
setSubmittingHidden(form, this.closest("a[data-submit-mode]")); setSubmittingHidden(form, this.closest("a[data-submit-mode]"));
 End of changes. 3 change blocks. 
4 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)