mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
tag polish
This commit is contained in:
parent
cdad1ff3e6
commit
795c02178a
@ -87,9 +87,6 @@
|
||||
const tag_delimiter = '<%= PageTag::SUBMISSION_DELIMITER %>';
|
||||
const hidden_field = $('#<%= field_uuid %>');
|
||||
|
||||
console.log('updating tags to ');
|
||||
console.log(tags.join(tag_delimiter));
|
||||
|
||||
// Update our selected tags
|
||||
hidden_field.val(tags.join(tag_delimiter));
|
||||
|
||||
@ -117,10 +114,10 @@
|
||||
},
|
||||
fireTagsUpdateEvent() {
|
||||
update_hidden_page_tag_value(this.tags);
|
||||
this.$el.dispatchEvent(new CustomEvent('tags-update', {
|
||||
detail: { tags: this.tags },
|
||||
bubbles: true,
|
||||
}));
|
||||
// this.$el.dispatchEvent(new CustomEvent('tags-update', {
|
||||
// detail: { tags: this.tags },
|
||||
// bubbles: true,
|
||||
// }));
|
||||
},
|
||||
hasTag(tag) {
|
||||
var tag = this.tags.find(e => {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<% field[:value].each do |tag| %>
|
||||
<span class="inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm bg-notebook-blue text-white">
|
||||
<span class="inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm <%= @content.class.color %> text-white">
|
||||
<%= tag %>
|
||||
<button type="button" class="flex-shrink-0 ml-2 h-4 w-4 rounded-full inline-flex items-center justify-center text-gray-100 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white">
|
||||
<button type="button" class="flex-shrink-0 ml-2 h-4 w-4 rounded-full inline-flex items-center justify-center text-white hover:bg-white hover:text-red-500 focus:outline-none">
|
||||
<span class="sr-only">Remove tag: <%= tag %></span>
|
||||
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
|
||||
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user