mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add timeline auto scroll
This commit is contained in:
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-content class="timeline">
|
||||
|
||||
<!-- Progress bar -->
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
@@ -200,7 +200,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<!-- Timeline -->
|
||||
<div *ngIf="showTimeline">
|
||||
<div class="timeline-container" *ngIf="showTimeline">
|
||||
<mwl-demo-utils-calendar-header class="timeline"
|
||||
[(view)]="view"
|
||||
[(viewDate)]="viewDate"
|
||||
@@ -219,5 +219,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
123123123123
|
||||
</ion-content>
|
||||
@@ -150,6 +150,20 @@ export class AgendaPage implements OnInit {
|
||||
setCookie('searchModalAPPType','0', 99999999);
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
setTimeout(() => {
|
||||
const timelineMarker = document.querySelector('.cal-current-time-marker');
|
||||
|
||||
const timelineContainer = document.querySelectorAll('ion-content')[2];
|
||||
const shadowRoot = timelineContainer.shadowRoot;
|
||||
|
||||
const scrollContainer = shadowRoot.querySelector('main');
|
||||
|
||||
scrollContainer.scrollTop = timelineMarker['offsetTop'] - (window.screen.availHeight - (91 + 337 +56+140));
|
||||
|
||||
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -498,6 +512,7 @@ export class AgendaPage implements OnInit {
|
||||
this.alertCrontroller.presentAlert("Funcionalidade em desenvolvimento.");
|
||||
}
|
||||
changeProfile(){
|
||||
|
||||
if(this.profile == "mdgpr"){
|
||||
console.log('pr');
|
||||
this.profile ="pr";
|
||||
@@ -508,6 +523,10 @@ export class AgendaPage implements OnInit {
|
||||
this.profile ="mdgpr";
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
|
||||
// change header profile picture
|
||||
window['header'](this.profile);
|
||||
|
||||
}
|
||||
|
||||
async openAddEvent() {
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -9,7 +9,15 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
})
|
||||
export class HeaderPage implements OnInit {
|
||||
|
||||
constructor(private modalController: ModalController) { }
|
||||
profile: string = 'mdgpr';
|
||||
|
||||
constructor(private modalController: ModalController) {
|
||||
|
||||
window['header'] = (profile:string) => {
|
||||
this.profile = profile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="45" height="45" viewBox="0 0 45 45">
|
||||
<defs>
|
||||
<circle id="d436citeva" cx="22.5" cy="22.5" r="22.5"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g>
|
||||
<g>
|
||||
<g transform="translate(-335 -26) translate(0 23) translate(335 3)">
|
||||
<rect width="45" height="45" fill="#FFF" fill-opacity=".6" rx="22.5"/>
|
||||
<g>
|
||||
<mask id="ytu8rzogsb" fill="#fff">
|
||||
<use xlink:href="#d436citeva"/>
|
||||
</mask>
|
||||
<path fill="#42B9FE" fill-opacity=".7" d="M22.5 10.5c5.799 0 10.5 5.037 10.5 11.25 0 3.902-1.854 7.34-4.67 9.358C34.565 33.57 39 39.868 39 47.25c0 9.527-7.387 17.25-16.5 17.25S6 56.777 6 47.25c0-7.381 4.435-13.68 10.67-16.142C13.854 29.09 12 25.652 12 21.75c0-6.213 4.701-11.25 10.5-11.25z" mask="url(#ytu8rzogsb)"/>
|
||||
</g>
|
||||
<text fill="#FFF" fill-opacity=".7" font-family="Roboto-Light, Roboto" font-size="20" font-weight="300">
|
||||
<tspan x="9.995" y="27">PR</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user