rgeddes
Forum Replies Created
-
Tobias,
I’ll zip the tablepress directory..
BTW, where can I send it…?
The DEBUG message was from several plugins… I never even navigated to a Tablepress related url. I”m working on a project that has many plugins.
Regards,
RTobias,
Thanks for your input… found all the relevant code.
The thing about the edit.js vs edit.min.js was my fault.. I commented out tp.init() in edit.js to see if that made any difference.. forgot to undo that change… all is normal now.
Thanks for pointing me to the DEBUG feature… unfortunately, when I turned it on, all sorts of messages were displayed…
Anyway, I have an implementation of the single textarea input table editor… with tab/shift-tab and it wraps when it reaches the end of a row when tabbing, or the beginning of a row when shift-tabbing.
It takes about 8 secs to load the table, thereafter the latency is much less, especially when navigating with tab/shift-tab.
I also converted the sort by column, but it’s a little inconsistent… with numbers, it seems to do ok… with mixed numbers and characters, I noticed some minor mis-ordering.
I’d like to send you a copy of this implementation and get your opinion… and suggestions. How would I do that?
Regards,
RTobias,
I ran some tests on the page load and it looks ok as far as stuffing the DOM… the code basically spits out the table as textarea elements in the table… these inputs seem to be expensive to the cpu. I tried replacing the textarea elements with input elements, but it does not change the latency. Getting rid of the input type elements was the only thing to speed up the editing process.. of coarse, there’s a conundrum there… editing without input elements.
I looked at what phpmyadmin does, and they have two things going that make editing a large table less painful:
1. They use pagination and by default process about 30 rows at a time.
2. Instead of using many input elements, they use one, and dynamically move it over the table cell being edited… when the textarea loses focus, the value beneath the textarea is updated, the the data is probably sent back to the db (via ajax?), and the textarea element is hidden, and waiting to be moved over the next cell to be edited.Both approaches are worthwhile, but pagination would probably be easier since you already have pagination code to display the table to the user.
I renamed the edit.js file edit.min.js to see it in the chrome debugger, and some of the features stopped working. Is edit.js the latest source? I’d like to see the latest code to maybe adapt pagination to the editor.
Regards
RHello Tobias, [Resolved]
I tried this approach:
$table = TablePress::$controller->model_table->load( $table_id );
and pulled the data from
$table['data']
I originally imported 1250 rows of data, and $table[‘data’] only retrieves the first 7 rows. Is there a parameter that limits the number of rows returned?
Sorry… the rows are being returned.. subsequent code truncates the number of rows.
Thanks
Richard