Просмотр исходного кода

메인전시관리 드래그이동시 전시순서 재정렬

bin2107 5 лет назад
Родитель
Сommit
52408d6f0f

+ 12 - 1
src/main/webapp/WEB-INF/views/display/MainContentsPopupForm.html

@@ -1396,13 +1396,24 @@
 		uifnPopupClose('popupMainContents');
 	}
 
+	var fnResetDispOrd = function (){
+		$('.mcTable').each(function (idx){
+			$(this).find('input[name=dispOrd]').val(idx+1);
+		});
+	}
+
 	$(document).ready(function() {
 		$("#popTitle").text("["+contentsLoc+"] "+gagaAgGrid.lookupValue(contentsLocArr, contentsLoc));
 
 		$("#popSortable").disableSelection();
 		fnGetContentsPreviewList();
 
-
+		$("#popSortable").sortable({
+			stop: function(event, ui) {
+				//fnResetTabIdx();
+				fnResetDispOrd();
+			}
+		});
 	});
 	/*]]>*/
 </script>

+ 7 - 0
src/main/webapp/WEB-INF/views/display/MainGnbContentsPopupForm.html

@@ -767,11 +767,18 @@
 		}
 	}
 
+	var fnResetDispOrd = function (){
+		$('.tabTable').each(function (idx){
+			$(this).find('input[name=dispOrd]').val(idx+1);
+		});
+	}
+
 	$(document).ready(function() {
 		$("#gnbTabList").disableSelection();
 		$("#gnbTabList").sortable({
 			stop: function(event, ui) {
 				//fnResetTabIdx();
+				fnResetDispOrd();
 			}
 		});