@@ -8,7 +8,7 @@ export default class SchemaEditor {
88 init ( ) {
99 if ( $ ( "#form fieldset" , this . el ) . length >= 2 ) {
1010 // If multiple fieldsets, release after autotoc has been initialized
11- if ( $ ( "#form .autotoc-nav > a" , this . el ) . length ) {
11+ if ( $ ( "#form .autotoc-nav a" , this . el ) . length ) {
1212 // pat-autotoc already initialized, script probably run after
1313 // mockup initialization.
1414 this . init_schemaeditor ( ) ;
@@ -107,15 +107,15 @@ export default class SchemaEditor {
107107 var self = this ;
108108 // ///////////////
109109 // ADD FIELD INIT
110- $ ( "#form .autotoc-nav > a" , this . el ) . each ( function ( ) {
110+ $ ( "#form .autotoc-nav a" , this . el ) . each ( function ( ) {
111111 $ ( this ) . on ( "click" , function ( e ) {
112112 e . preventDefault ( ) ;
113113 var fieldset_id = $ ( this ) . attr ( "data-fieldset_drag_id" ) ;
114114 self . init_add_field ( fieldset_id ) ;
115115 } ) ;
116116 } ) ;
117117
118- var fieldset_id = $ ( "#form .autotoc-nav > a.active" , this . el ) . attr (
118+ var fieldset_id = $ ( "#form .autotoc-nav a.active" , this . el ) . attr (
119119 "data-fieldset_drag_id"
120120 ) ;
121121 this . init_add_field ( fieldset_id ) ;
@@ -247,8 +247,7 @@ $.fn.plone_schemaeditor_html5_sortable = function (
247247 }
248248 $ ( this ) . attr ( "data-fieldset_drag_id" , i ) ;
249249 } ) ;
250- $ ( "#form .autotoc-nav > a" ) . each ( function ( i ) {
251- // Plone 5 / mockup
250+ $ ( "#form .autotoc-nav a" ) . each ( function ( i ) {
252251 var $fieldset = $ ( "#form fieldset#fieldset-" + i , self . el ) ;
253252 if ( $fieldset . data ( "can-add-fields" ) === true ) {
254253 $ ( this ) . attr ( "droppable" , "true" ) ;
0 commit comments