File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ define([
7070 'display: none; position: fixed;' ) ;
7171 // edit button
7272 sbBlockMenu . appendLine ( '<div id="vp_block_menu_edit" class="vp-block-menu-item">Edit</div>' ) ;
73- sbBlockMenu . appendLine ( '<hr class="vp-extra-menu-line">' ) ;
73+ sbBlockMenu . appendLine ( '<hr class="vp-extra-menu-line" id="vp_block_menu_line_1" >' ) ;
7474 // run button
7575 sbBlockMenu . appendLine ( '<div id="vp_block_menu_run" class="vp-block-menu-item">Run</div>' ) ;
7676 // add button
@@ -91,11 +91,21 @@ define([
9191 } ;
9292
9393 $ ( this . wrapSelector ( ) ) . css ( this . position ) ;
94+ // show items
95+ $ ( this . wrapSelector ( '.vp-block-menu-item' ) ) . show ( ) ;
96+ $ ( this . wrapSelector ( '.vp-extra-menu-line' ) ) . show ( ) ;
9497 $ ( this . wrapSelector ( ) ) . show ( ) ;
98+
9599 // filter menu depends on block
100+ let noContentBlocks = [ 'lgCtrl_try' , 'lgCtrl_else' , 'lgCtrl_finally' ] ;
96101 if ( this . block . isSubBlock ) {
97102 // no duplicate
98103 $ ( this . wrapSelector ( '#vp_block_menu_duplicate' ) ) . hide ( ) ;
104+ }
105+ if ( noContentBlocks . includes ( this . block . id ) ) {
106+ // no edit mode
107+ $ ( this . wrapSelector ( '#vp_block_menu_edit' ) ) . hide ( ) ;
108+ $ ( this . wrapSelector ( '#vp_block_menu_line_1' ) ) . hide ( ) ;
99109 }
100110 }
101111
You can’t perform that action at this time.
0 commit comments