From 7486a332211ed13318c0a689657cb4ff7e7d25a3 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 1 Jun 2011 12:14:53 -0400 Subject: scrollable content areas Turn off the side scroll bars for pages. Resizes the table when the browser resizes For stables, the rows scroll, but not the header. For details, the content area scrolls. Reserves 400 picesl for the header/ footer. Resize is only done on reload --- install/ui/entity.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'install/ui/entity.js') diff --git a/install/ui/entity.js b/install/ui/entity.js index 030bcb016..5df56b1a6 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -130,6 +130,15 @@ IPA.facet = function (spec) { return $('.content', that.container); }; + 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() - + IPA.reserved_screen_size; + facet_content.css('height',content_max_height); + }; that.on_error = function(xhr, text_status, error_thrown) { if (that.entity.redirect_facet) { @@ -194,6 +203,10 @@ IPA.table_facet = function(spec) { return that; }; + that.resize = function(){ + that.table.resize(); + }; + var columns = spec.columns || []; for (var i=0; i