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() 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. * 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. * 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(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 + '" />'; 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 + '" />'; 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') { if(result.original_type === 'image/gif') {
temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />'; temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />';
} else { } else {
@ -166,15 +166,13 @@
} }
if(temp_code !== '') { if(temp_code !== '') {
if (opt.autoinsertImage === 'paragraph') { if (opt.autoinsertPosition === 'paragraph') {
temp_code = "<p>" + temp_code + "</p>\n"; temp_code = "<p>" + temp_code + "</p>\n";
} }
if (opt.autoinsertImage !== 'none') { try {
try { _getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");
_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");
}
catch(err) {}
} }
catch(err) {}
} }
} else if (result.message) { } else if (result.message) {
alert(result.message); alert(result.message);
@ -326,13 +324,13 @@
if(!result) return; if(!result) return;
var temp_code = ''; 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 + '" />'; 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 + '" />'; 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') { if(result.original_type === 'image/gif') {
temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />'; temp_code += '<video src="' + result.download_url + '" autoplay loop muted data-file-srl="' + result.file_srl + '" />';
} else { } else {
@ -341,7 +339,7 @@
} }
if(temp_code !== '') { if(temp_code !== '') {
if (data.settings.autoinsertImage === 'paragraph') { if (data.settings.autoinsertPosition === 'paragraph') {
temp_code = "<p>" + temp_code + "</p>\n"; temp_code = "<p>" + temp_code + "</p>\n";
} }
} }

View file

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

View file

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

View file

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

View file

@ -22,7 +22,7 @@ class communicationModel extends communication
* get the configuration * get the configuration
* @return object config of communication module * @return object config of communication module
*/ */
function getConfig() public static function getConfig()
{ {
$oModuleModel = getModel('module'); $oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('communication'); $config = $oModuleModel->getModuleConfig('communication');
@ -71,7 +71,7 @@ class communicationModel extends communication
* @param array $group * @param array $group
* @return array * @return array
*/ */
function getGrantArray($default, $group) public static function getGrantArray($default, $group)
{ {
$grant = array(); $grant = array();
if($default) if($default)
@ -97,7 +97,7 @@ class communicationModel extends communication
* @param array $arrGrant * @param array $arrGrant
* @return boolean * @return boolean
*/ */
function checkGrant($arrGrant) public static function checkGrant($arrGrant)
{ {
if(!$arrGrant) return false; if(!$arrGrant) return false;
@ -110,10 +110,6 @@ class communicationModel extends communication
{ {
if(Context::get('is_logged')) return true; 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') else if($arrGrant['default'] == 'manager')
{ {
if($logged_info->is_admin == 'Y') return true; if($logged_info->is_admin == 'Y') return true;
@ -136,7 +132,7 @@ class communicationModel extends communication
* @param array $columnList * @param array $columnList
* @return object message information * @return object message information
*/ */
function getSelectedMessage($message_srl, $columnList = array()) public static function getSelectedMessage($message_srl, $columnList = array())
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -199,7 +195,7 @@ class communicationModel extends communication
* @param array $columnList * @param array $columnList
* @return object message information * @return object message information
*/ */
function getNewMessage($columnList = array()) public static function getNewMessage($columnList = array())
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -229,7 +225,7 @@ class communicationModel extends communication
return $message; return $message;
} }
function getNewMessageCount($member_srl = null) public static function getNewMessageCount($member_srl = null)
{ {
if(!$member_srl) if(!$member_srl)
{ {
@ -251,7 +247,7 @@ class communicationModel extends communication
* @param array $columnList * @param array $columnList
* @return Object * @return Object
*/ */
function getMessages($message_type = "R", $columnList = array()) public static function getMessages($message_type = "R", $columnList = array())
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
$args = new stdClass(); $args = new stdClass();
@ -307,13 +303,26 @@ class communicationModel extends communication
return $output; 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 * Get a list of friends
* @param int $friend_group_srl (default 0) * @param int $friend_group_srl (default 0)
* @param array $columnList * @param array $columnList
* @return Object * @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'); $logged_info = Context::get('logged_info');
@ -337,7 +346,7 @@ class communicationModel extends communication
* @param int $member_srl * @param int $member_srl
* @return int * @return int
*/ */
function isAddedFriend($member_srl) public static function isAddedFriend($member_srl)
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -355,7 +364,7 @@ class communicationModel extends communication
* @param int $friend_group_srl * @param int $friend_group_srl
* @return object * @return object
*/ */
function getFriendGroupInfo($friend_group_srl) public static function getFriendGroupInfo($friend_group_srl)
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -372,7 +381,7 @@ class communicationModel extends communication
* Get a list of groups * Get a list of groups
* @return array * @return array
*/ */
function getFriendGroups() public static function getFriendGroups()
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -392,7 +401,7 @@ class communicationModel extends communication
* @param int $target_srl * @param int $target_srl
* @return boolean (true : friend, false : not friend) * @return boolean (true : friend, false : not friend)
*/ */
function isFriend($target_srl) public static function isFriend($target_srl)
{ {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');

View file

@ -64,7 +64,7 @@ class communicationView extends communication
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
// Set the variables // Set the variables
$message_srl = Context::get('message_srl'); $message_srl = intval(Context::get('message_srl'));
$message_type = Context::get('message_type'); $message_type = Context::get('message_type');
if(!in_array($message_type, array('R', 'S', 'T', 'N'))) if(!in_array($message_type, array('R', 'S', 'T', 'N')))
@ -78,7 +78,7 @@ class communicationView extends communication
$template_filename = 'messages'; $template_filename = 'messages';
if($message_srl) 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); $message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
switch($message->message_type) switch($message->message_type)
@ -116,15 +116,21 @@ class communicationView extends communication
{ {
stripEmbedTagForAdmin($message->content, $message->sender_srl); stripEmbedTagForAdmin($message->content, $message->sender_srl);
Context::set('message', $message); Context::set('message', $message);
Context::set('message_files', CommunicationModel::getMessageFiles($message));
if(Mobile::isFromMobilePhone()) if(Mobile::isFromMobilePhone())
{ {
$template_filename = 'read_message'; $template_filename = 'read_message';
} }
} }
else
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
} }
// Extract a list // 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); $output = $oCommunicationModel->getMessages($message_type, $columnList);
// set a template file // set a template file
@ -160,8 +166,6 @@ class communicationView extends communication
throw new Rhymix\Framework\Exceptions\MustLogin; throw new Rhymix\Framework\Exceptions\MustLogin;
} }
$logged_info = Context::get('logged_info');
$oCommunicationModel = getModel('communication'); $oCommunicationModel = getModel('communication');
// get a new message // 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} .bd{background:#f8f8f8;padding:1px 0}
.co{margin:10px;line-height:1.4;font-size:14px;color:#333} .co{margin:10px;line-height:1.4;font-size:14px;color:#333}
.co:after{content:"";display:block;clear:both;zoom:1} .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 */
.hx{position:relative;border-bottom:1px solid #ccc8be;padding:8px 10px;margin:0} .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} .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>
<div class="co"> <div class="co">
<div class="xe_content">{$message->content|noescape}</div> <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>
<div class="bna"> <div class="bna">
<span class="fl"><a href="{getUrl('message_srl', '')}" class="bn white">{$lang->cmd_list}</a></span> <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"> <div class="xe_content">
{$message->content} {$message->content}
</div> </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 != '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 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> <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-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}
.xc .table-hover tbody tr:hover>td, .xc .table-hover tbody tr:hover>td,
.xc .table-hover tbody tr:hover>th{background-color:#f5f5f5} .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; } .xc .explanation { display: inline-block; margin-left: 8px; color: #999; }
/* Pangination */ /* Pangination */
.xc .pagination{margin:20px 0} .xc .pagination{margin:20px 0}

View file

@ -17,7 +17,7 @@
</form> </form>
<div style="clear:both"></div> <div style="clear:both"></div>
</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> <tr>
<th>{$message->title}</th> <th>{$message->title}</th>
</tr> </tr>
@ -32,6 +32,17 @@
{$message->content|noescape} {$message->content|noescape}
</td> </td>
</tr> </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> </table>
<div class="btnArea btn-group" cond="$message" style="margin-bottom:20px"> <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> <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>
<div class="xe_content"> <div class="xe_content">
{$message->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>
<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 != '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 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> <a href="#" onclick="doDeleteMessage('{$message->message_srl}');">{$lang->cmd_delete}</a>

View file

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

View file

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

View file

@ -46,7 +46,8 @@ class editor extends ModuleObject
'enable_autosave' => 'Y', 'enable_autosave' => 'Y',
'allow_html' => 'Y', 'allow_html' => 'Y',
'editor_focus' => 'N', 'editor_focus' => 'N',
'autoinsert_image' => 'paragraph', 'autoinsert_types' => array('image' => true, 'audio' => true, 'video' => true),
'autoinsert_position' => 'paragraph',
'additional_css' => array(), 'additional_css' => array(),
'additional_mobile_css' => array(), 'additional_mobile_css' => array(),
'additional_plugins' => 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_line_height', $option->content_line_height);
Context::set('content_paragraph_spacing', $option->content_paragraph_spacing); Context::set('content_paragraph_spacing', $option->content_paragraph_spacing);
Context::set('content_word_break', $option->content_word_break); 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_css', $option->additional_css);
Context::set('editor_additional_plugins', $option->additional_plugins); Context::set('editor_additional_plugins', $option->additional_plugins);
Context::set('editor_remove_plugins', $option->remove_plugins); Context::set('editor_remove_plugins', $option->remove_plugins);
@ -197,10 +198,8 @@ class editorModel extends editor
$file_config = $oFileModel->getUploadConfig(); $file_config = $oFileModel->getUploadConfig();
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024; $file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024; $file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
if (PHP_INT_SIZE < 8)
{ // Calculate the appropriate chunk size.
$file_config->allowed_filesize = min($file_config->allowed_filesize, 2147483647);
}
$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); $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) if ($file_config->allowed_chunk_size > 4 * 1048576)
{ {
@ -219,13 +218,6 @@ class editorModel extends editor
$file_config->allowed_chunk_size = 0; $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); Context::set('file_config',$file_config);
// Configure upload status such as file size // Configure upload status such as file size
$upload_status = $oFileModel->getUploadStatus(); $upload_status = $oFileModel->getUploadStatus();

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_keep_all = 'Wrap at word boundary';
$lang->word_break_break_all = 'Wrap at character boundary'; $lang->word_break_break_all = 'Wrap at character boundary';
$lang->word_break_none = 'Do not wrap long lines'; $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_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_inline = 'Automatically insert images into editor (directly at cursor position)';
$lang->autoinsert_image_none = 'Do not auto-insert images into editor'; $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_keep_all = '모든 언어를 단어 단위로 줄바꿈';
$lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈'; $lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈';
$lang->word_break_none = '줄을 바꾸지 않음'; $lang->word_break_none = '줄을 바꾸지 않음';
$lang->guide_choose_autoinsert_image = '이미지 자동 삽입'; $lang->guide_choose_autoinsert_types = '본문 자동 삽입';
$lang->autoinsert_image_paragraph = '이미지 첨부시 본문에 자동 삽입 (커서 위치에서 줄을 바꾸고 삽입)'; $lang->autoinsert_types['image'] = '이미지';
$lang->autoinsert_image_inline = '이미지 첨부시 본문에 자동 삽입 (커서 위치에 직접 삽입)'; $lang->autoinsert_types['audio'] = '오디오';
$lang->autoinsert_image_none = '이미지 첨부시 본문에 자동 삽입하지 않음'; $lang->autoinsert_types['video'] = '동영상';
$lang->autoinsert_paragraph = '커서 위치에서 줄을 바꾸어 삽입';
$lang->autoinsert_inline = '커서 위치에 직접 삽입';
$lang->about_additional_plugins = '추가 플러그인 로딩을 지원하는 에디터에서만 적용됩니다.'; $lang->about_additional_plugins = '추가 플러그인 로딩을 지원하는 에디터에서만 적용됩니다.';
$lang->about_remove_plugins = '플러그인 제거를 지원하는 에디터에서만 적용됩니다.'; $lang->about_remove_plugins = '플러그인 제거를 지원하는 에디터에서만 적용됩니다.';
$lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.'; $lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.';

View file

@ -60,7 +60,8 @@
var setting = { var setting = {
maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize}, maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize},
maxChunkSize: {$file_config->allowed_chunk_size ?: 0}, 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 singleFileUploads: true
}; };
$container = $('#xefu-container-{$editor_sequence}'); $container = $('#xefu-container-{$editor_sequence}');

View file

@ -214,7 +214,7 @@
<div class="x_controls"> <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="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> <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> </div>
<div class="x_control-group"> <div class="x_control-group">
@ -225,16 +225,23 @@
</div> </div>
</div> </div>
<div class="x_control-group"> <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"> <div class="x_controls">
<label for="autoinsert_image_paragraph"> <label class="x_inline">
<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} <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>
<label for="autoinsert_image_inline"> <label class="x_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} <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>
<label for="autoinsert_image_none"> <label class="x_inline">
<input type="radio" name="autoinsert_image" id="autoinsert_image_none" value="none" checked="checked"|cond="$editor_config->autoinsert_image == 'none'" /> {$lang->autoinsert_image_none} <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> </label>
</div> </div>
</div> </div>

View file

@ -109,7 +109,7 @@ class integration_searchView extends integration_search
// 검색 대상을 지정하지 않았을 때 검색 제한 // 검색 대상을 지정하지 않았을 때 검색 제한
if($target === 'include' && !count($module_srl_list)) 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 // Set a variable for search keyword

View file

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