summaryrefslogtreecommitdiffstats
path: root/install/ui/navigation.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/navigation.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/navigation.js')
-rw-r--r--install/ui/navigation.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/install/ui/navigation.js b/install/ui/navigation.js
index 11520ff91..875f4056c 100644
--- a/install/ui/navigation.js
+++ b/install/ui/navigation.js
@@ -30,6 +30,7 @@ IPA.navigation = function(spec) {
that.container = spec.container;
that.content = spec.content;
that.tab_class = spec.tab_class || 'tabs';
+ that.max_depth = spec.max_depth || 3;
that.tabs = [];
that.tabs_by_name = {};
@@ -129,9 +130,11 @@ IPA.navigation = function(spec) {
that.create = function() {
- that._create(that.tabs, that.container, 1);
+ var container = $('<div/>').appendTo(that.container);
- var tabs = $('.' + that.tab_class);
+ that._create(that.tabs, container, 1);
+
+ var tabs = $('.' + that.tab_class, that.container);
tabs.tabs({
select: function(event, ui) {
var panel = $(ui.panel);
@@ -187,6 +190,10 @@ IPA.navigation = function(spec) {
};
that.update = function() {
+ for (var i=1; i<=that.max_depth; i++) {
+ that.container.removeClass(that.tab_class+'-'+i);
+ that.content.removeClass(that.tab_class+'-'+i);
+ }
$('.entity', that.content).css('display', 'none');
that._update(that.tabs, that.container, 1);
};
@@ -208,6 +215,9 @@ IPA.navigation = function(spec) {
that._update(tab.children, tab.container, depth+1);
} else if (tab.entity) {
+ that.container.addClass(that.tab_class+'-'+depth);
+ that.content.addClass(that.tab_class+'-'+depth);
+
var entity_container = $('.entity[name="'+tab.entity.name+'"]', that.content);
if (!entity_container.length) {
tab.content = $('<div/>', {
@@ -218,7 +228,7 @@ IPA.navigation = function(spec) {
tab.entity.create(tab.content);
}
- entity_container.css('display', 'inline');
+ entity_container.css('display', 'block');
tab.entity.setup(tab.content);
}
};