Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kessler committed Jul 30, 2020
1 parent 5b1b5f9 commit 83cbd75
Show file tree
Hide file tree
Showing 18 changed files with 7,162 additions and 7 deletions.
Binary file added .DS_Store
Binary file not shown.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .eslintignore
100644 → 100755
Empty file.
Empty file modified .eslintrc.json
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion dist/blocks.build.js
100644 → 100755

Large diffs are not rendered by default.

Empty file modified dist/blocks.editor.build.css
100644 → 100755
Empty file.
Empty file modified dist/blocks.style.build.css
100644 → 100755
Empty file.
7,146 changes: 7,146 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified plugin.php
100644 → 100755
Empty file.
Binary file added src/.DS_Store
Binary file not shown.
Empty file modified src/blocks.js
100644 → 100755
Empty file.
Empty file modified src/common.scss
100644 → 100755
Empty file.
Empty file modified src/employee-block/editor.scss
100644 → 100755
Empty file.
21 changes: 15 additions & 6 deletions src/employee-block/index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import './style.scss';

const { __ } = wp.i18n;
const { registerBlockType } = wp.blocks;
const { RichText } = wp.editor;
const { PlainText } = wp.editor;
const { MediaUpload } = wp.editor;
const { RichText, PlainText, MediaUpload } = wp.editor;
const { Button } = wp.components;

registerBlockType( 'swo-blocks/employee-block', {
Expand All @@ -29,10 +27,15 @@ registerBlockType( 'swo-blocks/employee-block', {
source: 'attribute',
attribute: 'alt',
selector: 'img'
},
test: {
type: 'string',
source: 'text',
selector: '.test-content'
}
},

edit: function( {className, attributes, setAttributes} ) {
edit: function( {className, attributes, setAttributes, props} ) {

const { employeeName } = attributes;
const { employeeFunct } = attributes;
Expand Down Expand Up @@ -69,14 +72,20 @@ registerBlockType( 'swo-blocks/employee-block', {
<div className="wrap-boxes">
<div className="imageDiv img-background imageDivteam"></div>
<div className="imageDiv bottomDiv classic-text bottomDivteam">
<PlainText
onChange={ newTest => {props.setAttributes({test: newTest})}}
value={props.attributes.test}
className= {className}
placeholder="This is a test"
/>
<RichText
tagName="h1"
className= {className}
onChange= {onChangeName}
value= {employeeName}
placeholder= "Vorname Nachname"
keepPlaceholderOnFocus={true}
allowedFormats={'none'}
allowedFormats={'core/bold'}
/>
<RichText
tagName="h7"
Expand Down Expand Up @@ -128,7 +137,7 @@ registerBlockType( 'swo-blocks/employee-block', {
);
},

save: function( {className, attributes} ) {
save: function( {className, attributes, props} ) {

const { employeeName } = attributes;
const { employeeFunct } = attributes;
Expand Down
Empty file modified src/employee-block/style.scss
100644 → 100755
Empty file.
Empty file modified src/init.php
100644 → 100755
Empty file.

0 comments on commit 83cbd75

Please sign in to comment.