Merge branch 'develop' into next

This commit is contained in:
Kijin Sung 2020-07-05 00:09:26 +09:00
commit 5985ca5b6b
25 changed files with 242 additions and 187 deletions

View file

@ -330,7 +330,7 @@ class DisplayHandler extends Handler
*/
public static function _printJSONHeader()
{
header("Content-Type: text/javascript; charset=UTF-8");
header("Content-Type: application/json; charset=UTF-8");
}
/**

View file

@ -3,7 +3,7 @@
/**
* RX_VERSION is the version number of the Rhymix CMS.
*/
define('RX_VERSION', '1.9.9.7');
define('RX_VERSION', '1.9.9.8');
/**
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.

View file

@ -151,13 +151,13 @@
}
if(result.error == 0) {
if(/\.(gif|jpe?g|png|webp)$/i.test(result.source_filename)) {
if(/\.(gif|jpe?g|png|webp)$/i.test(result.source_filename) && opt.autoinsertTypes.image) {
temp_code += '<img src="' + result.download_url + '" alt="' + result.source_filename + '" editor_component="image_link" data-file-srl="' + result.file_srl + '" />';
}
else if(/\.(mp3|wav|ogg|flac|aac)$/i.test(result.source_filename)) {
else if(/\.(mp3|wav|ogg|flac|aac)$/i.test(result.source_filename) && opt.autoinsertTypes.audio) {
temp_code += '<audio src="' + result.download_url + '" controls data-file-srl="' + result.file_srl + '" />';
}
else if(/\.(mp4|webm|ogv)$/i.test(result.source_filename)) {
else if(/\.(mp4|webm|ogv)$/i.test(result.source_filename) && opt.autoinsertTypes.video) {
if(result.original_type === 'image/gif') {
temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />';
} else {
@ -166,15 +166,13 @@
}
if(temp_code !== '') {
if (opt.autoinsertImage === 'paragraph') {
if (opt.autoinsertPosition === 'paragraph') {
temp_code = "<p>" + temp_code + "</p>\n";
}
if (opt.autoinsertImage !== 'none') {
try {
_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");
}
catch(err) {}
try {
_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");
}
catch(err) {}
}
} else if (result.message) {
alert(result.message);
@ -326,13 +324,13 @@
if(!result) return;
var temp_code = '';
if(/\.(gif|jpe?g|png|webp)$/i.test(result.source_filename)) {
if(/\.(gif|jpe?g|png|webp)$/i.test(result.source_filename) && data.settings.autoinsertTypes.image) {
temp_code += '<img src="' + result.download_url + '" alt="' + result.source_filename + '" editor_component="image_link" data-file-srl="' + result.file_srl + '" />';
}
else if(/\.(mp3|wav|ogg|flac|aac)$/i.test(result.source_filename)) {
else if(/\.(mp3|wav|ogg|flac|aac)$/i.test(result.source_filename) && data.settings.autoinsertTypes.audio) {
temp_code += '<audio src="' + result.download_url + '" controls data-file-srl="' + result.file_srl + '" />';
}
else if(/\.(mp4|webm|ogv)$/i.test(result.source_filename)) {
else if(/\.(mp4|webm|ogv)$/i.test(result.source_filename) && data.settings.autoinsertTypes.video) {
if(result.original_type === 'image/gif') {
temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />';
} else {
@ -341,7 +339,7 @@
}
if(temp_code !== '') {
if (data.settings.autoinsertImage === 'paragraph') {
if (data.settings.autoinsertPosition === 'paragraph') {
temp_code = "<p>" + temp_code + "</p>\n";
}
}

View file

@ -771,6 +771,7 @@ margin-bottom: 10px;
position: relative;
zoom: 1;
padding: 0 0 50px 200px;
background-color: #fff;
z-index: 1;
}
.x>.body.wide {

View file

@ -2,18 +2,16 @@
div.xe_mobile {
display:none!important;
}
section.declare_comment{
display:block;
select#message_option {
clear: both;
width: 90%;
margin-bottom: 8px;
}
section.declare_comment label{
font-weight: bold;
}
section.declare_comment select,section.declare_comment textarea{
box-sizing:border-box;
height:auto;
textarea#declare_message {
width: 100%;
padding:7px;
font-size: 11pt;
line-height: normal;
display:block;
height: 80px;
margin-bottom: 8px;
box-sizing: border-box;
display: none;
}

View file

@ -1,56 +1,54 @@
{@Context::addMetaTag('viewport', 'width=device-width, user-scalable=no', FALSE);}
<load target="./css/declare_comment.css" />
<script cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/comment/tpl/1'">
alert("{$XE_VALIDATOR_MESSAGE}");
window.close();
</script>
<section class="declare_comment">
<h1>{$lang->improper_comment_declare}</h1>
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="comment" />
<input type="hidden" name="act" value="procCommentDeclare" />
<input type="hidden" name="target_srl" value="{$target_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', $act, 'target_srl', $target_srl)}" />
<input type="hidden" name="xe_validator_id" value="modules/comment/tpl/1" />
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="comment" />
<input type="hidden" name="act" value="procCommentDeclare" />
<input type="hidden" name="target_srl" value="{$target_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', $act, 'target_srl', $target_srl)}" />
<input type="hidden" name="xe_validator_id" value="modules/comment/tpl/1" />
<div class="x_modal-header">
<h1>{$lang->improper_comment_declare} <!--@if($type == 'cancel')-->{$lang->cmd_cancel}<!--@end--></h1>
</div>
<div class="x_modal-body x_form-horizontal" style="max-height:none">
<blockquote>
<section class="target_article">
<h1>{$lang->replies}</h1>
<p>{$target_comment->getSummary(200)}</p>
</section>
</blockquote>
<label class="x_control-label" for="message_option">{$lang->improper_comment_declare_reason}</label>
<div class="x_controls">
<select name="message_option" id="message_option">
<option loop="$lang->improper_comment_reasons => $key,$text" value="{$key}">{$text}</option>
</select>
<textarea name="declare_message" id="declare_message"></textarea>
<p>{$lang->about_improper_comment_declare}<p>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary" />{$lang->cmd_submit}</button>
<div class="x_control-group">
<label class="x_control-label" for="message_option">{$lang->improper_comment_declare_reason}</label>
<div class="x_controls">
<select name="message_option" id="message_option">
<option loop="$lang->improper_comment_reasons => $key,$text" value="{$key}">{$text}</option>
</select>
<textarea name="declare_message" id="declare_message"></textarea>
<p>{$lang->about_improper_comment_declare}<p>
</div>
</div>
</form>
</section>
<div class="x_modal-footer">
<span class="x_btn-group x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_submit}</button>
</span>
</div>
</div>
</form>
<script cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/comment/tpl/1'">
alert("{$XE_VALIDATOR_MESSAGE}");
window.close();
</script>
<script>
(function($){
var msg_area = $('textarea[name="declare_message"]');
$('select[name="message_option"]').change(function(){
var option = {
duration:200,
complete: function(){setFixedPopupSize();}
}
if ($(this).val()==='others') {
msg_area.slideDown(option);
}
else {
msg_area.slideUp(option);
(function($){
$(function() {
setFixedPopupSize();
}
});
msg_area.hide();
$(document).load(setFixedPopupSize);
})(jQuery);
</script>
$('select[name="message_option"]').change(function(){
if ($(this).val()==='others') {
$('#declare_message').show();
} else {
$('#declare_message').hide();
}
setFixedPopupSize();
});
});
})(jQuery);
</script>

View file

@ -22,7 +22,7 @@ class communicationModel extends communication
* get the configuration
* @return object config of communication module
*/
function getConfig()
public static function getConfig()
{
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('communication');
@ -71,7 +71,7 @@ class communicationModel extends communication
* @param array $group
* @return array
*/
function getGrantArray($default, $group)
public static function getGrantArray($default, $group)
{
$grant = array();
if($default)
@ -97,7 +97,7 @@ class communicationModel extends communication
* @param array $arrGrant
* @return boolean
*/
function checkGrant($arrGrant)
public static function checkGrant($arrGrant)
{
if(!$arrGrant) return false;
@ -110,10 +110,6 @@ class communicationModel extends communication
{
if(Context::get('is_logged')) return true;
}
else if($arrGrant['default'] == 'site')
{
if($this->site_srl == $logged_info->site_srl) return true;
}
else if($arrGrant['default'] == 'manager')
{
if($logged_info->is_admin == 'Y') return true;
@ -136,7 +132,7 @@ class communicationModel extends communication
* @param array $columnList
* @return object message information
*/
function getSelectedMessage($message_srl, $columnList = array())
public static function getSelectedMessage($message_srl, $columnList = array())
{
$logged_info = Context::get('logged_info');
@ -199,7 +195,7 @@ class communicationModel extends communication
* @param array $columnList
* @return object message information
*/
function getNewMessage($columnList = array())
public static function getNewMessage($columnList = array())
{
$logged_info = Context::get('logged_info');
@ -229,7 +225,7 @@ class communicationModel extends communication
return $message;
}
function getNewMessageCount($member_srl = null)
public static function getNewMessageCount($member_srl = null)
{
if(!$member_srl)
{
@ -251,7 +247,7 @@ class communicationModel extends communication
* @param array $columnList
* @return Object
*/
function getMessages($message_type = "R", $columnList = array())
public static function getMessages($message_type = "R", $columnList = array())
{
$logged_info = Context::get('logged_info');
$args = new stdClass();
@ -306,6 +302,19 @@ class communicationModel extends communication
return $output;
}
/**
* Get a list of files attached to a message.
*
* @param object $message
* @return array
*/
public static function getMessageFiles($message)
{
$upload_target_srl = $message->message_type === 'S' ? $message->message_srl : $message->related_srl;
$file_list = getModel('file')->getFiles($upload_target_srl);
return $file_list ?: [];
}
/**
* Get a list of friends
@ -313,7 +322,7 @@ class communicationModel extends communication
* @param array $columnList
* @return Object
*/
function getFriends($friend_group_srl = 0, $columnList = array())
public static function getFriends($friend_group_srl = 0, $columnList = array())
{
$logged_info = Context::get('logged_info');
@ -337,7 +346,7 @@ class communicationModel extends communication
* @param int $member_srl
* @return int
*/
function isAddedFriend($member_srl)
public static function isAddedFriend($member_srl)
{
$logged_info = Context::get('logged_info');
@ -355,7 +364,7 @@ class communicationModel extends communication
* @param int $friend_group_srl
* @return object
*/
function getFriendGroupInfo($friend_group_srl)
public static function getFriendGroupInfo($friend_group_srl)
{
$logged_info = Context::get('logged_info');
@ -372,7 +381,7 @@ class communicationModel extends communication
* Get a list of groups
* @return array
*/
function getFriendGroups()
public static function getFriendGroups()
{
$logged_info = Context::get('logged_info');
@ -392,7 +401,7 @@ class communicationModel extends communication
* @param int $target_srl
* @return boolean (true : friend, false : not friend)
*/
function isFriend($target_srl)
public static function isFriend($target_srl)
{
$logged_info = Context::get('logged_info');

View file

@ -64,7 +64,7 @@ class communicationView extends communication
$logged_info = Context::get('logged_info');
// Set the variables
$message_srl = Context::get('message_srl');
$message_srl = intval(Context::get('message_srl'));
$message_type = Context::get('message_type');
if(!in_array($message_type, array('R', 'S', 'T', 'N')))
@ -78,7 +78,7 @@ class communicationView extends communication
$template_filename = 'messages';
if($message_srl)
{
$columnList = array('message_srl', 'sender_srl', 'receiver_srl', 'message_type', 'title', 'content', 'readed', 'regdate');
$columnList = array('message_srl', 'message_type', 'related_srl', 'sender_srl', 'receiver_srl', 'title', 'content', 'readed', 'regdate');
$message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
switch($message->message_type)
@ -116,15 +116,21 @@ class communicationView extends communication
{
stripEmbedTagForAdmin($message->content, $message->sender_srl);
Context::set('message', $message);
Context::set('message_files', CommunicationModel::getMessageFiles($message));
if(Mobile::isFromMobilePhone())
{
$template_filename = 'read_message';
}
}
else
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
}
// Extract a list
$columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
$columnList = array('message_srl', 'message_type', 'related_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
$output = $oCommunicationModel->getMessages($message_type, $columnList);
// set a template file
@ -160,8 +166,6 @@ class communicationView extends communication
throw new Rhymix\Framework\Exceptions\MustLogin;
}
$logged_info = Context::get('logged_info');
$oCommunicationModel = getModel('communication');
// get a new message

View file

@ -19,6 +19,8 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
.bd{background:#f8f8f8;padding:1px 0}
.co{margin:10px;line-height:1.4;font-size:14px;color:#333}
.co:after{content:"";display:block;clear:both;zoom:1}
.co .attachments { border-top: 1px solid #ccc8be; margin: 16px 0 0 0; padding: 16px 0 16px 24px; }
.co .attachments span.file_size { color: #666; }
/* Hx */
.hx{position:relative;border-bottom:1px solid #ccc8be;padding:8px 10px;margin:0}
.hx:after{content:"";margin:0 -10px;position:relative;top:10px;display:block;clear:both;height:1px;background:#fff}

View file

@ -5,6 +5,13 @@
</div>
<div class="co">
<div class="xe_content">{$message->content|noescape}</div>
<!--@if(count($message_files))-->
<ul class="attachments">
<!--@foreach($message_files as $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename}</a> <span class="file_size">({FileHandler::filesize($file->file_size)})</li>
<!--@endforeach-->
</ul>
<!--@endif-->
</div>
<div class="bna">
<span class="fl"><a href="{getUrl('message_srl', '')}" class="bn white">{$lang->cmd_list}</a></span>

View file

@ -10,7 +10,14 @@
<div class="xe_content">
{$message->content}
</div>
<div class="prn-anchor-buttons">
<!--@if(count($message_files))-->
<ul class="attachments">
<!--@foreach($message_files as $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename}</a> <span class="file_size">({FileHandler::filesize($file->file_size)})</li>
<!--@endforeach-->
</ul>
<!--@endif-->
<div class="prn-anchor-buttons">
<a cond="$message->message_type != 'S' && $message->member_srl != $logged_info->member_srl" href="#" onclick="doSendMessage('{$message->sender_srl}','{$message->message_srl}');">{$lang->cmd_reply_message}</a>
<a cond="$message->message_type == 'R'" href="#" onclick="doStoreMessage('{$message->message_srl}');">{$lang->cmd_store}</a>
<a href="#" onclick="doDeleteMessage('{$message->message_srl}');">{$lang->cmd_delete}</a>

View file

@ -211,6 +211,8 @@
.xc .table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}
.xc .table-hover tbody tr:hover>td,
.xc .table-hover tbody tr:hover>th{background-color:#f5f5f5}
.xc .table ul.attachments { margin: 0; padding-left: 20px; }
.xc .table ul.attachments span.file_size { color: #666; }
.xc .explanation { display: inline-block; margin-left: 8px; color: #999; }
/* Pangination */
.xc .pagination{margin:20px 0}

View file

@ -17,7 +17,7 @@
</form>
<div style="clear:both"></div>
</div>
<table class="table table-striped table-hover" style="table-layout: fixed" cond="$message">
<table class="table table-striped" style="table-layout: fixed" cond="$message">
<tr>
<th>{$message->title}</th>
</tr>
@ -32,6 +32,17 @@
{$message->content|noescape}
</td>
</tr>
<!--@if(count($message_files))-->
<tr>
<td>
<ul class="attachments">
<!--@foreach($message_files as $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename}</a> <span class="file_size">({FileHandler::filesize($file->file_size)})</li>
<!--@endforeach-->
</ul>
</td>
</tr>
<!--@endif-->
</table>
<div class="btnArea btn-group" cond="$message" style="margin-bottom:20px">
<button class="btn" cond="$message->message_type != 'S' && $message->member_srl != $logged_info->member_srl" type="button" onclick="doSendMessage('{$message->sender_srl}','{$message->message_srl}');">{$lang->cmd_reply_message}</button>

View file

@ -8,8 +8,15 @@
</div>
<div class="xe_content">
{$message->content}
<!--@if(count($message_files))-->
<ul class="attachments">
<!--@foreach($message_files as $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename}</a> <span class="file_size">({FileHandler::filesize($file->file_size)})</li>
<!--@endforeach-->
</ul>
<!--@endif-->
</div>
<div class="sw-footer sw-anchor-buttons">
<div class="sw-footer sw-anchor-buttons">
<a cond="$message->message_type != 'S' && $message->member_srl != $logged_info->member_srl" href="#" onclick="doSendMessage('{$message->sender_srl}','{$message->message_srl}');">{$lang->cmd_reply_message}</a>
<a cond="$message->message_type == 'R'" href="#" onclick="doStoreMessage('{$message->message_srl}');">{$lang->cmd_store}</a>
<a href="#" onclick="doDeleteMessage('{$message->message_srl}');">{$lang->cmd_delete}</a>

View file

@ -2,18 +2,16 @@
div.xe_mobile {
display:none!important;
}
section.declare_document{
display:block;
select#message_option {
clear: both;
width: 90%;
margin-bottom: 8px;
}
section.declare_document label{
font-weight: bold;
}
section.declare_document select,section.declare_document textarea{
box-sizing:border-box;
height:auto;
textarea#declare_message {
width: 100%;
padding:7px;
font-size: 11pt;
line-height: normal;
display:block;
height: 80px;
margin-bottom: 8px;
box-sizing: border-box;
display: none;
}

View file

@ -1,21 +1,19 @@
{@Context::addMetaTag('viewport', 'width=device-width, user-scalable=no', FALSE);}
<load target="./css/declare_document.css" />
<script cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/1'">
alert("{$XE_VALIDATOR_MESSAGE}");
window.close();
</script>
<section class="declare_document">
<h1>{$lang->improper_document_declare} <!--@if($type == 'cancel')-->{$lang->cmd_cancel}<!--@end--></h1>
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="document" />
<!--@if($type == 'cancel')-->
<input type="hidden" name="act" value="procDocumentDeclareCancel" />
<!--@else-->
<input type="hidden" name="act" value="procDocumentDeclare" />
<!--@end-->
<input type="hidden" name="target_srl" value="{$target_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', $act, 'target_srl', $target_srl)}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/1" />
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="document" />
<!--@if($type == 'cancel')-->
<input type="hidden" name="act" value="procDocumentDeclareCancel" />
<!--@else-->
<input type="hidden" name="act" value="procDocumentDeclare" />
<!--@end-->
<input type="hidden" name="target_srl" value="{$target_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', $act, 'target_srl', $target_srl)}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/1" />
<div class="x_modal-header">
<h1>{$lang->improper_document_declare} <!--@if($type == 'cancel')-->{$lang->cmd_cancel}<!--@end--></h1>
</div>
<div class="x_modal-body x_form-horizontal" style="max-height:none">
<blockquote>
<section class="target_article">
<h1>{$target_document->getTitleText()}</h1>
@ -23,40 +21,40 @@
</section>
</blockquote>
<!--@if($type !== 'cancel')-->
<label class="x_control-label" for="message_option">{$lang->improper_document_declare_reason}</label>
<div class="x_controls">
<select name="message_option" id="message_option">
<option loop="$lang->improper_document_reasons => $key,$text" value="{$key}">{$text}</option>
</select>
<textarea name="declare_message" id="declare_message"></textarea>
<p>{$lang->about_improper_document_declare}<p>
</div>
<!--@end-->
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary" /><!--@if($type == 'cancel')-->{$lang->cmd_cancel_declare}<!--@else-->{$lang->cmd_submit}<!--@end--></button>
<div class="x_control-group">
<label class="x_control-label" for="message_option">{$lang->improper_document_declare_reason}</label>
<div class="x_controls">
<select name="message_option" id="message_option">
<option loop="$lang->improper_document_reasons => $key,$text" value="{$key}">{$text}</option>
</select>
<textarea name="declare_message" id="declare_message"></textarea>
<p>{$lang->about_improper_document_declare}<p>
</div>
</div>
</form>
</section>
<script>
(function($){
var msg_area = $('textarea[name="declare_message"]');
$('select[name="message_option"]').change(function(){
var option = {
duration:200,
complete: function(){setFixedPopupSize();}
}
if ($(this).val()==='others') {
msg_area.slideDown(option);
}
else {
msg_area.slideUp(option);
setFixedPopupSize();
}
});
msg_area.hide();
$(document).load(setFixedPopupSize);
})(jQuery);
<!--@end-->
</div>
<div class="x_modal-footer">
<span class="x_btn-group x_pull-right">
<button type="submit" class="x_btn x_btn-primary" /><!--@if($type == 'cancel')-->{$lang->cmd_cancel_declare}<!--@else-->{$lang->cmd_submit}<!--@end--></button>
</span>
</div>
</form>
<script cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/1'">
alert("{$XE_VALIDATOR_MESSAGE}");
window.close();
</script>
<script>
(function($){
$(function() {
setFixedPopupSize();
$('select[name="message_option"]').change(function(){
if ($(this).val()==='others') {
$('#declare_message').show();
} else {
$('#declare_message').hide();
}
setFixedPopupSize();
});
});
})(jQuery);
</script>

View file

@ -228,8 +228,12 @@ class editorAdminController extends editor
$config->content_word_break = in_array($config->content_word_break, array('normal', 'keep-all', 'break-all', 'none')) ? $config->content_word_break : 'normal';
$config->enable_autosave = $configVars->enable_autosave ?: 'Y';
$config->allow_html = $configVars->allow_html ?: 'Y';
$config->autoinsert_image = $configVars->autoinsert_image;
$config->autoinsert_image = in_array($config->autoinsert_image, array('paragraph', 'inline', 'none')) ? $config->autoinsert_image : 'paragraph';
$config->autoinsert_types = array();
foreach ($configVars->autoinsert_types as $type)
{
$config->autoinsert_types[$type] = true;
}
$config->autoinsert_position = in_array($configVars->autoinsert_position, array('paragraph', 'inline')) ? $configVars->autoinsert_position : 'paragraph';
$oModuleController->insertModuleConfig('editor', $config);
$this->setRedirectUrl(Context::get('error_return_url'));

View file

@ -46,7 +46,8 @@ class editor extends ModuleObject
'enable_autosave' => 'Y',
'allow_html' => 'Y',
'editor_focus' => 'N',
'autoinsert_image' => 'paragraph',
'autoinsert_types' => array('image' => true, 'audio' => true, 'video' => true),
'autoinsert_position' => 'paragraph',
'additional_css' => array(),
'additional_mobile_css' => array(),
'additional_plugins' => array(),

View file

@ -148,7 +148,8 @@ class editorModel extends editor
Context::set('content_line_height', $option->content_line_height);
Context::set('content_paragraph_spacing', $option->content_paragraph_spacing);
Context::set('content_word_break', $option->content_word_break);
Context::set('editor_autoinsert_image', $option->autoinsert_image);
Context::set('editor_autoinsert_types', $option->autoinsert_types ?? ($option->autoinsert_image !== 'none' ? self::$default_editor_config['autoinsert_types'] : []));
Context::set('editor_autoinsert_position', $option->autoinsert_position ?? $option->autoinsert_image);
Context::set('editor_additional_css', $option->additional_css);
Context::set('editor_additional_plugins', $option->additional_plugins);
Context::set('editor_remove_plugins', $option->remove_plugins);
@ -197,10 +198,8 @@ class editorModel extends editor
$file_config = $oFileModel->getUploadConfig();
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
if (PHP_INT_SIZE < 8)
{
$file_config->allowed_filesize = min($file_config->allowed_filesize, 2147483647);
}
// Calculate the appropriate chunk size.
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 64 * 1024 * 1024);
if ($file_config->allowed_chunk_size > 4 * 1048576)
{
@ -218,13 +217,6 @@ class editorModel extends editor
$file_config->allowed_filesize = min($file_config->allowed_filesize, FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
$file_config->allowed_chunk_size = 0;
}
// Do not allow chunked uploads in XpressEditor.
if (starts_with($option->editor_skin, 'xpresseditor'))
{
$file_config->allowed_filesize = min($file_config->allowed_filesize, FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
$file_config->allowed_chunk_size = 0;
}
Context::set('file_config',$file_config);
// Configure upload status such as file size

View file

@ -26,7 +26,12 @@ $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->guide_choose_autoinsert_image = 'Auto-insert images';
$lang->guide_choose_autoinsert_types = 'Auto-insert';
$lang->autoinsert_types['image'] = 'Images';
$lang->autoinsert_types['audio'] = 'Audio';
$lang->autoinsert_types['video'] = 'Video';
$lang->autoinsert_paragraph = 'New paragraph';
$lang->autoinsert_inline = 'Inline';
$lang->autoinsert_image_paragraph = 'Automatically insert images into editor (after line break at cursor position)';
$lang->autoinsert_image_inline = 'Automatically insert images into editor (directly at cursor position)';
$lang->autoinsert_image_none = 'Do not auto-insert images into editor';

View file

@ -30,10 +30,12 @@ $lang->word_break_normal = '한글은 글자 단위로 줄바꿈, 영문은 단
$lang->word_break_keep_all = '모든 언어를 단어 단위로 줄바꿈';
$lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈';
$lang->word_break_none = '줄을 바꾸지 않음';
$lang->guide_choose_autoinsert_image = '이미지 자동 삽입';
$lang->autoinsert_image_paragraph = '이미지 첨부시 본문에 자동 삽입 (커서 위치에서 줄을 바꾸고 삽입)';
$lang->autoinsert_image_inline = '이미지 첨부시 본문에 자동 삽입 (커서 위치에 직접 삽입)';
$lang->autoinsert_image_none = '이미지 첨부시 본문에 자동 삽입하지 않음';
$lang->guide_choose_autoinsert_types = '본문 자동 삽입';
$lang->autoinsert_types['image'] = '이미지';
$lang->autoinsert_types['audio'] = '오디오';
$lang->autoinsert_types['video'] = '동영상';
$lang->autoinsert_paragraph = '커서 위치에서 줄을 바꾸어 삽입';
$lang->autoinsert_inline = '커서 위치에 직접 삽입';
$lang->about_additional_plugins = '추가 플러그인 로딩을 지원하는 에디터에서만 적용됩니다.';
$lang->about_remove_plugins = '플러그인 제거를 지원하는 에디터에서만 적용됩니다.';
$lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.';

View file

@ -60,7 +60,8 @@
var setting = {
maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize},
maxChunkSize: {$file_config->allowed_chunk_size ?: 0},
autoinsertImage: {json_encode($editor_autoinsert_image ?: 'paragraph')},
autoinsertTypes: {json_encode($editor_autoinsert_types)},
autoinsertPosition: {json_encode($editor_autoinsert_position ?: 'paragraph')},
singleFileUploads: true
};
$container = $('#xefu-container-{$editor_sequence}');

View file

@ -214,7 +214,7 @@
<div class="x_controls">
<label class="x_inline"><input type="radio" name="enable_autosave" value="Y" checked="checked"|cond="$editor_config->enable_autosave != 'N'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="enable_autosave" value="N" checked="checked"|cond="$editor_config->enable_autosave == 'N'" /> {$lang->cmd_no}</label>
<p class="x_help-inline">{$lang->about_enable_autosave}</p>
<p class="x_help-block">{$lang->about_enable_autosave}</p>
</div>
</div>
<div class="x_control-group">
@ -225,16 +225,23 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->guide_choose_autoinsert_image}</label>
<label class="x_control-label">{$lang->guide_choose_autoinsert_types}</label>
<div class="x_controls">
<label for="autoinsert_image_paragraph">
<input type="radio" name="autoinsert_image" id="autoinsert_image_paragraph" value="paragraph" checked="checked"|cond="$editor_config->autoinsert_image == 'paragraph' || !$editor_config->autoinsert_image" /> {$lang->autoinsert_image_paragraph}
<label class="x_inline">
<input type="checkbox" name="autoinsert_types[]" value="image" checked="checked"|cond="$editor_config->autoinsert_image !== 'none' && (!isset($editor_config->autoinsert_types) || isset($editor_config->autoinsert_types['image']))" /> {$lang->autoinsert_types['image']}
</label>
<label for="autoinsert_image_inline">
<input type="radio" name="autoinsert_image" id="autoinsert_image_inline" value="inline" checked="checked"|cond="$editor_config->autoinsert_image == 'inline'" /> {$lang->autoinsert_image_inline}
<label class="x_inline">
<input type="checkbox" name="autoinsert_types[]" value="audio" checked="checked"|cond="$editor_config->autoinsert_image !== 'none' && (!isset($editor_config->autoinsert_types) || isset($editor_config->autoinsert_types['audio']))" /> {$lang->autoinsert_types['audio']}
</label>
<label for="autoinsert_image_none">
<input type="radio" name="autoinsert_image" id="autoinsert_image_none" value="none" checked="checked"|cond="$editor_config->autoinsert_image == 'none'" /> {$lang->autoinsert_image_none}
<label class="x_inline">
<input type="checkbox" name="autoinsert_types[]" value="video" checked="checked"|cond="$editor_config->autoinsert_image !== 'none' && (!isset($editor_config->autoinsert_types) || isset($editor_config->autoinsert_types['video']))" /> {$lang->autoinsert_types['video']}
</label>
<br />
<label for="autoinsert_paragraph">
<input type="radio" name="autoinsert_position" id="autoinsert_paragraph" value="paragraph" checked="checked"|cond="$editor_config->autoinsert_position == 'paragraph' || !$editor_config->autoinsert_position" /> {$lang->autoinsert_paragraph}
</label>
<label for="autoinsert_inline">
<input type="radio" name="autoinsert_position" id="autoinsert_inline" value="inline" checked="checked"|cond="$editor_config->autoinsert_position == 'inline'" /> {$lang->autoinsert_inline}
</label>
</div>
</div>

View file

@ -109,7 +109,7 @@ class integration_searchView extends integration_search
// 검색 대상을 지정하지 않았을 때 검색 제한
if($target === 'include' && !count($module_srl_list))
{
throw new Rhymix\Framework\Exception('msg_not_enabled');
throw new Rhymix\Framework\Exception('msg_admin_not_enabled');
}
// Set a variable for search keyword

View file

@ -55,6 +55,9 @@ xe.MultiOrderManager = xe.createApp("MultiOrderManager", {
var targets = [];
for(var i in values){
if(values[i] === '') {
continue;
}
var target = this.$showObj.find('>option[value='+values[i]+']').get(0);
if (target != undefined) targets.push(target);
}