mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Lookup templates using the container
This commit is contained in:
parent
fe8d9642a0
commit
daf7239d87
1 changed files with 5 additions and 6 deletions
|
@ -1,11 +1,10 @@
|
|||
Handlebars.registerHelper('raw', function(property, options) {
|
||||
var template = Discourse.__container__.lookup('template:' + property + ".raw"),
|
||||
params = options.hash;
|
||||
|
||||
var template = Em.TEMPLATES[property + ".raw"];
|
||||
var params = options.hash;
|
||||
|
||||
if(params) {
|
||||
for(var prop in params){
|
||||
if(options.hashTypes[prop] === "ID") {
|
||||
if (params) {
|
||||
for (var prop in params) {
|
||||
if (options.hashTypes[prop] === "ID") {
|
||||
params[prop] = Em.Handlebars.get(this, params[prop], options);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue