Commit ff067c0
John75SunCity
fix: Convert visualization_dynamic_loader.js to vanilla JavaScript
EASIEST CONVERSION (0 jQuery calls):
- Organization chart dynamic library loader
- Already used vanilla JavaScript internally
- Only needed to remove odoo.define() and publicWidget wrapper
CONVERSION DETAILS:
- Removed: odoo.define(), publicWidget
- Kept: All existing vanilla JavaScript logic (injectTag, ensureAssets)
- Added: Auto-initialization on DOMContentLoaded
- Pattern: IIFE with object literal
FUNCTIONALITY PRESERVED:
✓ Dynamic vis-network library loading (local → CDN fallback)
✓ Prevents committing large minified vendor bundles
✓ Loads only when diagram containers present
✓ Async script loading with proper error handling
FILES COMPLETED (2/4):
✅ portal_barcode_management.js (30 jQuery → vanilla)
✅ visualization_dynamic_loader.js (0 jQuery → vanilla)
FILES REMAINING (2/4):
⏳ portal_signature.js (47 jQuery calls - HIGH PRIORITY for e-signatures)
⏳ portal_inventory_highlights.js (37 jQuery calls - MEDIUM PRIORITY)
Next: Convert portal_signature.js for destruction certificate signing1 parent 9925ffd commit ff067c0
File tree
2 files changed
+25
-14
lines changed- records_management
- static/src/js
2 files changed
+25
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
| 788 | + | |
789 | 789 | | |
790 | | - | |
| 790 | + | |
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| |||
Lines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | | - | |
| 65 | + | |
64 | 66 | | |
65 | | - | |
66 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
72 | 82 | | |
73 | | - | |
74 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
0 commit comments