Skip to content

Commit

Permalink
Merge branch 'master' into actionButton
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen committed May 24, 2021
2 parents 7a3450c + 6102b07 commit 1cde94d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/js/widgets/library_list/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ define([
'click #bulk-delete': 'bulkDelete',
'click #bulk-limit': 'bulkLimit',
'click #select-all-docs-cb': 'toggleAll',
'click #backToTopBtn': 'goToTop',
},

modelEvents: {
Expand All @@ -113,6 +114,15 @@ define([
this.trigger('changeSort');
},

goToTop: function() {
$(document.documentElement).animate(
{
scrollTop: 0,
},
'fast'
);
},

childViewOptions: function() {
if (this.model.get('editRecords')) {
return { permission: true };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
{{#unless query}}
{{#unless error}}
<div class="row" style="margin: 0;">
<div class="row" style="margin: 0; position: relative">
{{#if pageData}}
<div class="col-sm-12 pagination-controls s-pagination-controls">
<div class="col-xs-5 per-page-container">
Expand Down
4 changes: 2 additions & 2 deletions src/styles/sass/ads-sass/any-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ div[data-widget='AlertsWidget'] {

#backToTopBtn {
position: absolute;
right: 2px;
bottom: 2px;
right: 0;
bottom: 0;
}

0 comments on commit 1cde94d

Please sign in to comment.