File tree Expand file tree Collapse file tree 3 files changed +50
-7
lines changed Expand file tree Collapse file tree 3 files changed +50
-7
lines changed Original file line number Diff line number Diff line change 136
136
}
137
137
138
138
function Modal ( ) {
139
- var that = this ;
139
+ var element ;
140
+ var content = '' ;
141
+ var changes = {
142
+ content : true
143
+ } ;
144
+
145
+ function createModal ( ) {
146
+ var element = $ ( '<div>' ) . addClass ( 'intro-modal' ) . appendTo ( 'body' ) ;
147
+ return element ;
148
+ }
149
+ this . setContent = function ( val ) {
150
+ content = val ;
151
+ changes . content = true ;
152
+ } ;
153
+
154
+ this . destroy = function ( ) {
155
+ $ ( element ) . remove ( ) ;
156
+ element = null ;
157
+ } ;
140
158
159
+ this . render = function ( ) {
160
+ element = element || createModal ( ) ;
161
+ if ( changes . content ) {
162
+ element . html ( content ) ;
163
+ changes . content = false ;
164
+ }
165
+ } ;
141
166
}
142
167
143
168
362
387
} ) ;
363
388
}
364
389
hint . hideTooltip ( ) ;
390
+ if ( modal ) {
391
+ modal . destroy ( ) ;
392
+ }
365
393
}
366
394
367
395
382
410
unhighlighElement ( element ) ;
383
411
} ) ;
384
412
}
413
+
414
+ if ( modal ) {
415
+ modal . destroy ( ) ;
416
+ }
417
+ modal = null ;
385
418
hint = null ;
386
419
backdrop = null ;
387
420
}
430
463
if ( ! step . modal ) {
431
464
return hint . render ( ) ;
432
465
} else {
433
-
466
+ modal = new Modal ( ) ;
467
+ modal . setContent ( intro ) ;
468
+ modal . render ( ) ;
434
469
return jQuery . when ( ) ;
435
470
}
436
471
} ;
Original file line number Diff line number Diff line change @@ -83,19 +83,19 @@ $intro-backdrop-z-index: $intro-element-z-index - 100;
83
83
84
84
.intro-tooltip-arrow {
85
85
& [position = right ] {
86
- @include arrow ( ' left' , blue , $arrow-size-border );
86
+ @include arrow ( ' left' , #FFF , $arrow-size-border );
87
87
}
88
88
89
89
& [position = left ] {
90
- @include arrow ( ' right' , blue , $arrow-size-border );
90
+ @include arrow ( ' right' , #FFF , $arrow-size-border );
91
91
}
92
92
93
93
& [position = bottom ] {
94
- @include arrow ( ' top' , blue , $arrow-size-border );
94
+ @include arrow ( ' top' , #FFF , $arrow-size-border );
95
95
}
96
96
97
97
& [position = top ] {
98
- @include arrow ( ' bottom' , blue , $arrow-size-border );
98
+ @include arrow ( ' bottom' , #FFF , $arrow-size-border );
99
99
top : 0 ;
100
100
}
101
101
}
@@ -149,3 +149,11 @@ $intro-backdrop-z-index: $intro-element-z-index - 100;
149
149
opacity : 1.0 !important ;
150
150
transform : none !important ;
151
151
}
152
+
153
+ .intro-modal {
154
+ position : absolute ;
155
+ left : 50% ;
156
+ transform : translateX (-50% ) translateY (-50% );
157
+ top : 50% ;
158
+ z-index : $intro-backdrop-z-index + 100 ;
159
+ }
You can’t perform that action at this time.
0 commit comments