Skip to content

Commit

Permalink
Merge pull request #8 from DarKsandr/feature/inline-mode
Browse files Browse the repository at this point in the history
Add inline mode
  • Loading branch information
DarKsandr authored Sep 25, 2023
2 parents 40c4c93 + 6fe770d commit 6a6c3f0
Show file tree
Hide file tree
Showing 8 changed files with 288 additions and 124 deletions.
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

0 comments on commit 6a6c3f0

Please sign in to comment.