mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:31:56 +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) {
|
Handlebars.registerHelper('raw', function(property, options) {
|
||||||
|
var template = Discourse.__container__.lookup('template:' + property + ".raw"),
|
||||||
|
params = options.hash;
|
||||||
|
|
||||||
var template = Em.TEMPLATES[property + ".raw"];
|
if (params) {
|
||||||
var params = options.hash;
|
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);
|
params[prop] = Em.Handlebars.get(this, params[prop], options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user