mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 02:48:18 +00:00
Make new topic autosave specific to page title
Bug: T274949 Change-Id: I7e1bbcd6c606c7443f55fe3b1780021b07b28c5e
This commit is contained in:
parent
b7917f5fa4
commit
717955a513
|
@ -33,7 +33,7 @@ function NewTopicController( $pageContainer, $replyLink ) {
|
|||
endContainer: this.sectionTitleField.$element[ 0 ],
|
||||
endOffset: this.sectionTitleField.$element[ 0 ].childNodes.length
|
||||
} );
|
||||
comment.id = 'new';
|
||||
comment.id = 'new|' + mw.config.get( 'wgRelevantPageName' );
|
||||
comment.isNewTopic = true;
|
||||
|
||||
NewTopicController.super.call( this, $pageContainer, $replyLink, comment );
|
||||
|
|
|
@ -331,7 +331,7 @@ function init( $container, state ) {
|
|||
// For debugging (now unused in the code)
|
||||
mw.dt.pageThreads = pageThreads;
|
||||
|
||||
if ( state.repliedTo === 'new' ) {
|
||||
if ( state.repliedTo === 'new|' + mw.config.get( 'wgRelevantPageName' ) ) {
|
||||
// Highlight the last comment on the page
|
||||
lastComment = threadItems[ threadItems.length - 1 ];
|
||||
highlight( lastComment );
|
||||
|
|
Loading…
Reference in a new issue