View Issue Details

IDProjectCategoryView StatusLast Update
0036967mantisbtperformancepublic2026-04-17 14:31
Reporterraspopov Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version2.29.0Fixed in Version2.29.0 
Summary0036967: Restricting Dropzone loading by pages that use it.
Description

The Dropzone.js library is only used on two pages, bug_report_page.php and view.php, yet it is loaded on every page of the tracker.
I suggest limiting the loading of the library to only the pages where it is needed.

Additional Information

Recent changes in issue 0036874 allow this to be done.

TagsNo tags attached.

Relationships

related to 0036874 resolvedcommunity Support CDN in require_js and require_css functions 
related to 0036968 resolvedcommunity Restricting DateTimePicker loading by pages that use it. 

Activities

Related Changesets

MantisBT: master ada95002

2026-03-12 11:32

raspopov

Committer: dregad


Details Diff
Restrict Dropzone loading to pages using it

A new DropzoneAPI (dropzone_api.php) has been added that contains HTML
output functions for dropzone elements transferred from the PrintAPI.
The old functions have been retained and marked as obsolete.

The common code from the pages has been merged and moved to
the DropzoneAPI as the dropzone_print() function.

The JavaScript code related to Dropzone has been separated into a file
called dropzone-proxy.js and slightly unified.

Fixes 0036967

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Rebased and squashed commits
Affected Issues
0036967
mod - bug_report_page.php Diff File
mod - bug_view_inc.php Diff File
mod - bugnote_add_inc.php Diff File
add - core/dropzone_api.php Diff File
mod - core/html_api.php Diff File
mod - core/print_api.php Diff File
mod - js/common.js Diff File
add - js/dropzone-proxy.js Diff File

MantisBT: master 840d3579

2026-04-09 11:11

raspopov

Committer: dregad


Details Diff
Only load dropzone API when actually needed

Fixes 0036967

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Squashed commits and reworded commit message
Affected Issues
0036967
mod - bug_report_page.php Diff File
mod - bug_view_inc.php Diff File
mod - js/dropzone-proxy.js Diff File