Skip to content

Commit

Permalink
merge ... and + buttons for more tags in sidebar (publiclab#8386)
Browse files Browse the repository at this point in the history
* merge ... and + buttons for more tags in sidebar

* Update _tags.html.erb

* revert test changes from publiclab#7715
  • Loading branch information
jywarren authored and manchere committed Feb 13, 2021
1 parent 0ac135d commit 75d98b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/views/tag/_tagging.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ $(function () {
$("#tags-open").click(function(){
$("#tagform").show();
$("#tags-open").hide();
$('.more-tags').show();
$('.show-more-tags').hide();
$(".tag-input").focus();
});
</script>
Expand Down
3 changes: 3 additions & 0 deletions app/views/tag/_tags.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
$('.show-more-tags').click(function showMoreTags() {
$('.more-tags').show();
$('.show-more-tags').hide();
$("#tagform").show();
$("#tags-open").hide();
$(".tag-input").focus();
});
})();
</script>
Expand Down
8 changes: 4 additions & 4 deletions test/system/post_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def setup

# There should be 1 tag that shows up as a badge and 2 as a card
page.assert_selector('.tags-list .card-body', :count => 2)
# page.assert_selector('.tags-list p.badge', :count => 1)
page.assert_selector('.tags-list p.badge', :count => 1)

# accept_alert do
# find('.tags-list p.badge .tag-delete').click()
# end
accept_alert do
find('.tags-list p.badge .tag-delete').click()
end

# Make sure that 1 of the 3 tags is removed
page.assert_selector('.tags-list p.badge', :count => 0)
Expand Down

0 comments on commit 75d98b2

Please sign in to comment.