Make WordPress Core

Changeset 26174


Ignore:
Timestamp:
11/14/2013 09:57:11 PM (13 years ago)
Author:
nacin
Message:

JSHint and coding style fixes for xfn.js.

props dougwollison.
fixes #26030.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/xfn.js

    r21592 r26174  
    1 jQuery(document).ready( function($) {
    2         $('#link_rel').prop('readonly', true);
    3         $('#linkxfndiv input').bind('click keyup', function() {
    4                 var isMe = $('#me').is(':checked'), inputs = '';
    5                 $('input.valinp').each( function() {
    6                         if (isMe) {
    7                                 $(this).prop('disabled', true).parent().addClass('disabled');
     1jQuery( document ).ready(function( $ ) {
     2        $( '#link_rel' ).prop( 'readonly', true );
     3        $( '#linkxfndiv input' ).bind( 'click keyup', function() {
     4                var isMe = $( '#me' ).is( ':checked' ), inputs = '';
     5                $( 'input.valinp' ).each( function() {
     6                        if ( isMe ) {
     7                                $( this ).prop( 'disabled', true ).parent().addClass( 'disabled' );
    88                        } else {
    9                                 $(this).removeAttr('disabled').parent().removeClass('disabled');
    10                                 if ( $(this).is(':checked') && $(this).val() != '')
    11                                         inputs += $(this).val() + ' ';
     9                                $( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' );
     10                                if ( $( this ).is( ':checked' ) && $( this ).val() !== '') {
     11                                        inputs += $( this ).val() + ' ';
     12                                }
    1213                        }
    1314                });
    14                 $('#link_rel').val( (isMe) ? 'me' : inputs.substr(0,inputs.length - 1) );
     15                $( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
    1516        });
    1617});
Note: See TracChangeset for help on using the changeset viewer.