Commit b719fc2c authored by prumde's avatar prumde

Updated for passing ECM_TYPE and SITE_CODE to "app/index.html"

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@175129 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 41b6420a
......@@ -2,6 +2,7 @@
<head>
<script type="text/javascript">
var SYS_REST_ENTRY = '/ibase/ecm/service/sys';
var siteCode = 'L2D01';
function postSite(path, callback)
{
......@@ -25,12 +26,12 @@
function loadApp()
{
window.location.href = '../app/index.html?ECM_TYPE=1';
window.location.href = '../app/index.html?ECM_TYPE=1&SITE_CODE=' + siteCode;
}
</script>
</head>
<!-- Temporary Site Code paased hardcoded : L2D01 -->
<body onload=" postSite('/site/L2D01', loadApp)">
<body onload=" postSite('/site/' + siteCode, loadApp)">
Loading Local2do Catalog...
</body>
</html>
......@@ -6,11 +6,12 @@
function postSite(path, callback)
{
var url = SYS_REST_ENTRY + path + siteCode;
var url = SYS_REST_ENTRY + path;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && (this.status == 200 || this.status == 204))
{
console.log('onreadystatechange', this, callback);
if (callback)
{
callback.call();
......@@ -25,7 +26,7 @@
function loadApp()
{
window.location.href = '../app/index.html?ECM_TYPE=3';
window.location.href = '../app/index.html?ECM_TYPE=3&SITE_CODE=' + siteCode;
}
function get(name)
......@@ -37,7 +38,7 @@
}
</script>
</head>
<body onload=" postSite('/site/', loadApp)">
<body onload=" postSite('/site/' + siteCode, loadApp)">
Loading Purchase Catalog...
</body>
</html>
......@@ -6,11 +6,12 @@
function postSite(path, callback)
{
var url = SYS_REST_ENTRY + path + siteCode;
var url = SYS_REST_ENTRY + path;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && (this.status == 200 || this.status == 204))
{
console.log('onreadystatechange', this, callback);
if (callback)
{
callback.call();
......@@ -25,7 +26,7 @@
function loadApp()
{
window.location.href = '../app/index.html?ECM_TYPE=2';
window.location.href = '../app/index.html?ECM_TYPE=2&SITE_CODE=' + siteCode;
}
function get(name)
......@@ -37,7 +38,7 @@
}
</script>
</head>
<body onload=" postSite('/site/', loadApp)">
<body onload=" postSite('/site/' + siteCode, loadApp)">
Loading Sales Catalog...
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment