
/*****************************************************************************/

  This README is an attempt to keep the house clean under the 'js' directory.

/*****************************************************************************/

Directory contents
-------------------
+ js/

  - admin.js :
    Code for tasks performed in the administration area.

    Also sorts select elements (both normal and multiple) where language names are
    involved. This is done in JavaScript because currently it's not possible
    to sort them within Django.
    To sort a new select element, add the end of the element id to the 'ids'
    array.

  - correctpng.js :
    Fixes for IE 5.5 & 6 to correctly handle PNG transparencies.

    http://homepage.ntlworld.com/bobosola

  - json2.min.js :
    JavaScript library for encoding/decoding data to/from JSON format.

    http://www.json.org/js.html

  - search.js :
    Code to handle the advanced search dropdown. May be merged with other code
    in the translate page.

  - sorttable.js :
    Sorts tables according to its values. Used in the homepage as well as on the
    languages and projects listings. It has some customisations to support
    zebra stripes once the sort is done (using jQuery). The icons used on the
    table headings are custom code too.
    We may want to use a table sorter purely written in jQuery, such as
    tablesorter (http://tablesorter.com/docs/).

    http://www.kryogenix.org/code/browser/sorttable/

  - translatepage.js :
    This handles several actions performed in the translate page. Including:

    1. Automatically unchecks the fuzzy mark when an edit is detected in a fuzzy
    entry. Used in the translate page.
    A new implementation would be better:
    http://bugs.locamotion.org/show_bug.cgi?id=473

    2. Handles suggestions doing XMLHttpRequest calls using jQuery and
    sending/receiving data in JSON format.

    3. Includes several functions for handling actions in the translate page.

  + jquery/

    - jquery.min.js :
      The jQuery library, version 1.4.2, minified.

    - jquery.bidi.js :
      jQuery plugin used to automatically set line direction of news
      item based on their content.

      http://plugins.jquery.com/project/bidi

    - jquery.fieldselection.js :
      jQuery plugin to retrieve or replace text selections within
      textareas.

      http://laboratorium.0xab.cd/jquery/fieldselection/0.1.0/

    - jquery.caret.js :
      jQuery plugin to write text on top of the selected text or just after
      the caret position.

      http://www.jquery-plugin.buss.hk/my-plugins/jquery-caret-plugin

    - jquery.scrollTo.min.js :
      Scrolls the viewport to the selected element.

      http://flesler.blogspot.com/2007/10/jqueryscrollto.html

    - jquery.textarea-expander.js :
      jQuery plugin used in the translate page textareas.

      http://blogs.sitepointstatic.com/examples/tech/textarea-expander/jquery.textarea-expander.js

  + mt/

    - apertium.js :
      Script to load translation suggestions using the Apertium service.

    - google-translate.js :
      Script to load translation suggestions using the Google Translate service.

