forked from lorenzofox3/smart-table-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (59 loc) · 2.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>Smart Table</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<script src="./assets/js/app.js"></script>
<script src="./assets/js/controllers.js"></script>
<script src="./assets/js/ui-bootstrap-custom-tpls-0.4.0-SNAPSHOT.js"></script>
<link rel="stylesheet" href="assets/css/bootstrap.css"/>
<link rel="stylesheet" href="assets/css/prism.css"/>
<link rel="stylesheet" href="assets/css/mainStyle.css"/>
</head>
<body ng-controller="mainCtrl">
<header>
<h1 class="banner">Smart Table</h1>
<a class="btn" href="#"><i class="icon-download-alt"></i>Code on github</a>
</header>
<div class="main">
<p class="text-error">
{{greeting}}
</p>
<tabs>
<pane heading="JavaScript">
<pre>
<code class="language-javascript">
'use strict';
// Declare app level module which depends on filters, and services
var app = angular.module('myApp', ['SmartTable.Table']).
config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: 'dummy'});
//$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: MyCtrl2});
$routeProvider.otherwise({redirectTo: '/view1'});
}]).controller('dummy', ['$scope', function (scope) {
scope.rowCollection = [
{firstName: 'Laurent', lastName: 'Renard', birthDate: new Date('1987-05-21'), balance: 102, email: 'laurent34azerty@gmail.com'},
{firstName: 'Blandine', lastName: 'Faivre', birthDate: new Date('1987-04-25'), balance: -2323.22, email: 'laurent34azerty@gmail.com'},
{firstName: 'Francoise', lastName: 'Frere', birthDate: new Date('1955-08-27'), balance: 42343, email: 'laurent34azerty@gmail.com'}
];
scope.columnCollection = [
{label: 'FirsName', map: 'firstName', sortPredicate: function (dataRow) {
return dataRow.firstName.length;
}},
{label: 'LastName', map: 'lastName', isSortable: false},
{label: 'birth date', map: 'birthDate', formatFunction: 'date', type: 'date', isEditable: true},
{label: 'balance', map: 'balance', isEditable: true, type: 'number', formatFunction: 'currency', formatParameter: '$'},
{label: 'email', map: 'email', isEditable: true, type: 'email'}
];
scope.tableTitle = 'youpi';
scope.myObject = {number: 1, type: 'number'};
scope.myModel = 'salut';
}]);
</code>
</pre>
</pane>
</tabs>
</div>
<script src="./assets/js/prism.js"></script>
</body>
</html>