From 2e5a18de257b2beb4b1c9eaa91d7876a5b30ca6e Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Wed, 29 Mar 2017 13:59:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81=EF=BC=9A?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8F=9C=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=BC=B9?= =?UTF-8?q?=E7=AA=97UI=E6=91=86=E6=94=BE=E4=BD=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E5=8C=96=E8=8F=9C=E5=8D=95=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/admin-responsive.css | 6 ++- Bootstrap.Admin/Scripts/Menus.js | 17 +++++--- Bootstrap.Admin/Views/Admin/Menus.cshtml | 44 +++++++++++--------- 3 files changed, 42 insertions(+), 25 deletions(-) diff --git a/Bootstrap.Admin/Content/admin-responsive.css b/Bootstrap.Admin/Content/admin-responsive.css index 45e9a18a..82afa8c0 100644 --- a/Bootstrap.Admin/Content/admin-responsive.css +++ b/Bootstrap.Admin/Content/admin-responsive.css @@ -32,7 +32,7 @@ } .form-group .form-control-url { - width: 85%; + width: 442px; } } @@ -67,6 +67,10 @@ .modal-dialog { width: 900px; } + + .form-group .form-control-url { + width: 742px; + } } @media (min-height: 672px) { diff --git a/Bootstrap.Admin/Scripts/Menus.js b/Bootstrap.Admin/Scripts/Menus.js index c92646f0..cd33ce5c 100644 --- a/Bootstrap.Admin/Scripts/Menus.js +++ b/Bootstrap.Admin/Scripts/Menus.js @@ -132,7 +132,18 @@ }); // validate - $('#dataForm').autoValidate({ + $('#dataForm').on('click', '[data-method]', function () { + var $this = $(this); + var $input = $this.parent().prev(); + switch ($this.attr('data-method')) { + case 'clear': + $input.val(""); + break; + case 'sel': + $input.select(); + break; + } + }).autoValidate({ name: { required: true, maxlength: 50 @@ -202,10 +213,6 @@ $dialogNew.show(); }); - $('#btnClearIcon, #btnMenuClearParent').on('click', function () { - $(this).parent().prev().val(""); - }); - $btnSubmitMenu.on('click', function () { var type = $(this).data('type'); switch (type) { diff --git a/Bootstrap.Admin/Views/Admin/Menus.cshtml b/Bootstrap.Admin/Views/Admin/Menus.cshtml index 4ae87e29..975a139f 100644 --- a/Bootstrap.Admin/Views/Admin/Menus.cshtml +++ b/Bootstrap.Admin/Views/Admin/Menus.cshtml @@ -14,14 +14,14 @@ @section query {
-
- - -
+
+ + +