Skip to content

Commit eb0dd7a

Browse files
committed
more examples
1 parent 84fd7c2 commit eb0dd7a

File tree

20 files changed

+226
-2
lines changed

20 files changed

+226
-2
lines changed

examples/cdn-es5/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[Open fullscreen](https://jquery.activewidgets.com/cdn-es5/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/cdn-es5) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/cdn-es5)
3+
4+
jQuery example

examples/cdn-es5/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>CDN (no build) - ActiveWidgets/jQuery</title>
6+
7+
<script src="https://polyfill.io/v3/polyfill.min.js?features=Promise"></script>
8+
9+
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
10+
11+
<link href="https://cdn.activewidgets.com/jquery/3/ax.css" rel="stylesheet" />
12+
<script src="https://cdn.activewidgets.com/jquery/3/ax.js"></script>
13+
14+
<link href="src/styles.css" rel="stylesheet" />
15+
</head>
16+
<body>
17+
<ax-datagrid>Loading...</ax-datagrid>
18+
<script src="src/index.js"></script>
19+
</body>
20+
</html>

examples/cdn-es5/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "jquery-cdn-es5",
3+
"version": "1.0.0",
4+
"description": "CDN (no build) - ActiveWidgets/jQuery",
5+
"keywords": [],
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/jquery": "0.0.10",
13+
"jquery": "*"
14+
},
15+
"devDependencies": {
16+
"parcel-bundler": "^1"
17+
},
18+
"private": true
19+
}

examples/cdn-es5/src/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
4+
var rows = [
5+
{ framework: 'jQuery', source: 'CDN', language: 'ES5'}
6+
];
7+
8+
9+
$('ax-datagrid')
10+
.prop('rows', rows)
11+
.mount();

examples/cdn-es5/src/styles.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
body {
3+
margin: 60px;
4+
font: 14px/1.2143 'Segoe UI', 'Avenir', 'Helvetica Neue', 'Tahoma', sans-serif;
5+
}
6+
7+
.ax-datagrid {
8+
max-height: 80px;
9+
}
10+
11+
.ax-headers-view {
12+
font-weight: bold;
13+
color: #666;
14+
border-bottom: 1px solid #aaa;
15+
}
16+
17+
.ax-gridlines {
18+
border-bottom: 1px solid #eee;
19+
}

examples/columns/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[Open fullscreen](https://jquery.activewidgets.com/columns/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/columns) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/columns)
3+
4+
jQuery example

examples/columns/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Columns, rows - ActiveWidgets/jQuery</title>
6+
</head>
7+
<body>
8+
<ax-datagrid>Loading...</ax-datagrid>
9+
<script src="src/index.js"></script>
10+
</body>
11+
</html>

examples/columns/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "jquery-columns",
3+
"version": "1.0.0",
4+
"description": "Columns, rows - ActiveWidgets/jQuery",
5+
"keywords": [],
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/jquery": "0.0.10",
13+
"jquery": "*"
14+
},
15+
"devDependencies": {
16+
"parcel-bundler": "^1"
17+
},
18+
"private": true
19+
}

examples/columns/src/index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
import $ from 'jquery';
3+
import '@activewidgets/jquery';
4+
import { northwind } from "@activewidgets/examples/data";
5+
import './styles.css';
6+
7+
8+
const columns = [
9+
{header: 'Code', field: 'customerID', width: 80, style: 'background:#def', fixed: true},
10+
{header: 'Company Name', field: 'companyName', width: 160},
11+
{header: 'Contact', field: 'contactName', width: 120},
12+
{header: 'Title', field: 'contactTitle', width: 120},
13+
{header: 'Address', field: 'address', width: 120},
14+
{header: 'City', field: 'city'},
15+
{header: 'Zip', field: 'postalCode', align: 'right'},
16+
{header: 'Phone', field: 'phone'},
17+
{header: 'Fax', field: 'fax'},
18+
{header: 'Country', field: 'country'}
19+
];
20+
21+
const rows = northwind.customers;
22+
23+
24+
$('ax-datagrid')
25+
.prop({ columns, rows })
26+
.mount();

examples/columns/src/styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
body {
3+
margin: 60px;
4+
font: 14px/1.2143 'Segoe UI', 'Avenir', 'Helvetica Neue', 'Tahoma', sans-serif;
5+
}
6+
7+
.ax-headers-view {
8+
font-weight: bold;
9+
color: #666;
10+
border-bottom: 1px solid #aaa;
11+
}
12+
13+
.ax-gridlines {
14+
border-bottom: 1px solid #eee;
15+
}

0 commit comments

Comments
 (0)