collapse 000 to k in save name, move comp* alert to under the comp button to make it neater
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
</h5>
|
||||
|
||||
<div class="row">
|
||||
<div id="info_col" class="col-auto"> <div class="pt-1 pb-1 mb-0 alert text-center" style="background:lemonchiffon">2025</div>
|
||||
<div class="col-auto"> <div class="pt-1 pb-1 mb-0 alert text-center" style="background:lemonchiffon">2025</div>
|
||||
|
||||
{% set first_yr=2025 %}
|
||||
{% for date, dollars in savings %}
|
||||
@@ -120,10 +120,6 @@
|
||||
{% else %}
|
||||
<div class="alert alert-success">Super kicks in!!!</div>
|
||||
{% endif %}
|
||||
{% if COMP %}
|
||||
<div id="info_alert" class="alert alert-info">Note: {{ '$%0.2f' % COMP['amount']|float }} is the final value of the compared to data. Hover over blue labels above to see what compared to values differed</div>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="alert alert-warning">
|
||||
@@ -135,18 +131,19 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#save_modal">Save</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div id="comp_col" class="col-auto">
|
||||
<div class="input-group">
|
||||
<button type="submit" class="disabled btn btn-primary" onClick="$('#vals_form').submit() disabled">Compare to:</button>
|
||||
<button type="button" class="btn btn-primary me-2 rounded" data-bs-toggle="modal" data-bs-target="#save_modal">Save</button>
|
||||
<button type="submit" class="disabled btn btn-primary rounded-start" onClick="$('#vals_form').submit() disabled">Compare to:</button>
|
||||
<select class="form-select border border-primary text-primary" id="compare_to" name="compare_to" onchange="$('#vals_form').submit()">
|
||||
{% for el in finance['COMP_SETS'] %}
|
||||
<option value="{{el[0]}}">{{el[1]}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% if COMP %}
|
||||
<div style="display:none" id="comp_alert" class="alert alert-info mt-2">Note: {{ '$%0.2f' % COMP['amount']|float }} is the final value of the compared to data. Hover over blue labels above to see what compared to values differed</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -163,10 +160,11 @@
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']"))
|
||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) })
|
||||
|
||||
var parentWidth = $('#info_col').width();
|
||||
var parentWidth = $('#comp_col').width();
|
||||
|
||||
// Set the alert's `max-width` to the parent's width
|
||||
$('#info_alert').css('max-width', parentWidth + 'px');
|
||||
$('#comp_alert').css('max-width', parentWidth + 'px');
|
||||
$('#comp_alert').show()
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
@@ -278,7 +276,7 @@
|
||||
<div class="input-group">
|
||||
<label class="col-form-label me-2 text-end float-end">With name:</label>
|
||||
<input id="save_name" type="text" class="form-control"
|
||||
value="{{now}}-LE={{finance['Living_Expenses']}},Inf={{finance['Inflation']}},sell={{finance['Sell_shares']}}"
|
||||
value="{{now}}-LE={{finance['Living_Expenses']|replace('000','k')}},Inf={{finance['Inflation']}},sell={{finance['Sell_shares']}}"
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user