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

Use remove on resource-picker, not delete #2977

Merged
merged 1 commit into from
May 11, 2015

Conversation

anitagraham
Copy link
Contributor

The action ‘delete’ uses the delete method.
Action 'remove' here triggers javascript and leaves the unlinking of the resource until ‘Save’ happens.
Using an unlink icon instead of the standard delete.
remove action using unlink icon

the action ‘delete’ uses the delete method.
Remove in this situation triggers javascript and leaves the unlinking
of the resource until ‘Save’ happens.
Using an ‘unlink’ icon instead of the standard delete.
@parndt
Copy link
Member

parndt commented May 11, 2015

One of these days we should add tests for this widget..

This is great, but clicking remove on an edit screen provides no opportunity to add another resource because the add button isn't visible.

@anitagraham
Copy link
Contributor Author

Was the add button visible before?
I can make it appear (and perhaps function 😉) when the item is removed.

@parndt
Copy link
Member

parndt commented May 11, 2015

@anitagraham it probably wasn't.. that'd be lovely!

@anitagraham
Copy link
Contributor Author

It works so well if I just leave out the 'if resource' on the code for the add button.
If there's no resource you can add one.
If there is a resource the add replaces the current resource.

@parndt
Copy link
Member

parndt commented May 11, 2015

I guess as long as users are aware that adding a resource will replace the current resource that'd be fine. I think it's reasonable when there is only a single resource attached to something that it'd be the case.

@anitagraham
Copy link
Contributor Author

Playing with this a bit more, I'd like to remove
<%= ' display: none;' unless resource %> and give it a class instead. Any problems with that?

Also this is what the screen is like if an object accepts two files:
screen shot 2015-05-11 at 5 26 00 pm

@parndt
Copy link
Member

parndt commented May 11, 2015

Yep all looks good to me. In the meantime, I'll merge this PR and you can open another one with a fresh branch.

parndt added a commit that referenced this pull request May 11, 2015
Use remove on resource-picker, not delete
@parndt parndt merged commit 7f90021 into refinery:master May 11, 2015
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.

2 participants