Ticket #7951: 7951.01.patch
File 7951.01.patch, 2.0 KB (added by , 7 years ago) |
---|
-
src/bp-templates/bp-nouveau/includes/messages/functions.php
46 46 return $scripts; 47 47 } 48 48 49 return array_merge( $scripts, array( 50 'bp-nouveau-messages-at' => array( 49 $new_scripts = array(); 50 $message_deps = array( 'bp-nouveau', 'json2', 'wp-backbone' ); 51 52 // Add mentions if activity component is enabled. 53 if ( bp_is_active( 'activity' ) ) { 54 $new_scripts['bp-nouveau-messages-at'] = array( 51 55 'file' => buddypress()->plugin_url . 'bp-activity/js/mentions%s.js', 52 56 'dependencies' => array( 'bp-nouveau', 'jquery', 'jquery-atwho' ), 53 57 'version' => bp_get_version(), 54 58 'footer' => true, 55 ), 56 'bp-nouveau-messages' => array( 57 'file' => 'js/buddypress-messages%s.js', 58 'dependencies' => array( 'bp-nouveau', 'json2', 'wp-backbone', 'bp-nouveau-messages-at' ), 59 'footer' => true, 60 ), 61 ) ); 59 ); 60 61 array_push( $message_deps, 'bp-nouveau-messages-at' ); 62 } 63 64 $new_scripts['bp-nouveau-messages'] = array( 65 'file' => 'js/buddypress-messages%s.js', 66 'dependencies' => $message_deps, 67 'footer' => true, 68 ); 69 70 return array_merge( $scripts, $new_scripts ); 62 71 } 63 72 64 73 /** -
src/bp-templates/bp-nouveau/js/buddypress-messages.js
105 105 if ( typeof window.tinyMCE === 'undefined' || window.tinyMCE.activeEditor === null || typeof window.tinyMCE.activeEditor === 'undefined' ) { 106 106 return; 107 107 } else { 108 // Mentions isn't available, so bail. 109 if ( _.isEmpty( exports.mentions ) ) { 110 return; 111 } 112 108 113 $( window.tinyMCE.activeEditor.contentDocument.activeElement ) 109 114 .atwho( 'setIframe', $( '#message_content_ifr' )[0] ) 110 115 .bp_mentions( {