workspaceComponentViewerRegion: '.issues-workspace-component-viewer'
- initialize: ->
- @topOffset = 0
- $(window).on 'scroll.issues-layout', (=> @onScroll())
-
-
- onClose: ->
- $(window).off 'scroll.issues-layout'
-
-
onRender: ->
@$(@filtersRegion.el).addClass('hidden') if @options.app.state.get('isContext')
+ $('.search-navigator').addClass 'sticky'
top = $('.search-navigator').offset().top
- @topOffset = top
+ @$('.search-navigator-workspace-header').css top: top
@$('.search-navigator-side').css({ top: top }).isolatedScroll()
- onScroll: ->
- scrollTop = $(window).scrollTop()
- $('.search-navigator').toggleClass 'sticky', scrollTop >= @topOffset
- @$('.search-navigator-side').css top: Math.max(0, Math.min(@topOffset - scrollTop, @topOffset))
-
-
showSpinner: (region) ->
@[region].show new Marionette.ItemView
template: _.template('<i class="spinner"></i>')
workspaceDetailsRegion: '.search-navigator-workspace-details'
},
- initialize: function () {
- var that = this;
- this.topOffset = 0;
- $(window).on('scroll.search-navigator-layout', function () {
- that.onScroll();
- });
- },
-
- onClose: function () {
- $(window).off('scroll.search-navigator-layout');
- },
-
onRender: function () {
- var top = $('.search-navigator').offset().top;
- this.topOffset = top;
+ var navigator = $('.search-navigator');
+ navigator.addClass('sticky');
+ var top = navigator.offset().top;
+ this.$('.search-navigator-workspace-header').css({ top: top });
this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
},
- onScroll: function () {
- var scrollTop = $(window).scrollTop();
- $('.search-navigator').toggleClass('sticky', scrollTop >= this.topOffset);
- this.$('.search-navigator-side').css({
- top: Math.max(0, Math.min(this.topOffset - scrollTop, this.topOffset))
- });
- },
-
showDetails: function () {
this.scroll = $(window).scrollTop();
$('.search-navigator').addClass('search-navigator-extended-view');
});
}
+ App.addInitializer(function () {
+ var navHeight = $('.navbar-global').outerHeight() + $('.navbar-context').outerHeight();
+ $(document.body).css('padding-top', navHeight).data('top-offset', navHeight);
+ });
+
window.requestMessages().done(function () {
App.start();
});
}
.navbar {
+ position: fixed;
+ left: 0;
+ right: 0;
.clearfix;
height: @navbarHeight;
}
.navbar-global {
+ top: 0;
+ z-index: 499;
background-color: @navbarGlobalBackground;
.navbar-nav > li > a {
.navbar-context {
+ top: @navbarHeight;
+ z-index: 498;
height: auto;
background-color: @navbarContextBackground;