mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-24 15:39:28 +00:00
Usability: Avoided manually scrolling when recommending/approving on Detailsite
...for STGL and lectors Detailview. Before the downsliding panel was sliding above the window screen, so that user was forced to scroll down the page. Now it scrolls up by itself. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -37,8 +37,13 @@ $(function(){
|
||||
|
||||
if (genehmigung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
genehmigung_panel.slideDown('slow');
|
||||
// Show genehmigung panel if is hidden
|
||||
genehmigung_panel.slideDown(400, function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: genehmigung_panel.offset().top // Move genehmigung panel bottom up to be visible within window screen
|
||||
}, 400);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -99,7 +104,12 @@ $(function(){
|
||||
if (begruendung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
begruendung_panel.slideDown('slow');
|
||||
begruendung_panel.slideDown(400, function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: begruendung_panel.offset().top // Move begruendung panel bottom up to be visible within window screen
|
||||
}, 400);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,7 +44,11 @@ $(function(){
|
||||
if (empfehlung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
empfehlung_panel.slideDown('slow');
|
||||
empfehlung_panel.slideDown(400, function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: empfehlung_panel.offset().top // Move empfehlung panel bottom up to be visible within window screen
|
||||
}, 400);
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -105,7 +109,11 @@ $(function(){
|
||||
if (begruendung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
begruendung_panel.slideDown('slow');
|
||||
begruendung_panel.slideDown(400, function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: begruendung_panel.offset().top // Move begruendung panel bottom up to be visible within window screen
|
||||
}, 400);
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user