Browse Source
story, story-content: Made tag editor in add story and edit story tags form more compact.
1.0
story, story-content: Made tag editor in add story and edit story tags form more compact.
1.0
Gisle Aune
6 years ago
2 changed files with 52 additions and 15 deletions
@ -1,21 +1,27 @@ |
|||
<div class="tag-options"> |
|||
<label>Tag Name</label> |
|||
<input key="name" placeholder="Name" on-change("change", "name") value=state.values.name /> |
|||
<label>Tag Kind</label> |
|||
<select key="kind" placeholder="Kind" on-change("change", "kind") value=state.values.kind> |
|||
<option value="Character" selected=(state.values.kind === "Character")>Character</option> |
|||
<option value="Event" selected=(state.values.kind === "Event")>Event</option> |
|||
<option value="Location" selected=(state.values.kind === "Location")>Location</option> |
|||
<option value="Organization" selected=(state.values.kind === "Organization")>Organization</option> |
|||
<option value="Series" selected=(state.values.kind === "Series")>Series</option> |
|||
</select> |
|||
<div class="field"> |
|||
<label>Tag Name</label> |
|||
<input key="name" placeholder="Name" on-change("change", "name") value=state.values.name /> |
|||
</div> |
|||
<div class="field"> |
|||
<label>Tag Kind</label> |
|||
<select key="kind" placeholder="Kind" on-change("change", "kind") value=state.values.kind> |
|||
<option value="Character" selected=(state.values.kind === "Character")>Character</option> |
|||
<option value="Event" selected=(state.values.kind === "Event")>Event</option> |
|||
<option value="Location" selected=(state.values.kind === "Location")>Location</option> |
|||
<option value="Organization" selected=(state.values.kind === "Organization")>Organization</option> |
|||
<option value="Series" selected=(state.values.kind === "Series")>Series</option> |
|||
</select> |
|||
</div> |
|||
<div class="button-field"> |
|||
<button class="add-tag" disabled=(input.loading) on-click("add", state.values)>Add</button> |
|||
</div> |
|||
|
|||
<div class="suggestion-list" if(state.suggestions.length > 0)> |
|||
<div class="header color-menu">Suggestions:</div> |
|||
<a for(tag in state.suggestions) on-click("applySuggestion", tag) class=["tag", "color-tag-" + tag.kind.toLowerCase()]>${tag.name}</a> |
|||
</div> |
|||
|
|||
<button disabled=(input.loading) on-click("add", state.values)>Add</button> |
|||
|
|||
<div for(tag in (input.tags || [])) class="tag" key=(tag.kind+":"+tag.name)> |
|||
<div class=("content color-tag-"+tag.kind.toLowerCase())>${tag.name}</div> |
|||
<button on-click("emit", "remove", tag)>Remove</button> |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue