Added basic methods for angular-xeditable editable-form

This commit is contained in:
Jonathon T
2016-07-05 17:18:57 +10:00
committed by GitHub
parent 42335c83ed
commit 44bee9f24c

View File

@@ -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();
}
}