collapse 000 to k in save name, move comp* alert to under the comp button to make it neater
This commit is contained in:
1
README
1
README
@@ -1,5 +1,4 @@
|
|||||||
TODO:
|
TODO:
|
||||||
* convert LE 84000 to 84k in save_name
|
|
||||||
|
|
||||||
CONSIDER in code:
|
CONSIDER in code:
|
||||||
* when we time the payment of GMHBA / HCF (and at what cadence) and include it in calcs better
|
* when we time the payment of GMHBA / HCF (and at what cadence) and include it in calcs better
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<div class="row">
|
<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 %}
|
{% set first_yr=2025 %}
|
||||||
{% for date, dollars in savings %}
|
{% for date, dollars in savings %}
|
||||||
@@ -120,10 +120,6 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-success">Super kicks in!!!</div>
|
<div class="alert alert-success">Super kicks in!!!</div>
|
||||||
{% endif %}
|
{% 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>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
@@ -135,18 +131,19 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div id="comp_col" 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 class="input-group">
|
<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()">
|
<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'] %}
|
{% for el in finance['COMP_SETS'] %}
|
||||||
<option value="{{el[0]}}">{{el[1]}}</option>
|
<option value="{{el[0]}}">{{el[1]}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -163,10 +160,11 @@
|
|||||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']"))
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']"))
|
||||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) })
|
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
|
// 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 () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
@@ -278,7 +276,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<label class="col-form-label me-2 text-end float-end">With name:</label>
|
<label class="col-form-label me-2 text-end float-end">With name:</label>
|
||||||
<input id="save_name" type="text" class="form-control"
|
<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>
|
</input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user