File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Resources/Private/Templates/Toolbox Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,8 @@ public function imagemanipulationtool()
271271
272272 $ this ->view ->assign ('imageManipulation ' , true );
273273 $ this ->view ->assign ('parentContainer ' , $ parentContainer );
274+ // activate it here as it is the most common used tool
275+ $ this ->view ->assign ('activateToolbox ' , true );
274276 }
275277
276278 /**
Original file line number Diff line number Diff line change 189189 </ f:if >
190190</ ul >
191191
192- < script >
193- window . addEventListener ( 'tx-dlf-documentLoaded' , ( e ) => {
194- // Avoid instantiating dlfToolbox multiple times;
195- // TODO(client-side): Rethink how it's done
196- if ( ! window . tx_dlf_toolbox ) {
197- window . tx_dlf_toolbox = new dlfToolbox ( e . detail . docController ) ;
198- }
199- } ) ;
200- </ script >
192+ < f:if condition ="{activateToolbox} ">
193+ < f:then >
194+ < script >
195+ window . addEventListener ( 'tx-dlf-documentLoaded' , ( e ) => {
196+ if ( ! window . tx_dlf_toolbox ) {
197+ window . tx_dlf_toolbox = new dlfToolbox ( e . detail . docController ) ;
198+ }
199+ } ) ;
200+ </ script >
201+ </ f:then >
202+ </ f:if >
201203
202204</ html >
You can’t perform that action at this time.
0 commit comments