wip javascript
This commit is contained in:
@@ -1401,16 +1401,11 @@
|
|||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
#container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toptable {
|
#toptable {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="logonDiv"></div>
|
|
||||||
<div id="container"></div>
|
<div id="container"></div>
|
||||||
|
|
||||||
|
|
||||||
@@ -1436,14 +1431,11 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
jsViewsRegisterHelpers();
|
jsViewsRegisterHelpers();
|
||||||
|
|
||||||
|
|
||||||
showMainContainer("container");
|
|
||||||
|
|
||||||
//baseApiUrl = "https://localhost:8443/mifosng-provider/api/v1/";
|
//baseApiUrl = "https://localhost:8443/mifosng-provider/api/v1/";
|
||||||
baseApiUrl = "https://ec2-46-137-62-163.eu-west-1.compute.amazonaws.com:8443/mifosng-provider/api/v1/";
|
baseApiUrl = "https://ec2-46-137-62-163.eu-west-1.compute.amazonaws.com:8443/mifosng-provider/api/v1/";
|
||||||
if (QueryParameters["baseApiUrl"]) baseApiUrl = QueryParameters["baseApiUrl"];
|
if (QueryParameters["baseApiUrl"]) baseApiUrl = QueryParameters["baseApiUrl"];
|
||||||
|
|
||||||
showILLogon("logonDiv");
|
showILLogon("container");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ function doI18N(xlateStr, params) {
|
|||||||
|
|
||||||
|
|
||||||
// load html functions
|
// load html functions
|
||||||
function showMainContainer(containerDivName) {
|
function showMainContainer(containerDivName, username) {
|
||||||
|
|
||||||
var htmlVar = '<div id="logowrapper">';
|
var htmlVar = '<div id="logowrapper">';
|
||||||
htmlVar += ' <span style="float: left">';
|
htmlVar += ' <span style="float: left">';
|
||||||
@@ -93,12 +93,12 @@ function showMainContainer(containerDivName) {
|
|||||||
htmlVar += ' <li><a href="?lang=zh">zh</a></li>';
|
htmlVar += ' <li><a href="?lang=zh">zh</a></li>';
|
||||||
htmlVar += ' </ul>';
|
htmlVar += ' </ul>';
|
||||||
htmlVar += ' </li>';
|
htmlVar += ' </li>';
|
||||||
htmlVar += ' <li><a href="org/admin/settings" class="dmenu">xxxxxxxxmifos</a>';
|
htmlVar += ' <li><a href="org/admin/settings" class="dmenu">' + username + '</a>';
|
||||||
htmlVar += ' <ul>';
|
htmlVar += ' <ul>';
|
||||||
htmlVar += ' <li><a href="org/admin/settings">' + doI18N("link.topnav.account.settings") + '</a></li>';
|
htmlVar += ' <li><a href="org/admin/settings">' + doI18N("link.topnav.account.settings") + '</a></li>';
|
||||||
htmlVar += ' </ul>';
|
htmlVar += ' </ul>';
|
||||||
htmlVar += ' </li>';
|
htmlVar += ' </li>';
|
||||||
htmlVar += ' <li><a href="signout">' + doI18N("link.signout") + '</a></li>';
|
htmlVar += ' <li><a href="unknown.html" onclick="signOut(' + "'" + containerDivName + "'" + ');return false;">' + doI18N("link.signout") + '</a></li>';
|
||||||
htmlVar += '</ul>';
|
htmlVar += '</ul>';
|
||||||
htmlVar += '<br class="clear">';
|
htmlVar += '<br class="clear">';
|
||||||
htmlVar += '</div><div style="float:none; clear:both;">';
|
htmlVar += '</div><div style="float:none; clear:both;">';
|
||||||
@@ -134,12 +134,12 @@ function setBasicAuthKey(logonDivName, username, password)
|
|||||||
cache : false,
|
cache : false,
|
||||||
success : function(data, textStatus, jqXHR) {
|
success : function(data, textStatus, jqXHR) {
|
||||||
base64 = data.base64EncodedAuthenticationKey;
|
base64 = data.base64EncodedAuthenticationKey;
|
||||||
$("#" + logonDivName).hide();
|
showMainContainer(logonDivName, username);
|
||||||
$("#container").show();
|
|
||||||
showILClientListing();
|
showILClientListing();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
error : function(jqXHR, textStatus, errorThrown) {
|
error : function(jqXHR, textStatus, errorThrown) {
|
||||||
|
//actually should have more checking here, its not just invalid user/pwd that may get here
|
||||||
alert("Invalid Username/Password");
|
alert("Invalid Username/Password");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1592,3 +1592,14 @@ function selectNewThousandsSep(selectedVal) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//sign-out
|
||||||
|
function signOut(containerDivName) {
|
||||||
|
base64 = "";
|
||||||
|
$("#" + containerDivName).html("");
|
||||||
|
alert("Close the Browser for a Complete Sign Out");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user