File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,8 +86,9 @@ $(document).ready(function () {
8686 const pluginToggle = $ ( ".control-sidebar-button" ) ;
8787 const largeScreen = screen . width > 1280 ;
8888
89- // Gestione click sul pulsante per il toggle
90- pluginToggle . on ( "click" , function ( ) {
89+ // Gestione click sul pulsante per il toggle (solo se il pulsante esiste)
90+ if ( pluginToggle . length > 0 ) {
91+ pluginToggle . on ( "click" , function ( ) {
9192 // Add a subtle animation to the button
9293 $ ( this ) . css ( {
9394 "transform" : "scale(0.95)" ,
@@ -112,9 +113,10 @@ $(document).ready(function () {
112113 } , 300 ) ;
113114 } ) ;
114115
115- // Barra plugin laterale disabilitata per schermi piccoli
116- if ( largeScreen && ! globals . collapse_plugin_sidebar ) {
117- pluginToggle . click ( ) ;
116+ // Barra plugin laterale disabilitata per schermi piccoli
117+ if ( largeScreen && ! globals . collapse_plugin_sidebar ) {
118+ pluginToggle . click ( ) ;
119+ }
118120 }
119121
120122 $ ( 'a[data-toggle="tab"]' ) . on ( 'shown.bs.tab' , function ( e ) {
Original file line number Diff line number Diff line change 555555
556556 $ in_editor = string_contains ($ _SERVER ['SCRIPT_FILENAME ' ], 'editor.php ' );
557557 $ in_controller = string_contains ($ _SERVER ['SCRIPT_FILENAME ' ], 'controller.php ' );
558- if (($ in_editor || $ in_controller ) && !$ isInstallation ) {
558+ if (($ in_editor || $ in_controller ) && !$ isInstallation && $ has_plugins > 0 ) {
559559 // Menu laterale per la visualizzazione dei plugin
560560 echo '
561561 <div class="control-sidebar-button" title=" ' .tr ('Plugin ' ).'">
You can’t perform that action at this time.
0 commit comments