2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

Deprecation: Use Ember.Helper for later versions of Ember

This commit is contained in:
Robin Ward 2016-05-10 13:45:58 -04:00
parent b3c24e50e3
commit 7c0fb41ec0
No known key found for this signature in database
GPG key ID: 0E091E2B4ED1B83D
41 changed files with 111 additions and 113 deletions

View file

@ -1,3 +1,3 @@
Em.Handlebars.helper('human-size', function(size) {
return new Handlebars.SafeString(I18n.toHumanSize(size));
});
import { htmlHelper } from 'discourse/lib/helpers';
export default htmlHelper(size => I18n.toHumanSize(size));

View file

@ -1,3 +1,3 @@
Em.Handlebars.helper('preserve-newlines', str => {
return new Handlebars.SafeString(Discourse.Utilities.escapeExpression(str).replace(/\n/g, "<br>"));
});
import { htmlHelper } from 'discourse/lib/helpers';
export default htmlHelper(str => Discourse.Utilities.escapeExpression(str).replace(/\n/g, "<br>"));

View file

@ -1,4 +1,4 @@
import registerUnbound from 'discourse/helpers/register-unbound';
import { registerUnbound } from 'discourse/lib/helpers';
registerUnbound('value-at-tl', function(data, params) {
var tl = parseInt(params.level, 10);