Add an option to disable XE styles for .btn and .message

To disable XE styles for .btn, .btn-group, and .btnArea:
define('DISABLE_XE_BTN_STYLES', true);

To disable XE styles for .message:
define('DISABLE_XE_MSG_STYLES', true);

This is a limited version of XE's __DISABLE_DEFAULT_CSS__ constant.
Other styles and default CSS/JS resources are not affected.

DO NOT UNLOAD DEFAULT CSS/JS RESOURCES.
This commit is contained in:
Kijin Sung 2018-08-04 23:20:45 +09:00
parent a489012d6d
commit c176be9c9f
2 changed files with 174 additions and 155 deletions

View file

@ -288,9 +288,11 @@ class FrontEndFileHandler extends Handler
if (!file_exists($file->fileFullPath))
{
return;
}
}
$default_font_config = Context::get('default_font_config') ?: getController('editor')->default_font_config;
$file->vars['enable_xe_btn_styles'] = (defined('DISABLE_XE_BTN_STYLES') && DISABLE_XE_BTN_STYLES) ? 'false' : 'true';
$file->vars['enable_xe_msg_styles'] = (defined('DISABLE_XE_MSG_STYLES') && DISABLE_XE_MSG_STYLES) ? 'false' : 'true';
$file->vars = array_merge($file->vars, $default_font_config);
if ($file->fileExtension === 'less')
{