mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
Merge pull request #4430 from angusmcleod/mobile-list-template-fix
check the plugin mobile dir for templates
This commit is contained in:
commit
c9422462be
1 changed files with 8 additions and 0 deletions
|
@ -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/"));
|
||||
|
|
Loading…
Reference in a new issue