Comments

damien tournoud’s picture

On a related note: the "Delete" checkbox should probably be a button, and have an immediate effect (at least visually).

lilou’s picture

kika’s picture

*bump*

We already got Rasmus time() pain fixed, why give Dries some relief too?
Interaction seems straightforward. We need js wizards and make sure it works without js enabled.

Is there any way usability gang can help?

Bojhan’s picture

Don't think so, we just need a patch here. It seems an obvious improvement. Can it work without JS?

dwees’s picture

StatusFileSize
new2.34 KB

The solution to making it work with JS disabled is to have the form include the attach button, then hide it when it successfully attaches the behaviours to the file field.

I tried to work on this, but have given up for today figuring out how to mess with ajax.js which seems to have the fact the uploads are occurring from a button hard-coded into it. I'll post a patch for what I have so far.

Anyway this is not working patch, it does nothing to hide the attach button, or fix the uploads to work again.

Dave

lilou’s picture

Component: usability » javascript
Issue tags: +Usability
Tor Arne Thune’s picture

Version: 7.x-dev » 8.x-dev
StatusFileSize
new8.71 KB

So, in 7.0, the button has been renamed 'Upload' and moved next to the 'Choose File' button. It's still not just a one-step process, so moving this to 8.x. See attached screenshot for the status quo.

yoroy’s picture

Do it! :)

nod_’s picture

Status: Active » Needs work

4 years old reroll FTW. It's not called ahah anymore :)

kika’s picture

Issue tags: +JavaScript clean-up

Any chance @_nod could bring the JS troops and finally make it happen?

bdone’s picture

Status: Needs work » Needs review
StatusFileSize
new1.29 KB

here's a patch that triggers the upload button's mouse event, upon source file being changed.

this works both with, and without JS.

here's some manual test recordings:

  1. with javascript: https://saucelabs.com/tests/c14d0394af254a2c81dc4b875e211d37
  2. without javascript: https://saucelabs.com/tests/34bd6b02c35146ce90e08b857b7e99f3
tlattimore’s picture

I can confirm that this patch applies cleanly and works as described.

nod_’s picture

StatusFileSize
new1.81 KB

quick update, still works.

Not comfortable with hiding the element in JS, we have a class for those things, js-hide.

tstoeckler’s picture

Status: Needs review » Needs work
+++ b/core/modules/file/file.js
@@ -44,6 +44,21 @@ Drupal.behaviors.fileValidateAutoAttach = {
+ * Attach behaviors to managed file element upload fields and
+ * hide upload buttons from display.

I guess the description should be updated as well, then.

nod_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.77 KB
nod_’s picture

StatusFileSize
new1.77 KB
bdone’s picture

Status: Needs review » Reviewed & tested by the community

tested and confirmed #16 is working, both with and without javascript.

steps to test manually:

  1. clean install of d8
  2. login as user 1
  3. browse to: node/add/article
  4. use the "Choose File" or "Browse" button to upload a local image.
  • if javascript is enabled, the Upload button will be hidden, and the image will automatically be uploaded upon change of the source file.
  • if javascript is disabled, the Upload button will shown normally.

video of test:
http://www.youtube.com/watch?v=1-OZOODpzWw&feature=youtu.be&t=1m27s

wim leers’s picture

Haha, so simple, so obvious! Nice :)

heather’s picture

Cool! I hope this gets in. Good to see issues that are oldies but goodies get some attention.

alexpott’s picture

Title: Remove 'Attach' button » Change notice: Remove 'Attach' button
Priority: Normal » Critical
Status: Reviewed & tested by the community » Active

Manually tested with and without javascript works great!

Committed 5fc858b and pushed to 8.x. Thanks!

Guess we need a change notice for site builders here

Bojhan’s picture

Omg, so exciting :D

catch’s picture

nod_’s picture

Title: Change notice: Remove 'Attach' button » Remove 'Attach' button
Priority: Major » Normal
nod_’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xjm’s picture

Issue tags: -Needs change record

Untagging. Please remove the tag when the change notification task is completed.