88 lines
2.5 KiB
Plaintext
88 lines
2.5 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!doctype html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<%@ include file="/WEB-INF/include/include-header3.jspf" %>
|
|
<style type="text/css">
|
|
.col-sm-3 {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-right: 15px;
|
|
padding-left: 15px;
|
|
padding-top: 15px;
|
|
padding-bottom: 15px;
|
|
}
|
|
</style>
|
|
|
|
<meta name="theme-color" content="#7952b3">
|
|
<title>wall info</title>
|
|
</head>
|
|
|
|
<body>
|
|
<form name="frm">
|
|
<input type="hidden" id="img_type" name="img_type" value="<c:out value="${param.IMG_TYPE}" />">
|
|
</form>
|
|
<div class="container-fluid">
|
|
<div id="button-nav">
|
|
<div id="fit" class="row">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$('#button-nav').on('click','button', function (evt) {
|
|
var arr = this.value.split("%");
|
|
opener.setImage($("#img_type").val(), arr[0],arr[1],arr[2],arr[3]);
|
|
self.close();
|
|
});
|
|
|
|
$(function() {
|
|
getData();
|
|
})
|
|
|
|
function getData(){
|
|
var queryString = $("form[name=frm]").serialize() ;
|
|
$.ajax({
|
|
url:"<c:url value='/getImages'/>",
|
|
data : queryString,
|
|
type:"post",
|
|
datatype:"json",
|
|
success:function(args){
|
|
var innerhtml = "";
|
|
for(var i=0; i<args.list.length; i++){
|
|
var val = args.list[i].IMG_ID + "%" + args.list[i].IMG_NM + "%" + args.list[i].IMG_FILE_NM + "%" + args.list[i].IMG_PATH;
|
|
//var val = args.list[i].IMG_ID;
|
|
innerhtml = innerhtml + "<div class='col-sm-3'><div class='card'><div class='card-body'>";
|
|
var img_type = $("#img_type").val();
|
|
if(img_type == "C") {
|
|
innerhtml = innerhtml + "<img id='ci_img' src='/" + args.list[i].IMG_PATH + args.list[i].IMG_FILE_NM + "' class='img-thumbnail' style='height: 8vh; width:80%;'>";
|
|
}else if(img_type == "B") {
|
|
innerhtml = innerhtml + "<img id='ci_img' src='/" + args.list[i].IMG_PATH + args.list[i].IMG_FILE_NM + "' class='img-thumbnail' style='height: 30vh; width:100%;'>";
|
|
}
|
|
innerhtml = innerhtml + "</div>";
|
|
innerhtml = innerhtml + "<div class='card-footer' style='text-align:right;'><button type='button' id='btnSelect' class='btn btn-outline-success btn-sm' value='"+val+"'>선택</button></div>";
|
|
innerhtml = innerhtml + "</div></div></div>";
|
|
}
|
|
$('#fit').append(innerhtml);
|
|
|
|
/*
|
|
IMG_FILE_NM: "AJ_Park.png"
|
|
IMG_ID: "IM001"
|
|
IMG_NM: "AJ파크 CI"
|
|
IMG_PATH: "images/ci/"
|
|
*/
|
|
|
|
},
|
|
error : function(x,o,e){
|
|
var msg = "에러발생 \n" + x.status + " : " + o + " : " + e;
|
|
alert(msg);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|