onRender: ->
jQuery('body').append @el
jQuery('body').off('click.bulk-change').on 'click.bulk-change', => @hide()
+ @$el.css
+ top: jQuery('.navigator-actions').offset().top + jQuery('.navigator-actions').height() + 1
+ left: jQuery('.navigator-actions').offset().left + jQuery('.navigator-actions').outerWidth() - @$el.outerWidth()
toggle: ->
detailsHeight = jQuery(window).height() - detailsEl.offset().top -
parseInt(detailsEl.css('margin-bottom'), 10) - footerHeight;
detailsEl.width(detailsWidth).height(detailsHeight);
+
+ var resultsLoadingEl = jQuery('.navigator-results-loader');
+ resultsLoadingEl
+ .css('top', resultsEl.offset().top)
+ .css('left', resultsEl.offset().left)
+ .width(resultsEl.width() + 10)
+ .height(resultsEl.height() + 10);
};
jQuery(window).on('resize', this.onResize);
this.onResize();
if (resultsWidth) {
jQuery('.navigator-results').width(+resultsWidth);
jQuery('.navigator-side').width(+resultsWidth + 20);
+ this.onResize();
}
});
this.storeQuery(query, this.issues.sorting);
var that = this;
- this.issuesView.$el.addClass('navigator-fetching');
+ jQuery('.navigator-results').addClass('fetching');
if (firstPage) {
this.issues.fetch({
data: fetchQuery,
success: function () {
- that.issuesView.$el.removeClass('navigator-fetching');
+ jQuery('.navigator-results').removeClass('fetching');
that.issuesView.selectFirst();
}
});
data: fetchQuery,
remove: false,
success: function () {
- that.issuesView.$el.removeClass('navigator-fetching');
+ jQuery('.navigator-results').removeClass('fetching');
}
});
}
});
- var IssuesView = Marionette.CollectionView.extend({
- tagName: 'ol',
- className: 'navigator-results-list',
+ var IssuesView = Marionette.CompositeView.extend({
+ template: Handlebars.compile(jQuery('#issues-template').html() || ''),
+ itemViewContainer: '.navigator-results-list',
itemView: IssueView,
emptyView: NoIssuesView,
initialize: function() {
var openIssue = function(el) { el.click(); };
- this.openRule = _.debounce(openIssue, 300);
+ this.openIssue = _.debounce(openIssue, 300);
},
this.$('.active').removeClass('active');
el.addClass('active');
if (open) {
- this.openRule(el);
+ this.openIssue(el);
}
},
selectNext: function() {
if (this.selected < this.collection.length - 1) {
this.selected++;
- var child = this.$el.children().eq(this.selected),
+ var child = this.$(this.itemViewContainer).children().eq(this.selected),
container = jQuery('.navigator-results'),
containerHeight = container.height(),
bottom = child.position().top + child.outerHeight();
// Bulk Change
.coding-rules-bulk-change-dropdown {
- position: fixed;
+ position: absolute;
z-index: 10;
- top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight + @navigatorStatusHeight - 1px;
- left: @navigatorResultsWidth - 200px;
width: 200px;
border: 1px solid @navigatorBorderLightColor;
.box-sizing(border-box);
// Notes
.navigator-notes {
- margin: 0 @navigatorPadding @navigatorPadding 0;
+ margin: 0 @navigatorPadding @navigatorPadding @navigatorPadding;
padding: 0 @navigatorPadding;
border: 1px solid @navigatorBorderColor;
background-color: @navigatorBarBackground;
background-color: @white;
overflow-x: hidden;
overflow-y: auto;
+
+ &.fetching {
+ .navigator-results-list { visibility: hidden; }
+ .navigator-results-loader { display: block; }
+ }
+}
+
+.navigator-results-loader {
+ position: fixed;
+ z-index: 10;
+ display: none;
+ background-color: #fff;
}
.navigator-results-list {
}
& > li + li { margin-top: -1px; }
-
- &.navigator-fetching {
-
- & > li .line-nowrap {
- text-overflow: clip; /* thanks to FF */
- }
-
- &:before {
- position: absolute;
- z-index: 3;
- top: 0; bottom: 0; left: 0; right: 0;
- }
- }
}
.navigator-results-no-results {
.navigator-filter-submit {
position: absolute;
- top: 0; right: 0;
- .size(85px, 100%);
+ bottom: 0; right: 0;
+ .size(85px, @navigatorFiltersHeight);
margin: -1px -1px -1px 0;
padding: 0;
border: 1px solid darken(@blue, 10%);
- .box-sizing(content-box);
background: @blue;
color: #fff;
font-weight: normal;
<%= render :partial => '/issues/templates/header.hbs' -%>
<%= render :partial => '/issues/templates/issue.hbs' -%>
<%= render :partial => '/issues/templates/issues_actions.hbs' -%>
+<%= render :partial => '/issues/templates/issues.hbs' -%>
<%= render :partial => '/issues/templates/no_issues.hbs' -%>
<%= render :partial => '/issues/templates/issues_details_favorite_filter.hbs' -%>
<%= render :partial => '/issues/templates/issue_detail.hbs' -%>
--- /dev/null
+<script id="issues-template" type="text/x-handlebars-template">
+ <ol class="navigator-results-list"></ol>
+ <div class="navigator-results-loader">
+ <i class="spinner"></i>
+ </div>
+</script>