AJAXify Interface

From PmaWiki
Jump to: navigation, search

A list of tasks and discussion for enhancing phpMyAdmin with AJAX. Partially implemented with the Google Summer of Code 2010 project AJAXify the phpMyAdmin Interface.

Contents

[edit] JavaScript Functions that can be refactored with jQuery code

[edit] In file js/functions.js

  • confirmLink(): done
  • confirmQuery()
  • checkSqlQuery()

[edit] In file js/common.js

  • addEvent()
  • removeEvent()
  • getElementsByClassName()

[edit] In file js/server_synchronize.js

  • showDetails()

[edit] Actions to be Ajaxified on different pages

[edit] Navigation panel

  • Create table (show in a popup dialog): done

[edit] Main Page (main.php & js/main.js)

  • Change Password (will also affect user_password.php): done
  • Create a New Database (will also affect db_create.php): done

[edit] Privileges from the main menu(server_privileges.php & js/server_privileges.js)

  • Add a new user: done
  • Revoke a user (and also drop databases with same name as user): done
  • Edit privileges: done
  • Export privileges: done
  • Paginate table of users: done
  • Flush privileges: done

[edit] Database Privileges

  • Add a new user: done

[edit] Database Operations (db_operations.php & js/db_operations.js)

  • Create table: done
  • Rename Database: done
  • Copy Database: done
  • Change Collation: done

[edit] Database Structure

  • Clicking on Insert for a table (will help user inserting for multiple tables from one place): done

[edit] Table Browse

  • Page navigation: done
  • Actions on multiple rows:
    • Change - done
    • Export - In export we have to save the results for a file. We can do that by setting the header parameter "Content-Disposition: attachment; filename="<filename>.<filetype>" in non ajax response and browser will save the data to the file. But in ajax, even though we set the parameter correctly the browser does not save the content for a file.
    Refer : http://stackoverflow.com/questions/2186562/post-to-server-receive-pdf-deliver-to-user-w-jquery

We can use this Jquery plugin as a solution for this issue.

    Plugin : http://www.filamentgroup.com/lab/jquery_plugin_for_requesting_ajax_like_file_downloads/

[edit] Table Structure

  • Actions on multiple rows:
    • Change: done
  • Index
    • Edit: done
    • Hide/Show index: done
  • Change one column: done
  • Add column(s): done

[edit] Table Operations (tbl_operations.php & js/tbl_operations.js)

  • Alter table order (Sort): done
  • Move Table: Should not ajaxify this
  • Table Options: todo
  • Copy Table: done
  • Table Maintenance: done
    • Check
    • Repair
    • Analyze
    • Flush
    • Optimize

[edit] SQL Query (server_sql.php, db_sql.php, tbl_sql.php, js/sql.js)

  • Retrieve the response for a query with Ajax: done
  • Paginate the results of a SQL query: done

[edit] Insert (tbl_change.php & js/tbl_change.js)

  • Change the number of insertions on the fly without reloading the entire page: done, bugs remaining
  • Insert rows with an Ajax request: todo

[edit] Database, Table Search (db_search.php, tbl_select.php, db_search.js, tbl_search.js)

  • Show results with Ajax calls, paginate results: done

[edit] Separate SQL Query window (querywindow.php & js/querywindow.js)

  • Use jQueryUI's Tabs and re-build the HTML for this page
  • If necessary, refactor some functions from js/querywindow.js