mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
10858d38b0
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
18 lines
628 B
JavaScript
18 lines
628 B
JavaScript
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() + ' ';
|
|
}
|
|
}
|
|
});
|
|
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
|
|
});
|
|
});
|