// Gutenberg block editor scripts for a-staff // Loading required parts const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; const { BaseControl, PanelBody, SelectControl, ServerSideRender, TextControl } = wp.components; // Registering the block itself registerBlockType( 'a-staff/loop-block', { title : A_STAFF_LOOP_BLOCK.block_title, icon : 'groups', category : 'widgets', supports : { anchor : false, customClassName : false }, edit( props ) { return [ { props.setAttributes( { columns: parseInt( event.target.value ) } ); } } value={ props.attributes.columns } min={ A_STAFF_LOOP_BLOCK.columns_min } max={ A_STAFF_LOOP_BLOCK.columns_max } /> { props.setAttributes( { orderby: value } ); } } /> { props.setAttributes( { order: value } ); } } /> { props.setAttributes( { class: value } ); } } /> { props.setAttributes( { ids: value } ); } } /> { props.setAttributes( { exclude: value } ); } } /> { props.setAttributes( { department: value } ); } } /> { props.setAttributes( { exclude_department: value } ); } } /> , ] }, save() { return null; }, } ); // Preventing the links to be clickable in admin $(document).on('click','.a-staff-member-box-wrapper a', function(e){ e.preventDefault(); });