diff --git a/core/theme.js b/core/theme.js index 77672c45..3fef5886 100644 --- a/core/theme.js +++ b/core/theme.js @@ -364,7 +364,6 @@ exports.ThemeManager = class ThemeManager { const format = Config().theme.timeFormat[style] || 'h:mm a'; return _.get(theme, `customization.defaults.timeFormat.${style}`, format); }, -<<<<<<< HEAD getDateTimeFormat : function(style = 'short') { const format = Config().theme.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a'; return _.get(theme, `customization.defaults.dateTimeFormat.${style}`, format); @@ -376,16 +375,6 @@ exports.ThemeManager = class ThemeManager { getStatusVisibleIndicators : function() { const format = Config().theme.statusVisibleIndicators || [ 'Y', 'N' ]; return _.get(theme, 'customization.defaults.statusVisibleIndicators', format); -======= - getDateTimeFormat: function (style = 'short') { - const format = - Config().theme.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a'; - return _.get( - theme, - `customization.defaults.dateTimeFormat.${style}`, - format - ); ->>>>>>> 7c01946d6e8ac0023e9692744803466aa96cbadf }, }; } diff --git a/core/user_config.js b/core/user_config.js index 975bc87e..3f7d1bcc 100644 --- a/core/user_config.js +++ b/core/user_config.js @@ -152,7 +152,8 @@ exports.getModule = class UserConfigModule extends MenuModule { } else { self.client.log.info(`User "${self.client.user.username}" updated authentication credentials`); } - ); + return self.prevMenu(cb); + }); } else { return self.prevMenu(cb); } diff --git a/core/view_controller.js b/core/view_controller.js index e8862a1e..696e18b7 100644 --- a/core/view_controller.js +++ b/core/view_controller.js @@ -257,44 +257,42 @@ function ViewController(options) { } }; - this.applyViewConfig = function (config, cb) { + this.applyViewConfig = function(config, cb) { let highestId = 1; let submitId; let initialFocusId = 1; - async.each( - Object.keys(config.mci || {}), - function entry(mci, nextItem) { - const mciMatch = mci.match(MCI_REGEXP); // :TODO: How to handle auto-generated IDs???? - if (null === mciMatch) { - self.client.log.warn({ mci: mci }, 'Unable to parse MCI code'); - return; - } + async.each(Object.keys(config.mci || {}), function entry(mci, nextItem) { + const mciMatch = mci.match(MCI_REGEXP); // :TODO: How to handle auto-generated IDs???? + if(null === mciMatch) { + self.client.log.warn( { mci : mci }, 'Unable to parse MCI code'); + return; + } - const viewId = parseInt(mciMatch[2]); - assert(!isNaN(viewId), 'Cannot parse view ID: ' + mciMatch[2]); // shouldn't be possible with RegExp used + const viewId = parseInt(mciMatch[2]); + assert(!isNaN(viewId), 'Cannot parse view ID: ' + mciMatch[2]); // shouldn't be possible with RegExp used - if (viewId > highestId) { - highestId = viewId; - } + if(viewId > highestId) { + highestId = viewId; + } - const view = self.getView(viewId); + const view = self.getView(viewId); if(!view) { return nextItem(null); } - const mciConf = config.mci[mci]; + const mciConf = config.mci[mci]; - self.setViewPropertiesFromMCIConf(view, mciConf); + self.setViewPropertiesFromMCIConf(view, mciConf); - if (mciConf.focus) { - initialFocusId = viewId; - } + if(mciConf.focus) { + initialFocusId = viewId; + } - if (true === view.submit) { - submitId = viewId; - } + if(true === view.submit) { + submitId = viewId; + } nextItem(null); }, @@ -305,10 +303,10 @@ function ViewController(options) { if(highestIdView) { highestIdView.submit = true; } - - return cb(err, { initialFocusId: initialFocusId }); } - ); + + return cb(err, { initialFocusId : initialFocusId } ); + }); }; // method for comparing submitted form data to configuration entries