Skip to content

Commit

Permalink
Fixed Show more of table (publiclab#3866)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhscoder authored and jywarren committed Nov 14, 2018
1 parent 78b9b0f commit beaa0b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/grids/_notes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<% end %>
</tr>
<% end %>
<% if nodes.count > 9 %>
<% if nodes.count > 10 %>
<tfoot>
<th class="show-all"><a>Show <%= nodes.length - 10 %> more <b class="caret"></b></a></th>
<th class="show-all" id="notes-table-footer"><a>Show <%= nodes.length - 10 %> more <b class="caret"></b></a></th>
<th></th>
<th></th>
<th></th>
Expand All @@ -76,6 +76,7 @@
(function(){
$(".<%= className %>-<%= randomSeed %> .show-all a").click(function() {
$(".<%= className %>-<%= randomSeed %> tr.hide").toggleClass("hide");
$("#notes-table-footer")[0].innerHTML="";
});
$(".grid-embed-<%= randomSeed %>").click(function() {
prompt('Use this HTML code to embed this table on another site.', '<iframe style="border:none;" width="100%" height="900px" src="//publiclab.org/embed/grid/<% if type != "notes" %><%= type.gsub('questions', 'question').gsub('activities', 'activity') %>:<% end %><%= tagname %>"></iframe>')
Expand Down

0 comments on commit beaa0b5

Please sign in to comment.