diff --git a/package-lock.json b/package-lock.json index 132cd9b..7395de5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1673,6 +1673,12 @@ "jquery": ">=2.1.0" } }, + "bootstrap-multiselect": { + "version": "0.9.13-1", + "resolved": "https://registry.npmjs.org/bootstrap-multiselect/-/bootstrap-multiselect-0.9.13-1.tgz", + "integrity": "sha1-LFfO4mCxjX8BpO3Z1l8l3wQl/So=", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/package.json b/package.json index d05959a..dcad6fc 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "axios": "0.18.0", "bootstrap": "4.1.3", "bootstrap-colorpicker": "^3.0.3", + "bootstrap-multiselect": "0.9.13-1", "browser-sync": "2.26.3", "browser-sync-webpack-plugin": "2.2.2", "cross-env": "5.2.0", diff --git a/resources/js/additions.js b/resources/js/additions.js index db7fb8c..d20c175 100644 --- a/resources/js/additions.js +++ b/resources/js/additions.js @@ -1,4 +1,8 @@ +import baseTranslator from "./baseTranslator"; + $(document).ready(function () { + window.trans = baseTranslator(window.TRANSLATIONS); + Waves.attach('.btn-primary', ['waves-light']); Waves.attach('.btn-secondary', ['waves-light']); Waves.attach('.btn-success', ['waves-light']); @@ -124,4 +128,22 @@ $(document).ready(function () { theme: 'bootstrap' }); }); + + $('[data-provide="multiselect"]').multiselect({ + enableClickableOptGroups: true, + includeSelectAllOption: true, + numberDisplayed: 1, + maxHeight: 350, + buttonClass: 'btn btn-outline-secondary', + nonSelectedText: trans('multiselect.nonSelectedText'), + nSelectedText: trans('multiselect.nSelectedText'), + allSelectedText: trans('multiselect.allSelectedText'), + selectAllText: trans('multiselect.selectAllText'), + buttonContainer: ' diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 6251596..0ff6f32 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -25,6 +25,10 @@ + {{ Html::script('js/app.js') }} + + + @include('shared._javascript_config') @@ -68,9 +72,11 @@ -{{ Html::script('js/app.js') }} - @yield('scripts') + +