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:
parent
b3c24e50e3
commit
7c0fb41ec0
41 changed files with 111 additions and 113 deletions
|
@ -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));
|
||||
|
|
|
@ -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>"));
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue