Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inline mode #8

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,22 @@ Required
});
```
# Options
Options can be defined via javascript or via data-* html attributes.\
| Name | Type | Default | Description |
| ----------- | --------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ajaxOptions | object | null | Text shown when element is empty |
| disabled | boolean | false | Sets disabled state of editable |
| emptytext | string | 'Empty' | Text shown when element is empty. |
| error | function | null | |
| success | function | null | |
| name | string | null | Name of field. Will be submitted on server. Can be taken from ```id``` attribute |
| pk | string | null | Primary key of editable object (e.g. record id in database). |
| send | boolean | true | Strategy for sending data on server. When ```true``` data will be sent on server only if pk and url defined, otherwise new value will be stored locally. |
| type | string | 'text' | Type of input. Can be text/textarea/select/date and more |
| url | string | null | Url for submit, e.g. ```'/post'``` |
| value | mixed | element's text | Initial value of input. If not set, taken from element's text. |
Options can be defined via javascript or via data-* html attributes.

| Name | Type | Default | Description |
|--------------| --------------- |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| ajaxOptions | object | null | Text shown when element is empty |
| disabled | boolean | false | Sets disabled state of editable |
| emptytext | string | 'Empty' | Text shown when element is empty. |
| error | function | null | |
| success | function | null | |
| name | string | null | Name of field. Will be submitted on server. Can be taken from ```id``` attribute |
| pk | string | null | Primary key of editable object (e.g. record id in database). |
| send | boolean | true | Strategy for sending data on server. When ```true``` data will be sent on server only if pk and url defined, otherwise new value will be stored locally. |
| type | string | 'text' | Type of input. Can be text/textarea/select/date and more |
| url | string | null | Url for submit, e.g. ```'/post'``` |
| value | mixed | element's text | Initial value of input. If not set, taken from element's text. |
| mode | string | 'popup' | Mode of editable, can be popup or inline. |
# Methods
| Method | Parameters | Description |
| ----------------- | --------------------------------- | ------------------------------------------------------------- |
Expand Down
Loading