-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunction-predictions-view.html
66 lines (60 loc) · 2.41 KB
/
function-predictions-view.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
<link rel="import" href="protein-overview.html">
<link rel="import" href="nextprot-elements-shared-styles.html">
<link rel="import" href="prediction-annotation-section.html">
<!--
`function-predictions-view`
View listing protein function predictions.
#### Example
<function-predictions-view nx-config='{"entry": "P52701"}'></function-predictions-view>
@demo demo/function-predictions-view-demo.html
-->
<dom-module id="function-predictions-view">
<template>
<style include="nextprot-elements-shared-styles">
:host {
display: block;
min-height: 35px;
background:#f8f8f8;
overflow-y: auto;
}
</style>
<div class="row">
<div id="nxOverview" class="col-md-12">
<protein-overview nx-config="[[nxConfig]]"></protein-overview>
</div>
</div>
<div id="noDataWarning" class='alert alert-warning noData' hidden>There are no function predictions available in neXtProt for [[nxConfig.entry]].
Suggestions for updates are welcome! Please <a href="javascript:location='mailto:\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0040\u006e\u0065\u0078\u0074\u0070\u0072\u006f\u0074\u002e\u006f\u0072\u0067';void 0">contact us</a>.
</div>
<div class="row nxSection">
<div id="nxPredictions" class="col-md-12">
<prediction-annotation-section nx-config="[[nxConfig]]" count="{{predictionCount}}"></prediction-annotation-section>
</div>
</div>
</template>
<script>
Polymer({
is: 'function-predictions-view',
properties: {
nxConfig: {
type: Object,
value: {}
},
predictionCount: {
type: Number,
value: -1,
observer: "_checkPredictions"
},
},
_checkPredictions: function() {
if (this.predictionCount === 0) {
this.$.nxPredictions.hidden = true;
} else {
this.$.nxPredictions.hidden = false;
}
this.$.noDataWarning.hidden = !this.$.nxPredictions.hidden;
}
}
);
</script>
</dom-module>