대체문자 타입별 화면 수정

This commit is contained in:
hehihoho3@gmail.com 2025-08-06 09:50:59 +09:00
parent d1e1244cd5
commit 5639c5e910

View File

@ -166,6 +166,7 @@ $(document).ready(function (){
$('#sendFailImg').hide();
$('#sendFailImgSrc').attr('src', '');
$('#atchFileId').val('');
thisFnByteString($('#smsTxtArea').val());
}
@ -180,6 +181,19 @@ $(document).ready(function (){
//자주보내는 번호
resultBookMarkMsgList();
// 대체문자 초기화
$('#failCheckInit').on('click', function(){
console.log('::failCheckInit::');
$('#smsTxtArea').val('');
thisFnByteString('');
});
});
function imageInit(){
@ -649,6 +663,11 @@ function getTemplateImagUrl(){
// 대체문자
$('#sendFailImg').show();
$('#sendFailImgSrc').attr('src', returnData.object.imgUrl);
// 대체문자 포토형으로 수정
// $('.put_left').removeClass("short"); //내용 입력 박스 클래스 삭제
// $('.put_left').removeClass("long"); //내용 입력 박스 클래스 삭제
// $('.put_left').addClass('photo');
setSendFailTemplate('P')
}
} else {
@ -679,6 +698,25 @@ function getTemplateImagUrl(){
$("#imgFile").val("");
}
function setSendFailTemplate(p_type){
if(p_type == 'P'){
// 대체문자 포토형으로 수정
$('.put_left').removeClass("short"); //내용 입력 박스 클래스 삭제
$('.put_left').removeClass("long"); //내용 입력 박스 클래스 삭제
$('.put_left').addClass('photo');
$('.msg_com').removeClass("msg_short"); //단문 클래스 삭제하고
$('.msg_com').removeClass("msg_long"); //단문 클래스 삭제하고
$('.msg_com').addClass("msg_photo"); //단문 클래스 삭제하고
$('#limitLeng').html("2000");
$('.msg_com').html("그림");
}
}
function fnImageDel(){
if(confirm("등록된 이미지를 삭제하시겠습니까?")){
@ -1447,31 +1485,40 @@ function thisFnByteString(contents){
//문자 길이 변수에 저장해주기
// $('#smsLen').val(conLeng);
var imgType = $('#sendFailImgSrc').attr('src');
if(conLeng > 90){
if(imgType != null && "" != imgType){
setSendFailTemplate('P')
}
else if(conLeng > 90){
$('#msgLeng').html(conLeng + " / ");
$('#limitLeng').html("2000");
$('.msg_com').html("장문");
$('#msgType').val("6"); // 메세지 타입 설정
$('.msg_com').removeClass("msg_short"); //단문 클래스 삭제하고
$('.put_left').removeClass("short"); //내용 입력 박스 클래스 삭제
$('.put_left').removeClass("photo"); //내용 입력 박스 클래스 삭제
$('.msg_com').addClass("msg_long"); // 장문 클래스 삽입
$("#subMsgType").val("LMS");
}else{
$('#msgLeng').html(conLeng + " / ");
$('#limitLeng').html("90");
$('.msg_com').html("단문");
$('#msgType').val("4"); // 메세지 타입 설정
$('.msg_com').removeClass("msg_long"); //단문 클래스 삭제하고
$('.put_left').removeClass("long"); //내용 입력 박스 클래스 삭제
$('.put_left').removeClass("photo"); //내용 입력 박스 클래스 삭제
$('.msg_com').addClass("msg_short"); // 장문 클래스 삽입
$("#subMsgType").val("SMS");
}
$('#msgLeng').html(conLeng + " / ");
totalFtPriceSum(tableL.getRows().length);
}