* Added ability to serve static files from web server

* Web server can have custom error pages, e.g. 404.html
* "file_area" stuff -> "file_base"
* Fix some rare bugs in theme/art loading
* Adjust tab order dynamically for file upload details
This commit is contained in:
Bryan Ashby 2017-02-04 09:20:36 -07:00
parent ff64a7aed5
commit 92772eb1a9
14 changed files with 165 additions and 48 deletions

View file

@ -354,16 +354,16 @@ function setClientTheme(client, themeId) {
function getThemeArt(options, cb) {
//
// options - required:
// name
// client
// name
//
// options - optional
// themeId
// asAnsi
// readSauce
// random
// client - needed for user's theme/etc.
// themeId
// asAnsi
// readSauce
// random
//
if(!options.themeId && _.has(options.client, 'user.properties.theme_id')) {
if(!options.themeId && _.has(options, 'client.user.properties.theme_id')) {
options.themeId = options.client.user.properties.theme_id;
} else {
options.themeId = Config.defaults.theme;
@ -437,9 +437,13 @@ function getThemeArt(options, cb) {
],
function complete(err, artInfo) {
if(err) {
options.client.log.debug( { error : err }, 'Cannot find art');
if(options.client) {
options.client.log.debug( { error : err.message }, 'Cannot find theme art' );
} else {
Log.debug( { error : err.message }, 'Cannot find theme art' );
}
}
cb(err, artInfo);
return cb(err, artInfo);
}
);
}