Skip to content

Commit

Permalink
make popup clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Jul 14, 2024
1 parent a4b6c88 commit c53d6da
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
11 changes: 11 additions & 0 deletions assets/css/gutenberg-syndicated-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ body.dt-linked-post {
cursor: default;
}

.distributed-modal-popup {
& * {
pointer-events: auto;
opacity: 1;
}

a, button {
cursor: pointer;
}
}

/* Allow clicks on confirmation dialog buttons */
.components-confirm-dialog button {
opacity: 1;
Expand Down
43 changes: 20 additions & 23 deletions assets/js/gutenberg-plugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { pluginIcon } from './components/plugin-icon';

import { Icon, Modal } from '@wordpress/components';
import { Icon, Modal, Button, Flex } from '@wordpress/components';
import { select, useSelect } from '@wordpress/data';
import { PluginDocumentSettingPanel } from '@wordpress/edit-post';
import { __, _n, _x, sprintf } from '@wordpress/i18n';
Expand Down Expand Up @@ -176,31 +176,28 @@ const RenderDistributedFrom = () => {
className="distributed-modal-popup"
overlayClassName="distributed-modal-overlay"
>
<span id="distributed-data">
{ __( 'Unlinking from the ', 'distributor' ) }
<a href={ dtGutenberg.postUrl }>
{ __( 'Original Content', 'distributor' ) }
</a>
{ __(
' will stop updating this post automatically.',
'distributor'
) }
</span>
<br />
<div className="actions">
<a
<p dangerouslySetInnerHTML={ {

Check failure on line 179 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L179

[prettier/prettier] Replace `·` with `⏎↹↹↹↹↹↹↹`
__html: sprintf(

Check failure on line 180 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L180

[prettier/prettier] Insert `↹`
__( 'Unlinking from the %1$sOriginal Content%2$s will stop updating this post automatically.', 'distributor' ),

Check failure on line 181 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L181

[prettier/prettier] Replace `__(·'Unlinking·from·the·%1$sOriginal·Content%2$s·will·stop·updating·this·post·automatically.',·'distributor'·` with `↹__(⏎↹↹↹↹↹↹↹↹↹↹'Unlinking·from·the·%1$sOriginal·Content%2$s·will·stop·updating·this·post·automatically.',⏎↹↹↹↹↹↹↹↹↹↹'distributor'⏎↹↹↹↹↹↹↹↹↹`

Check failure on line 181 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L181

[@wordpress/i18n-translator-comments] Translation function with placeholders is missing preceding translator comment
'<a href="' + dtGutenberg.postUrl + '">',

Check failure on line 182 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L182

[prettier/prettier] Insert `↹`
'</a>'

Check failure on line 183 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L183

[prettier/prettier] Insert `↹`
)

Check failure on line 184 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L184

[prettier/prettier] Replace `)` with `↹),`
} } />

Check failure on line 185 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L185

[prettier/prettier] Replace `}·}·` with `↹}·}⏎↹↹↹↹↹↹`
<Flex justify='flex-end'>

Check failure on line 186 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L186

[prettier/prettier] Replace `'flex-end'` with `"flex-end"`
<Button
icon={ <Icon icon="editor-unlink" /> }
variant='secondary'

Check failure on line 189 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L189

[prettier/prettier] Replace `'secondary'` with `"secondary"`
href={ dtGutenberg.unlinkNonceUrl }
className="button"
>
<span className="dashicons dashicons-editor-unlink"></span>
{ __( 'Unlink', 'distributor' ) }
</a>
<span id="close" onClick={ closeModal }> {/* eslint-disable-line */}
<a href='javascript:void(0);'> {/* eslint-disable-line */}
{ __( 'Cancel', 'distributor' ) }
</a>
</span>
</div>
</Button>
<Button
variant='link'
onClick={ closeModal }
>

Check failure on line 197 in assets/js/gutenberg-plugin.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

assets/js/gutenberg-plugin.js#L194-L197

[prettier/prettier] Replace `⏎↹↹↹↹↹↹↹↹variant='link'⏎↹↹↹↹↹↹↹↹onClick={·closeModal·}⏎↹↹↹↹↹↹↹` with `·variant="link"·onClick={·closeModal·}`
{ __( 'Cancel', 'distributor' ) }
</Button>
</Flex>
</Modal>
) }
</div>
Expand Down

0 comments on commit c53d6da

Please sign in to comment.