aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-09-27 12:24:46 +0200
committerArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-09-27 12:24:46 +0200
commit44da5835e6cfec368a7ae9f11574e23181869bad (patch)
tree0863f76c6f26280c185033dc726d09ed36431b90 /public
parentapp (diff)
collapse
Diffstat (limited to 'public')
-rw-r--r--public/css/style.css7
-rw-r--r--public/js/script.js9
2 files changed, 16 insertions, 0 deletions
diff --git a/public/css/style.css b/public/css/style.css
index f0a90e6..38ce883 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -636,3 +636,10 @@ color: currentColor;
#tree {
border-right: 1px solid rgb(238, 238, 238);
}
+.directory {
+ cursor: pointer;
+ list-style-type: disc;
+}
+.file {
+ list-style: circle;
+}
diff --git a/public/js/script.js b/public/js/script.js
index 42367ef..432fcf5 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -4,10 +4,17 @@ $(document).ready(function() {
$('a').click(function(e) {
e.preventDefault();
+ e.stopPropagation();
$.get(this.href, function(data) {
$('#md').html(data);
});
});
+
+ $('.directory').find('ul').hide();
+ $('.directory').click(function(e) {
+ e.stopPropagation();
+ $(this).children('ul').slideToggle();
+ });
});
});
@@ -22,9 +29,11 @@ function addDirectory(data) {
a.appendChild(text);
a.href = item.path;
li.appendChild(a);
+ li.classList.add("file");
} else {
li.appendChild(text);
li.appendChild(addDirectory(item));
+ li.classList.add("directory");
}
ul.appendChild(li);
});