# Construct layout
App.addInitializer ->
@layout = new CodingRulesLayout app: @
- jQuery('body').append @layout.render().el
+ jQuery('#content').append @layout.render().el
+ @layout.onResize()
# Construct header
facetsRegion: '.navigator-facets'
- onRender: ->
- # Adjust details region height
- @$(@detailsRegion.el).css 'bottom', jQuery('#footer').outerHeight()
+ initialize: ->
+ jQuery(window).on 'resize', => @onResize()
+
+
+ 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
showSpinner: (region) ->
# Construct layout
App.addInitializer ->
@layout = new QualityGateLayout app: @
- jQuery('body').append @layout.render().el
+ jQuery('#content').append @layout.render().el
+ @layout.onResize()
# Construct actions bar
initialize: (options) ->
@listenTo options.app.qualityGates, 'all', @updateLayout
+ jQuery(window).on 'resize', => @onResize()
updateLayout: ->
@$(@detailsRegion.el).toggle !empty
- onRender: ->
- @updateLayout()
+ 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
- # Adjust details region height
- @$(@detailsRegion.el).css 'bottom', jQuery('#footer').outerHeight()
+
+ onRender: ->
+ @updateLayout()
\ No newline at end of file
<div class="navigator-header"></div>
<div class="navigator-filters"></div>
<div class="navigator-facets"></div>
-<div class="navigator-results"></div>
-<div class="navigator-actions"></div>
-<div class="navigator-details"></div>
\ No newline at end of file
+
+<div class="navigator-content">
+ <div class="navigator-side">
+ <div class="navigator-actions"></div>
+ <div class="navigator-results"></div>
+ </div>
+ <div class="navigator-main">
+ <div class="navigator-details"></div>
+ </div>
+</div>
\ No newline at end of file
-<div class="navigator-header"></div>
-<div class="navigator-results quality-gates-nav"></div>
-<div class="navigator-details"></div>
-<div class="navigator-actions"></div>
\ No newline at end of file
+<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
});
- // Adjust details region height
- jQuery('.navigator-details').css('bottom', jQuery('#footer').outerHeight());
-
-
NavigatorApp.addInitializer(function () {
jQuery('html').addClass('navigator-page issues-page');
});
+ NavigatorApp.addInitializer(function () {
+ var onResize = function() {
+ var footerEl = jQuery('#footer'),
+ footerHeight = footerEl.outerHeight(true);
+
+ var resultsEl = jQuery('.navigator-results'),
+ resultsHeight = jQuery(window).height() - resultsEl.offset().top -
+ parseInt(resultsEl.css('margin-bottom'), 10) - footerHeight;
+ resultsEl.height(resultsHeight);
+
+ var 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);
+ };
+ jQuery(window).on('resize', onResize);
+ onResize();
+ });
+
+
NavigatorApp.getQuery = function (withoutId) {
var query = this.filterBarView.getQuery();
if (!withoutId && this.favoriteFilter.id) {
onDomRefresh: function () {
var sourceTitleHeight = this.$('.source_title').outerHeight();
- jQuery('.navigator-details').css('padding-top', (sourceTitleHeight + 10) + 'px');
},
margin: @navigatorPadding;
}
- .navigator-actions {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight;
- }
-
- .navigator-results {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorStatusHeight +
- @navigatorFacetsHeight;
- }
- .navigator-details {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight;
- }
}
}
.navigator-header {
- .navigator-element;
- top: @navigatorTopOffset;
- left: 0;
- .size(100%, @navigatorHeaderHeight);
+ height: @navigatorHeaderHeight;
+ margin: @navigatorPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ .box-sizing(border-box);
}
.navigator-filters {
- .navigator-element;
- top: @navigatorTopOffset + @navigatorHeaderHeight;
- left: 0;
- .size(100%, @navigatorFiltersHeight);
+ position: relative;
+ margin: @navigatorPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ .box-sizing(border-box);
}
-.navigator-facets {
- .navigator-element;
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
- left: 0;
- .size(100%, @navigatorFacetsHeight);
+.navigator-content {
+ display: table;
+ width: 100%;
}
-.navigator-results {
- .navigator-element;
- .box-sizing(content-box);
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorStatusHeight;
- bottom: 0;
- left: 0;
- width: @navigatorResultsWidth - 1px;
+.navigator-side {
+ display: table-cell;
+ vertical-align: top;
+ width: @navigatorResultsWidth + 2 * @navigatorPadding;
}
-.navigator-details {
- .navigator-element;
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
- bottom: @navigatorBottomOffset;
- left: @navigatorResultsWidth;
- right: 0;
+.navigator-main {
+ display: table-cell;
+ vertical-align: top;
}
-.navigator-actions {
- .navigator-element;
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
- left: 0;
- .size(@navigatorResultsWidth, @navigatorStatusHeight);
+.navigator-facets {
+ height: @navigatorFacetsHeight;
+ margin: @navigatorPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ .box-sizing(border-box);
}
-.navigator-notes {
- .navigator-element;
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
- left: 0;
- .size(100%, @navigatorNotesHeight);
- display: none;
+.navigator-results {
+ width: @navigatorResultsWidth;
+ margin: @navigatorPadding;
+ .box-sizing(border-box);
}
+.navigator-actions {
+ .clearfix;
+ width: @navigatorResultsWidth;
+ margin: 0 @navigatorPadding @navigatorPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ .box-sizing(border-box);
+}
-.measures-page {
- .navigator-results {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
- left: 0;
- bottom: 36px;
- width: 100%;
- }
+.navigator-details {
+ position: relative;
+ margin: 0 @navigatorPadding @navigatorPadding 0;
}
+.navigator-notes {
+ display: none;
+}
.navigator-with-notes {
- .navigator-actions,
- .navigator-details {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorNotesHeight;
- }
-
- .navigator-results {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorNotesHeight + @navigatorStatusHeight;
- }
-
.navigator-notes {
display: block;
}
+}
- .navigator-details .source_title {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorNotesHeight;
- }
-
- .navigator-fetching.navigator-results-list:before {
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorStatusHeight + @navigatorNotesHeight;
- }
+.measures-page {
+ .navigator-details { overflow: visible; }
+ .page { padding: 0 0 0 @navigatorPadding; }
}
// Header
.navigator-header {
padding: 0 @navigatorPadding;
- border-bottom: 1px solid @navigatorBorderColor;
background-color: @navigatorBarBackground;
font-size: 0;
}
.navigator-header-favorite {
- padding-left: 46px;
+ padding-left: 58px;
}
.navigator-header-title {
display: inline-block;
vertical-align: middle;
+ color: @navigatorHeaderColor;
font-size: 20px;
- line-height: @navigatorHeaderHeight;
+ line-height: @navigatorHeaderLineHeight;
}
.navigator-header-title-note {
// Notes
.navigator-notes {
+ margin: 0 @navigatorPadding @navigatorPadding 0;
padding: 0 @navigatorPadding;
- border-bottom: 1px solid @navigatorBorderColor;
+ border: 1px solid @navigatorBorderColor;
background-color: @navigatorBarBackground;
color: #777;
font-size: @smallFontSize;
line-height: @navigatorNotesHeight;
-
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
}
// Results
.navigator-results {
- border-right: 1px solid @navigatorBorderLightColor;
background-color: @white;
overflow-x: hidden;
overflow-y: auto;
.navigator-results-list {
& > li {
+ position: relative;
+ z-index: 1;
padding: @navigatorPadding / 2 0;
- border-top: 1px solid transparent;
+ border: 1px solid;
+ border-color: @navigatorBorderLightColor transparent;
cursor: pointer;
.trans;
}
&.active {
+ z-index: 2;
background-color: #CAE3F2;
border-color: #4B9FD5;
}
-
- &.with-context {
- border-right: 6px solid @navigatorBorderLightColor;
- }
-
- &:last-child {
- border-bottom: 1px solid transparent;
-
- &.active {
- border-bottom-color: #4B9FD5;
- }
- }
}
- & > li + li {
- border-top-color: @navigatorBorderLightColor;
- }
-
- & > li.active + li {
- border-top-color: #4B9FD5;
- }
+ & > li + li { margin-top: -1px; }
&.navigator-fetching {
// Details
.navigator-details {
- padding: @navigatorPadding;
background-color: @white;
overflow: auto;
- .issues-page & {
- padding-top: 62px;
- padding-right: 0;
- }
-
&.loading {
background: @white url("../images/loading.gif") no-repeat 4px 2px;
}
}
.source_title {
- position: fixed;
z-index: 3;
top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
left: @navigatorResultsWidth;
right: 0;
- padding: @navigatorPadding;
- border-bottom: 1px solid @navigatorBorderLightColor;
+ padding: 0 0 @navigatorPadding 0;
background-color: #fff;
}
.source {
- padding-right: 10px;
-
& > table {
border: 1px solid #DDD;
}
.navigator-actions-total {
float: right;
- line-height: @navigatorStatusHeight - 4px;
+ line-height: @navigatorStatusHeight;
}
.navigator-actions-bulk {
// Footer
.navigator-page #footer {
- .navigator-element;
- bottom: 0;
- left: @navigatorResultsWidth;
- right: 0;
- margin: 0;
border-top: 1px solid @navigatorBorderLightColor;
-}
-
-.navigator-page #ftlinks {
- margin-top: 0;
-}
-
-.measures-page #footer {
- left: 0;
-}
+}
\ No newline at end of file
@import "../variables";
// Layout
-@navigatorTopOffset: 30px;
+@navigatorTopOffset: 80px;
@navigatorBottomOffset: 35px;
-@navigatorHeaderHeight: 37px;
-@navigatorFiltersHeight: 37px;
+@navigatorHeaderHeight: 40px;
+@navigatorHeaderLineHeight: @navigatorHeaderHeight - 3px;
+@navigatorFiltersHeight: 40px;
+@navigatorFiltersLineHeight: @navigatorFiltersHeight - 3px;
@navigatorFacetsHeight: 90px;
@navigatorStatusHeight: 30px;
@navigatorNotesHeight: 20px;
// Colors
-@navigatorBarBackground: @grey;
-@navigatorBorderColor: @darkGrey;
-@navigatorBorderLightColor: lighten(@darkGrey, 8%);
+@navigatorBarBackground: #f3f3f3;
+@navigatorBorderColor: darken(@navigatorBarBackground, 5%);
+@navigatorBorderLightColor: @navigatorBorderColor;
+@navigatorHeaderColor: darken(@blue, 10%);
-@navigatorHover: darken(@grey, 5%);
+
+@navigatorHover: darken(@navigatorBarBackground, 5%);
@navigatorFilterPadding: @navigatorPadding;
.navigator-filters {
- border-bottom: 1px solid @darkGrey;
+ padding-right: 85px;
background-color: @navigatorBarBackground;
font-size: 0;
}
.navigator-filters-list {
display: inline-block;
vertical-align: middle;
- margin-bottom: -1px;
font-size: 0;
+ margin-bottom: -1px;
}
.navigator-filter-submit,
font-size: @baseFontSize;
}
+.navigator-filter-submit {
+ position: absolute;
+ top: 0; right: 0;
+ .size(85px, 100%);
+ margin: -1px -1px -1px 0;
+ padding: 0;
+ border: 1px solid darken(@blue, 10%);
+ .box-sizing(content-box);
+ background: @blue;
+ color: #fff;
+ font-weight: normal;
+ .trans;
+
+ &:hover, &:focus {
+ border-color: @blue;
+ background-color: lighten(@blue, 10%);
+ }
+}
+
.navigator-filter-list-favorite {
position: relative;
padding-left: 36px;
z-index: 1;
display: inline-block;
vertical-align: top;
- height: @navigatorFiltersHeight - 1px;
- line-height: @navigatorFiltersHeight - 1px;
- margin: -1px 0 0;
- padding: 0 @navigatorFilterPadding;
- border: 1px solid;
- border-color: transparent @navigatorBorderLightColor;
+ height: @navigatorFiltersHeight;
+ line-height: @navigatorFiltersLineHeight;
+ margin: -1px 0 0 -1px;
+ padding: 0 1.5 * @navigatorFilterPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ .box-sizing(border-box);
white-space: nowrap;
cursor: pointer;
- transition: background 0.3s ease;
+ .trans;
&:hover {
z-index: 2;
background: #fff;
}
- &:first-child {
- border-left: none;
- }
-}
-
-.navigator-filter + .navigator-filter {
- margin-left: -1px;
}
.navigator-filter-disabled {
}
.navigator-filter-context {
+ z-index: 3;
background-color: @contextBackground;
border-color: @contextBorder;
}
.navigator-filter-favorite {
position: absolute;
- top: -100%; left: 0;
- border-top: none;
+ top: -@navigatorPadding - @navigatorFiltersHeight;
+ left: 0;
}
.navigator-filter-favorite-toggle {
.quality-gates-navigator {
- .navigator-header {
- left: @qualityGateSidebarWidth;
- border-color: @navigatorBorderColor;
+ .navigator-side {
+ display: table-cell;
+ vertical-align: top;
+ width: @qualityGateSidebarWidth + 2 * @navigatorPadding;
+ }
+ .navigator-header {
+ margin-left: 0;
.spinner { margin-top: 9px; }
}
.navigator-actions {
- top: @navigatorTopOffset;
height: @navigatorHeaderHeight;
width: @qualityGateSidebarWidth;
+ margin: @navigatorPadding;
padding: 0 @navigatorPadding;
- border-color: @navigatorBorderColor;
- border-bottom-color: @navigatorBarBackground;
.navigator-header-title {
+ color: @baseFontColor;
font-size: 13px;
font-weight: bold;
text-transform: uppercase;
}
.navigator-results {
- top: @navigatorTopOffset + @navigatorHeaderHeight;
- width: @qualityGateSidebarWidth - 1px;
- border-color: @navigatorBorderColor;
- }
-
- .navigator-details {
- top: @navigatorTopOffset + @navigatorHeaderHeight;
- left: @qualityGateSidebarWidth;
- padding: @navigatorPadding;
+ width: @qualityGateSidebarWidth;
}
}
-.quality-gates-page #footer {
- left: @qualityGateSidebarWidth;
-}
-
.quality-gates-nav {
- background-color: @navigatorBarBackground;
.navigator-results-list {
border-color: transparent;
&:hover:not(.active):not(.empty) {
- background-color: @navigatorBorderLightColor;
+ background-color: @navigatorBarBackground;
}
&.active {
<div class="navigator">
<div class="navigator-header"></div>
- <div class="navigator-notes">
- <%= message('issue_filter.max_results_reached', :params => 10000) -%>
- </div>
<div class="navigator-filters"></div>
- <div class="navigator-results"></div>
- <div class="navigator-details"></div>
- <div class="navigator-actions"></div>
+
+ <div class="navigator-content">
+ <div class="navigator-side">
+ <div class="navigator-actions"></div>
+ <div class="navigator-results"></div>
+ </div>
+ <div class="navigator-main">
+ <div class="navigator-notes"><%= message('issue_filter.max_results_reached', :params => 10000) -%></div>
+ <div class="navigator-details"></div>
+ </div>
+ </div>
</div>
<%= render :partial => '/navigator/filter_templates' -%>
<div class="navigator-header">
<%= render :partial => 'search_header' -%>
</div>
+
<div class="navigator-filters"></div>
- <div class="navigator-results">
- <%= render :partial => 'search_body' -%>
+
+ <div class="navigator-content">
+ <div class="navigator-main">
+ <div class="navigator-details">
+ <%= render :partial => 'search_body' -%>
+ </div>
+ </div>
</div>
</div>