Spaces:
Paused
Paused
fix: W is not defined — expose W to global scope for inline onclick handlers
Browse filesvar W=window inside IIFE is local, but inline onclick="W._tog()"
runs in global scope. Added window.W=W to expose it globally.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
outlook2api/static/admin.html
CHANGED
|
@@ -594,7 +594,7 @@ function loadAccts(){
|
|
| 594 |
});
|
| 595 |
}
|
| 596 |
|
| 597 |
-
var W=window;
|
| 598 |
W._tog=function(id,v){
|
| 599 |
api('/admin/api/accounts/'+id,{method:'PATCH',body:{is_active:v}})
|
| 600 |
.then(function(){toast('Account updated');loadAccts()}).catch(function(e){toast(e.message,1)});
|
|
|
|
| 594 |
});
|
| 595 |
}
|
| 596 |
|
| 597 |
+
var W=window;window.W=W;
|
| 598 |
W._tog=function(id,v){
|
| 599 |
api('/admin/api/accounts/'+id,{method:'PATCH',body:{is_active:v}})
|
| 600 |
.then(function(){toast('Account updated');loadAccts()}).catch(function(e){toast(e.message,1)});
|