전후사진 디자인 수정 및 기능 정상화
This commit is contained in:
@@ -39,18 +39,18 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/selectListWebPhotoDietIntro.do")
|
||||
public String selectListWebPhotoDietIntro(HttpSession session, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
@RequestMapping(value = "/webphotodiet/selectListWebPhotoDietIntro.do")
|
||||
public String selectListWebPhotoDietIntro(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response, Model model) {
|
||||
log.debug("WebPhotoDietController selectListWebPhotoDietIntro START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return "/web/login/logout";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.selectListWebPhotoDietIntro(paramMap);
|
||||
|
||||
@@ -60,8 +60,7 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
model.addAttribute("deleteUseYn", map.get("deleteUseYn"));
|
||||
model.addAttribute("downloadUseYn", map.get("downloadUseYn"));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "/web/login/logout";
|
||||
}
|
||||
@@ -76,35 +75,32 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/selectListWebPhotoDiet.do")
|
||||
public ModelAndView selectListWebPhotoDiet(HttpSession session, HttpServletRequest request, HttpServletResponse response) {
|
||||
@RequestMapping(value = "/webphotodiet/selectListWebPhotoDiet.do")
|
||||
public ModelAndView selectListWebPhotoDiet(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
log.debug("WebPhotoDietController selectListWebPhotoDiet START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.selectListWebPhotoDiet(paramMap);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,35 +115,32 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/selectWebPhotoDiet.do")
|
||||
public ModelAndView selectWebPhotoDiet(HttpSession session,HttpServletRequest request, HttpServletResponse response) {
|
||||
@RequestMapping(value = "/webphotodiet/selectWebPhotoDiet.do")
|
||||
public ModelAndView selectWebPhotoDiet(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
log.debug("WebPhotoDietController selectWebPhotoDiet START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.selectWebPhotoDiet(paramMap);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,6 +148,44 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
return HttpUtil.makeHashToJsonModelAndView(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 카테고리 목록 조회
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/webphotodiet/getCategoryList.do")
|
||||
public ModelAndView getCategoryList(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
} else {
|
||||
map = webPhotoDietService.getCategoryList(paramMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
log.debug("WebPhotoDietController getCategoryList END");
|
||||
return HttpUtil.makeHashToJsonModelAndView(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 홈페이지 전후사진(다이어트) 상세 이미지 파일 저장
|
||||
*
|
||||
@@ -162,8 +193,9 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/uploadFile.do")
|
||||
public ModelAndView uploadFile(HttpSession session,HttpServletRequest request, HttpServletResponse response,@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||
@RequestMapping(value = "/webphotodiet/uploadFile.do")
|
||||
public ModelAndView uploadFile(HttpSession session, HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||
log.debug("WebPhotoDietController uploadFile START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
@@ -171,30 +203,26 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
|
||||
StringBuffer errorMsg = new StringBuffer();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("regId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("modId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.uploadFile(paramMap,file);
|
||||
map = webPhotoDietService.uploadFile(paramMap, file);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
errorMsg.append(e);
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,18 +238,17 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
insertMap.put("requestValue", String.valueOf(paramMap));
|
||||
insertMap.put("responseValue", String.valueOf(map));
|
||||
insertMap.put("tId", map.get("tId"));
|
||||
if((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null) || String.valueOf(errorMsg).length() == 0){
|
||||
if ((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null)
|
||||
|| String.valueOf(errorMsg).length() == 0) {
|
||||
insertMap.put("resultCode", "SUCCESS");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
insertMap.put("resultCode", "ERROR");
|
||||
}
|
||||
insertMap.put("resultMsg", String.valueOf(errorMsg));
|
||||
insertMap.put("muMemberId", paramMap.get("loginMemberId"));
|
||||
|
||||
webLogHistoryService.insertLogHistory(insertMap, visitLogParamMap);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -236,18 +263,18 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/insertWebPhotoDietIntro.do")
|
||||
public String insertWebPhotoDietIntro(HttpSession session, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
@RequestMapping(value = "/webphotodiet/insertWebPhotoDietIntro.do")
|
||||
public String insertWebPhotoDietIntro(HttpSession session, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
log.debug("WebPhotoDietController insertWebPhotoDietIntro START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return "/web/login/logout";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.insertWebPhotoDietIntro(paramMap);
|
||||
|
||||
@@ -258,8 +285,7 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
model.addAttribute("downloadUseYn", map.get("downloadUseYn"));
|
||||
model.addAttribute("categorylist", map.get("categorylist"));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "/web/login/logout";
|
||||
}
|
||||
@@ -274,8 +300,9 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/insertWebPhotoDiet.do")
|
||||
public ModelAndView insertWebPhotoDiet(HttpSession session, HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestMapping(value = "/webphotodiet/insertWebPhotoDiet.do")
|
||||
public ModelAndView insertWebPhotoDiet(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@RequestParam(value = "beforeFile", required = false) MultipartFile beforeFile,
|
||||
@RequestParam(value = "afterFile", required = false) MultipartFile afterFile) {
|
||||
log.debug("WebPhotoDietController insertWebPhotoDiet START");
|
||||
@@ -285,33 +312,29 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
|
||||
StringBuffer errorMsg = new StringBuffer();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("regId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("modId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
List<MultipartFile> files = new ArrayList<>();
|
||||
files.add(beforeFile);
|
||||
files.add(afterFile);
|
||||
map = ((WebPhotoDietService)webPhotoDietService).insertWebPhotoDiet(paramMap, files);
|
||||
map = ((WebPhotoDietService) webPhotoDietService).insertWebPhotoDiet(paramMap, files);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
errorMsg.append(e);
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,18 +350,17 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
insertMap.put("requestValue", String.valueOf(paramMap));
|
||||
insertMap.put("responseValue", String.valueOf(map));
|
||||
insertMap.put("tId", map.get("tId"));
|
||||
if((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null) || String.valueOf(errorMsg).length() == 0){
|
||||
if ((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null)
|
||||
|| String.valueOf(errorMsg).length() == 0) {
|
||||
insertMap.put("resultCode", "SUCCESS");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
insertMap.put("resultCode", "ERROR");
|
||||
}
|
||||
insertMap.put("resultMsg", String.valueOf(errorMsg));
|
||||
insertMap.put("muMemberId", paramMap.get("loginMemberId"));
|
||||
|
||||
webLogHistoryService.insertLogHistory(insertMap, visitLogParamMap);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -353,18 +375,18 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/updateWebPhotoDietIntro.do")
|
||||
public String updateWebPhotoDietIntro(HttpSession session, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
@RequestMapping(value = "/webphotodiet/updateWebPhotoDietIntro.do")
|
||||
public String updateWebPhotoDietIntro(HttpSession session, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
log.debug("WebPhotoDietController updateWebPhotoDietIntro START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return "/web/login/logout";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.updateWebPhotoDietIntro(paramMap);
|
||||
|
||||
@@ -375,8 +397,7 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
model.addAttribute("downloadUseYn", map.get("downloadUseYn"));
|
||||
model.addAttribute("categorylist", map.get("categorylist"));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "/web/login/logout";
|
||||
}
|
||||
@@ -391,8 +412,9 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/updateWebPhotoDiet.do")
|
||||
public ModelAndView updateWebPhotoDiet(HttpSession session, HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestMapping(value = "/webphotodiet/updateWebPhotoDiet.do")
|
||||
public ModelAndView updateWebPhotoDiet(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@RequestParam(value = "beforeFile", required = false) MultipartFile beforeFile,
|
||||
@RequestParam(value = "afterFile", required = false) MultipartFile afterFile) {
|
||||
log.debug("WebPhotoDietController updateWebPhotoDiet START");
|
||||
@@ -402,11 +424,10 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
|
||||
StringBuffer errorMsg = new StringBuffer();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("regId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("modId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
@@ -415,20 +436,17 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
files.add(afterFile);
|
||||
map = webPhotoDietService.updateWebPhotoDiet(paramMap, files);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
errorMsg.append(e);
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,18 +462,17 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
insertMap.put("requestValue", String.valueOf(paramMap));
|
||||
insertMap.put("responseValue", String.valueOf(map));
|
||||
insertMap.put("tId", map.get("tId"));
|
||||
if((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null) || String.valueOf(errorMsg).length() == 0){
|
||||
if ((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null)
|
||||
|| String.valueOf(errorMsg).length() == 0) {
|
||||
insertMap.put("resultCode", "SUCCESS");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
insertMap.put("resultCode", "ERROR");
|
||||
}
|
||||
insertMap.put("resultMsg", String.valueOf(errorMsg));
|
||||
insertMap.put("muMemberId", paramMap.get("loginMemberId"));
|
||||
|
||||
webLogHistoryService.insertLogHistory(insertMap, visitLogParamMap);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -463,7 +480,6 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
return HttpUtil.makeHashToJsonModelAndView(map);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 홈페이지 전후사진(다이어트) 정보 삭제
|
||||
*
|
||||
@@ -471,8 +487,9 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/webphotodiet/deleteWebPhotoDiet.do")
|
||||
public ModelAndView deleteWebPhotoDiet(HttpSession session,HttpServletRequest request, HttpServletResponse response) {
|
||||
@RequestMapping(value = "/webphotodiet/deleteWebPhotoDiet.do")
|
||||
public ModelAndView deleteWebPhotoDiet(HttpSession session, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
log.debug("WebPhotoDietController deleteWebPhotoDiet START");
|
||||
|
||||
HashMap<String, Object> paramMap = HttpUtil.getParameterMap(request);
|
||||
@@ -480,30 +497,26 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
|
||||
StringBuffer errorMsg = new StringBuffer();
|
||||
|
||||
try{
|
||||
if(!webCheckLogin(session)){
|
||||
try {
|
||||
if (!webCheckLogin(session)) {
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
paramMap.put("loginMemberId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("regId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
paramMap.put("modId", String.valueOf(session.getAttribute("loginMemberId")));
|
||||
map = webPhotoDietService.deleteWebPhotoDiet(paramMap);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
errorMsg.append(e);
|
||||
}
|
||||
finally {
|
||||
if(Constants.OK == map.get("msgCode")) {
|
||||
} finally {
|
||||
if (Constants.OK == map.get("msgCode")) {
|
||||
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
map.put("msgCode", Constants.FAIL);
|
||||
map.put("success", false);
|
||||
if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) {
|
||||
map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,18 +532,17 @@ public class WebPhotoDietController extends ManagerDraftAction {
|
||||
insertMap.put("requestValue", String.valueOf(paramMap));
|
||||
insertMap.put("responseValue", String.valueOf(map));
|
||||
insertMap.put("tId", map.get("tId"));
|
||||
if((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null) || String.valueOf(errorMsg).length() == 0){
|
||||
if ((String.valueOf(errorMsg)).equals("") || (String.valueOf(errorMsg) == null)
|
||||
|| String.valueOf(errorMsg).length() == 0) {
|
||||
insertMap.put("resultCode", "SUCCESS");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
insertMap.put("resultCode", "ERROR");
|
||||
}
|
||||
insertMap.put("resultMsg", String.valueOf(errorMsg));
|
||||
insertMap.put("muMemberId", paramMap.get("loginMemberId"));
|
||||
|
||||
webLogHistoryService.insertLogHistory(insertMap, visitLogParamMap);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,24 @@ import java.util.List;
|
||||
|
||||
public interface WebPhotoDietService {
|
||||
public HashMap<String, Object> selectListWebPhotoDietIntro(HashMap<String, Object> paramMap) throws Exception;
|
||||
|
||||
public HashMap<String, Object> selectListWebPhotoDiet(HashMap<String, Object> paramMap) throws Exception;
|
||||
|
||||
public HashMap<String, Object> selectWebPhotoDiet(HashMap<String, Object> paramMap) throws Exception;
|
||||
|
||||
public HashMap<String, Object> uploadFile(HashMap<String, Object> paramMap, MultipartFile file) throws Exception;
|
||||
|
||||
public HashMap<String, Object> insertWebPhotoDietIntro(HashMap<String, Object> paramMap) throws Exception;
|
||||
public HashMap<String, Object> insertWebPhotoDiet(HashMap<String, Object> paramMap, List<MultipartFile> file) throws Exception;
|
||||
|
||||
public HashMap<String, Object> insertWebPhotoDiet(HashMap<String, Object> paramMap, List<MultipartFile> file)
|
||||
throws Exception;
|
||||
|
||||
public HashMap<String, Object> updateWebPhotoDietIntro(HashMap<String, Object> paramMap) throws Exception;
|
||||
public HashMap<String, Object> updateWebPhotoDiet(HashMap<String, Object> paramMap, List<MultipartFile> file) throws Exception;
|
||||
|
||||
public HashMap<String, Object> updateWebPhotoDiet(HashMap<String, Object> paramMap, List<MultipartFile> file)
|
||||
throws Exception;
|
||||
|
||||
public HashMap<String, Object> deleteWebPhotoDiet(HashMap<String, Object> paramMap) throws Exception;
|
||||
|
||||
public HashMap<String, Object> getCategoryList(HashMap<String, Object> paramMap) throws Exception;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -245,7 +245,7 @@
|
||||
,HC.CATEGORY_NM AS "categoryNm"
|
||||
FROM HP_CATEGORY AS HC
|
||||
WHERE HC.USE_YN = 'Y'
|
||||
AND HC.CATEGORY_DIV_CD = '05'
|
||||
AND HC.CATEGORY_DIV_CD = #{categoryDivCd}
|
||||
ORDER BY HC.CATEGORY_NO ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,107 +1,584 @@
|
||||
.project_wrap {width:100%; min-width:1080px; margin:0 auto;}
|
||||
.project_wrap {
|
||||
width: 100%;
|
||||
min-width: 1080px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/*오른쪽영역*/
|
||||
.project_wrap .content_section {margin-top:50px; width:100%; min-width:1080px; display:table;}
|
||||
.project_wrap .content_section .hospital_wrap {width: calc(100% - 72px); min-width:calc(1080px - 72px); height:calc(100vh - 50px); float:left; position:relative;}
|
||||
.project_wrap .content_section {
|
||||
margin-top: 50px;
|
||||
width: 100%;
|
||||
min-width: 1080px;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap {
|
||||
width: calc(100% - 72px);
|
||||
min-width: calc(1080px - 72px);
|
||||
height: calc(100vh - 50px);
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
/* 왼쪽_메뉴 영역 */
|
||||
.project_wrap .content_section .hospital_wrap .left_box {position:absolute; width:240px; height:calc(100vh - 50px); overflow:auto; padding:10px 20px;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list {width:100%;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu {width:100%; height:auto; margin:20px 0 10px 0; padding:0; font-size:14px; font-weight:700;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu.first {margin-top:0;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a {width:100%; height:100%; display:block; margin-bottom:8px; padding:8px; font-size:14px; text-align:left; border-radius:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a.on {background:#3985EA; border:none;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li {width:100%; height:36px; margin-bottom:8px;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a.on {color:#fff;}
|
||||
.project_wrap .content_section .hospital_wrap .left_box {
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
height: calc(100vh - 50px);
|
||||
overflow: auto;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 20px 0 10px 0;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu.first {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
padding: 8px;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list a.on {
|
||||
background: #3985EA;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a.on {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 센터쪽 */
|
||||
.project_wrap .content_section .hospital_wrap .center_box {width:calc(100% - 240px); height:calc(100vh - 50px); position:absolute; left:240px; padding:10px 10px 10px 0;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_title {min-width:90px; padding-left:10px; font-size:18px; font-weight:700; line-height:50px; float:left;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box {display:table; width:100%; padding:20px 0;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {width:140px; height:36px; margin-left:10px; border:1px solid #E9ECF0; border-radius:5px; background:url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { width:100px; margin-left:0; float:left; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .slash {width:6px; font-size:14px; font-weight:400; color:#000; line-height:36px; margin:0 12px; display:block; float:left;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list_box { margin-left:10px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.active {z-index:10;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label {width:100%; height:100%; padding:0 10px; outline:none; font-size:14px; font-weight:400; text-align:left; color: #494E53; cursor:pointer; background:none;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list {min-width:100%; border-radius:5px; transition:.4s ease-in; border:Solid 1px #E9ECF0; padding:10px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item {width:100%; line-height:30px; transition:.1s; position:relative; display:table; font-size:14px; color:#494E53;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item label {width:100%; line-height:30px; margin-bottom:0px; clear:both; font-weight:400;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box {border-radius:8px; float:left; position:relative;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box {position:relative; width:140px; height:36px; float:left; margin-left:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box.last {margin-left:0;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img {position:absolute; top:50%; transform:translateY(-50%); left:10px; z-index:1; width:22px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {line-height:34px; display:block; margin-right:20px; width:100%; font-size:14px; padding:0 12px; padding-left:40px; outline:none; border:1px solid #E9ECF0; border-radius:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box input[type="date"]::-webkit-calendar-picker-indicator {display:none;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {-webkit-appearance:none; -moz-appearance:none; appearance:none; position:absolute; cursor:pointer;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash {color:#000; font-size:14px; font-weight:400; line-height:36px; margin:0 5px; width:6px; display:block; float:left;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list {float:left; position:relative; margin-left:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box {width:150px; float:left; height:36px; position:relative;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img {position:absolute; top:50%; transform:translateY(-50%); left:5px; z-index:1;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input {width:100%; height:36px; border:1px solid #E9ECF0; border-radius:5px; background:none; position:absolute; left:0; padding:0 10px 0 30px; font-size:14px; background:#fff;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input::placeholder {color:#B5BDC4;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box .search_list {position:absolute; top:40px; left:0; width:150px; background:#fff; color:#fff; border-radius:5px; transition:.4s ease-in; z-index:1; border:solid 1px #E9ECF0; display:none; margin:0; padding:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_btn {background:#3985EA; border-radius:5px; color:#fff; margin-left:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box {float:right;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentdiet_btn {background:#3985EA; color:#fff; border-radius:5px; float:left;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentdiet_btn img {position:relative; top:-2px; width:20px; margin-right:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn {background:#FF2222; color:#fff; border-radius:5px; margin-left:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn img {position:relative; top:-2px; width:20px; margin-right:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box {
|
||||
width: calc(100% - 240px);
|
||||
height: calc(100vh - 50px);
|
||||
position: absolute;
|
||||
left: 240px;
|
||||
padding: 10px 10px 10px 0;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_title {
|
||||
min-width: 90px;
|
||||
padding-left: 10px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box {
|
||||
display: table;
|
||||
width: 100%;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {
|
||||
width: 140px;
|
||||
height: 36px;
|
||||
margin-left: 10px;
|
||||
border: 1px solid #E9ECF0;
|
||||
border-radius: 5px;
|
||||
background: url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first {
|
||||
width: 100px;
|
||||
margin-left: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .slash {
|
||||
width: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
line-height: 36px;
|
||||
margin: 0 12px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list_box {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.active {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
outline: none;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
color: #494E53;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list {
|
||||
min-width: 100%;
|
||||
border-radius: 5px;
|
||||
transition: .4s ease-in;
|
||||
border: Solid 1px #E9ECF0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item {
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
transition: .1s;
|
||||
position: relative;
|
||||
display: table;
|
||||
font-size: 14px;
|
||||
color: #494E53;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item label {
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
margin-bottom: 0px;
|
||||
clear: both;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box {
|
||||
border-radius: 8px;
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box {
|
||||
position: relative;
|
||||
width: 140px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box.last {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 10px;
|
||||
z-index: 1;
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {
|
||||
line-height: 34px;
|
||||
display: block;
|
||||
margin-right: 20px;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
padding: 0 12px;
|
||||
padding-left: 40px;
|
||||
outline: none;
|
||||
border: 1px solid #E9ECF0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box input[type="date"]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 36px;
|
||||
margin: 0 5px;
|
||||
width: 6px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list {
|
||||
float: left;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box {
|
||||
width: 150px;
|
||||
float: left;
|
||||
height: 36px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 5px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
border: 1px solid #E9ECF0;
|
||||
border-radius: 5px;
|
||||
background: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 0 10px 0 30px;
|
||||
font-size: 14px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input::placeholder {
|
||||
color: #B5BDC4;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box .search_list {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
transition: .4s ease-in;
|
||||
z-index: 1;
|
||||
border: solid 1px #E9ECF0;
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_btn {
|
||||
background: #3985EA;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentdiet_btn {
|
||||
background: #3985EA;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .treatmentdiet_btn img {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
width: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn {
|
||||
background: #FF2222;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .right_btn_box .delete_btn img {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
width: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* table_box */
|
||||
.project_wrap .content_section .hospital_wrap .center_box .table_box {width:100%; height:calc(100% - 180px); overflow:auto; background:#fff; border:solid 1px #E9ECF0; border-radius:5px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .table_box {
|
||||
width: 100%;
|
||||
height: calc(100% - 180px);
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
border: solid 1px #E9ECF0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* 페이지게이션 */
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box {position:absolute; bottom:20px; width:100%; height:24px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation {height:24px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination {margin:0 auto; display:table;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li {display:inline-block; padding:0}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a, .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a {position:relative; width:24px; height:24px; background:none;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a:hover, .project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a:hover {background:none;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img {position:absolute; top:50%; left:50%; transform:translate3d(-50%, -50%, 0); width:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img {position:absolute; top:50%; left:50%; transform:translate3d(-50%, -50%, 0) rotate(180deg); width:10px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a {width:24px; height:24px; padding:0; border:none; text-align:center; line-height:22px; font-size:14px; font-weight:500; background:#FFF; font-size:14px;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a:hover, .project_wrap .content_section .hospital_wrap .center_box .right_note .page_box .navigation .pagination li a:focus {background:#3985EA; color:#fff; font-weight:700;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li.active a {background:#3985EA; color:#fff;}
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination {
|
||||
margin: 0 auto;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li {
|
||||
display: inline-block;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a,
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a {
|
||||
position: relative;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a:hover,
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0) rotate(180deg);
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background: #FFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a:hover,
|
||||
.project_wrap .content_section .hospital_wrap .center_box .right_note .page_box .navigation .pagination li a:focus {
|
||||
background: #3985EA;
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li.active a {
|
||||
background: #3985EA;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Style for select boxes in the search area */
|
||||
.search_box select {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #E9ECF0;
|
||||
border-radius: 5px;
|
||||
background: #fff url('/image/web/select_arrow.svg') no-repeat right 10px center;
|
||||
background-size: 12px;
|
||||
/* Adjust as needed */
|
||||
appearance: none;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.search_box select:focus,
|
||||
.search_box select:hover {
|
||||
border-color: #3985EA;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/*반응형 View*/
|
||||
@media only screen and (max-width:1500px) {
|
||||
.project_wrap .content_section .hospital_wrap .left_box { width:160px; padding:10px 15px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box { width:calc(100% - 160px); left:160px; }
|
||||
.project_wrap .content_section .hospital_wrap .left_box {
|
||||
width: 160px;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box {
|
||||
width: calc(100% - 160px);
|
||||
left: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1280px) {
|
||||
.project_wrap .content_section .hospital_wrap { width:calc(100% - 60px); }
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu { font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li { height:32px; margin-bottom:5px; }
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a { font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_title { min-width:80px; height:40px; font-size:16px; line-height:40px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .total { font-size:12px; line-height:40px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box { padding:15px 0; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box { width:120px; height:32px; background-size:18px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label { padding:0 10px; font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item { font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box { width:120px; height:32px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img { width:20px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker { height:32px; padding-left:35px; font-size:12px; line-height:32px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash { line-height:32px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box { width:120px; height:32px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img { width:22px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input { height:32px; padding-left:35px; font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn { margin-left:5px; padding-left:10px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn p { display:none; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn img { width:12px; margin-top:-3px; position:static; transform:none; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box { height:23px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation { height:23px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a { width:23px; height:23px; font-size:12px; }
|
||||
.project_wrap .content_section .hospital_wrap {
|
||||
width: calc(100% - 60px);
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list .title_menu {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li {
|
||||
height: 32px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .left_box .sub_menu_list li a {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_title {
|
||||
min-width: 80px;
|
||||
height: 40px;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .total {
|
||||
font-size: 12px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
background-size: 18px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .label {
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box .select_option_list .option_list_item {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box img {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .date_box .date_picker {
|
||||
height: 32px;
|
||||
padding-left: 35px;
|
||||
font-size: 12px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .calendar_box .slash {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box img {
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list .search_box input {
|
||||
height: 32px;
|
||||
padding-left: 35px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn {
|
||||
margin-left: 5px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn p {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .filter_box .right_btn_box .download_btn img {
|
||||
width: 12px;
|
||||
margin-top: -3px;
|
||||
position: static;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box {
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation {
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li a {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a,
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a { width:23px; height:23px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:first-child a img,
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img { width:9px; }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .table_box { height:calc(100% - 155px); }
|
||||
.project_wrap .content_section .hospital_wrap .center_box .page_box .navigation .pagination li:last-child a img {
|
||||
width: 9px;
|
||||
}
|
||||
|
||||
.project_wrap .content_section .hospital_wrap .center_box .table_box {
|
||||
height: calc(100% - 155px);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1080px) {
|
||||
.project_wrap .content_section .hospital_wrap { width:calc(100% - 50px); }
|
||||
.project_wrap .content_section .hospital_wrap {
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* 전후사진 등록
|
||||
****************************************************************************/
|
||||
function fn_insertWebPhoto(){
|
||||
if("Y"!=insertUseYn){
|
||||
function fn_insertWebPhoto() {
|
||||
if ("Y" != insertUseYn) {
|
||||
modalEvent.warning("", "등록 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -15,33 +15,33 @@ function fn_insertWebPhoto(){
|
||||
let beforeFile = $("#before_file")[0].files[0];
|
||||
let afterFile = $("#after_file")[0].files[0];
|
||||
|
||||
if(true != fn_emptyCheck(categoryno)) {
|
||||
if (true != fn_emptyCheck(categoryno)) {
|
||||
modalEvent.warning("등록", "카테고리를 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(title)) {
|
||||
if (true != fn_emptyCheck(title)) {
|
||||
modalEvent.warning("등록", "제목을 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(content)) {
|
||||
if (true != fn_emptyCheck(content)) {
|
||||
modalEvent.warning("등록", "내용을 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(hashtag)) {
|
||||
if (true != fn_emptyCheck(hashtag)) {
|
||||
modalEvent.warning("등록", "해시태그를 입력하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(true != fn_emptyCheck(beforeFile)) {
|
||||
if (true != fn_emptyCheck(beforeFile)) {
|
||||
modalEvent.warning("등록", "Before 사진을 첨부하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(afterFile)) {
|
||||
if (true != fn_emptyCheck(afterFile)) {
|
||||
modalEvent.warning("등록", "After 사진을 첨부하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
modalEvent.info("등록", "전후사진(다이어트) 정보를 등록하시겠습니까?", function(){
|
||||
modalEvent.info("등록", "전후사진(다이어트) 정보를 등록하시겠습니까?", function () {
|
||||
let formData = new FormData();
|
||||
formData.append("menuClass", menuClass);
|
||||
formData.append("categoryno", categoryno);
|
||||
@@ -59,103 +59,38 @@ function fn_insertWebPhoto(){
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
modalEvent.success("등록 성공", data.msgDesc, function(){
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
modalEvent.success("등록 성공", data.msgDesc, function () {
|
||||
fn_selectListWebPhotoDietIntro();
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
modalEvent.danger("등록 오류", data.msgDesc);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
modalEvent.danger("등록 오류", "등록 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
},
|
||||
beforeSend:function(){
|
||||
|
||||
},
|
||||
complete:function(){
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* html 에디터 이미지 업로드시
|
||||
****************************************************************************/
|
||||
function uploadSummernoteImageFileNoticeInsert(files, editor){
|
||||
Object.values(files).forEach(file => {
|
||||
let formData = new FormData();
|
||||
formData.append('menuClass', menuClass);
|
||||
formData.append('file', file);
|
||||
$.ajax({
|
||||
url: encodeURI('/webphotodiet/uploadFile.do'),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
$(editor).summernote('insertImage', data.rows.filePath, function ($image) {
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
modalEvent.danger('오류', '이미지 업로드 중 오류가 발생했습니다.');
|
||||
},
|
||||
beforeSend: function () {
|
||||
// 로딩열기
|
||||
$(".loading-image-layer").show();
|
||||
|
||||
},
|
||||
complete: function () {
|
||||
// 로딩닫기
|
||||
$(".loading-image-layer").hide();
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 배너 이미지 미리보기
|
||||
****************************************************************************/
|
||||
function fn_filePreview(){
|
||||
const file = $("#file")[0].files[0];
|
||||
if(file){
|
||||
$('.img_box').html('');
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
// 이미지 요소를 생성하고 미리보기 추가
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.style.width = '600px'; // 원하는 크기로 조정
|
||||
img.style.height = '350px';
|
||||
$('.img_box').append(img);
|
||||
};
|
||||
|
||||
// 파일을 읽기 시작
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
/****************************************************************************
|
||||
* 배너 이미지 삭제
|
||||
****************************************************************************/
|
||||
function fn_removePreview(){
|
||||
$("#file").val('');
|
||||
$('.img_box').html('');
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* 배너 이미지 미리보기
|
||||
****************************************************************************/
|
||||
function fn_beforeFilePreview(){
|
||||
function fn_beforeFilePreview() {
|
||||
const file = $("#before_file")[0].files[0];
|
||||
if(file){
|
||||
if (file) {
|
||||
$('#before_img_box').html('');
|
||||
const reader = new FileReader();
|
||||
|
||||
@@ -163,8 +98,10 @@ function fn_beforeFilePreview(){
|
||||
// 이미지 요소를 생성하고 미리보기 추가
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.style.width = '600px'; // 원하는 크기로 조정
|
||||
img.style.height = '350px';
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.style.display = 'block';
|
||||
$('#before_img_box').append(img);
|
||||
};
|
||||
|
||||
@@ -175,16 +112,16 @@ function fn_beforeFilePreview(){
|
||||
/****************************************************************************
|
||||
* 배너 이미지 삭제
|
||||
****************************************************************************/
|
||||
function fn_removeBeforePreview(){
|
||||
function fn_removeBeforePreview() {
|
||||
$("#before_file").val('');
|
||||
$('#before_img_box').html('');
|
||||
}
|
||||
/****************************************************************************
|
||||
* 배너 이미지 미리보기
|
||||
****************************************************************************/
|
||||
function fn_afterFilePreview(){
|
||||
function fn_afterFilePreview() {
|
||||
const file = $("#after_file")[0].files[0];
|
||||
if(file){
|
||||
if (file) {
|
||||
$('#after_img_box').html('');
|
||||
const reader = new FileReader();
|
||||
|
||||
@@ -192,8 +129,10 @@ function fn_afterFilePreview(){
|
||||
// 이미지 요소를 생성하고 미리보기 추가
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.style.width = '600px'; // 원하는 크기로 조정
|
||||
img.style.height = '350px';
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.style.display = 'block';
|
||||
$('#after_img_box').append(img);
|
||||
};
|
||||
|
||||
@@ -204,7 +143,7 @@ function fn_afterFilePreview(){
|
||||
/****************************************************************************
|
||||
* 배너 이미지 삭제
|
||||
****************************************************************************/
|
||||
function fn_removeAfterPreview(){
|
||||
function fn_removeAfterPreview() {
|
||||
$("#after_file").val('');
|
||||
$('#after_img_box').html('');
|
||||
}
|
||||
@@ -212,11 +151,11 @@ function fn_removeAfterPreview(){
|
||||
/****************************************************************************
|
||||
* 리스트 화면으로 이동.
|
||||
****************************************************************************/
|
||||
function fn_selectListWebPhotoDietIntro(){
|
||||
if("Y"==selectUseYn){
|
||||
let pagingParam = "?menuClass="+menuClass;
|
||||
fn_leftFormAction("/webphotodiet/selectListWebPhotoDietIntro.do"+pagingParam);
|
||||
}else{
|
||||
function fn_selectListWebPhotoDietIntro() {
|
||||
if ("Y" == selectUseYn) {
|
||||
let pagingParam = "?menuClass=" + menuClass;
|
||||
fn_leftFormAction("/webphotodiet/selectListWebPhotoDietIntro.do" + pagingParam);
|
||||
} else {
|
||||
modalEvent.warning("", "조회 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -225,48 +164,33 @@ function fn_selectListWebPhotoDietIntro(){
|
||||
/****************************************************************************
|
||||
* 페이지 init
|
||||
****************************************************************************/
|
||||
function fn_pageInit(){
|
||||
function fn_pageInit() {
|
||||
// 날짜 datepicker
|
||||
fn_searchDatePicker("#eventStartDate", "#eventEndDate");
|
||||
|
||||
$('#summernote').summernote({
|
||||
height: 540,
|
||||
callbacks: { //여기 부분이 이미지를 첨부하는 부분
|
||||
onImageUpload : function(files) {
|
||||
uploadSummernoteImageFileNoticeInsert(files, this);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 페이지 event
|
||||
****************************************************************************/
|
||||
function fn_pagePhoto(){
|
||||
function fn_pagePhoto() {
|
||||
// 검색 input
|
||||
$('.btnCancle').on("click", function(){
|
||||
$('.btnCancle').on("click", function () {
|
||||
fn_selectListWebPhotoDietIntro();
|
||||
});
|
||||
|
||||
$('.btnSave').on("click", function(){
|
||||
$('.btnSave').on("click", function () {
|
||||
fn_insertWebPhoto();
|
||||
});
|
||||
$('#delete_btn').on("click", function(){
|
||||
fn_removePreview();
|
||||
});
|
||||
$('#file').on('change', function(e) {
|
||||
fn_filePreview();
|
||||
})
|
||||
$('#before_delete_btn').on("click", function(){
|
||||
$('#before_delete_btn').on("click", function () {
|
||||
fn_removeBeforePreview();
|
||||
});
|
||||
$('#before_file').on('change', function(e) {
|
||||
$('#before_file').on('change', function (e) {
|
||||
fn_beforeFilePreview();
|
||||
});
|
||||
$('#after_delete_btn').on("click", function(){
|
||||
$('#after_delete_btn').on("click", function () {
|
||||
fn_removeAfterPreview();
|
||||
});
|
||||
$('#after_file').on('change', function(e) {
|
||||
$('#after_file').on('change', function (e) {
|
||||
fn_afterFilePreview();
|
||||
});
|
||||
}
|
||||
@@ -274,34 +198,34 @@ function fn_pagePhoto(){
|
||||
/****************************************************************************
|
||||
* 시술 목록 팝업
|
||||
****************************************************************************/
|
||||
function listOpen(){
|
||||
function listOpen() {
|
||||
let reqParam = {};
|
||||
photoSelectModal.popup(function (obj, reqParam) {
|
||||
const childDivCount = $("#photolist > div").length;
|
||||
if($("#" + obj.photoProcedureId).length > 0){
|
||||
if ($("#" + obj.photoProcedureId).length > 0) {
|
||||
modalEvent.warning("", "이미 시술정보가 있습니다.");
|
||||
return;
|
||||
}
|
||||
var htmlstring = `<div id="photo`+childDivCount+`">
|
||||
<input type="checkbox" id="`+obj.photoProcedureId+`" name="photo">
|
||||
<input type="hidden" name="photoprocedurelist" value="`+obj.photoProcedureId+`">
|
||||
<input type="hidden" name="photolist" value="`+obj.photoId+`">
|
||||
<label for="`+obj.photoProcedureId+`">`+obj.photoNm + `-` + obj.price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + `-` + obj.discountPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") +`</label>
|
||||
var htmlstring = `<div id="photo` + childDivCount + `">
|
||||
<input type="checkbox" id="`+ obj.photoProcedureId + `" name="photo">
|
||||
<input type="hidden" name="photoprocedurelist" value="`+ obj.photoProcedureId + `">
|
||||
<input type="hidden" name="photolist" value="`+ obj.photoId + `">
|
||||
<label for="`+ obj.photoProcedureId + `">` + obj.photoNm + `-` + obj.price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + `-` + obj.discountPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + `</label>
|
||||
</div>`;
|
||||
$('#photolist').append(htmlstring);
|
||||
}, reqParam);
|
||||
}
|
||||
function fn_removeRow(){
|
||||
$('input:checkbox[name="photo"]').each(function() {
|
||||
if(this.checked){//checked 처리된 항목의 값
|
||||
$(this).parent().remove();
|
||||
}
|
||||
function fn_removeRow() {
|
||||
$('input:checkbox[name="photo"]').each(function () {
|
||||
if (this.checked) {//checked 처리된 항목의 값
|
||||
$(this).parent().remove();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
$(function () {
|
||||
// 페이지 init
|
||||
fn_pageInit();
|
||||
|
||||
|
||||
@@ -8,193 +8,12 @@ let webPhotoDietAgGridData = [];
|
||||
let webPhotoDietSelectId = "";
|
||||
let webPhotoDietSelectCategoryNo = "";
|
||||
|
||||
/****************************************************************************
|
||||
* 검색 날짜 설정
|
||||
//(A:오늘, B:3일, C:7일, D:최근30일, E:최근90일, F:이번달, G:올해, H:지난주, I:지난달)
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietSetDate(param){
|
||||
if("A"==param){
|
||||
// 오늘
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchStartDate = year+'-'+month+'-'+day;
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
}
|
||||
else if("B"==param){
|
||||
// 3일
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
toDate.setDate(toDate.getDate() - 3);
|
||||
year = toDate.getFullYear();
|
||||
month = toDate.getMonth() + 1;
|
||||
day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchStartDate = year+'-'+month+'-'+day;
|
||||
}
|
||||
else if("C"==param){
|
||||
// 이번주
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
toDate.setDate(toDate.getDate() - 7);
|
||||
year = toDate.getFullYear();
|
||||
month = toDate.getMonth() + 1;
|
||||
day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchStartDate = year+'-'+month+'-'+day;
|
||||
}
|
||||
else if("D"==param){
|
||||
// 최근30일
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
//최근30일
|
||||
toDate.setDate(toDate.getDate() - 30);
|
||||
startYear = toDate.getFullYear();
|
||||
startMonth = toDate.getMonth() + 1;
|
||||
startDay = toDate.getDate();
|
||||
|
||||
if(startMonth < 10) startMonth = "0" + startMonth;
|
||||
if(startDay < 10) startDay = "0" + startDay;
|
||||
|
||||
webPhotoDietSearchStartDate = startYear+'-'+startMonth+'-'+startDay;
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
}
|
||||
else if("E"==param){
|
||||
// 최근90일
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
toDate.setDate(toDate.getDate() - 90);
|
||||
year = toDate.getFullYear();
|
||||
month = toDate.getMonth() + 1;
|
||||
day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchStartDate = year+'-'+month+'-'+day;
|
||||
}
|
||||
else if("F"==param){
|
||||
//F:이번달
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
webPhotoDietSearchStartDate = year+'-'+month+'-01';
|
||||
}
|
||||
else if("G"==param){
|
||||
// G:올해
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
webPhotoDietSearchStartDate = year+'-01-01';
|
||||
}
|
||||
else if("H"==param){
|
||||
// H:지난주, I:지난달
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
webPhotoDietSearchStartDate = year+'-01-01';
|
||||
}
|
||||
else if("I"==param){
|
||||
// I:지난달
|
||||
// 검색 종료일자
|
||||
let toDate = new Date();
|
||||
let year = toDate.getFullYear();
|
||||
let month = toDate.getMonth() + 1;
|
||||
let day = toDate.getDate();
|
||||
|
||||
if(month < 10) month = "0" + month;
|
||||
if(day < 10) day = "0" + day;
|
||||
|
||||
webPhotoDietSearchEndDate = year+'-'+month+'-'+day;
|
||||
|
||||
// 검색 시작일자
|
||||
webPhotoDietSearchStartDate = year+'-01-01';
|
||||
}
|
||||
|
||||
$("#webPhotoDietSearchStartDate").val(webPhotoDietSearchStartDate).trigger("change");
|
||||
$("#webPhotoDietSearchEndDate").val(webPhotoDietSearchEndDate).trigger("change");
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* 전후 사진(다이어트) 정보 리스트 조회
|
||||
****************************************************************************/
|
||||
function fn_selectListWebPhotoDietJson(){
|
||||
function fn_selectListWebPhotoDietJson() {
|
||||
let formData = new FormData();
|
||||
formData.append("menuClass", menuClass);
|
||||
formData.append("webPhotoDietSearchKeywordParam0", webPhotoDietSearchKeywordParam0);
|
||||
@@ -217,29 +36,29 @@ function fn_selectListWebPhotoDietJson(){
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
// 페이징 처리
|
||||
webPhotoDietTotalCount = data.totalCount;
|
||||
//$("#txt_noticeTotalCount").text(noticeTotalCount);
|
||||
|
||||
webPhotoDietTotalPages = Math.ceil(webPhotoDietTotalCount/webPhotoDietLimit);
|
||||
webPhotoDietTotalPages = Math.ceil(webPhotoDietTotalCount / webPhotoDietLimit);
|
||||
|
||||
// 리스트 조회
|
||||
webPhotoDietAgGridData = data.rows;
|
||||
webPhotoDietGridOptions.api.setRowData(webPhotoDietAgGridData);
|
||||
|
||||
if(0<data.rows.length){
|
||||
if (0 < data.rows.length) {
|
||||
//페이징 처리
|
||||
window.pagObj = $('#webPhotoDietPagination').twbsPagination({
|
||||
startPage : ((webPhotoDietStart/webPhotoDietLimit)+1),
|
||||
totalPages : (webPhotoDietTotalPages==0)?1:webPhotoDietTotalPages,
|
||||
visiblePages : 10,
|
||||
startPage: ((webPhotoDietStart / webPhotoDietLimit) + 1),
|
||||
totalPages: (webPhotoDietTotalPages == 0) ? 1 : webPhotoDietTotalPages,
|
||||
visiblePages: 10,
|
||||
initiateStartPageClick: false,
|
||||
prev : '<img src="/image/web/page_navigation_arrow.svg" alt="prev"/>',
|
||||
next : '<img src="/image/web/page_navigation_arrow.svg" alt="next"/>',
|
||||
first : '',
|
||||
last : '',
|
||||
prev: '<img src="/image/web/page_navigation_arrow.svg" alt="prev"/>',
|
||||
next: '<img src="/image/web/page_navigation_arrow.svg" alt="next"/>',
|
||||
first: '',
|
||||
last: '',
|
||||
onPageClick: function (photodiet, page) {
|
||||
fn_webPhotoDietPagination(page);
|
||||
}
|
||||
@@ -247,22 +66,22 @@ function fn_selectListWebPhotoDietJson(){
|
||||
//console.info(page + ' (from photodiet listening)');
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
modalEvent.danger("조회 오류", data.msgDesc);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
},
|
||||
beforeSend:function(){
|
||||
beforeSend: function () {
|
||||
// 로딩열기
|
||||
webPhotoDietGridOptions.api.showLoadingOverlay();
|
||||
},
|
||||
complete:function(){
|
||||
complete: function () {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -271,8 +90,8 @@ function fn_selectListWebPhotoDietJson(){
|
||||
/****************************************************************************
|
||||
* 검색하기
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietSearch(param){
|
||||
if("A"!=param && "Y"!=selectUseYn){
|
||||
function fn_webPhotoDietSearch(param) {
|
||||
if ("A" != param && "Y" != selectUseYn) {
|
||||
modalEvent.warning("", "조회 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -281,7 +100,7 @@ function fn_webPhotoDietSearch(param){
|
||||
|
||||
webPhotoDietSearchKeywordParam0 = $("#webPhotoDietSearchKeyword0").val();
|
||||
webPhotoDietSearchKeywordParam1 = $("#webPhotoDietSearchKeyword1").val();
|
||||
webPhotoDietSearchKeywordParam2 = $("#webPhotoDietSearchKeyword2").val();
|
||||
webPhotoDietSearchKeywordParam2 = ""; // 작성자 검색 제거
|
||||
webPhotoDietSearchKeywordParam3 = $("#webPhotoDietSearchKeywordParam3").val();
|
||||
|
||||
webPhotoDietSearchDateType = $("#webPhotoDietSearchDateType").val();
|
||||
@@ -295,10 +114,7 @@ function fn_webPhotoDietSearch(param){
|
||||
/****************************************************************************
|
||||
* 초기화하기
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietReset(){
|
||||
fn_webPhotoDietSetDate('D');
|
||||
$("#webPhotoDietSearchDateType option:eq(0)").prop("selected", true);
|
||||
|
||||
function fn_webPhotoDietReset() {
|
||||
$("#webPhotoDietSearchKeyword0").val("");
|
||||
$("#webPhotoDietSearchKeyword1").val("");
|
||||
$("#webPhotoDietSearchKeyword2").val("");
|
||||
@@ -310,8 +126,8 @@ function fn_webPhotoDietReset(){
|
||||
/****************************************************************************
|
||||
* 페이징 처리
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietPagination(param){
|
||||
webPhotoDietStart = (parseInt(param)-1)*webPhotoDietLimit;
|
||||
function fn_webPhotoDietPagination(param) {
|
||||
webPhotoDietStart = (parseInt(param) - 1) * webPhotoDietLimit;
|
||||
|
||||
fn_selectListWebPhotoDietJson();
|
||||
}
|
||||
@@ -319,7 +135,7 @@ function fn_webPhotoDietPagination(param){
|
||||
/****************************************************************************
|
||||
* 페이징 리셋
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietPaginReset(){
|
||||
function fn_webPhotoDietPaginReset() {
|
||||
webPhotoDietSearchKeywordParam0 = '';
|
||||
webPhotoDietSearchKeywordParam1 = '';
|
||||
webPhotoDietSearchKeywordParam2 = '';
|
||||
@@ -331,7 +147,7 @@ function fn_webPhotoDietPaginReset(){
|
||||
webPhotoDietTotalPages = 0;
|
||||
|
||||
//페이징 초기화
|
||||
if($("#webPhotoDietPagination").data("twbs-pagination")){
|
||||
if ($("#webPhotoDietPagination").data("twbs-pagination")) {
|
||||
$("#webPhotoDietPagination").twbsPagination("destroy");
|
||||
}
|
||||
}
|
||||
@@ -339,22 +155,22 @@ function fn_webPhotoDietPaginReset(){
|
||||
/****************************************************************************
|
||||
* 전후 사진(다이어트) 삭제
|
||||
****************************************************************************/
|
||||
function fn_deleteWebPhotoDiet(){
|
||||
if("Y"!=deleteUseYn){
|
||||
function fn_deleteWebPhotoDiet() {
|
||||
if ("Y" != deleteUseYn) {
|
||||
modalEvent.warning("", "삭제 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!webPhotoDietSelectId){
|
||||
if (!webPhotoDietSelectId) {
|
||||
modalEvent.warning("", "삭제할 대상을 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// categoryno 값 가져오기 (여러 개일 수 있음)
|
||||
let selectRows = webPhotoDietGridOptions.api.getSelectedRows();
|
||||
let categoryNos = selectRows.map(function(row) { return row.categoryno; }).join(",");
|
||||
let categoryNos = selectRows.map(function (row) { return row.categoryno; }).join(",");
|
||||
|
||||
modalEvent.info("삭제", "선택한 전후 사진(다이어트) 정보를 삭제하시겠습니까?", function(){
|
||||
modalEvent.info("삭제", "선택한 전후 사진(다이어트) 정보를 삭제하시겠습니까?", function () {
|
||||
let formData = new FormData();
|
||||
formData.append("menuClass", menuClass);
|
||||
formData.append("selectId", webPhotoDietSelectId);
|
||||
@@ -368,23 +184,23 @@ function fn_deleteWebPhotoDiet(){
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
modalEvent.success("삭제 성공", data.msgDesc, function(){
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
modalEvent.success("삭제 성공", data.msgDesc, function () {
|
||||
fn_webPhotoDietOk();
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
modalEvent.danger("삭제 오류", data.msgDesc);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
modalEvent.danger("삭제 오류", "삭제 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
},
|
||||
beforeSend:function(){
|
||||
beforeSend: function () {
|
||||
|
||||
},
|
||||
complete:function(){
|
||||
complete: function () {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -394,17 +210,17 @@ function fn_deleteWebPhotoDiet(){
|
||||
/****************************************************************************
|
||||
* 검색 엔터 전후 사진(다이어트)
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietEnter(e){
|
||||
if(e.which){
|
||||
function fn_webPhotoDietEnter(e) {
|
||||
if (e.which) {
|
||||
// 파이어폭스
|
||||
if(13 == e.which) {
|
||||
if (13 == e.which) {
|
||||
//로그인 액션 스크립트
|
||||
fn_webPhotoDietSearch();
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
// 윈도우, 사파리, 크롬
|
||||
if(13 == photodiet.keyCode) {
|
||||
if (13 == photodiet.keyCode) {
|
||||
//로그인 액션 스크립트
|
||||
fn_webPhotoDietSearch();
|
||||
}
|
||||
@@ -414,50 +230,41 @@ function fn_webPhotoDietEnter(e){
|
||||
/****************************************************************************
|
||||
* 정렬 전후 사진(다이어트)
|
||||
****************************************************************************/
|
||||
function fn_alignPhotoDiet(param, param2){
|
||||
function fn_alignPhotoDiet(param, param2) {
|
||||
let align = "";
|
||||
|
||||
if("A"==param){
|
||||
if ("A" == param) {
|
||||
align = "오늘";
|
||||
|
||||
fn_webPhotoDietSetDate('A');
|
||||
}
|
||||
else if("B"==param){
|
||||
else if ("B" == param) {
|
||||
align = "최근30일";
|
||||
|
||||
fn_webPhotoDietSetDate('D');
|
||||
}
|
||||
else if("C"==param){
|
||||
else if ("C" == param) {
|
||||
align = "최근90일";
|
||||
|
||||
fn_webPhotoDietSetDate('E');
|
||||
}
|
||||
else if("D"==param){
|
||||
else if ("D" == param) {
|
||||
align = "이번주";
|
||||
|
||||
fn_webPhotoDietSetDate('C');
|
||||
}
|
||||
else if("E"==param){
|
||||
else if ("E" == param) {
|
||||
align = "이번달";
|
||||
|
||||
fn_webPhotoDietSetDate('F');
|
||||
}
|
||||
else if("F"==param){
|
||||
else if ("F" == param) {
|
||||
align = "올해";
|
||||
|
||||
fn_webPhotoDietSetDate('G');
|
||||
}
|
||||
else if("G"==param){
|
||||
else if ("G" == param) {
|
||||
align = "지난주";
|
||||
|
||||
fn_webPhotoDietSetDate('H');
|
||||
}
|
||||
else if("H"==param){
|
||||
else if ("H" == param) {
|
||||
align = "지난달";
|
||||
|
||||
fn_webPhotoDietSetDate('I');
|
||||
}
|
||||
else{
|
||||
else {
|
||||
align = "";
|
||||
}
|
||||
$("#webPhotoDietSearchDateType").val(param);
|
||||
@@ -467,18 +274,18 @@ function fn_alignPhotoDiet(param, param2){
|
||||
/****************************************************************************
|
||||
* 완료
|
||||
****************************************************************************/
|
||||
function fn_webPhotoDietOk(){
|
||||
function fn_webPhotoDietOk() {
|
||||
fn_webPhotoDietReset();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 등록 화면으로 이동.
|
||||
****************************************************************************/
|
||||
function fn_insertWebPhotoDietIntro(){
|
||||
if("Y"==insertUseYn){
|
||||
let pagingParam = "?menuClass="+menuClass;
|
||||
fn_leftFormAction("/webphotodiet/insertWebPhotoDietIntro.do"+pagingParam);
|
||||
}else{
|
||||
function fn_insertWebPhotoDietIntro() {
|
||||
if ("Y" == insertUseYn) {
|
||||
let pagingParam = "?menuClass=" + menuClass;
|
||||
fn_leftFormAction("/webphotodiet/insertWebPhotoDietIntro.do" + pagingParam);
|
||||
} else {
|
||||
modalEvent.warning("", "등록 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -488,13 +295,13 @@ function fn_insertWebPhotoDietIntro(){
|
||||
/****************************************************************************
|
||||
* 수정 화면으로 이동.
|
||||
****************************************************************************/
|
||||
function fn_updateWebPhotoDietIntro(muWebPhotoDietId, categoryno){
|
||||
if("Y"==updateUseYn){
|
||||
let pagingParam = "?menuClass="+menuClass;
|
||||
pagingParam += "&muWebPhotoDietId="+muWebPhotoDietId;
|
||||
pagingParam += "&categoryno="+categoryno;
|
||||
fn_leftFormAction("/webphotodiet/updateWebPhotoDietIntro.do"+pagingParam);
|
||||
}else{
|
||||
function fn_updateWebPhotoDietIntro(muWebPhotoDietId, categoryno) {
|
||||
if ("Y" == updateUseYn) {
|
||||
let pagingParam = "?menuClass=" + menuClass;
|
||||
pagingParam += "&muWebPhotoDietId=" + muWebPhotoDietId;
|
||||
pagingParam += "&categoryno=" + categoryno;
|
||||
fn_leftFormAction("/webphotodiet/updateWebPhotoDietIntro.do" + pagingParam);
|
||||
} else {
|
||||
modalEvent.warning("", "수정 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -502,14 +309,14 @@ function fn_updateWebPhotoDietIntro(muWebPhotoDietId, categoryno){
|
||||
|
||||
|
||||
let webPhotoDietColumnDefs = [
|
||||
{field: "checkbox", headerName:"", minWidth:55, maxWidth:55, headerCheckboxSelection: true, checkboxSelection: true},
|
||||
{field: "rowNum", headerName:"번호", minWidth:60, maxWidth:60,sortable: false, cellStyle:{textAlign: 'center'}},
|
||||
{field: "category", headerName:"카테고리", minWidth:60},
|
||||
{field: "title", headerName:"제목", minWidth:150, cellStyle:{cursor: 'pointer', color:'#3985EA'}},
|
||||
{field: "content", headerName:"내용요약", minWidth:150},
|
||||
{field: "hashtag", headerName:"해시태그", minWidth:150},
|
||||
{field: "writeDate", headerName:"등록일",minWidth:100, maxWidth:150},
|
||||
{field: "writeName", headerName:"작성자",minWidth:100, maxWidth:150},
|
||||
{ field: "checkbox", headerName: "", minWidth: 55, maxWidth: 55, headerCheckboxSelection: true, checkboxSelection: true },
|
||||
{ field: "rowNum", headerName: "번호", minWidth: 60, maxWidth: 60, sortable: false, cellStyle: { textAlign: 'center' } },
|
||||
{ field: "category", headerName: "카테고리", minWidth: 60 },
|
||||
{ field: "title", headerName: "제목", minWidth: 150, cellStyle: { cursor: 'pointer', color: '#3985EA' } },
|
||||
{ field: "content", headerName: "내용요약", minWidth: 150 },
|
||||
{ field: "hashtag", headerName: "해시태그", minWidth: 150 },
|
||||
{ field: "writeDate", headerName: "등록일", minWidth: 100, maxWidth: 150 },
|
||||
{ field: "writeName", headerName: "작성자", minWidth: 100, maxWidth: 150 },
|
||||
];
|
||||
|
||||
// let the grid know which columns and what data to use
|
||||
@@ -521,60 +328,60 @@ let webPhotoDietGridOptions = {
|
||||
sortable: true, //정렬 여부
|
||||
resizable: true, //리사이즈
|
||||
editable: true, // 그리드에서 데이터 수정
|
||||
cellStyle:{textAlign:'left',fontSize:'14px',padding:'0'},
|
||||
cellStyle: { textAlign: 'left', fontSize: '14px', padding: '0' },
|
||||
//suppressSizeToFit:true, //자동 맞춤
|
||||
//enableRowGroup: true, // 그룹 묶음
|
||||
enablePivot: true,
|
||||
enableValue : true
|
||||
enableValue: true
|
||||
},
|
||||
//suppressMultiSort:true, //단일솔트 true가 단일, false가 다중 shift + sort 시
|
||||
headerHeight : 41, // header 높이
|
||||
rowHeight : 41, // row 높이
|
||||
rowData : webPhotoDietAgGridData,
|
||||
suppressRowClickSelection : true, // 로우 클릭시 체크박스 선택 true no, false yes
|
||||
localeText : {
|
||||
noRowsToShow : '조회 결과가 없습니다.'
|
||||
headerHeight: 41, // header 높이
|
||||
rowHeight: 41, // row 높이
|
||||
rowData: webPhotoDietAgGridData,
|
||||
suppressRowClickSelection: true, // 로우 클릭시 체크박스 선택 true no, false yes
|
||||
localeText: {
|
||||
noRowsToShow: '조회 결과가 없습니다.'
|
||||
}, //데이터 없을 시 나오는 문구
|
||||
rowSelection : 'multiple', // row 다중 선택
|
||||
debug : false,
|
||||
onCellClicked: function(photodiet){ //셀 클릭 전후 사진(다이어트)
|
||||
rowSelection: 'multiple', // row 다중 선택
|
||||
debug: false,
|
||||
onCellClicked: function (photodiet) { //셀 클릭 전후 사진(다이어트)
|
||||
/* alert(photodiet.column.colId); */
|
||||
if('title'==photodiet.column.colId){
|
||||
if ('title' == photodiet.column.colId) {
|
||||
fn_updateWebPhotoDietIntro(photodiet.data.muWebPhotoDietId, photodiet.data.categoryno);
|
||||
}
|
||||
},
|
||||
onSelectionChanged: function(photodiet){ //체크박스 선택
|
||||
onSelectionChanged: function (photodiet) { //체크박스 선택
|
||||
let selectRows = [];
|
||||
selectRows = photodiet.api.getSelectedRows();
|
||||
|
||||
webPhotoDietSelectId = '';
|
||||
for(let i=0; i<selectRows.length; i++){
|
||||
for (let i = 0; i < selectRows.length; i++) {
|
||||
webPhotoDietSelectId += selectRows[i].muWebPhotoDietId + ",";
|
||||
}
|
||||
webPhotoDietSelectId = webPhotoDietSelectId.substring(0, webPhotoDietSelectId.lastIndexOf(','));
|
||||
},
|
||||
onSortChanged: function(photodiet){
|
||||
onSortChanged: function (photodiet) {
|
||||
//정렬
|
||||
webPhotoDietSort = ''; //기존 정렬 초기화
|
||||
let columnArr = photodiet.columnApi.getColumnState();
|
||||
if(0<columnArr.length){
|
||||
if (0 < columnArr.length) {
|
||||
//sort index 순으로 재정렬
|
||||
columnArr.sort(function(a,b){
|
||||
columnArr.sort(function (a, b) {
|
||||
return a.sortIndex - b.sortIndex;
|
||||
});
|
||||
|
||||
let nullCnt = 0;
|
||||
for(let i=0; i<columnArr.length; i++){
|
||||
for (let i = 0; i < columnArr.length; i++) {
|
||||
let gridSortModel = columnArr[i].colId;
|
||||
let gridSort = columnArr[i].sort;
|
||||
|
||||
if(gridSort != null){
|
||||
if (gridSort != null) {
|
||||
webPhotoDietStart = 0;
|
||||
webPhotoDietSort += gridSortModel+' '+ gridSort + ',';
|
||||
webPhotoDietSort += gridSortModel + ' ' + gridSort + ',';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
nullCnt++;
|
||||
if(nullCnt == columnArr.length){
|
||||
if (nullCnt == columnArr.length) {
|
||||
webPhotoDietSort = '';
|
||||
webPhotoDietDir = '';
|
||||
webPhotoDietStart = 0;
|
||||
@@ -582,7 +389,7 @@ let webPhotoDietGridOptions = {
|
||||
}
|
||||
}
|
||||
}
|
||||
webPhotoDietSort = webPhotoDietSort.substring(0,webPhotoDietSort.lastIndexOf( ",")); //맨끝 콤마 지우기
|
||||
webPhotoDietSort = webPhotoDietSort.substring(0, webPhotoDietSort.lastIndexOf(",")); //맨끝 콤마 지우기
|
||||
|
||||
fn_webPhotoDietSearch();
|
||||
}
|
||||
@@ -601,14 +408,16 @@ new agGrid.Grid(webPhotoDietGridDiv, webPhotoDietGridOptions);
|
||||
/****************************************************************************
|
||||
* 페이지 init
|
||||
****************************************************************************/
|
||||
function fn_pageInit(){
|
||||
function fn_pageInit() {
|
||||
// 카테고리 목록 동적 로드
|
||||
fn_loadCategoryList();
|
||||
|
||||
// 날짜 datepicker
|
||||
fn_searchDatePicker("#divWebPhotoDietSearchStartDate", "#divWebPhotoDietSearchEndDate");
|
||||
|
||||
if(!webPhotoDietSearchStartDate&&!webPhotoDietSearchEndDate){
|
||||
if (!webPhotoDietSearchStartDate && !webPhotoDietSearchEndDate) {
|
||||
// 검색 오늘날짜 셋팅
|
||||
fn_webPhotoDietSetDate('D');
|
||||
}else{
|
||||
} else {
|
||||
$("#webPhotoDietSearchStartDate").val(webPhotoDietSearchStartDate).trigger("change");
|
||||
$("#webPhotoDietSearchEndDate").val(webPhotoDietSearchEndDate).trigger("change");
|
||||
}
|
||||
@@ -622,24 +431,49 @@ function fn_pageInit(){
|
||||
fn_webPhotoDietSearch("A");
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 카테고리 목록 동적 로드
|
||||
****************************************************************************/
|
||||
function fn_loadCategoryList() {
|
||||
let formData = new FormData();
|
||||
formData.append("categoryDivCd", categoryDivCd);
|
||||
|
||||
$.ajax({
|
||||
url: encodeURI('/webphotodiet/getCategoryList.do'),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
let optionList = $("#categoryOptionList");
|
||||
let rows = data.rows;
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
let li = $('<li class="option_list_item" id="li_' + rows[i].categoryNo + '">' + rows[i].categoryNm + '</li>');
|
||||
optionList.append(li);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error("카테고리 목록 조회 오류", error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 페이지 photodiet
|
||||
****************************************************************************/
|
||||
function fn_pagePhotoDiet(){
|
||||
function fn_pagePhotoDiet() {
|
||||
|
||||
// 검색 input
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword0', function(e) {
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword1', function (e) {
|
||||
fn_webPhotoDietEnter(e);
|
||||
});
|
||||
|
||||
// 검색 input
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword1', function(e) {
|
||||
fn_webPhotoDietEnter(e);
|
||||
});
|
||||
// 검색 input
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword2', function(e) {
|
||||
fn_webPhotoDietEnter(e);
|
||||
});
|
||||
// 검색 input
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword3', function(e) {
|
||||
$(document).on('keypress', '#webPhotoDietSearchKeyword3', function (e) {
|
||||
fn_webPhotoDietEnter(e);
|
||||
});
|
||||
|
||||
@@ -658,21 +492,18 @@ function fn_pagePhotoDiet(){
|
||||
fn_deleteWebPhotoDiet();
|
||||
});
|
||||
|
||||
// 기간 선택 콤보 전후 사진(다이어트)
|
||||
const target = $("#webPhotoDietSearchDateType").siblings("ul.select_option_list");
|
||||
target.find("li.option_list_item").click(function () {
|
||||
// 카테고리 선택 콤보
|
||||
$(document).on("click", "#categoryOptionList .option_list_item", function () {
|
||||
let selectIdArr = $(this).prop("id").split('_');
|
||||
let selectId = selectIdArr[1];
|
||||
let selectName = $(this).text();
|
||||
|
||||
$(this).parent().siblings("button").text(selectName);
|
||||
$(this).parent().siblings("input").val(selectId);
|
||||
|
||||
fn_alignPhotoDiet(selectId);
|
||||
$("#webPhotoDietSearchKeyword0").val(selectName === "전체" ? "" : selectName);
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(function () {
|
||||
// 페이지 init
|
||||
fn_pageInit();
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
// Before/After 이미지 파일 변경 상태
|
||||
let isBeforeFileModified = false;
|
||||
let isAfterFileModified = false;
|
||||
|
||||
/****************************************************************************
|
||||
* 전후사진 상세 조회
|
||||
****************************************************************************/
|
||||
function fn_selectWebPhotoDiet(){
|
||||
if(true != fn_emptyCheck(muWebPhotoDietId)) {
|
||||
function fn_selectWebPhotoDiet() {
|
||||
if (true != fn_emptyCheck(muWebPhotoDietId)) {
|
||||
modalEvent.warning("수정", "이벤트 정보가 없습니다.");
|
||||
return;
|
||||
}
|
||||
@@ -23,8 +20,8 @@ function fn_selectWebPhotoDiet(){
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
if (data.rows && data.rows.length > 0) {
|
||||
let photoData = data.rows[0];
|
||||
$("select[name=categorylist]").val(photoData.categoryno).prop("selected", true);
|
||||
@@ -32,11 +29,11 @@ function fn_selectWebPhotoDiet(){
|
||||
$("#content").val(photoData.content);
|
||||
$("#hashtag").val(photoData.hashtag);
|
||||
// Before/After 이미지 미리보기
|
||||
if(photoData.beforefile) {
|
||||
$('#before_img_box').html('<img src="'+CDN_URL+photoData.beforefile+'" style="width:600px;height:350px;">');
|
||||
if (photoData.beforefile) {
|
||||
$('#before_img_box').html('<img src="' + CDN_URL + photoData.beforefile + '" style="width: 100%; height: 100%; object-fit: cover; display: block;">');
|
||||
}
|
||||
if(photoData.afterfile) {
|
||||
$('#after_img_box').html('<img src="'+CDN_URL+photoData.afterfile+'" style="width:600px;height:350px;">');
|
||||
if (photoData.afterfile) {
|
||||
$('#after_img_box').html('<img src="' + CDN_URL + photoData.afterfile + '" style="width: 100%; height: 100%; object-fit: cover; display: block;">');
|
||||
}
|
||||
} else {
|
||||
modalEvent.warning("수정", "조회된 전후사진 데이터가 없습니다.");
|
||||
@@ -45,7 +42,7 @@ function fn_selectWebPhotoDiet(){
|
||||
alert("수정 오류: " + data.msgDesc);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
alert("수정 오류: 수정 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
}
|
||||
});
|
||||
@@ -54,8 +51,8 @@ function fn_selectWebPhotoDiet(){
|
||||
/****************************************************************************
|
||||
* 전후사진 수정
|
||||
****************************************************************************/
|
||||
function fn_updateWebPhotoDiet(){
|
||||
if("Y"!=updateUseYn){
|
||||
function fn_updateWebPhotoDiet() {
|
||||
if ("Y" != updateUseYn) {
|
||||
modalEvent.warning("", "수정 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -66,43 +63,43 @@ function fn_updateWebPhotoDiet(){
|
||||
let beforeFile = $("#before_file")[0].files[0];
|
||||
let afterFile = $("#after_file")[0].files[0];
|
||||
|
||||
if(true != fn_emptyCheck(categoryNo)) {
|
||||
if (true != fn_emptyCheck(categoryNo)) {
|
||||
modalEvent.warning("수정", "카테고리를 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(title)) {
|
||||
if (true != fn_emptyCheck(title)) {
|
||||
modalEvent.warning("수정", "제목을 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(content)) {
|
||||
if (true != fn_emptyCheck(content)) {
|
||||
modalEvent.warning("수정", "내용을 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(true != fn_emptyCheck(hashtag)) {
|
||||
if (true != fn_emptyCheck(hashtag)) {
|
||||
modalEvent.warning("수정", "해시태그를 입력하세요.");
|
||||
return;
|
||||
}
|
||||
if(!beforeFile && $("#before_img_box img").length === 0) {
|
||||
if (!beforeFile && $("#before_img_box img").length === 0) {
|
||||
modalEvent.warning("수정", "Before 사진을 첨부하세요.");
|
||||
return;
|
||||
}
|
||||
if(!afterFile && $("#after_img_box img").length === 0) {
|
||||
if (!afterFile && $("#after_img_box img").length === 0) {
|
||||
modalEvent.warning("수정", "After 사진을 첨부하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
modalEvent.info("수정", "전후사진(다이어트) 정보를 수정하시겠습니까?", function(){
|
||||
modalEvent.info("수정", "전후사진(다이어트) 정보를 수정하시겠습니까?", function () {
|
||||
let formData = new FormData();
|
||||
formData.append("menuClass", menuClass);
|
||||
formData.append("categoryNo", categoryNo);
|
||||
// 기존 카테고리 번호도 같이 전송
|
||||
if(originalCategoryNo) formData.append("originalCategoryNo", originalCategoryNo);
|
||||
if (originalCategoryNo) formData.append("originalCategoryNo", originalCategoryNo);
|
||||
formData.append("title", title);
|
||||
formData.append("content", content);
|
||||
formData.append("hashtag", hashtag);
|
||||
formData.append("muWebPhotoDietId", muWebPhotoDietId);
|
||||
if(beforeFile) formData.append("beforeFile", beforeFile);
|
||||
if(afterFile) formData.append("afterFile", afterFile);
|
||||
if (beforeFile) formData.append("beforeFile", beforeFile);
|
||||
if (afterFile) formData.append("afterFile", afterFile);
|
||||
|
||||
$.ajax({
|
||||
url: encodeURI('/webphotodiet/updateWebPhotoDiet.do'),
|
||||
@@ -112,17 +109,17 @@ function fn_updateWebPhotoDiet(){
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
async: true,
|
||||
success: function(data){
|
||||
if('0'==data.msgCode){
|
||||
modalEvent.success("수정 성공", data.msgDesc, function(){
|
||||
success: function (data) {
|
||||
if ('0' == data.msgCode) {
|
||||
modalEvent.success("수정 성공", data.msgDesc, function () {
|
||||
fn_selectListWebPhotoDietIntro();
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
modalEvent.danger("수정 오류", data.msgDesc);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
modalEvent.danger("수정 오류", "수정 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||
}
|
||||
});
|
||||
@@ -132,41 +129,45 @@ function fn_updateWebPhotoDiet(){
|
||||
/****************************************************************************
|
||||
* Before/After 이미지 미리보기 및 삭제
|
||||
****************************************************************************/
|
||||
function fn_beforeFilePreview(){
|
||||
function fn_beforeFilePreview() {
|
||||
const file = $("#before_file")[0].files[0];
|
||||
if(file){
|
||||
if (file) {
|
||||
$('#before_img_box').html('');
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.style.width = '600px';
|
||||
img.style.height = '350px';
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.style.display = 'block';
|
||||
$('#before_img_box').append(img);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
function fn_removeBeforePreview(){
|
||||
function fn_removeBeforePreview() {
|
||||
$("#before_file").val('');
|
||||
$('#before_img_box').html('');
|
||||
}
|
||||
function fn_afterFilePreview(){
|
||||
function fn_afterFilePreview() {
|
||||
const file = $("#after_file")[0].files[0];
|
||||
if(file){
|
||||
if (file) {
|
||||
$('#after_img_box').html('');
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.style.width = '600px';
|
||||
img.style.height = '350px';
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.style.display = 'block';
|
||||
$('#after_img_box').append(img);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
function fn_removeAfterPreview(){
|
||||
function fn_removeAfterPreview() {
|
||||
$("#after_file").val('');
|
||||
$('#after_img_box').html('');
|
||||
}
|
||||
@@ -174,11 +175,11 @@ function fn_removeAfterPreview(){
|
||||
/****************************************************************************
|
||||
* 리스트 화면으로 이동
|
||||
****************************************************************************/
|
||||
function fn_selectListWebPhotoDietIntro(){
|
||||
if("Y"==selectUseYn){
|
||||
let pagingParam = "?menuClass="+menuClass;
|
||||
fn_leftFormAction("/webphotodiet/selectListWebPhotoDietIntro.do"+pagingParam);
|
||||
}else{
|
||||
function fn_selectListWebPhotoDietIntro() {
|
||||
if ("Y" == selectUseYn) {
|
||||
let pagingParam = "?menuClass=" + menuClass;
|
||||
fn_leftFormAction("/webphotodiet/selectListWebPhotoDietIntro.do" + pagingParam);
|
||||
} else {
|
||||
modalEvent.warning("", "조회 권한이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
@@ -187,35 +188,35 @@ function fn_selectListWebPhotoDietIntro(){
|
||||
/****************************************************************************
|
||||
* 페이지 init
|
||||
****************************************************************************/
|
||||
function fn_pageInit(){
|
||||
function fn_pageInit() {
|
||||
fn_selectWebPhotoDiet();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 페이지 event
|
||||
****************************************************************************/
|
||||
function fn_pageEvent(){
|
||||
$('.btnCancle').on("click", function(){
|
||||
function fn_pageEvent() {
|
||||
$('.btnCancle').on("click", function () {
|
||||
fn_selectListWebPhotoDietIntro();
|
||||
});
|
||||
$('.btnSave').on("click", function(){
|
||||
$('.btnSave').on("click", function () {
|
||||
fn_updateWebPhotoDiet();
|
||||
});
|
||||
$('#before_delete_btn').on("click", function(){
|
||||
$('#before_delete_btn').on("click", function () {
|
||||
fn_removeBeforePreview();
|
||||
});
|
||||
$('#before_file').on('change', function(e) {
|
||||
$('#before_file').on('change', function (e) {
|
||||
fn_beforeFilePreview();
|
||||
});
|
||||
$('#after_delete_btn').on("click", function(){
|
||||
$('#after_delete_btn').on("click", function () {
|
||||
fn_removeAfterPreview();
|
||||
});
|
||||
$('#after_file').on('change', function(e) {
|
||||
$('#after_file').on('change', function (e) {
|
||||
fn_afterFilePreview();
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(function () {
|
||||
fn_pageInit();
|
||||
fn_pageEvent();
|
||||
});
|
||||
@@ -1,90 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{/web/layout/homeLayout}">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{/web/layout/homeLayout}">
|
||||
<th:block layout:fragment="layout_css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/web/webPhotoDietInsert.css">
|
||||
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_top_script">
|
||||
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
|
||||
<script>
|
||||
let menuClass = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";
|
||||
let menuClass = "[[${param.menuClass}]]" == "" ? "" : "[[${param.menuClass}]]";
|
||||
|
||||
let selectUseYn = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
|
||||
let insertUseYn = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
|
||||
let updateUseYn = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
|
||||
let deleteUseYn = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
|
||||
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";
|
||||
let selectUseYn = "[[${selectUseYn}]]" == "" ? "N" : "[[${selectUseYn}]]";
|
||||
let insertUseYn = "[[${insertUseYn}]]" == "" ? "N" : "[[${insertUseYn}]]";
|
||||
</script>
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_content">
|
||||
<!-- 센터쪽 -->
|
||||
<div class="center_box">
|
||||
<p class="page_title">전후 사진(다이어트)</p>
|
||||
|
||||
<!-- 테이블 -->
|
||||
<div class="content_box">
|
||||
<div class="content clear">
|
||||
<div class="wp60">
|
||||
<div class="top">
|
||||
<label>Before 사진 첨부파일</label>
|
||||
<label for="before_file" class="file_btn"><img src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
</div>
|
||||
<div class="btm">
|
||||
<div class="img_box" id="before_img_box"><!-- Before img 미리보기 --></div>
|
||||
<input type="file" id="before_file" accept="image/jpeg, image/jpg, image/png" style="display: none;" multiple>
|
||||
<button id="before_delete_btn">삭제</button>
|
||||
</div>
|
||||
<div class="top">
|
||||
<label>After 사진 첨부파일</label>
|
||||
<label for="after_file" class="file_btn"><img src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
</div>
|
||||
<div class="btm">
|
||||
<div class="img_box" id="after_img_box"><!-- After img 미리보기 --></div>
|
||||
<input type="file" id="after_file" accept="image/jpeg, image/jpg, image/png" style="display: none;" multiple>
|
||||
<button id="after_delete_btn">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp40">
|
||||
<div class="consultation-info">
|
||||
<p id="main_category">
|
||||
카테고리
|
||||
</p>
|
||||
<div class="update-container">
|
||||
<!-- Left Panel: Form Data -->
|
||||
<div class="left-panel">
|
||||
<!-- Row 1: Category & Title -->
|
||||
<div class="form-grid-row">
|
||||
<div class="form-group" style="flex: 0 0 150px;">
|
||||
<label>카테고리</label>
|
||||
<select th:name="categorylist">
|
||||
<option value="">선택하세요</option>
|
||||
<option th:each="category : ${categorylist}" th:value="${category.categoryNo}" th:text="${category.categoryNm}"></option>
|
||||
<option th:each="category : ${categorylist}" th:value="${category.categoryNo}"
|
||||
th:text="${category.categoryNm}"></option>
|
||||
</select>
|
||||
<p id="main_title">
|
||||
제목
|
||||
</p>
|
||||
<input type="text" id="title" placeholder="제목을 입력해주세요."/>
|
||||
<p id="main_content">
|
||||
내용
|
||||
</p>
|
||||
<textarea id="content" placeholder="내용을 입력해주세요."></textarea>
|
||||
<p id="main_hashtag">
|
||||
해쉬태그
|
||||
</p>
|
||||
<input type="text" id="hashtag" placeholder="해쉬태그를 입력해주세요."/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>제목</label>
|
||||
<input type="text" id="title" placeholder="제목을 입력해주세요." />
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_box" style="display: flex; gap: 16px; justify-content: center; margin-top: 32px;">
|
||||
<button class="cancel_btn btnCancle">취소</button>
|
||||
<button class="registration_btn btnSave">등록</button>
|
||||
|
||||
<!-- Row 2: Content (Summernote usually takes full width, so we wrap it here) -->
|
||||
<div class="form-grid-row" style="display:block;">
|
||||
<div class="form-group" style="width: 100%;">
|
||||
<label style="display:block; margin-bottom:5px;">내용</label>
|
||||
<input type="text" id="content" placeholder="내용을 입력해주세요." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row 3: Hashtag -->
|
||||
<div class="form-grid-row">
|
||||
<div class="form-group">
|
||||
<label>해쉬태그</label>
|
||||
<input type="text" id="hashtag" placeholder="해쉬태그를 입력해주세요." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-section action-buttons" style="display: flex; gap: 10px; margin-top: 20px;">
|
||||
<button class="registration_btn btnSave"
|
||||
style="width: 80px; height: 36px; border-radius: 4px; display: inline-block;">등록</button>
|
||||
<button class="cancel_btn btnCancle"
|
||||
style="width: 80px; height: 36px; border-radius: 4px; display: inline-block; margin-left: 10px;">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Panel: Images -->
|
||||
<div class="right-panel" style="display: flex; flex-direction: column;">
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- Before Image Section -->
|
||||
<div class="panel-section">
|
||||
<div class="top-label">
|
||||
<span>Before 사진 첨부파일</span>
|
||||
<div>
|
||||
<label for="before_file" class="file_btn" style="cursor: pointer;"><img
|
||||
src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
<button id="before_delete_btn"
|
||||
style="border:none; background:none; cursor:pointer; margin-left:5px; font-size:12px; color:#999;">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-preview-wrapper img_box" id="before_img_box"
|
||||
style="width: 360px; height: 360px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
||||
<!-- Before img 미리보기 -->
|
||||
</div>
|
||||
<input type="file" id="before_file" accept="image/jpeg, image/jpg, image/png"
|
||||
style="display: none;" multiple>
|
||||
</div>
|
||||
|
||||
<!-- After Image Section -->
|
||||
<div class="panel-section">
|
||||
<div class="top-label">
|
||||
<span>After 사진 첨부파일</span>
|
||||
<div>
|
||||
<label for="after_file" class="file_btn" style="cursor: pointer;"><img
|
||||
src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
<button id="after_delete_btn"
|
||||
style="border:none; background:none; cursor:pointer; margin-left:5px; font-size:12px; color:#999;">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-preview-wrapper img_box" id="after_img_box"
|
||||
style="width: 360px; height: 360px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
||||
<!-- After img 미리보기 -->
|
||||
</div>
|
||||
<input type="file" id="after_file" accept="image/jpeg, image/jpg, image/png"
|
||||
style="display: none;" multiple>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Guide Section -->
|
||||
<div class="photo_guide"
|
||||
style="padding: 15px; margin-top: 20px; background: #f8f9fa; border-radius: 5px; font-size: 13px; color: #555; clear: both;">
|
||||
<p style="font-weight: bold; margin-bottom: 8px;">※ 사진 첨부 가이드</p>
|
||||
<ul style="list-style: disc; padding-left: 18px; line-height: 1.6;">
|
||||
<li>권장 사이즈는 <strong>650 x 650 px</strong> (또는 1:1 비율) 입니다.</li>
|
||||
<li>상단의 [+] 버튼을 눌러 사진을 첨부해 주세요. 이미지는 영역에 맞춰 빈틈없이 자동으로 예쁘게 채워집니다.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="excelForm" method="POST" target="_blank"></form>
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_popup">
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_script">
|
||||
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
|
||||
<script src="/js/web/webphotodiet/webPhotoDietInsert.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
|
||||
</th:block>
|
||||
|
||||
</html>
|
||||
@@ -1,8 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{/web/layout/homeLayout}">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{/web/layout/homeLayout}">
|
||||
<th:block layout:fragment="layout_css">
|
||||
<link rel="stylesheet" href="/css/web/webPhotoDietSelectList.css">
|
||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||
@@ -10,28 +8,29 @@
|
||||
<th:block layout:fragment="layout_top_script">
|
||||
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
|
||||
<script>
|
||||
let menuClass = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";
|
||||
let menuClass = "[[${param.menuClass}]]" == "" ? "" : "[[${param.menuClass}]]";
|
||||
let categoryDivCd = "05";
|
||||
|
||||
let selectUseYn = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
|
||||
let insertUseYn = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
|
||||
let updateUseYn = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
|
||||
let deleteUseYn = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
|
||||
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";
|
||||
let selectUseYn = "[[${selectUseYn}]]" == "" ? "N" : "[[${selectUseYn}]]";
|
||||
let insertUseYn = "[[${insertUseYn}]]" == "" ? "N" : "[[${insertUseYn}]]";
|
||||
let updateUseYn = "[[${updateUseYn}]]" == "" ? "N" : "[[${updateUseYn}]]";
|
||||
let deleteUseYn = "[[${deleteUseYn}]]" == "" ? "N" : "[[${deleteUseYn}]]";
|
||||
let downloadUseYn = "[[${downloadUseYn}]]" == "" ? "N" : "[[${downloadUseYn}]]";
|
||||
|
||||
/* 검색 관련 변수 */
|
||||
let webPhotoDietSearchKeywordParam0 = "[[${param.webPhotoDietSearchKeywordParam0}]]";
|
||||
let webPhotoDietSearchKeywordParam1 = "[[${param.webPhotoDietSearchKeywordParam1}]]";
|
||||
let webPhotoDietSearchKeywordParam2 = "[[${param.webPhotoDietSearchKeywordParam2}]]";
|
||||
let webPhotoDietSearchKeywordParam3 = "[[${param.webPhotoDietSearchKeywordParam3}]]";
|
||||
let webPhotoDietSearchKeywordParam2 = "";
|
||||
let webPhotoDietSearchKeywordParam3 = "";
|
||||
|
||||
let webPhotoDietSearchDateType = "";
|
||||
let webPhotoDietSearchStartDate = "";
|
||||
let webPhotoDietSearchEndDate = "";
|
||||
|
||||
let webPhotoDietSort = "[[${param.webPhotoDietSort}]]";
|
||||
let webPhotoDietDir = "[[${param.webPhotoDietDir}]]";
|
||||
let webPhotoDietStart = "[[${param.webPhotoDietStart}]]"==""?0:"[[${param.webPhotoDietStart}]]";
|
||||
let webPhotoDietLimit = "[[${param.webPhotoDietLimit}]]"==""?500:"[[${param.webPhotoDietLimit}]]";
|
||||
|
||||
let webPhotoDietSearchStartDate = "[[${param.webPhotoDietSearchStartDate}]]";
|
||||
let webPhotoDietSearchEndDate = "[[${param.webPhotoDietSearchEndDate}]]";
|
||||
let webPhotoDietSearchDateType = "[[${param.webPhotoDietSearchDateType}]]"==""?"A":"[[${param.webPhotoDietSearchDateType}]]";
|
||||
let webPhotoDietStart = "[[${param.webPhotoDietStart}]]" == "" ? 0 : "[[${param.webPhotoDietStart}]]";
|
||||
let webPhotoDietLimit = "[[${param.webPhotoDietLimit}]]" == "" ? 500 : "[[${param.webPhotoDietLimit}]]";
|
||||
</script>
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_content">
|
||||
@@ -42,27 +41,26 @@
|
||||
<div class="filter_box">
|
||||
<div class="form_box">
|
||||
|
||||
<!-- 이름input -->
|
||||
<!-- 카테고리 셀렉트박스 -->
|
||||
<div class="select_box first dropdown">
|
||||
<button class="label" type="button" data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">카테고리</button>
|
||||
<input type="hidden" id="webPhotoDietSearchKeyword0">
|
||||
<ul class="select_option_list dropdown-menu" id="categoryOptionList">
|
||||
<li class="option_list_item" id="li_">전체</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 제목 검색 input -->
|
||||
<div class="search_list">
|
||||
<div class="search_box">
|
||||
<img src="/image/web/search_G.svg" alt="search"/>
|
||||
<input type="text" id="webPhotoDietSearchKeyword0" required placeholder="카테고리">
|
||||
|
||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||
</div>
|
||||
<div class="search_box">
|
||||
<img src="/image/web/search_G.svg" alt="search"/>
|
||||
<img src="/image/web/search_G.svg" alt="search" />
|
||||
<input type="text" id="webPhotoDietSearchKeyword1" required placeholder="제목">
|
||||
|
||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||
</div>
|
||||
<div class="search_box">
|
||||
<img src="/image/web/search_G.svg" alt="search"/>
|
||||
<input type="text" id="webPhotoDietSearchKeyword2" required placeholder="작성자">
|
||||
|
||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||
</div>
|
||||
<button id="btnSearchWebPhotoDiet" class="search_btn" data-toggle="modal" data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
|
||||
<button id="btnSearchWebPhotoDiet" class="search_btn" data-toggle="modal"
|
||||
data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
|
||||
</div>
|
||||
|
||||
<div class="right_btn_box">
|
||||
@@ -93,4 +91,5 @@
|
||||
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
|
||||
<script src="/js/web/webphotodiet/webPhotoDietSelectList.js"></script>
|
||||
</th:block>
|
||||
|
||||
</html>
|
||||
@@ -1,23 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{/web/layout/homeLayout}">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{/web/layout/homeLayout}">
|
||||
<th:block layout:fragment="layout_css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/web/webPhotoDietInsert.css">
|
||||
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_top_script">
|
||||
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
|
||||
<script>
|
||||
let menuClass = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";
|
||||
let menuClass = "[[${param.menuClass}]]" == "" ? "" : "[[${param.menuClass}]]";
|
||||
|
||||
let selectUseYn = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
|
||||
let insertUseYn = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
|
||||
let updateUseYn = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
|
||||
let deleteUseYn = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
|
||||
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";
|
||||
let selectUseYn = "[[${selectUseYn}]]" == "" ? "N" : "[[${selectUseYn}]]";
|
||||
let updateUseYn = "[[${updateUseYn}]]" == "" ? "N" : "[[${updateUseYn}]]";
|
||||
|
||||
let muWebPhotoDietId = "[[${param.muWebPhotoDietId }]]";
|
||||
let categorylist = "[[${param.categorylist}]]";
|
||||
@@ -34,65 +27,111 @@
|
||||
|
||||
<!-- 테이블 -->
|
||||
<div class="content_box">
|
||||
<div class="content clear">
|
||||
<div class="wp60">
|
||||
<div class="top">
|
||||
<label>Before 사진 첨부파일</label>
|
||||
<label for="before_file" class="file_btn"><img src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
</div>
|
||||
<div class="btm">
|
||||
<div class="img_box" id="before_img_box"><!-- Before img 미리보기 --></div>
|
||||
<input type="file" id="before_file" accept="image/jpeg, image/jpg, image/png" style="display: none;" multiple>
|
||||
<button id="before_delete_btn">삭제</button>
|
||||
</div>
|
||||
<div class="top">
|
||||
<label>After 사진 첨부파일</label>
|
||||
<label for="after_file" class="file_btn"><img src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
</div>
|
||||
<div class="btm">
|
||||
<div class="img_box" id="after_img_box"><!-- After img 미리보기 --></div>
|
||||
<input type="file" id="after_file" accept="image/jpeg, image/jpg, image/png" style="display: none;" multiple>
|
||||
<button id="after_delete_btn">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp40">
|
||||
<div class="consultation-info">
|
||||
<p id="main_category">
|
||||
카테고리
|
||||
</p>
|
||||
<div class="update-container">
|
||||
<!-- Left Panel: Data Forms -->
|
||||
<div class="left-panel">
|
||||
<!-- Row 1: Category & Title -->
|
||||
<div class="form-grid-row">
|
||||
<div class="form-group" style="flex: 0 0 150px;">
|
||||
<label>카테고리</label>
|
||||
<select th:name="categorylist">
|
||||
<option value="">선택하세요</option>
|
||||
<option th:each="category : ${categorylist}" th:value="${category.categoryNo}" th:text="${category.categoryNm}" ></option>
|
||||
<option th:each="category : ${categorylist}" th:value="${category.categoryNo}"
|
||||
th:text="${category.categoryNm}"></option>
|
||||
</select>
|
||||
<p id="main_title">
|
||||
제목
|
||||
</p>
|
||||
<input type="text" id="title" placeholder="제목을 입력해주세요."/>
|
||||
<p id="main_content">
|
||||
내용
|
||||
</p>
|
||||
<textarea id="content" placeholder="내용을 입력해주세요."></textarea>
|
||||
<p id="main_hashtag">
|
||||
해쉬태그
|
||||
</p>
|
||||
<input type="text" id="hashtag" placeholder="해쉬태그를 입력해주세요."/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>제목</label>
|
||||
<input type="text" id="title" placeholder="제목을 입력해주세요." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row 2: Content (Summernote usually takes full width, so we wrap it here) -->
|
||||
<div class="form-grid-row" style="display:block;">
|
||||
<div class="form-group" style="width: 100%;">
|
||||
<label style="display:block; margin-bottom:5px;">내용</label>
|
||||
<input type="text" id="content" placeholder="내용을 입력해주세요." />
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<button class="cancel_btn btnCancle">취소</button>
|
||||
<button class="registration_btn btnSave">수정</button>
|
||||
</div>
|
||||
|
||||
<!-- Row 3: Hashtag -->
|
||||
<div class="form-grid-row">
|
||||
<div class="form-group">
|
||||
<label>해쉬태그</label>
|
||||
<input type="text" id="hashtag" placeholder="해쉬태그를 입력해주세요." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Buttons -->
|
||||
<div class="bottom-actions">
|
||||
<button class="registration_btn btnSave"
|
||||
style="width: 80px; height: 36px; border-radius: 4px; background: #3985EA; color: white; display: inline-block;">수정</button>
|
||||
<button class="cancel_btn btnCancle"
|
||||
style="width: 80px; height: 36px; border-radius: 4px; display: inline-block; margin-left: 10px;">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Panel: Images -->
|
||||
<div class="right-panel" style="display: flex; flex-direction: column;">
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- Before Image Section -->
|
||||
<div class="panel-section">
|
||||
<div class="top-label">
|
||||
<span>Before 사진 첨부파일</span>
|
||||
<div>
|
||||
<label for="before_file" class="file_btn" style="cursor: pointer;"><img
|
||||
src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
<button id="before_delete_btn"
|
||||
style="border:none; background:none; cursor:pointer; margin-left:5px; font-size:12px; color:#999;">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-preview-wrapper img_box" id="before_img_box"
|
||||
style="width: 360px; height: 360px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
||||
<!-- Before img 미리보기 -->
|
||||
</div>
|
||||
<input type="file" id="before_file" accept="image/jpeg, image/jpg, image/png"
|
||||
style="display: none;" multiple>
|
||||
</div>
|
||||
|
||||
<!-- After Image Section -->
|
||||
<div class="panel-section">
|
||||
<div class="top-label">
|
||||
<span>After 사진 첨부파일</span>
|
||||
<div>
|
||||
<label for="after_file" class="file_btn" style="cursor: pointer;"><img
|
||||
src="/image/web/add.svg" alt="파일찾기"></label>
|
||||
<button id="after_delete_btn"
|
||||
style="border:none; background:none; cursor:pointer; margin-left:5px; font-size:12px; color:#999;">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-preview-wrapper img_box" id="after_img_box"
|
||||
style="width: 360px; height: 360px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
||||
<!-- After img 미리보기 -->
|
||||
</div>
|
||||
<input type="file" id="after_file" accept="image/jpeg, image/jpg, image/png"
|
||||
style="display: none;" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Guide Section (moved outside right-panel to prevent breaking flex wrap) -->
|
||||
<div class="photo_guide"
|
||||
style="padding: 15px; margin-top: 20px; background: #f8f9fa; border-radius: 5px; font-size: 13px; color: #555; clear: both;">
|
||||
<p style="font-weight: bold; margin-bottom: 8px;">※ 사진 첨부 가이드</p>
|
||||
<ul style="list-style: disc; padding-left: 18px; line-height: 1.6;">
|
||||
<li>권장 사이즈는 <strong>650 x 650 px</strong> (또는 1:1 비율) 입니다.</li>
|
||||
<li>상단의 [+] 버튼을 눌러 사진을 첨부해 주세요. 이미지는 영역에 맞춰 빈틈없이 자동으로 예쁘게 채워집니다.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="excelForm" method="POST" target="_blank"></form>
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_popup">
|
||||
</th:block>
|
||||
<th:block layout:fragment="layout_script">
|
||||
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
|
||||
<script src="/js/web/webphotodiet/webPhotoDietUpdate.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
|
||||
</th:block>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user