diff --git src/bp-templates/bp-nouveau/js/buddypress-messages.js src/bp-templates/bp-nouveau/js/buddypress-messages.js
index 5fdbfc5ea..ac7341e47 100644
|
|
|
1 | 1 | /* global wp, BP_Nouveau, _, Backbone, tinymce, tinyMCE */ |
2 | 2 | /* jshint devel: true */ |
3 | 3 | /* @since 3.0.0 */ |
4 | | /* @version 8.0.0 */ |
| 4 | /* @version 10.2.0 */ |
5 | 5 | window.wp = window.wp || {}; |
6 | 6 | window.bp = window.bp || {}; |
7 | 7 | |
… |
… |
window.bp = window.bp || {}; |
97 | 97 | } ); |
98 | 98 | }, |
99 | 99 | |
| 100 | updateNav: function( view ) { |
| 101 | var currentView = this.box; |
| 102 | |
| 103 | if ( view ) { |
| 104 | currentView = view; |
| 105 | } |
| 106 | |
| 107 | // Activate the appropriate nav. |
| 108 | $( '#subnav ul li' ).each( function( l, li ) { |
| 109 | $( li ).removeClass( 'current selected' ); |
| 110 | } ); |
| 111 | |
| 112 | $( '#subnav a#' + currentView ).closest( 'li' ).addClass( 'current selected' ); |
| 113 | }, |
| 114 | |
100 | 115 | removeTinyMCE: function() { |
101 | 116 | if ( typeof tinymce !== 'undefined' ) { |
102 | 117 | var editor = tinymce.get( 'message_content' ); |
… |
… |
window.bp = window.bp || {}; |
169 | 184 | composeView: function() { |
170 | 185 | // Remove all existing views. |
171 | 186 | this.clearViews(); |
| 187 | this.updateNav( 'compose' ); |
172 | 188 | |
173 | 189 | // Create the loop view. |
174 | 190 | var form = new bp.Views.messageForm( { |
… |
… |
window.bp = window.bp || {}; |
181 | 197 | }, |
182 | 198 | |
183 | 199 | threadsView: function() { |
184 | | // Activate the appropriate nav. |
185 | | $( '#subnav ul li' ).each( function( l, li ) { |
186 | | $( li ).removeClass( 'current selected' ); |
187 | | } ); |
188 | | $( '#subnav a#' + this.box ).closest( 'li' ).addClass( 'current selected' ); |
| 200 | this.updateNav(); |
189 | 201 | |
190 | 202 | // Create the loop view. |
191 | 203 | var threads_list = new bp.Views.userThreads( { collection: this.threads, box: this.box } ); |