From 5f4e12c7fa9bef43b4c93dd007c0565446ddfbf2 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Wed, 9 Nov 2016 16:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=B1=8F=E5=B9=95=E5=AE=BD=E5=BA=A6=E5=A4=AA=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=EF=BC=8Ctoolbar=E5=8F=98=E6=88=90=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/css/admin.css | 42 +++++++++++++++++++ .../Content/css/site-responsive.css | 8 ++++ Bootstrap.Admin/Content/css/site.css | 20 --------- Bootstrap.Admin/Content/js/common-scripts.js | 8 ++++ Bootstrap.Admin/Views/Admin/Menus.cshtml | 9 ++++ 5 files changed, 67 insertions(+), 20 deletions(-) diff --git a/Bootstrap.Admin/Content/css/admin.css b/Bootstrap.Admin/Content/css/admin.css index e9a3668c..8c8ad3de 100644 --- a/Bootstrap.Admin/Content/css/admin.css +++ b/Bootstrap.Admin/Content/css/admin.css @@ -3,6 +3,26 @@ height: auto; } +.has-error input { + background-repeat: no-repeat; + background-image: url('../images/error.png'); + background-position: right 8px center; +} + +.has-error .input-group-btn button, .has-error .input-group-btn button:active:focus { + border-color: #a94442; +} + +.has-success input { + background-repeat: no-repeat; + background-image: url('../images/success.png'); + background-position: right 8px center; +} + +.has-success .input-group-btn button, .has-success .input-group-btn button:active:focus { + border-color: #3c763d; +} + .sidebar-closed > #sidebar > ul { display: none; } @@ -159,3 +179,25 @@ ul.sidebar-menu { margin-right: 6px; top: 2px; } + +.toolbar { + position: relative; + margin-top: 10px; + margin-bottom: 10px; + line-height: 34px; + display: none; +} + + .toolbar div { + padding: 0; + white-space: nowrap; + } + + .toolbar div a:first-child { + border-left: none; + } + + .toolbar div a { + padding: 8px 20px; + border-left: solid 1px #aeb2b7; + } diff --git a/Bootstrap.Admin/Content/css/site-responsive.css b/Bootstrap.Admin/Content/css/site-responsive.css index 58c5de1b..e8b622c2 100644 --- a/Bootstrap.Admin/Content/css/site-responsive.css +++ b/Bootstrap.Admin/Content/css/site-responsive.css @@ -67,6 +67,14 @@ .modal-dialog { width: 460px; } + + .bs-bars { + display: none; + } + + .toolbar { + display: inline-block; + } } @media (max-width: 480px) { diff --git a/Bootstrap.Admin/Content/css/site.css b/Bootstrap.Admin/Content/css/site.css index 2bfb5a81..46fdae0f 100644 --- a/Bootstrap.Admin/Content/css/site.css +++ b/Bootstrap.Admin/Content/css/site.css @@ -10,26 +10,6 @@ -moz-font-smoothing: antialiased; } -.has-error input { - background-repeat: no-repeat; - background-image: url('../images/error.png'); - background-position: right 8px center; -} - -.has-error .input-group-btn button, .has-error .input-group-btn button:active:focus { - border-color: #a94442; -} - -.has-success input { - background-repeat: no-repeat; - background-image: url('../images/success.png'); - background-position: right 8px center; -} - -.has-success .input-group-btn button, .has-success .input-group-btn button:active:focus { - border-color: #3c763d; -} - .dropdown-menu { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; } diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index 89dab3a9..8d4167e3 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -71,4 +71,12 @@ $(function () { //$("html").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000', scrollspeed: 100, mousescrollstep: 60}); //$(".table-responsive").niceScroll({ styler: "fb", cursorcolor: "#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled: false, cursorborder: '', zindex: '1000', horizrailenabled: true }); + + + $('.toolbar').insertBefore($('.bootstrap-table > .fixed-table-toolbar > .bs-bars')); + + $('.toolbar a').click(function () { + var ctl = $('#' + $(this).attr('id').replace('tb_', 'btn_')); + ctl.trigger("click"); + }); })(jQuery); \ No newline at end of file diff --git a/Bootstrap.Admin/Views/Admin/Menus.cshtml b/Bootstrap.Admin/Views/Admin/Menus.cshtml index ee6d1799..2c753d14 100644 --- a/Bootstrap.Admin/Views/Admin/Menus.cshtml +++ b/Bootstrap.Admin/Views/Admin/Menus.cshtml @@ -40,6 +40,15 @@
+ }