Skip to content

Commit 5d7e45c

Browse files
committed
Add javascript section on the documentation
1 parent 7c01f93 commit 5d7e45c

File tree

5 files changed

+58
-47
lines changed

5 files changed

+58
-47
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ _modules/*
8080
.php-version
8181

8282
# Jetbrains editors (PHPStorm, etc)
83+
/.idea/
8384
.idea/
8485
*.iml
8586

.idea/workspace.xml

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

docs/html/table.md

-18
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,3 @@ It is possible to pass an array with the definition of the fields, styles and cs
6464
echo $table->render($data);
6565
```
6666

67-
## DataTables Javascript
68-
We instantiate the class
69-
70-
```php
71-
$javascript = new \atsanna\DataTables\Javascript\DataTablesScript();
72-
```
73-
74-
At this point we can import the javascript and css libraries
75-
76-
```php
77-
echo $javascript->getExternalLibraries();
78-
```
79-
80-
At the end of the page, let's add the automatically generated script
81-
82-
```php
83-
echo $javascript->getDocumentReady( $data['id'], $table->getConfiguration() );
84-
```

docs/javascript/javascript.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## DataTables Javascript
2+
We instantiate the class
3+
4+
```php
5+
$javascript = new \atsanna\DataTables\Javascript\DataTablesScript();
6+
```
7+
8+
At this point we can import the javascript and css libraries
9+
10+
```php
11+
echo $javascript->getExternalLibraries();
12+
```
13+
14+
At the end of the page, let's add the automatically generated script
15+
16+
```php
17+
echo $javascript->getDocumentReady( $data['id'], $table->getConfiguration() );
18+
```

mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ plugins:
8484
redirect_maps:
8585
'install.md': 'getting_started/install.md'
8686
'table.md': 'html/table.md'
87+
'javascript.md': 'javascript/javascript.md'
8788
nav:
8889
- Home: index.md
8990
- Getting Started:
9091
- getting_started/install.md
9192
- Html:
9293
- html/table.md
94+
- Javascript:
95+
- javascript/javascript.md

0 commit comments

Comments
 (0)