Sunday, July 31, 2011

AJAXify phpMyAdmin Interface - GSOC 2011 - 10th week

According to my timeline, this week I had to work with ajaxify the options in table operations. Mainly this week I focused on ajaxify two option in the table options. Those options are
  1. Alter order by
  2. Copy table.
For the "Alter order by" option I did following changes to handle the ajax request and the response.
  1. I added the "$("#alterTableOrderby.ajax").live('submit')" action to the functions.js file which posts the alterTableOrderby form with ajax post and then return the results without reloading the page.
  2. I modified the tbl_operations.php and tbl_alter.php files in order to handle the ajax request which was sent by the above action.
Now when the user click on the go button "Alter order by" form, it get submit as a ajax request and then show the results of the action to the user without reloading the page.

Then I started working with ajaxify the "Copy table" option in the table operations. I did following changes in order to handle this ajax response.
  1. I added "$("#copyTable.ajax").live('submit',)" action to the functions.js file which handles the ajax submission of the copy table form. When the "Switch to copied table" options is selected I continued with the non ajax submit.
  2. Then I modified the tbl_operations.js file and the tbl_move_copy.php file which handles that ajax request.
After doing these modifications now when user copy a table to another database he can do it by reloading the page and if only the user select "Switch to copied table" option only he redirects to the copied table.

Next week I'll continue with ajaxify the remaining options in table operations.

1 comment: