scrollToLine: (line) ->
row = @$("[data-line-number=#{line}]")
goal = if row.length > 0 then row.offset().top - 200 else 0
- goal = Math.max goal, 30
$(window).scrollTop goal
showComponentViewer: ->
@scroll = $(window).scrollTop()
$('.issues').addClass 'issues-extended-view'
+ @$el.closest('.container').addClass 'container-full-width'
hideComponentViewer: ->
$('.issues').removeClass 'issues-extended-view'
$(window).scrollTop @scroll if @scroll?
+ @$el.closest('.container').removeClass 'container-full-width'
onResize: ->
- footerEl = jQuery('#footer')
- footerHeight = footerEl.outerHeight true
-
- resultsEl = jQuery('.navigator-results')
- resultsHeight = jQuery(window).height() - resultsEl.offset().top -
- parseInt(resultsEl.css('margin-bottom'), 10) - footerHeight
- resultsEl.height resultsHeight
-
- detailsEl = jQuery('.navigator-details')
- detailsWidth = jQuery(window).width() - detailsEl.offset().left -
- parseInt(detailsEl.css('margin-right'), 10)
- detailsHeight = jQuery(window).height() - detailsEl.offset().top -
- parseInt(detailsEl.css('margin-bottom'), 10) - footerHeight
- detailsEl.width(detailsWidth).height detailsHeight
onRender: ->
-
<div class="container-side container-side-left">
<div class="search-navigator-filters"></div>
<div class="search-navigator-side">
-<div class="navigator-content">
- <div class="navigator-side">
- <div class="navigator-actions"></div>
- <div class="navigator-results quality-gates-nav"></div>
- </div>
- <div class="navigator-main">
- <div class="navigator-header"></div>
- <div class="navigator-details"></div>
- </div>
-</div>
\ No newline at end of file
+<div class="container-side container-side-left">
+ <div class="navigator-actions"></div>
+ <div class="navigator-results quality-gates-nav"></div>
+</div>
+<div class="container-main">
+ <div class="navigator-header"></div>
+ <div class="navigator-details"></div>
+</div>
},
initialize: function () {
- $(window).on('scroll.nav-layout', this.onScroll);
this.projectName = window.navbarProject;
this.projectKey = window.navbarProjectKey;
this.isProjectFavorite = window.navbarProjectFavorite;
},
- onClose: function () {
- $(window).off('scroll.nav-layout');
- },
-
- onScroll: function () {
- var scrollTop = $(window).scrollTop(),
- isInTheMiddle = scrollTop > 0;
- $('.navbar-sticky').toggleClass('middle', isInTheMiddle);
- },
-
onRender: function () {
var that = this;
this.$el.addClass('navbar-' + window.navbarSpace);
padding: 4px 5px;
border: 1px solid @barBorderColor;
border-radius: 2px;
- background-color: lighten(@barBackgroundColor, 2%);
font-size: 0;
cursor: pointer;
white-space: nowrap;
}
.facet-name {
- background-color: lighten(@barBackgroundColor, 2%);
font-size: @smallFontSize;
}
margin-left: 5px;
padding-left: 5px;
border-left: 1px solid @barBorderColor;
- background-color: lighten(@barBackgroundColor, 2%);
color: @secondFontColor;
font-size: @smallFontSize;
}
}
.search-navigator-facet-box {
- background-color: @barBackgroundColor;
font-size: @baseFontSize;
}
margin: 0 0 1px 0;
border-color: transparent;
.box-sizing(border-box);
- background-color: @barBackgroundColor;
white-space: normal;
overflow: hidden;
.facet-name {
white-space: nowrap;
- background-color: @barBackgroundColor;
color: @baseFontColor;
}
top: 0; right: 0;
padding: 4px 5px;
border: none;
- background-color: @barBackgroundColor;
&:before {
content: " ";
position: absolute;
top: 0; bottom: 0; right: 100%;
width: 10px;
- background-image: linear-gradient(to right, fade(@barBackgroundColor, 0%), @barBackgroundColor 75%);
+ background-image: linear-gradient(to right, fade(#fff, 0%), #fff 75%);
}
}
.search-navigator-facet-header {
display: block;
- padding: 6px 10px;
+ padding: 6px 0;
border-bottom: none;
color: @baseFontColor;
font-weight: 500;
}
.search-navigator-facet-list {
- margin: 0 0 0 0;
- padding: 0 10px 10px;
+ margin: 0;
+ padding: 0 0 10px;
font-size: 0;
}
}
.search-navigator-facet-query {
- padding: 6px 10px;
+ padding: 6px 0;
input {
width: 100%;
}
.search-navigator-filters {
- position: relative;
.clearfix;
- padding: 5px 10px;
+ position: relative;
+ padding: 5px 0;
}
.search-navigator-filters-selected {
position: absolute;
top: 0;
right: 0;
- padding: 5px 10px;
+ padding: 5px 0;
font-size: 0;
white-space: nowrap;
@pageWidth: 1020px;
@containerWidth: 980px;
@sideWidth: 200px;
+@fullWidthSideWidth: 40px;
@sideMargin: 10px;
html {
min-height: 100vh;
}
+.wrapper {
+ min-height: ~"calc(100vh - 60px)";
+}
+
.container {
width: @containerWidth;
margin: 0 auto;
.box-sizing(border-box);
+ .trans(width);
+}
+
+.container-full-width {
+ width: ~"calc(100% - @{fullWidthSideWidth})";
+
+ .container-main {
+ width: 100%;
+ }
+
+ .container-side {
+ position: absolute;
+ .translate(-100%, 0);
+ opacity: 0;
+ }
}
.container-one-third {
.container-side {
width: @sideWidth;
.box-sizing(border-box);
+ .trans;
}
.container-side-left {
.container-main {
float: left;
width: @containerWidth - @sideWidth;
+ .box-sizing(border-box);
+ .trans(width);
}
.face-bar {
- background-color: @barBackgroundColor;
+
}
.face-main {
- margin: -10px;
- padding: 10px;
background-color: #fff;
}
-
-.container-side + .face-main {
- box-shadow: -6px 0 10px 0 rgba(0, 0, 0, 0.075);
-}
#footer {
position: relative;
+ min-height: 60px;
+ .box-sizing(border-box);
+ background-color: @barBackgroundColor;
clear: both;
}
@import (reference) "variables";
@import (reference) "ui";
-@navbarBackground: #262626;
+@navbarBackground: #151515;
@navbarProjectBackground: @navbarBackground;
@navbarSettingsBackground: #591500;
.navbar-global {
background-color: @navbarBackground;
- .navbar-sticky.middle & {
+ .navbar-sticky & {
background-color: fade(@navbarBackground, 90%);
}
.navbar-project {
background-color: @navbarProjectBackground;
- .navbar-sticky.middle & {
+ .navbar-sticky & {
background-color: fade(@navbarProjectBackground, 90%);
}
.navbar-settings {
background-color: @navbarSettingsBackground;
- .navbar-sticky.middle & {
+ .navbar-sticky & {
background-color: fade(@navbarSettingsBackground, 90%);
}
@import (reference) "mixins";
@import (reference) "navigator/config";
-@qualityGateSidebarWidth: 230px;
-
.quality-gates-navigator {
- .navigator-side {
- display: table-cell;
- vertical-align: top;
- width: @qualityGateSidebarWidth + 2 * @navigatorPadding;
- min-width: 0;
- }
-
.navigator-header {
margin-left: 0;
.spinner { margin-top: 9px; }
.navigator-actions {
height: @navigatorHeaderHeight;
- width: @qualityGateSidebarWidth;
margin: @navigatorPadding;
padding: 0 @navigatorPadding;
}
.navigator-results {
- width: @qualityGateSidebarWidth;
min-width: 0;
+ width: auto;
}
.navigator-details { margin-left: 0; }
@project=@resource unless @project || selected_section==Navigation::SECTION_HOME
period_param = "period=#{u(params[:period])}" if params[:period]
%>
-<div id="container" class="navbar-sticky">
+<div id="container" class="wrapper navbar-sticky">
<%
navbar_class = 'navbar-global'
navbar_class = 'navbar-project' if selected_section==Navigation::SECTION_RESOURCE