/**
* Created by Tony on 2017/12/8.
*/
let rpt_tpl_cfg_helper = {
reportCfg: null,
getReportTplCfg: function() {
let me = this, params = {};
params.userId = userID;
CommonAjax.postEx("report_tpl_api/getUserRptCfg", params, 20000, true, function(result){
me.reportCfg = result;
me.refreshRptCfgs();
}, null, null
);
},
refreshRptCfgs: function () {
let me = this;
if (me.reportCfg) {
me.reportCfg.borderArr = [];
for (let style of me.reportCfg.styles) {
me.reportCfg.borderArr.push(style.ID);
$("#borderStyles").append("");
$("#elementBorders").append("");
}
me.reportCfg.fontArr = [];
for (let font of me.reportCfg.fonts) {
if (font.CfgDispName) {
me.reportCfg.fontArr.push(font.ID);
$("#elementFonts").append("");
} else {
me.reportCfg.fontArr.push("dummy font");
}
}
me.reportCfg.controlArr = [];
for (let control of me.reportCfg.ctrls) {
if (control.CfgDispName) {
me.reportCfg.controlArr.push(control.ID);
$("#elementControls").append("");
} else {
me.reportCfg.controlArr.push("dummy control");
}
}
}
//elementFonts
let pf = $("#pageFrequency");
pf.append("");
pf.append("");
pf.append("");
pf.append("");
pf.append("");
pf.append("");
pf.append("");
pf.append("");
let ba = $("#bandAlignment");
ba.append("");
ba.append("");
ba.append("");
ba.append("");
ba.append("");
},
checkAndSetSelectedNodeCfg: function (treeNode) {
if (treeNode[JV.PROP_AREA]) {
$("#element_font")[0].style.display = "";
$("#element_border")[0].style.display = "";
$("#element_control")[0].style.display = "";
} else {
$("#element_font")[0].style.display = "none";
$("#element_border")[0].style.display = "none";
$("#element_control")[0].style.display = "none";
}
},
fontChange: function(dom) {
//
},
borderChange: function(dom) {
//
},
controlChange: function(dom) {
//
},
changeAlignment: function(dom, type) {
if (type === "horizon") {
//
} else {
//vertical
}
}
};