summaryrefslogtreecommitdiffstats
path: root/install/ui/entity.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-06-07 20:48:20 -0500
committerAdam Young <ayoung@redhat.com>2011-06-13 09:23:29 -0400
commit9704adfe44c915de97f416c18bcaeabea2c927ba (patch)
tree92fc1e3eb8d3c4816c88750facedd52511ff7ea9 /install/ui/entity.js
parentd2b483cbb3ca15a68115cf32cfaf89572259914e (diff)
downloadfreeipa-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/entity.js')
-rw-r--r--install/ui/entity.js32
1 files changed, 10 insertions, 22 deletions
diff --git a/install/ui/entity.js b/install/ui/entity.js
index c3c5135b9..deb1bd4bc 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -112,7 +112,7 @@ IPA.facet = function (spec) {
};
that.show = function() {
- that.container.css('display', 'inline');
+ that.container.css('display', 'block');
};
that.hide = function() {
@@ -130,15 +130,6 @@ IPA.facet = function (spec) {
return $('.content', that.container);
};
- that.resize = function(){
- var facet_content = $('.facet-content', that.container);
- 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) {
var current_entity = that.entity;
@@ -202,10 +193,6 @@ IPA.table_facet = function(spec) {
return that;
};
- that.resize = function(){
- that.table.resize();
- };
-
var columns = spec.columns || [];
for (var i=0; i<columns.length; i++) {
var column_spec = columns[i];
@@ -557,7 +544,7 @@ IPA.entity_header = function(spec) {
}
};
- that.facet_link = function(container, other_facet) {
+ that.create_facet_link = function(container, other_facet) {
var li = $('<li/>', {
title: other_facet.name,
@@ -579,13 +566,14 @@ IPA.entity_header = function(spec) {
}).appendTo(li);
};
- that.facet_group = function(facet_group) {
+ that.create_facet_group = function(container, facet_group) {
var section = $('<span/>', {
- 'class': 'facet-tab-group'
- }).appendTo(that.facet_tabs);
+ 'class': 'facet-group'
+ }).appendTo(container);
- $('<label/>', {
+ $('<div/>', {
+ 'class': 'facet-group-name',
text: facet_group.label
}).appendTo(section);
@@ -596,7 +584,7 @@ IPA.entity_header = function(spec) {
var facets = facet_group.facets.values;
for (var i=0; i<facets.length; i++) {
var facet = facets[i];
- that.facet_link(ul, facet);
+ that.create_facet_link(ul, facet);
}
};
@@ -617,7 +605,7 @@ IPA.entity_header = function(spec) {
'class': 'entity-pkey'
}));
- var search_bar = $('<span/>', {
+ var search_bar = $('<div/>', {
'class': 'entity-search'
}).appendTo(container);
@@ -651,7 +639,7 @@ IPA.entity_header = function(spec) {
for (var i=0; i<facet_groups.length; i++) {
var facet_group = facet_groups[i];
if (facet_group.facets.length) {
- that.facet_group(facet_group);
+ that.create_facet_group(that.facet_tabs, facet_group);
}
}
};