Ignore:
Timestamp:
Jan 27, 2013, 9:56:07 PM (11 years ago)
Author:
julien1311
Message:

[piwecard] Some code documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/js/piwecard.js

    r20254 r20431  
     1/**
     2 * Check if a field is valid
     3 * @param Object element to check
     4 * @param Integer type of the element (0 is text, 1 is email, 2 is number)
     5 * @param String Style of the error displayed (default = inline)
     6 * @param Boolean True if the field can be empty, False otherwise
     7 * @return True if OK, False otherwise
     8 */
    19function piwecard_checkField(element, elementType, display, nullIsOK) {
    210        var TEXT = 0;
     
    5159}
    5260
     61/**
     62 * Style to add to the field if piwecard_checkField returns false
     63 * @param Object element
     64 * @param String Style of the error displayed (default = inline)
     65 */
    5366function add_error_style(element, display) {
    5467        document.getElementById(element.id+'_error').style.display = display;
     
    5669}
    5770
     71/**
     72 * Remove the error style from the field if piwecard_checkField returns true
     73 * @param Object element
     74 */
    5875function remove_error_style(element) {
    5976        document.getElementById(element.id+'_error').style.display = 'none';
Note: See TracChangeset for help on using the changeset viewer.