Authored by jimi

add table show

... ... @@ -297,7 +297,6 @@
//autocomplete:{selectFirst:true,width:'100px',autoFill:true}
// placeholder: "32133"
});
var selectname_begin = $("#cloudType").val();
var search_tag = $("#input_search_tag").val();
var user_key_begin = $("input[name='user_key']").val();
... ... @@ -351,6 +350,9 @@
function applicationTable_load(user_key,tag) {
var colors = new Array("red","green","blue","aqua","blueviolet","coral","gold","salmon","dimgray","purple","orange","green",
"yellow","yellowgreen","wheat","violet","olive");
var colormap = {};
$("#applicationTable").table({
columnAutoWidth: false,
url: contextPath + "/properity/getAuthModules?application=application&key=" + user_key+ "&tag=" + tag,
... ... @@ -367,6 +369,22 @@
align:"left",
alignColumn:"center",
width: "20%",
formatter: function (value, rowData, rowIndex) {
var arrkey=rowData.key.split(".");
if(arrkey.length >1){
var keyone = arrkey[0];
var arrkeylast=rowData.key.split(keyone);
if(!$.trim(colormap[keyone])){
var data_colour = Math.round(Math.random() * 17);
colormap[keyone]=colors[data_colour];
return "<span style='color: "+colors[data_colour]+"'>"+keyone+"</span>"+arrkeylast[1];
}else{
return "<span style='color: "+colormap[keyone]+"'>"+keyone+"</span>"+arrkeylast[1];
}
}else {
return "<span style='color: black'>"+rowData.key+"</span>";
}
}
}, {
title: "default",
field: "defaultValue",
... ... @@ -473,7 +491,9 @@
// }
function refreshModuleTable(selectname,user_key,tag) {
var colors = new Array("red","green","blue","aqua","blueviolet","coral","gold","salmon","dimgray","purple","orange","green",
"yellow","yellowgreen","wheat","violet","olive");
var colormap = {};
// var is_common_show = $("#checkbox_select").val();
$("#javaConfigTable").table({
... ... @@ -484,6 +504,13 @@
pagination: false,
pageSize: 10,
loadFilter: function (data) {
var ary=[];
if (data && data.code == 200) {
var dd = data.data;
for(i=0;i<dd.length;i++){
ary.push(dd[i].key);
}
}
return defaultLoadFilter(data);
},
columns: [{
... ... @@ -492,9 +519,25 @@
align:"left",
alignColumn:"center",
width: "20%",
// formatter: function (value, rowData, rowIndex) {
// return rowData.application + "[" + value + "]";
// }
formatter: function (value, rowData, rowIndex) {
var arrkey=rowData.key.split(".");
if(arrkey.length >1){
var keyone = arrkey[0];
var arrkeylast=rowData.key.split(keyone);
if(!$.trim(colormap[keyone])){
var data_colour = Math.round(Math.random() * 17);
colormap[keyone]=colors[data_colour];
return "<span style='color: "+colors[data_colour]+"'>"+keyone+"</span>"+arrkeylast[1];
}else{
return "<span style='color: "+colormap[keyone]+"'>"+keyone+"</span>"+arrkeylast[1];
}
}else {
return "<span style='color: black'>"+rowData.key+"</span>";
}
//console.log(div);
// return div;
}
}, {
title: "default",
field: "defaultValue",
... ...