From fd62ebea0f11a505287877d03e3769fd1fd470ab Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Fri, 24 Mar 2017 12:58:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=AD=97=E5=85=B8=E8=A1=A8UI?= =?UTF-8?q?=EF=BC=8C=E8=A7=84=E8=8C=83=E5=88=97=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/site-responsive.css | 4 ++ Bootstrap.Admin/Models/QueryDictOption.cs | 3 ++ Bootstrap.Admin/Scripts/Dicts.js | 11 +++-- Bootstrap.Admin/Views/Admin/Dicts.cshtml | 52 +++++++++++---------- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/Bootstrap.Admin/Content/site-responsive.css b/Bootstrap.Admin/Content/site-responsive.css index f40f91cc..d7865981 100644 --- a/Bootstrap.Admin/Content/site-responsive.css +++ b/Bootstrap.Admin/Content/site-responsive.css @@ -28,6 +28,10 @@ top: 94px; overflow: auto; } + + .form-horizontal .control-label { + text-align: left; + } } @media (min-height: 672px) { diff --git a/Bootstrap.Admin/Models/QueryDictOption.cs b/Bootstrap.Admin/Models/QueryDictOption.cs index e193e10b..1eb49ee4 100644 --- a/Bootstrap.Admin/Models/QueryDictOption.cs +++ b/Bootstrap.Admin/Models/QueryDictOption.cs @@ -48,6 +48,9 @@ namespace Bootstrap.Admin.Models case "Name": data = Order == "asc" ? data.OrderBy(t => t.Name) : data.OrderByDescending(t => t.Name); break; + case "Code": + data = Order == "asc" ? data.OrderBy(t => t.Code) : data.OrderByDescending(t => t.Code); + break; case "Define": data = Order == "asc" ? data.OrderBy(t => t.Define) : data.OrderByDescending(t => t.Define); break; diff --git a/Bootstrap.Admin/Scripts/Dicts.js b/Bootstrap.Admin/Scripts/Dicts.js index fb47f3e1..0b880b3b 100644 --- a/Bootstrap.Admin/Scripts/Dicts.js +++ b/Bootstrap.Admin/Scripts/Dicts.js @@ -17,12 +17,13 @@ url: Dicts.url, sortName: 'Category', queryParams: function (params) { return $.extend(params, { category: $('#txt_dict_cate').val(), name: $("#txt_dict_name").val(), define: $("#txt_dict_define").val() }); }, - columns: [{ checkbox: true }, + columns: [ + { checkbox: true }, { title: "Id", field: "ID", events: bsa.idEvents(), formatter: BootstrapAdmin.idFormatter }, - { title: "字典分项", field: "Category", sortable: true }, - { title: "字典名称", field: "Name", sortable: false }, - { title: "字典代码", field: "Code", sortable: false }, - { title: "字典类别", field: "Define", sortable: true, formatter: function (value, row, index) { return value == "0" ? "系统使用" : "自定义"; } } + { title: "字典标签", field: "Category", sortable: true }, + { title: "字典名称", field: "Name", sortable: true }, + { title: "字典代码", field: "Code", sortable: true }, + { title: "字典分类", field: "Define", sortable: true, formatter: function (value, row, index) { return value == "0" ? "系统使用" : "自定义"; } } ] }); diff --git a/Bootstrap.Admin/Views/Admin/Dicts.cshtml b/Bootstrap.Admin/Views/Admin/Dicts.cshtml index e3a06007..5c975f26 100644 --- a/Bootstrap.Admin/Views/Admin/Dicts.cshtml +++ b/Bootstrap.Admin/Views/Admin/Dicts.cshtml @@ -11,7 +11,7 @@
- +
@@ -53,32 +53,36 @@