34 Commits
Author SHA1 Message Date
Jonathan Bernard d076b739f5 Reorganized the code into new packages. 2011-10-27 20:14:08 -05:00
Jonathan Bernard b56a708a09 Version 1.2: Refactored JDBLabsWebTimeline, cleaned up libs.
* Removed superfluous ``signpost`` library used by ``HTTPBuilder`` for OAuth
  support.
* Refactored JDBLabsWebTimeline to throw appropriate exceptions when problems
  occur while communicating with the server.
2011-06-28 18:14:43 -05:00
Jonathan Bernard 5b2ecf7b65 Added libraries required to support lib-java 1.1. 2011-06-27 17:22:43 -05:00
Jonathan Bernard 3ca6909b95 Version 1.1: Added support for web timelines.
Web timelines as defined by the JDB Labs Web TimeStamper tool are now supported.

* `TimelineSource` now also takes the timeline config file as constructor input.
* Refactored `Timeline` to use reduce implementation redundencies: internal
  implementations do not duplicate functionality.
* Improved comments in `TimelineProperties`.
* Updated `TimelineSourceFactory` to handle timelines that need to use
  `JDBLabsWebTimelineSource`.
2011-06-27 17:18:15 -05:00
Jonathan Bernard f3ef7db088 Work on front-side UI.
* Resolved D0003: Add day separators.

    * Created ``daySeparatorTemplate`` for ICanHaz templating.
    * Refactored ``EntryListView.render`` to spit out day separators in between
      days on the timeline. Fixed the "Today" separator to the top of the entry
      container. We no longer prepend entries to the entry container, we now put
      them after the top separator in the entry container.
    * Created ``EntryListView.formatDaySeparator`` to format the labels
      according to the relative time to today: "Yesterday", "Last Monday",
      "Friday, May 28" for example.
    * Removed the cludgier ``toWords``, ``daysApart``, and `` capitalize``
      functions that were going to serve the same purpose.
* Resolved D0021: Constrain notes width to mark.
2011-06-17 16:11:18 -05:00
Jonathan Bernard 81503112a8 Work on day separators.
* Overrode ``EntryModel.{get,set}`` to return a ``Date`` object and allow you to
  set the value with either a ``Date`` object, or the JSON date string.
* Updated code to reflect the ``EntryModel.timestamp`` data change.
* Added ``daysApart`` to calculate calendar days between given ``Date``s
* Added ``getEnglishDate`` to return a date description relative to the current
  day ("Today", "Last year" for example).
2011-06-17 16:11:12 -05:00
Jonathan Bernard 1fff94b622 Implemented entry exclusions in UI.
* Resolved D0020: Add exclusion filter for entries.
* Refactored ``timeline`` fields of several objects in ``ts.js`` to be
  ``timelineModel`` to be explicit.
* Added support for exclusions in ``EntryListView.renderOne`` and
  ``EntryListView.render``.
2011-06-16 17:55:01 -05:00
Jonathan Bernard c061ea6c1f Added libraries, ammended build file, built v1.0 release. 2011-06-16 12:41:53 -05:00
Jonathan Bernard 98071f270d Refactored code packages, com.jdbernard -> com.jdblabs
* Updated contact info, package declarations, and config to match.
* Removed com.jdbernard.timestamper.core, it is becoming a seperate library
  project.
2011-06-16 12:33:54 -05:00
Jonathan Bernard eef44ecd0c Moved code to the com.jdblabs.timestamper.core package and fixed contact information. 2011-06-16 12:14:22 -05:00
Jonathan Bernard 6573503094 Initial commit of the TimeStamper Java core library.
This library grew out of the TimeStamper GUI application. Earlier repository
history can be found there.
2011-06-16 12:09:56 -05:00
Jonathan Bernard cd182d54c3 Fixing problems introduced by the model change.
* Many calls to ``ts_ext_data:get_properties/1`` from ``ts_api`` were passing
  the record reference, not the record itself. Fixed.
* Created ``ts_api:put_user/2`` which updates a ``ts_user`` record. This is
  needed specifically for updating the ``liat_timeline`` extended data property.
* Removed unreachable code in ``ts_api:post_entry/3``
* Fixed return value of some ``ts_user`` functions to use the
  ``{Status, Value}`` convention. TODO: make sure all calls are using the same
  convention.
* Fixed error message formatting in ``ts_ext_data:set_property/3``.
* Added clauses to ``ts_json:ejson_to_record/2``,
  ``ts_json:ejson_to_record_strict/2`` and ``ts_json:construct_record/3`` to
  handle the ``ts_user`` record type.
* Added code to ``AppView.loadInitialData`` and ``AppView.selectTimeline`` to
  support the ``last_timeline`` extended data property.
2011-06-15 16:59:00 -05:00
Jonathan Bernard 1161f6b752 Added feature brainstorming doc. 2011-05-06 17:47:16 -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 06556020d4 UI Tweak: column headers, re-alignments.
- Added 'start' and 'duration' headers to day seperators.
- Right-aligned start and duration columns.
- Changed duration to 'Xhr Ym' instead of 'HH:MM:SS'.
- Added a section using 12hr time format instead of 24hr for comparison.
2011-05-06 13:14:57 -05:00
Jonathan Bernard f4fe5559b1 Reorganizing UI, adding TimelineListView. 2011-04-27 16:59:33 -05:00
Jonathan Bernard 3c3d553768 Bugfix in ts_api:delete_entry/1, bad case clause ordering. 2011-03-10 16:00:46 -06: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 e6fcf736bb Reset configs again, forgot. 2011-03-03 17:11:27 -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 dfab257a12 Reset the config files. 2011-03-01 18:13:47 -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 efab46f167 Win32-specific configuration. 2011-03-01 08:59:10 -06:00
Jonathan Bernard 1a3c0d5c4e Further updates to page. Small update to internal API.
Internal API update functions now accept partial updates, allowing one to
selectively update only some fields of a particular record.
2011-02-14 17:16:37 -06:00
Jonathan Bernard 9c645e9a88 Changed the header and link presentation. 2011-02-11 17:09:58 -06:00
Jonathan Bernard 6bdf0ab526 The main app page is starting to take form.
Created stylesheet for page.
Added real content and structure to the app page.
2011-02-11 16:35:11 -06:00
Jonathan Bernard 6e2e0d5f00 Redesigned API URL structure. Updated ts_api to implement this.
Implemented ts_api:list_timelines/2.
Adjusted ts_timeline:list/3 to be 0-indexed.
Changed ts_user password hash to use a random salt + SHA1
Added some skeleton testing code.
2011-02-04 17:19:53 -06:00
Jonathan Bernard 1575e25898 Implemented ts_api:get_user/2, ts_api:put_user/1, and ts_api:post_user/1.
Created a utility function for OK results, ts_api:make_json_200/2
Created ts_common:new/1 and ts_common:update/1 to generalize record creation and update.
Refactored ts_timeline:new/1 and ts_timeline:update/1 to use the ts_common functions.
Implemented ts_json:record_to_ejson/1 and ts_json:ejson_to_record/1 for ts_user records.
Implemented ts_user module.
2011-02-03 17:23:40 -06:00
Jonathan Bernard 6fe9184c8e Continuing work on the API.
The id_counter module now includes the record directly in the source.
Fixed many typos and small syntax errors.
Added ts_api:dispatch_user/2 to handle different HTTP methods.
Added method placeholder stubs to ts_api.
Implemented ts_api:list_entries/3.
Added ts_user record and ts_user module.
Implemented ts_entry:list/4, the more generic guts of the other list functions.
Created ts_entry:list_asc/3 and ts_entry:list_desc/3.
Fixed ts_json:encode_datetime/1.
2011-02-02 16:57:58 -06:00
Jonathan Bernard c04b73d9cc More implementation.
Modified intent of ts_db_records. timestamp value is no longer a
  {Date, Time} value, it is now gregorian seconds since year 0.
  This was done to make queries that are based on date comparisons
  easier to write and more efficient.
Added date time comparison function to ts_common.
Implemented update/1 and list/3 for ts_entry.
2011-01-28 16:57:15 -06:00
Jonathan Bernard f3a049777a Many changes, bad commit message. 2011-01-18 17:58:29 -06:00
Jonathan Bernard ab1c7f2393 Fleshed out CategorizationPlan implementation.
Added findEntriesToRecategorize() to CategorizationPlan
Refactored createNewCategory() to newCategory() on CategorizationPlan
Refactored Category to use CategorizationPlans
Created CatPlan for DescriptionBasedCategory
Made Event cloneable.
Refactored Category implementations to be aware of the single arg
  Category constructor.
Created TwoLevelCategory, for entries which inherently have two levels
  of categorization in them.
Created a CatPlan for TwoLevelCategory
Removed the specialization implementation, ITHelpCategory: the new
  TwoLevelCategory is a more general version of the same.
Created CatPlan for TicketCategory
Fixed TicketCategory and TicketPlan to adjust for small difference between
  the old behavour of ITHelpCategory and new TwoLevelCategory
Updated testing starter script.
2011-01-12 17:21:39 -06:00
Jonathan Bernard 6de924927a Created TimelineEventProcessor. Tested existing implementation. 2011-01-10 18:03:19 -06:00