Changeset 1968406
- Timestamp:
- 11/04/2018 12:28:25 AM (7 years ago)
- Location:
- amilia-store/trunk
- Files:
-
- 2 edited
-
amilia-store.php (modified) (1 diff)
-
blocks/amilia-store-iframe.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amilia-store/trunk/amilia-store.php
r1968084 r1968406 6 6 Author: Martin Drapeau <martin.drapeau@amilia.com> 7 7 Copyright: 2014-2018 Amilia 8 Version: 2.8. 18 Version: 2.8.2 9 9 Author URI: http://www.amilia.com/ 10 10 License: Apache License 2.0 -
amilia-store/trunk/blocks/amilia-store-iframe.js
r1968082 r1968406 1 1 (function(wp) { 2 var registerBlockType = wp.blocks.registerBlockType;2 var registerBlockType = wp.blocks.registerBlockType; 3 3 var InspectorControls = wp.editor.InspectorControls; 4 4 var PanelBody = wp.components.PanelBody; … … 8 8 var SelectControl = wp.components.SelectControl; 9 9 var Dashicon = wp.components.Dashicon; 10 var el = wp.element.createElement;10 var el = wp.element.createElement; 11 11 var withState = wp.compose.withState; 12 var __ = wp.i18n.__;12 var __ = wp.i18n.__; 13 13 14 14 function AmiliaControl(props) { … … 18 18 var status = props.status; 19 19 var url = attributes.url === null ? window.Amilia.storeUrl : attributes.url; 20 if (url != attributes.url) setAttributes({url: url}); 20 21 21 22 function onValidateUrl(result) { … … 68 69 } 69 70 70 registerBlockType('amilia-store/amilia-store-iframe', {71 title: __('Amilia Store'),72 category: 'embed',73 icon: {71 registerBlockType('amilia-store/amilia-store-iframe', { 72 title: __('Amilia Store'), 73 category: 'embed', 74 icon: { 74 75 foreground: '#46aaf8', 75 src: 'store'76 },76 src: 'store' 77 }, 77 78 attributes: { 78 79 url: { … … 85 86 } 86 87 }, 87 edit: withState({status: ''})(AmiliaControl),88 save: function(props) {88 edit: withState({status: ''})(AmiliaControl), 89 save: function(props) { 89 90 return null; 90 }91 });91 } 92 }); 92 93 93 94 })(window.wp);
Note: See TracChangeset
for help on using the changeset viewer.