|
|
|
@ -23,8 +23,7 @@
|
|
|
|
|
<input type="hidden" id="pick_img_index" name="pick_img_index" value=""/>
|
|
|
|
|
<input type="hidden" id="list_tag" name="list_tag" value=""/>
|
|
|
|
|
|
|
|
|
|
<h2>카테고리<span>(필수)</span></h2>
|
|
|
|
|
|
|
|
|
|
<h2>카테고리<span>(필수)</span></h2>
|
|
|
|
|
<!-- community_write_category-->
|
|
|
|
|
<div class="select-wrap community_write_category">
|
|
|
|
|
<p class="selectbox" id="<#if model['rm']['bd_tp']?exists>${model['rm']['bd_tp']!}">${model['rm']['bd_tp_nm']!}<#else>selectbox">카테고리 선택</#if></p>
|
|
|
|
@ -35,11 +34,8 @@
|
|
|
|
|
</#list>
|
|
|
|
|
</#if>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- //community_write_category-->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //community_write_category-->
|
|
|
|
|
<h2>이미지<span>(선택)</span></h2>
|
|
|
|
|
<!-- community_write_basic-->
|
|
|
|
|
<div class="community_write_basic">
|
|
|
|
@ -83,20 +79,34 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //community_write_basic -->
|
|
|
|
|
|
|
|
|
|
<h2>제목<span>(필수)</span></h2>
|
|
|
|
|
<!--community_write_basic-->
|
|
|
|
|
<div class="community_write_basic text_flex">
|
|
|
|
|
<!-- textarea -->
|
|
|
|
|
<input type="text" id="title" name="title" style="width:98%;height:28px;" placeholder="제목을 입력하세요." value="${model['rm']['content']!}" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2>내용<span>(필수)</span></h2>
|
|
|
|
|
<!--community_write_basic-->
|
|
|
|
|
<div class="community_write_basic">
|
|
|
|
|
<!-- textarea -->
|
|
|
|
|
<textarea id="content" name="content" class="" placeholder="내용을 입력하세요.">${model['rm']['content']!}</textarea>
|
|
|
|
|
<input type="text" id="title" name="title" style="width:98%;height:30px;" placeholder="제목을 입력하세요." value="${model['rm']['content']!}" />
|
|
|
|
|
</div>
|
|
|
|
|
<div id="divContent">
|
|
|
|
|
<h2>내용<span>(필수)</span></h2>
|
|
|
|
|
<!--community_write_basic-->
|
|
|
|
|
<div class="community_write_basic">
|
|
|
|
|
<!-- textarea -->
|
|
|
|
|
<textarea id="content" name="content" class="" placeholder="내용을 입력하세요.">${model['rm']['content']!}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<#if model['bd_tp']! =='BF_CT_TP_4'>
|
|
|
|
|
<div id="divVote">
|
|
|
|
|
<h3 style="float:right;"><a href="javascript:fncAddVote();">추가</a></h3>
|
|
|
|
|
<h2>투표내용<span>(필수)</span></h2>
|
|
|
|
|
<div class="community_write_basic">
|
|
|
|
|
<ul id="nutrition_kinds_basic3">
|
|
|
|
|
<li style="width:100%;" >
|
|
|
|
|
<input type="text" name="vote_content" class="text_line" placeholder="투표내용을 입력하세요." value="${model['rm']['content']!}" />
|
|
|
|
|
<span> </span><a onclick="fncDelVote(this);"><img src="${URL_ROOT}/m/img/close_ico.png" style="height: 20px; width: 20px;"></a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</#if>
|
|
|
|
|
<!-- //community_write_basic-->
|
|
|
|
|
<h2>태그입력<span>(선택)</span></h2>
|
|
|
|
|
<!-- community_write_tag-->
|
|
|
|
@ -117,15 +127,13 @@
|
|
|
|
|
</#if>
|
|
|
|
|
</ul>
|
|
|
|
|
<!-- //community_write_tag -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="community_write_btn" >
|
|
|
|
|
<a href="javascript:insert_community();"">완료</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //wrap -->
|
|
|
|
|
|
|
|
|
@ -145,20 +153,34 @@
|
|
|
|
|
alert('제목을 입력해주세요');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(content == ''){
|
|
|
|
|
alert('내용을 입력해주세요');
|
|
|
|
|
return;
|
|
|
|
|
}else{
|
|
|
|
|
tag = $(".li_tag").get();
|
|
|
|
|
params = '';
|
|
|
|
|
for(var i = 0 ; i < tag.length ; i++){
|
|
|
|
|
params += tag[i].innerText + ',';
|
|
|
|
|
}
|
|
|
|
|
$('#frmInsert').children('#list_tag').val(params);
|
|
|
|
|
$('#frmInsert').children('#bd_tp').val(bd_tp);
|
|
|
|
|
$('#frmInsert').children('#pick_img_index').val(pick_img_index);
|
|
|
|
|
$('#frmInsert').submit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
<#if model['bd_tp']! =='BF_CT_TP_4'>
|
|
|
|
|
$("input[name=vote_content]").each( function(idx,ele) {
|
|
|
|
|
if (ele.value =="") {
|
|
|
|
|
alert("투표내용을 입력하세요!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if( $("input[name=vote_content]").length ==0 ) {
|
|
|
|
|
alert("투표내용을 추가 입력하세요!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
tag = $(".li_tag").get();
|
|
|
|
|
params = '';
|
|
|
|
|
for(var i = 0 ; i < tag.length ; i++){
|
|
|
|
|
params += tag[i].innerText + ',';
|
|
|
|
|
}
|
|
|
|
|
$('#frmInsert').children('#list_tag').val(params);
|
|
|
|
|
$('#frmInsert').children('#bd_tp').val(bd_tp);
|
|
|
|
|
$('#frmInsert').children('#pick_img_index').val(pick_img_index);
|
|
|
|
|
$('#frmInsert').submit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pick_img_index = "${pick_img_index!'0'}";
|
|
|
|
@ -250,8 +272,12 @@
|
|
|
|
|
$("body").on("click", ".selectlist p", function() {
|
|
|
|
|
|
|
|
|
|
var text = $(this).html();
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
if(id =="BF_CT_TP_4") {
|
|
|
|
|
$("#divVote").show();
|
|
|
|
|
}else{
|
|
|
|
|
$("#divVote").hide();
|
|
|
|
|
}
|
|
|
|
|
$(this).parent().siblings().html(text);
|
|
|
|
|
$(this).parent().siblings().attr('id',id);
|
|
|
|
|
$(this).parent().toggle();
|
|
|
|
@ -268,6 +294,16 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// selectbox 초기셑팅
|
|
|
|
|
<#if model['lm_bd_tp_list']?has_content>
|
|
|
|
|
<#list model['lm_bd_tp_list'] as item>
|
|
|
|
|
<#if item['val_1']! == model['bd_tp'] >
|
|
|
|
|
$(".selectbox").attr('id','${item['val_1']!}');
|
|
|
|
|
$(".selectbox").html('${item['title']!}');
|
|
|
|
|
</#if>
|
|
|
|
|
</#list>
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
var tag_index = ${tag_index};
|
|
|
|
|
|
|
|
|
@ -283,6 +319,17 @@
|
|
|
|
|
function tag_del(tag_index){
|
|
|
|
|
$('#li_tag_'+tag_index).remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fncAddVote() {
|
|
|
|
|
var tag="<li style=\"width:100%;\">";
|
|
|
|
|
tag +=" <input type=\"text\" name=\"vote_content\" class=\"text_line\" placeholder=\"투표내용을 입력하세요.\" />";
|
|
|
|
|
tag +=" <span> </span><a onclick=\"fncDelVote(this);\"><img src=\"${URL_ROOT}/m/img/close_ico.png\" style=\"height: 20px; width: 20px;\"></a>";
|
|
|
|
|
tag +=" </li>";
|
|
|
|
|
$("#nutrition_kinds_basic3").append(tag);
|
|
|
|
|
}
|
|
|
|
|
function fncDelVote(obj) {
|
|
|
|
|
$(obj.parentNode).remove();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<!-- 하단 네비 iyu_nav -->
|
|
|
|
|
<#include "/m/include/index_bottom_menu.ftl">
|
|
|
|
|