Restores deletion in flat network topology
- Removes an inappropriate condition for the device deletion button
- Fixes a jquery selector for the confirmation dialog that pops up on
deletion
Change-Id: I0a4c7dd5782524a875bf208d4ea63ac6df4a62b4
Closes-Bug: 1781911
(cherry picked from commit a42a56f495
)
This commit is contained in:
parent
977455555b
commit
c9c91325ec
|
@ -22,7 +22,6 @@
|
||||||
[[/console]]
|
[[/console]]
|
||||||
</div>
|
</div>
|
||||||
[[#type]]
|
[[#type]]
|
||||||
[[#allow_delete_subnet]]
|
|
||||||
<div class="cell delete">
|
<div class="cell delete">
|
||||||
<button class="delete-device btn btn-danger btn-xs [[type]]"
|
<button class="delete-device btn btn-danger btn-xs [[type]]"
|
||||||
data-type="[[type]]" data-device-id="[[id]]"
|
data-type="[[type]]" data-device-id="[[id]]"
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
[[delete_label]]
|
[[delete_label]]
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
[[/allow_delete_subnet]]
|
|
||||||
[[/type]]
|
[[/type]]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -624,7 +624,7 @@ horizon.flat_network_topology = {
|
||||||
$balloon.find('.delete-device').click(function(){
|
$balloon.find('.delete-device').click(function(){
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var delete_modal = horizon.datatables.confirm($this);
|
var delete_modal = horizon.datatables.confirm($this);
|
||||||
delete_modal.find('.btn-primary').click(function () {
|
delete_modal.find('.btn.btn-danger').click(function () {
|
||||||
$this.prop('disabled', true);
|
$this.prop('disabled', true);
|
||||||
d3.select('#id_' + $this.data('device-id')).classed('loading',true);
|
d3.select('#id_' + $this.data('device-id')).classed('loading',true);
|
||||||
self.delete_device($this.data('type'),$this.data('device-id'));
|
self.delete_device($this.data('type'),$this.data('device-id'));
|
||||||
|
@ -634,7 +634,7 @@ horizon.flat_network_topology = {
|
||||||
$balloon.find('.delete-port').click(function(){
|
$balloon.find('.delete-port').click(function(){
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var delete_modal = horizon.datatables.confirm($this);
|
var delete_modal = horizon.datatables.confirm($this);
|
||||||
delete_modal.find('.btn-primary').click(function () {
|
delete_modal.find('.btn.btn-danger').click(function () {
|
||||||
$this.prop('disabled', true);
|
$this.prop('disabled', true);
|
||||||
self.delete_port($this.data('router-id'),$this.data('port-id'),$this.data('network-id'));
|
self.delete_port($this.data('router-id'),$this.data('port-id'),$this.data('network-id'));
|
||||||
horizon.modals.spinner.modal('hide');
|
horizon.modals.spinner.modal('hide');
|
||||||
|
|
Loading…
Reference in New Issue