FIX: Use proper HTML for spinner rather than handlebars

This commit is contained in:
Robin Ward 2014-11-05 12:04:35 -05:00
parent ea0c6df839
commit acfd99ebf2
3 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,5 @@
import ObjectController from 'discourse/controllers/object'; import ObjectController from 'discourse/controllers/object';
import { spinnerHTML } from 'discourse/helpers/loading-spinner';
export default ObjectController.extend(Discourse.SelectedPostsCount, { export default ObjectController.extend(Discourse.SelectedPostsCount, {
multiSelect: false, multiSelect: false,
@ -510,11 +511,9 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
}.property('isPrivateMessage'), }.property('isPrivateMessage'),
loadingHTML: function() { loadingHTML: function() {
return "{{loading-spinner}}"; return spinnerHTML;
}.property(), }.property(),
recoverTopic: function() { recoverTopic: function() {
this.get('content').recover(); this.get('content').recover();
}, },

View File

@ -1,4 +1,7 @@
Handlebars.registerHelper('loading-spinner', function(property, options) { var spinnerHTML = "<div class='spinner-wrap'><div class='spinner'><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div></div>";
var spinner = "<div class='spinner-wrap'><div class='spinner'><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div></div>";
return new Handlebars.SafeString(spinner); Handlebars.registerHelper('loading-spinner', function() {
return new Handlebars.SafeString(spinnerHTML);
}); });
export { spinnerHTML };

View File

@ -45,6 +45,7 @@
//= require ./discourse/components/visible //= require ./discourse/components/visible
//= require ./discourse/helpers/user-avatar //= require ./discourse/helpers/user-avatar
//= require ./discourse/helpers/cold-age-class //= require ./discourse/helpers/cold-age-class
//= require ./discourse/helpers/loading-spinner
//= require ./discourse/dialects/dialect //= require ./discourse/dialects/dialect
//= require_tree ./discourse/dialects //= require_tree ./discourse/dialects