Skip to end of metadata
Go to start of metadata

Status Update June 2009

jQuery will be replacing dojo as the core AJAX library in v 2.3 http://forum.civicrm.org/index.php/topic,8510.msg36833.html#msg36833

(Although this page was last updated in 2006, it currently comes up first in June 2009 when searching the wiki for AJAX. The other top results on AJAX are all from 2005 or so when AJAX was first being incorporated into CiviCRM. That's why I've updated it. JM)

AJAX and usability improvements

Some thoughts on the various things we can do to improve usability using AJAX technologies in no specific order

Technologies

  • We will be using dojo in CiviCRM. We will figure out packaging etc at a later date
  • Integrate above toolkit with HTML_QuickForm

Links / Tutorials / Manual for dojo

More dojotoolkit tips:

  • Check out dojo from svn. The unit tests are the most useful part of dojo and provide good examples of how to use various dojo widgets. I've been using trunk since i suspect we'll move to dojo 0.4RC when it comes out (smile)
  • Creating a new dojo widget

CiviCRM trunk integration with Dojo

  • Make sure u have compiled and enabled the mod_expires and mod_deflate module in apache 2.0. This allows the browser to cache the js/images
  • The following urls show u the places where i've integrated dojo in trunk.
    1. q=civicrm/contact/search/simple?reset=1
    2. q=civicrm/contact/view/tabbed?reset=1&cid=XXX
    3. q=civicrm/admin/gender?reset=1&action=browse (make sure u click on the link)

Places to use

  • Make "search" autocomplete for names/email in all places especially relationships
  • Make some other core text fields (address, activity, custom fields) in advanced search auto-complete
  • Make the admin UI pages more "ajaxy" rather than a multiple form view/edit process
  • Add status meter to import
  • implement a new help system, similar to netflix
  • drag-n-drop for building profile forms
  • introduce better widgets for "select" boxes
  • "simplify" creation of a new contact

  Additional ideas

Contact viewing and editing screens rework

One things that could be done with Ajax is speed up the loading of tabs on contact editing screen. This screen reloads fully whenever you click the tab different that you are currently on. It is possible to leave the screen intact, and only replace the part which really needs reloading - basically, when you click tab name, only the part that changes is being reloaded. Probably, some kind of mechanism indicating that the page is being reloaded needs to be applied - for example the part of the screen below tabs should be greyed out until the transfer of HTML from the server is finished. Warning though: this might severly influence the way that CiviCRM is integrated with Drupal/Mambo/Joomla.

Contact's "Groups" screen

When you are in single contact's context and you decide to add it to the group which is not added yet, the process becomes a little bit painful - you have to go out to Groups management screen, add the group and than follow with adding the contact to it. Two things could be done to Group editing screen:

  1. adding to the group/removing from the group could be done without reloading whole page and just updating the group list part of the page
  2. introducing the input on the same screen which allows to add new group without having to leave the screen
    The same improvment can be introduced to "Categories" screen, the same rule (although different functional implementation) could be applied to "Relationships" screen.

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.