fix: [decaying:basescore_config] Fixed CSS for large tags

pull/5032/head
mokaddem 2019-08-21 11:40:35 +02:00
parent 0393c7ee9a
commit 60338499c7
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 11 additions and 6 deletions

View File

@ -73,8 +73,8 @@
</td>
<td id="basescore-example-tag-0">
<div style="width:100%;display:inline-block;" data-original-title="" title="">
<div id="basescore-example-customtag-container" style="float:left" data-original-title="" title="">
<button id="basescore-example-score-addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" title="Add tag" onclick="event.stopPropagation(); addTagWithValue(this);">+</button>
<div id="basescore-example-customtag-container" style="float: left;display: flex;flex-flow: wrap;" data-original-title="" title="">
<button id="basescore-example-score-addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px; margin-right: 3px;" title="Add tag" onclick="event.stopPropagation(); addTagWithValue(this);">+</button>
</div>
</div>
</td>

View File

@ -114,6 +114,10 @@
vertical-align: middle;
}
.decayingExampleTags {
margin-bottom: 3px;
}
/* decaying simulation */
div.simulationSubContainer{
padding: 15px;

View File

@ -211,14 +211,15 @@ function refreshExamples() {
for (var i = 1; i <= 3; i++) {
var numerical_values = [];
tags = pickRandomTags();
tags_html = '';
tags_html = '<div style="display: flex; flex-flow: wrap;">';
tags.forEach(function(tag) {
numerical_values.push({name: tag.name.split(':')[0], value: tag['numerical_value']});
var text_color = getTextColour(tag.colour);
tags_html += '<span class="tag decayingExampleTags" style="background-color: ' + tag.colour + ';color:' + text_color + '" '
+ 'title="numerical_value=' + tag['numerical_value'] + '" '
+ 'data-placement="right">' + tag.name + '</span>&nbsp;';
tags_html += '<span class="tagComplete decayingExampleTags" style="background-color: ' + tag.colour + ';color:' + text_color + '" '
+ 'title="numerical_value=' + tag['numerical_value'] + '" '
+ 'data-placement="right">' + tag.name + '</span>&nbsp;';
});
tags_html += '</div>';
base_score_computation[i] = compute_base_score(numerical_values);
var base_score = base_score_computation[i].score.toFixed(1);