adapting namespace & refactoring few bugs
This commit is contained in:
parent
07b386d696
commit
b1d8177676
|
|
@ -64,7 +64,7 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
<InspectorControls>
|
<InspectorControls>
|
||||||
<PanelBody
|
<PanelBody
|
||||||
className="homegrade-blocks-content-page-header__panel-cta"
|
className="homegrade-blocks-content-page-header__panel-cta"
|
||||||
title={__("Call to action", "homegrade-blocks__texte-fonctionnel")}
|
title={__("Call to action", "homegrade-blocks__texte-backoffice")}
|
||||||
>
|
>
|
||||||
<ToggleControl
|
<ToggleControl
|
||||||
label="Afficher un call to action"
|
label="Afficher un call to action"
|
||||||
|
|
@ -83,7 +83,7 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
label="Lien du cta"
|
label="Lien du cta"
|
||||||
title={__(
|
title={__(
|
||||||
"Call to action",
|
"Call to action",
|
||||||
"homegrade-blocks__texte-fonctionnel"
|
"homegrade-blocks__texte-backoffice"
|
||||||
)}
|
)}
|
||||||
value={cta}
|
value={cta}
|
||||||
onChange={onChangeCTA}
|
onChange={onChangeCTA}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<p <?php echo get_block_wrapper_attributes(); ?>>
|
<p <?php echo get_block_wrapper_attributes(); ?>>
|
||||||
<?php esc_html_e( 'Test – hello from a dynamic block!', 'test' ); ?>
|
Test – hello from a dynamic block!
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<p <?php echo get_block_wrapper_attributes(); ?>>
|
<p <?php echo get_block_wrapper_attributes(); ?>>
|
||||||
<?php esc_html_e( 'Test – hello from a dynamic block!', 'test' ); ?>
|
Test – hello from a dynamic block!
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -111,7 +111,7 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
|
||||||
return (
|
return (
|
||||||
<InspectorControls>
|
<InspectorControls>
|
||||||
<PanelBody
|
<PanelBody
|
||||||
title={__("Question Relié", "homegrade-blocks__texte-fonctionnel")}
|
title={__("Question Relié", "homegrade-blocks__texte-backoffice")}
|
||||||
>
|
>
|
||||||
{/* <SelectControl
|
{/* <SelectControl
|
||||||
label={panelTitle}
|
label={panelTitle}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { useEffect } from "@wordpress/element";
|
||||||
import { decodeEntities } from "@wordpress/html-entities";
|
import { decodeEntities } from "@wordpress/html-entities";
|
||||||
import OptionsSelectControl from "./OptionsSelectControl";
|
import OptionsSelectControl from "./OptionsSelectControl";
|
||||||
|
|
||||||
|
|
||||||
function parseBlockContentForTooltips(editorContent) {
|
function parseBlockContentForTooltips(editorContent) {
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const doc = parser.parseFromString(editorContent, "text/html");
|
const doc = parser.parseFromString(editorContent, "text/html");
|
||||||
|
|
@ -57,8 +56,6 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
|
|
||||||
<OptionsSelectControl
|
<OptionsSelectControl
|
||||||
relatedPostId={relatedPostId}
|
relatedPostId={relatedPostId}
|
||||||
setAttributes={setAttributes}
|
setAttributes={setAttributes}
|
||||||
|
|
@ -74,7 +71,7 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
<p>
|
<p>
|
||||||
{__(
|
{__(
|
||||||
"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.",
|
"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.",
|
||||||
"homegrade-blocks__texte-fonctionnel"
|
"homegrade-blocks__texte-backoffice"
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@ import {
|
||||||
ToolbarGroup,
|
ToolbarGroup,
|
||||||
ToolbarButton,
|
ToolbarButton,
|
||||||
Button,
|
Button,
|
||||||
|
Tip,
|
||||||
} from "@wordpress/components";
|
} from "@wordpress/components";
|
||||||
import { useEffect } from "@wordpress/element";
|
import { useEffect } from "@wordpress/element";
|
||||||
import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor";
|
import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor";
|
||||||
import { trash } from "@wordpress/icons";
|
import { trash } from "@wordpress/icons";
|
||||||
import { Tip } from "@wordpress/components";
|
|
||||||
export default function Edit({ attributes, setAttributes, ...props }) {
|
export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
let {
|
let {
|
||||||
timelineStepTitle,
|
timelineStepTitle,
|
||||||
|
|
@ -41,7 +41,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
setAttributes({ timelineStepSubtitle });
|
setAttributes({ timelineStepSubtitle });
|
||||||
}
|
}
|
||||||
function setImageAttributes(media) {
|
function setImageAttributes(media) {
|
||||||
console.log(media);
|
|
||||||
if (!media || !media.url) {
|
if (!media || !media.url) {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
timelineStepImageUrl: null,
|
timelineStepImageUrl: null,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user