-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle-06-a.html
236 lines (212 loc) · 8.3 KB
/
single-06-a.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Summarization Viewer</title>
<link rel="stylesheet" type="text/css" href="css/theme/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="css/summary-06.min.css" />
<script src='js/req.min.js'></script>
<script>
var development = true;
if (development === true)
{
// Define development script dependencies
Req.assets = {
'preloadImages':{ src: 'js/preloadImages.js' },
'urlParser': { src: 'js/urlParser.js'},
'jquery': {
src: 'js/jquery.min.js',
// script.onload handler that runs as soon as the script has loaded
onload: function () {
// be strict about jQuery usage.
var $ = jQuery.noConflict();
// Setup an easy-to-use Req.js plugin for jQuery ($.Req)
$.fn.Req = function(){
var args = arguments, t = this;
if (t.length)
{
Req.apply(null, $.map(args, function(a) {
return $.isFunction(a)
? function(){a.call(t);}
: a;
}) );
}
return t;
};
}
},
'rangy': { src: 'js/rangy.min.js' },
'rangy.serializer':
{ src: 'js/rangy/serializer.min.js',
req: ['rangy'] },
'rangy.cssClassApplier':
{ src: 'js/rangy/cssclassapplier.min.js',
req: ['rangy'] },
'utils': { src: 'js/jquery.utils.js', req: ['jquery'] },
'tmpl': { src: 'js/jquery.tmpl.min.js', req: ['jquery'] },
'json': { src: 'js/jquery.json.min.js', req: ['jquery'] },
'jstorage': { src: 'js/jstorage.min.js', req: ['jquery'] },
'delegateHoverIntent':
{ src: 'js/jquery.delegateHoverIntent.js',
req: ['jquery'] },
'user': { src: 'js/jquery.user.js', req: ['jquery'] },
'notes': { src: 'js/jquery.notes.js', req: ['jquery'] },
'jquery-ui': { src: 'js/jquery-ui.min.js', req: ['jquery'] },
'ui.checkbox': { src: 'js/ui.checkbox.js', req: ['jquery-ui'] },
'ui.notes': { src: 'js/ui.notes.js', req: ['jquery-ui'] },
'summary': { src: 'js/jquery.summary-06.js',
req: [ 'jquery',
'rangy.serializer', 'rangy.cssClassApplier',
'utils', 'tmpl', 'json', 'jstorage',
'delegateHoverIntent', 'user', 'notes',
'ui.notes', 'ui.checkbox' ] }
};
}
else
{
// Define production script dependencies
Req.assets = {
'preloadImages':{ src: 'js/preloadImages.min.js' },
'urlParser': { src: 'js/urlParser.js'},
'summary': { src: 'js/summary-06-full.js' }
};
}
var docId = '0001a';
Req('preloadImages', function() {
// Preload global images/sprites
preloadImages('css/images/loading.gif', 'css/images/icons-16.png');
},
'urlParser', function() {
docId = getSearchVar('doc') || docId;
},
'summary', function() {
var $ = jQuery.noConflict();
// Initialize the application
$('#article').summary({
metadata: 'samples/'+ docId +'.xml'
});
}
);
</script>
</head>
<body>
<div class='margin-left'><!-- margin-left { -->
<div class='control-pane ui-corner-br' style='display:none;'><!-- control-pane { -->
<div class='controls ui-layout-north'><!-- controls { -->
<div class='filter'><!-- filter { -->
<label for="filter" class='primary'>Filter</label>
<input name="filter" id="filter-tagged"
type="checkbox" value="tagged" />
<label for="filter-tagged">sentences with notes:</label>
<input name="filter" id="filter-starred"
type="checkbox" value="starred" />
<label for="filter-starred">starred sentences:</label>
</div><!-- filter { -->
<div class='threshold'><!-- threshold { -->
<label for="threshold" class='primary'>Threshold</label>
<label class='values'></label>
<div class='buttons'>
<div class='expansion'>
<button name='threshold-down'
title='expand'><div
class='expand su-icon su-icon-expand' /></button
><button name='threshold-up'
title='collapse'><div
class='collapse su-icon su-icon-collapse' /></button>
</div>
<div class='global'>
<button name='threshold-all'
title='full document'><div
class='all su-icon su-icon-all' /></button
><button name='threshold-reset'
title='reset to original threshold'><div
class='reset su-icon su-icon-reset' /></button>
</div>
</div>
</div><!-- threshold } -->
</div><!-- controls } -->
</div><!-- control-pane } -->
</div><!-- margin-left } -->
<div class='content-pane'><!-- content-pane { -->
<article id='article' class='loading'></article>
</div><!-- content-pane } -->
<div class='margin-right'><!-- margin-right { -->
<div class='notes-pane'>
</div>
</div><!-- margin-right } -->
</body>
<!-- 'keywords' is an array of XML nodes -->
<script id='tmpl-header-keywords' type='text/x-jquery-tmpl'>
<div class='keywords'>
{{each keywords}}
<div class='keyword'
name='${$($value).attr('name')}'
rank='${$($value).attr('rank')}'>${$($value).text()}</div>
{{/each}}
</div>
</script>
<script id='tmpl-sentence' type='text/x-jquery-tmpl'>
<div class='sentence' rank='${rank}'>
<div class='controls'><div
class='expand su-icon su-icon-expand' title='expand' /><div
class='star su-icon su-icon-star' title='star' /><div
class='rank'>${rank}</div>
</div>
<div class='content'></div>
</div>
</script>
<script id='tmpl-sentence-text' type='text/x-jquery-tmpl'>
<span class='text'>${text}</span>
</script>
<script id='tmpl-sentence-keyword' type='text/x-jquery-tmpl'>
<span class='keyword'
name='${keyword}'>${text}</span>
</script>
<script id='tmpl-selection-controls' type='text/x-jquery-tmpl'>
<div class='selection-controls ui-corner-top'><div
class='tag su-icon su-state-reverse su-icon-tag'
title='tag' /></div>
</script>
<script id='tmpl-selection-remove-controls' type='text/x-jquery-tmpl'>
<div class='selection-controls ui-corner-top'><div
class='remove su-icon su-icon-cancel-blue ui-state-default'
title='remove tag' /></div>
</script>
<!-- The BODY of a note (without the outter <div class='note' /> ) -->
<script id='tmpl-note' type='text/x-jquery-tmpl'>
<img class='avatar' src='${note.getAuthor().getAvatarUrl()}' />
<div class='author'>${note.getAuthor().getFullName()}</div>
<div class='created'>${ $.prettyDate(note.getCreated()) }</div>
<div class='comment'>${note.getText()}</div>
<div class='edit'>
<textarea class='edit-comment'></textarea>
<div class='buttons'>
<button name='save'>save</button>
<button name='cancel'>cancel</button>
</div>
</div>
<div class='buttons'>
<button name='edit'>edit</button>
<button name='delete'>delete</button>
</div>
</script>
<!-- The BODY of a notes container
(without the outter <div class='notes' /> ) -->
<script id='tmpl-notes' type='text/x-jquery-tmpl'>
<div class='arrow-outer'></div>
<div class='arrow-inner'></div>
<div class='notes-body'>
<!-- note entries will be placed here -->
</div>
<div class='notes-input-pane'>
<textarea class='notes-reply' title="Reply to this comment..."></textarea>
<div class='buttons'>
<button name='reply'>reply</button>
<button name='cancel'>cancel</button>
</div>
</div>
</script>
<!-- Templates } -->
</html>