diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-06-07 20:48:20 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-06-13 09:23:29 -0400 |
commit | 9704adfe44c915de97f416c18bcaeabea2c927ba (patch) | |
tree | 92fc1e3eb8d3c4816c88750facedd52511ff7ea9 /install/ui/widget.js | |
parent | d2b483cbb3ca15a68115cf32cfaf89572259914e (diff) | |
download | freeipa-9704adfe44c915de97f416c18bcaeabea2c927ba.tar.gz freeipa-9704adfe44c915de97f416c18bcaeabea2c927ba.tar.xz freeipa-9704adfe44c915de97f416c18bcaeabea2c927ba.zip |
Fixed resizing issues.
The UI has been modified to fix some resizing issues:
Previously the height of facet content was roughly calculated using
resize(). Now the height can be more accurately defined in CSS.
Previously the UI width was fixed. The HTML layout and background
images have been modified to support horizontal expansion if needed.
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r-- | install/ui/widget.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js index c48d967e2..fc73e85b1 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -142,6 +142,7 @@ IPA.widget = function(spec) { }; that.create = function(container) { + that.container = container; }; that.setup = function(container) { @@ -1056,6 +1057,7 @@ IPA.table_widget = function (spec) { that.scrollable = spec.scrollable; that.save_values = typeof spec.save_values == 'undefined' ? true : spec.save_values; + that['class'] = spec['class']; that.current_page = 1; that.total_pages = 1; @@ -1103,10 +1105,14 @@ IPA.table_widget = function (spec) { that.create = function(container) { + that.widget_create(container); + that.table = $('<table/>', { 'class': 'search-table' }).appendTo(container); + if (that['class']) that.table.addClass(that['class']); + if (that.scrollable) { that.table.addClass('scrollable'); } @@ -1142,13 +1148,13 @@ IPA.table_widget = function (spec) { th = $('<th/>').appendTo(tr); - if (that.scrollable ) { + if (that.scrollable) { var width; if (column.width) { width = parseInt( column.width.substring(0, column.width.length-2),10); width += 16; - }else{ + } else { /* don't use the checkbox column as part of the overall calculation for column widths. It is so small that it throws off the average. */ @@ -1281,7 +1287,6 @@ IPA.table_widget = function (spec) { name: 'total_pages' }).appendTo(that.pagination); } - that.resize(); }; that.select_changed = function(){ @@ -1296,15 +1301,6 @@ IPA.table_widget = function (spec) { that.tbody.empty(); }; - that.resize = function(){ - that.tbody.attr('overflow-y', 'auto'); - - var win = $(window); - var table_max_height = win.height() - - IPA.reserved_screen_size; - that.tbody.height(table_max_height); - }; - that.load = function(result) { that.empty(); |