mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-09 16:24:39 +00:00
Remove jquery remeanants
This commit is contained in:
@@ -83,9 +83,10 @@ TODO : rewrite the pagination used in this template an Alpine one
|
|||||||
</table>
|
</table>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function formPagination(link){
|
function formPagination(link){
|
||||||
$("form").attr("action", link.href);
|
const form = document.getElementById("form")
|
||||||
|
form.action = link.href;
|
||||||
link.href = "javascript:void(0)"; // block link action
|
link.href = "javascript:void(0)"; // block link action
|
||||||
$("form").submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
|
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
|
||||||
|
@@ -32,9 +32,6 @@
|
|||||||
<script type="module" src="{{ static('bundled/country-flags-index.ts') }}"></script>
|
<script type="module" src="{{ static('bundled/country-flags-index.ts') }}"></script>
|
||||||
<script type="module" src="{{ static('bundled/core/tooltips-index.ts') }}"></script>
|
<script type="module" src="{{ static('bundled/core/tooltips-index.ts') }}"></script>
|
||||||
|
|
||||||
<!-- Jquery declared here to be accessible in every django widgets -->
|
|
||||||
<script src="{{ static('bundled/vendored/jquery.min.js') }}"></script>
|
|
||||||
|
|
||||||
{% block additional_css %}{% endblock %}
|
{% block additional_css %}{% endblock %}
|
||||||
{% block additional_js %}{% endblock %}
|
{% block additional_js %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
25
package-lock.json
generated
25
package-lock.json
generated
@@ -30,7 +30,6 @@
|
|||||||
"easymde": "^2.19.0",
|
"easymde": "^2.19.0",
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.0",
|
||||||
"htmx.org": "^2.0.3",
|
"htmx.org": "^2.0.3",
|
||||||
"jquery": "^3.7.1",
|
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"lit-html": "^3.3.0",
|
"lit-html": "^3.3.0",
|
||||||
"native-file-system-adapter": "^3.0.1",
|
"native-file-system-adapter": "^3.0.1",
|
||||||
@@ -47,7 +46,6 @@
|
|||||||
"@types/alpinejs": "^3.13.10",
|
"@types/alpinejs": "^3.13.10",
|
||||||
"@types/cytoscape-cxtmenu": "^3.4.4",
|
"@types/cytoscape-cxtmenu": "^3.4.4",
|
||||||
"@types/cytoscape-klay": "^3.1.4",
|
"@types/cytoscape-klay": "^3.1.4",
|
||||||
"@types/jquery": "^3.5.31",
|
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"vite": "^6.3.6",
|
"vite": "^6.3.6",
|
||||||
@@ -2889,16 +2887,6 @@
|
|||||||
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/jquery": {
|
|
||||||
"version": "3.5.33",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.33.tgz",
|
|
||||||
"integrity": "sha512-SeyVJXlCZpEki5F0ghuYe+L+PprQta6nRZqhONt9F13dWBtR/ftoaIbdRQ7cis7womE+X2LKhsDdDtkkDhJS6g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/sizzle": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/js-cookie": {
|
"node_modules/@types/js-cookie": {
|
||||||
"version": "3.0.6",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz",
|
||||||
@@ -2919,13 +2907,6 @@
|
|||||||
"integrity": "sha512-a79Yc3TOk6dGdituy8hmTTJXjOkZ7zsFYV10L337ttq/rec8lRMDBpV7fL3uLx6TgbFCa5DU/h8FmIBQPSbU0w==",
|
"integrity": "sha512-a79Yc3TOk6dGdituy8hmTTJXjOkZ7zsFYV10L337ttq/rec8lRMDBpV7fL3uLx6TgbFCa5DU/h8FmIBQPSbU0w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/sizzle": {
|
|
||||||
"version": "2.3.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.10.tgz",
|
|
||||||
"integrity": "sha512-TC0dmN0K8YcWEAEfiPi5gJP14eJe30TTGjkvek3iM/1NdHHsdCA/Td6GvNndMOo/iSnIsZ4HuuhrYPDAmbxzww==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/tern": {
|
"node_modules/@types/tern": {
|
||||||
"version": "0.23.9",
|
"version": "0.23.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
||||||
@@ -4384,12 +4365,6 @@
|
|||||||
"jiti": "lib/jiti-cli.mjs"
|
"jiti": "lib/jiti-cli.mjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jquery": {
|
|
||||||
"version": "3.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
|
||||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/js-cookie": {
|
"node_modules/js-cookie": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
"@types/alpinejs": "^3.13.10",
|
"@types/alpinejs": "^3.13.10",
|
||||||
"@types/cytoscape-cxtmenu": "^3.4.4",
|
"@types/cytoscape-cxtmenu": "^3.4.4",
|
||||||
"@types/cytoscape-klay": "^3.1.4",
|
"@types/cytoscape-klay": "^3.1.4",
|
||||||
"@types/jquery": "^3.5.31",
|
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"vite": "^6.3.6",
|
"vite": "^6.3.6",
|
||||||
@@ -61,7 +60,6 @@
|
|||||||
"easymde": "^2.19.0",
|
"easymde": "^2.19.0",
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.0",
|
||||||
"htmx.org": "^2.0.3",
|
"htmx.org": "^2.0.3",
|
||||||
"jquery": "^3.7.1",
|
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"lit-html": "^3.3.0",
|
"lit-html": "^3.3.0",
|
||||||
"native-file-system-adapter": "^3.0.1",
|
"native-file-system-adapter": "^3.0.1",
|
||||||
|
@@ -13,8 +13,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="pedagogy">
|
<div class="pedagogy">
|
||||||
<div id="uv_detail">
|
<div id="uv_detail">
|
||||||
<p id="return_noscript"><a href="{{ url('pedagogy:guide') }}">{% trans %}Back{% endtrans %}</a></p>
|
<button onclick='(function(){
|
||||||
<button id="return_js" onclick='(function(){
|
|
||||||
// If comes from the guide page, go back with history
|
// If comes from the guide page, go back with history
|
||||||
if (document.referrer.replace(/\?(.+)/gm,"").endsWith(`{{ url("pedagogy:guide") }}`)){
|
if (document.referrer.replace(/\?(.+)/gm,"").endsWith(`{{ url("pedagogy:guide") }}`)){
|
||||||
window.history.back();
|
window.history.back();
|
||||||
@@ -217,9 +216,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#return_noscript").hide();
|
|
||||||
$("#return_js").show();
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"types": ["jquery", "alpinejs"],
|
"types": ["alpinejs"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"#openapi": ["./staticfiles/generated/openapi/client/index.ts"],
|
"#openapi": ["./staticfiles/generated/openapi/client/index.ts"],
|
||||||
"#openapi:*": ["./staticfiles/generated/openapi/client/*"],
|
"#openapi:*": ["./staticfiles/generated/openapi/client/*"],
|
||||||
|
@@ -4,7 +4,6 @@ import inject from "@rollup/plugin-inject";
|
|||||||
import { glob } from "glob";
|
import { glob } from "glob";
|
||||||
import { type AliasOptions, type UserConfig, defineConfig } from "vite";
|
import { type AliasOptions, type UserConfig, defineConfig } from "vite";
|
||||||
import type { Rollup } from "vite";
|
import type { Rollup } from "vite";
|
||||||
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
||||||
import tsconfig from "./tsconfig.json";
|
import tsconfig from "./tsconfig.json";
|
||||||
|
|
||||||
const outDir = resolve(__dirname, "./staticfiles/generated/bundled");
|
const outDir = resolve(__dirname, "./staticfiles/generated/bundled");
|
||||||
@@ -87,17 +86,6 @@ export default defineConfig((config: UserConfig) => {
|
|||||||
Alpine: "alpinejs",
|
Alpine: "alpinejs",
|
||||||
htmx: "htmx.org",
|
htmx: "htmx.org",
|
||||||
}),
|
}),
|
||||||
viteStaticCopy({
|
|
||||||
targets: [
|
|
||||||
{
|
|
||||||
src: resolve(nodeModules, "jquery/dist/jquery.min.js"),
|
|
||||||
dest: vendored,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}),
|
|
||||||
],
|
|
||||||
optimizeDeps: {
|
|
||||||
include: ["jquery"],
|
|
||||||
},
|
|
||||||
} satisfies UserConfig;
|
} satisfies UserConfig;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user