Implemented entry creation, pagination. Some restyling and bugfixes.
- Bug fix in ts_api:list_entries/3. Case statement matching on atoms but input is a list (string). - Bug fix in ts_api:put_entry/3. Was expecting the wrong result from ts_entry:new/1. - Bug fix in ts_entry:list/4. Code crashed when the starting offset was greater than the total number of elements. Now returns []. - Fixed ts_json:encode_datetime/1 and ts_json:decode_datetime/1 to handle millisecond values in the datetime string (per ISO standard). - Broke out ``control-links`` style to a top-level class. - Added showdown.js, a JS Markdown processor. Not hooked up to anything yet but intend to display entry notes with Markdown. - Added code for entry pagination. Loads the most recent 20 entries and loads more upon demand in batches of 20. - Fixed bug in login routine that kept the user edit fields from being pre-populated. - Rewrote the loadEntries function to double for new entries and loading more existing entries. - Commented displayEntries. Also refactored into displayNewerEntries, which pushed new entries on to the top of the stack, and displayOlderEntries, which tags them onto the bottom. - Implemented hidden notes field for new entry input. - Implemented new entry creation. - Created a helper function to ISO format a Date object. - Expanded entry template to show control links (edit, show notes, del). - Activated the 'load more entries' button.
This commit is contained in:
@ -5,20 +5,30 @@
|
||||
<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"/>
|
||||
<!-- Needed for IE, but I'm not going to support IE with this tool. -->
|
||||
<!--<script type="text/javascript" src="/js/json2.js"></script>-->
|
||||
<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/ICanHaz.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>
|
||||
<span class="id">{{entry_id}}</span>
|
||||
<div class="details">
|
||||
<div class="entry-mark">{{mark}}</div>
|
||||
<div class="entry-notes">{{notes}}</div>
|
||||
</div>
|
||||
<div class="control-links">
|
||||
<a onclick="toggleEntryNotes(event, 'entry-{{entry_id}}')"
|
||||
href="#">show notes</a>
|
||||
<a onclick="editEntry(event, 'entry-{{entry_id}}')"
|
||||
href="#">edit</a>
|
||||
<a onclick="deleteEntry(event, 'entry-{{entry_id}}')"
|
||||
href="#">del</a>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
</head>
|
||||
@ -122,8 +132,10 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="more-entries" class="last-bar">
|
||||
<a href="#" onclick="loadMoreEntries();">load more entries</a>
|
||||
<div id="more-entries" class="last-bar top-entry">
|
||||
<div>
|
||||
<a href="#" onclick="loadEntries(user, activeTimeline, 'old');event.preventDefault()">load more entries</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="login-dialog" title="Login">
|
||||
|
Reference in New Issue
Block a user