Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
c18dd0ea
Commit
c18dd0ea
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
hyperlink-based tab navigation for the compound card, first draft
Former-commit-id: 6e2693ace25440b4b5d051bbcc45a8c40446883e
parent
b1ef512e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ippisite/ippidb/templates/base.html
+2
-2
2 additions, 2 deletions
ippisite/ippidb/templates/base.html
ippisite/ippidb/templates/compound_card.html
+15
-3
15 additions, 3 deletions
ippisite/ippidb/templates/compound_card.html
with
17 additions
and
5 deletions
ippisite/ippidb/templates/base.html
+
2
−
2
View file @
c18dd0ea
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
data
:
radarChartData
,
data
:
radarChartData
,
options
:
{
scaleLineWidth
:
1
,
pointLabelFontFamily
:
"
'Helvetica Neue'
"
,
pointLabelFontSize
:
12
,
scaleOverride
:
true
,
scaleSteps
:
5
,
scaleStepWidth
:
0.2
}});
options
:
{
scaleLineWidth
:
1
,
pointLabelFontFamily
:
"
'Helvetica Neue'
"
,
pointLabelFontSize
:
12
,
scaleOverride
:
true
,
scaleSteps
:
5
,
scaleStepWidth
:
0.2
}});
};
};
var
drawLeLleBiplotChart
=
function
(
canvasId
,
compoundId
,
compoundFamily
,
plotData
){
var
drawLeLleBiplotChart
=
function
(
canvasId
,
compoundId
,
compoundFamily
,
plotData
,
tabHash
){
var
currentCompoundData
=
[];
var
currentCompoundData
=
[];
var
currentFamilyData
=
[];
var
currentFamilyData
=
[];
var
otherFamiliesData
=
[];
var
otherFamiliesData
=
[];
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
var
datasetIndex
=
activePoints
[
0
].
_datasetIndex
;
var
datasetIndex
=
activePoints
[
0
].
_datasetIndex
;
var
selectedIndex
=
activePoints
[
0
].
_index
;
var
selectedIndex
=
activePoints
[
0
].
_index
;
var
id
=
scatterChart
.
data
.
datasets
[
datasetIndex
].
data
[
selectedIndex
].
id
;
var
id
=
scatterChart
.
data
.
datasets
[
datasetIndex
].
data
[
selectedIndex
].
id
;
window
.
location
=
'
/compound/
'
+
id
;
window
.
location
=
'
/compound/
'
+
id
+
'
#
'
+
tabHash
;
};
};
};
};
</script>
</script>
...
...
This diff is collapsed.
Click to expand it.
ippisite/ippidb/templates/compound_card.html
+
15
−
3
View file @
c18dd0ea
...
@@ -153,8 +153,7 @@
...
@@ -153,8 +153,7 @@
<canvas
id=
"radar"
></canvas>
<canvas
id=
"radar"
></canvas>
<script>
<script>
drawCompoundDescriptorRadarChart
(
'
radar
'
,
{{
compound
.
molecular_weight
}},
{{
compound
.
a_log_p
}},
{{
compound
.
nb_donor_h
}},
{{
compound
.
nb_acceptor_h
}},
{{
compound
.
tpsa
}},
{{
compound
.
nb_rotatable_bonds
}},
{{
compound
.
nb_benzene_like_rings
}},
{{
compound
.
fsp3
}},
{{
compound
.
nb_chiral_centers
}});
drawCompoundDescriptorRadarChart
(
'
radar
'
,
{{
compound
.
molecular_weight
}},
{{
compound
.
a_log_p
}},
{{
compound
.
nb_donor_h
}},
{{
compound
.
nb_acceptor_h
}},
{{
compound
.
tpsa
}},
{{
compound
.
nb_rotatable_bonds
}},
{{
compound
.
nb_benzene_like_rings
}},
{{
compound
.
fsp3
}},
{{
compound
.
nb_chiral_centers
}});
</script>
</script>
</div>
</div>
</div>
</div>
...
@@ -166,7 +165,7 @@
...
@@ -166,7 +165,7 @@
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<canvas
id=
"le_lle_biplot"
></canvas>
<canvas
id=
"le_lle_biplot"
></canvas>
<script>
<script>
drawLeLleBiplotChart
(
'
le_lle_biplot
'
,
{{
compound
.
id
}},
'
{{ compound.best_pXC50_activity_ppi_name|default_if_none:"No target family identified" }}
'
,
{{
biplot_data
|
safe
}}
)
drawLeLleBiplotChart
(
'
le_lle_biplot
'
,
{{
compound
.
id
}},
'
{{ compound.best_pXC50_activity_ppi_name|default_if_none:"No target family identified" }}
'
,
{{
biplot_data
|
safe
}}
,
'
v-pills-pharmacology
'
);
</script>
</script>
</div>
</div>
</div>
</div>
...
@@ -228,4 +227,17 @@
...
@@ -228,4 +227,17 @@
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$
(
document
).
ready
(
function
(){
var
tabHash
=
document
.
location
.
hash
;
if
(
!
$
(
tabHash
)){
tabHash
=
'
#
'
+
$
(
'
.nav-link.active
'
)[
0
].
attr
(
'
id
'
);
}
$
(
'
[href="
'
+
tabHash
+
'
"]
'
).
tab
(
'
show
'
);
});
$
(
'
a.nav-link
'
).
on
(
'
shown.bs.tab
'
,
function
(
e
)
{
window
.
location
.
hash
=
e
.
target
.
hash
;
window
.
scrollTo
(
0
,
0
);
});
</script>
{% endblock %}
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment