summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenyu Wu <Adam_5Wu@hotmail.com>2018-03-20 17:01:11 -0400
committerZhenyu Wu <Adam_5Wu@hotmail.com>2018-03-20 17:01:11 -0400
commit06194ae3ec16dfbdd293c2457f6b3b21339d77f3 (patch)
tree4aaf6430d18e02b52ffd7ada22e14d5e53cafcf4
parentaa8e46f74a3f2283629594024521707ce3041206 (diff)
downloadphpvirtualbox-06194ae3ec16dfbdd293c2457f6b3b21339d77f3.zip
phpvirtualbox-06194ae3ec16dfbdd293c2457f6b3b21339d77f3.tar.gz
phpvirtualbox-06194ae3ec16dfbdd293c2457f6b3b21339d77f3.tar.bz2
Auto-select current state in snapshot pane
-rw-r--r--panes/tabVMSnapshots.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/panes/tabVMSnapshots.html b/panes/tabVMSnapshots.html
index be3fba7..c91a14b 100644
--- a/panes/tabVMSnapshots.html
+++ b/panes/tabVMSnapshots.html
@@ -734,10 +734,12 @@ function __vboxTabSnapshotsFill(response) {
$('#vboxSnapshotList').vbtree();
vboxSnapshotToolbar.enable();
-
- $('#vboxSnapshotList').trigger('select');
-
- __vboxTabSnapshotTimestamps();
+
+ var lastListItem = $(list).find('li.vboxSnapshotCurrentState').last();
+ lastListItem.children().addClass('vboxListItemSelected');
+ $('#vboxSnapshotList').trigger('select',lastListItem);
+
+ __vboxTabSnapshotTimestamps();
});