wip javascript
This commit is contained in:
@@ -39,7 +39,60 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- portfolio templates below here -->
|
<style type="text/css">
|
||||||
|
|
||||||
|
#settings {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toptable {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="container"></div>
|
||||||
|
<script type="text/javascript" src="resources/IndividualLendingCode.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
// default to 'en' culture - no need to import extra javascript files for globalize.js or datapicker
|
||||||
|
Globalize.culture('en');
|
||||||
|
|
||||||
|
$.datepicker.setDefaults( $.datepicker.regional['en']);
|
||||||
|
|
||||||
|
jQuery.i18n.properties({
|
||||||
|
name:'messages',
|
||||||
|
path: 'resources/global-translations/',
|
||||||
|
mode:'map',
|
||||||
|
cache: true,
|
||||||
|
language: '', // leave blank so defaults to 'en'
|
||||||
|
callback: function() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
jsViewsRegisterHelpers();
|
||||||
|
|
||||||
|
//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/";
|
||||||
|
if (QueryParameters["baseApiUrl"]) baseApiUrl = QueryParameters["baseApiUrl"];
|
||||||
|
|
||||||
|
showILLogon("container");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Everything below here is just templates for jsrender to process in order to display the various pages -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- portfolio templates -->
|
||||||
<script id="newLoanScheduleTemplate" type="text/x-jquery-tmpl">
|
<script id="newLoanScheduleTemplate" type="text/x-jquery-tmpl">
|
||||||
<table id="repaymentschedule" class="pretty displayschedule">
|
<table id="repaymentschedule" class="pretty displayschedule">
|
||||||
<caption>Repayment Schedule</caption>
|
<caption>Repayment Schedule</caption>
|
||||||
@@ -1397,58 +1450,6 @@
|
|||||||
|
|
||||||
<!-- end of admin templates -->
|
<!-- end of admin templates -->
|
||||||
|
|
||||||
<!-- real action start here -->
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
#settings {
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 16px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toptable {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div id="container"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="resources/IndividualLendingCode.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
// default to 'en' culture - no need to import extra javascript files for globalize.js or datapicker
|
|
||||||
Globalize.culture('en');
|
|
||||||
|
|
||||||
$.datepicker.setDefaults( $.datepicker.regional['en']);
|
|
||||||
|
|
||||||
jQuery.i18n.properties({
|
|
||||||
name:'messages',
|
|
||||||
path: 'resources/global-translations/',
|
|
||||||
mode:'map',
|
|
||||||
cache: true,
|
|
||||||
language: '', // leave blank so defaults to 'en'
|
|
||||||
callback: function() {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
jsViewsRegisterHelpers();
|
|
||||||
|
|
||||||
//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/";
|
|
||||||
if (QueryParameters["baseApiUrl"]) baseApiUrl = QueryParameters["baseApiUrl"];
|
|
||||||
|
|
||||||
showILLogon("container");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+20
-10
@@ -20,12 +20,6 @@ saveSuccessFunctionReloadClient = function(data, textStatus, jqXHR) {
|
|||||||
showILClient(currentClientId );
|
showILClient(currentClientId );
|
||||||
};
|
};
|
||||||
|
|
||||||
saveSuccessFunctionReloadLoan = function(data, textStatus, jqXHR) {
|
|
||||||
$("#dialog-form").dialog("close");
|
|
||||||
loadILLoan(loanId);
|
|
||||||
clientDirty = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
formErrorFunction = function(jqXHR, textStatus, errorThrown) {
|
formErrorFunction = function(jqXHR, textStatus, errorThrown) {
|
||||||
handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");
|
handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");
|
||||||
};
|
};
|
||||||
@@ -907,6 +901,18 @@ function showILClient(clientId) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function genSaveSuccessFunctionReloadLoan(loanId) {
|
||||||
|
|
||||||
|
return 'var saveSuccessFunctionReloadLoan = function(data, textStatus, jqXHR) { ' +
|
||||||
|
' $("#dialog-form").dialog("close");' +
|
||||||
|
' loadILLoan(' + loanId + ');' +
|
||||||
|
' clientDirty = true;' +
|
||||||
|
'};';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function repopulateFullForm(clientId, productId) {
|
function repopulateFullForm(clientId, productId) {
|
||||||
|
|
||||||
successFunction = function(data, textStatus, jqXHR) {
|
successFunction = function(data, textStatus, jqXHR) {
|
||||||
@@ -1115,7 +1121,8 @@ function loadILLoan(loanId) {
|
|||||||
var width = 500;
|
var width = 500;
|
||||||
var height = 350;
|
var height = 350;
|
||||||
var defaultOffset = offsetToSubmittedDate;
|
var defaultOffset = offsetToSubmittedDate;
|
||||||
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.approve.loan', templateSelector, width, height, saveSuccessFunctionReloadLoan , offsetToSubmittedDate, defaultOffset, maxOffset)
|
eval(genSaveSuccessFunctionReloadLoan(loanId));
|
||||||
|
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.approve.loan', templateSelector, width, height, saveSuccessFunctionReloadLoan, offsetToSubmittedDate, defaultOffset, maxOffset)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
$('button.approveloan span').text(doI18N('dialog.button.approve.loan'));
|
$('button.approveloan span').text(doI18N('dialog.button.approve.loan'));
|
||||||
@@ -1129,7 +1136,8 @@ function loadILLoan(loanId) {
|
|||||||
var width = 500;
|
var width = 500;
|
||||||
var height = 350;
|
var height = 350;
|
||||||
var defaultOffset = offsetToSubmittedDate;
|
var defaultOffset = offsetToSubmittedDate;
|
||||||
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.undo.loan.approval', templateSelector, width, height, saveSuccessFunctionReloadLoan , offsetToSubmittedDate, defaultOffset, maxOffset)
|
eval(genSaveSuccessFunctionReloadLoan(loanId));
|
||||||
|
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.undo.loan.approval', templateSelector, width, height, saveSuccessFunctionReloadLoan, offsetToSubmittedDate, defaultOffset, maxOffset)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
$('button.undoapproveloan span').text(doI18N('dialog.button.undo.loan.approval'));
|
$('button.undoapproveloan span').text(doI18N('dialog.button.undo.loan.approval'));
|
||||||
@@ -1157,7 +1165,8 @@ function loadILLoan(loanId) {
|
|||||||
var width = 500;
|
var width = 500;
|
||||||
var height = 350;
|
var height = 350;
|
||||||
var defaultOffset = offsetToApprovalDate;
|
var defaultOffset = offsetToApprovalDate;
|
||||||
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.disburse.loan', templateSelector, width, height, saveSuccessFunctionReloadLoan , offsetToSubmittedDate, defaultOffset, maxOffset)
|
eval(genSaveSuccessFunctionReloadLoan(loanId));
|
||||||
|
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.disburse.loan', templateSelector, width, height, saveSuccessFunctionReloadLoan, offsetToSubmittedDate, defaultOffset, maxOffset)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
$('button.disburseloan span').text(doI18N('dialog.button.disburse.loan'));
|
$('button.disburseloan span').text(doI18N('dialog.button.disburse.loan'));
|
||||||
@@ -1171,7 +1180,8 @@ function loadILLoan(loanId) {
|
|||||||
var width = 500;
|
var width = 500;
|
||||||
var height = 350;
|
var height = 350;
|
||||||
var defaultOffset = offsetToApprovalDate;
|
var defaultOffset = offsetToApprovalDate;
|
||||||
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.undo.loan.disbursal', templateSelector, width, height, saveSuccessFunctionReloadLoan , offsetToSubmittedDate, defaultOffset, maxOffset)
|
eval(genSaveSuccessFunctionReloadLoan(loanId));
|
||||||
|
popupDialogWithPostOnlyFormView(postUrl, 'POST', 'dialog.title.undo.loan.disbursal', templateSelector, width, height, saveSuccessFunctionReloadLoan, offsetToSubmittedDate, defaultOffset, maxOffset)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
$('button.undodisbursalloan span').text(doI18N('dialog.button.undo.loan.disbursal'));
|
$('button.undodisbursalloan span').text(doI18N('dialog.button.undo.loan.disbursal'));
|
||||||
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 819 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 927 B |
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user