This commit is contained in:
@@ -45,6 +45,9 @@
|
|||||||
background-color: #EDD5DD
|
background-color: #EDD5DD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn_move { width:32px; min-width: 32px; height: 32px; background-color: #fff; border:1px solid #999; border-radius:4px; margin-bottom: 4px; }
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||||
<script language="javascript" src="<c:url value="/js/jsplumb.js"/>"></script>
|
<script language="javascript" src="<c:url value="/js/jsplumb.js"/>"></script>
|
||||||
@@ -888,7 +891,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name=auto]").click(function(){
|
$("#auto").click(function(){
|
||||||
//debugger;
|
//debugger;
|
||||||
jsPlumbInstance.deleteEveryConnection();
|
jsPlumbInstance.deleteEveryConnection();
|
||||||
|
|
||||||
@@ -915,7 +918,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name=addAll]").click(function() {
|
$("#addAll").click(function() {
|
||||||
console.debug('addAll');
|
console.debug('addAll');
|
||||||
var srcRowId = sourceGrid.getGridParam( "selrow" );
|
var srcRowId = sourceGrid.getGridParam( "selrow" );
|
||||||
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
||||||
@@ -966,7 +969,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name=removeAll]").click(function(){
|
$("#removeAll").click(function(){
|
||||||
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
||||||
if (tgtRowId == null) {alert("타겟레이아웃을 선택하여 주십시요.");return;}
|
if (tgtRowId == null) {alert("타겟레이아웃을 선택하여 주십시요.");return;}
|
||||||
//grid data
|
//grid data
|
||||||
@@ -986,6 +989,49 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#add").click(function() {
|
||||||
|
|
||||||
|
var srcRowId = sourceGrid.getGridParam( "selrow" );
|
||||||
|
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
||||||
|
if (srcRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert1")%>');return;}
|
||||||
|
if (tgtRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert2")%>');return;}
|
||||||
|
|
||||||
|
//field, ATTR 여부 판단
|
||||||
|
var sourceRow = sourceGrid.getRowData( srcRowId );
|
||||||
|
var targetRow = targetGrid.getRowData( tgtRowId );
|
||||||
|
if ( (sourceRow["loutItemType"] == 'Field' || sourceRow["loutItemType"] == 'Attr' || sourceRow["loutItemType"] == 'Array') &&
|
||||||
|
(targetRow["loutItemType"] == 'Field' || targetRow["loutItemType"] == 'Attr' || targetRow["loutItemType"] == 'Array') ){
|
||||||
|
;
|
||||||
|
}else{
|
||||||
|
alert('<%=localeMessage.getString("transformManDetail.alert3")%>');
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
targetGrid.jqGrid('setCell',tgtRowId,'CNVSNCMDNAME',addArrayTag(sourceRow['loutItemType'], addGroupTag(srcGroup,sourceRow['LOUTITEMPATH'])));
|
||||||
|
targetGrid.jqGrid('setCell',tgtRowId,'CNVSNRSULTITEMPATHNAME',addArrayTag(targetRow['loutItemType'], addGroupTag(tgtGroup,targetRow['LOUTITEMPATH'])));
|
||||||
|
targetGrid.jqGrid('setCell',tgtRowId,'CNVSNITEMSERNO',targetRow['loutItemSerno']);
|
||||||
|
|
||||||
|
try {
|
||||||
|
jsPlumbConnect(srcRowId, tgtRowId);
|
||||||
|
} catch (e) {console.error(e);}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#remove").click(function(){
|
||||||
|
var tgtRowId = targetGrid.getGridParam( "selrow" );
|
||||||
|
if (tgtRowId == null) {alert("타겟레이아웃을 선택하여 주십시요.");return;}
|
||||||
|
//grid data
|
||||||
|
var targetData = targetGrid.getRowData();
|
||||||
|
|
||||||
|
targetGrid.jqGrid('setCell', tgtRowId, 'CNVSNCMDNAME', null);
|
||||||
|
targetGrid.jqGrid('setCell', tgtRowId, 'CNVSNRSULTITEMPATHNAME', null);
|
||||||
|
targetGrid.jqGrid('setCell', tgtRowId, 'CNVSNITEMSERNO', null);
|
||||||
|
targetGrid.jqGrid('setCell', tgtRowId, 'CNVSNITEMBASCVAL', null);
|
||||||
|
|
||||||
|
const targetEndpointElementId = targetGrid.getEndpointElementId(tgtRowId);
|
||||||
|
jsPlumbInstance.deleteConnectionsForElement(document.getElementById(targetEndpointElementId));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$("textarea[name=CNVSNRSULTITEMPATHNAME],textarea[name=CNVSNCMDNAME],input[name=CNVSNITEMBASCVAL],input[name=CNVSNITEMSERNO]").blur(function(){
|
$("textarea[name=CNVSNRSULTITEMPATHNAME],textarea[name=CNVSNCMDNAME],input[name=CNVSNITEMBASCVAL],input[name=CNVSNITEMSERNO]").blur(function(){
|
||||||
var rowId = targetGrid.getGridParam( "selrow" );
|
var rowId = targetGrid.getGridParam( "selrow" );
|
||||||
if (isNull(rowId)) return;
|
if (isNull(rowId)) return;
|
||||||
@@ -2161,12 +2207,12 @@
|
|||||||
<div id="sourcePage"></div>
|
<div id="sourcePage"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:30%; text-align:center; vertical-align: top;">
|
<td style="width:30%; min-width:70px; text-align:center; vertical-align: top; ">
|
||||||
|
<button type=button id="remove" name="remove" class="cssbtn btn_move" title="remove"><</button>
|
||||||
<br /><!-- 이 br 이 없을 때 버튼이 제대로 동작 하지 않는다. -->
|
<button type=button id="add" name="add" class="cssbtn btn_move" title="add"> > </button><br />
|
||||||
<input type=button id="removeAll" name="removeAll" class="btn_img btn_removeAll"/><br />
|
<button type=button id="removeAll" name="removeAll" class="cssbtn btn_move" title="remove all"> << </button>
|
||||||
<input type=button id="addAll" name="addAll" class="btn_img btn_addAll"/><br />
|
<button type=button id="addAll" name="addAll" class="cssbtn btn_move" title="add all"> >> </button><br />
|
||||||
<input type=button id="auto" name="auto" class="btn_img btn_auto" />
|
<button type=button id="auto" name="auto" class="cssbtn btn_move" style="width: 70px; " title="auto"> Auto </button>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;">
|
<td style="vertical-align:top;">
|
||||||
<table class="table_row" cellspacing="0">
|
<table class="table_row" cellspacing="0">
|
||||||
|
|||||||
Reference in New Issue
Block a user