Merge pull request #4430 from angusmcleod/mobile-list-template-fix

check the plugin mobile dir for templates
This commit is contained in:
Robin Ward 2016-08-31 10:24:38 -04:00 committed by GitHub
commit c9422462be

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,13 @@ export default Ember.DefaultResolver.extend({
return this.findTemplate(pluginParsedName);
},
findPluginMobileTemplate(parsedName) {
if (this.mobileView) {
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/"));