mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 23:24:43 +02:00
* Distinct "menus" vs "prompts" for theme.json so conflicting names can occur
* Add support for theming prompts
This commit is contained in:
parent
34bf823f1f
commit
4e2c21059a
4 changed files with 23 additions and 11 deletions
|
@ -397,6 +397,17 @@ ViewController.prototype.loadFromPromptConfig = function(options, cb) {
|
|||
callback(err);
|
||||
});
|
||||
},
|
||||
function applyThemeCustomization(callback) {
|
||||
if(_.isObject(promptConfig)) {
|
||||
menuUtil.applyThemeCustomization({
|
||||
name : self.client.currentMenuModule.menuConfig.prompt,
|
||||
type : "prompts",
|
||||
client : self.client,
|
||||
configMci : promptConfig.mci,
|
||||
});
|
||||
}
|
||||
callback(null);
|
||||
},
|
||||
function applyViewConfiguration(callback) {
|
||||
if(_.isObject(promptConfig.mci)) {
|
||||
self.applyViewConfig(promptConfig, function configApplied(err, info) {
|
||||
|
@ -511,18 +522,15 @@ ViewController.prototype.loadFromMenuConfig = function(options, cb) {
|
|||
if(_.isObject(formConfig)) {
|
||||
menuUtil.applyThemeCustomization({
|
||||
name : self.client.currentMenuModule.menuName,
|
||||
type : "menus",
|
||||
client : self.client,
|
||||
configMci : formConfig.mci,
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(test)
|
||||
|
||||
callback(null);
|
||||
},
|
||||
function applyViewConfiguration(callback) {
|
||||
//
|
||||
// :TODO: need to merge configs from menu -> theme (specific) -> theme (default) -> defaults
|
||||
if(_.isObject(formConfig)) {
|
||||
self.applyViewConfig(formConfig, function configApplied(err, info) {
|
||||
initialFocusId = info.initialFocusId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue