mirror of
https://github.com/KevinMidboe/rohnenedre.git
synced 2025-10-29 17:50:37 +00:00
Initial commit. State 04.2021.
This commit is contained in:
17
wp-admin/js/xfn.js
Normal file
17
wp-admin/js/xfn.js
Normal file
@@ -0,0 +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' );
|
||||
} 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 ) );
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user