mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
Initial implementation of CSS and JS concatenation
This commit is contained in:
parent
90bce20794
commit
b15b39ece1
7 changed files with 193 additions and 64 deletions
|
|
@ -699,6 +699,7 @@ class adminAdminController extends admin
|
|||
Rhymix\Framework\Config::set('session.delay', $vars->delay_session === 'Y');
|
||||
Rhymix\Framework\Config::set('session.use_db', $vars->use_db_session === 'Y');
|
||||
Rhymix\Framework\Config::set('view.minify_scripts', $vars->minify_scripts ?: 'common');
|
||||
Rhymix\Framework\Config::set('view.concat_scripts', $vars->concat_scripts ?: 'none');
|
||||
Rhymix\Framework\Config::set('view.gzip', $vars->use_gzip === 'Y');
|
||||
|
||||
// Save
|
||||
|
|
|
|||
|
|
@ -530,6 +530,7 @@ class adminAdminView extends admin
|
|||
Context::set('delay_session', Rhymix\Framework\Config::get('session.delay'));
|
||||
Context::set('use_db_session', Rhymix\Framework\Config::get('session.use_db'));
|
||||
Context::set('minify_scripts', Rhymix\Framework\Config::get('view.minify_scripts'));
|
||||
Context::set('concat_scripts', Rhymix\Framework\Config::get('view.concat_scripts'));
|
||||
Context::set('use_gzip', Rhymix\Framework\Config::get('view.gzip'));
|
||||
|
||||
$this->setTemplateFile('config_advanced');
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ $lang->cmd_minify_all = 'All files';
|
|||
$lang->cmd_minify_common = 'Common files only';
|
||||
$lang->cmd_minify_none = 'None';
|
||||
$lang->about_minify_scripts = 'Automatically minify all CSS and JS scripts in the Core and all modules.';
|
||||
$lang->concat_scripts = 'Concatenate scripts';
|
||||
$lang->cmd_concat_none = 'Do not concatenate';
|
||||
$lang->cmd_concat_css_only = 'Concatenate all CSS';
|
||||
$lang->cmd_concat_js_only = 'Concatenate all JS';
|
||||
$lang->cmd_concat_css_js = 'Concatenate both CSS and JS';
|
||||
$lang->about_concat_scripts = 'Automatically concatenate CSS and JS scripts into as few files as possible. External scripts are not concatenated.';
|
||||
$lang->use_gzip = 'gzip Compression';
|
||||
$lang->delay_session = 'Delay session start';
|
||||
$lang->about_delay_session = 'To improve performance when using a caching proxy server such as Varnish, do not issue sessions to visitors until they log in.<br>Selecting this option may cause view counts and visitor counts to become inaccurate.';
|
||||
|
|
|
|||
|
|
@ -85,7 +85,13 @@ $lang->minify_scripts = '스크립트 자동 압축';
|
|||
$lang->cmd_minify_all = '모든 파일을 압축';
|
||||
$lang->cmd_minify_common = '공통 파일만 압축';
|
||||
$lang->cmd_minify_none = '압축하지 않음';
|
||||
$lang->about_minify_scripts = '코어와 모든 모듈에 포함된 CSS, JS 파일들을 자동으로 압축(minify)하여 전송합니다.';
|
||||
$lang->about_minify_scripts = 'CSS, JS 파일들을 자동으로 압축(minify)하여 전송합니다. 트래픽을 절약할 수 있습니다.';
|
||||
$lang->concat_scripts = '스크립트 합치기';
|
||||
$lang->cmd_concat_none = '합치지 않음';
|
||||
$lang->cmd_concat_css_only = 'CSS만 합침';
|
||||
$lang->cmd_concat_js_only = 'JS만 합침';
|
||||
$lang->cmd_concat_css_js = 'CSS와 JS를 모두 합침';
|
||||
$lang->about_concat_scripts = 'CSS, JS 파일들을 하나로 합쳐서 전송합니다. 외부에서 로딩하는 스크립트는 합쳐지지 않습니다.';
|
||||
$lang->use_gzip = 'gzip 압축';
|
||||
$lang->delay_session = '세션 시작 지연';
|
||||
$lang->about_delay_session = 'Varnish 등의 프록시 캐싱 서버 사용시 성능 개선을 위해, 로그인하지 않은 사용자에게는 인증 세션을 부여하지 않습니다.<br>이 옵션을 선택할 경우 방문자 수 및 조회수 집계가 정확하게 이루어지지 않을 수 있습니다.';
|
||||
|
|
|
|||
|
|
@ -86,6 +86,17 @@
|
|||
<p class="x_help-block">{$lang->about_minify_scripts}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->concat_scripts}</label>
|
||||
<div class="x_controls">
|
||||
<label for="concat_scripts_none" class="x_inline"><input type="radio" name="concat_scripts" id="concat_scripts_none" value="none" checked="checked"|cond="!contains('css', $concat_scripts) && !contains('js', $concat_scripts)" /> {$lang->cmd_concat_none}</label>
|
||||
<label for="concat_scripts_css_only" class="x_inline"><input type="radio" name="concat_scripts" id="concat_scripts_css_only" value="css" checked="checked"|cond="$concat_scripts=='css'" /> {$lang->cmd_concat_css_only}</label>
|
||||
<label for="concat_scripts_js_only" class="x_inline"><input type="radio" name="concat_scripts" id="concat_scripts_js_only" value="js" checked="checked"|cond="$concat_scripts=='js'" /> {$lang->cmd_concat_js_only}</label>
|
||||
<label for="concat_scripts_css_js" class="x_inline"><input type="radio" name="concat_scripts" id="concat_scripts_css_js" value="css,js" checked="checked"|cond="$concat_scripts=='css,js'" /> {$lang->cmd_concat_css_js}</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_concat_scripts}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_gzip}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue