23 Commits

Author SHA1 Message Date
Jonathan Bernard
cf42d133f6 Added UI for timeline creation. 2011-06-01 06:29:48 -05:00
Jonathan Bernard
2cc17b85f1 Implemented notes UI.
- Switched from a global reset in www/css/ts-screen.scss to a selected
  top-level elements reset to allow default formatting for user notes.
- Restructured the #entry-list and entry displays.
- Restructured notes div, now has a sub-div for text and a textarea
  element for input.
- Added Showdown.js, a JavaScript Markdown library for formatting comments.
- Moved EntryView blur events to the View events map.
- Added images for expansion of notes.
- Added the ability to edit notes.
- Split EntryListView.addOne into renderOne and addOne so that renderOne
  can be called with a new entry (fixes duration glitch)
2011-05-16 04:09:37 -05:00
Jonathan Bernard
808492154d Adding hover-able icons to timeline entries.
- Added notes and delete icons right and left entry marks respectively.
- Notes icon slide toggles the notes display (hidden by default).
2011-05-09 10:52:21 -05:00
Jonathan Bernard
74d8a7f015 Duration display, time formatting, UI tweaks.
Client Behaviour (ts.js)
========================

- Created EntryView.getViewModel: translates model data to view data,
  specifically synthesizes the start time and duration from the timestamp.
- Added nextModel option to EntryView, needed for calculating the entry
  duration.
- Created EntryView.formatStart: given the timestamp, return the start time,
  in HH:MM format. Code is written for both 24hr and 12hr format, still need
  to write a selector mechanism. For now, uses 12hr format.
- Created EntryView.formatDuration: Get the duration of the entry based on
  this entry's timestamp and and the next entry's timestamp in a display-able
  form. If nextModel is `null` or `undefined` it is assumed that `model`
  is the most recent model and duration is calculated against the current time.
- Changed EntryView.render to use getViewModel.
- Added 'blur' listeners to the mark and timestamp input fields to close them
  without persisting the changes.
- Created EntryView.update: Refresh the display based on the model using the
  existing DOM elements.
- EntryView.save() now uses EntryView.update() instead of EntryView.render()
  and no longer includes an implicit close()
- EntryView.close() has been split into seperate save() and close() functions,
  to persist the changes and hide the input dialogs, respectively.
- EntryListView.addOne now passes the nextModel to EntryViews is creates.
- EntryListView.createNewEntryOnEnter() now clear the new intry input after
  creating a new entry.
- EntryListView.render() now uses a for-structure to traverse the entry
  collection and passes the nextModel (if there is one) to EntryListView.addOne.

Client UI (ts-screen.scss)
==========================

- Font size, family, and color adjusted on timeline and user input fields.
- Day seperator secondary header colors adjusted.
- Mark column width shortened, timestamp and duration columns widened.
- Styles added for notes UI

Client UI (index.yaws)
======================

- Markup changes needed for getViewModel chanes.
- Expanded day seperator.
2011-05-07 22:03:02 -05:00
Jonathan Bernard
036177cfed Duration display, time formatting, UI tweaks.
Client Behaviour (ts.js)
========================

- Created EntryView.getViewModel: translates model data to view data,
  specifically synthesizes the start time and duration from the timestamp.
- Added nextModel option to EntryView, needed for calculating the entry
  duration.
- Created EntryView.formatStart: given the timestamp, return the start time,
  in HH:MM format. Code is written for both 24hr and 12hr format, still need
  to write a selector mechanism. For now, uses 12hr format.
- Created EntryView.formatDuration: Get the duration of the entry based on
  this entry's timestamp and and the next entry's timestamp in a display-able
  form. If nextModel is `null` or `undefined` it is assumed that `model`
  is the most recent model and duration is calculated against the current time.
- Changed EntryView.render to use getViewModel.
- Added 'blur' listeners to the mark and timestamp input fields to close them
  without persisting the changes.
- Created EntryView.update: Refresh the display based on the model using the
  existing DOM elements.
- EntryView.save() now uses EntryView.update() instead of EntryView.render()
  and no longer includes an implicit close()
- EntryView.close() has been split into seperate save() and close() functions,
  to persist the changes and hide the input dialogs, respectively.
- EntryListView.addOne now passes the nextModel to EntryViews is creates.
- EntryListView.createNewEntryOnEnter() now clear the new intry input after
  creating a new entry.
- EntryListView.render() now uses a for-structure to traverse the entry
  collection and passes the nextModel (if there is one) to EntryListView.addOne.

Client UI (ts-screen.scss)
==========================

- Font size, family, and color adjusted on timeline and user input fields.
- Day seperator secondary header colors adjusted.
- Mark column width shortened, timestamp and duration columns widened.
- Styles added for notes UI

Client UI (index.yaws)
======================

- Markup changes needed for getViewModel chanes.
- Expanded day seperator.
2011-05-07 21:31:30 -05:00
Jonathan Bernard
65dbab9c13 Replaced jQuery UI login dialog with home-grown login.
- New login hides the entire underlying page when open.
- Fits the current design.
2011-05-06 17:45:56 -05:00
Jonathan Bernard
dd3387a0f1 Trying to tighten up the design. More functionality implemented. 2011-05-03 12:50:03 -05:00
Jonathan Bernard
f4fe5559b1 Reorganizing UI, adding TimelineListView. 2011-04-27 16:59:33 -05:00
Jonathan Bernard
302bc9ccdd Trying to gather thoughts and code coherently.
Added client-side architecture model.
Playing with UI code.
2011-04-27 14:11:54 -05:00
Jonathan Bernard
9025a2f8f6 Trying a view for user, timeline(s), entry(ies). 2011-04-20 09:40:54 -05:00
Jonathan Bernard
e10ec26a21 Implementing new client design using Backbone.js. 2011-04-15 13:26:55 -05:00
Jonathan Bernard
4d124ffeba Fixing dev config. Starting to implement sign-up.
Added 'default' make target to only compile.
Reset development configuration.
Commented out starts of tests.
Added sign-up GUI to login panel.
Moved application from /ts/ to /
2011-03-16 07:39:09 -05:00
Jonathan Bernard
39c3b83d3f Implemented edit and update for entries.
- Added ts_entry:delete/1 to delete an entry from the database.
- Implemented ts_api:delete_entry/3.
- Added a form to facilitate editing individual entries.
- Moved the small show/hide functions directly into the HTML.
- Wired up the update timeline form.
- Wired up the edit and update entry form.
2011-03-08 18:02:33 -06:00
Jonathan Bernard
1b1e31059b 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.
2011-03-07 16:43:40 -06:00
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
Jonathan Bernard
348c73a36f Bugfix and documentation.
- Fixed a bug in ts_api:list_timelines/2 and ts_api:list_entries/3, which
  respond only to GET requests but were looking for POST data.
- Added documentation for ts.js.
2011-03-01 18:00:51 -06:00
Jonathan Bernard
439a080f14 Started adding implementation of client-side functionality.
- Changed ts_api:dispatch_user/3 to return information for the user currently,
  authenticated if a valid session id is presented and no username is presented.
- Moved the generic styling of form > * elements to be specific to .bar > form.
- Added jQuery U 1.8.0.
- Created login dialog that will automatically load upon page load if the user
  is not logged in.
- Added styling for jQuery UI login dialog.
- Implemented login functionality on the client page.
- Implemented functionality to load user and timeline records on the client
  side.
2011-03-01 08:23:51 -06:00
Jonathan Bernard
4492f87a39 Added user_summary to api.
Added ts_api:dispatch_app/3
Added ts_api:get_user_summary/2
Fixed compile errors in ts_user.
Added comments.
2011-02-24 07:29:30 -06:00
Jonathan Bernard
ddc12cec64 Further work on web interface. 2011-02-14 09:01:32 -06:00
Jonathan Bernard
19fc37c772 Working on new entry. 2011-02-13 11:38:50 -06:00
Jonathan Bernard
d743635865 Added more JS event handler implementations. 2011-02-12 14:57:29 -06:00
Jonathan Bernard
6197363508 More progress on the application page.
Created and styled the forms for updating user/timeline information.
Wired the hidden forms to links that expose them using jQuery.
2011-02-12 07:48:19 -06:00
Jonathan Bernard
afca12ecc9 Started working on the client-side code. 2011-02-10 07:47:35 -06:00