From fde2887476c0274b7b2f8bc80cf5b5b14f067132 Mon Sep 17 00:00:00 2001 From: ramamurtis Date: Mon, 9 Mar 2015 14:15:29 +0530 Subject: [PATCH] CLOUDSTACK-8307: UI not showing all Domains, if there are more than 24 domains then the last domain gets cut off on firefox and IE. Added a flag in treeview widget and based on the flag adding css class which will make overflow as scroll instead of the default auto. Fixes #101 Signed-off-by: Rohit Yadav (cherry picked from commit 8591383bcc09b4fd0ff1c6336c6c45199be250b3) Signed-off-by: Rohit Yadav --- ui/css/cloudstack3.css | 4 ++++ ui/scripts/domains.js | 1 + ui/scripts/ui/widgets/treeView.js | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 70a8abfd638..2a34fbe5ffd 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -7882,6 +7882,10 @@ label.error { overflow: auto; } +.tree-view.overflowScroll { + overflow: scroll; +} + #browser .tree-view div.toolbar { } diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js index a3cc8c063b3..e46f104364d 100644 --- a/ui/scripts/domains.js +++ b/ui/scripts/domains.js @@ -21,6 +21,7 @@ // Domain tree treeView: { + overflowScroll: true, // Details detailView: { name: 'Domain details', diff --git a/ui/scripts/ui/widgets/treeView.js b/ui/scripts/ui/widgets/treeView.js index 2681945b854..c948e103fab 100644 --- a/ui/scripts/ui/widgets/treeView.js +++ b/ui/scripts/ui/widgets/treeView.js @@ -83,6 +83,10 @@ var treeViewArgs = args.treeView; var $browser = args.$browser; + if(treeViewArgs.overflowScroll) { + $treeView.addClass('overflowScroll'); + } + makeTreeList({ $treeView: $treeView, parent: null,