Skip to content
Snippets Groups Projects
Commit fb6ee438 authored by kevin.dezaphi's avatar kevin.dezaphi
Browse files

header action

parent 9fe9d719
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import { LANG } from '../../translate.component';
import { NotificationService } from '../../notification.service';
import { MatSidenav } from '@angular/material';
import { HeaderService } from '../../../service/header.service';
declare function $j(selector: any): any;
declare var angularGlobals: any;
......@@ -17,7 +17,6 @@ declare var angularGlobals: any;
})
export class ActionAdministrationComponent implements OnInit {
/*HEADER*/
titleHeader : string;
@ViewChild('snav') public sidenavLeft : MatSidenav;
@ViewChild('snav2') public sidenavRight : MatSidenav;
......@@ -34,7 +33,7 @@ export class ActionAdministrationComponent implements OnInit {
loading: boolean = false;
constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService) {
constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private route: ActivatedRoute, private router: Router, private notify: NotificationService, private headerService: HeaderService) {
$j("link[href='merged_css.php']").remove();
this.mobileQuery = media.matchMedia('(max-width: 768px)');
this._mobileQueryListener = () => changeDetectorRef.detectChanges();
......@@ -65,6 +64,7 @@ export class ActionAdministrationComponent implements OnInit {
this.actionPagesList = data.action_pagesList;
this.keywordsList = data.keywordsList;
this.headerService.headerMessage = this.lang.actionCreation;
this.loading = false;
});
}
......@@ -83,6 +83,7 @@ export class ActionAdministrationComponent implements OnInit {
this.actionPagesList = data.action_pagesList;
this.keywordsList = data.keywordsList;
this.headerService.headerMessage = this.lang.actionModification + " <small>" + data.action.label_action + "</small>";
this.loading = false;
});
}
......
......@@ -4,6 +4,7 @@ import { HttpClient } from '@angular/common/http';
import { LANG } from '../../translate.component';
import { NotificationService } from '../../notification.service';
import { MatPaginator, MatTableDataSource, MatSort, MatSidenav} from '@angular/material';
import { HeaderService } from '../../../service/header.service';
declare function $j(selector: any): any;
declare var angularGlobals: any;
......@@ -40,7 +41,7 @@ export class ActionsAdministrationComponent implements OnInit {
this.dataSource.filter = filterValue;
}
constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private notify: NotificationService) {
constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private notify: NotificationService, private headerService: HeaderService) {
$j("link[href='merged_css.php']").remove();
this.mobileQuery = media.matchMedia('(max-width: 768px)');
this._mobileQueryListener = () => changeDetectorRef.detectChanges();
......@@ -63,6 +64,7 @@ export class ActionsAdministrationComponent implements OnInit {
this.http.get(this.coreUrl + 'rest/actions')
.subscribe((data) => {
this.actions = data['actions'];
this.headerService.headerMessage = this.headerService.headerMessage = this.lang.actionModification;
this.loading = false;
setTimeout(() => {
this.dataSource = new MatTableDataSource(this.actions);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment