-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
243 lines (219 loc) · 10.1 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<style>
.angular-google-map-container {
width: 100%;
height: 504px;
}
</style>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link rel="stylesheet" href="lib/ionic/js/bower_components/angular-chart.js/dist/angular-chart.css">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic/js/bower_components/Chart.js/Chart.min.js"></script>
<script src="lib/ionic/js/bower_components/angular-chart.js/dist/angular-chart.js"></script>
<link href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<script>
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('app', ['ionic','chart.js'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
.config(function($stateProvider, $urlRouterProvider) {
// Ionic uses AngularUI Router which uses the concept of states
// Learn more here: https://github.com/angular-ui/ui-router
// Set up the various states which the app can be in.
// Each state's controller can be found in controllers.js
$stateProvider
.state('page1', {
url: '/labs',
templateUrl: 'page1.html',
controller: function($scope, $rootScope) {
$scope.reps = [
{name: 'irth'},
{name: 'not irth'}
];
$scope.doctors = [
{name: 'dr.irth'},
{name: 'not dr. irth'}
];
$scope.products = [
{name: 'irthism'},
{name: 'not irthism'}
];
$scope.visits = [
{name: 'irth was here'},
{name: 'not irth wasn\'t here'}
];
$scope.labels = ["January", "February", "March", "April", "May", "June", "July"];
$scope.series = ['Series A', 'Series B'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
$scope.onClick = function (points, evt) {
console.log(points, evt);
};
$scope.headerColor = function(color){
$rootScope.color = color;
console.log('changing color to ', $rootScope.color);
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/labs');
});
</script>
</head>
<body ng-app="app" animation="slide-left-right-ios7">
<div>
<div>
<ion-nav-bar class="bar-{{$root.color}}" ng-init="$root.color = 'balanced'">
<ion-nav-back-button class="button-icon icon ion-ios7-arrow-back">Back</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view></ion-nav-view>
</div>
</div>
<script id="page1.html" type="text/ng-template">
<ion-view title="Lab">
<ion-tabs class="tabs-stable tabs-icon-top balanced">
<ion-tab title="Reps" icon="ion-person-stalker balanced" on-select="headerColor('balanced')">
<ion-content padding="true" class="has-header">
<h1>Edit Reps</h1>
<form>
<ion-list>
<label class="item item-input" name="rep-search">
<i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="Search Reps">
</label>
</ion-list>
</form>
<div ng-repeat="rep in reps" ><ion-toggle ng-model="edit.Rep" toggle-class="toggle-balanced"><b>{{rep.name}}</b>
</ion-toggle>
<div class="list card" ng-if="edit.Rep">
<div class="item item-divider">Edit {{rep.name}}</div>
<div class="item item-body">
<form>
<label class="item item-input">
<span class="input-label">Name</span>
<input type="text" placeholder="" ng-model="rep.name">
</label>
<button class="button button-balanced button-block ">Update Rep</button>
</form>
</div>
<div class="item item-divider">Remove Rep</div>
</div></div>
</ion-content>
</ion-tab>
<ion-tab title="Doctors" icon="ion-ios7-people royal" on-select="headerColor('royal')">
<ion-content padding="true" class="has-header">
<h1>Edit Doctors</h1>
<ion-list>
<label class="item item-input">
<i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="Search Doctors">
</label>
<div ng-repeat="doctor in doctors" ><ion-toggle toggle-class="toggle-royal" ng-model="edit.doctor"><b>{{doctor.name}}</b>
</ion-toggle>
<div class="list card" ng-if="edit.doctor">
<div class="item item-divider">Edit {{doctor.name}}</div>
<div class="item item-body">
<form>
<label class="item item-input">
<span class="input-label">Name</span>
<input type="text" placeholder="" ng-model="doctor.name">
</label>
<button class="button button-royal button-block ">Update Doctor</button>
</form>
</div>
<div class="item item-divider">Remove Doctor</div>
</div></div>
</ion-list>
</ion-content>
</ion-tab>
<ion-tab title="Products" icon="ion-waterdrop assertive">
<ion-content padding="true" class="has-header">
<h1>Edit Products</h1>
<ion-list>
<label class="item item-input">
<i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="Search Products">
</label>
<div ng-repeat="product in products">
<ion-toggle toggle-class="toggle-assertive" ng-model="edit.product"><b>{{product.name}}</b>
</ion-toggle>
<div class="list card" ng-if="edit.product">
<div class="item item-divider">Edit {{product.name}}</div>
<div class="item item-body">
<form>
<label class="item item-input">
<span class="input-label">Name</span>
<input type="text" placeholder="" ng-model="product.name">
</label>
<button class="button button-assertive button-block ">Update Product</button>
</form>
</div>
<div class="item item-divider">Remove Product</div>
</div></div>
</ion-list>
</ion-content>
</ion-tab>
<ion-tab title="Visits" icon="ion-calendar calm">
<ion-content padding="true" class="has-header">
<h1>Edit Visits</h1>
<ion-list>
<label class="item item-input">
<i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="Search Visits">
</label>
<div ng-repeat="visit in visits"><ion-toggle toggle-class="toggle-calm" ng-model="edit.visit"><b>{{visit.name}}</b>
</ion-toggle>
<div class="list card" ng-if="edit.visit">
<div class="item item-divider">Edit {{visit.name}}</div>
<div class="item item-body">
<form>
<label class="item item-input">
<span class="input-label">Visit Name</span>
<input type="text" ng-model="visit.name">
</label>
<button class="button button-calm button-block ">Update Visit</button>
</form>
</div>
<div class="item item-divider">Remove Visit</div>
</div></div>
</ion-list>
</ion-content>
</ion-tab>
<ion-tab title="Graphs" icon="ion-arrow-graph-up-right">
<ion-content padding="true" class="has-header">
<canvas id="line" class="chart chart-line" data="data"
labels="labels" legend="true" series="series"
click="onClick">
</canvas>
</ion-content>
</ion-tab>
</ion-tabs>
</ion-view></script>
</body>
</html>