File tree 3 files changed +44
-5
lines changed
app/code/Magento/Tinymce3/view/base/web
dev/tests/js/jasmine/tests/lib/mage
lib/internal/Magento/Framework/Data/Form/Element 3 files changed +44
-5
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ define([
78
78
}
79
79
80
80
tinyMCE3 . init ( this . getSettings ( mode ) ) ;
81
- varienGlobalEvents . clearEventHandlers ( " open_browser_callback" ) ;
82
- varienGlobalEvents . attachEventHandler ( " open_browser_callback" , tinyMceEditors . get ( this . id ) . openFileBrowser ) ;
81
+ varienGlobalEvents . clearEventHandlers ( ' open_browser_callback' ) ;
82
+ varienGlobalEvents . attachEventHandler ( ' open_browser_callback' , tinyMceEditors . get ( this . id ) . openFileBrowser ) ;
83
83
} ,
84
84
85
85
/**
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+
6
+ define ( [
7
+ 'wysiwygAdapter' ,
8
+ 'underscore'
9
+ ] , function ( wysiwygAdapter , _ ) {
10
+ 'use strict' ;
11
+
12
+ var obj ;
13
+
14
+ beforeEach ( function ( ) {
15
+
16
+ /**
17
+ * Dummy constructor to use for instantiation
18
+ * @constructor
19
+ */
20
+ var Constr = function ( ) { } ;
21
+
22
+ Constr . prototype = wysiwygAdapter ;
23
+
24
+ obj = new Constr ( ) ;
25
+ obj . eventBus = new window . varienEvents ( ) ;
26
+ obj . initialize ( 1 , {
27
+ 'store_id' : 0 ,
28
+ 'tinymce4' : {
29
+ 'content_css' : ''
30
+ } ,
31
+ 'files_browser_window_url' : 'url'
32
+ } ) ;
33
+ obj . setup ( ) ;
34
+ } ) ;
35
+
36
+ describe ( '"openFileBrowser" method' , function ( ) {
37
+ it ( 'Opens file browser to given instance' , function ( ) {
38
+ expect ( _ . size ( obj . eventBus . arrEvents [ 'open_browser_callback' ] ) ) . toBe ( 1 ) ;
39
+ } ) ;
40
+ } ) ;
41
+ } ) ;
Original file line number Diff line number Diff line change @@ -310,9 +310,7 @@ protected function _getPluginButtonsHtml($visible = true)
310
310
if (isset ($ buttonOptions ['style ' ])) {
311
311
$ configStyle = $ buttonOptions ['style ' ];
312
312
}
313
- // phpcs:disable Magento2.Performance.ForeachArrayMerge
314
- $ buttonOptions = array_merge ($ buttonOptions , ['style ' => 'display:none; ' . $ configStyle ]);
315
- // phpcs:enable
313
+ $ buttonOptions ['style ' ] = 'display:none; ' . $ configStyle ;
316
314
}
317
315
$ buttonsHtml .= $ this ->_getButtonHtml ($ buttonOptions );
318
316
}
You can’t perform that action at this time.
0 commit comments