Преглед изворни кода

Merge remote-tracking branch 'origin/develop' into card007

card007 пре 5 година
родитељ
комит
e1817d2243

+ 5 - 2
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -828,11 +828,14 @@ var fnSearchCallback = function (result) {
 				 html += '			<span class="date">'+item.entryDt+'</span>\n';
 				 html += '		</div>\n';
 				 html += '		<div class="cmt_cont">\n';
-				 html += '			<div class="img_wrap clear" onclick="fnImgAttach(this)">\n';
+				 html += '			<div class="img_wrap clear">\n';
 				 if (result.replyAttachList.length>0) {
+					 var j = 0;
 					for (var i = 0; i < result.replyAttachList.length; i++) {
 						if(result.replyAttachList[i].planEntrySq == item.planEntrySq){
-							html += '				<span class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'"></span>\n';
+							//html += '				<span class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'"></span>\n';
+							html += '				<span class="pics"><img class="picsThumbs" onclick="cfMoPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\', \''+ j +'\');" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'"></span>\n';
+						 	j++;
 						}
 					}	
 				 }

+ 23 - 12
src/main/webapp/WEB-INF/views/web/planning/PlanningReplyPhotoFormWeb.html

@@ -44,20 +44,31 @@
 	<!-- //댓글 이미지 팝업 -->	
 <a href="javascript:void(0);" rel="modal:close"	onclick="cfCloseLayer('layer_review_photo')" class="close-modal">Close</a>
 <script th:inline="javascript">
-/*<![CDATA[*/
+$(document).ready( function() {
+	let replyAttchSq = 0; 
+	if (!gagajf.isNull( [[${plan.attachSq}]])){
+		replyAttchSq = [[${plan.attachSq}]];
+	} 
+	
 	var contactPopSwiper = new Swiper('.thumb_img_pop .swiper-container', {
-	navigation: {
-		nextEl: '.thumb_img_pop .swiper-button-next',
-		prevEl: '.thumb_img_pop .swiper-button-prev',
-	},
-	pagination: {
-		el: '.thumb_img_pop .swiper-pagination',
-		clickable: true,
-	},
-	observer:true,
-	observeParents: true,
-});		
+		navigation: {
+			nextEl: '.thumb_img_pop .swiper-button-next',
+			prevEl: '.thumb_img_pop .swiper-button-prev',
+		},
+		pagination: {
+			el: '.thumb_img_pop .swiper-pagination',
+			clickable: true,
+		},
+		observer:true,
+		observeParents: true,
+	});		
+	
+	contactPopSwiper.slideTo(replyAttchSq, 0, false);
+	contactPopSwiper.update();
 
+});
+/*<![CDATA[*/
+	
 /*]]>*/
 </script>
 </html>

+ 23 - 0
src/main/webapp/ux/style24_link.js

@@ -669,6 +669,29 @@ function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
 	cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'photo_full_popup');
 }
 
+/**
+* @type   : function
+* @access : public
+* @desc   : 댓글 이미지 팝업(모바일)
+* <pre>
+*		cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
+* </pre>
+*/
+function cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
+	var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
+
+	if ($('#thumbImgPop').length == 0) {
+		$('body').append(str);
+	}
+	
+	var params = '?planSq=' + planSq;
+	params += '&planEntrySq=' + planEntrySq;
+	if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
+	if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
+	
+	cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'thumbImgPop');
+}
+
 /**
  * @type   : function
  * @access : public