-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscaffold.csp.xml
156 lines (147 loc) · 4.88 KB
/
scaffold.csp.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<CSP name="scaffold.CSP" application="/csp/iknowsocial/" default="1"><![CDATA[
<!DOCTYPE html>
<html>
<head>
<title>Closure Builder</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="custom.css">
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="custom.js"></script>
<script language="Javascript">
$(document).ready(function() {
var getDomainId = function() {
var res = ($("#domain-chooser button").text()).split(" ");
return res[0]
}
setTableToggling("#left-table");
$("#select-all-to-propose").click(function() {
toggleWholeTable("#left-table")
});
$("#select-all-to-approve").click(function() {
toggleWholeTable("#right-table")
});
$("#domain-chooser li").click(function() {
$("#domain-chooser button").text($(this).text() + " ")
$("#domain-chooser button").append("<span class=\"caret\"></span>")
});
setSearch("#left-table");
setSearch("#right-table")
$("#left-table-main-button").click(function() {
var list = []
$("#left-table .highlighted-row").each(function() {
list.push($("th:nth-child(1)", this).text());
});
var domainId = getDomainId();
var stringifiedList = list.join(",");
#call(Util.UIBroker.ProposeMarkers(stringifiedList, domainId))#
});
$("#right-table-main-button").click(function() {
var dict = {}
$("#right-table .highlighted-row").each(function() {
dict[$("td:nth-child(2)", this).text()] = $("td:nth-child(3)", this).text();
});
var stringifiedDict = JSON.stringify(dict);
#call(Util.UIBroker.ApproveMarkers(stringifiedDict))#
});
});
</script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Emotional markers closure builder</a>
</div>
<div class="btn-group pull-right" id="domain-chooser">
<script language="cache" runat="server">
do ##class(Util.UIBroker).PrintDomainsDropdown()
</script>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-1">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for..." id="left-table-search-pane">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</div>
<div class="col-md-4 col-md-offset-2">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for..." id="right-table-search-pane">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</div>
</div>
<div class="row" style="margin-top:10px">
<div class="col-md-4 col-md-offset-1">
<div class="panel panel-default">
<table class="table">
<caption>Approved emotional markers.</caption>
<thead>
<tr>
<th>Id</th>
<th>Entity</th>
<th>Weight</th>
</tr>
</thead>
</table>
<div class="table-content small-content-wrapper">
<table class="table" id="left-table">
<tbody>
<script language="cache" runat="server">
do ##class(Util.UIBroker).PrintEmotionalsMarkers()
</script>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4 col-md-offset-2">
<div class="panel panel-default">
<table class="table">
<caption>Proposed emotional markers.</caption>
<thead>
<tr>
<th>#</th>
<th>Entity</th>
<th>Weight</th>
</tr>
</thead>
</table>
<div class="table-content small-content-wrapper">
<table class="table" id="right-table">
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-1">
<div class="pull-right">
<button type="button" class="btn btn-default" id="select-all-to-propose">Select All</button>
<button type="button" class="btn btn-primary" id="left-table-main-button" disabled>Propose Closure</button>
</div>
</div>
<div class="col-md-4 col-md-offset-2">
<div class="pull-right">
<button type="button" class="btn btn-default" id="select-all-to-approve">Select All</button>
<button type="button" class="btn btn-primary" id="right-table-main-button"disabled>Approve</button>
</div>
</div>
</div>
</div>
</body>
</html>
]]></CSP>
</Export>