Skip to content

Commit 3f7eff0

Browse files
authored
Merge pull request #6735 from samvera/6733_file_upload_progress_bars
fix blueimp file upload progress bars
2 parents 289dc08 + 09b398a commit 3f7eff0

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

app/assets/stylesheets/hyrax/_file_upload.scss

+6
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@
3434
padding-bottom: 10px;
3535
}
3636
}
37+
38+
// fix blueimp jQuery-File-Upload display problems under Bootstrap 4+
39+
// found here: https://stackoverflow.com/a/48162651
40+
.fade.in {
41+
opacity: 1
42+
}

app/views/hyrax/uploads/_js_templates.html.erb

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<!-- The template to display files available for upload -->
2-
<% fade_class_if_not_test = Rails.env.test? ? 'show' : 'fade show' %>
2+
<% fade_class_if_not_test = Rails.env.test? ? '' : 'fade' %>
33
<script id="template-upload" type="text/x-tmpl">
44
{% for (var i=0, file; file=o.files[i]; i++) { %}
55
<tr class="template-upload <%= fade_class_if_not_test %>">
6-
<span>
6+
<td>
77
<span class="preview"></span>
8-
</span>
9-
<span>
8+
</td>
9+
<td>
1010
<p class="name">{%=file.name%}</p>
1111
<strong class="error text-danger"></strong>
12-
</span>
13-
<span>
12+
</td>
13+
<td>
1414
<p class="size">Processing...</p>
1515
<div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-striped progress-bar-animated bg-success" style="width:0%;"></div></div>
16-
</span>
17-
<span class="text-right">
16+
</td>
17+
<td class="text-right">
1818
{% if (!i && !o.options.autoUpload) { %}
1919
<button class="btn btn-primary start" disabled>
2020
<span class="fa fa-upload"></span>
@@ -27,7 +27,7 @@
2727
<span><%= t('helpers.action.cancel') %></span>
2828
</button>
2929
{% } %}
30-
</span>
30+
</td>
3131
</tr>
3232
{% } %}
3333
</script>

app/views/hyrax/uploads/_js_templates_branding.html.erb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- The template to display files available for upload -->
22
<script id="template-upload" type="text/x-tmpl">
33
{% for (var i=0, file; file=o.files[i]; i++) { %}
4-
<tr class="template-upload fade show">
4+
<tr class="template-upload fade">
55
<td>
66
<span class="preview"></span>
77
</td>
@@ -37,7 +37,7 @@
3737
<!-- The template to display the banner once upload is complete -->
3838
<script id="template-download" type="text/x-tmpl">
3939
{% for (var i=0, file; file=o.files[i]; i++) { %}
40-
<span class="template-download fade show">
40+
<span class="template-download fade">
4141
<div id="banner">
4242
<div class="row branding-banner-row">
4343
<div class="col-sm-3">
@@ -69,7 +69,7 @@
6969
<!-- The template to display logo in the table once upload is complete -->
7070
<script id="logo-template-download" type="text/x-tmpl">
7171
{% for (var i=0, file; file=o.files[i]; i++) { %}
72-
<span class="template-download fade show">
72+
<span class="template-download fade">
7373
<div class="row branding-logo-row">
7474
<div class="col-sm-3">
7575
<span class="preview">

app/views/hyrax/uploads/_js_templates_versioning.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- The template to display files available for upload -->
2-
<% fade_class_if_not_test = Rails.env.test? ? 'show' : 'fade show' %>
2+
<% fade_class_if_not_test = Rails.env.test? ? '' : 'fade' %>
33
<script id="versioning-template-upload" type="text/x-tmpl">
44
{% for (var i=0, file; file=o.files[i]; i++) { %}
55
<tr class="template-upload <%= fade_class_if_not_test %>">

0 commit comments

Comments
 (0)