Commits

Darrell Schiebel authored ebaacfd9817 Merge
Merge pull request #431 in CASA/casa6 from CAS-13415 to master

* commit 'fd0e2a5039007b14b060bab59934dfc81bcd5851': Update to wrap text in weblog for casatestutils
No tags

casa5/gcwrap/python/scripts/casatestutils/weblog.py

Modified
57 57 self.html.write(' position: fixed; /* Stay in place */' + '\n')
58 58 self.html.write(' z-index: 1; /* Sit on top */' + '\n')
59 59 self.html.write(' padding-top: 100px; /* Location of the box */' + '\n')
60 60 self.html.write(' left: 0;' + '\n')
61 61 self.html.write(' top: 0;' + '\n')
62 62 self.html.write(' width: 100%; /* Full width */' + '\n')
63 63 self.html.write(' height: 100%; /* Full height */' + '\n')
64 64 self.html.write(' overflow: auto; /* Enable scroll if needed */' + '\n')
65 65 self.html.write(' background-color: rgb(0,0,0); /* Fallback color */' + '\n')
66 66 self.html.write(' background-color: rgba(0,0,0,0.9); /* Black w/ opacity */' + '\n')
67 + self.html.write(' word-wrap: break-word; /* Wrap Text */' + '\n')
67 68 self.html.write('}' + '\n')
68 69 self.html.write('/* Modal Content (Image) */' + '\n')
69 70 self.html.write('.modal-content {' + '\n')
70 71 self.html.write(' margin: auto;' + '\n')
71 72 self.html.write(' display: block;' + '\n')
72 73 self.html.write(' width: 80%;' + '\n')
73 74 self.html.write(' max-width: 700px;' + '\n')
74 75 self.html.write('}' + '\n')
75 76 self.html.write('/* Caption of Modal Image (Image Text) - Same Width as the Image */' + '\n')
76 77 self.html.write('#caption {' + '\n')
118 119
119 120
120 121 def generate_status_table_style(self,dictionary):
121 122 with open("test_{}_weblog.html".format(self.taskname.lower()), 'a+') as self.html:
122 123 self.html.write('<style type="text/css">' + '\n')
123 124 self.html.write('.collapsible {background-color: #777;color: white;cursor: pointer;padding: 18px;width: 100%;border: none;text-align: left;outline: none;font-size: 15px;}' + '\n')
124 125 self.html.write('.active, .collapsible:hover { background-color: #555;}' + '\n')
125 126 self.html.write('.content {padding: 0 18px;display: none;overflow: hidden;background-color: #f1f1f1;}' + '\n')
126 127 self.html.write(".boxed { border: 1px solid green ;padding: 0 5px 0 5px;margin: 50px}" + '\n')
127 128 self.html.write('.tg {border-collapse:collapse;border-spacing:0;}' + '\n')
128 - self.html.write('.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}' + '\n')
129 - self.html.write('.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}' + '\n')
129 + self.html.write('.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;word-wrap:break-word;}' + '\n')
130 + self.html.write('.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;word-wrap:break-word;}' + '\n')
130 131 self.html.write('.tg .tg-0lax{text-align:left;vertical-align:top}' + '\n')
131 132 self.html.write('.tg .tg-ck9b{background-color:#009901;color:#32cb00;text-align:left;vertical-align:top}' + '\n')
132 133 self.html.write('.tg .tg-r50r{background-color:#cb0000;text-align:left;vertical-align:top}' + '\n')
133 134 self.html.write('.tg-sort-header::-moz-selection{background:0 0}.tg-sort-header::selection{background:0 0}.tg-sort-header{cursor:pointer}.tg-sort-header:after{content:'';float:right;margin-top:7px;border-width:0 5px 5px;border-style:solid;border-color:#404040 transparent;visibility:hidden}.tg-sort-header:hover:after{visibility:visible}.tg-sort-asc:after,.tg-sort-asc:hover:after,.tg-sort-desc:after{visibility:visible;opacity:.4}.tg-sort-desc:after{border-bottom:none;border-width:5px 5px 0}' + '\n')
134 135 Weblog(self.taskname, self.localdict).write_modal_style()
135 136 with open("test_{}_weblog.html".format(self.taskname.lower()), 'a+') as self.html:
136 137 self.html.write('</style>' + '\n')
137 138
138 139 def generate_tail(self,dictionary):
139 140 with open("test_{}_weblog.html".format(self.taskname.lower()), 'a+') as self.html:

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut