mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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
@ -116,6 +116,7 @@ export default Ember.DefaultResolver.extend({
|
|||||||
|
|
||||||
resolveTemplate(parsedName) {
|
resolveTemplate(parsedName) {
|
||||||
return this.findPluginTemplate(parsedName) ||
|
return this.findPluginTemplate(parsedName) ||
|
||||||
|
this.findPluginMobileTemplate(parsedName) ||
|
||||||
this.findMobileTemplate(parsedName) ||
|
this.findMobileTemplate(parsedName) ||
|
||||||
this.findTemplate(parsedName) ||
|
this.findTemplate(parsedName) ||
|
||||||
Ember.TEMPLATES.not_found;
|
Ember.TEMPLATES.not_found;
|
||||||
@ -139,6 +140,13 @@ export default Ember.DefaultResolver.extend({
|
|||||||
return this.findTemplate(pluginParsedName);
|
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) {
|
findMobileTemplate(parsedName) {
|
||||||
if (this.mobileView) {
|
if (this.mobileView) {
|
||||||
var mobileParsedName = this.parseName(parsedName.fullName.replace("template:", "template:mobile/"));
|
var mobileParsedName = this.parseName(parsedName.fullName.replace("template:", "template:mobile/"));
|
||||||
|
Loading…
Reference in New Issue
Block a user