Continuation of trophy intergration

pull/7/head
Sami Mokaddem 2017-11-13 15:19:30 +01:00
parent 0bc0683924
commit f59aac98d7
3 changed files with 15 additions and 28 deletions

View File

@ -3,12 +3,6 @@
height: auto; height: auto;
} }
tr > td > label > input.radioTrophy {
margin: auto;
margin-bottom: 5px;
display: block;
}
.successCell { .successCell {
background-color: #dff0d8 !important background-color: #dff0d8 !important
} }
@ -23,10 +17,10 @@ tr > td > label > input.radioTrophy {
} }
.circleBadgeSmall { .circleBadgeSmall {
width: 40px; width: 73px;
height: 40px; height: 73px;
text-align: center; text-align: center;
border-radius: 25px; border-radius: 38px;
background-color: #e1e1e1; background-color: #e1e1e1;
border: 1px solid #caccce; border: 1px solid #caccce;
vertical-align: middle; vertical-align: middle;
@ -35,7 +29,7 @@ tr > td > label > input.radioTrophy {
} }
.grayscale { filter: grayscale(100%); } .circlBadgeNotAcquired { filter: grayscale(100%); }
.circlBadgeAcquired { .circlBadgeAcquired {
/*box-shadow: 0px 0px 15px #0000ff*/ /*box-shadow: 0px 0px 15px #0000ff*/
@ -81,7 +75,7 @@ tr > td > label > input.radioTrophy {
font-size: x-large; font-size: x-large;
} }
.popover-content { .popoverNoPadding {
padding: 3px padding: 3px
} }

View File

@ -14,7 +14,8 @@ var popOverOption = {
trigger: "hover", trigger: "hover",
html: true, html: true,
placement: 'bottom', placement: 'bottom',
content: generateRankingSheet() content: generateRankingSheet(),
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content popoverNoPadding"></div></div>'
} }
var optionsLineChart = { var optionsLineChart = {
series: { series: {
@ -466,6 +467,7 @@ function updateProgressHeader(org) {
source = url_baseTrophyLogo+rank+'.png' source = url_baseTrophyLogo+rank+'.png'
$('#trophy_'+categ).attr('src', source); $('#trophy_'+categ).attr('src', source);
$('#trophy_'+categ).attr('title', trophy_title[rank]); $('#trophy_'+categ).attr('title', trophy_title[rank]);
$('#trophy_'+categ).popover({title: trophy_title[rank], content: rank, trigger: "hover", placement: "bottom"});
} }
}); });
@ -582,10 +584,6 @@ $(document).ready(function() {
//FIXME: timeout used to wait that all datatables are draw. //FIXME: timeout used to wait that all datatables are draw.
setTimeout( function() { updateProgressHeader(currOrg); }, 500); setTimeout( function() { updateProgressHeader(currOrg); }, 500);
$('#trophyForm input').on('change', function() {
alert($('input[name=radioTrophyName]:checked', '#trophyForm').val());
});
source_lastContrib = new EventSource(url_eventStreamLastContributor); source_lastContrib = new EventSource(url_eventStreamLastContributor);
source_lastContrib.onmessage = function(event) { source_lastContrib.onmessage = function(event) {
var json = jQuery.parseJSON( event.data ); var json = jQuery.parseJSON( event.data );

View File

@ -188,7 +188,7 @@
<tr> <tr>
<td> <td>
<div id="divBadge_{{ loop.index }}" class="circleBadgeSmall circlBadgeAcquired"> <div id="divBadge_{{ loop.index }}" class="circleBadgeSmall circlBadgeAcquired">
<img height='32px' width='32px' class="" style="margin-top: 3px;" src="{{ url_for('static', filename='pics/MISPHonorableIcons/1.svg')[:-5]}}{{ item[0] }}.svg" type='image/svg' style="margin: auto;"</img> <img height='64px' width='64px' class="" style="margin-top: 3px;" src="{{ url_for('static', filename='pics/MISPHonorableIcons/1.svg')[:-5]}}{{ item[0] }}.svg" type='image/svg' style="margin: auto;"</img>
</div> </div>
</td> </td>
<td style="padding-left: 15px;">{{ item[1] }}</td> <td style="padding-left: 15px;">{{ item[1] }}</td>
@ -208,18 +208,13 @@
</tr> </tr>
</thead> </thead>
<tbody id='bodyTableTrophyModal'> <tbody id='bodyTableTrophyModal'>
<form id="trophyForm"> <tr>
<tr> {% for categ in trophy_categ_list_id %}
{% for categ in trophy_categ_list_id %} <td>
<td> <input type='image' id='trophy_{{categ}}' style="display: block; margin-left: auto; margin-right: auto;" height="64" width="64" src="{{ url_for('static', filename='pics/MISPTrophy/0.png') }}">
<label style="cursor: pointer; display: block; margin-left: auto; margin-right: auto;"> </td>
<input class="radioTrophy" type="radio" name="radioTrophyName" value="{{categ}}"/> {% endfor %}
<img id='trophy_{{categ}}' style="display: block; margin-left: auto; margin-right: auto;" height="64" width="64" src="{{ url_for('static', filename='pics/MISPTrophy/0.png') }}" type='image/png'>
</label>
</td>
{% endfor %}
</tr> </tr>
</from>
</tbody> </tbody>
</table> </table>
</div> </div>