Multi-level Treeview Menu does not work in AdminLTE

0

Problem: Home I'm using the AdminLTE 2 template (very good template!) In the project that uses the Laravel Framework . I've been able to include all the files and configure the layout to be displayed on SideBar and everything works fine. However, the child menu item that should be expandidp when the parent menu is fired, does not work, and also the minimization of the SideBar is not working. Home The following image shows the problem. When you try to open the "Subscriptions" menu or try to minimize SideBar from the / strong> These features do not work and the "#" symbol appears in the URL.

DevTools:networkandconsoletabs





Exceptions:ButifItrytominimizetheSidebarandexpandthemenuofentriesfromtheDashboardscreenthesefeaturesworkperfectly,itfollowstheimages.

SideBarminimized

Expandedregistermenu Idonotknowwhattoactuallydo.Please,Ineedsomehelp.Isearchedforadifficultsolutionforweeksandfoundnothingthatwouldhelp.

File:adminlte.phpsetstheSidebarofthetemplate

<?phpreturn[/*|--------------------------------------------------------------------------|Title|--------------------------------------------------------------------------||Thedefaulttitleofyouradminpanel,thisgoesintothetitletag|ofyourpage.Youcanoverrideitperpagewiththetitlesection.|Youcanoptionallyalsospecifyatitleprefixand/orpostfix.|*/'title'=>'','title_prefix'=>'','title_postfix'=>'',/*|--------------------------------------------------------------------------|Logo|--------------------------------------------------------------------------||Thislogoisdisplayedattheupperleftcornerofyouradminpanel.|YoucanusebasicHTMLhereifyouwant.Thelogohasalsoamini|variant,usedfortheminisidebar.Makeit3lettersorso|*/'logo'=>'<imgsrc="/img/Logo-UNION.png" alt="Union"  height="40px" width="70px">',

    // 'logo_mini' => É exibido quando o menu é minimizado
     'logo_mini' => '<img src="/img/Icon-UNION.png" alt="Union"  height="35px" width="25px">',


    /*
    |--------------------------------------------------------------------------
    | Skin Color
    |--------------------------------------------------------------------------
    |
    | Choose a skin color for your admin panel. The available skin colors:
    | blue, black, purple, yellow, red, and green. Each skin also has a
    | ligth variant: blue-light, purple-light, purple-light, etc.
    |
    */

    'skin' => 'blue',

    /*
    |--------------------------------------------------------------------------
    | Layout
    |--------------------------------------------------------------------------
    |
    | Choose a layout for your admin panel. The available layout options:
    | null, 'boxed', 'fixed', 'top-nav'. null is the default, top-nav
    | removes the sidebar and places your menu in the top navbar
    |
    */

    'layout' => null,

    /*
    |--------------------------------------------------------------------------
    | Collapse Sidebar
    |--------------------------------------------------------------------------
    |
    | Here we choose and option to be able to start with a collapsed side
    | bar. To adjust your sidebar layout simply set this  either true
    | this is compatible with layouts except top-nav layout option
    |
    */

    'collapse_sidebar' => false,

    /*
    |--------------------------------------------------------------------------
    | URLs
    |--------------------------------------------------------------------------
    |
    | Register here your dashboard, logout, login and register URLs. The
    | logout URL automatically sends a POST request in Laravel 5.3 or higher.
    | You can set the request to a GET or POST with logout_method.
    | Set register_url to null if you don't want a register link.
    |
    */

    'dashboard_url' => 'dashboard',

    'logout_url' => 'logout',

    'logout_method' => null,

    'login_url' => 'login',

    'register_url' => 'register',

    /*
    |--------------------------------------------------------------------------
    | Menu Items
    |--------------------------------------------------------------------------
    |
    | Specify your menu items to display in the left sidebar. Each menu item
    | should have a text and and a URL. You can also specify an icon from
    | Font Awesome. A string instead of an array represents a header in sidebar
    | layout. The 'can' is a filter on Laravel's built in Gate functionality.
    |
    */

    'menu' => [
        'PRINCIPAL',

        [
            'text'        => 'Dashboard',
            'url'         => 'dashboard',
            'icon'        => 'tachometer',
            // 'label'       => ,
           // 'label_color' => 'success',
        ],
        'ADMINISTRATIVO',
        [
            'text' => 'Projetos',
            'url'  => 'projetos/projeto',
            'icon' => 'archive',
        ],
        'CADASTROS',
        [
            'text' => 'Cadastros',
            'icon' => 'file',
            'submenu' => [
                [
                    'text' => 'Categoria do Instrumento',
                    'url'  => 'categoriaInstrumentos/categoriaInstrumento',
                ],
                [
                    'text'  => 'Checklist de Modelos',
                    'url'   => 'checklistsModelos/checklistModelo',
                ],
                [
                    'text'  => 'Checklist de Itens',
                    'url'   => 'checklistsItens/checklistItem',
                ],
              /*   [
                    'text'  => 'Checklist de Estrutura',
                    'url'   => 'checklistsEstruturas/checklistEstrutura',
                ], */
                [
                    'text'  => 'Elemento de Despesa',
                    'url'   => 'elementosDespesas/elementoDespesa',
                ],
                [
                    'text'  => 'Fonte de Recurso',
                    'url'   => 'fontesRecursos/fonteRecurso',
                ],
                [
                    'text'  => 'Localidade',
                    'url'   => 'localidades/localidade',
                ],
                [
                    'text'  => 'Modalidade de Apoio',
                    'url'   => 'modalidadesApoios/modalidadeApoio',
                ],
                [
                    'text'  => 'Modalidade de Licitação',
                    'url'   => 'modalidadesLicitacoes/modalidadeLicitacao',
                ],
                [
                    'text'  => 'País',
                    'url'   => 'paises/pais',
                ],
                [
                    'text'  => 'Projeto de Atividade',
                    'url'   => 'projetosAtividades/projetoAtividade',
                ],
                [
                    'text'  => 'Proponente',
                    'url'   => 'proponentes/proponente',
                ],
                [
                    'text'  => 'Contatos do Proponente',
                    'url'   => 'contatosProponentes/contatoProponente',
                ], 
                [
                    'text'  => 'Setor',
                    'url'   => 'setores/setor',
                ],
                [
                    'text'  => 'Território Turístico',
                    'url'   => 'territoriosTuristicos/territorioTuristico',
                ],
                [
                    'text'  => 'Tipo de Projetos (Eventos)',
                    'url'   => 'tiposProjetos/tipoProjeto',
                ],
                [
                    'text'  => 'UF',
                    'url'   => 'ufs/uf',
                ],
                [
                    'text'  => 'Zona Turística',
                    'url'   => 'zonasTuristicas/zonaTuristica',
                ],


            ],
        ],
        'CONTROLE DE ACESSO',
        [   'text' => 'Controle de Acesso',
            'icon' => 'users',
            'submenu' => [
            [
                'text'       => 'Usuários',
                'url'         => 'usuarios/usuario',
                'icon_color' => 'red',
            ],
            [
                'text'       => 'Perfis',
                'url'         => 'perfis-usuarios/role',
                'icon_color' => 'yellow',
            ],
            [
                'text'       => 'Rotas',
                'url'         => 'rotas/rota',
                'icon_color' => 'aqua',
            ],
            ]],
    ],

    /*
    |--------------------------------------------------------------------------
    | Menu Filters
    |--------------------------------------------------------------------------
    |
    | Choose what filters you want to include for rendering the menu.
    | You can add your own filters to this array after you've created them.
    | You can comment out the GateFilter if you don't want to use Laravel's
    | built in Gate functionality
    |
    */

    'filters' => [
        JeroenNoten\LaravelAdminLte\Menu\Filters\HrefFilter::class,
        JeroenNoten\LaravelAdminLte\Menu\Filters\ActiveFilter::class,
        JeroenNoten\LaravelAdminLte\Menu\Filters\SubmenuFilter::class,
        JeroenNoten\LaravelAdminLte\Menu\Filters\ClassesFilter::class,
        JeroenNoten\LaravelAdminLte\Menu\Filters\GateFilter::class,
    ],

    /*
    |--------------------------------------------------------------------------
    | Plugins Initialization
    |--------------------------------------------------------------------------
    |
    | Choose which JavaScript plugins should be included. At this moment,
    | only DataTables is supported as a plugin. Set the value to true
    | to include the JavaScript file from a CDN via a script tag.
    |
    */

    'plugins' => [
        'datatables' => true,
        'select2'    => true,
        'chartjs'    => true,
    ],
];
    
asked by anonymous 24.07.2018 / 19:41

0 answers