Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Option to Delete Used Image #28102

Merged
merged 3 commits into from May 14, 2019
Merged

Conversation

epeach
Copy link

@epeach epeach commented Apr 19, 2019

deleteimages

The delete assets dialog was still leading some students to delete images that were in use in their project. This change disables the delete button for elements that are in use in the project and displays a message explaining why those images can't be deleted when the delete button is clicked.

@epeach
Copy link
Author

epeach commented May 11, 2019

wakeup
Waking this PR back up!
The initial attempt here was assuming that the src file would end with the name of the asset. Turns out that is not the case before an image is saved in the source. So I updated the css selector to look for a img source that includes the asset name.
PTAL!

Copy link
Contributor

@ajpal ajpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@epeach epeach merged commit 5c425d1 into staging May 14, 2019
@@ -185,40 +116,34 @@ export default class AssetRow extends React.Component {
flex = size + ' kb';
}

let usage = $('#visualization').find(
`[src*=\'${encodeURIComponent(this.props.name)}']`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jmkulwik pushed a commit that referenced this pull request Jun 5, 2019
…sed-image

Remove Option to Delete Used Image
@epeach epeach deleted the remove-option-to-delete-used-image branch July 2, 2019 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants