Skip to content

Commit

Permalink
Merge branch '2.0' into 2.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	client/dist/js/TinyMCE_sslink.js
#	client/dist/js/bundle.js
#	client/src/legacy/TinyMCE_sslink.js
  • Loading branch information
GuySartorelli committed Sep 17, 2023
2 parents 724d845 + e22d042 commit 1650489
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 21 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-email.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-external.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion client/src/containers/FormBuilderLoader/FormBuilderLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ class FormBuilderLoader extends Component {
return formSchema;
})
.catch((error) => {
this.setState({ didError: true });
this.props.actions.schema.setSchemaLoading(this.props.schemaUrl, false);
if (typeof this.props.onLoadingError === 'function') {
return this.props.onLoadingError(this.normaliseError(error));
Expand Down Expand Up @@ -411,10 +412,13 @@ class FormBuilderLoader extends Component {
}

render() {
const Loading = this.props.loadingComponent;
if (this.state && this.state.didError) {
return null;
}
// If the response from fetching the initial data
// hasn't come back yet, don't render anything.
if (!this.props.schema || !this.props.schema.schema || this.props.loading) {
const Loading = this.props.loadingComponent;
return <Loading containerClass="loading--form flexbox-area-grow" />;
}

Expand Down
6 changes: 1 addition & 5 deletions client/src/legacy/TinyMCE_sslink-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ jQuery.entwine('ss', ($) => {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
const editor = this.getElement().getEditor();
const selection = editor.getInstance().selection;
const selectionContent = editor.getSelection();
const tagName = selection.getNode().tagName;
const requireLinkText = tagName !== 'A' && selectionContent.trim() === '';
const requireLinkText = this.getRequireLinkText();

// create/update the react component
let root = this.getReactRoot();
Expand Down
6 changes: 1 addition & 5 deletions client/src/legacy/TinyMCE_sslink-external.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ jQuery.entwine('ss', ($) => {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
const editor = this.getElement().getEditor();
const selection = editor.getInstance().selection;
const selectionContent = editor.getSelection();
const tagName = selection.getNode().tagName;
const requireLinkText = tagName !== 'A' && selectionContent.trim() === '';
const requireLinkText = this.getRequireLinkText();

// create/update the react component
let root = this.getReactRoot();
Expand Down
Loading

0 comments on commit 1650489

Please sign in to comment.