Relocate dropzone inline js to separate file #931

Merged
merged 2 commits into from Oct 25, 2016

Projects

None yet

4 participants

@syncguru
Contributor

Fixes #21651

@vboctor in this PR, I adapted the same approach used in #919

@@ -222,6 +222,8 @@ function html_css() {
foreach( $g_stylesheets_included as $t_stylesheet_path ) {
html_css_link( $t_stylesheet_path );
}
+
+ html_css_link( 'dropzone.css' );
@vboctor
vboctor Oct 23, 2016 Member

Should we have dropzone css/js only on pages that need it?

dropzone_inc.php
+ *
+ */
+?>
+ data-force-fallback="<?php echo config_get( 'dropzone_enabled' ) ? 'false' : 'true' ?>"
@vboctor
vboctor Oct 23, 2016 Member

Let's move this to core/print_api.php as print_dropzone_data() instead of being a separate file.

@vboctor vboctor referenced this pull request in mantisbt-plugins/google-analytics Oct 23, 2016
Open

CSP refuses execution of inline script (mantisbt 1.3.2) #2

@vboctor vboctor merged commit add29e7 into mantisbt:master Oct 25, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@badfiles
Contributor
badfiles commented Oct 27, 2016 edited

It looks like dz parameters are not being picked up, in my case
dictRemoveFile: $(this).data('remove-file') is 'undefined', although
'data-remove-file=' is present in <form> context.

@dregad
Member
dregad commented Dec 5, 2016

$(this) does not refer to the form anymore - see #972 for a proposed fix.

@syncguru syncguru deleted the syncguru:21651-dropzone-js branch Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment