Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-12-10 17:59:06 -0500
committerChristopher Frost2012-12-10 17:59:06 -0500
commitc2a24c3c6cf94288a489290421f3bf02c7bbb091 (patch)
tree61e43ee1c0794161fcfd7f16a901d89ccc8f38e2 /org.eclipse.virgo.management.console
parent1cff4ddd9994d6a85da6022675425d383c145027 (diff)
downloadorg.eclipse.virgo.kernel-c2a24c3c6cf94288a489290421f3bf02c7bbb091.tar.gz
org.eclipse.virgo.kernel-c2a24c3c6cf94288a489290421f3bf02c7bbb091.tar.xz
org.eclipse.virgo.kernel-c2a24c3c6cf94288a489290421f3bf02c7bbb091.zip
393548 - Selected bundle is not scrolled in to view in the OSGi Explorer list
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/common.js4
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js2
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js6
3 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
index 7854aab3..6774c2b6 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
@@ -398,6 +398,10 @@ var Util = function(){
};
decorate(newTable);
+ newTable.getElementOffset = function(elementInTable){
+ return elementInTable.position().top - $('thead', this).position().top - 25;
+ };
+
return newTable;
};
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
index 28dd3b29..f78778ad 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
@@ -341,7 +341,7 @@ var TopBar = function(container, layoutManager, dataSource){
var rowIds = $('td:first-child', self.bundlesTable);
$.each(rowIds, function(index, rowId){
if($(rowId).text() == bundleId){
- self.container.scrollTop($(rowId).position().top);
+ self.container.scrollTop(self.bundlesTable.getElementOffset($(rowId)));
$('.table-tr-selected', self.bundlesTable).removeClass('table-tr-selected');
$(rowId).parent().addClass('table-tr-selected');
}
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js b/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
index e69f7d85..5076d92d 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
@@ -50,10 +50,10 @@ var SideBar = function(layoutManager, dataSource){
self.setFocused = function(bundleId){
self.focused = bundleId;
- var rowIds = $('td:first-child', self.bundlesTable);
+ var rowIds = $('tbody td:first-child', self.bundlesTable);
$.each(rowIds, function(index, rowId){
- if($(rowId).text() == bundleId){
- $('#side-bar').scrollTop($(rowId).position().top);
+ if($(rowId).text() == bundleId){
+ $('#side-bar').scrollTop(self.bundlesTable.getElementOffset($(rowId)));
$('.table-tr-selected', self.bundlesTable).removeClass('table-tr-selected');
$(rowId).parent().addClass('table-tr-selected');
}

Back to the top