Browse Source

*: Added autofocus on all forms' first input or select.

1.1
Gisle Aune 6 years ago
parent
commit
7a1884d1cf
  1. 2
      marko/components/story-tag-options/index.marko
  2. 2
      marko/page/data/components/add-channel-modal/index.marko
  3. 2
      marko/page/data/components/add-character-modal/index.marko
  4. 2
      marko/page/data/components/edit-channel-modal/index.marko
  5. 2
      marko/page/data/components/edit-character-modal/index.marko
  6. 2
      marko/page/logs-content/components/add-post-modal/index.marko
  7. 2
      marko/page/logs-content/components/edit-log-modal/index.marko
  8. 2
      marko/page/logs-content/components/edit-post-modal/index.marko
  9. 2
      marko/page/logs/components/add-filter-modal-body/index.marko
  10. 2
      marko/page/logs/components/add-log-modal/index.marko
  11. 2
      marko/page/story-content/components/create-chapter-modal/index.marko
  12. 2
      marko/page/story-content/components/edit-chapter-modal/index.marko
  13. 2
      marko/page/story-content/components/edit-story-modal/index.marko
  14. 2
      marko/page/story-content/components/move-chapter-modal/index.marko
  15. 2
      marko/page/story/components/add-story-modal/index.marko

2
marko/components/story-tag-options/index.marko

@ -1,7 +1,7 @@
<div class="tag-options"> <div class="tag-options">
<div class="field"> <div class="field">
<label>Tag Name</label> <label>Tag Name</label>
<input key="name" placeholder="Name" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="Name" on-change("change", "name") value=state.values.name />
</div> </div>
<div class="field"> <div class="field">
<label>Tag Kind</label> <label>Tag Kind</label>

2
marko/page/data/components/add-channel-modal/index.marko

@ -4,7 +4,7 @@
<p class="color-error">${state.error}</p> <p class="color-error">${state.error}</p>
<label>Name</label> <label>Name</label>
<input key="name" placeholder="(Required)" class="big" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="(Required)" class="big" on-change("change", "name") value=state.values.name />
<label>Event Name</label> <label>Event Name</label>
<input key="eventName" placeholder="(None)" on-change("change", "eventName") value=state.values.eventName /> <input key="eventName" placeholder="(None)" on-change("change", "eventName") value=state.values.eventName />

2
marko/page/data/components/add-character-modal/index.marko

@ -4,7 +4,7 @@
<p class="color-error">${state.error}</p> <p class="color-error">${state.error}</p>
<label>Full Name</label> <label>Full Name</label>
<input key="name" placeholder="" class="big" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="" class="big" on-change("change", "name") value=state.values.name />
<label>IRC Nick</label> <label>IRC Nick</label>
<input key="nick" placeholder="" on-change("change", "nick") value=state.values.nick /> <input key="nick" placeholder="" on-change("change", "nick") value=state.values.nick />

2
marko/page/data/components/edit-channel-modal/index.marko

@ -4,7 +4,7 @@
<p class="color-error">${state.error}</p> <p class="color-error">${state.error}</p>
<label>Event Name</label> <label>Event Name</label>
<input key="eventName" placeholder="(None)" on-change("change", "eventName") value=state.values.eventName />
<input key="eventName" autofocus placeholder="(None)" on-change("change", "eventName") value=state.values.eventName />
<label>Location Name</label> <label>Location Name</label>
<input key="locationName" placeholder="(None)" on-change("change", "locationName") value=state.values.locationName /> <input key="locationName" placeholder="(None)" on-change("change", "locationName") value=state.values.locationName />

2
marko/page/data/components/edit-character-modal/index.marko

@ -4,7 +4,7 @@
<p class="color-error">${state.error}</p> <p class="color-error">${state.error}</p>
<label>Full Name</label> <label>Full Name</label>
<input key="name" placeholder="" class="big" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="" class="big" on-change("change", "name") value=state.values.name />
<label>Short Name</label> <label>Short Name</label>
<input key="shortName" placeholder="E.g. first/given name" on-change("change", "shortName") value=state.values.shortName /> <input key="shortName" placeholder="E.g. first/given name" on-change("change", "shortName") value=state.values.shortName />

2
marko/page/logs-content/components/add-post-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Timestamp</label> <label>Timestamp</label>
<input key="time" placeholder="Title" class="big" on-change("change", "time") value=state.values.time />
<input key="time" autofocus placeholder="Title" class="big" on-change("change", "time") value=state.values.time />
<label>Kind</label> <label>Kind</label>
<select key="kind" class="big" placeholder="Kind" on-change("change", "kind") value=state.values.kind> <select key="kind" class="big" placeholder="Kind" on-change("change", "kind") value=state.values.kind>

2
marko/page/logs-content/components/edit-log-modal/index.marko

@ -6,7 +6,7 @@ import moment from "moment"
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="title" placeholder=(input.log.channel.name + " – " + moment(input.log.date).format("MMMM D, YYYY")) class="big" on-change("change", "title") value=state.values.title />
<input key="title" autofocus placeholder=(input.log.channel.name + " – " + moment(input.log.date).format("MMMM D, YYYY")) class="big" on-change("change", "title") value=state.values.title />
<label>Event Name</label> <label>Event Name</label>
<input key="event" placeholder="(Optional)" on-change("change", "event") value=state.values.event /> <input key="event" placeholder="(Optional)" on-change("change", "event") value=state.values.event />

2
marko/page/logs-content/components/edit-post-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Timestamp</label> <label>Timestamp</label>
<input key="time" placeholder="Title" class="big" on-change("change", "time") value=state.values.time />
<input key="time" autofocus placeholder="Title" class="big" on-change("change", "time") value=state.values.time />
<label>Kind</label> <label>Kind</label>
<select key="kind" class="big" placeholder="Kind" on-change("change", "kind") value=state.values.kind> <select key="kind" class="big" placeholder="Kind" on-change("change", "kind") value=state.values.kind>

2
marko/page/logs/components/add-filter-modal-body/index.marko

@ -1,5 +1,5 @@
<label>Search</label> <label>Search</label>
<input key="search" placeholder="" class="big" value=state.search />
<input key="search" autofocus placeholder="" class="big" value=state.search />
<label>Filters</label> <label>Filters</label>
<div if(state.search.length > 0) class="filter-row" > <div if(state.search.length > 0) class="filter-row" >

2
marko/page/logs/components/add-log-modal/index.marko

@ -6,7 +6,7 @@ import moment from "moment"
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="title" placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<input key="title" autofocus placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<label>Date</label> <label>Date</label>
<input key="date" placeholder="(Required)" on-change("change", "date") value=state.values.date /> <input key="date" placeholder="(Required)" on-change("change", "date") value=state.values.date />

2
marko/page/story-content/components/create-chapter-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="title" placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<input key="title" autofocus placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<label>IC Date</label> <label>IC Date</label>
<input key="icdate" placeholder="(Optional)" on-change("change", "fictionalDate") value=state.values.fictionalDate /> <input key="icdate" placeholder="(Optional)" on-change("change", "fictionalDate") value=state.values.fictionalDate />

2
marko/page/story-content/components/edit-chapter-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="title" placeholder="Title" class="big" on-change("change", "title") value=state.values.title />
<input key="title" autofocus placeholder="Title" class="big" on-change("change", "title") value=state.values.title />
<label>IC Date</label> <label>IC Date</label>
<input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate /> <input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate />

2
marko/page/story-content/components/edit-story-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="name" placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
<label>IC Date</label> <label>IC Date</label>
<input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate /> <input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate />

2
marko/page/story-content/components/move-chapter-modal/index.marko

@ -6,7 +6,7 @@ $ const selected = (state.selected||{id:null});
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Target story</label> <label>Target story</label>
<select key="story" on-change("change", "selected") value=selected.id>
<select key="story" on-change("change", "selected") autofocus value=selected.id>
<option for(story in state.stories) value=story.id selected=(selected.id === story.id)>${story.name}</option> <option for(story in state.stories) value=story.id selected=(selected.id === story.id)>${story.name}</option>
</select> </select>

2
marko/page/story/components/add-story-modal/index.marko

@ -4,7 +4,7 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label> <label>Title</label>
<input key="name" placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
<input key="name" autofocus placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
<label>IC Date</label> <label>IC Date</label>
<input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate /> <input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate />

Loading…
Cancel
Save