118 lines
3.3 KiB
PHP
Executable File
118 lines
3.3 KiB
PHP
Executable File
<!--<script src="/js/ckeditor/ckeditor.js"></script>-->
|
|
<form name="input_form" id="input_form" action="/m/mypage/qna_add_proc" method="post">
|
|
<div class="mypage_top mypage_top_fixed">
|
|
<div class="mypage_logo"><a href="/m"><img src="/img/mobile/logo_cm.jpg" alt="logo"></a>
|
|
</div>
|
|
<div class="mypage_title" style="width:200px;"><a href="/m/mypage/qna">마이페이지</a>
|
|
</div>
|
|
<div class="mypage_menu"><img src="/img/mobile/menu_list.gif" alt="menu"></a>
|
|
</div>
|
|
</div>
|
|
<ul class="mypage_header mypage_header_fixed">
|
|
<li class="header_tit2"><strong>1:1문의</strong> </li>
|
|
</ul>
|
|
<div class="mypage_cont">
|
|
<div class="qna_w">
|
|
<ul class="tit">
|
|
<li><input type="text" placeholder="제목을 입력해주세요." name="title" id="title"></li>
|
|
<li class="capt"><span id="title_count">0</span>/60byte (한글 30자) <i class="xi-lock"></i></li>
|
|
</ul>
|
|
<div class="qna_wbox">
|
|
<textarea name="content" id="ir1" style="width:720px; height:450px;" /></textarea>
|
|
</div>
|
|
<div style="text-align:center; margin:20px 2%; overflow:hidden;">
|
|
<span class="fl"><a href="" class="btn btn-default_bb br10" style="padding:5px 20px; font-size:16px;"><img src="/img/mobile/img_x.gif" style="padding-right:5px;">취소 </a></span>
|
|
<span class="fr"><a onclick="qna_add_proc()" class="btn btn-default_bb br10" style="padding:5px 20px; font-size:16px; margin-left:5px;"><img src="/img/mobile/img_check2.gif" style="padding-right:5px;">등록</a></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<style>
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
var oEditors = [];
|
|
var oEditors2 = [];
|
|
$(function(){
|
|
nhn.husky.EZCreator.createInIFrame({
|
|
oAppRef: oEditors,
|
|
elPlaceHolder: "ir1",
|
|
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
|
htParams : {
|
|
bUseToolbar : true,
|
|
bUseVerticalResizer : true,
|
|
bUseModeChanger : true,
|
|
fOnBeforeUnload : function(){
|
|
}
|
|
},
|
|
fOnAppLoad : function(){
|
|
},
|
|
fCreator: "createSEditor2"
|
|
});
|
|
|
|
nhn.husky.EZCreator.createInIFrame({
|
|
oAppRef: oEditors2,
|
|
elPlaceHolder: "ir2",
|
|
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
|
htParams : {
|
|
bUseToolbar : true,
|
|
bUseVerticalResizer : true,
|
|
bUseModeChanger : true,
|
|
fOnBeforeUnload : function(){
|
|
}
|
|
},
|
|
fOnAppLoad : function(){
|
|
},
|
|
fCreator: "createSEditor2"
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
// CKEDITOR.replace( 'ir1' );
|
|
// CKEDITOR.config.height = 200;
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
$('#title').on('keyup', function(event) {
|
|
var len = $(this).val().length;
|
|
if (len >= 60) {
|
|
$(this).val($(this).val().substring(0, 60));
|
|
len = 60;
|
|
}
|
|
$("#title_count").html(len);
|
|
});
|
|
|
|
function qna_add_proc(){
|
|
|
|
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
|
if($("#title").val()=="") {
|
|
alert("제목을 입력해주세요.");
|
|
return false;
|
|
}
|
|
/*
|
|
if($("#content").val()=="") {
|
|
alert("내용을 입력해주세요.");
|
|
return false;
|
|
}
|
|
*/
|
|
if($("#ir1").val()=='' || $("#ir1").val()=='null' || $("#ir1").val()==' ' || $("#ir1").val()=='<p> </p>') {
|
|
alert("내용을 입력해주세요.");
|
|
oEditors.getById["ir1"].exec("focus");
|
|
return false;
|
|
}
|
|
|
|
$("#input_form").submit();
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|