How Can We Relocate Blank Bottom Row for Inline Edit

Discuss MySQL Ajax Table Editor Pro Version

How Can We Relocate Blank Bottom Row for Inline Edit

Postby hexxamillion » Thu Jun 27, 2013 5:18 pm

In a situation where we want to display 50+ items and we are using the inline edit code how can we relocate the blank row for adding to the top of the table rather than the bottom? So we don't have to scroll all the way to the bottom if we just want to add a new row.
hexxamillion
 
Posts: 100
Joined: Fri Jul 08, 2011 11:36 pm

Re: How Can We Relocate Blank Bottom Row for Inline Edit

Postby admin » Mon Jul 08, 2013 4:13 pm

In the ajax_table_editor.js file you would modify the insertAddInPlaceForm function. I haven't tested it but I believe you could simply change
Code: Select all
$('#' + instanceName+'header_row').parent().append(html);

to
Code: Select all
$('#' + instanceName+'header_row').after(html);


PS I never received any notifications for these posts, so sorry about the long response times.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: How Can We Relocate Blank Bottom Row for Inline Edit

Postby hexxamillion » Mon Jul 08, 2013 6:15 pm

Thanks. I will give that a whirl.
hexxamillion
 
Posts: 100
Joined: Fri Jul 08, 2011 11:36 pm

Re: How Can We Relocate Blank Bottom Row for Inline Edit

Postby thehrushi » Fri May 04, 2018 10:30 pm

This is working, but the new row gets added at the bottom of the current page. Please suggest how it can be added at the top such that it makes more sense for user experience.
thehrushi
 
Posts: 7
Joined: Fri May 04, 2018 10:06 pm

Re: How Can We Relocate Blank Bottom Row for Inline Edit

Postby thehrushi » Fri May 04, 2018 10:38 pm

Solved it myself.
Under "drawNewRowInPlace", remove the ".reverse()" after .get() so that it looks like...

...
if(drawAfterRowNum == null || drawAfterRowNum.length == 0) {
$($('#' + instanceName+'table_form table tr').get()).each(function(index,tRow) {
...
thehrushi
 
Posts: 7
Joined: Fri May 04, 2018 10:06 pm


Return to Pro Version

Who is online

Users browsing this forum: No registered users and 4 guests

cron