|
|
@@ -114,7 +114,7 @@
|
|
|
// 조회
|
|
|
$('#btnSearchCategoryList').on('click', function() {
|
|
|
// Fetch data
|
|
|
- gagaAgGrid.fetch($('#searchCategoryListForm').prop('action'), categoryGridOptions, '#searchCategoryListForm');
|
|
|
+ gagaAgGrid.fetch($('#searchCategoryListForm').prop('action'), categoryGridOptions, '#searchCategoryListForm',fnChangeGrid);
|
|
|
});
|
|
|
|
|
|
// 확인
|
|
|
@@ -145,6 +145,17 @@
|
|
|
uifnPopupClose('popupCategory');
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ var fnChangeGrid = function (){ //XSS 그리드 내 변환
|
|
|
+ var data = gagaAgGrid.getAllRowData(categoryGridOptions);
|
|
|
+ let modifyList = [];
|
|
|
+ $.each(data, function(idx, item) {
|
|
|
+ let cateNm = item.cateNm;
|
|
|
+ item.cateNm = cateNm.replaceXSS();
|
|
|
+ modifyList.push(item);
|
|
|
+ });
|
|
|
+ categoryGridOptions.api.setRowData(modifyList);
|
|
|
+ };
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
// Create a agGrid
|
|
|
@@ -167,7 +178,14 @@
|
|
|
// Fetch data
|
|
|
gagaAgGrid.fetch($('#searchCategoryListForm').prop('action'), categoryGridOptions, '#searchCategoryListForm', function(data) {
|
|
|
let selLvl = Number($('#searchCategoryListForm input[name=selLvl]').val()) + 1;
|
|
|
-
|
|
|
+ var data = data;
|
|
|
+ let modifyList = [];
|
|
|
+ $.each(data, function(idx, item) {
|
|
|
+ let cateNm = item.cateNm;
|
|
|
+ item.cateNm = cateNm.replaceXSS();
|
|
|
+ modifyList.push(item);
|
|
|
+ });
|
|
|
+ categoryGridOptions.api.setRowData(modifyList);
|
|
|
for (let i = 2; i <= 5; i++) {
|
|
|
if (i >= selLvl) {
|
|
|
$('#selCate' + i).html('<option value="">[카테고리' + (i - 1) + ']</option>');
|