forked from Github-Mirrors/canaille
Removed datatables
This commit is contained in:
parent
52e0cd3615
commit
5549558366
18 changed files with 18 additions and 191 deletions
|
@ -21,6 +21,11 @@ Fixed
|
|||
- Client deletion also deletes related Consent, Token and
|
||||
AuthorizationCode objects. :issue:`126` :pr:`98`
|
||||
|
||||
Changed
|
||||
*******
|
||||
|
||||
- Removed datatables.
|
||||
|
||||
[0.0.20] - 2023-01-28
|
||||
=====================
|
||||
|
||||
|
|
|
@ -91,10 +91,7 @@ def setup_logging(app):
|
|||
|
||||
|
||||
def setup_jinja(app):
|
||||
from .flaskutils import timestamp
|
||||
|
||||
app.jinja_env.filters["len"] = len
|
||||
app.jinja_env.filters["timestamp"] = timestamp
|
||||
|
||||
|
||||
def setup_themer(app):
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import datetime
|
||||
import logging
|
||||
from functools import wraps
|
||||
from urllib.parse import urlsplit
|
||||
|
@ -78,10 +77,6 @@ def smtp_needed():
|
|||
return wrapper
|
||||
|
||||
|
||||
def timestamp(dt):
|
||||
return datetime.datetime.timestamp(dt)
|
||||
|
||||
|
||||
def set_parameter_in_url_query(url, **kwargs):
|
||||
split = list(urlsplit(url))
|
||||
pairs = split[3].split("&")
|
||||
|
|
|
@ -96,20 +96,20 @@ i.massive.massive.massive.portrait.icon, i.massive.massive.massive.portrait.icon
|
|||
body, .ui.info.message .header, .ui.input, .ui.toggle.checkbox label, .ui.header, .ui.form .field > label, .ui.list .list > .item > .content, .ui.list > .item > .content, .ui.card, .ui.cards > .card, .ui.card .bottom.button:hover, .ui.card .bottom.button:focus {
|
||||
color: rgba(255,255,255,.87);
|
||||
}
|
||||
.ui.card .bottom, .ui.link.menu .item, .ui.menu .dropdown.item, .ui.menu .link.item, .ui.menu a.item, .ui.icon.menu .item, .ui.header .sub.header, .ui.label, table.dataTable tbody tr td, .ui.card .bottom.button:hover, .ui.card .bottom.button:focus {
|
||||
.ui.card .bottom, .ui.link.menu .item, .ui.menu .dropdown.item, .ui.menu .link.item, .ui.menu a.item, .ui.icon.menu .item, .ui.header .sub.header, .ui.label, table tbody tr td, .ui.card .bottom.button:hover, .ui.card .bottom.button:focus {
|
||||
color: rgba(255,255,255,.7);
|
||||
}
|
||||
.ui.selection.dropdown, .ui.form input:not([type]), .ui.form input[type="date"], .ui.form input[type="datetime-local"], .ui.form input[type="email"], .ui.form input[type="file"], .ui.form input[type="number"], .ui.form input[type="password"], .ui.form input[type="search"], .ui.form input[type="tel"], .ui.form input[type="text"], .ui.form input[type="time"], .ui.form input[type="url"] {
|
||||
background: #222222 !important;
|
||||
color: rgba(255,255,255,.87) !important;
|
||||
}
|
||||
table.dataTable tbody tr td .ui.label:hover {
|
||||
table tbody tr td .ui.label:hover {
|
||||
color: #353535 !important;
|
||||
}
|
||||
.ui.corner.label {
|
||||
border-color: rgba(0,0,0,.2);
|
||||
}
|
||||
.ui.label, table.dataTable tbody tr td, .ui.card .bottom.button:hover, .ui.card .bottom.button:focus {
|
||||
.ui.label, table tbody tr td, .ui.card .bottom.button:hover, .ui.card .bottom.button:focus {
|
||||
background-color: #353535;
|
||||
}
|
||||
.ui.basic.negative.button, .ui.basic.negative.buttons .button {
|
||||
|
@ -119,38 +119,22 @@ i.massive.massive.massive.portrait.icon, i.massive.massive.massive.portrait.icon
|
|||
.ui.link.menu .item:hover, .ui.menu .dropdown.item:hover, .ui.menu .link.item:hover, .ui.menu a.item:hover, .ui.menu a.item.active:hover {
|
||||
color: rgba(255,255,255,.95);
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate {
|
||||
color: rgba(255,255,255,.7) !important;
|
||||
}
|
||||
.ui.attached.header, .ui.toggle.checkbox label::before, .ui.table > thead > tr > th, table.dataTable tbody tr td .ui.label, .ui.card, .ui.cards > .card, .ui.message, .ui.info.message, .ui.success.message {
|
||||
.ui.attached.header, .ui.toggle.checkbox label::before, .ui.table > thead > tr > th, table tbody tr td .ui.label, .ui.card, .ui.cards > .card, .ui.message, .ui.info.message, .ui.success.message {
|
||||
background-color: #282828;
|
||||
color: rgba(255,255,255,.87) !important;
|
||||
}
|
||||
table.dataTable tbody tr td {
|
||||
table tbody tr td {
|
||||
color: rgba(255,255,255,.87) !important;
|
||||
}
|
||||
table.dataTable tbody tr td .ui.label:hover {
|
||||
table tbody tr td .ui.label:hover {
|
||||
background-color: rgba(255,255,255,.87);
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||
border:none !important;
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate a.paginate_button.item {
|
||||
color: rgba(255,255,255,.7) !important;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
|
||||
color: rgba(255,255,255,.4) !important;
|
||||
}
|
||||
table.dataTable.no-footer, .ui.table {
|
||||
table.no-footer, .ui.table {
|
||||
border: 2px solid #282828;
|
||||
}
|
||||
.ui.table, .ui.card .header, .ui.card .description, .ui.message, .ui.info.message, .ui.success.message, .ui.toggle.checkbox {
|
||||
color: rgba(255,255,255,.87) !important;
|
||||
}
|
||||
.dataTables_wrapper .ui.input input {
|
||||
background-color: #353535 !important;
|
||||
}
|
||||
.ui.card, .ui.cards > .card {
|
||||
border: 2px solid #222222;
|
||||
outline: none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +0,0 @@
|
|||
/*! DataTables Bootstrap 3 integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
!function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,a){return e=e||window,(a=a||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,a),t(a,0,e.document)}:t(jQuery,window,document)}(function(v,e,i,n){"use strict";var d=v.fn.dataTable;return v.extend(!0,d.defaults,{dom:"<'ui stackable grid'<'row'<'eight wide column'l><'right aligned eight wide column'f>><'row dt-table'<'sixteen wide column'tr>><'row'<'seven wide column'i><'right aligned nine wide column'p>>>",renderer:"semanticUI"}),v.extend(d.ext.classes,{sWrapper:"dataTables_wrapper dt-semanticUI",sFilter:"dataTables_filter ui input",sProcessing:"dataTables_processing ui segment",sPageButton:"paginate_button item"}),d.ext.renderer.pageButton.semanticUI=function(r,e,o,a,l,u){function c(e,a){for(var t,i=function(e){e.preventDefault(),v(e.currentTarget).hasClass("disabled")||b.page()==e.data.action||b.page(e.data.action).draw("page")},n=0,d=a.length;n<d;n++)if(t=a[n],Array.isArray(t))c(e,t);else{switch(p=f="",t){case"ellipsis":f="…",p="disabled";break;case"first":f=m.sFirst,p=t+(0<l?"":" disabled");break;case"previous":f=m.sPrevious,p=t+(0<l?"":" disabled");break;case"next":f=m.sNext,p=t+(l<u-1?"":" disabled");break;case"last":f=m.sLast,p=t+(l<u-1?"":" disabled");break;default:f=t+1,p=l===t?"active":""}var s=-1===p.indexOf("disabled")?"a":"div";f&&(s=v("<"+s+">",{class:g.sPageButton+" "+p,id:0===o&&"string"==typeof t?r.sTableId+"_"+t:null,href:"#","aria-controls":r.sTableId,"aria-label":w[t],"data-dt-idx":t,tabindex:r.iTabIndex}).html(f).appendTo(e),r.oApi._fnBindAction(s,{action:t},i))}}var f,p,t,b=new d.Api(r),g=r.oClasses,m=r.oLanguage.oPaginate,w=r.oLanguage.oAria.paginate||{};try{t=v(e).find(i.activeElement).data("dt-idx")}catch(e){}c(v(e).empty().html('<div class="ui stackable pagination menu"/>').children(),a),t!==n&&v(e).find("[data-dt-idx="+t+"]").trigger("focus")},v(i).on("init.dt",function(e,a){"dt"===e.namespace&&(e=new v.fn.dataTable.Api(a),v.fn.dropdown&&v("div.dataTables_length select",e.table().container()).dropdown(),v("div.dataTables_filter.ui.input",e.table().container()).removeClass("input").addClass("form"),v("div.dataTables_filter input",e.table().container()).wrap('<span class="ui input" />'))}),d});
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
|
||||
{
|
||||
"sEmptyTable": "No data available in the table",
|
||||
"sInfo": "Showing element _START_ to _END_ from _TOTAL_ elements",
|
||||
"sInfoEmpty": "Showing element 0 to 0 from 0 elements",
|
||||
"sInfoFiltered": "(filtered from _MAX_ elements in total)",
|
||||
"sInfoPostFix": "",
|
||||
"sInfoThousands": ",",
|
||||
"sLengthMenu": "Show _MENU_ elements",
|
||||
"sLoadingRecords": "Loading...",
|
||||
"sProcessing": "Processing...",
|
||||
"sSearch": "Search :",
|
||||
"sZeroRecords": "No matching items found",
|
||||
"oPaginate": {
|
||||
"sFirst": "First",
|
||||
"sLast": "Last",
|
||||
"sNext": "Next",
|
||||
"sPrevious": "Previous"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": activate to sort the column in ascending order",
|
||||
"sSortDescending": ": activate to sort the column in descending order"
|
||||
},
|
||||
"select": {
|
||||
"rows": {
|
||||
"_": "%d lines selected",
|
||||
"0": "No lines selected",
|
||||
"1": "1 line selected"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
|
||||
{
|
||||
"sEmptyTable": "No hay datos disponibles en la tabla",
|
||||
"sInfo": "Mostrando del elemento _START_ al _END_ de _TOTAL_ elementos",
|
||||
"sInfoEmpty": "Mostrando del elemento 0 al 0 de 0 elementos",
|
||||
"sInfoFiltered": "(filtrado a partir de _MAX_ elementos en total)",
|
||||
"sInfoPostFix": "",
|
||||
"sInfoThousands": " ",
|
||||
"sLengthMenu": "Mostrar _MENU_ elementos",
|
||||
"sLoadingRecords": "Cargando...",
|
||||
"sProcessing": "Procesando...",
|
||||
"sSearch": "Buscar :",
|
||||
"sZeroRecords": "No se encontraron resultados",
|
||||
"oPaginate": {
|
||||
"sFirst": "Primero",
|
||||
"sLast": "Último",
|
||||
"sNext": "Siguiente",
|
||||
"sPrevious": "Anterior"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": activar para ordenar la columna en orden ascendente",
|
||||
"sSortDescending": ": activar para ordenar la columna en orden descendente"
|
||||
},
|
||||
"select": {
|
||||
"rows": {
|
||||
"_": "%d líneas seleccionadas",
|
||||
"0": "No hay líneas seleccionadas",
|
||||
"1": "1 línea seleccionada"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
|
||||
{
|
||||
"sEmptyTable": "Aucune donnée disponible dans le tableau",
|
||||
"sInfo": "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments",
|
||||
"sInfoEmpty": "Affichage de l'élément 0 à 0 sur 0 élément",
|
||||
"sInfoFiltered": "(filtré à partir de _MAX_ éléments au total)",
|
||||
"sInfoPostFix": "",
|
||||
"sInfoThousands": ",",
|
||||
"sLengthMenu": "Afficher _MENU_ éléments",
|
||||
"sLoadingRecords": "Chargement...",
|
||||
"sProcessing": "Traitement...",
|
||||
"sSearch": "Rechercher :",
|
||||
"sZeroRecords": "Aucun élément correspondant trouvé",
|
||||
"oPaginate": {
|
||||
"sFirst": "Premier",
|
||||
"sLast": "Dernier",
|
||||
"sNext": "Suivant",
|
||||
"sPrevious": "Précédent"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
|
||||
"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
|
||||
},
|
||||
"select": {
|
||||
"rows": {
|
||||
"_": "%d lignes sélectionnées",
|
||||
"0": "Aucune ligne sélectionnée",
|
||||
"1": "1 ligne sélectionnée"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,4 @@
|
|||
$( function () {
|
||||
$('table').DataTable({
|
||||
"language": {
|
||||
"url": "/static/datatables/i18n/" + document.documentElement.lang + ".json"
|
||||
}
|
||||
});
|
||||
|
||||
$('.delete-user').click(function(event){
|
||||
event.preventDefault();
|
||||
var that = this;
|
||||
|
|
|
@ -2,14 +2,7 @@
|
|||
{% import 'macro/fomanticui.html' as sui %}
|
||||
{% import 'userlist.html' as user_list %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/confirm.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
{% extends theme('base.html') %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<table class="ui table" data-order="[[ 3, "desc" ]]">
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-orderable="false">{% trans %}Code{% endtrans %}</th>
|
||||
<th>{% trans %}Code{% endtrans %}</th>
|
||||
<th>{% trans %}Client{% endtrans %}</th>
|
||||
<th>{% trans %}Subject{% endtrans %}</th>
|
||||
<th>{% trans %}Created{% endtrans %}</th>
|
||||
|
@ -28,7 +21,7 @@
|
|||
<td><a href="{{ url_for('oidc.authorizations.view', authorization_id=authorization.authorization_code_id) }}">{{ authorization.authorization_code_id }}</a></td>
|
||||
<td><a href="{{ url_for('oidc.clients.edit', client_id=authorization.client_id) }}">{{ authorization.client_id }}</a></td>
|
||||
<td>{{ authorization.subject }}</td>
|
||||
<td data-order="{{ authorization.issue_date|timestamp }}">{{ authorization.issue_date }}</td>
|
||||
<td>{{ authorization.issue_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{% extends theme('base.html') %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
{% extends theme('base.html') %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<table class="ui table" data-order="[[ 3, "desc" ]]">
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-orderable="false">{% trans %}Token{% endtrans %}</th>
|
||||
<th>{% trans %}Token{% endtrans %}</th>
|
||||
<th>{% trans %}Client{% endtrans %}</th>
|
||||
<th>{% trans %}Subject{% endtrans %}</th>
|
||||
<th>{% trans %}Created{% endtrans %}</th>
|
||||
|
@ -40,7 +33,7 @@
|
|||
{{ token.subject.uid[0] }}
|
||||
</a>
|
||||
</td>
|
||||
<td data-order="{{ token.issue_date|timestamp }}">{{ token.issue_date }}</td>
|
||||
<td>{{ token.issue_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{% extends theme('base.html') %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
{% extends theme('base.html') %}
|
||||
{% import 'userlist.html' as user_list %}
|
||||
|
||||
{% block style %}
|
||||
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
|
||||
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
|
||||
<script src="/static/js/users.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue