[Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

Fixes an artifact created by yesterdays scrolling table patch.
From 5c931916c2fbf70b9c4ceb565bb5c56c9fa595ab 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/ipa.css  |3 +++
 install/ui/search.js|2 +-
 install/ui/widget.js|   11 ---
 4 files changed, 14 insertions(+), 5 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/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_22_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..ccaa9ca5a163de448e946e60f8f173a3eab0841b 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,15 @@ 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

Re: [Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

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

Re: [Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

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.
From 61c8a16fd61f628628841cd5213e94e0059e9501 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/ipa.css  |3 +++
 install/ui/search.js|2 +-
 install/ui/widget.js|   11 ---
 4 files changed, 14 insertions(+), 5 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/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_22_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..ccaa9ca5a163de448e946e60f8f173a3eab0841b 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,15 @@ 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

Re: [Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

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_22_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

Re: [Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

On 06/03/2011 03:24 PM, Adam Young wrote:

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


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

Missed some changes

From fb34fbb4fb168bbfb87487026f013a48c22a167d 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|9 +
 5 files changed, 11 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_22_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..46320f8eac14578190cc014b12ed8472c3f7df0d 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,11 @@ 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 = $(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

Re: [Freeipa-devel] [PATCH] 0233-dialog-scrolling-table

2011-06-03 Thread Adam Young

On 06/03/2011 03:25 PM, Adam Young wrote:

On 06/03/2011 03:24 PM, Adam Young wrote:

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


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

Missed some changes


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

Previous versions of the patch missed a pretty major change I had made.
From b99b87513fbb883bde8d6bc6db2d28cb47b2 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/aci.js|1 +
 install/ui/dialog.js |6 ++
 install/ui/entity.js |1 -
 install/ui/ipa.css   |   27 +--
 install/ui/search.js |1 -
 install/ui/widget.js |   14 ++
 6 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index d507e2d07b85809d1e45bddbbe6cc3f59faffd02..70fe6d9258b6a495bec0a73ce6f22d7b6f5fdb56 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -50,6 +50,7 @@ IPA.entity_factories.permission = function() {
 }]}).
 standard_association_facets().
 adder_dialog({
+height: '400',
 fields:[
 'cn',
 {
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index 3bcb4556dfd2cfe4008951e0339c6846da4cc3c2..36bc49bb441d9c78d13a6efbbbefdd60c44021a0 100644
--- a/install/ui/dialog.js
+++ b/install/ui/dialog.js
@@ -394,6 +394,9 @@ IPA.adder_dialog = function (spec) {
 height: '151px'
 });
 
+that.available_table.resize = function(){
+};
+
 var columns = that.columns.values;
 that.available_table.set_columns(columns);
 
@@ -405,6 +408,9 @@ IPA.adder_dialog = function (spec) {
 height: '151px'
 });
 
+that.selected_table.resize = function(){
+};
+
 that.selected_table.set_columns(columns);
 
 that.selected_table.init();
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..af723d23a5ef33eb4d3ce5d1dad03456a052cf4a 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -292,10 +292,6 @@ dl.aci-target input {
 
 }
 
-.aci-attribute-table th.style {
-
-}
-
 #group_filter {
 margin-right: 2em;
 }
@@ -385,6 +381,10 @@ span.attrhint {
   //background-image: url(ui-icons_22_256x240.png);
 background-color: #e2e2e2;
 }
+.ui-dialog .ui-dialog-content {
+#this should go away once we can fix table scrolling
+overflow:auto;
+}
 
 .ui-widget-content {
 }
@@ -666,16 +666,22 @@ a.action-button-disabled {
 width: 22px;
 }
 
+.aci-attribute-table {
+
+}
+
+
 .aci-attribute-table tbody{
-height:30em;
-overflow-x:hidden;
-border-bottom: 1px solid #8a8a8a;
+width: 20em;
+height:10em;
+overflow:auto;
+border-bottom: 1px solid #8a8a8a;
 }
 
 .aci-attribute-table th.aci-attribute-column{
 float: left;
-width: 46.5em;
-padding: 0.8em 0.5em;
+width: 20.5em;
+padding: 0.8em 0.5em;
 }
 
 .entity-views{
@@ -938,4 +944,5 @@ table.scrollable tbody {
 
 .facet-content {
 margin: 10px 0 0;
-}
\ No newline at end of file
+}
+
diff --git a/install/ui/search.js b/install/ui/search.js
index 33eb8c93c80c1c0d0d3d9e3b31a73ee1fda082cf..e4c86682657373f632b522bf1864ced8a24e258f 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -75,7