Merge pull request #15133 from snipe/fixes/load_english_separately_for_table_locale

Load the english file again in case BS table doesn’t have a translation
This commit is contained in:
snipe 2024-07-22 10:40:01 +01:00 committed by GitHub
commit 4623e40077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 0 deletions

Binary file not shown.

View file

@ -90,6 +90,7 @@
"/css/webfonts/fa-v4compatibility.ttf": "/css/webfonts/fa-v4compatibility.ttf?id=8994b282f9f3b7a00380bb1e2731a4bf",
"/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=111e341dba724e1df946e8d1f406a7bd",
"/js/dist/bootstrap-table-locale-all.min.js": "/js/dist/bootstrap-table-locale-all.min.js?id=7373e7d7017cceca6c32928080cea0fb",
"/js/dist/bootstrap-table-en-US.min.js": "/js/dist/bootstrap-table-en-US.min.js?id=1c7e9a79f42b6a916703f58bbce2a680",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=5f79123a6750afd34dbf565faec3dda3",
"/js/build/vendor.js": "/js/build/vendor.js?id=e27070bdbc5fce3bfd132b952d641fd6",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=e5918703a22f8992c4c98f1dbbecb8f7",

View file

@ -7,6 +7,9 @@
<script src="{{ url(mix('js/dist/bootstrap-table.js')) }}"></script>
<script src="{{ url(mix('js/dist/bootstrap-table-locale-all.min.js')) }}"></script>
<!-- load english again here, even though it's in the all.js file, because if BS table doesn't have the translation, it otherwise defaults to chinese. See https://bootstrap-table.com/docs/api/table-options/#locale -->
<script src="{{ url(mix('js/dist/bootstrap-table-en-US.min.js')) }}"></script>
<script nonce="{{ csrf_token() }}">
$(function () {

View file

@ -56,6 +56,7 @@ mix
*/
mix
.copy( './node_modules/bootstrap-table/dist/bootstrap-table-locale-all.min.js', 'public/js/dist' )
.copy( './node_modules/bootstrap-table/dist/bootstrap-table-en-US.min.js', 'public/js/dist' )
// Combine main SnipeIT JS files
mix