File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
control/content/controllers Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 197197 ContentHome . deleteEntity = function ( obj , isFolder ) {
198198 var nodeData = obj . $modelValue ;
199199 var pluginInstanceArray = [ ] ;
200+
201+ function getLeaf ( node ) {
202+ if ( node . items ) {
203+ node . items . forEach ( function ( item ) {
204+ return getLeaf ( item ) ;
205+ } ) ;
206+ }
207+ else {
208+ return pluginInstanceArray . push ( node . instanceId ) ;
209+ }
210+ }
211+
200212 Modals . removePopupModal ( isFolder ) . then ( function ( result ) {
201213 if ( result ) {
202214 if ( nodeData . hasOwnProperty ( 'items' ) ) {
215+
203216 getLeaf ( nodeData ) ;
204- function getLeaf ( node ) {
205- if ( node . items ) {
206- node . items . forEach ( function ( item ) {
207- return getLeaf ( item ) ;
208- } ) ;
209- }
210- else {
211- return pluginInstanceArray . push ( node . instanceId ) ;
212- }
213- }
217+
214218
215219 ContentHome . info . data . _buildfire . plugins . data = ContentHome . info . data . _buildfire . plugins . data . filter ( function ( x ) { return pluginInstanceArray . indexOf ( x ) < 0 } )
216220
You can’t perform that action at this time.
0 commit comments