update js to new file
This commit is contained in:
parent
f9c0edc681
commit
80901b5b65
2 changed files with 22 additions and 5 deletions
|
@ -11,10 +11,27 @@ jQuery( function( $ ) {
|
||||||
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false );
|
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
$(document).on( 'wp-plugin-install-success', function( event, response ) {
|
$(document).on( 'wp-plugin-install-success', function( event, response ) {
|
||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
$( '.activate-now' ).removeClass( 'thickbox open-plugin-details-modal' );
|
$( '.activate-now' ).removeClass( 'thickbox open-plugin-details-modal' );
|
||||||
}, 1200 );
|
}, 1200 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
//Reply Comment-edit screen
|
||||||
|
if ( $('body').hasClass('edit-comments-php') ) {
|
||||||
|
//Insert Mentions into comment content on reply
|
||||||
|
$( '.comment-inline.button-link' ).on( 'click', function( event ) {
|
||||||
|
var recipients = $(this).attr('data-recipients') ? $(this).attr('data-recipients') + ' ' : '';
|
||||||
|
setTimeout(function() {
|
||||||
|
if ( recipients ){
|
||||||
|
$('#replycontent').val( recipients )
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
})
|
||||||
|
//Clear Mentions from content on cancel
|
||||||
|
$('.cancel.button').on('click', function(){
|
||||||
|
$('#replycontent').val('');
|
||||||
|
});
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -235,12 +235,12 @@ class Admin {
|
||||||
wp_enqueue_script( 'activitypub-admin-styles', plugins_url( 'assets/js/activitypub-admin.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false );
|
wp_enqueue_script( 'activitypub-admin-styles', plugins_url( 'assets/js/activitypub-admin.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'edit-comments.php' === $hook_suffix || 'tools_page_activitypub_tools' === $hook_suffix ) {
|
if ( 'edit-comments.php' === $hook_suffix ) {
|
||||||
\wp_enqueue_script(
|
\wp_enqueue_script(
|
||||||
'activitypub_actions',
|
'activitypub_actions',
|
||||||
\plugin_dir_url( ACTIVITYPUB_PLUGIN ) . '/assets/js/activitypub.js',
|
\plugin_dir_url( ACTIVITYPUB_PLUGIN ) . '/assets/js/activitypub-admin.js',
|
||||||
array( 'jquery' ),
|
array( 'jquery' ),
|
||||||
\filemtime( \plugin_dir_path( ACTIVITYPUB_PLUGIN ) . 'assets/js/activitypub.js' ),
|
\filemtime( \plugin_dir_path( ACTIVITYPUB_PLUGIN ) . 'assets/js/activitypub-admin.js' ),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue