Fixe search page

This commit is contained in:
2021-02-10 16:07:18 +01:00
parent 1dd532ccb5
commit f1ebc52479
4 changed files with 5 additions and 49 deletions
-10
View File
@@ -127,16 +127,6 @@ export class AgendaPage implements OnInit {
this.showCalendar = true;
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = Correspondencia = 0
setCookie('searchModalAPPType','0', 99999999);
this.showLoader = false;
this.showTimelineFilterState = false;
this.showTimeline = false;
@@ -22,15 +22,7 @@ export class GabineteDigitalPage implements OnInit {
private modalController: ModalController,
private eventService: EventsService,
private alertService: AlertService) {
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = Correspondencia = 8
setCookie('searchModalAPPType','8,361', 99999999);
}
count_exp_dailywork=0;
@@ -41,15 +41,6 @@ export class PublicationsPage implements OnInit {
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = AccoesPresidenciais = 386,,
setCookie('searchModalAPPType','386', 99999999);
}
ngOnInit() {
+4 -21
View File
@@ -120,25 +120,8 @@ export class SearchPage implements OnInit {
*/
basicSearch(){
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
const APPType = getCookie('searchModalAPPType');
if(APPType == '0'){
if(window.location.pathname == '/home/agenda'){
console.log('aplication type 0');
@@ -168,7 +151,7 @@ export class SearchPage implements OnInit {
this.showLoader = false;
});
} else if (APPType == '8,361'){
} else if (window.location.pathname =='/home/gabinete-digital'){
console.log('aplication type 8,361');
@@ -222,7 +205,7 @@ export class SearchPage implements OnInit {
this.showLoader = false;
});
} else if (APPType == '386'){
} else if (window.location.pathname == '/home/publications'){
this.showLoader = true;