Merge branch 'master' of ssh://willipink.eu:3456/moritz/coinmanager
This commit is contained in:
commit
3ad9c0e7f6
@ -149,7 +149,7 @@ function render_response(data, td, set) {
|
||||
/* add or update marker (and name) if found */
|
||||
if (set['found'] && set['found_by'] && set['exists']) {
|
||||
div_class = set['found_by'];
|
||||
$(td).find('div.coin span').html('').html('✔'); }
|
||||
$(td).find('div.coin span').html('').html('✓'); }
|
||||
|
||||
/* add/update name */
|
||||
if ([201, 202, 203].includes(data['value'])) {
|
||||
@ -163,7 +163,7 @@ function render_response(data, td, set) {
|
||||
if (div_special_name.length == 0) {
|
||||
|
||||
/* append div if not found */
|
||||
$(td).append('<div class="special' + c + '_name three_lines">' + name + '</div>');
|
||||
$(td).append('<div class="special_name special' + c + '_name three_lines">' + name + '</div>');
|
||||
|
||||
} else if (div_special_name.length == 1) {
|
||||
|
||||
@ -173,7 +173,7 @@ function render_response(data, td, set) {
|
||||
|
||||
/* remove name */
|
||||
} else if (!set['exists']) {
|
||||
$(td).find('div.special' + c + '_name').html();
|
||||
$(td).find('div.special_name').html('');
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ $(document).ready(function() {
|
||||
$(td).css('cursor', 'cell');
|
||||
if (response.status === 0) {
|
||||
render_response(data, this.td, settings);
|
||||
detach('add_coin_name');
|
||||
detach('#add_coin_name');
|
||||
} else {
|
||||
alert(response.message);
|
||||
}
|
||||
@ -409,7 +409,7 @@ $(document).ready(function() {
|
||||
|
||||
if (response.status === 0) {
|
||||
render_login(name, color);
|
||||
detach('add_user');
|
||||
detach('#add_user');
|
||||
} else {
|
||||
$('#response').html(response.message);
|
||||
$('#response').css('color', 'red');
|
||||
|
@ -257,10 +257,13 @@ td > * {
|
||||
|
||||
td.coin {
|
||||
background-color: #cec6ca;
|
||||
font-size: 1.1rem;
|
||||
border: 2px solid white;
|
||||
font-size: 1.3rem;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.brass {
|
||||
background-color: #dec1a8 !important;
|
||||
}
|
||||
@ -293,13 +296,18 @@ td.coin {
|
||||
/* coin div text style */
|
||||
|
||||
.ec {
|
||||
color: #dc3545;
|
||||
font-weight: bold;
|
||||
color: #dc3545 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
@-moz-document url-prefix() {
|
||||
td.ec, td.checked {
|
||||
font-size: 1.7rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
.checked {
|
||||
color: #28a745;
|
||||
font-weight: bold;
|
||||
color: #28a745 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
|
||||
@ -315,7 +323,7 @@ div.coin {
|
||||
z-index: 1000;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
text-align: inherit;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
float: left;
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
<td class="coin {{ td_class }}" value="{{ value }}" title="{{ name }}">
|
||||
<div class="coin">
|
||||
<span>{{ marker }}</span>
|
||||
<div class="{{ div_class }}" type="overlay"></div>
|
||||
</div>
|
||||
{% if name %}
|
||||
<div class="special_name {{ special_name }} {{ special_class }}">{{ name }}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="coin {{ td_class }}" value="{{ value }}" title="{{ name }}">
|
||||
<div class="coin">
|
||||
<span>{{ marker }}</span>
|
||||
<div class="{{ div_class }}" type="overlay"></div>
|
||||
</div>{% if name %}
|
||||
<div class="special_name {{ special_name }} {{ special_class }}">{{ name }}</div>{% endif %}
|
||||
</td>
|
||||
|
@ -1,108 +1,108 @@
|
||||
<style type="text/css">{% for user in users %}
|
||||
<style type="text/css">{% for user in users %}
|
||||
div.{{ user.name }} { background-color: {{ user.color }} !important; }{% endfor %}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
<button id="begin_edit" class="btn btn-info">+ hinzufügen</button>
|
||||
<button id="begin_edit" class="btn btn-info">+ hinzufügen</button>
|
||||
|
||||
<!-- navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
{% csrf_token %}
|
||||
<!-- navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
{% csrf_token %}
|
||||
|
||||
<!-- advanced options -->
|
||||
<div id="advanced_options">
|
||||
<label for="exists" class="noexist">
|
||||
<input id="exists" type="checkbox">
|
||||
Existiert nicht
|
||||
</label>
|
||||
<label for="ec" id="label_ec" class="ec">
|
||||
<input id="ec" type="checkbox">
|
||||
Eurocollector 2002
|
||||
</label>
|
||||
<label for="checked" id="label_checked" class="checked">
|
||||
<input id="checked" type="checkbox">
|
||||
Überprüft, einsortiert
|
||||
</label>
|
||||
<label for="buy_only" id="label_buy_only" class="buy_only">
|
||||
<input id="buy_only" type="checkbox">
|
||||
Kursmünze
|
||||
</label>
|
||||
<label for="circulation">
|
||||
Auflage
|
||||
<input id="circulation" type="text" value="Auflage">
|
||||
</label>
|
||||
<label for="found_on">
|
||||
Datum
|
||||
<input type="text" name="found_on" id="found_on" value="{% now 'd.m.Y' %}">
|
||||
</label>
|
||||
<label for="found" id="found_label">
|
||||
<input id="found" type="checkbox" checked="checked">
|
||||
Gefunden
|
||||
</label>
|
||||
<!-- advanced options -->
|
||||
<div id="advanced_options">
|
||||
<label for="exists" class="noexist">
|
||||
<input id="exists" type="checkbox">
|
||||
Existiert nicht
|
||||
</label>
|
||||
<label for="ec" id="label_ec" class="ec">
|
||||
<input id="ec" type="checkbox">
|
||||
Eurocollector 2002
|
||||
</label>
|
||||
<label for="checked" id="label_checked" class="checked">
|
||||
<input id="checked" type="checkbox">
|
||||
Überprüft, einsortiert
|
||||
</label>
|
||||
<label for="buy_only" id="label_buy_only" class="buy_only">
|
||||
<input id="buy_only" type="checkbox">
|
||||
Kursmünze
|
||||
</label>
|
||||
<label for="circulation">
|
||||
Auflage
|
||||
<input id="circulation" type="text" value="Auflage">
|
||||
</label>
|
||||
<label for="found_on">
|
||||
Datum
|
||||
<input type="text" name="found_on" id="found_on" value="{% now 'd.m.Y' %}">
|
||||
</label>
|
||||
<label for="found" id="found_label">
|
||||
<input id="found" type="checkbox" checked="checked">
|
||||
Gefunden
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- main options -->
|
||||
<div id="navbar_toggler">
|
||||
<label for="found_by">
|
||||
<select id="found_by" name="found_by" class="form-control">{% for user in users %}
|
||||
<option value="{{ user.name }}" color="{{ user.color }}">{{ user.name }}</option>{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<div id="buttons">
|
||||
<button id="show_add_user" class="btn btn-secondary">+ Name</button>
|
||||
<button id="finish_edit" class="btn btn-success">Fertig</button>
|
||||
<button id="show_advanced_options" class="btn btn-outline-secondary" aria-controls="navbar_toggler" aria-expanded="false" aria-label="Toggle advanced options"><span class="navbar-toggler-icon"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- main options -->
|
||||
<div id="navbar_toggler">
|
||||
<label for="found_by">
|
||||
<select id="found_by" name="found_by" class="form-control">{% for user in users %}
|
||||
<option value="{{ user.name }}" color="{{ user.color }}">{{ user.name }}</option>{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<div id="buttons">
|
||||
<button id="show_add_user" class="btn btn-secondary">+ Name</button>
|
||||
<button id="finish_edit" class="btn btn-success">Fertig</button>
|
||||
<button id="show_advanced_options" class="btn btn-outline-secondary" aria-controls="navbar_toggler" aria-expanded="false" aria-label="Toggle advanced options"><span class="navbar-toggler-icon"></span></button>
|
||||
<!-- modal add_user -->
|
||||
<div id="add_user" class="modal-container">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Name hinzufügen</h5>
|
||||
<button id="add_user_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- modal add_user -->
|
||||
<div id="add_user" class="modal-container">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Name hinzufügen</h5>
|
||||
<button id="add_user_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="text_user">Name</label>
|
||||
<input type="text" name="name" id="add_user_name" class="form-control">
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="text_user">Name</label>
|
||||
<input type="text" name="name" id="add_user_name" class="form-control">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="text_color">Farbe</label>
|
||||
<input type="text" name="color" id="add_user_color" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="response"></span>
|
||||
<button type="button" id="add_user_action" class="btn btn-primary">+ Name hinzufügen</button>
|
||||
<div class="form-group">
|
||||
<label for="text_color">Farbe</label>
|
||||
<input type="text" name="color" id="add_user_color" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="response"></span>
|
||||
<button type="button" id="add_user_action" class="btn btn-primary">+ Name hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal add_coin_name -->
|
||||
<div id="add_coin_name" class="modal-container">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Sondermünze</h5>
|
||||
<button id="add_coin_name_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="add_coin_name_name">Name</label>
|
||||
<input type="text" name="name" id="add_coin_name_name" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="response"></span>
|
||||
<button type="button" id="add_coin_name_action" class="btn btn-primary">+ Münze hinzufügen</button>
|
||||
<!-- modal add_coin_name -->
|
||||
<div id="add_coin_name" class="modal-container">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Sondermünze</h5>
|
||||
<button id="add_coin_name_close" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="add_coin_name_name">Name</label>
|
||||
<input type="text" name="name" id="add_coin_name_name" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="response"></span>
|
||||
<button type="button" id="add_coin_name_action" class="btn btn-primary">+ Münze hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,40 +1,38 @@
|
||||
{% if single_country %}
|
||||
{% include 'header.html' with title=country.name %}
|
||||
{% include 'coinc/controlbar.html' with users=users %}
|
||||
{% endif %}
|
||||
<div class="container-fluid">
|
||||
<table name="{{ country.name_iso }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="12" title="Zurück zur Länderübersicht">
|
||||
<img src="/static/coinc/images/{{ country.name_iso }}.png" />
|
||||
{{ country.name }}{% if country.comment %}
|
||||
<small> - {{ country.comment }}</small>{% endif %}
|
||||
<div class="total_coins">{{ total_coins }}</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Jahr</th>
|
||||
<th>1</th>
|
||||
<th>2</th>
|
||||
<th>5</th>
|
||||
<th class="brass">10</th>
|
||||
<th class="brass">20</th>
|
||||
<th class="brass">50</th>
|
||||
<th>1 €</th>
|
||||
<th>2 €</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="12"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if single_country %}{% include 'header.html' with title=country.name %}
|
||||
{% include 'coinc/controlbar.html' with users=users %}{% endif %}
|
||||
<div class="container-fluid">
|
||||
<table name="{{ country.name_iso }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="12" title="Zurück zur Länderübersicht">
|
||||
<div class="float-left">
|
||||
<img src="/static/coinc/images/{{ country.name_iso }}.png">
|
||||
{{ country.name }}{% if country.comment %}
|
||||
<small> - {{ country.comment }}</small>{% endif %}
|
||||
</div>
|
||||
<div class="float-right">{{ total_coins }}</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Jahr</th>
|
||||
<th>1</th>
|
||||
<th>2</th>
|
||||
<th>5</th>
|
||||
<th class="brass">10</th>
|
||||
<th class="brass">20</th>
|
||||
<th class="brass">50</th>
|
||||
<th>1 €</th>
|
||||
<th>2 €</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="12"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for year in country.years %}{% show_year country year %}{% endfor %} </tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if single_country %}
|
||||
{% include "footer.html" with title="Münzsammlung" %}
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
{% if single_country %}{% include "footer.html" with title="Münzsammlung" %}{% endif %}
|
||||
|
@ -3,4 +3,5 @@
|
||||
{% include 'coinc/filter_country.html' with countrys=countrys %}
|
||||
{% else %}
|
||||
<p>Trage zuerst Länder im Adminbereich ein.</p>{% endif %}
|
||||
<small>Version 200531</small>
|
||||
{% include 'footer.html' with title='Münzsammlung' %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% for stamp in year %} <tr name="{{ year_short }}" stamp="{{ stamp }}">
|
||||
{% for stamp in year %} <tr name="{{ year_short }}" stamp="{{ stamp }}">
|
||||
<td class="year {{ year_complete }}"><div class="coin">{{ stamp }}{{ year_short }}</div></td>
|
||||
{% for value in values %}{% show_coin country year_short stamp value %}{% endfor %} </tr>{% endfor %}{% ifnotequal year|length 1 %}
|
||||
<tr>
|
||||
<td class="spacer" colspan="12"></td>
|
||||
</tr>{% endifnotequal %}
|
||||
</tr>{% endifnotequal %}
|
||||
|
@ -193,7 +193,7 @@ def show_coin(country, year, stamp, value):
|
||||
marker = ''
|
||||
if coin.found_by:
|
||||
div_class = f"found {coin.found_by}"
|
||||
marker = '✔'
|
||||
marker = '✓'
|
||||
|
||||
name = coin.name if coin.name else ''
|
||||
special_class = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user