Rework the styling of a list box
This commit is contained in:
parent
9be9808463
commit
a952765328
|
@ -38,12 +38,9 @@ function triggerSelect(listId) {
|
|||
console.debug('Switch selection to list ' + listId);
|
||||
if (curList) {
|
||||
$('.nav-link[data-list-id="' + curList.id + '"]').removeClass('active');
|
||||
$('#listName').removeClass("border-" + borderColors[curList.index])
|
||||
.removeClass("bg-" + bgColors[curList.index])
|
||||
.removeClass("text-" + textColors[curList.index]);
|
||||
$('#listHtml').removeClass("border-" + borderColors[curList.index])
|
||||
.removeClass("bg-" + bgColors[curList.index])
|
||||
.removeClass("text-" + textColors[curList.index]);
|
||||
$('#listBox').removeClass("border-" + borderColors[curList.index])
|
||||
.removeClass("bg-" + bgColors[curList.index])
|
||||
.removeClass("text-" + textColors[curList.index]);
|
||||
}
|
||||
$('.nav-link[data-list-id="' + listId + '"]').addClass('active');
|
||||
disableEditMode();
|
||||
|
@ -57,15 +54,12 @@ function triggerSelect(listId) {
|
|||
headers: { 'Accept': 'application/json' }
|
||||
}).done(function(list) {
|
||||
curList = list;
|
||||
$('#listBox').addClass("border-" + borderColors[list.index])
|
||||
.addClass("bg-" + bgColors[list.index])
|
||||
.addClass("text-" + textColors[list.index]);
|
||||
$('#listName').text('Lijst van ' + list.name)
|
||||
.addClass("border-" + borderColors[list.index])
|
||||
.addClass("bg-" + bgColors[list.index])
|
||||
.addClass("text-" + textColors[list.index]);
|
||||
$('#listHtml').addClass("border-" + borderColors[list.index])
|
||||
.addClass("bg-" + bgColors[list.index])
|
||||
.addClass("text-" + textColors[list.index]);
|
||||
$('#listData').html(list.data);
|
||||
$('#listUpdatedAt').text('Laaste aanpassing op: FIXME');
|
||||
$('#listData').html(list.data);
|
||||
$('#editButton').show();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-default border rounded p-2" id="listBox">
|
||||
<div class="panel-heading">
|
||||
<h1 class="panel-title border p-3 mb-0" id="listName"></h1>
|
||||
<h1 class="panel-title" id="listName"></h1>
|
||||
</div>
|
||||
<div class="panel-body border p-3" id="listHtml"></div>
|
||||
<div class="panel-body mtb-0" id="listHtml"></div>
|
||||
<div class="panel-footer">
|
||||
<small><i id="listUpdatedAt"></i></small>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue