Add an option to allow cells to be editable.#155
Add an option to allow cells to be editable.#155rht wants to merge 2 commits intoalfajango:masterfrom rht:master
Conversation
|
Rationale: This will ease the writing process of a dynamic editable table, for example: var dynatable = $("table.dynatable").dynatable({dataset: {records: records }}).data('dynatable');
// ...
// some code
// ...
function updateDynaTable() {
var newrecords = dynatable.records.getFromTable();
// clean up the content of newrecords
// ...
// replace old records
dynatable.settings.dataset.originalRecords = newrecords;
dynatable.process();
} |
There was a problem hiding this comment.
This should be contentEditable="true" for the td attribute.
Also, is setting the column header to contentEditable the best way to allow this feature on columns? Wouldn't the more common use-case be that you want only the cells to be contentEditable and not the header row?
There was a problem hiding this comment.
The td is created as a string, so this is the only way to append the attribute.
That's true. One approach is to use a custom class editable/columnEditable as a check instead?
There was a problem hiding this comment.
For the attribute name, I was referring to the fact that you have contenteditable instead of contentEditable (capitalized "Editable").
Yeah, I'm thinking as a data attribute, like data-contenteditable or maybe namespaced to avoid conflicts with other libraries like data-dynatable-contenteditable on the th element in the column header cell.
There was a problem hiding this comment.
Was aware that I didn't use the camelCase; I should have mentioned this earlier.
Though it isn't meant to be contentEditable http://www.w3.org/TR/2008/WD-html5-20080610/editing.html#contenteditable0 ?
(I can't edit this PR that since I removed the branch a long time ago...making a new one)
|
(here goes) Dup of #229 |
No description provided.