<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>修改配置关系</title>
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
<body>
|
<div class="relationwrap">
|
<h2>
|
配置关系:
|
[#if links?? && links?size>0]
|
[#list links as relation]
|
<span><input type="radio" name="radio" value="${relation.id}" class="relation" [#if relation.id == relationing.AFTER_RELATION_TYPE]checked="checked"[/#if]/>${relation.text}</span>
|
[/#list]
|
[/#if]
|
</h2>
|
<div>
|
<p [#if relationing.AFTER_RELATION_TYPE != Constants.CMDB_CI_RELATION_RELATION_CONTAIN]style="display:none;"[/#if] class="linkImg"><img src="${common_static}/static/ui/images/relation_bh.jpg" alt="" /></p>
|
<p [#if relationing.AFTER_RELATION_TYPE != Constants.CMDB_CI_RELATION_RELATION_LINK]style="display:none;"[/#if] class="linkImg"><img src="${common_static}/static/ui/images/relation_sy.jpg" alt="" /></p>
|
<p [#if relationing.AFTER_RELATION_TYPE != Constants.CMDB_CI_RELATION_RELATION_USE]style="display:none;"[/#if] class="linkImg"><img src="${common_static}/static/ui/images/relation_lj.jpg" alt="" /></p>
|
<p [#if relationing.AFTER_RELATION_TYPE != Constants.CMDB_CI_RELATION_RELATION_INSTALL_HAS]style="display:none;"[/#if] class="linkImg"><img src="${common_static}/static/ui/images/relation_azy.jpg" alt="" /></p>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
$(function() {
|
$(":radio").click(function() {
|
var index = $(":radio").index(this);
|
$("p.linkImg").hide();
|
$("p.linkImg").eq(index).show();
|
});
|
})
|
var id = '${RequestParameters.id}';
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
|
var $checkedRelation = $(".relation:checked");
|
|
|
var relation = $checkedRelation.val();
|
|
var params = {"relation":relation,"id":id};
|
|
$.post("${base}/business/pages/change/updateRelation.html",params,function(data,textStatus) {
|
if(data==1) {
|
window.top.popupTips("修改成功");
|
window.top.hideDialog(dialogID);
|
window.top.document.getElementById("dialogIframeConfigEditIndex").contentWindow.document.getElementById("relationIframe").contentWindow.query();
|
} else {
|
window.top.popupTips("修改失败");
|
}
|
})
|
|
|
|
}
|
}
|
</script>
|
|
</body>
|
</html>
|