mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #565 Allow other units in editor config
This commit is contained in:
parent
72785b0965
commit
1d11ad7357
4 changed files with 17 additions and 6 deletions
|
|
@ -164,10 +164,14 @@ class editorAdminController extends editor
|
|||
$config->font_defined = $configVars->font_defined = 'N';
|
||||
$config->content_font = $configVars->content_font;
|
||||
}
|
||||
$config->content_font_size = intval($configVars->content_font_size) . 'px';
|
||||
$config->content_line_height = intval($configVars->content_line_height) . '%';
|
||||
$config->content_paragraph_spacing = intval($configVars->content_paragraph_spacing) . 'px';
|
||||
$config->content_font_size = trim($configVars->content_font_size);
|
||||
$config->content_font_size = ctype_digit($config->content_font_size) ? ($config->content_font_size . 'px') : $config->content_font_size;
|
||||
$config->content_line_height = trim($configVars->content_line_height);
|
||||
$config->content_line_height = ctype_digit($config->content_line_height) ? ($config->content_line_height . '%') : $config->content_line_height;
|
||||
$config->content_paragraph_spacing = trim($configVars->content_paragraph_spacing);
|
||||
$config->content_paragraph_spacing = ctype_digit($config->content_paragraph_spacing) ? ($config->content_paragraph_spacing . '%') : $config->content_paragraph_spacing;
|
||||
$config->content_word_break = $configVars->content_word_break;
|
||||
$config->content_word_break = in_array($config->content_word_break, array('normal', 'keep-all', 'break-all', 'none')) ? $config->content_word_break : 'normal';
|
||||
|
||||
$oModuleController->insertModuleConfig('editor', $config);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ $lang->word_break_normal = 'Wrap Asian scripts at character boundary and Latin s
|
|||
$lang->word_break_keep_all = 'Wrap at word boundary';
|
||||
$lang->word_break_break_all = 'Wrap at character boundary';
|
||||
$lang->word_break_none = 'Do not wrap long lines';
|
||||
$lang->about_unit_default_px = 'The unit is px unless otherwise specified.';
|
||||
$lang->about_unit_default_percent = 'The unit is % unless otherwise specified.';
|
||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
||||
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ $lang->word_break_normal = '한글은 글자 단위로 줄바꿈, 영문은 단
|
|||
$lang->word_break_keep_all = '모든 언어를 단어 단위로 줄바꿈';
|
||||
$lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈';
|
||||
$lang->word_break_none = '줄을 바꾸지 않음';
|
||||
$lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.';
|
||||
$lang->about_unit_default_percent = '단위를 지정하지 않을 경우 % 단위를 사용합니다.';
|
||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
||||
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
||||
|
|
|
|||
|
|
@ -116,19 +116,22 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="font_size">{$lang->guide_choose_font_size_body}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="font_size" name="content_font_size" value="{intval($editor_config->content_font_size) ?: 13}" /> px
|
||||
<input type="text" id="font_size" name="content_font_size" value="{$editor_config->content_font_size ?: 13}" />
|
||||
<p class="x_help-block">{$lang->about_unit_default_px}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="line_height">{$lang->guide_choose_line_height}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="line_height" name="content_line_height" value="{intval($editor_config->content_line_height) ?: 160}" /> %
|
||||
<input type="text" id="line_height" name="content_line_height" value="{$editor_config->content_line_height ?: 160}" />
|
||||
<p class="x_help-block">{$lang->about_unit_default_percent}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="paragraph_spacing">{$lang->guide_choose_paragraph_spacing}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="paragraph_spacing" name="content_paragraph_spacing" value="{intval($editor_config->content_paragraph_spacing) ?: 0}" /> px
|
||||
<input type="text" id="paragraph_spacing" name="content_paragraph_spacing" value="{$editor_config->content_paragraph_spacing ?: 0}" />
|
||||
<p class="x_help-block">{$lang->about_unit_default_px}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue