Added TreeSearch and lots of cleaning up/improvements.
* Added watch for gulp.
* Updated README
* Various bug fixes and improvements.
Cleaning up and debugging. Gulp can now watch.
Change-Id: Ice679a326ff693fa030caf429c3c29ba94ae00cd
diff --git a/client/catalog-dev/js/treeExplorer.js b/client/catalog-dev/js/treeExplorer.js
index 5037629..6b67804 100644
--- a/client/catalog-dev/js/treeExplorer.js
+++ b/client/catalog-dev/js/treeExplorer.js
@@ -27,7 +27,8 @@
var el = $('<div class="treeExplorerNode"></div>');
if (current.match(/\/$/)){
el.attr('id', path + current);
- el.append(['<a href="#' , path , current , '">' , current , '</a>'].join(""));
+ el.append(['<div class="nodeContent"><a href="#', path, current, '">', current,
+ '</a> <button class="treeSearch btn btn-success btn-xs">Search from here</button></div>'].join(""));
} else {
el.addClass('file');
el.text(current);
@@ -36,8 +37,8 @@
});
}
- tree.on('click', '.treeExplorerNode > a', function(){
- var node = $(this).parent();
+ tree.on('click', '.treeExplorerNode > .nodeContent > a', function(){
+ var node = $(this).parent().parent();
if (node.hasClass('open')){ //Are we open already?
node.removeClass('open');