@@ -146,25 +146,27 @@ export default function(CodeMirror) {
146
146
return nextState ;
147
147
}
148
148
149
- var showReplaceButton = dialog . getElementsByClassName ( "CodeMirror-replace-button" ) [ 0 ] ;
149
+ var showReplaceButton = dialog . getElementsByClassName ( "CodeMirror-replace-toggle- button" ) [ 0 ] ;
150
150
var toggleReplaceBtnDiv = dialog . getElementsByClassName ( "Toggle-replace-btn-div" ) [ 0 ] ;
151
151
var replaceDiv = dialog . getElementsByClassName ( "CodeMirror-replace-div" ) [ 0 ] ;
152
+ var replaceDivHeightOpened = "45px" , replaceDivHeightClosed = "0px" ;
153
+ var toggleButtonHeightOpened = "80px" , toggleButtonHeightClosed = "40px" ;
152
154
if ( replaceOpened ) {
153
- replaceDiv . style . height = "50px" ;
154
- toggleReplaceBtnDiv . style . height = "90px" ;
155
- showReplaceButton . style . height = "90px" ;
155
+ replaceDiv . style . height = replaceDivHeightOpened ;
156
+ toggleReplaceBtnDiv . style . height = toggleButtonHeightOpened ;
157
+ showReplaceButton . style . height = toggleButtonHeightOpened ;
156
158
showReplaceButton . innerHTML = "▼" ;
157
159
}
158
160
CodeMirror . on ( showReplaceButton , "click" , function ( ) {
159
161
if ( replaceDiv . style . height === "0px" ) {
160
- replaceDiv . style . height = "50px" ;
161
- toggleReplaceBtnDiv . style . height = "90px" ;
162
- showReplaceButton . style . height = "90px" ;
162
+ replaceDiv . style . height = replaceDivHeightOpened ;
163
+ toggleReplaceBtnDiv . style . height = toggleButtonHeightOpened ;
164
+ showReplaceButton . style . height = toggleButtonHeightOpened ;
163
165
showReplaceButton . innerHTML = "▼" ;
164
166
} else {
165
- replaceDiv . style . height = "0px" ;
166
- toggleReplaceBtnDiv . style . height = "40px" ;
167
- showReplaceButton . style . height = "40px" ;
167
+ replaceDiv . style . height = replaceDivHeightClosed ;
168
+ toggleReplaceBtnDiv . style . height = toggleButtonHeightClosed ;
169
+ showReplaceButton . style . height = toggleButtonHeightClosed ;
168
170
showReplaceButton . innerHTML = "▶" ;
169
171
}
170
172
} ) ;
@@ -465,7 +467,7 @@ export default function(CodeMirror) {
465
467
title="Replace"
466
468
aria-label="Replace"
467
469
role="button"
468
- class="CodeMirror-search-modifier-button CodeMirror-replace-button"
470
+ class="CodeMirror-search-modifier-button CodeMirror-replace-toggle- button"
469
471
>
470
472
<span aria-hidden="true" class="button">▶</span>
471
473
</button>
@@ -534,18 +536,16 @@ export default function(CodeMirror) {
534
536
aria-label="Replace"
535
537
role="button"
536
538
id="Btn-replace"
537
- class="CodeMirror-search-modifier-button CodeMirror-replace-button"
539
+ class="CodeMirror-search-modifier-button CodeMirror-replace-button icon replace "
538
540
>
539
- <span aria-hidden="true" class="button">Replace</span>
540
541
</button>
541
542
<button
542
543
title="Replace All"
543
544
aria-label="Replace All"
544
545
role="button"
545
546
id="Btn-replace-all"
546
- class="CodeMirror-search-modifier-button CodeMirror-replace-button"
547
+ class="CodeMirror-search-modifier-button CodeMirror-replace-button icon replace-all "
547
548
>
548
- <span aria-hidden="true" class="button">Replace All</span>
549
549
</button>
550
550
</div>
551
551
</div>
0 commit comments