Explorar o código

Allow the align property on th and td and add CSS rules for overriding text-alignment

kkthxbye-code %!s(int64=2) %!d(string=hai) anos
pai
achega
4b2922312a

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-dark.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-light.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-print.css


+ 12 - 0
netbox/project-static/styles/netbox.scss

@@ -1002,6 +1002,18 @@ div.card-overlay {
   padding: 8px;
 }
 
+th[align="left"] {
+  text-align: left;
+}
+
+th[align="center"] {
+  text-align: center;
+}
+
+th[align="right"] {
+  text-align: right;
+}
+
 /* Markdown widget */
 .markdown-widget {
   .nav-link {

+ 2 - 0
netbox/utilities/utils.py

@@ -519,6 +519,8 @@ def clean_html(html, schemes):
         "h1": ["id"], "h2": ["id"], "h3": ["id"], "h4": ["id"], "h5": ["id"], "h6": ["id"],
         "a": ["href", "title"],
         "img": ["src", "title", "alt"],
+        "th": ["align"],
+        "td": ["align"],
     }
 
     return bleach.clean(

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio