diff --git a/accounting/static/accounting/js/account-list.js b/accounting/static/accounting/js/account-list.js new file mode 100644 index 0000000..41a52d7 --- /dev/null +++ b/accounting/static/accounting/js/account-list.js @@ -0,0 +1,29 @@ +/* The Mia Website + * account-list.js: The JavaScript for the account list + */ + +/* Copyright (c) 2019-2020 imacat. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Author: imacat@mail.imacat.idv.tw (imacat) + * First written: 2020/8/7 + */ + +// Initializes the page JavaScript. +$(function () { + $('#accounts').DataTable({ + "ordering": false, + }); +}); diff --git a/accounting/templates/accounting/account_list.html b/accounting/templates/accounting/account_list.html index a666590..a45356c 100644 --- a/accounting/templates/accounting/account_list.html +++ b/accounting/templates/accounting/account_list.html @@ -29,6 +29,7 @@ First written: 2020/7/1 {% trans "Accounts" context "Accounting" as text %} {% setvar "title" text %} {% setvar "use_datatables" True %} + {% static "accounting/js/account-list.js" as file %}{% add_js file %} {% endblock %} {% block content %} @@ -79,12 +80,4 @@ First written: 2020/7/1

{{ _("There is currently no data.")|force_escape }}

{% endif %} - - {% endblock %}