Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.1 KiB

import basic.program
CSS_CLASS = {
"general": {
"table, td, th": "border: 1px solid grey;font-family:sans-serif"
},
"diffFiles": {
"diffA": "color:green;font-weight:bold;",
"diffB": "color:crimson;font-weight:bold;",
"acceptA": "color:darkblue;",
"acceptB": "color:darkmagenta;"
}
}
def getInlineStyle(filetype, cssclass):
job = basic.program.Job.getInstance()
verify = int(job.getDebugLevel("css_tool")) - 1
# job.debug(verify, "getDiffHeader ")
if job.conf.confs.get("tools").get("csstyp") == "inline":
out = "style=\""+CSS_CLASS[filetype][cssclass]+"\""
else:
out = "class=\"" + cssclass + "\""
return out
def getInternalStyle(filetype):
job = basic.program.Job.getInstance()
verify = int(job.getDebugLevel("match_tool")) - 1
out = ""
if job.conf.confs.get("tools").get("csstyp") == "internal":
out = "<style>"
for c in CSS_CLASS["general"]:
line = "\n"+c+" { "+CSS_CLASS["general"][c]+"} "
line.replace(":", ": ").replace(";", "; ").replace("_Q_", ", ")
out += line
for c in CSS_CLASS[filetype]:
out += "\n."+c+" { "+CSS_CLASS[filetype][c].replace(":", ": ").replace(";", "; ")+"} "
out += "\n</style>"
elif job.conf.confs.get("tools").get("csstyp") == "external":
out = " <link rel=\"stylesheet\" href=\""+job.conf.confs.get("tools").get("cssfile")+"\"> "
else:
out = "<style>"
for c in CSS_CLASS["general"]:
line = "\n "+c+" { "+CSS_CLASS["general"][c]+" } "
line.replace(":", ": ").replace(";", "; ").replace("_Q_", ", ")
out += line
out += " \n </style>"
return out
def getExternalStyle(filetype):
job = basic.program.Job.getInstance()
verify = int(job.getDebugLevel("match_tool")) - 1
out = ""
if job.conf.confs.get("tools").get("csstyp") == "external":
for c in CSS_CLASS[filetype]:
out += c+" {\n "+CSS_CLASS[filetype][c].replace(":", ": ").replace(";", ";\n ")+"}\n"
out.replace("\n \n}", "\n}")
return out