mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-24 19:20:29 +02:00
Merge branch 'main' into potvieux
This commit is contained in:
70
note_kfet/static/css/custom.css
Normal file → Executable file
70
note_kfet/static/css/custom.css
Normal file → Executable file
@ -67,7 +67,8 @@ mark {
|
||||
.bg-primary {
|
||||
/* background-color: rgb(18, 67, 4) !important; */
|
||||
/* MODE VIEUXCON=ON */
|
||||
background-color: rgb(0, 119, 139) !important;
|
||||
/* background-color: rgb(166, 0, 2) !important; */
|
||||
background-color: rgb(0, 0, 0) !important;
|
||||
}
|
||||
|
||||
html {
|
||||
@ -82,15 +83,15 @@ body {
|
||||
.btn-outline-primary:hover,
|
||||
.btn-outline-primary:not(:disabled):not(.disabled).active,
|
||||
.btn-outline-primary:not(:disabled):not(.disabled):active {
|
||||
color: #fff;
|
||||
background-color: rgb(0, 119, 139);
|
||||
border-color: rgb(0, 119, 139);
|
||||
color: rgb(241, 229, 52);
|
||||
background-color: rgb(228, 35, 132);
|
||||
border-color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: rgb(0, 119, 139);
|
||||
background-color: rgba(248, 249, 250, 0.9);
|
||||
border-color: rgb(0, 119, 139);
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
border-color: #464647;
|
||||
}
|
||||
|
||||
.turbolinks-progress-bar {
|
||||
@ -100,36 +101,63 @@ body {
|
||||
.btn-primary:hover,
|
||||
.btn-primary:not(:disabled):not(.disabled).active,
|
||||
.btn-primary:not(:disabled):not(.disabled):active {
|
||||
color: #fff;
|
||||
background-color: rgb(0, 119, 139);
|
||||
border-color: rgb(0, 119, 139);
|
||||
color: rgb(241, 229, 52);
|
||||
background-color: rgb(228, 35, 132);
|
||||
border-color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: rgba(248, 249, 250, 0.9);
|
||||
background-color: rgb(0, 119, 139);
|
||||
border-color: rgb(0, 119, 139);
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
border-color: #adb5bd;
|
||||
}
|
||||
|
||||
.border-primary {
|
||||
border-color: rgb(0,85, 102) !important;
|
||||
border-color: rgb(228, 35, 132) !important;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
border-color: #adb5bd;
|
||||
}
|
||||
|
||||
.btn-secondary:hover,
|
||||
.btn-secondary:not(:disabled):not(.disabled).active,
|
||||
.btn-secondary:not(:disabled):not(.disabled):active {
|
||||
color: rgb(241, 229, 52);
|
||||
background-color: rgb(228, 35, 132);
|
||||
border-color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
|
||||
.btn-outline-dark {
|
||||
color: #343a40;
|
||||
border-color: #343a40;
|
||||
}
|
||||
|
||||
.btn-outline-dark:hover,
|
||||
.btn-outline-dark:not(:disabled):not(.disabled).active,
|
||||
.btn-outline-dark:not(:disabled):not(.disabled):active {
|
||||
color: rgb(241, 229, 52);
|
||||
background-color: rgb(228, 35, 132);
|
||||
border-color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
color: rgb(0, 119, 139);
|
||||
color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: rgb(0, 171, 205);
|
||||
color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
box-shadow: 0 0 0 0.25rem rgba(0, 171, 205, 0.25);
|
||||
border-color: rgb(0, 171, 205);
|
||||
box-shadow: 0 0 0 0.25rem rgb(228 35 132 / 50%);
|
||||
border-color: rgb(228, 35, 132);
|
||||
}
|
||||
|
||||
.btn-outline-primary.focus {
|
||||
box-shadow: 0 0 0 0.25rem rgba(0, 171, 205, 0.5);
|
||||
box-shadow: 0 0 0 0.25rem rgb(228 35 132 / 10%);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
const keycodes = [32, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 106, 107, 109, 110, 111, 186, 187, 188, 189, 190, 191, 219, 220, 221, 222]
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.autocomplete').keyup(function (e) {
|
||||
const target = $('#' + e.target.id)
|
||||
@ -10,7 +12,6 @@ $(document).ready(function () {
|
||||
const input = target.val()
|
||||
target.addClass('is-invalid')
|
||||
target.removeClass('is-valid')
|
||||
$('#' + prefix + '_reset').removeClass('d-none')
|
||||
|
||||
$.getJSON(api_url + (api_url.includes('?') ? '&' : '?') + 'format=json&search=^' + input + api_url_suffix, function (objects) {
|
||||
let html = '<ul class="list-group list-group-flush" id="' + prefix + '_list">'
|
||||
@ -41,11 +42,14 @@ $(document).ready(function () {
|
||||
|
||||
if (typeof autocompleted !== 'undefined') { autocompleted(obj, prefix) }
|
||||
})
|
||||
|
||||
if (input === obj[name_field]) { $('#' + prefix + '_pk').val(obj.id) }
|
||||
})
|
||||
|
||||
if (objects.results.length === 1 && e.originalEvent.keyCode >= 32) {
|
||||
if (objects.results.length >= 2) {
|
||||
$('#' + prefix + '_pk').val(objects.results[0].id)
|
||||
}
|
||||
if (objects.results.length === 1 &&
|
||||
(keycodes.includes(e.originalEvent.keyCode) ||
|
||||
input === objects.results[0][name_field])) {
|
||||
$('#' + prefix + '_' + objects.results[0].id).trigger('click')
|
||||
}
|
||||
})
|
||||
@ -55,7 +59,6 @@ $(document).ready(function () {
|
||||
const name = $(this).attr('id').replace('_reset', '')
|
||||
$('#' + name + '_pk').val('')
|
||||
$('#' + name).val('')
|
||||
$('#' + name + '_list').html('')
|
||||
$(this).addClass('d-none')
|
||||
$('#' + name).tooltip('hide')
|
||||
})
|
||||
})
|
||||
|
@ -97,7 +97,7 @@ function displayStyle (note) {
|
||||
const balance = note.balance
|
||||
var css = ''
|
||||
var ms_per_year = 31536000000 // 365 * 24 * 3600 * 1000
|
||||
if (balance < -5000) { css += ' text-danger bg-dark' }
|
||||
if (balance < -2000) { css += ' text-danger bg-dark' }
|
||||
else if (balance < -1000) { css += ' text-danger' }
|
||||
else if (balance < 0) { css += ' text-warning' }
|
||||
if (!note.email_confirmed) { css += ' bg-primary' }
|
||||
|
Reference in New Issue
Block a user