dashboard-review-ask.js
4 years ago
ewd-us-admin.js
3 years ago
ewd-us-blocks.js
3 years ago
ewd-us-helper-install-notice.js
4 years ago
ewd-us-welcome-screen.js
4 years ago
ewd-us.js
4 years ago
jquery.iframetracker.js
4 years ago
plugin-deactivation.js
1 month ago
ultimate-lightbox.js
4 years ago
ewd-us-blocks.js
63 lines
| 1 | var el = wp.element.createElement, |
| 2 | registerBlockType = wp.blocks.registerBlockType, |
| 3 | ServerSideRender = wp.serverSideRender, |
| 4 | TextControl = wp.components.TextControl, |
| 5 | SelectControl = wp.components.SelectControl, |
| 6 | InspectorControls = wp.blockEditor.InspectorControls; |
| 7 | |
| 8 | registerBlockType( 'ultimate-slider/ewd-us-slider-block', { |
| 9 | title: 'Display Slider', |
| 10 | icon: 'slides', |
| 11 | category: 'ewd-us-blocks', |
| 12 | attributes: { |
| 13 | category: { type: 'string' }, |
| 14 | posts: { type: 'posts' }, |
| 15 | slider_type: { type: 'string' }, |
| 16 | carousel_mode: { type: 'string' }, |
| 17 | slide_indicators: { type: 'string' }, |
| 18 | }, |
| 19 | |
| 20 | edit: function( props ) { |
| 21 | var returnString = []; |
| 22 | returnString.push( |
| 23 | el( InspectorControls, {}, |
| 24 | el( TextControl, { |
| 25 | label: 'Category', |
| 26 | value: props.attributes.category, |
| 27 | onChange: ( value ) => { props.setAttributes( { category: value } ); }, |
| 28 | } ), |
| 29 | el( TextControl, { |
| 30 | label: 'Number of Slides', |
| 31 | value: props.attributes.posts, |
| 32 | onChange: ( value ) => { props.setAttributes( { posts: value } ); }, |
| 33 | } ), |
| 34 | el( SelectControl, { |
| 35 | label: 'Type of Slider', |
| 36 | value: props.attributes.slider_type, |
| 37 | options: [ {value: 'regular', label: 'Regular'}, {value: 'woocommerce', label: 'WooCommerce'}, {value: 'upcp', label: 'Ultimate Product Catalog'}, {value: 'urp', label: 'Ultimate Reviews'} ], |
| 38 | onChange: ( value ) => { props.setAttributes( { slider_type: value } ); }, |
| 39 | } ), |
| 40 | el( SelectControl, { |
| 41 | label: 'Carousel Mode', |
| 42 | value: props.attributes.carousel_mode, |
| 43 | options: [ {value: 'No', label: 'No'}, {value: 'Yes', label: 'Yes'} ], |
| 44 | onChange: ( value ) => { props.setAttributes( { carousel_mode: value } ); }, |
| 45 | } ), |
| 46 | el( SelectControl, { |
| 47 | label: 'Slide Indicators', |
| 48 | value: props.attributes.slide_indicators, |
| 49 | options: [ {value: 'Dots', label: 'Dots'}, {value: 'Thumbnails', label: 'Thumbnails'}, {value: 'Side Thumbnails', label: 'Side Thumbnails'}, {value: 'None', label: 'None'} ], |
| 50 | onChange: ( value ) => { props.setAttributes( { slide_indicators: value } ); }, |
| 51 | } ), |
| 52 | ), |
| 53 | ); |
| 54 | returnString.push( el( 'div', { class: 'ewd-us-admin-block ewd-us-admin-block-display-slider' }, 'Ultimate Slider' ) ); |
| 55 | return returnString; |
| 56 | }, |
| 57 | |
| 58 | save: function() { |
| 59 | return null; |
| 60 | }, |
| 61 | } ); |
| 62 | |
| 63 |