16 Commits

Author SHA1 Message Date
Omar Ahmed Hassan
654bc94d44
Fix: input file overwrite in merge (#2335)
* Fix input files being overwritten by newly uploaded files

- Fix a bug that caused existing selected/uploaded files to be overwritten when a new input file is uploaded through input element.
- Add source property to change event to differentiate between uploaded files using input element and drag/drop uploads to avoid processing drag/drop files more than once, thus avoiding file duplication (file duplication resulting from copying drop/drop files to input files on each 'change' event).

* Dispatch and use file-input-change instead of change event for merging

- Dispatch "file-input-change" event after each "change" event in file upload, to notify other functions/components relying on the files provided by the \<input\> element.
- Use "file-input-change" instead of "change" event to display the latest version of uploaded files.

# FAQ:
- Why use "file-input-change" instead of "change" in merge.js?
= "change" event is automatically triggered when a file is uploaded through \<input\> element which would replace all the existing selected/uploaded files including the drag/drop files.

## Example:
Let's say that the user wants to upload/select the x.pdf, y.pdf and z.pdf all together:

- user selects "x.pdf" -> file selected successfully.
= selected files: x.pdf

- user drags and drops "y.pdf" -> file dropped successfully
= selected files: x.pdf, y.pdf

- user selects again using \<input\> "z.pdf" -> file selected succesfully overwriting selected files.
= selected files: z.pdf
2024-11-26 20:41:08 +00:00
Anthony Stirling
d648c6d4b4
Revert "User Friendly Merge File Selection" 2024-05-23 19:52:49 +01:00
ge64qev
ce3e98e240 Deleted Console logs and adjusted some comments. 2024-05-14 09:13:39 +02:00
ge64qev
0e262dc2bd Added a unique id for all files to be a able to delete duplicate files. 2024-05-13 22:27:25 +02:00
ge64qev
7ba0067688 Made it possible to add files via the selector "File by File". 2024-05-06 11:18:59 +02:00
t71rs
fbbc71d7e6
Drag&drop bug (#1157)
* Fixed issue that Drag and Droppped Files can not be deleted

* Deleted unnecessary Comment
2024-05-03 19:09:36 +01:00
Ludy
e4a76e96af
HTML, CSS, JS and JAVA corrections (#810)
* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* return bootstrap-icons.min.css

* return bootstrap.min.css

* Update bootstrap-icons.css

* Update bootstrap-icons.min.css

* Update bootstrap-icons.min.css

* Update bootstrap.min.css

* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* Update bootstrap-icons.css

* Bootstrap CSS

* Update prism.css
2024-02-16 21:49:06 +00:00
sbplat
55d4fda01b refactor: normalize files 2024-02-11 11:47:00 -05:00
Anthony Stirling
7c26c56210 test 2023-08-20 21:57:19 +01:00
Anthony Stirling
8bb9e5b22f
Update fileInput.js 2023-08-06 14:16:56 +01:00
Anthony Stirling
a27ddb40be navbar, blank page desc and drag drop append 2023-08-06 12:34:26 +01:00
Anthony Stirling
96f05cd518 get info changes 2023-08-02 22:49:43 +01:00
Anthony Stirling
7b83104fd6 fix for #275 2023-07-18 22:04:18 +01:00
Anthony Stirling
ddf5915c6a drag drop niceness 2023-07-13 22:03:23 +01:00
Anthony Stirling
4f851156b7 dummy lang changes 2023-06-04 22:40:14 +01:00
Anthony Stirling
45b3e0aa6a JS and css cleanup 2023-06-02 20:15:10 +01:00