瀏覽代碼

NEW Les datatables sont désormais responsive

olivier.massot 7 年之前
父節點
當前提交
e1e0087829

+ 2 - 2
CD67.FicheCollege.MVC/App_Start/BundleConfig.cs

@@ -41,9 +41,9 @@ namespace CD67.FicheCollege.MVC
                       "~/Content/colorbox/colorbox.css"));
 
             bundles.Add(new StyleBundle("~/Content/datatables").Include(
-                      "~/Content/jquery.dataTables.min.css"));
+                      "~/Content/dataTables.min.css"));
             bundles.Add(new ScriptBundle("~/bundles/datatables").Include(
-                                  "~/Scripts/jquery.dataTables.min.js"));
+                                  "~/Scripts/dataTables.min.js"));
         }
     }
 }

文件差異過大導致無法顯示
+ 12 - 0
CD67.FicheCollege.MVC/Content/datatables.min.css


+ 3 - 0
CD67.FicheCollege.MVC/Scripts/cd67-main.js

@@ -15,6 +15,9 @@
         },
         "search": {
             "search": URI(window.location.href).search(true)['dtsearch']
+        },
+        responsive: {
+            details: false
         }
     });
 

文件差異過大導致無法顯示
+ 23 - 0
CD67.FicheCollege.MVC/Scripts/datatables.min.js


+ 5 - 23
CD67.FicheCollege.MVC/Views/Colleges/Index.cshtml

@@ -28,30 +28,21 @@
 <table id="table-colleges" class="datatable table">
     <thead>
         <tr>
-            <th>
+            <th data-priority="1">
                 RNE
             </th>
-            <th>
+            <th data-priority="2">
                 @Html.DisplayNameFor(model => college_model.Libelle)
             </th>
-            <th>
-                @Html.DisplayNameFor(model => college_model.Adresse)
-            </th>
-            <th>
-                @Html.DisplayNameFor(model => college_model.CDC)
+            <th data-priority="3">
+                @Html.DisplayNameFor(model => college_model.Commune)
             </th>
             <th>
                 @Html.DisplayNameFor(model => college_model.Tel)
             </th>
-            <th>
-                @Html.DisplayNameFor(model => college_model.Fax)
-            </th>
             <th>
                 @Html.DisplayNameFor(model => college_model.Email)
             </th>
-            <th>
-                @Html.DisplayNameFor(model => college_model.Territoire.Libelle)
-            </th>
             <th>
                 @Html.DisplayNameFor(model => college_model.TypeCollege.Libelle)
             </th>
@@ -70,23 +61,14 @@
                     </noscript>
                 </td>
                 <td>
-                    @Html.DisplayFor(modelcollege => college.AdresseComplete)
-                </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.CDC)
+                    @Html.DisplayFor(modelcollege => college.Commune)
                 </td>
                 <td>
                     @Html.DisplayFor(modelcollege => college.Tel)
                 </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.Fax)
-                </td>
                 <td>
                     @Html.DisplayFor(modelcollege => college.Email)
                 </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.Territoire.Libelle)
-                </td>
                 <td>
                     @Html.DisplayFor(modelcollege => college.TypeCollege.Libelle)
                 </td>

部分文件因文件數量過多而無法顯示