Switched to tab navigation and other fixes
* Added a clear button to results
* Small visual changes for improved look and feel
* Fixed some scroll issues.
Change-Id: I5ce996e42bd26d9d2699bb5201ae8e4bf0e2797e
diff --git a/client/catalog-dev/js/treeExplorer.js b/client/catalog-dev/js/treeExplorer.js
index 6b67804..c4bee42 100644
--- a/client/catalog-dev/js/treeExplorer.js
+++ b/client/catalog-dev/js/treeExplorer.js
@@ -3,7 +3,18 @@
"use strict";
jQuery.fn.extend({
- treeExplorer: function(getChildren){
+ treeExplorer: function(getChildren, settings){
+
+ this.settings = {
+ autoScroll : false
+ }
+
+ for (var value in settings) {
+ if (this.settings[value] !== undefined){
+ this.settings[value] = settings[value];
+ }
+ }
+
var cache = {}; //Cache previously requested paths.
var tree = $('<div class="treeExplorer"></div>');
@@ -37,7 +48,13 @@
});
}
- tree.on('click', '.treeExplorerNode > .nodeContent > a', function(){
+ var scope = this;
+
+ tree.on('click', '.treeExplorerNode > .nodeContent > a', function(e){
+ if (!scope.settings.autoScroll){
+ e.preventDefault();
+ }
+
var node = $(this).parent().parent();
if (node.hasClass('open')){ //Are we open already?