← All changes
|
classes/Visualizer/Gutenberg/src/Components/Sidebar/FrontendActions.js
+1
-41
3.10.11
→
3.2.1
View file →
| @@ -8,9 +8,8 @@ | ||
| 8 | 8 | Fragment |
| 9 | 9 | } = wp.element; |
| 10 | 10 | |
| 11 | 11 | const { |
| 12 | - Button, | |
| 13 | 12 | CheckboxControl, |
| 14 | 13 | PanelBody |
| 15 | 14 | } = wp.components; |
| 16 | 15 | |
| @@ -31,12 +30,10 @@ | ||
| 31 | 30 | |
| 32 | 31 | render() { |
| 33 | 32 | |
| 34 | 33 | const settings = this.props.chart['visualizer-settings']; |
| 35 | - const type = this.props.chart['visualizer-chart-type']; | |
| 36 | 34 | |
| 37 | 35 | return ( |
| 38 | - ( '' !== visualizerLocalize.proFeaturesLocked ) ? | |
| 39 | 36 | <PanelBody |
| 40 | 37 | title={ __( 'Frontend Actions' ) } |
| 41 | 38 | initialOpen={ false } |
| 42 | 39 | className="visualizer-advanced-panel" |
| @@ -113,50 +110,13 @@ | ||
| 113 | 110 | this.props.edit( settings ); |
| 114 | 111 | } } |
| 115 | 112 | /> |
| 116 | 113 | |
| 117 | - { ( -1 >= [ 'dataTable', 'tabular', 'gauge', 'table' ].indexOf( type ) ) && ( | |
| 118 | - <CheckboxControl | |
| 119 | - label={ __( 'Download Image' ) } | |
| 120 | - help={ __( 'To download the chart as an image.' ) } | |
| 121 | - checked={ ( 0 <= settings.actions.indexOf( 'image' ) ) } | |
| 122 | - onChange={ e => { | |
| 123 | - if ( 0 <= settings.actions.indexOf( 'image' ) ) { | |
| 124 | - const index = settings.actions.indexOf( 'image' ); | |
| 125 | - if ( -1 !== index ) { | |
| 126 | - settings.actions.splice( index, 1 ); | |
| 127 | - } | |
| 128 | - } else { | |
| 129 | - settings.actions.push( 'image' ); | |
| 130 | - } | |
| 131 | - this.props.edit( settings ); | |
| 132 | - } } | |
| 133 | - /> | |
| 134 | - ) } | |
| 135 | - | |
| 136 | 114 | </Fragment> |
| 137 | 115 | |
| 138 | 116 | ) } |
| 139 | 117 | |
| 140 | - </PanelBody> : | |
| 141 | - <PanelBody | |
| 142 | - title={ __( 'Frontend Actions' ) } | |
| 143 | - initialOpen={ false } | |
| 144 | - icon="lock" | |
| 145 | - className="visualizer-advanced-panel" | |
| 146 | - > | |
| 147 | - | |
| 148 | - <p>{ __( 'Enable this feature in PRO version!' ) }</p> | |
| 149 | - | |
| 150 | - <Button | |
| 151 | - isPrimary | |
| 152 | - href={ visualizerLocalize.proTeaser } | |
| 153 | - target="_blank" | |
| 154 | - > | |
| 155 | - { __( 'Upgrade Now' ) } | |
| 156 | - </Button> | |
| 157 | - | |
| 158 | - </PanelBody> | |
| 118 | + </PanelBody> | |
| 159 | 119 | ); |
| 160 | 120 | } |
| 161 | 121 | } |
| 162 | 122 | |