forked from Gaduo/FHIRSampleCreator
-
Notifications
You must be signed in to change notification settings - Fork 3
/
designer.html
168 lines (120 loc) · 5.44 KB
/
designer.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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/1.7.21/go-debug.js"></script>
<script src="js/libs/angular.min1-5.js"></script>
<script src="js/libs/ui-bootstrap-tpls-2.0.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script>
angular.module("sampleApp",['ngStorage','ui.bootstrap']).config(function($locationProvider) {
// enable html5Mode for pushstate ('#'-less URLs)
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
});
</script>
<script src="js/designerCtl.js"></script>
<script src="resourceBuilder/rbServices.js"></script>
<script src="js/libs/ngStorage.min.js"></script>
<script src="js/appConfigSvc.js"></script>
<script src="js/modalDialogSvc.js"></script>
<script src="js/designerSvc.js"></script>
<script src="js/services.js"></script>
<script src="js/filters.js"></script>
<meta charset="UTF-8">
<title>Document Designer</title>
</head>
<body>
<div ng-app="sampleApp" ng-controller="designerCtrl" class="container-fluid">
<div class="row">
<div class="col-sm-7 col-md-7">
<div id="myDiagramDiv"
style="width:100%; height:500px; background-color: #DAE4E4;"></div>
<pre>{{selectedItem.myData | json}}</pre>
</div>
<div class="col-sm-5 col-md-5">
<button class="btn btn-link" ng-click="input.displayMode='new'">New node</button>
<div ng-show="input.displayMode=='edit'">
<div class="row">
<div class="col-sm-4 col-md-4">
</div>
<div class="col-sm-6 col-md-6">
</div>
<div class="col-sm-2 col-md-2">
<button class="btn btn-link" ng-click="updateNode()">Update</button>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-6">
<h5>Edit Fields:</h5>
</div>
<div class="col-sm-6 col-md-6">
<div class="pull-right">
<input checked="input.showAllFields" type="checkbox"
ng-click="input.showAllFields = ! input.showAllFields"/> Show all fields
</div>
</div>
</div>
<table class="table table-bordered">
<tr ng-repeat="ed in selectedItem.elements"
ng-show="input.showAllFields || ed.meta.include">
<td><input type="checkbox" ng-model="ed.meta.include"/> </td>
<td>{{ed.meta.displayPath}}</td>
<td>
<em ng-show="ed.meta.references">References:</em>
<div ng-repeat="ref in ed.meta.references">
<div class="row">
<div class="col-sm-10 col-md-10">
{{ref.to}}
</div>
<div class="col-sm-2 col-md-2">
<i class="glyphicon glyphicon-remove clickable"
ng-click="deleteLink(ed.meta.references,$index,ref)"></i>
</div>
</div>
</div>
<hr ng-show="ed.meta.references"/>
<em ng-show="ed.meta.links.length > 0">Can Link to:</em>
<div class="clickable" ng-repeat="link in ed.meta.links track by $index"
ng-click="createLink(selectedItem,ed,link)">
{{link}}
</div>
</td>
</tr>
</table>
</div>
<div ng-show="input.displayMode=='new'">
<div class="row">
<div class="col-md-4 col-sm-4">
Resource Type
</div>
<div class="col-md-8 col-sm-8">
<select ng-model="resourceType" class="form-control"
ng-change="showType(resourceType)"
ng-options="resource.name for resource in resources"></select>
</div>
</div>
<div class="row">
<div class="col-sm-4 col-md-4">
Label
</div>
<div class="col-sm-6 col-md-6">
<input class="form-control" ng-model="input.label">
</div>
<div class="col-sm-2 col-md-2">
<button class="btn btn-link" ng-click="addNode()">Add</button>
</div>
</div>
<h5 ng-show="ed">Fields:</h5>
<table class="table table-bordered">
<tr ng-repeat="ed in input.elements">
<td><input type="checkbox" ng-model="ed.meta.include"/> </td>
<td>{{ed.meta.displayPath}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>