From 4666d386d62bbdbdef378c977b0943018ffc4745 Mon Sep 17 00:00:00 2001 From: Doron Grinzaig Date: Mon, 7 Nov 2016 12:56:19 +0200 Subject: [PATCH 1/2] Add event to submitHandler signatute --- jquery.validation/jquery.validation.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.validation/jquery.validation.d.ts b/jquery.validation/jquery.validation.d.ts index 78cf13a05e..fb686837dc 100644 --- a/jquery.validation/jquery.validation.d.ts +++ b/jquery.validation/jquery.validation.d.ts @@ -128,9 +128,9 @@ declare namespace JQueryValidation */ showErrors?: (errorMap: ErrorDictionary, errorList: ErrorListItem[]) => void; /** - * Callback for handling the actual submit when the form is valid. Gets the form as the only argument. Replaces the default submit. The right place to submit a form via Ajax after it is validated. + * Callback for handling the actual submit when the form is valid. Gets the form and the event object. Replaces the default submit. The right place to submit a form via Ajax after it is validated. */ - submitHandler?: (form: HTMLFormElement) => void; + submitHandler?: (form: HTMLFormElement, event?: JQueryEventObject) => void; /** * String or Function. If specified, the error label is displayed to show a valid element. If a String is given, it is added as a class to the label. If a Function is given, it is called with the label (as a jQuery object) and the validated input (as a DOM element). The label can be used to add a text like "ok!". */ From a32269bd4def805117c3bd23f68352f77ce328e9 Mon Sep 17 00:00:00 2001 From: Doron Grinzaig Date: Mon, 7 Nov 2016 13:04:21 +0200 Subject: [PATCH 2/2] Added missing parameter for closing modal --- materialize-css/materialize-css.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/materialize-css/materialize-css.d.ts b/materialize-css/materialize-css.d.ts index 2968176ff0..d455cd0324 100644 --- a/materialize-css/materialize-css.d.ts +++ b/materialize-css/materialize-css.d.ts @@ -414,8 +414,10 @@ interface JQuery { /** * Close a modal programatically + * + * @name options the lean modal options */ - closeModal(): void; + closeModal(options?: Materialize.LeanModalOptions): void; /** * Parallax is an effect where the background content or image in this case, is moved at a different speed than the foreground content while scrolling.