Besoin d'aide ?

Problème avec datables

  • Avatar de yndinga
    Membre depuis :
    27/11/2018
    Messages :
    3

    Bonjour, je suis un projet de gestion scolaire, j'ai un problème avec la datables qui ne fonction, je vous mets mon code ici:

    Fichier master.blade.php
    <!DOCTYPE html>

    GESTION SECOLAIRE
    @yield('content')

    la vue:

    @extends('theme.master')

    @section('content')

    My Users

    # First Name Last Name Username
    1 Hardik Savani @mdo
    2 Kashiyani Vimal @fat
    3 Harshad Pathak @twitter

    @endsection

    le champ recherche ne sort pas

    et si je copie le master dans la vue il marche: pouvez-vous m'aidez merci.

  • Avatar de MaitrePylos
    Membre depuis :
    27/05/2013
    Messages :
    231

    Le jquery est-il activé ? Là vous nous montrer rien.
    allez sur votre page et faites ctrl + u pour avoir le bon code généré.

  • Avatar de yndinga
    Membre depuis :
    27/11/2018
    Messages :
    3

    Oui il est bien générer voicle le résultat:

    <!-- Bootstrap Core CSS -->

    <link href="http://application.test:8080/theme/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->

    <link href="http://application.test:8080/theme/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->

    <link href="http://application.test:8080/theme/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <!-- Custom Fonts -->

    <link href="http://application.test:8080/theme/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- DataTables CSS -->
    <link href="http://application.test:8080/theme/vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="http://application.test:8080/theme/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

    My Users

    # First Name Last Name Username
    1 Hardik Savani @mdo
    2 Kashiyani Vimal @fat
    3 Harshad Pathak @twitter
  • Avatar de yndinga
    Membre depuis :
    27/11/2018
    Messages :
    3
    <!DOCTYPE html>

    <html lang="en">

    <head>

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">

    <meta name="author" content="">

    <title>SB Admin 2 - Bootstrap Admin Theme</title>

    <!-- Bootstrap Core CSS -->

    <link href="http://application.test:8080/theme/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->

    <link href="http://application.test:8080/theme/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->

    <link href="http://application.test:8080/theme/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->

    <!-- <link href="http://application.test:8080/theme/vendor/morrisjs/morris.css" rel="stylesheet"> -->

    <!-- Custom Fonts -->

    <link href="http://application.test:8080/theme/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- DataTables CSS -->
    <link href="http://application.test:8080/theme/vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="http://application.test:8080/theme/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

    <script type="text/javascript" src="http://ff.kis.v2.scr.kaspersky-labs.com/4F780F9B-A6B1-9247-A321-DFBE751B3C64/main.js" charset="UTF-8"></script></head>

    <body>

    <div id="wrapper">

    <!-- Navigation -->

    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">

    <div class="navbar-header">

    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

    <span class="sr-only">Toggle navigation</span>

    <span class="icon-bar"></span>

    <span class="icon-bar"></span>

    <span class="icon-bar"></span>

    </button>

    <a class="navbar-brand" href="index.html">SB Admin v2.0</a>

    </div>

    <!-- /.navbar-header -->

    <ul class="nav navbar-top-links navbar-right">

    <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#">

    <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>

    </a>

    <ul class="dropdown-menu dropdown-messages">

    <li>

    <a href="#">

    <div>

    <strong>John Smith</strong>

    <span class="pull-right text-muted">

    <em>Yesterday</em>

    </span>

    </div>

    <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>

    </a>

    </li>

    <li class="divider"></li>

    <li>

    <a class="text-center" href="#">

    <strong>Read All Messages</strong>

    <i class="fa fa-angle-right"></i>

    </a>

    </li>

    </ul>

    <!-- /.dropdown-messages -->

    </li>

    <!-- /.dropdown -->

    <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#">

    <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>

    </a>

    <ul class="dropdown-menu dropdown-tasks">

    <li>

    <a href="#">

    <div>

    <p>

    <strong>Task 4</strong>

    <span class="pull-right text-muted">80% Complete</span>

    </p>

    <div class="progress progress-striped active">

    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">

    <span class="sr-only">80% Complete (danger)</span>

    </div>

    </div>

    </div>

    </a>

    </li>

    <li class="divider"></li>

    <li>

    <a class="text-center" href="#">

    <strong>See All Tasks</strong>

    <i class="fa fa-angle-right"></i>

    </a>

    </li>

    </ul>

    <!-- /.dropdown-tasks -->

    </li>

    <!-- /.dropdown -->

    <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#">

    <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>

    </a>

    <ul class="dropdown-menu dropdown-alerts">

    <li>

    <a href="#">

    <div>

    <i class="fa fa-upload fa-fw"></i> Server Rebooted

    <span class="pull-right text-muted small">4 minutes ago</span>

    </div>

    </a>

    </li>

    <li class="divider"></li>

    <li>

    <a class="text-center" href="#">

    <strong>See All Alerts</strong>

    <i class="fa fa-angle-right"></i>

    </a>

    </li>

    </ul>

    <!-- /.dropdown-alerts -->

    </li>

    <!-- /.dropdown -->

    <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#">

    <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>

    </a>

    <ul class="dropdown-menu dropdown-user">

    <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>

    </li>

    <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>

    </li>

    <li class="divider"></li>

    <li><a href="login.html"><i class="fa fa-sign-out fa-fw"></i> Logout</a>

    </li>

    </ul>

    <!-- /.dropdown-user -->

    </li>

    <!-- /.dropdown -->

    </ul>

    <!-- /.navbar-top-links -->
    <div class="navbar-default sidebar" role="navigation">

    <div class="sidebar-nav navbar-collapse">

    <ul class="nav" id="side-menu">

    <li class="sidebar-search">

    <div class="input-group custom-search-form">

    <input type="text" class="form-control" placeholder="Search...">

    <span class="input-group-btn">

    <button class="btn btn-default" type="button">

    <i class="fa fa-search"></i>

    </button>

    </span>

    </div>

    <!-- /input-group -->

    </li>

    <li>

    <a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>

    </li>

    <li>

    <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>

    <ul class="nav nav-second-level">

    <li>

    <a href="flot.html">Flot Charts</a>

    </li>

    <li>

    <a href="morris.html">Morris.js Charts</a>

    </li>

    </ul>

    <!-- /.nav-second-level -->

    </li>

    <li>

    <a href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>

    </li>

    <li>

    <a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>

    </li>

    <li>

    <a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>

    <ul class="nav nav-second-level">

    <li>

    <a href="panels-wells.html">Panels and Wells</a>

    </li>

    </ul>

    <!-- /.nav-second-level -->

    </li>

    <li>

    <a href="#"><i class="fa fa-files-o fa-fw"></i> Sample Pages<span class="fa arrow"></span></a>

    <ul class="nav nav-second-level">

    <li>

    <a href="blank.html">Blank Page</a>

    </li>

    <li>

    <a href="login.html">Login Page</a>

    </li>

    </ul>

    <!-- /.nav-second-level -->

    </li>

    </ul>

    </div>

    <!-- /.sidebar-collapse -->

    </div>

    <!-- /.navbar-static-side -->
    </nav>

    <div id="page-wrapper">

    <div class="row">

    <div class="col-lg-12">

    <h1 class="page-header">My Users</h1>
    <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">

    <thead>

    <tr>

    <th>#</th>

    <th>First Name</th>

    <th>Last Name</th>

    <th>Username</th>

    </tr>

    </thead>

    <tbody>

    <tr>

    <td>1</td>

    <td>Hardik</td>

    <td>Savani</td>

    <td>@mdo</td>

    </tr>

    <tr>

    <td>2</td>

    <td>Kashiyani</td>

    <td>Vimal</td>

    <td>@fat</td>

    </tr>

    <tr>

    <td>3</td>

    <td>Harshad</td>

    <td>Pathak</td>

    <td>@twitter</td>

    </tr>

    </tbody>

    </table>

    <script>
    $(document).ready(function() {
    $('#dataTables-example').DataTable({
    responsive: true
    });
    });
    </script>

    </div>

    <!-- /.col-lg-12 -->

    </div>

    <!-- /.row -->

    </div>

    <!-- /#page-wrapper -->

    </div>

    <!-- /#wrapper -->

    <!-- jQuery -->

    <script src="http://application.test:8080/theme/vendor/jquery/jquery.min.js"></script&gt;

    <!-- Bootstrap Core JavaScript -->

    <script src="http://application.test:8080/theme/vendor/bootstrap/js/bootstrap.min.js"></script&gt;

    <!-- Metis Menu Plugin JavaScript -->

    <script src="http://application.test:8080/theme/vendor/metisMenu/metisMenu.min.js"></script&gt;

    <!-- Morris Charts JavaScript -->

    <!-- <script src="http://application.test:8080/theme/vendor/raphael/raphael.min.js"></script&gt;

    <script src="http://application.test:8080/theme/vendor/morrisjs/morris.min.js"></script&gt;

    <script src="http://application.test:8080/theme/data/morris-data.js"></script&gt; -->

    <!-- Custom Theme JavaScript -->

    <script src="http://application.test:8080/theme/dist/js/sb-admin-2.js"></script&gt;

    <script src="http://application.test:8080/theme/vendor/datatables/js/jquery.dataTables.min.js"></script&gt;
    <script src="http://application.test:8080/theme/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script&gt;
    <script src="http://application.test:8080/theme/vendor/datatables-responsive/dataTables.responsive.js"></script&gt;

    </body>

    </html>
  • Avatar de MaitrePylos
    Membre depuis :
    27/05/2013
    Messages :
    231

    Vous avez vérifier que les autres scripts JS ne rentre pas en conflit ?

Vous ne pouvez pas répondre à ce sujet.