From 702912d1c8b663de5bea8701f9e682450adece3c Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sat, 19 Nov 2016 20:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E8=8F=9C=E5=8D=95=E4=B8=8E=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E4=B8=80=E8=87=B4=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E9=9D=A2=E5=8C=85=E5=B1=91=E5=AF=BC=E8=88=AA=E6=9D=A1?= =?UTF-8?q?=E5=A4=9A=E4=BA=86=E4=B8=80=E4=B8=AA=E6=96=9C=E6=9D=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/common-scripts.js | 4 +--- Bootstrap.Admin/Scripts/Content.js | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index afe6c886..16353fb5 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -21,9 +21,7 @@ // breadcrumb var arch = $('#nav-accordion').find('a.active').last(); - var breadcrumb = arch.text(); - if (breadcrumb === "") $breadNav.hide(); - else $breadNav.text(breadcrumb); + $breadNav.text(arch.text()); var top = arch.offset().top; if (top > $sidebar.height()) $sidebar.animate({ scrollTop: top + 300 - $sidebar.height() }, 800); diff --git a/Bootstrap.Admin/Scripts/Content.js b/Bootstrap.Admin/Scripts/Content.js index 04ba0aa3..d03dcafd 100644 --- a/Bootstrap.Admin/Scripts/Content.js +++ b/Bootstrap.Admin/Scripts/Content.js @@ -3,9 +3,7 @@ function setActive(ele) { ele.addClass('active'); ele.parents("ul").first().find('p').addClass('active'); - var breadcrumb = ele.text(); - if (breadcrumb === "") $breadNav.hide(); - else $breadNav.text(breadcrumb); + $breadNav.text(ele.text()).show(); } $('#navbar').attr('data-toggle', "dropdown").addClass('dropdown-toggle'); var $subMenu = $('#submenu'); @@ -19,6 +17,7 @@ setActive($this); $('iframe').attr('src', $this.attr('href')); }); + $breadNav.hide(); $subMenu.find('a').each(function (index, ele) { var $this = $(this); if ($this.attr('href') == window.location.pathname) setActive($this);