mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Fix rerender of topic close message when you navigate away from a closing topic
This commit is contained in:
parent
6d47d4854e
commit
957d95c1cc
2 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
||||||
Discourse.TopicClosingView = Discourse.View.extend({
|
Discourse.TopicClosingView = Discourse.View.extend({
|
||||||
elementId: 'topic-closing-info',
|
elementId: 'topic-closing-info',
|
||||||
templateName: 'topic_closing',
|
templateName: 'topic_closing',
|
||||||
|
delayedRerender: null,
|
||||||
|
|
||||||
contentChanged: function() {
|
contentChanged: function() {
|
||||||
this.rerender();
|
this.rerender();
|
||||||
|
@ -46,6 +47,12 @@ Discourse.TopicClosingView = Discourse.View.extend({
|
||||||
buffer.push( Em.String.i18n('topic.auto_close_notice', {timeLeft: timeLeftString}) );
|
buffer.push( Em.String.i18n('topic.auto_close_notice', {timeLeft: timeLeftString}) );
|
||||||
buffer.push('</h3>');
|
buffer.push('</h3>');
|
||||||
|
|
||||||
this.rerender.bind(this).delay(reRenderDelay);
|
this.delayedRerender = this.rerender.bind(this).delay(reRenderDelay);
|
||||||
|
},
|
||||||
|
|
||||||
|
willDestroyElement: function() {
|
||||||
|
if( this.delayedRerender ) {
|
||||||
|
this.delayedRerender.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -496,7 +496,7 @@ en:
|
||||||
jump_reply_down: jump to later reply
|
jump_reply_down: jump to later reply
|
||||||
deleted: "The topic has been deleted"
|
deleted: "The topic has been deleted"
|
||||||
|
|
||||||
auto_close_notice: "This topic will automatically close %{timeLeft}"
|
auto_close_notice: "This topic will automatically close %{timeLeft}."
|
||||||
auto_close_title: 'Auto-Close Settings'
|
auto_close_title: 'Auto-Close Settings'
|
||||||
auto_close_save: "Save"
|
auto_close_save: "Save"
|
||||||
auto_close_cancel: "Cancel"
|
auto_close_cancel: "Cancel"
|
||||||
|
|
Loading…
Reference in a new issue