hide that "Load more" button if you delete all questions
This commit is contained in:
parent
66c5e46a78
commit
d5fcec4d7d
|
@ -40,6 +40,7 @@
|
||||||
success: (data, status, jqxhr) ->
|
success: (data, status, jqxhr) ->
|
||||||
if data.success
|
if data.success
|
||||||
succ = yes
|
succ = yes
|
||||||
|
($ "div#pagination, button#load-more-btn").slideUp()
|
||||||
entries = ($ "div#entries")
|
entries = ($ "div#entries")
|
||||||
entries.slideUp 400, ->
|
entries.slideUp 400, ->
|
||||||
entries.html("Nothing to see here.")
|
entries.html("Nothing to see here.")
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title Actions
|
%h3.panel-title Actions
|
||||||
.panel-body
|
.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
|
%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
|
Loading…
Reference in New Issue