-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle-02-a.html
129 lines (109 loc) · 3.84 KB
/
single-02-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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Summarization Viewer</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/theme/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="css/theme/jquery.ui.slider.css" />
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<link rel="stylesheet" type="text/css" href="css/summary-02.css" />
</head>
<body>
<div class='article-pane'>
<article id='article'></article>
</div>
<div class='control-pane'>
<div class='controls ui-layout-north'>
<div class='buttons'>
<label for="show">View</label>
<input name="view" id="view-all" type="radio" value="all" />
<label for="view-all">all</label>
<input name="view" id="view-flagged" type="radio" value="flagged" />
<label for="view-flagged">flagged</label>
<input name="view" id="view-normal" type="radio" value="normal"
checked="true" />
<label for="view-normal">normal</label>
</div>
<div class='threshold'>
<label for="threshold">Threshold range:</label>
<input name="threshold" type="text" />
</div>
</div>
</div>
</body>
<script>
function xmlNode(node)
{
var $node = $(node);
var ret;
switch (node.nodeName)
{
case '#text':
ret = $node.text();
break;
case 'keyword':
ret = $('#tmpl-sentence-keyword').tmpl( {keyword: $node} );
}
return ret;
}
</script>
<!-- Templates { -->
<!-- '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>
<!-- 'node' is a jQuery object encapsulating an XML node -->
<script id='tmpl-sentence-text' type='text/x-jquery-tmpl'>
<span class='text'>${node.text()}</span>
</script>
<!-- 'node' is a jQuery object encapsulating an XML node -->
<script id='tmpl-sentence-keyword' type='text/x-jquery-tmpl'>
<span class='keyword'
name='${node.attr('name')}'>${node.text()}</span>
</script>
<script id='tmpl-sentence-rank' type='text/x-jquery-tmpl'>
<div class='rank'>${rank}</div>
</script>
<script id='tmpl-sentence-controls' type='text/x-jquery-tmpl'>
<div class='controls'><div
class='expand ui-icon ui-icon-plus' title='expand' /><div
class='flag ui-icon ui-icon-flag' title='flag' /><div
class='hide ui-icon ui-icon-cancel' title='hide' /></div>
</script>
<script id='tmpl-selection-controls' type='text/x-jquery-tmpl'>
<div class='selection-controls ui-corner-all'><div
class='highlight ui-icon ui-icon-document-b' title='highlight' /><div
class='tag ui-icon ui-icon-tag' title='tag' /></div>
</script>
<script id='tmpl-selection-remove-controls' type='text/x-jquery-tmpl'>
<div class='selection-controls ui-corner-all'><div
class='remove ui-icon ui-icon-cancel' title='remove highlight' /></div>
</script>
<!-- Templates } -->
<script src='js/jquery.js'></script>
<script src='js/jquery.tmpl.min.js'></script>
<script src='js/jquery.delegateHoverIntent.js'></script>
<script src='js/jquery-ui.min.js'></script>
<script src='js/jquery.ui.mouse.js'></script>
<script src='js/jquery.ui.slider.js'></script>
<script src='js/rangy.min.js'></script>
<script src='js/rangy/serializer.min.js'></script>
<script src='js/rangy/cssclassapplier.js'></script>
<script src='js/jquery.summary-02.js'></script>
<script>
(function($) {
$('#article').summary({
//src: 'samples/0001.html',
metadata: 'samples/0001.xml'
});
}(jQuery));
</script>
</html>