comparison index.Rmd @ 0:a42e58c71e5b draft default tip

planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author mingchen0919
date Sun, 30 Dec 2018 12:55:49 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a42e58c71e5b
1
2
3 ```{css, echo=FALSE}
4 pre code, pre, code {
5 white-space: pre !important;
6 overflow-x: scroll !important;
7 word-break: keep-all !important;
8 word-wrap: initial !important;
9 }
10 ```
11
12 ```{r, echo=FALSE}
13 # to make the css theme to work, <link></link> tags cannot be added directly
14 # as <script></script> tags as below.
15 # it has to be added using a code chunk with the htmltool functions!!!
16 css_link = tags$link()
17 css_link$attribs = list(rel="stylesheet", href="vakata-jstree-3.3.5/dist/themes/default/style.min.css")
18 css_link
19 ```
20
21 ```{r, eval=FALSE, echo=FALSE}
22 # this code chunk is purely for adding comments
23 # below is to add jQuery and jstree javascripts
24 ```
25
26 <script src="vakata-jstree-3.3.5/dist/jstree.min.js"></script>
27
28
29 ```{r, eval=FALSE, echo=FALSE}
30 # this code chunk is purely for adding comments
31 # javascript code below is to build the file tree interface
32 # 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
33 ```
34 <script>
35 jQuery(function () {
36 // create an instance when the DOM is ready
37 jQuery('#jstree').jstree().bind("select_node.jstree", function (e, data) {
38 window.open( data.node.a_attr.href, data.node.a_attr.target )
39 });
40 });
41 </script>
42
43 ## Outputs
44
45 ```{r, echo=FALSE}
46 # create a div container to store the file tree interface
47 library(htmltools)
48 tags$div(
49 id="jstree",
50 file_tree(Sys.getenv('REPORT_FILES_PATH'))
51 )
52 ```