diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 144337c36ff..7e027eff33c 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -1,4 +1,5 @@ import ObjectController from 'discourse/controllers/object'; +import { spinnerHTML } from 'discourse/helpers/loading-spinner'; export default ObjectController.extend(Discourse.SelectedPostsCount, { multiSelect: false, @@ -510,11 +511,9 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, { }.property('isPrivateMessage'), loadingHTML: function() { - return "{{loading-spinner}}"; + return spinnerHTML; }.property(), - - recoverTopic: function() { this.get('content').recover(); }, diff --git a/app/assets/javascripts/discourse/helpers/loading-spinner.es6 b/app/assets/javascripts/discourse/helpers/loading-spinner.es6 index 7ff1438cd37..e43c88f0194 100644 --- a/app/assets/javascripts/discourse/helpers/loading-spinner.es6 +++ b/app/assets/javascripts/discourse/helpers/loading-spinner.es6 @@ -1,4 +1,7 @@ -Handlebars.registerHelper('loading-spinner', function(property, options) { - var spinner = "
"; - return new Handlebars.SafeString(spinner); +var spinnerHTML = "
"; + +Handlebars.registerHelper('loading-spinner', function() { + return new Handlebars.SafeString(spinnerHTML); }); + +export { spinnerHTML }; diff --git a/app/assets/javascripts/main_include.js b/app/assets/javascripts/main_include.js index 79c2e6e1ecf..0423e7040af 100644 --- a/app/assets/javascripts/main_include.js +++ b/app/assets/javascripts/main_include.js @@ -45,6 +45,7 @@ //= require ./discourse/components/visible //= require ./discourse/helpers/user-avatar //= require ./discourse/helpers/cold-age-class +//= require ./discourse/helpers/loading-spinner //= require ./discourse/dialects/dialect //= require_tree ./discourse/dialects