|
|
|
@ -29,18 +29,18 @@
|
|
|
|
|
|
|
|
|
|
<!-- main_nutrition -->
|
|
|
|
|
<main class="main_nutrition">
|
|
|
|
|
<!-- nutrition_header_child -->
|
|
|
|
|
<div class="nutrition_header_child">
|
|
|
|
|
<div class="nutrition_header_child_top">
|
|
|
|
|
<p class="proimg"><img src="<#if model['rm_child']['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${model['rm_child']['append_300_img_file']!}<#else>${URL_STATIC_ROOT}/m/img/main/main_profile_img02.png</#if>" alt="프로필 사진" /></p>
|
|
|
|
|
<p class="info"><span class="name">${model['rm_child']['name']!}</span><span class="age">${(model['rm_child']['m']?number/12)!}세 ${(model['rm_child']['m']?number%12)!}개월 (${model['rm_child']['gender_ko']!})</span></p>
|
|
|
|
|
<p class="cal"><span class="date">${model['rm']['reg_day']!}</span><span id="nowtime">${model['rm']['reg_time']!}</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- p class="nutrition_header_child_allergy"><span class="tit">알러지</span><span class="txt">땅콩, 우유, 두유, 땅콩, 우유, 두유, 땅콩, 우유, 두유, 땅콩, 우유, 두유, </span></p -->
|
|
|
|
|
<!-- nutrition_header_child -->
|
|
|
|
|
<div class="nutrition_header_child">
|
|
|
|
|
<div class="nutrition_header_child_top">
|
|
|
|
|
<p class="proimg"><img src="<#if model['rm_child']['append_300_img_file']?exists>${URL_ROOT}/file/get_img.do?mt_file_seq=${model['rm_child']['append_300_img_file']!}<#else>${URL_STATIC_ROOT}/m/img/main/main_profile_img02.png</#if>" alt="프로필 사진" /></p>
|
|
|
|
|
<p class="info"><span class="name">${model['rm_child']['name']!}</span><span class="age">${(model['rm_child']['m']?number/12)!}세 ${(model['rm_child']['m']?number%12)!}개월 (${model['rm_child']['gender_ko']!})</span></p>
|
|
|
|
|
<p class="cal"><span class="date">${model['rm']['reg_day']!}</span><span id="nowtime">${model['rm']['reg_time']!}</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //nutrition_header_child -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //nutrition_header_child -->
|
|
|
|
|
|
|
|
|
|
<!-- nutrition_camera -->
|
|
|
|
|
<!-- nutrition_camera -->
|
|
|
|
|
<!--
|
|
|
|
|
<div class="nutrition_camera">
|
|
|
|
|
<div class="nutrition_camera_box">
|
|
|
|
|
<div id="img_preview" class="img_preview">
|
|
|
|
@ -49,8 +49,52 @@
|
|
|
|
|
<input type="file" id="img" name="append_src_img_file">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
-->
|
|
|
|
|
<!-- //nutrition_camera -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="nutrition_camera">
|
|
|
|
|
<div class="take_time w_div">
|
|
|
|
|
<div class="img_wrap add_pic_list_wrap">
|
|
|
|
|
<#assign pick_img_index = 0>
|
|
|
|
|
<#if model['lm_img_lst']?has_content>
|
|
|
|
|
<#assign pick_img_index = model['lm_img_lst']?size>
|
|
|
|
|
<div class="add_pic_list_box">
|
|
|
|
|
<#list model['lm_img_lst'] as item_img>
|
|
|
|
|
<div class="add_pic_list_item">
|
|
|
|
|
<div class="input_file_upload">
|
|
|
|
|
<input type="hidden" id="mt_file_seq_${item_img?counter}" name="mt_file_seq" value="${item_img['mt_file_seq']!}" class="form-control ">
|
|
|
|
|
<div id="add_thumb" class="add_thumb">
|
|
|
|
|
<img src="${URL_ROOT}/file/get.do?mt_file_seq=${item_img['mt_file_seq']!}" alt="사진추가하기">
|
|
|
|
|
</div>
|
|
|
|
|
<button type="button" id="" class="ibtn_x off" style="display:inline">삭제</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</#list>
|
|
|
|
|
</div>
|
|
|
|
|
<#else>
|
|
|
|
|
<!--이미지 추가-->
|
|
|
|
|
<div class="add_pic_list_box">
|
|
|
|
|
<div class="add_pic_list_item">
|
|
|
|
|
<div class="input_file_upload">
|
|
|
|
|
<input type="file" id="append_src_img_file_0" name="append_src_img_file_0" accept="image/*;capture=camera" class="upfile"> <button type="button" class="btn_upfile"></button>
|
|
|
|
|
<div id="add_thumb" class="add_thumb">
|
|
|
|
|
<img src="${URL_STATIC_ROOT}/m/img/community/upload_img.jpg" alt="사진추가하기">
|
|
|
|
|
</div>
|
|
|
|
|
<button type="button" id="" class="ibtn_x off">삭제</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<#assign pick_img_index = pick_img_index+1>
|
|
|
|
|
</#if>
|
|
|
|
|
<button type="button" id="add_pic_btn" name="" class="add_pic_btn" onclick="javascript:add_pick_file();">
|
|
|
|
|
사진 추가하기 버튼 <span></span> <span></span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="set_list_wrap" style="display:none">
|
|
|
|
|
<#list model['music_list'] as item>
|
|
|
|
|
<div class="list_item item_order">
|
|
|
|
@ -66,7 +110,91 @@
|
|
|
|
|
</div>
|
|
|
|
|
<audio src="/m/" controls id="audio_control" style="width: 100%; display:none"></audio>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
var pick_img_index = "${pick_img_index!'0'}";
|
|
|
|
|
function add_pick_file(){
|
|
|
|
|
if($(".add_pic_list_item").length > 3) {
|
|
|
|
|
Swal.fire({text: '이미지는 3개 까지만 가능합니다.'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var add_pic_tags = '<div class="add_pic_list_item">' +
|
|
|
|
|
'<div class="input_file_upload">' +
|
|
|
|
|
'<input type="file" id="append_src_img_file_' + pick_img_index + '" name="append_src_img_file_' + pick_img_index + '" accept="image/*;capture=camera" class="upfile">' +
|
|
|
|
|
'<button type="button" class="btn_upfile"></button>' +
|
|
|
|
|
'<div id="add_thumb" class="add_thumb">' +
|
|
|
|
|
'<img src="${URL_STATIC_ROOT}/m/img/community/upload_img.jpg" alt="사진추가하기">' +
|
|
|
|
|
'</div>'+
|
|
|
|
|
'<button type="button" id="" class="ibtn_x off">삭제</button> ' +
|
|
|
|
|
'</div>' +
|
|
|
|
|
'</div>';
|
|
|
|
|
|
|
|
|
|
$(".add_pic_list_box").append(add_pic_tags);
|
|
|
|
|
$('#pick_img_index').val(++pick_img_index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 클래스 추가 삭제시
|
|
|
|
|
$(".li_check>li").click(function(e) {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
|
|
|
|
|
if (!$(this).hasClass("active")) {
|
|
|
|
|
$(this).siblings().removeClass("active");
|
|
|
|
|
$(this).addClass("active");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/*********사진 추가*********/
|
|
|
|
|
$(function() {
|
|
|
|
|
// File Upload + Preview
|
|
|
|
|
$(document).on('click', '.input_file_upload .btn_upfile', function(){
|
|
|
|
|
$(this).siblings('.upfile').trigger('click');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(document).on('click', '.input_file_upload .ibtn_x', function(){
|
|
|
|
|
$(this).parent().parent().remove();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(document).on('change', ".input_file_upload input[type=file]", function(){
|
|
|
|
|
var file = $(this)[0].files[0];
|
|
|
|
|
//console.log(file.name + "\n" + file.type + "\n" + file.size + "\n" + file.lastModifiedDate); // upfile var
|
|
|
|
|
if ($(this).hasClass('file_mypage')) {
|
|
|
|
|
$(this).talkImage(file, '.add_thumb');
|
|
|
|
|
}else{
|
|
|
|
|
$(this).displayImage(file, '.add_thumb');
|
|
|
|
|
} $(this).siblings('.add_thumb').removeClass('off').siblings('.ibtn_x').removeClass('off');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.fn.extend({
|
|
|
|
|
// Upload preview Function
|
|
|
|
|
displayImage : function(file, classname) {
|
|
|
|
|
if (typeof FileReader !== "undefined") {
|
|
|
|
|
// var container = document.getElementsByClassName(classname),
|
|
|
|
|
// img = document.createElement("img"),
|
|
|
|
|
// reader;
|
|
|
|
|
|
|
|
|
|
$(this).siblings(classname).find('img').remove();
|
|
|
|
|
|
|
|
|
|
var container = $(this).siblings(classname),
|
|
|
|
|
img = document.createElement("img"),
|
|
|
|
|
reader;
|
|
|
|
|
img.setAttribute('width', '100%'),
|
|
|
|
|
img.setAttribute('height', '100%'),
|
|
|
|
|
|
|
|
|
|
container.append(img);
|
|
|
|
|
reader = new FileReader();
|
|
|
|
|
reader.onload = (function (theImg) {
|
|
|
|
|
return function (evt) {
|
|
|
|
|
theImg.src = evt.target.result;
|
|
|
|
|
};
|
|
|
|
|
}(img));
|
|
|
|
|
reader.readAsDataURL(file);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var music_idx = 0;
|
|
|
|
|
$("#audio_control").attr("src", $("input[name='music_list']").eq(0).val());
|
|
|
|
|
function fncMusicPlay() {
|
|
|
|
@ -139,7 +267,7 @@
|
|
|
|
|
changeCSS('.nutrition_list_reason li.active', 'color','${model['rm']['color']!}');
|
|
|
|
|
|
|
|
|
|
changeCSS('.search_pre_input a.active','background', '${model['rm']['color']!}');
|
|
|
|
|
changeCSS('.stop_ok_div button.active','background', '${model['rm']['color']!}');
|
|
|
|
|
changeCSS('.stop_ok_div button.active','background', '${model['rm']['color']!}');
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|