Repository: qpid-dispatch Updated Branches: refs/heads/master 8c7e87275 -> 33fa99832
DISPATCH-1029 Remember the expanded state for Entities and Overview pages in console Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/33fa9983 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/33fa9983 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/33fa9983 Branch: refs/heads/master Commit: 33fa99832f2012fb6fa39ab29b41d0c65bcb914c Parents: 8c7e872 Author: Ernest Allen <eal...@redhat.com> Authored: Wed Jun 13 07:30:05 2018 -0400 Committer: Ernest Allen <eal...@redhat.com> Committed: Wed Jun 13 07:30:05 2018 -0400 ---------------------------------------------------------------------- console/stand-alone/plugin/js/qdrList.js | 6 ++++++ console/stand-alone/plugin/js/qdrOverview.js | 4 ++++ 2 files changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/33fa9983/console/stand-alone/plugin/js/qdrList.js ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js index 8044400..849c1c3 100644 --- a/console/stand-alone/plugin/js/qdrList.js +++ b/console/stand-alone/plugin/js/qdrList.js @@ -189,6 +189,8 @@ var QDR = (function(QDR) { list.push(tnode.key); } }); + console.log('saving expanded list'); + console.log(list); localStorage[ListExpandedKey] = JSON.stringify(list); }; @@ -218,6 +220,9 @@ var QDR = (function(QDR) { saveExpanded(); updateExpandedEntities(); }; + var onTreeNodeCollapsed = function () { + saveExpanded(); + }; // a tree node was selected var onTreeNodeActivated = function (event, data) { $scope.ActivatedKey = data.node.key; @@ -893,6 +898,7 @@ var QDR = (function(QDR) { $('#entityTree').fancytree({ activate: onTreeNodeActivated, expand: onTreeNodeExpanded, + collapse: onTreeNodeCollapsed, beforeActivate: onTreeNodeBeforeActivate, beforeSelect: function(event, data){ // A node is about to be selected: prevent this for folders: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/33fa9983/console/stand-alone/plugin/js/qdrOverview.js ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/js/qdrOverview.js b/console/stand-alone/plugin/js/qdrOverview.js index 709702c..2f784e7 100644 --- a/console/stand-alone/plugin/js/qdrOverview.js +++ b/console/stand-alone/plugin/js/qdrOverview.js @@ -1436,6 +1436,9 @@ var QDR = (function (QDR) { saveExpanded(); updateExpanded(); }; + var onTreeNodeCollapsed = function () { + saveExpanded(); + }; if (!QDRService.management.connection.is_connected()) { QDR.redirectWhenConnected($location, 'overview'); @@ -1702,6 +1705,7 @@ var QDR = (function (QDR) { $('#overtree').fancytree({ activate: onTreeNodeActivated, expand: onTreeNodeExpanded, + collapse: onTreeNodeCollapsed, init: onTreeInitialized, autoCollapse: $scope.largeNetwork, activeVisible:! $scope.largeNetwork, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org