]> _ Git - cubist_cms-back.git/commitdiff
wip #5127 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 25 Feb 2022 18:51:15 +0000 (19:51 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 25 Feb 2022 18:51:15 +0000 (19:51 +0100)
src/app/Http/Controllers/CubistSelect2Controller.php
src/resources/views/fields/select2_from_array.blade.php
src/routes/cubist/backpack/select2.php

index 958eb200ffb027d44270d03e141a8ff9f5e86178..339c70994f88bd0c51c0ad94331f77e53007dab3 100644 (file)
@@ -5,7 +5,7 @@ namespace Cubist\Backpack\Http\Controllers;
 use Cubist\Backpack\Http\Controllers\Base\XSendFileController;
 use Illuminate\Support\Facades\Auth;
 
-class CubistSelect2Controller extends XSendFileController
+class CubistSelect2Controller
 {
     public function search($hash)
     {
index f9232443815f3e8904c51a38b71f77bf36c88cf7..f6c350750e9d5b37de516e88b59a6980a85bce80 100644 (file)
@@ -96,7 +96,7 @@
                         var options = {
                             theme: "bootstrap"
                         };
-                        console.log($(this));
+
                         if ($(this).is('[data-ajax]')) {
                             options.ajax = {
                                 url: '{{backpack_url('select2')}}' +'/'+ $(this).data('ajax'),
                         }
 
                         if (!$(obj).hasClass("select2-hidden-accessible")) {
-                            console.log(options);
                             $(obj).select2(options);
                         }
                     });
index 3452b6bfa94bf5fd1febca5ad7dc65283e8a37bb..22b6115a24d0e576f97e2044fcbcf728231cbdfe 100644 (file)
@@ -4,5 +4,5 @@ Route::group([
     //'prefix' => config('backpack.base.route_prefix', 'admin'),
     'middleware' => ['web', config('backpack.base.middleware_key', 'admin')],
 ], function () { // custom admin routes
-    Route::any('storage/{hash?}', '\Cubist\Backpack\Http\Controllers\CubistSelect2Controller@search')->where(['hash' => '.*']);
+    Route::any('select2/{hash}', '\Cubist\Backpack\Http\Controllers\CubistSelect2Controller@search')->where(['hash' => '.*']);
 });