Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Show More" button from tables #10891

Merged
merged 8 commits into from
Apr 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions app/views/grids/_notes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
<% end %>
</tr>
<% end %>
<% if nodes.count > 10 %>
<tfoot>
<th class="show-all" id="notes-table-footer" style="min-width: 110px;"><a style="cursor: pointer;">Show more <b class="caret"></b></a></th>
<th></th>
<th></th>
<th></th>
</tfoot>
<% end %>
</table>
</div>

Expand All @@ -88,25 +80,6 @@
</p>
<% end %>

<script>
(function(){
$(".<%= className %>-<%= randomSeed %> .show-all a").click(function(event) {
var cName = ".<%= className %>-<%= randomSeed %>";
var sName = cName + " tr.extra";
$(sName).toggleClass("hide");
if ($(sName)[0].classList.contains("hide"))
var hiding = true;
var myElement = event.target;
if (event.target.classList.contains("caret"))
myElement = event.target.parentElement;
if (!hiding)
myElement.innerHTML = 'Show less <b class="caret" style = "transform: rotate(180deg);"></b>';
else
myElement.innerHTML = 'Show more <b class="caret"></b>';
});
//setupGridSorters(".<%= className %>-<%= randomSeed %>"); Should order the items by time. Commented out because it reorders the items each time show more/less is clicked
TildaDares marked this conversation as resolved.
Show resolved Hide resolved
})()
</script>
<style>
th {
position: sticky;
Expand Down