Exchange object progress

This commit is contained in:
Ziver Koc 2021-04-29 01:11:16 +02:00
parent 4db1f866f3
commit 7f1933576b
15 changed files with 11013 additions and 43 deletions

10881
src/main/resources/web/js/jquery.js vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -65,23 +65,24 @@ function initDynamicModalForm(modalId, formTemplateId = null, templateID = null)
// read in all configurations into global variable (to skip naming issues)
if (formTemplateId != null) {
dynamicConf[formTemplateId] = [];
$("#"+templateID+" div").each(function(){
$("#" + templateID + " div").each(function(){
dynamicConf[formTemplateId][$(this).attr("id")] = $(this).html();
});
// Update dynamic inputs
$("#"+modalId+" select[name=type]").change(function(){
$("#"+modalId+" #"+formTemplateId).html(dynamicConf[formTemplateId][$(this).val()]);
$("#" + modalId + " select[name=type]").change(function(){
$("#" + modalId + " #"+formTemplateId).html(dynamicConf[formTemplateId][$(this).val()]);
});
}
// click event
$("#"+modalId).on('show.bs.modal', function (event) {
// Listen to click event
$("#" + modalId).on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var modal = $(this);
// Reset all inputs
if (formTemplateId != null)
modal.find("#"+formTemplateId).empty(); // clear form div
modal.find("#" + formTemplateId).empty(); // clear form div
// select dynamic form
var selector = modal.find("select[name=type]");
@ -100,7 +101,7 @@ function initDynamicModalForm(modalId, formTemplateId = null, templateID = null)
if (value=="true") input.attr("checked", "true");
else input.removeAttr("checked");
// Add default false value as a unchecked checkbox is not included in the post
input.parent().prepend("<input type='hidden' name='"+input.attr("name")+"' value='false' />");
input.parent().prepend("<input type='hidden' name='" + input.attr("name") + "' value='false' />");
} else {
input.val(value);
}

View file

@ -1,6 +1,4 @@
var echarts = require('echarts');
var ROOT_PATH = 'https://echarts.apache.org/examples';
/*var ROOT_PATH = 'https://echarts.apache.org/examples';
var UP_COLOR = '#00da3c';
var DOWN_COLOR = '#ec0000';
@ -8,8 +6,8 @@ var DOWN_COLOR = '#ec0000';
$.get(ROOT_PATH + '/data/asset/data/stock-DJI.json', function (rawData) {
var data = splitData(rawData);
initTradeChart(elementID, data)
}
});
*/
function splitData(rawData) {
var categoryData = [];
@ -223,4 +221,4 @@ function initTradeChart(elementID, data) {
},
]
}, true);
});
}