Commit 9a07b1b
committed
luci-base: fix tab handling in modal dialogues
When adding tabs in modal dialogues, the old code of simply assigning
s.tabs = this.tabs was problematic because it was an array of objects
whose behaviour would cause a traceback when s.tab is called in e.g.
a protocol handler Modal when it was reopened.
Now verify the properties do not already exist before assigning them.
This means one can define s.tab(...) in a Modal UI without a try
block (which would even then sometimes fail).
Signed-off-by: Paul Donald <newtwen+github@gmail.com>1 parent fd8c8a4 commit 9a07b1b
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3339 | 3339 | | |
3340 | 3340 | | |
3341 | 3341 | | |
3342 | | - | |
3343 | | - | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
3344 | 3362 | | |
3345 | 3363 | | |
3346 | 3364 | | |
| |||
0 commit comments