Skip to:
Content

BuddyPress.org

Changeset 8640


Ignore:
Timestamp:
07/17/2014 06:09:35 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Clean up some XProfile admin area JS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/admin/js/admin.js

    r8639 r8640  
    33/* global XProfileAdmin */
    44
     5/**
     6 * Add option for the forWhat type.
     7 *
     8 * @param {string} forWhat Value of the field to show options for
     9 */
    510function add_option(forWhat) {
    6     var holder  = document.getElementById(forWhat + '_more'),
    7         theId     = document.getElementById(forWhat + '_option_number').value,
    8         newDiv    = document.createElement('p'),
    9         newOption = document.createElement('input'),
    10         span      = document.createElement( 'span' ),
    11         txt       = document.createTextNode( '\u00A0\u039E\u00A0' ),
    12         isDefault = document.createElement( 'input' ),
    13         span1     = document.createElement( 'span' ),
    14         txt1      = document.createTextNode( ' Default Value ' ),
     11    var holder       = document.getElementById(forWhat + '_more'),
     12        theId        = document.getElementById(forWhat + '_option_number').value,
     13        newDiv       = document.createElement('p'),
     14        newOption    = document.createElement('input'),
     15        span         = document.createElement( 'span' ),
     16        txt          = document.createTextNode( '\u00A0\u039E\u00A0' ),
     17        isDefault    = document.createElement( 'input' ),
     18        span1        = document.createElement( 'span' ),
     19        txt1         = document.createTextNode( ' Default Value ' ),
    1520
    1621        toDelete     = document.createElement( 'a' ),
    1722        toDeleteText = document.createTextNode( '[x]' );
    18 
    1923
    2024    newDiv.setAttribute('id', forWhat + '_div' + theId);
     
    3842
    3943    span1.appendChild( txt1 );
    40 
    4144
    4245    toDelete.setAttribute( 'href', 'javascript:hide("' + forWhat + '_div' + theId + '")' );
     
    133136    } );
    134137
    135     //
     138    // Set up the sort order change actions
    136139    jQuery( '[id^="sort_order_"]' ).change(function() {
    137140        if ( jQuery( this ).val() !== 'custom' ) {
Note: See TracChangeset for help on using the changeset viewer.