Skip to content

Commit 7f639db

Browse files
author
Andrej Gajdos
committed
Revert "adding show/hide event listeners"
This reverts commit da552ad.
1 parent 2f7f7f0 commit 7f639db

12 files changed

+366
-870
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Dependency directories
22
node_modules
3+
bower_components
34

45
.DS_Store
56
npm-debug.log

README.md

+1-27
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var table = new lib.NestedTables("example", data, settigns);
1919
table.initializeTableHierarchy();
2020
```
2121

22-
## Methods
22+
## API
2323

2424
### NestedTables(wrapperID, data, settings)
2525

@@ -47,32 +47,6 @@ Settings for jQuery DataTables constructor.
4747

4848
Build nested table hierarchy.
4949

50-
## Events
51-
52-
#### onShowChildHierarchy
53-
54-
Triggered when a child hierarchy is shown
55-
56-
```js
57-
// '#example' is wrapper ID for table hierarchy
58-
var tableEle = document.querySelector( "#example .table" );
59-
tableEle.addEventListener("onShowChildHierarchy", function(e) {
60-
console.log(e);
61-
});
62-
```
63-
64-
#### onHideChildHierarchy
65-
66-
Triggered when a child hierarchy is hidden
67-
68-
```js
69-
// '#example' is wrapper ID for table hierarchy
70-
var tableEle = document.querySelector( "#example .table" );
71-
tableEle.addEventListener("onHideChildHierarchy", function(e) {
72-
console.log(e);
73-
});
74-
```
75-
7650
## Example
7751

7852
```html

dist/nested.tables.js renamed to dist/nested.datatables.js

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/nested.tables.min.js renamed to dist/nested.datatables.min.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

+2-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" type="text/css" media="screen" href="/nested-datatables/assets/css/style.css?v=cd7a2da0f2f66a8c86379cbde71985cbd9e0c742">
1111

1212
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css">
13-
<script src="/nested-datatables/dist/nested.tables.min.js"></script>
13+
<script src="/nested-datatables/dist/nested.datatables.min.js"></script>
1414

1515
<style>
1616
footer {
@@ -208,16 +208,8 @@ <h3 id="demo">Demo</h3>
208208
"bInfo": false
209209
};
210210

211-
var table = new nestedTables.TableHierarchy("example", dataInJson, settings);
211+
var table = new lib.NestedTables("example", dataInJson, settigns);
212212
table.initializeTableHierarchy();
213-
214-
var tableEle = document.querySelector( "#example .table" );
215-
tableEle.addEventListener("onShowChildHierarchy", function(e) {
216-
console.log(e);
217-
});
218-
tableEle.addEventListener("onHideChildHierarchy", function(e) {
219-
console.log(e);
220-
});
221213
</script>
222214

223215
<h3 id="jsfiddle"><a href='https://jsfiddle.net/andrej_gajdos/zu11wk2o/'>JSFiddle</a></h3>

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
import TableHierarchy from './src/script/NestedTables'
2-
export {TableHierarchy};
1+
import NestedTables from './src/script/NestedTables'
2+
3+
export {NestedTables};

0 commit comments

Comments
 (0)