Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
resolved tag persistence issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Sectimus committed Dec 18, 2019
1 parent 3459acb commit ba7e35d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/css/styles.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/styles.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ <h4 class="over card-text lead" style="display:inline-block; ">
<div metadata class="d-flex justify-content-between">
<div class="tags flex-wrap d-flex">
{{#tags}}
<span class="over h-25 px-1"><a href="/view/talks/tags/{{.}}" class="badge badge-primary tag">{{.}}</a></span>
<span class="over px-1"><a href="/view/talks/tags/{{.}}" class="badge badge-primary tag">{{.}}</a></span>
{{/tags}}
<span class="new over h-25 px-1">
<span class="new over px-1">
<form for="newtags" action="/talks/tag/{{id}}" method="post" style="display:none;">
<input type="text" class="form-control" name="tag" placeholder="tag">
</form>
Expand Down
5 changes: 5 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ function drawTalks(talksPromise) {
this.style.width = ctx.measureText(this.value).width + 26 + "px";
});
icon.on("click", function() {
//reset other form elements
$("form[for='newtags']").hide();
$(".tags>.new>.icon").show();
$(this).hide();
//reset the form
html.find("form[for='newtags']>[name='tag']").val("");
html.find("form[for='newtags']").show();
});

Expand Down
3 changes: 3 additions & 0 deletions public/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ $primary: #007bff;
font-size: large;
}
}
& > .new {
height: 24px !important;
}
}
.bookmarks {
cursor: pointer;
Expand Down

0 comments on commit ba7e35d

Please sign in to comment.