Skip to content

Commit c9b5f90

Browse files
authored
Merge pull request #46 from ringhidb/master
Added Source to htmx.ajax to allow both calls. Fix for Issue #35
2 parents 0c4007f + 5002dc4 commit c9b5f90

File tree

1 file changed

+2
-2
lines changed
  • netbox_floorplan/static/netbox_floorplan/floorplan

1 file changed

+2
-2
lines changed

netbox_floorplan/static/netbox_floorplan/floorplan/edit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ var record_type = document.getElementById('record_type').value;
2222
var site_id = document.getElementById('site_id').value;
2323
var location_id = document.getElementById('location_id').value;
2424

25-
htmx.ajax('GET', `/plugins/floorplan/floorplans/racks/?floorplan_id=${obj_pk}`, { target: '#rack-card', swap: 'innerHTML', trigger: 'load' })
26-
htmx.ajax('GET', `/plugins/floorplan/floorplans/devices/?floorplan_id=${obj_pk}`, { target: '#unrack-card', swap: 'innerHTML', trigger: 'load' })
25+
htmx.ajax('GET', `/plugins/floorplan/floorplans/racks/?floorplan_id=${obj_pk}`, { source: '#rack-card', target: '#rack-card', swap: 'innerHTML', trigger: 'load' })
26+
htmx.ajax('GET', `/plugins/floorplan/floorplans/devices/?floorplan_id=${obj_pk}`, { source: '#unrack-card', target: '#unrack-card', swap: 'innerHTML', trigger: 'load' })
2727

2828
fabric.Object.prototype.set({
2929
snapThreshold: 45,

0 commit comments

Comments
 (0)