Merge pull request #9954 from zeiphon/master

Added basic methods for angular-xeditable editable-form
This commit is contained in:
Mohamed Hegazy
2016-07-05 15:03:20 -07:00
committed by GitHub

View File

@@ -53,4 +53,46 @@ declare namespace angular.xeditable {
*/
activationEvent: string;
}
interface IEditableFormController extends angular.IFormController {
/**
* Shows form with editable controls.
*/
$show(): void;
/**
* Hides form with editable controls without saving.
*/
$hide(): void;
/**
* Sets focus on form field specified by `name`.<br/>
* When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called.
*
* @param name name of field
*/
$activate(name: string): void;
/**
* Triggers `oncancel` event and calls `$hide()`.
*/
$cancel(): void;
$setWaiting(value: boolean): void;
/**
* Shows error message for particular field.
*
* @param name name of field
* @param msg error message
*/
$setError(name: string, msg: string): void;
$submit(): void;
$save(): void;
}
}