diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index ff553e0b..0741ce09 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -40,6 +40,7 @@ success: (data, status, jqxhr) -> if data.success succ = yes + ($ "div#pagination, button#load-more-btn").slideUp() entries = ($ "div#entries") entries.slideUp 400, -> entries.html("Nothing to see here.") diff --git a/app/views/inbox/_sidebar.html.haml b/app/views/inbox/_sidebar.html.haml index c9629caf..dedb5906 100644 --- a/app/views/inbox/_sidebar.html.haml +++ b/app/views/inbox/_sidebar.html.haml @@ -17,4 +17,4 @@ .panel-heading %h3.panel-title Actions .panel-body - %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (@inbox.empty? ? 'disabled' : nil), data: { ib_count: @inbox.count }} Delete all questions \ No newline at end of file + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (Inbox.where(user: current_user).empty? ? 'disabled' : nil), data: { ib_count: Inbox.where(user: current_user).count }} Delete all questions \ No newline at end of file