2013-11-14 22:57:11 +01:00
|
|
|
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' );
|
2012-08-23 02:04:18 +02:00
|
|
|
} else {
|
2013-11-14 22:57:11 +01:00
|
|
|
$( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' );
|
|
|
|
if ( $( this ).is( ':checked' ) && $( this ).val() !== '') {
|
|
|
|
inputs += $( this ).val() + ' ';
|
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
|
|
|
});
|
2013-11-14 22:57:11 +01:00
|
|
|
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
|
2012-08-23 02:04:18 +02:00
|
|
|
});
|
|
|
|
});
|