Skip to content

Commit

Permalink
Fix invisible progress bars
Browse files Browse the repository at this point in the history
Fixes #1390
  • Loading branch information
ihalaij1 authored and murhum1 committed Aug 23, 2024
1 parent 5733d53 commit 904b8b8
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion assets/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.css.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/js/aplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ $(function () {
const pluginName = "aplusModal";
var defaults = {
loader_selector: ".modal-progress",
loader_text_selector: ".progress-bar",
loader_text_selector: ".aplus-progress-bar",
alert_text_selector: ".modal-submit-error",
title_selector: ".modal-title",
content_selector: ".modal-body",
Expand Down Expand Up @@ -547,7 +547,7 @@ $(function () {
this.content.hide();
this.alertText.hide();
this.loaderText
.removeClass('progress-bar-danger').addClass('active')
.removeClass('aplus-progress-bar-danger').addClass('active')
.text(data || this.messages.loading);
this.loader.show();
this.element.on("hidden.bs.modal", function (event) {
Expand All @@ -560,7 +560,7 @@ $(function () {
if (data) {
this.alertText.text(data).show();
}
this.loaderText.removeClass('active').addClass('progress-bar-danger').text(this.messages.error);
this.loaderText.removeClass('active').addClass('aplus-progress-bar-danger').text(this.messages.error);
},

showContent: function (data) {
Expand Down
6 changes: 6 additions & 0 deletions assets/sass/components/_progress-bar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.aplus-progress-bar { @extend .progress-bar; }
.aplus-progress-bar-striped { @extend .progress-bar-striped; }
.aplus-progress-bar-success { @extend .progress-bar-success; }
.aplus-progress-bar-info { @extend .progress-bar-info; }
.aplus-progress-bar-warning { @extend .progress-bar-warning; }
.aplus-progress-bar-danger { @extend .progress-bar-danger; }
1 change: 1 addition & 0 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ $font-size-base: $aplus-font-size-base;
@import 'components/news';
@import 'components/overlay';
@import 'components/pagination';
@import 'components/progress-bar';
@import 'components/resize';
@import 'components/ajax-search-select';
@import 'components/sidebar';
Expand Down
2 changes: 1 addition & 1 deletion edit_course/templates/edit_course/clone_instance.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h3 class="panel-title">{% translate "COURSE_INSTANCES" %}</h3>
{% translate "CLONE_INTO_NEW_INSTANCE" %}
</button>
<div class="hidden progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;">
{% translate "CLONING_COURSE" %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion edit_course/templates/edit_course/edit_gitmanager.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% translate "SUBMIT" %}
</button>
<div class="hidden progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;">
{% translate "UPDATING_GITMANAGER" %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion edit_course/templates/edit_course/edit_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</a>
</p>
<div id="metadata-progress" class="progress hide">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%;"></div>
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width: 100%;"></div>
</div>
</div>
</fieldset>
Expand Down
6 changes: 3 additions & 3 deletions exercise/static/exercise/chapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
ajax_attr: "data-aplus-ajax",
autosave_attr: "data-aplus-autosave",
disable_duplicate_check_attr: "data-aplus-disable-duplicate-check",
message_selector: ".progress-bar",
message_selector: ".aplus-progress-bar",
content_element: '<div class="exercise-content"></div>',
content_selector: '.exercise-content',
exercise_selector: '#exercise-all',
Expand Down Expand Up @@ -911,9 +911,9 @@
this.loader.show().find(this.settings.message_selector)
.text(this.chapter.messages[messageType]);
if (messageType == "error") {
this.loader.removeClass("active").addClass("progress-bar-danger");
this.loader.removeClass("active").addClass("aplus-progress-bar-danger");
} else {
this.loader.addClass("active").removeClass("progress-bar-danger");
this.loader.addClass("active").removeClass("aplus-progress-bar-danger");
}
},

Expand Down
4 changes: 2 additions & 2 deletions exercise/static/exercise/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
poll_url_attr: "data-poll-url",
ready_url_attr: "data-ready-url",
poll_delays: [2,3,5,5,5,10,10,10,10],
message_selector: ".progress-bar",
message_selector: ".aplus-progress-bar",
message_attr: {
error: "data-msg-error",
timeout: "data-msg-timeout"
Expand Down Expand Up @@ -96,7 +96,7 @@
$.removeData(this.element[0], "plugin_" + pluginName);
}
} else if (messageType == "error") {
this.element.addClass("progress-bar-danger");
this.element.addClass("aplus-progress-bar-danger");
}
},
});
Expand Down
2 changes: 1 addition & 1 deletion exercise/templates/exercise/_exercise_wait.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
data-msg-error="{% translate 'EXERCISE_ERROR_COMMUNICATION' %}"
data-msg-timeout="{% translate 'EXERCISE_ERROR_GRADING_TIMEOUT' %}"
>
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;">
{% translate "GRADING_SUBMISSION" %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion exercise/templates/exercise/_points_progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% endif %}
<div class="progress" data-toggle="tooltip" data-html="true" data-placement="bottom"
title="{% translate 'POINTS' %}: &lt;span class='text-nowrap'&gt;{{ formatted_points }} / {{ max }}&lt;/span&gt;{% if required %} {% translate 'POINTS_TO_PASS' %}: &lt;span class='text-nowrap'&gt;{{ required }}&lt;/span&gt;{% endif %}">
<div class="progress-bar progress-bar-striped progress-bar-{% if full_score %}success{% elif passed %}warning{% else %}danger{% endif %}"
<div class="aplus-progress-bar aplus-progress-bar-striped aplus-progress-bar-{% if full_score %}success{% elif passed %}warning{% else %}danger{% endif %}"
rel="progressbar" aria-valuenow="{{ points }}" aria-valuemin="0" aria-valuemax="{{ max }}"
style="width:{{ percentage }}%;"></div>
{% if required_percentage %}
Expand Down
2 changes: 1 addition & 1 deletion exercise/templates/exercise/_submit_progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="quiz-submit-overlay submission-overlay hide"></div>
<div class="quiz-submit-progress sticky-progress progress hide">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;">
{% translate "POSTING_SUBMISSION" %}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions exercise/templates/exercise/exercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>

<div id="submit-progress" class="hide progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;">
{% translate "POSTING_SUBMISSION" %}
</div>
</div>
Expand All @@ -64,7 +64,7 @@
data-msg-load="{% translate 'LOADING_EXERCISE' %}"
data-msg-submit="{% translate 'POSTING_SUBMISSION' %}"
data-msg-error="{% translate 'EXERCISE_ERROR_COMMUNICATION' %}">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%;"></div>
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%;"></div>
</div>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion exercise/templates/exercise/staff/_assessment_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
{% if file.exists %}
{% if not file.is_passed %}
<div class="submitted-file-progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%">
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%">
{% translate "LOADING" %}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h4>{% translate "SITE" %}</h4>
{% translate "EXERCISE_ERROR_COMMUNICATION" %}
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%"
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%"
data-msg-error="{% translate 'LOADING_FAILED' %}">
{% translate "LOADING" %}
</div>
Expand All @@ -290,7 +290,7 @@ <h4>{% translate "SITE" %}</h4>
<div class="modal-content">
<div class="modal-progress">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:100%"
<div class="aplus-progress-bar aplus-progress-bar-striped active" role="progressbar" style="width:100%"
data-msg-error="{% translate 'LOADING_FAILED' %}">
{% translate "LOADING" %}
</div>
Expand Down

0 comments on commit 904b8b8

Please sign in to comment.