Monday, August 15, 2011

AJAXify phpMyAdmin Interface - GSOC 2011 - 12th week

According to the schedule I had to continue with ajaxify the table maintenance options in this week. Last week I did some modifications with this task and there were some bugs with that. Marc showed me that some important information are missing with the results of ajaxified table maintenance actions. In CHECK TABLE action there was a table which contains Msg_type and Msg_text information in non ajax configuration but in ajax configuration it was not there. In order to make this information available I had to do the following changes.
  1. Added "if(isset($_REQUEST['ajax_request']) && isset($_REQUEST['table_mainrenance'])) {}" condition to sql.php file in order to handle the table maintenance action and return the results with those useful information.
  2. Change the logic in "$("#tbl_maintenance.ajax li").live('click')" action to get the results sent by sql.php file and then show it in the table operations page using ajax.
Then after Marc showed me a new bug where the documentation links are not functioned properly, I changed the "$("#tbl_maintenance.ajax li").live('click')" action to "$("#tbl_maintenance.ajax li a.maintain_action").live('click')" and changed the tbl_operations.js file according to that.
After all these changes this option seems working properly and I'm waiting for the response by Marc.

Since I skip ajaxify the "Table options" in table operations after discussing with Marc due to inefficiency of doing that, Marc asked me to find a new task instead of that. I went trough various options in PMA and could not find a suitable action which is really need ajax behavior at this moment. Then I went through the "Ajaxify Interface" section in PMA wiki and found that the ajaxification of table insert is remaining as a to do task. After discussing with Marc he mentioned that this is not necessary at this stage and he asked me to involve with more useful task which is rewrite the querywindow.js file using jquery.

The querywindow.js file contains four function which are
  1. PMA_queryAutoCommit()
  2. PMA_querywindowCommit(tab)
  3. PMA_querywindowSetFocus()
  4. PMA_querywindowResize().
I rewrote the 2nd and 3rd functions using jquery and works fine for testing.

Next week I'll continue with rewriting the querywindow.js functions.

1 comment:

  1. These facts are really interesting. Few of them were well known for me but many of them were brand new for me too!
    I will print this one out and show to my friends because they will be definitely interested in that. Thanks!
    phpMyAdmin

    ReplyDelete