Commit b30b7df 1 parent c445a85 commit b30b7df Copy full SHA for b30b7df
File tree 1 file changed +5
-2
lines changed
web_src/js/modules/fomantic
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ import {queryElemChildren} from '../../utils/dom.js';
3
3
4
4
export function initFomanticDimmer ( ) {
5
5
// stand-in for removed dimmer module
6
- $ . fn . dimmer = function ( arg0 , $el ) {
6
+ $ . fn . dimmer = function ( arg0 , arg1 ) {
7
7
if ( arg0 === 'add content' ) {
8
+ const $el = arg1 ;
8
9
const existingDimmer = document . querySelector ( 'body > .ui.dimmer' ) ;
9
10
if ( existingDimmer ) {
10
- queryElemChildren ( existingDimmer , '*' , ( el ) => el . remove ( ) ) ;
11
+ queryElemChildren ( existingDimmer , '*' , ( el ) => el . classList . add ( 'hidden' ) ) ;
11
12
this . _dimmer = existingDimmer ;
12
13
} else {
13
14
this . _dimmer = document . createElement ( 'div' ) ;
@@ -21,8 +22,10 @@ export function initFomanticDimmer() {
21
22
this . _dimmer . classList . add ( 'active' ) ;
22
23
document . body . classList . add ( 'tw-overflow-hidden' ) ;
23
24
} else if ( arg0 === 'hide' ) {
25
+ const cb = arg1 ;
24
26
this . _dimmer . classList . remove ( 'active' ) ;
25
27
document . body . classList . remove ( 'tw-overflow-hidden' ) ;
28
+ cb ( ) ;
26
29
}
27
30
return this ;
28
31
} ;
You can’t perform that action at this time.
0 commit comments