Fix note feedback

This commit is contained in:
2019-09-08 09:49:55 +02:00
parent aaaed4d784
commit 6c14d9eba0
5 changed files with 23 additions and 24 deletions

View File

@@ -50,6 +50,9 @@ oCATC.pageInit = function(asHash, bFirstPage) {
oCATC.feedback('notice', sMsg);
});
loadDocs();
},
progressall: function (e, asData) {
$('#progress .bar').css('width', parseInt(asData.loaded / asData.total * 100, 10)+'%');
}
});
loadDocs();
@@ -76,13 +79,15 @@ function loadDocs() {
}
function noteFeedback(sType, sMsg) {
var $Feedback = $('#notes_feedback').stop();
if(sMsg != $Feedback.find('span').text()) {
$Feedback.fadeOut($Feedback.is(':empty')?0:'fast', function(){
var $Feedback = $('#notes_feedback');
if(sMsg != $Feedback.find('.alert').text()) {
$Feedback.finish().fadeOut($Feedback.is(':empty')?0:'fast', function(){
$(this)
.empty()
.append($('<span>', {'class':sType}).text(sMsg))
.fadeIn('fast');
.append($('<div>', {'class':'alert alert-'+sType, role:'alert'}).text(sMsg))
.fadeIn('fast')
.delay(5000)
.fadeOut('fast');
});
}
};

View File

@@ -17,4 +17,8 @@ $theme-colors: map-remove($theme-colors, "light", "dark");
$font-family-base: $font_para;
@import 'bootstrap/bootstrap';
@import 'bootstrap/bootstrap';
.alert-error {
@extend .alert-danger;
}

View File

@@ -49,13 +49,10 @@
width: 50%;
text-align: right;
span {
position: absolute;
width: 100%;
display: inline-block;
top: 50%;
transform: translateY(-50%);
right: 0;
.alert {
font-size: 0.8em;
margin: 0;
padding-right: 0.5em;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long