diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-07-05 21:51:00 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-07-05 21:51:00 +0000 |
commit | 6d12878d5a32988cb7ee27bc750b21ecf1fca44b (patch) | |
tree | d9d3bd482c515f5d96a30fc6e200f7871933cff3 /app | |
parent | 025be2f8b7e11111dae4c5a6241f34c7990d22a1 (diff) | |
parent | b4676c3337d656bcd8c14edd011b832b6b7ee7e3 (diff) | |
download | gitlab-ce-6d12878d5a32988cb7ee27bc750b21ecf1fca44b.tar.gz |
Merge branch '19161-non-helpful-flash-message-when-attaching-file-fails' into 'master'
Hacked in a better message for attachment network error
## What does this MR do?
Adds a better error message for when a user is uploading an attachment and they cannot reach the GitLab instance.
Now displays `Network error. Please check your connection.`.
## Are there points in the code the reviewer needs to double check?
As noted above, I think this is hacky, ideally this would be sent straight from the backend but if not then this should be handled globally?
/cc @fatihacet
## Why was this MR needed?
Attachment upload UX
## What are the relevant issue numbers?
Closes #19161.
## Screenshots (if relevant)
*UPDATED:*
![Screen_Shot_2016-06-30_at_00.42.37](/uploads/b3b4044782dd4c4c17735e99acc45502/Screen_Shot_2016-06-30_at_00.42.37.png)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !4977
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dropzone_input.js.coffee | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/dropzone_input.js.coffee b/app/assets/javascripts/dropzone_input.js.coffee index e2194589b38..665246e2a7d 100644 --- a/app/assets/javascripts/dropzone_input.js.coffee +++ b/app/assets/javascripts/dropzone_input.js.coffee @@ -70,12 +70,12 @@ class @DropzoneInput pasteText response.link.markdown return - error: (temp, errorMessage) -> + error: (temp) -> errorAlert = $(form).find('.error-alert') checkIfMsgExists = errorAlert.children().length if checkIfMsgExists is 0 errorAlert.append divAlert - $(".div-dropzone-alert").append btnAlert + errorMessage + $(".div-dropzone-alert").append "#{btnAlert}Attaching the file failed." return totaluploadprogress: (totalUploadProgress) -> |