ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [ambari] branch trunk updated: AMBARI-23730 When Spark2 is selected in left pane, Spark also gets selected along with it. (ababiichuk)
Date Mon, 30 Apr 2018 16:53:18 GMT
This is an automated email from the ASF dual-hosted git repository.

ababiichuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new cab7384  AMBARI-23730 When Spark2 is selected in left pane, Spark also gets selected
along with it. (ababiichuk)
cab7384 is described below

commit cab73841d296042d549509b419de83ed1d4358fe
Author: ababiichuk <ababiichuk@hortonworks.com>
AuthorDate: Mon Apr 30 17:38:55 2018 +0300

    AMBARI-23730 When Spark2 is selected in left pane, Spark also gets selected along with
it. (ababiichuk)
---
 ambari-web/vendor/scripts/theme/bootstrap-ambari.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ambari-web/vendor/scripts/theme/bootstrap-ambari.js b/ambari-web/vendor/scripts/theme/bootstrap-ambari.js
index 6102bc3..1059ab3 100644
--- a/ambari-web/vendor/scripts/theme/bootstrap-ambari.js
+++ b/ambari-web/vendor/scripts/theme/bootstrap-ambari.js
@@ -86,10 +86,14 @@ $(document).ready(function () {
 
       function popStateHandler() {
         var path = window.location.pathname + window.location.hash;
+        if (path[path.length - 1] !== '/') {
+          path += '/';
+        }
         $navigationContainer.find('li a').each(function (index, link) {
           var $link = $(link);
           var href = $link.attr('data-href') || $link.attr('href');
-          if (path.indexOf(href) !== -1 && ['', '#'].indexOf(href) === -1) {
+          var hrefWithSlash = href == null || href[href.length - 1] === '/' ? href : href
+ '/';
+          if (path.indexOf(hrefWithSlash) !== -1 && ['', '#'].indexOf(href) === -1)
{
             $link.parent().addClass('active');
           } else {
             $link.parent().removeClass('active');

-- 
To stop receiving notification emails like this one, please contact
ababiichuk@apache.org.

Mime
View raw message