diff --git a/app/Http/Transformers/SelectlistTransformer.php b/app/Http/Transformers/SelectlistTransformer.php index 26eb7e18e3..f3fd8c3cea 100644 --- a/app/Http/Transformers/SelectlistTransformer.php +++ b/app/Http/Transformers/SelectlistTransformer.php @@ -32,12 +32,6 @@ class SelectlistTransformer } - // This is weird and awful, but the only way I can find to allow the user to - // clear the selection - @snipe - if (count($items_array) > 0) { - array_unshift($items_array, ['id' =>'', 'text'=> trans('general.clear_selection')]); - } - $results = [ 'items' => $items_array, 'pagination' => diff --git a/public/css/AdminLTE.css.map b/public/css/AdminLTE.css.map index 8edbdcc79f..311c875fa8 100644 Binary files a/public/css/AdminLTE.css.map and b/public/css/AdminLTE.css.map differ diff --git a/public/css/app.css.map b/public/css/app.css.map index 95ae4d6a82..051d67395d 100644 Binary files a/public/css/app.css.map and b/public/css/app.css.map differ diff --git a/public/css/overrides.css.map b/public/css/overrides.css.map index 7c74906ef6..dfc414f418 100644 Binary files a/public/css/overrides.css.map and b/public/css/overrides.css.map differ diff --git a/public/js/build/all.js b/public/js/build/all.js index 443defcd9b..9ba94e474f 100644 Binary files a/public/js/build/all.js and b/public/js/build/all.js differ diff --git a/public/js/build/vue.js b/public/js/build/vue.js index 8cbfb2baed..f27c653cc5 100644 Binary files a/public/js/build/vue.js and b/public/js/build/vue.js differ diff --git a/public/js/build/vue.js.map b/public/js/build/vue.js.map index 68e3c12289..3980d333ee 100644 Binary files a/public/js/build/vue.js.map and b/public/js/build/vue.js.map differ diff --git a/public/js/dist/all.js b/public/js/dist/all.js index 443defcd9b..9ba94e474f 100644 Binary files a/public/js/dist/all.js and b/public/js/dist/all.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index ed83c4f9b0..c0f8bd84de 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,14 +1,14 @@ { - "/js/build/vue.js": "/js/build/vue.js?id=5eab4676dde73dbab3ca", + "/js/build/vue.js": "/js/build/vue.js?id=832c22cb5b66ac81ed06", "/css/AdminLTE.css": "/css/AdminLTE.css?id=5e72463a66acbcc740d5", "/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405", "/css/overrides.css": "/css/overrides.css?id=2d81c3704393bac77011", - "/js/build/vue.js.map": "/js/build/vue.js.map?id=525260f84ea83d4b55cd", - "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6", - "/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72", - "/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b", + "/js/build/vue.js.map": "/js/build/vue.js.map?id=66ce10b11abd9159c4f7", + "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=0be7790b84909dca6a0a", + "/css/app.css.map": "/css/app.css.map?id=96b5c985e860716e6a16", + "/css/overrides.css.map": "/css/overrides.css.map?id=f7ce9ca49027594ac402", "/css/dist/all.css": "/css/dist/all.css?id=98db4e9b7650453c8b00", - "/js/dist/all.js": "/js/dist/all.js?id=85c7dab4c75f53c45b91", + "/js/dist/all.js": "/js/dist/all.js?id=8b3cca34ec5a6828bcee", "/css/build/all.css": "/css/build/all.css?id=98db4e9b7650453c8b00", - "/js/build/all.js": "/js/build/all.js?id=85c7dab4c75f53c45b91" + "/js/build/all.js": "/js/build/all.js?id=8b3cca34ec5a6828bcee" } \ No newline at end of file diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index c5cb77cb5a..42880598a9 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -193,6 +193,13 @@ $(document).ready(function () { link.select2({ + /** + * Adds an empty placeholder, allowing every select2 instance to be cleared. + * This placeholder can be overridden with the "data-placeholder" attribute. + */ + placeholder: '', + allowClear: true, + ajax: { // the baseUrl includes a trailing slash diff --git a/resources/views/partials/forms/edit/asset-select.blade.php b/resources/views/partials/forms/edit/asset-select.blade.php index d3e4dfa2cc..bcd074f333 100644 --- a/resources/views/partials/forms/edit/asset-select.blade.php +++ b/resources/views/partials/forms/edit/asset-select.blade.php @@ -2,14 +2,16 @@