diff --git a/.env.example b/.env.example index f8e1df2987..fd90391973 100644 --- a/.env.example +++ b/.env.example @@ -86,6 +86,7 @@ COOKIE_DOMAIN=null SECURE_COOKIES=false API_TOKEN_EXPIRATION_YEARS=15 BS_TABLE_STORAGE=cookieStorage +BS_TABLE_DEEPLINK=true # -------------------------------------------- # OPTIONAL: SECURITY HEADER SETTINGS diff --git a/config/session.php b/config/session.php index a47294a8cb..5c6cb27a9f 100644 --- a/config/session.php +++ b/config/session.php @@ -174,4 +174,17 @@ return [ 'bs_table_storage' => env('BS_TABLE_STORAGE', 'cookieStorage'), + + /* + |-------------------------------------------------------------------------- + | Bootstrap Table Enable Deeplinking + |-------------------------------------------------------------------------- + | + | Use deeplinks to directly link to search results, sorting, and pagination + | + | More info: https://github.com/generals-space/bootstrap-table-addrbar/blob/master/readme(EN).md + */ + + 'bs_table_addrbar' => env('BS_TABLE_DEEPLINK', true), + ]; diff --git a/public/js/dist/bootstrap-table.js b/public/js/dist/bootstrap-table.js index dd852390a4..fe5299fca7 100644 Binary files a/public/js/dist/bootstrap-table.js and b/public/js/dist/bootstrap-table.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index bb0fd7243b..9431a73c3c 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -31,7 +31,7 @@ "/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=e11465c0eff0549edd4e8ea6bbcf242f", "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=99c395f0bab5966f32f63f4e55899e64", "/js/build/vendor.js": "/js/build/vendor.js?id=a2b971da417306a63385c8098acfe4af", - "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=d0eb38da8b772a21b827b7df208dc4fe", + "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=47596e30f56a42f12175ac54592d0912", "/js/dist/all.js": "/js/dist/all.js?id=fca6ea9956fd827d9790c08e0e982b22", "/js/dist/all-defer.js": "/js/dist/all-defer.js?id=19ccc62a8f1ea103dede4808837384d4", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=b48f4d8af0e1ca5621c161e93951109f", diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index b4f47c6a3c..a3d6b6df2d 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -58,6 +58,7 @@ maintainSelected: true, trimOnSearch: false, showSearchClearButton: true, + addrbar: {{ (config('session.bs_table_addrbar') == 'true') ? 'true' : 'false'}}, // deeplink search phrases, sorting, etc paginationFirstText: "{{ trans('general.first') }}", paginationLastText: "{{ trans('general.last') }}", paginationPreText: "{{ trans('general.previous') }}", diff --git a/webpack.mix.js b/webpack.mix.js index fdda6618ab..0b5e2ed3ee 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -188,6 +188,7 @@ mix './node_modules/bootstrap-table/dist/extensions/export/bootstrap-table-export.js', './node_modules/bootstrap-table/dist/extensions/cookie/bootstrap-table-cookie.js', './node_modules/bootstrap-table/dist/extensions/sticky-header/bootstrap-table-sticky-header.js', + './node_modules/bootstrap-table/dist/extensions/addrbar/bootstrap-table-addrbar.js', './resources/assets/js/extensions/jquery.base64.js', './node_modules/tableexport.jquery.plugin/tableExport.min.js', './node_modules/tableexport.jquery.plugin/libs/jsPDF/jspdf.umd.min.js',