신고 선택지 추가, 모바일 신고 환경 개선

- 신고 사유를 선택지 중 선택할 수 있게 함
- 팝업 메뉴의 스타일을 개선하여 모바일에서 적절하게 터치할 수 있게 함.
This commit is contained in:
MinSoo Kim 2016-01-28 03:59:26 +09:00
parent f77b8fde3c
commit 644ed8eb05
6 changed files with 101 additions and 16 deletions

View file

@ -194,8 +194,11 @@ class documentController extends document
{
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$improper_document_reasons = Context::getLang('improper_document_reasons');
$document_srl = Context::get('target_srl');
$declare_message = Context::get('declare_message');
$message_option = Context::get('message_option');
$declare_message = ($message_option !== 'others' && isset($improper_document_reasons[$message_option]))? $improper_document_reasons[$message_option] : Context::get('declare_message');
if(!$document_srl) return new Object(-1, 'msg_invalid_request');
if(Context::get('success_return_url'))

View file

@ -977,6 +977,40 @@
<value xml:lang="ko"><![CDATA[신고 이유]]></value>
<value xml:lang="en"><![CDATA[Reason]]></value>
</item>
<item name="improper_document_reasons" type="array">
<item name="advertisement">
<value xml:lang="ko"><![CDATA[주제나 흐름에 맞지 않는 광고 글입니다.]]></value>
<value xml:lang="en"><![CDATA[Advertisements that do not fit the topics or themes.]]></value>
</item>
<item name="theme">
<value xml:lang="ko"><![CDATA[주제에 맞지 않는 글입니다.]]></value>
<value xml:lang="en"><![CDATA[Posts that do not fit the topics or themes.]]></value>
</item>
<item name="bad_word">
<value xml:lang="ko"><![CDATA[과도한 욕설을 담고 있습니다.]]></value>
<value xml:lang="en"><![CDATA[Too much bad words.]]></value>
</item>
<item name="violence">
<value xml:lang="ko"><![CDATA[폭력적인 내용을 담고 있습니다.]]></value>
<value xml:lang="en"><![CDATA[Violence.]]></value>
</item>
<item name="racism">
<value xml:lang="ko"><![CDATA[인종차별적인 내용을 담고 있습니다.]]></value>
<value xml:lang="en"><![CDATA[Racism.]]></value>
</item>
<item name="pornography">
<value xml:lang="ko"><![CDATA[음란물을 포함하고 있습니다.]]></value>
<value xml:lang="en"><![CDATA[Pornography.]]></value>
</item>
<item name="privacy">
<value xml:lang="ko"><![CDATA[민감한 개인정보가 노출 되어있습니다.]]></value>
<value xml:lang="en"><![CDATA[Privacy issue.]]></value>
</item>
<item name="others">
<value xml:lang="ko"><![CDATA[기타(직접작성)]]></value>
<value xml:lang="en"><![CDATA[Others (Write your own)]]></value>
</item>
</item>
<item name="about_improper_document_declare">
<value xml:lang="ko"><![CDATA[게시글 신고 사유를 간단히 적어서 제출해주시면 관리자 검토 후 조치하겠습니다.]]></value>
<value xml:lang="en"><![CDATA[Write here the reason you report this article as an improper document.]]></value>

View file

@ -0,0 +1,12 @@
@charset "UTF-8";
div.xe_mobile {
display:none!important;
}
section.declare_document{
position:relative;
display:block;
}
section.declare_document select,section.declare_document textarea{
width: 100%;
display:block;
}

View file

@ -1,7 +1,9 @@
{@Context::addMetaTag('viewport', 'width=device-width, user-scalable=no', FALSE);}
<load target="./css/declare_document.css" />
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<section class="section">
<section class="declare_document">
<h1>{$lang->improper_document_declare}</h1>
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="document" />
@ -15,8 +17,11 @@
<p>{$target_document->getSummary(200)}</p>
</section>
</blockquote>
<label class="x_control-label" for="declare_message">{$lang->improper_document_declare_reason}</label>
<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>
@ -28,5 +33,23 @@
</form>
</section>
<script>
jQuery(window).load(setFixedPopupSize);
(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();
$(window).load(setFixedPopupSize);
})(jQuery);
</script>