improve gabinete digital responsiveness

This commit is contained in:
Peter Maquiran
2021-05-05 13:44:51 +01:00
parent 31dc57d0f8
commit 6da979ccc5
4 changed files with 30 additions and 20 deletions
+25 -15
View File
@@ -339,22 +339,32 @@ export class AgendaPage implements OnInit {
// for timeline
centralizeTimeline(timeout: number) {
// auto scroll timeline
setTimeout(() => {
const timelineMarker = document.querySelector('.cal-current-time-marker');
const scrollContainer = document.querySelector('.timeline-wrapper');
try {
scrollContainer.scroll({
top: timelineMarker['offsetTop'] - ((scrollContainer['offsetHeight']/2) - 60),
left: 0,
behavior: 'smooth'
})
} catch (error) {
//
this.selectFirstEventOfTheDay();
}
}, timeout);
if(!this.showLoader) {
setTimeout(() => {
const timelineMarker = document.querySelector('.cal-current-time-marker');
const scrollContainer = document.querySelector('.timeline-wrapper');
try {
scrollContainer.scroll({
top: timelineMarker['offsetTop'] - ((scrollContainer['offsetHeight']/2) - 60),
left: 0,
behavior: 'smooth'
})
} catch (error) {
//
if(!this.showLoader) {
this.selectFirstEventOfTheDay();
}
}
}, timeout);
}
}
// for timeline
@@ -209,7 +209,7 @@ export class BookMeetingModalPage implements OnInit {
}
}
async distartExpedientModal(){
async distartExpedientModal() {
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
@@ -11,7 +11,7 @@
<div class="main-content d-flex height-100">
<!-- Aside left -->
<div class="aside-wrapper d-flex flex-column justify-center width-md-40 ">
<div class="aside-wrapper d-flex flex-column justify-center width-md-40 flex-grow-1 ">
<div class="title-container">
<ion-label class="title">Gabinete Digital</ion-label>
<button class="btn-no-color btn-refresh" (click)="doRefresh($event)">
@@ -64,7 +64,7 @@ export class GabineteDigitalPage implements OnInit {
window.onresize = (event) => {
// if not mobile remove all component
if( window.innerWidth <= 1024){
if( window.innerWidth <= 800){
this.modalController.dismiss();
}
};
@@ -195,7 +195,7 @@ export class GabineteDigitalPage implements OnInit {
console.log(profile);
this.closeAllDesktopComponents();
if( window.innerWidth <= 1024){
if( window.innerWidth <= 800){
this.openEventsToApproveList(profile);
}
else{
@@ -203,7 +203,7 @@ export class GabineteDigitalPage implements OnInit {
}
}
async openEventsToApproveList(profile:any){
async openEventsToApproveList(profile:any) {
this.closeAllDesktopComponent();
//if( window.innerWidth <= 1024){