Skip to content

Commit

Permalink
Simplified directory structure and updated docs on Bower usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ludo committed Jun 13, 2014
1 parent 31c14d6 commit 7e00686
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
.DS_Store
.idea
bower_components
experiments
13 changes: 5 additions & 8 deletions bower.json
Expand Up @@ -2,18 +2,15 @@
"name": "jquery-treetable",
"version": "3.1.0",
"description": "jQuery plugin for displaying a tree structure in a (HTML) table, i.e. a directory structure or a nested list.",
"homepage": "http://ludo.cubicphuse.nl/jquery-treetable",
"author": "Ludo van den Boom <ludo@cubicphuse.nl>",
"keywords": [ "explorer", "file", "table", "tree", "ui" ],
"main": [
"javascripts/src/jquery.treetable.js",
"stylesheets/jquery.treetable.css",
"stylesheets/jquery.treetable.theme.default.css"
],
"ignore": [
"*.html",
"javascripts/test",
"vendor"
"jquery.treetable.js",
"css/jquery.treetable.css",
"css/jquery.treetable.theme.default.css"
],
"ignore": [ "*.html", "test" ],
"dependencies": {
"jquery": ">=1.6"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 17 additions & 6 deletions index.html
Expand Up @@ -4,9 +4,9 @@
<head>
<meta charset="utf-8">
<title>jQuery treetable</title>
<link rel="stylesheet" href="stylesheets/screen.css" media="screen" />
<link rel="stylesheet" href="stylesheets/jquery.treetable.css" />
<link rel="stylesheet" href="stylesheets/jquery.treetable.theme.default.css" />
<link rel="stylesheet" href="css/screen.css" media="screen" />
<link rel="stylesheet" href="css/jquery.treetable.css" />
<link rel="stylesheet" href="css/jquery.treetable.theme.default.css" />
</head>
<body>
<div id="main">
Expand Down Expand Up @@ -78,7 +78,18 @@ <h2><a name="usage">2. Usage</a></h2>

<h3><a name="head">Include the plugin in your document</a></h3>

<p>Copy the files <tt>javascripts/src/jquery.treetable.js</tt> and <tt>stylesheets/jquery.treetable.css</tt> to your project. Paste the following code right before the closing <tt>body</tt> tag in your HTML document. Make sure these lines are <b>below</b> the line where you include jQuery. Change the <b style="color: #f00;">red</b> parts to reflect your situation.</p>
<p>The plugin can either be installed manually or by using the <a href="http://bower.io">Bower</a> package manager.</p>

<h4>Installing with Bower</h4>

<pre class="listing">
bower install jquery-treetable</pre>

<p>Note that the only listed dependency is jQuery. If you also want to use the drag &amp; drop feature you'll have to install jQuery UI yourself.</p>

<h4>Installing manually</h4>

<p>Copy the files <tt>jquery.treetable.js</tt> and <tt>css/jquery.treetable.css</tt> to your project. Paste the following code right before the closing <tt>body</tt> tag in your HTML document. Make sure these lines are <b>below</b> the line where you include jQuery. Change the <b style="color: #f00;">red</b> parts to reflect your situation.</p>

<pre class="listing">
&lt;link href="<b>path/to/</b>jquery.treetable.css" rel="stylesheet" type="text/css" /&gt;
Expand All @@ -89,7 +100,7 @@ <h3><a name="head">Include the plugin in your document</a></h3>

<h3><a name="theme">Styling the tree</a></h3>

<p>By default the tree has little styling. Use the file <tt>stylesheets/jquery.treetable.theme.default.css</tt> as a template for your own styling, or just use this default theme.</p>
<p>By default the tree has little styling. Use the file <tt>css/jquery.treetable.theme.default.css</tt> as a template for your own styling, or just use this default theme.</p>

<h3><a name="tree">Representing your tree in a table</a></h3>
<p>When you pasted the above code and adjusted it to reflect your situation, you enabled the <em>possibility</em> of displaying a tree in your table. To make the tree actually display as a tree you have to add <tt>data-tt-id</tt> and <tt>data-tt-parent-id</tt> attributes to your table rows (<tt>tr</tt>).</p>
Expand Down Expand Up @@ -892,7 +903,7 @@ <h3>Using treetable with PersistJS</h3>
<script src="bower_components/jquery-ui/ui/jquery.ui.mouse.js"></script>
<script src="bower_components/jquery-ui/ui/jquery.ui.draggable.js"></script>
<script src="bower_components/jquery-ui/ui/jquery.ui.droppable.js"></script>
<script src="javascripts/src/jquery.treetable.js"></script>
<script src="jquery.treetable.js"></script>
<script>
$("#example-basic").treetable({ expandable: true });

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions test.html
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<title>jQuery treetable Tests</title>
<link rel="stylesheet" href="bower_components/mocha/mocha.css" />
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/mocha/mocha.js"></script>
<script src="bower_components/sinonjs/sinon.js"></script>
Expand All @@ -19,8 +19,8 @@
});
</script>

<script src="javascripts/src/jquery.treetable.js"></script>
<script src="javascripts/test/jquery.treetable.test.js"></script>
<script src="jquery.treetable.js"></script>
<script src="test/jquery.treetable.test.js"></script>
</head>
<body>
<div id="mocha"></div>
Expand Down
File renamed without changes.

0 comments on commit 7e00686

Please sign in to comment.