[mod] getBaseUrl moved to its own file
This commit is contained in:
parent
cb5d30b4e0
commit
697d0fe769
@ -238,4 +238,5 @@ if(!isset($_SESSION['userName'])){
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script src="../js/getBaseUrl.js"></script>
|
||||||
<link href="../css/panel.css" rel="stylesheet">
|
<link href="../css/panel.css" rel="stylesheet">
|
@ -50,4 +50,5 @@ if(isset($_SESSION['userName'])){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../js/login.js"></script>
|
<script src="../js/login.js"></script>
|
||||||
|
<script src="../js/getBaseUrl.js"></script>
|
||||||
<link href="../css/login.css" rel="stylesheet">
|
<link href="../css/login.css" rel="stylesheet">
|
10
api-payroll/public/js/getBaseUrl.js
Normal file
10
api-payroll/public/js/getBaseUrl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Returns the entry point url for the system, this url will be used
|
||||||
|
* to access both the api and the static resources
|
||||||
|
*
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function getbaseUrl(){
|
||||||
|
var url = window.location.href;
|
||||||
|
return url.substring(0, url.indexOf('/html/'));
|
||||||
|
}
|
@ -1,10 +1,5 @@
|
|||||||
function getbaseUrl(uriPath){
|
|
||||||
var url = window.location.href;
|
|
||||||
return url.substring(0, url.indexOf(uriPath));
|
|
||||||
}
|
|
||||||
|
|
||||||
function processLogin() {
|
function processLogin() {
|
||||||
var baseUrl = getbaseUrl('/html/');
|
var baseUrl = getbaseUrl();
|
||||||
|
|
||||||
var parametros = {
|
var parametros = {
|
||||||
"userName":$('#userName').val(),
|
"userName":$('#userName').val(),
|
||||||
|
Loading…
Reference in New Issue
Block a user