On 09/26/2011 08:15 AM, Endi Sukma Dewata wrote:
On 9/23/2011 11:05 AM, Petr Vobornik wrote:
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.

This is an improvement over the existing code, but there's still an
issue. In other tables like in search page there's a space between one
column header to another. In this patch there is no space. It looks like
the header of the 'Attribute' column occupies the entire line (use
Firebug to select the element).

I've reworked the patch. It's simplified and it uses already build-in functionality.

For this particular case it's just a minor issue. But suppose we have
more columns it could be a problem because the other headers probably
will occupy the entire line too.

We can push the patch as is if you agree.

I think ideally we want to convert the IPA.attributes_widget to inherit from 
IPA.table_widget. The
table widget should calculate the column widths properly.
I agree.

--
Petr Vobornik
From 12e0dd3addb969b645cb9c45c806da4c612d10c4 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.
---
 install/ui/aci.js  |    9 ++++-----
 install/ui/ipa.css |   23 +++++------------------
 2 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index 929e13d4b3af3303c32d2122d8f2147afb99b185..fc62f2770979e95768a230c20c80d0aae0e3ce1e 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -248,7 +248,7 @@ IPA.attributes_widget = function(spec) {
 
         that.table = $('<table/>', {
             id:id,
-            'class':'search-table aci-attribute-table'
+            'class':'search-table aci-attribute-table scrollable'
         }).
             append('<thead/>').
             append('<tbody/>').
@@ -257,10 +257,9 @@ IPA.attributes_widget = function(spec) {
         var tr = $('<tr></tr>').appendTo($('thead', that.table));
 
         tr.append($('<th/>', {
-            style:"height:2em; vertical-align:bottom;",
-            html:$('<input/>',{
+            html: $('<input/>', {
                 type: "checkbox",
-                click: function(){
+                click: function() {
                     $('.aci-attribute', that.table).
                         attr('checked', $(this).attr('checked'));
                     that.set_dirty(that.test_dirty());
@@ -275,7 +274,7 @@ IPA.attributes_widget = function(spec) {
             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..a838195c042ed0e236306e3a15a241c141152a48 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -964,30 +964,17 @@ span.main-separator{
     cursor: default;
 }
 
-
-.aci-attribute-table {
-
-}
-
-.aci-attribute-table thead{
-    display: block;
-}
-
-
-.aci-attribute-table tbody{
-    width: 100%;
-    height:10em;
-    overflow:auto;
+.aci-attribute-table tbody {
     border-bottom: 1px solid #8a8a8a;
-    display: block;
+    height:10em;
 }
 
-.aci-attribute-table th.aci-attribute-column{
-    width: 20.5em;
+.aci-attribute-table .aci-attribute-column {
+    width: 200em; /* it will fit actual width */
 }
 
 .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