Fix rerender of topic close message when you navigate away from a closing topic
This commit is contained in:
parent
6d47d4854e
commit
957d95c1cc
|
@ -10,6 +10,7 @@
|
|||
Discourse.TopicClosingView = Discourse.View.extend({
|
||||
elementId: 'topic-closing-info',
|
||||
templateName: 'topic_closing',
|
||||
delayedRerender: null,
|
||||
|
||||
contentChanged: function() {
|
||||
this.rerender();
|
||||
|
@ -46,6 +47,12 @@ Discourse.TopicClosingView = Discourse.View.extend({
|
|||
buffer.push( Em.String.i18n('topic.auto_close_notice', {timeLeft: timeLeftString}) );
|
||||
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
|
||||
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_save: "Save"
|
||||
auto_close_cancel: "Cancel"
|
||||
|
|
Loading…
Reference in New Issue