Skip to content

Commit

Permalink
refine issue #518
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed Sep 15, 2022
1 parent 6c693aa commit c024c6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions web/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<div class="modal hide fade" id="app-modal">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header"><button class="close" data-dismiss="modal">&times;</button>
<div class="modal-header"><h2 id=app-modal-header></h2><button class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body" id=app-modal-body>
</div>
Expand Down Expand Up @@ -2559,16 +2559,18 @@
<script type="text/template" id="app-tmpl">
<div class="col-sm" style="padding-left:1px;padding-right:1px">
<div class="card" style="width: 300px;">
<div class="card h-100" style="width: 300px;" id=app-{{app_code}}>
<a href="{{url}}" target="_blank"><img src="{{image}}" class="card-img-top" alt="..." style="width:300px;height:150px"></a>
<div class="card-body">
<h5 class="card-title"><a href="{{url}}" target="_blank">{{title}}</a></h5>
<div class="card-text" id=app-{{app_code}}>
<div class="card-text">
<div>{{description.substring(0, 100)}}{{description.length>100?"... <a id=more-description>more</a>":""}}</div>
<div><a id=developer-info>Developer information</a></div>
<div><a href={{url}} target="_blank">Go to application</a></div>
</div>
</div>
<div class="card-footer">
<div class=p-2><a id=developer-info>Developer information</a></div>
<div class=p-2><a href={{url}} target="_blank">Go to application</a></div>
</div>
</div>
</div>
</script>
Expand Down
2 changes: 2 additions & 0 deletions web/src/main/webapp/js/ctd2.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,14 @@ import MraView from './mra.js'
$("#app-"+code).find("#more-description").click(function (e) {
e.preventDefault();
console.debug(e)
$("#app-modal-header").html("Description")
$("#app-modal-body").html(model.description)
$("#app-modal").modal("show")
})
$("#app-"+code).find("#developer-info").click(function (e) {
e.preventDefault();
console.debug(e)
$("#app-modal-header").html("Developer Information")
const text = `<ul><li>Institution(s): ${model.institution}</li><li>Developer(s): ${model.developers}</li><li>Lab(s): ${model.lab}`
$("#app-modal-body").html(text)
$("#app-modal").modal("show")
Expand Down

0 comments on commit c024c6e

Please sign in to comment.