Commit 82b00008 authored by 八千流's avatar 八千流 Committed by 老广

[Update] 修改更新资产的协议组,不能删除协议的问题 (#3228)

* [Update] 修改更新资产的协议组,不能删除协议的问题

* [Update] 修改前端属性名,避免冲突
parent 1457281b
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="col-md-2 col-md-offset-2" style="text-align: right">{{ fm.name }}</div> <div class="col-md-2 col-md-offset-2" style="text-align: right">{{ fm.name }}</div>
<div class="col-md-6">{{ fm.port }}</div> <div class="col-md-6">{{ fm.port }}</div>
<div class="col-md-1" style="padding: 6px 0"> <div class="col-md-1" style="padding: 6px 0">
<a class="btn btn-danger btn-xs btn-protocol btn-del"><span class="fa fa-minus"></span> </a> <a class="btn btn-danger btn-xs btn-protocol btn-delete"><span class="fa fa-minus"></span> </a>
<a class="btn btn-primary btn-xs btn-protocol btn-add" style="display: none"><span class="fa fa-plus"></span></a> <a class="btn btn-primary btn-xs btn-protocol btn-add" style="display: none"><span class="fa fa-plus"></span></a>
</div> </div>
</div> </div>
...@@ -97,7 +97,7 @@ function format(item) { ...@@ -97,7 +97,7 @@ function format(item) {
function protocolBtnShow() { function protocolBtnShow() {
$(".btn-protocol.btn-add").hide(); $(".btn-protocol.btn-add").hide();
$(".btn-protocol.btn-add:last").show(); $(".btn-protocol.btn-add:last").show();
var btnDel = $(".btn-protocol.btn-del"); var btnDel = $(".btn-protocol.btn-delete");
if (btnDel.length === 1) { if (btnDel.length === 1) {
btnDel.addClass("disabled") btnDel.addClass("disabled")
} else { } else {
...@@ -140,7 +140,7 @@ $(document).ready(function () { ...@@ -140,7 +140,7 @@ $(document).ready(function () {
protocolRef.trigger("change") protocolRef.trigger("change")
} }
}) })
.on("click", ".btn-protocol.btn-del", function () { .on("click", ".btn-protocol.btn-delete", function () {
$(this).parent().parent().remove(); $(this).parent().parent().remove();
protocolBtnShow() protocolBtnShow()
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment