Select Git revision
-
Armand Bahi authoredArmand Bahi authored
index.html 8.02 KiB
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Administration</title>
<script src="javascript/externs/jquery/jquery-1.11.3.min.js"></script>
<script src="javascript/externs/mobile-detect/mobile-detect.min.js"></script>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
<body data-app-init="">
<div class=""></div>
<div ng-include="getMainTemplateUrl()" class="container" id="container"></div>
<script>
/**
* Load a JS file with possibility to add a possible attribute
* @param {string} sJsFile File path
* @param {string|undefined} attr Attribute to add (can be undefined)
*/
var loadJSFile = function (sJsFile, attr) {
var oScriptElement = document.createElement('script');
if (typeof attr === 'undefined')
oScriptElement.src = sJsFile;
else
oScriptElement.src = sJsFile + '?_' + attr;
document.write(oScriptElement.outerHTML);
};
var isMobile = function () {
var propertieEnabled = false;
if (typeof window['oClientProperties'] != 'undefined') {
if (window['oClientProperties']['mobile_interface'] == "true") {
propertieEnabled = true;
}
}
if (new MobileDetect(window.navigator.userAgent).mobile() && propertieEnabled) {
return true;
} else {
return false;
}
};
/**
* Variable de session
*/
var sessionStorage = {};
// Récupère la version de l'application
// important: utilise jQuery pour faire une requête synchrone
$.ajax({
url: 'conf/properties.json?_' + Date.now(),
async: false,
context: document.body
}).done(function (data) {
// Version de l'application
sessionStorage['build'] = data['build'];
// Nom de l'application
sessionStorage['application'] = data['application'];
// Paramètre "environment"
sessionStorage['environment'] = data['environment'];
// Paramètre "web_server_name" dans les properties (protocol + hostname + port).
if (typeof (data["web_server_name"]) == "undefined" || data["web_server_name"] == "") {
data["web_server_name"] = window.location.protocol + "//" + window.location.host;
}