diff --git a/app/assets/styles/ve/layout/_ve-nav.scss b/app/assets/styles/ve/layout/_ve-nav.scss index b9fd61c68..910bef954 100644 --- a/app/assets/styles/ve/layout/_ve-nav.scss +++ b/app/assets/styles/ve/layout/_ve-nav.scss @@ -266,8 +266,9 @@ nav.project-level-header { a{ padding: 0 7px 0 5px; + max-width: 100%; - /*Hover state over links to show it's clickable*/ + /*Hover state over links to show it's clickable*/ &:hover{ text-decoration: underline; } @@ -286,14 +287,14 @@ nav.project-level-header { .back-to-proj{ font-size: 1.2em; top: .05em; - position: relative; + position: relative; } } } /*Hide breadcrumbs for mobile*/ -@media (max-width: 900px){ +@media (max-width: 1000px){ .breadcrumbs { li { a, span{ @@ -316,14 +317,14 @@ nav.project-level-header { } } -/*Hide all but the first 2 breadcrumbs and add */ -@media (max-width: 900px) and (min-width: 700px){ +/*Hide all but the last 2 breadcrumbs */ +@media (max-width: 1000px) and (min-width: 700px){ .breadcrumbs{ - li:nth-child(3):after{ - content: "\203A ..."; - } + // li:nth-child(2):after{ + // content: "\203A ..."; + // } - li:nth-child(2){ + li:nth-last-child(-n+2) { a, span{ display: inline-block; } @@ -334,10 +335,15 @@ nav.project-level-header { /*Add an ellipsis after the home to show there's more */ @media (max-width: 700px){ .breadcrumbs{ - li:nth-child(2):after{ - content: "\203A ..."; + li:nth-last-child(2){ + a, span{ + display: inline-block; + } } } + .navbar-right { + display: none; + } } diff --git a/app/assets/styles/ve/ve-main.scss b/app/assets/styles/ve/ve-main.scss index e3cc05793..9c22274ba 100644 --- a/app/assets/styles/ve/ve-main.scss +++ b/app/assets/styles/ve/ve-main.scss @@ -24,12 +24,6 @@ display: none !important; } -.nav_breadcrumb { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - div.tooltip-inner { white-space: normal; } diff --git a/app/js/mms/directives/veMenu.js b/app/js/mms/directives/veMenu.js index f5a820d0e..33d496df3 100644 --- a/app/js/mms/directives/veMenu.js +++ b/app/js/mms/directives/veMenu.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('mmsApp') -.directive('veMenu', ['CacheService','$state','$templateCache','$sce', 'UtilsService',veMenu]); +.directive('veMenu', ['CacheService','$state','$templateCache','$sce', '$timeout', 'UtilsService',veMenu]); /** * @ngdoc directive @@ -22,17 +22,16 @@ angular.module('mmsApp') * and tags for selected view. * */ -function veMenu(CacheService, $state, $templateCache, $sce, UtilsService) { +function veMenu(CacheService, $state, $templateCache, $sce, $timeout, UtilsService) { var template = $templateCache.get('partials/mms/veMenu.html'); var veMenuLink = function(scope, element, attrs) { scope.getHrefForProject = getHrefForProject; scope.getHrefForBranch = getHrefForBranch; scope.getHrefForTag = getHrefForTag; - - scope.htmlTooltip = $sce.trustAsHtml('Branch temporarily unavailable during duplication.'); scope.currentProject = scope.project.name; + if (scope.ref) { scope.currentRef = scope.ref; if (scope.ref.type === 'Branch') { @@ -119,13 +118,13 @@ function veMenu(CacheService, $state, $templateCache, $sce, UtilsService) { } } scope.breadcrumbs = bcrumbs.reverse(); - // if (scope.breadcrumbs.length) { - // scope.breadcrumbs[scope.breadcrumbs.length-1].showAlf = true; - // } - var eltWidth = element.parent().width(); - var crumbcount = scope.breadcrumbs.length; - var liWidth = (eltWidth * 0.65)/crumbcount; - scope.truncateStyle={'max-width': liWidth, 'white-space': 'nowrap', 'overflow': 'hidden', 'text-overflow': 'ellipsis', 'display': 'inline-block'}; + $timeout(function() { + var eltChildren = element.children().children(); + var eltWidth = element.parent().width() - eltChildren[0].scrollWidth - eltChildren[2].scrollWidth; + var crumbcount = scope.breadcrumbs.length; + var liWidth = (eltWidth * 0.85)/crumbcount; + scope.truncateStyle = {'max-width': liWidth, 'white-space': 'nowrap', 'overflow': 'hidden', 'text-overflow': 'ellipsis', 'display': 'inline-block'}; + }); } function getHrefForProject(project) { diff --git a/app/partials/mms/veMenu.html b/app/partials/mms/veMenu.html index c1b4e7bf9..08586df63 100644 --- a/app/partials/mms/veMenu.html +++ b/app/partials/mms/veMenu.html @@ -1,75 +1,71 @@ - diff --git a/src/assets/styles/components/_mms-transclude.scss b/src/assets/styles/components/_mms-transclude.scss index cf7e89910..755026253 100644 --- a/src/assets/styles/components/_mms-transclude.scss +++ b/src/assets/styles/components/_mms-transclude.scss @@ -55,13 +55,6 @@ mms-view.editing { } - -// Keep title the same size as reading -.view-title .form-control{ - height: inherit; - font-size: inherit; -} - /* comments */ mms-view mms-transclude-com, mms-view.editing mms-transclude-com { diff --git a/src/assets/styles/components/_mms-view.scss b/src/assets/styles/components/_mms-view.scss index cbf7d7aa3..e1705a818 100644 --- a/src/assets/styles/components/_mms-view.scss +++ b/src/assets/styles/components/_mms-view.scss @@ -1,6 +1,7 @@ mms-view { .ve-view-number { float: left; + margin-right: 10px; } .view-title, .section-title { @@ -11,6 +12,14 @@ mms-view { margin-bottom: 15px; } + // Keep title the same size as reading + .view-title, .section-title { + .form-control{ + height: inherit; + font-size: inherit; + } + } + &.editing { mms-view-section { display: block;