On 06/03/2011 01:41 PM, Adam Young wrote:
On 06/03/2011 12:15 PM, Adam Young wrote:
On 06/03/2011 11:36 AM, Adam Young wrote:
Fixes an artifact created by yesterdays scrolling table patch.


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel
self NACK, just thought of a cleaner implementation.


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel
This is a little simpler.


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel
Fixed critique from IRC
From b9508bf84f0fcaaeed3d6a847a73d7a7999737d3 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Fri, 3 Jun 2011 11:33:32 -0400
Subject: [PATCH] dialog scrolling table

Tables on the dialog page need to have the scrolling set but should not resize with the main window, since their window is a JQuery UI dialog.
---
 install/ui/associate.js |    3 ++-
 install/ui/entity.js    |    1 -
 install/ui/ipa.css      |    3 +++
 install/ui/search.js    |    2 +-
 install/ui/widget.js    |   12 ++++++++----
 5 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/install/ui/associate.js b/install/ui/associate.js
index f7ac1505ef8cd9003f7589db9a40033dcc8fe5f9..6e6fb8751f877a3f600fcfe2a227aaf7f7bb71c3 100644
--- a/install/ui/associate.js
+++ b/install/ui/associate.js
@@ -774,7 +774,8 @@ IPA.association_facet = function (spec) {
             entity_name: that.entity_name,
             other_entity: that.other_entity,
             page_length: that.page_length,
-            scrollable: true
+            scrollable: true,
+            resizeable: true
         });
 
         var columns = that.columns.values;
diff --git a/install/ui/entity.js b/install/ui/entity.js
index da5b3ea6030cc8858714edc8c9a12ec3a80a2a68..c3c5135b96dd74dfd19e6306ab3580ff16aacc56 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -132,7 +132,6 @@ IPA.facet = function (spec) {
 
     that.resize = function(){
         var facet_content = $('.facet-content', that.container);
-        facet_content.css("height", 'auto');
         facet_content.css('overflow-y', 'auto');
 
         var content_max_height = $(window).height() -
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index 524dc7f6247b644d010e38501716b26e30ebd239..31db27a8d0fa6c019a68ff85b5c725bbed8c91ae 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -385,6 +385,9 @@ span.attrhint {
   //background-image: url("ui-icons_222222_256x240.png");
     background-color: #e2e2e2;
 }
+.ui-dialog .ui-dialog-content {
+    overflow:hidden;
+}
 
 .ui-widget-content {
 }
diff --git a/install/ui/search.js b/install/ui/search.js
index 33eb8c93c80c1c0d0d3d9e3b31a73ee1fda082cf..155dade7e8050408089668158221f5e537ba89a1 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -75,9 +75,9 @@ IPA.search_facet = function(spec) {
             };
         }
 
-
         that.table = IPA.table_widget({
             scrollable: true,
+            resizeable: true,
             id: entity.name+'-search',
             name: 'search',
             label: IPA.metadata.objects[entity.name].label,
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 9cbd31f0a08539ee8ac6e72feb151d580a7fe1f3..054ed37339405c01ec91e90d6c634a9392da8146 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -1060,7 +1060,7 @@ IPA.table_widget = function (spec) {
     that.current_page = 1;
     that.total_pages = 1;
     that.page_length = spec.page_length;
-
+    that.resizeable = spec.resizeable || false;
     that.columns = $.ordered_map();
 
     that.get_columns = function() {
@@ -1298,10 +1298,14 @@ IPA.table_widget = function (spec) {
     };
 
     that.resize = function(){
-        if (that.scrollable){
+        if (that.resizeable){
             that.tbody.attr('overflow-y', 'auto');
-            that.tbody.height("auto");
-            var table_max_height = $(window).height() -
+
+            var win = $(that.container).parent('.ui_resizable');
+            if (win.length === 0 ){
+                win = $(window);
+            }
+            var table_max_height = win.height() -
                 IPA.reserved_screen_size;
             that.tbody.height(table_max_height);
         }
-- 
1.7.5.1

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

Reply via email to