changeset 3:071638eddf9c draft

planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author mingchen0919
date Sun, 30 Dec 2018 12:50:59 -0500
parents c04ef267c2c9
children 804fe260ee6c
files index.Rmd rmarkdown_report_render.R
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/index.Rmd	Tue May 01 11:13:34 2018 -0400
+++ b/index.Rmd	Sun Dec 30 12:50:59 2018 -0500
@@ -1,7 +1,6 @@
 
 
-```{css echo=FALSE}
-# code chunks scrollable
+```{css, echo=FALSE}
 pre code, pre, code {
   white-space: pre !important;
   overflow-x: scroll !important;
@@ -10,7 +9,6 @@
 }
 ```
 
-
 ```{r, echo=FALSE}
 # to make the css theme to work, <link></link> tags cannot be added directly 
 # as <script></script> tags as below.
@@ -24,18 +22,19 @@
 # this code chunk is purely for adding comments
 # below is to add jQuery and jstree javascripts
 ```
-<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
+
 <script src="vakata-jstree-3.3.5/dist/jstree.min.js"></script>
 
+
 ```{r, eval=FALSE, echo=FALSE}
 # this code chunk is purely for adding comments
 # javascript code below is to build the file tree interface
 # see this for how to implement opening hyperlink: https://stackoverflow.com/questions/18611317/how-to-get-i-get-leaf-nodes-in-jstree-to-open-their-hyperlink-when-clicked-when
 ```
 <script>
-  $(function () {
+  jQuery(function () {
     // create an instance when the DOM is ready
-    $('#jstree').jstree().bind("select_node.jstree", function (e, data) {
+    jQuery('#jstree').jstree().bind("select_node.jstree", function (e, data) {
      window.open( data.node.a_attr.href, data.node.a_attr.target )
     });
   });
--- a/rmarkdown_report_render.R	Tue May 01 11:13:34 2018 -0400
+++ b/rmarkdown_report_render.R	Sun Dec 30 12:50:59 2018 -0500
@@ -90,7 +90,7 @@
       lapply(dirs, function(x) {
         path_end = tail(strsplit(x, '/')[[1]], 1)
         # hide vakata-jstree-3.3.5 folder
-        if (path_end != 'vakata-jstree-3.3.5') {
+        if (!(path_end %in% c('vakata-jstree-3.3.5', 'rmarkdown_report_files', 'site_libs'))) {
           # x_path = strsplit(x, paste0(output_dir, '/'))[[1]][2]
           li_item = tags$li(path_end, file_tree(x))
           li_item$attribs = list('data-jstree' = '{"icon":"jstree-folder"}')