https://fedorahosted.org/freeipa/ticket/1841

The column header for the attributes table (IPA.attributes_widget) does not cover the entire width of the table. This problem appears in the adder dialog and details page for permissions, self-service permissions, and delegations.

Note:
* <span> element is added in order to set padding for cell text because parent <th> element has css-hacked width. Tbody's use of overflow is the cause of used hacks.
--
Petr Vobornik
From 6d5429191f5f530d5aae6b689a2326404ef4f126 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Fri, 23 Sep 2011 17:49:46 +0200
Subject: [PATCH] Fixed: Column header for attributes table should be full
 width

https://fedorahosted.org/freeipa/ticket/1841

The column header for the attributes table (IPA.attributes_widget) does not cover the entire width of the table. This problem appears in the adder dialog and details page for permissions, self-service permissions, and delegations.

Note:
 * <span> element is added in order to set padding for cell text because parent <th> element has css-hacked width. Tbody's use of overflow is the cause of used hacks.
---
 install/ui/aci.js  |   17 ++++++++++-------
 install/ui/ipa.css |   19 ++++++++++++++++---
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index 929e13d4b3af3303c32d2122d8f2147afb99b185..868b51ebf7efa4eb3cf67f8acb8fade48e906c05 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -257,25 +257,28 @@ IPA.attributes_widget = function(spec) {
         var tr = $('<tr></tr>').appendTo($('thead', that.table));
 
         tr.append($('<th/>', {
-            style:"height:2em; vertical-align:bottom;",
-            html:$('<input/>',{
+            'class': 'aci-select-column',
+            html: $('<input/>', {
                 type: "checkbox",
-                click: function(){
+                click: function() {
                     $('.aci-attribute', that.table).
                         attr('checked', $(this).attr('checked'));
                     that.set_dirty(that.test_dirty());
                 }
             })
-        })).append($('<th/>', {
-            'class': 'aci-attribute-column',
-            html: IPA.messages.objects.aci.attribute
         }));
+        var th = $('<th/>', {
+            'class': 'aci-attribute-column'
+        }).appendTo(tr);
+        $('<span/>', {
+            html: IPA.messages.objects.aci.attribute
+        }).appendTo(th);
 
         if (that.undo) {
             that.create_undo(container);
         }
 
-        if (that.object_type){
+        if (that.object_type) {
             that.populate(that.object_type);
         }
     };
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index 7876da355edcd8a160c51bdcb1b2db2798192b0f..6d6ab9c84b61b6b0bcc2a7c3400f9bb6ea77d391 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -969,7 +969,9 @@ span.main-separator{
 
 }
 
-.aci-attribute-table thead{
+.aci-attribute-table thead,
+.aci-attribute-table thead tr,
+.aci-attribute-table thead th{
     display: block;
 }
 
@@ -982,12 +984,23 @@ span.main-separator{
     display: block;
 }
 
+.aci-attribute-table th.aci-select-column{
+    height:2em;
+    float: left;
+}
+
 .aci-attribute-table th.aci-attribute-column{
-    width: 20.5em;
+    height:2em;
+    width: auto;
+    line-height: 2em;
+}
+
+.aci-attribute-table th.aci-attribute-column span{
+    padding: 0 0.5em;
 }
 
 .entity-views{
-     list-style-type:none;
+    list-style-type:none;
 }
 
 .entity-views li {
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to