JSHint and coding style fixes for xfn.js.
props dougwollison. fixes #26030. Built from https://develop.svn.wordpress.org/trunk@26174 git-svn-id: http://core.svn.wordpress.org/trunk@26083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a41f3f9bb3
commit
10858d38b0
|
@ -1,16 +1,17 @@
|
|||
jQuery(document).ready( function($) {
|
||||
$('#link_rel').prop('readonly', true);
|
||||
$('#linkxfndiv input').bind('click keyup', function() {
|
||||
var isMe = $('#me').is(':checked'), inputs = '';
|
||||
$('input.valinp').each( function() {
|
||||
if (isMe) {
|
||||
$(this).prop('disabled', true).parent().addClass('disabled');
|
||||
jQuery( document ).ready(function( $ ) {
|
||||
$( '#link_rel' ).prop( 'readonly', true );
|
||||
$( '#linkxfndiv input' ).bind( 'click keyup', function() {
|
||||
var isMe = $( '#me' ).is( ':checked' ), inputs = '';
|
||||
$( 'input.valinp' ).each( function() {
|
||||
if ( isMe ) {
|
||||
$( this ).prop( 'disabled', true ).parent().addClass( 'disabled' );
|
||||
} else {
|
||||
$(this).removeAttr('disabled').parent().removeClass('disabled');
|
||||
if ( $(this).is(':checked') && $(this).val() != '')
|
||||
inputs += $(this).val() + ' ';
|
||||
$( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' );
|
||||
if ( $( this ).is( ':checked' ) && $( this ).val() !== '') {
|
||||
inputs += $( this ).val() + ' ';
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#link_rel').val( (isMe) ? 'me' : inputs.substr(0,inputs.length - 1) );
|
||||
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(a){a("#link_rel").prop("readonly",!0),a("#linkxfndiv input").bind("click keyup",function(){var b=a("#me").is(":checked"),c="";a("input.valinp").each(function(){b?a(this).prop("disabled",!0).parent().addClass("disabled"):(a(this).removeAttr("disabled").parent().removeClass("disabled"),a(this).is(":checked")&&""!=a(this).val()&&(c+=a(this).val()+" "))}),a("#link_rel").val(b?"me":c.substr(0,c.length-1))})});
|
||||
jQuery(document).ready(function(a){a("#link_rel").prop("readonly",!0),a("#linkxfndiv input").bind("click keyup",function(){var b=a("#me").is(":checked"),c="";a("input.valinp").each(function(){b?a(this).prop("disabled",!0).parent().addClass("disabled"):(a(this).removeAttr("disabled").parent().removeClass("disabled"),a(this).is(":checked")&&""!==a(this).val()&&(c+=a(this).val()+" "))}),a("#link_rel").val(b?"me":c.substr(0,c.length-1))})});
|
Loading…
Reference in New Issue