Sunday, July 3, 2011

AJAXify phpMyAdmin Interface - GSOC 2011 - Sixth week

This week I mainly worked with three options in my project. Those are ajaxifying the following features.
  1. Continued with "Multi_row ->Export" in "Table->Browse"
  2. "Indexes->Edit" in "Table->Structure"
  3. "Hide/Show Indexes" in "Table->Structure"
The first task is a continuation of the my forth week task. In this I tried to export the results to an external file and tried to do it with ajax. But after referring some discussion in forums I realized that this is hard to achieve with ajax and then after discussing with Marc I have reverted the changes done to the ''Export" option and skipped the "Multi_row -> Export" in "Table->Browse" option to been ajaxifying. But I suggested a Jquery plugin for future developers, which is able to solve this issue.

Then I started working with my second task which is adding ajax dialog box for "Indexes->Edit" feature in "Table->Structure". I mainly used "tbl_structure.js" file to handle the logic of actions and modified the "tbl_indexes.php" file to response for ajax request for this. In tbl_strucuture.js file i used three actions to handle this feature. Those are
  1. $("#table_index tbody tr td.edit_index.ajax").live('click') - pops up the "Edit" dialog which loads the "index_frm"
  2. $("#index_frm.ajax input[name=do_save_data]").live('click') - submits the index changes for the "tbl_indexes.php" file
  3. $("#index_frm.ajax input[name=add_fields").live('click') - Add more columns to the index form
After completing above modifications this feature works fine and add more usability to the index edit option.
Edit dialogbox

Then I started working with my third task which is adding "Hide/Show Indexes" in "Table->Structure". I used tbl_structure.js file to handle the actions logic for this. I have generated "#toggletableindexdiv" which carries the "toggletableindexlink" which will toggle the index table show and hide. Following screen shots show how this feature works.

When the indexes are shown

When the indexes shown

After adding these features to PMA, it improved the usability and allow the user to do above mentioned actions without reloading its base pages.

Next week I'll work with ajaxifying the "Single_column -> Change" in "Table->Structure".

No comments:

Post a Comment