mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 02:20:41 +08:00
Lookup templates using the container
This commit is contained in:
parent
fe8d9642a0
commit
daf7239d87
|
@ -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 New Issue
Block a user