You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mytab...@googlegroups.com
Hi,
i am currently battling the TableGrid to make it useful for local data that is not mirrored in a database but is held inside an array of the browser. The things I managed are:
Upgraded code to work with prototype 1.7. Removed "var self=this" in TableGrid.js and used proper binding instead.
Sorting works without remote url. Currently only a simple sort via < and > is done across the elements.
The modification markers remain after sorting. I extended this.modifiedRows so it holds Objects in a form of { rownumber, [ modifiedCellId, modifiedCellId, ...]} for this purpose.
A heavy bug inside _applyHeaderButtons removed: "element.observe("click"...)" was called inside "element.observe("mousemove"...)", thereby flooding the header with "click"-observers everytime the mouse ran over it. I am removing the "click"-handlers inside now before adding new ones.
Still unchecked:
Pager
Still broken:
Adding and deleting columns. This is going to be really tricky, since the TableGrid keeps track of deleted and added cells in extra arrays. Sorting is going to be fun....
Pablo Aravena
unread,
Jun 16, 2012, 10:23:43 PM6/16/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mytab...@googlegroups.com
Hi Wolfgang
That is excellent, did you check out the source code from github?
Currently, I'm rewriting the code in coffeescript and jquery but still
not getting to TableGrid.js part.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mytab...@googlegroups.com
Hi.
Yes, I made a fork on Github. I cannot check my code back to the fork... seems I don't really understand GitHub ^^ Maybe files are locked or need your approval?
Anyway, news on the progress:
The table headers work correctly with IE now. (Stupid IE fires the events "mousemove" and "click" simultaneously *siiigh*)
Sorting on local data keep the "new cell" markers.
Inserted cells are automatically marked with "new cell" markers for each cell ... and that's why the "save"-Button works correctly now ;-)
Keeping the page of the pager when a sort is executed on DB/Backend data.
Shifted the localization of the Date-Fields from Date.js to i18n.js.
What I'm about to do next:
Installing an option to make the first row "fixed". That will be tricky, since I have to render this row outside the table so it stays visible, but synchronize its vertical scrolling with the table.
Adding a filter field. I'll start with a primitive one without "filtering while you type".
I'll keep you informed on how it went. Best wishes,