timestamper/www/ts/index.yaws
Jonathan Bernard 122a3bd1e3 Started implementing entry loading in client side.
- Bug fix in ts_entry:new/1. Msspelled ``atomic``.
- Bug fix in ts_json:record_to_ejson/1. For ``ts_entry`` records, the
  Username and TimelineId elements were not being converted from atoms to list.
- Added the entry template for loaded and created entry elements.
- Added ICanHaz.js (which wraps mustache.js) and underscore.js.
- Implemented a naive version of displayEntries() in ts.js.
- Added debug alerts for error cases in ts.js.
- Styling the new entry elements.
2011-03-03 17:09:13 -06:00

146 lines
6.5 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<title>TimeStamper - Simple Time Tracking</title>
<link rel="stylesheet" media="screen" href="/css/dot-luv/jquery-ui-1.8.10.custom.css" type="text/css"/>
<link rel="stylesheet" media="screen" href="/css/ts-screen.css" type="text/css"/>
<script type="text/javascript" src="/js/jquery-1.5.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="/js/underscore-min.js"></script>
<script type="text/javascript" src="/js/ICanHaz.min.js"></script>
<script type="text/javascript" src="/js/ts.js"></script>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script id="entry" type="text/html">
<div class="entry-bar" id="entry-{{entry_id}}">
<span class="id">{{entry_id}}.</span>
<span class="details">
<span class="entry-mark">{{mark}}</span>
<span class="entry-notes">{{notes}}</span>
</span>
</div>
</script>
</head>
<body>
<div id="user" class="bar">
<span id="fullname">Not Logged In</span>
<span id="username">- no_user</span>
<div class="control-links">
<a href="/ts/edit-user.yaws"
onclick="toggleUserInfo(event)">user info</a>
<a href="/ts/logout.yaws" onclick="logout(event)">logout</a>
</div>
<div id="user-info">
<form action="/ts/update-user.yaws" onsubmit="updateUser(event)">
<div class="form-col">
<label for="fullname-input"><span>name:</span>
<input id="fullname-input" name="fullname"
class="text-input" type="text"/>
</label>
<label for="email-input"><span>email:</span>
<input id="email-input" name="email"
class="text-input" type="text"/>
</label>
</div>
<div class="form-col">
<div id="change-pwd">
<label for="old-pwd-input"><span>password:</span>
<input id="old-pwd-input" name="old-pwd"
class="text-input" type="password"/>
</label>
<label for="new-pwd-input"><span>new pwd:</span>
<input id="new-pwd-input" name="new-pwd"
class="text-input" type="password"/>
</label>
<label for="new-pwd-conf-input"><span>confirm:</span>
<input id="new-pwd-conf-input" name="new-pwd-conf"
class="text-input" type="password"/>
</label>
</div>
<label for="enable-pwd-change-input">
<input name="enable-pwd-change" type="checkbox"
id="enable-pwd-change-input"
onclick="showChangePwd(event)"/>
change password
</label>
</div>
<div class="form-submit">
<div>
<input name="submit-user" type="submit"
value="save changes"/>
</div>
</div>
</form>
</div>
</div>
<div id="timeline" class="bar">
<span id="timeline-name">timeline |</span>
<span id="timeline-desc">timeline description</span>
<div class="control-links">
<a href="/ts/edit-timeline.yaws"
onclick="toggleTimelineInfo(event)">timeline info</a>
<a href="/ts/select-timeline.yaws"
onclick="showTimelineMenu(event)">change timelines</a>
</div>
<div id="timeline-info">
<form action="/ts/update-timeline.yaws"
onsubmit="updateTimeline(event); false">
<label for="timeline-desc-input"><span>description:</span>
<input id="timeline-desc-input" class="text-input"
name="timeline-desc" type="text"/>
</label>
<div class="form-submit">
<div><input name="submit-timeline" type="submit"
value="save changes"/></div>
</div>
</form>
</div>
</div>
<div id="new-entry" class="bar">
<form action="/ts/new-entry.yaws" onsubmit="newEntry(event)">
begin a new activity:
<input name="new-entry" id="new-entry-input"
class="text-input" type="text"/>
<input name="submit-entry" id="submit-entry"
class="form-submit" type="submit" value="create entry"/>
<div class="control-links">
<a id="show-notes" href="#"
onclick="showNewNotes(event)">add notes</a>
</div>
<div id="add-notes" class="form-col">
<label for="new-notes-input">notes:</label>
<textarea name="new-notes" id="new-notes-input"
class="text-input" rows="8" cols="40" ></textarea>
</div>
</form>
</div>
<div id="more-entries" class="last-bar">
<a href="#" onclick="loadMoreEntries();">load more entries</a>
</div>
<div id="login-dialog" title="Login">
<form>
<fieldset>
<label for="login-name">Username:</label>
<input type="text" name="login-name" id="login-name"
class="text ui-widget-content ui-corner-all"></input>
<label for="login-password">Password:</label>
<input type="password" name="login-password" id="login-password"
class="text ui-widget-content ui-corner-all"></input>
</fieldset>
</form>
<p class="validate-tips"></p>
</div>
</body>
</html>