From 3f85eadd597a1855eaad0a10b7e981b1b38859fe Mon Sep 17 00:00:00 2001 From: Bruno Nocera Zanette <brunonzanette@gmail.com> Date: Thu, 11 Sep 2014 17:35:43 -0300 Subject: [PATCH] Fix BaseURL on EstMunic request [Better Solution] Fix BaseURL on EstMunic request to adapt to server --- src/main/webapp/WEB-INF/views/ocorrenciamunicipais/create.jspx | 2 +- src/main/webapp/WEB-INF/views/orgaoexecutores/create.jspx | 2 +- src/main/webapp/WEB-INF/views/orgaoexecutores/update.jspx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/ocorrenciamunicipais/create.jspx b/src/main/webapp/WEB-INF/views/ocorrenciamunicipais/create.jspx index 5b130a1..87fa975 100644 --- a/src/main/webapp/WEB-INF/views/ocorrenciamunicipais/create.jspx +++ b/src/main/webapp/WEB-INF/views/ocorrenciamunicipais/create.jspx @@ -42,7 +42,7 @@ //Get complete base URL if (!window.location.origin) window.location.origin = window.location.protocol+"//"+window.location.host; - RequestBaseUrl = window.location.origin + "/estacao-juventude" + "/ocorrenciamunicipais"; + RequestBaseUrl = window.location.origin + "/" + window.location.pathname.split('/')[1] + "/ocorrenciamunicipais"; //Create and send to server a request of //the list of "Municipios" that belongs to the "Estado" chosen diff --git a/src/main/webapp/WEB-INF/views/orgaoexecutores/create.jspx b/src/main/webapp/WEB-INF/views/orgaoexecutores/create.jspx index 7ea71b0..02b0fcf 100644 --- a/src/main/webapp/WEB-INF/views/orgaoexecutores/create.jspx +++ b/src/main/webapp/WEB-INF/views/orgaoexecutores/create.jspx @@ -39,7 +39,7 @@ if (!window.location.origin) window.location.origin = window.location.protocol+"//"+window.location.host; - RequestBaseUrl = window.location.origin + "/estacao-juventude" + "/orgaoexecutores"; + RequestBaseUrl = window.location.origin + "/" + window.location.pathname.split('/')[1] + "/orgaoexecutores"; //Create and send to server a request of //the list of "Municipios" that belongs to the "Estado" chosen diff --git a/src/main/webapp/WEB-INF/views/orgaoexecutores/update.jspx b/src/main/webapp/WEB-INF/views/orgaoexecutores/update.jspx index 0e4f163..7eceaff 100644 --- a/src/main/webapp/WEB-INF/views/orgaoexecutores/update.jspx +++ b/src/main/webapp/WEB-INF/views/orgaoexecutores/update.jspx @@ -40,7 +40,7 @@ if (!window.location.origin) window.location.origin = window.location.protocol+"//"+window.location.host; - RequestBaseUrl = window.location.origin + "/estacao-juventude" + "/orgaoexecutores"; + RequestBaseUrl = window.location.origin + "/" + window.location.pathname.split('/')[1] + "/orgaoexecutores"; //Create and send to server a request of //the list of "Municipios" that belongs to the "Estado" chosen -- GitLab