mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Added basic methods for angular-xeditable editable-form
This commit is contained in:
42
angular-xeditable/angular-xeditable.d.ts
vendored
42
angular-xeditable/angular-xeditable.d.ts
vendored
@@ -53,4 +53,46 @@ declare namespace angular.xeditable {
|
||||
*/
|
||||
activationEvent: string;
|
||||
}
|
||||
|
||||
interface IEditableFormController extends angular.IFormController {
|
||||
|
||||
/**
|
||||
* Shows form with editable controls.
|
||||
*/
|
||||
$show();
|
||||
|
||||
/**
|
||||
* Hides form with editable controls without saving.
|
||||
*/
|
||||
$hide();
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* Triggers `oncancel` event and calls `$hide()`.
|
||||
*/
|
||||
$cancel();
|
||||
|
||||
$setWaiting(value: boolean);
|
||||
|
||||
/**
|
||||
* Shows error message for particular field.
|
||||
*
|
||||
* @param name name of field
|
||||
* @param msg error message
|
||||
*/
|
||||
$setError(name: string, msg: string);
|
||||
|
||||
$submit();
|
||||
|
||||
$save();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user