<div class="search-navigator-header-actions">
{{#notNull state.total}}
- <div class="search-navigator-header-pagination">
+ <div class="search-navigator-header-pagination flash flash-heavy">
{{#gt state.total 0}}
<a class="js-prev icon-prev" title="{{t 'paging_previous'}}"></a>
<span class="current">{{sum state.selectedIndex 1}} / <span
<div class="search-navigator-header-actions">
{{#notNull state.total}}
- <div class="search-navigator-header-pagination">
+ <div class="search-navigator-header-pagination flash flash-heavy">
{{#gt state.total 0}}
<a class="js-prev icon-prev" title="{{t "paging_previous"}}"></a>
<span class="current">
import './templates';
var COMPONENT_HEIGHT = 29,
- BOTTOM_OFFSET = 10;
+ BOTTOM_OFFSET = 60;
export default WorkspaceListView.extend({
template: Templates['issues-workspace-list'],
this.fetchNextPage().done(function () {
that.options.app.state.set({ selectedIndex: index });
});
+ } else {
+ this.options.app.list.trigger('limitReached');
}
}
},
var index = this.options.app.state.get('selectedIndex') - 1;
if (index >= 0) {
this.options.app.state.set({ selectedIndex: index });
+ } else {
+ this.options.app.list.trigger('limitReached');
}
}
collectionEvents: function () {
return {
- 'all': 'render'
+ 'all': 'shouldRender',
+ 'limitReached': 'flashPagination'
};
},
},
+ shouldRender: function (event) {
+ if (event !== 'limitReached') {
+ this.render();
+ }
+ },
+
reload: function () {
this.options.app.controller.fetchList();
},
this.options.app.controller.selectPrev();
},
+ flashPagination: function () {
+ var flashElement = this.$('.search-navigator-header-pagination');
+ flashElement.addClass('in');
+ setTimeout(function () {
+ flashElement.removeClass('in');
+ }, 2000);
+ },
+
serializeData: function () {
return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
state: this.options.app.state.toJSON()
define(function () {
- var $ = jQuery;
+ var $ = jQuery,
+ BOTTOM_OFFSET = 60;
return Marionette.CompositeView.extend({
var selectedView = this.children.findByModel(selected),
parentTopOffset = this.$el.offset().top,
viewTop = selectedView.$el.offset().top - parentTopOffset,
- viewBottom = selectedView.$el.offset().top + selectedView.$el.outerHeight(),
+ viewBottom = selectedView.$el.offset().top + selectedView.$el.outerHeight() + BOTTOM_OFFSET,
windowTop = $(window).scrollTop(),
windowBottom = windowTop + $(window).height();
if (viewTop < windowTop) {
background-color: #fcf8e3;
}
}
+
+.flash-heavy.in {
+ background-color: #ffe456;
+}