Commit ad15664d by Peter Eastman

Additional minor improvements to UI

parent b69bc988
...@@ -58,7 +58,6 @@ select { ...@@ -58,7 +58,6 @@ select {
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border: 1pt solid black;
margin: 7pt margin: 7pt
} }
th { th {
......
...@@ -20,10 +20,15 @@ def loadHtmlFile(name): ...@@ -20,10 +20,15 @@ def loadHtmlFile(name):
file = os.path.join(htmlPath, name) file = os.path.join(htmlPath, name)
return open(file).read() return open(file).read()
cachedImages = {}
def loadImageFile(name): def loadImageFile(name):
imagePath = os.path.join(os.path.dirname(__file__), 'images') global cachedImages
file = os.path.join(imagePath, name) if name not in cachedImages:
return open(file).read() imagePath = os.path.join(os.path.dirname(__file__), 'images')
file = os.path.join(imagePath, name)
cachedImages[name] = open(file).read()
return cachedImages[name]
def controlsCallback(parameters, handler): def controlsCallback(parameters, handler):
if 'newfile' in parameters: if 'newfile' in parameters:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment