check the plugin mobile/list dir for templates

This commit is contained in:
Angus McLeod 2016-08-31 10:11:53 -04:00
parent 90a0327fd2
commit 0b20c0b581
1 changed files with 6 additions and 0 deletions

View File

@ -116,6 +116,7 @@ export default Ember.DefaultResolver.extend({
resolveTemplate(parsedName) {
return this.findPluginTemplate(parsedName) ||
this.findPluginMobileTemplate(parsedName) ||
this.findMobileTemplate(parsedName) ||
this.findTemplate(parsedName) ||
Ember.TEMPLATES.not_found;
@ -139,6 +140,11 @@ export default Ember.DefaultResolver.extend({
return this.findTemplate(pluginParsedName);
},
findPluginMobileTemplate(parsedName) {
var pluginParsedName = this.parseName(parsedName.fullName.replace("template:", "template:javascripts/mobile/"));
return this.findTemplate(pluginParsedName);
},
findMobileTemplate(parsedName) {
if (this.mobileView) {
var mobileParsedName = this.parseName(parsedName.fullName.replace("template:", "template:mobile/"));