Skip to content
Snippets Groups Projects
Commit 41cfea6e authored by Giovanne Marcelo's avatar Giovanne Marcelo
Browse files

Fixing collection counter in show

parent 2846cc76
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,13 @@ $(document).on 'refresh_comments', (e) ->
$.get url, (data) ->
$parent.html('<br>' + data)
num = $('.learning-object-vertical').length
if num == 0
$('.object-number').html("coleção vazia")
else if num == 1
$('.object-number').html("1 objeto")
else
$('.object-number').html( num + " objetos")
$(document).trigger 'create-learning-object-columns'
$(document).trigger 'add_collection_selector'
......
......@@ -7,7 +7,7 @@
<li><h2>Favoritos</h2></li>
<li>
<input type="checkbox" class="count-collections-objects" data-toggle="tooltip" data-placement="bottom" title="Selecionar todos">
<%= bookmark_length @user %>
<span class="object-number"><%= bookmark_length @user %></span>
</li>
</ul>
</div>
......
......@@ -29,8 +29,8 @@
<li><h2><%= (@collection.class != Bookmark) ? @collection.name : "Favoritos" %></h2></li>
<li>
<input type="checkbox" class="count-collections-objects" data-toggle="tooltip" data-placement="bottom" title="Selecionar todos">
<%= collection_length @collection %>
</a>
<span class="object-number"><%= collection_length @collection %>
</span>
</li>
</ul>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment