Commit Graph
10 Commits
Author SHA1 Message Date
Jonathan Bernard c42a3805c2 Fixed UI surrounding day separators.
* Reworked separator display. Now it is handled by the
  `EntryListView.renderOne` function instead of `EntryListView.render`. This
  way the proper separator is inserted even if we are only adding one new entry
  (like when creating a new entry) and not only when we refresh the list.
* Added a periodic refresh function that is triggered every minute. It
  refreshes the current entry so the duration is current, and refreshes te main
  list when a new day begins.
2013-10-24 14:55:08 +00:00
Jonathan Bernard f4eeb91d1a Fixed deploy target, new entry creation.
* Modified make target `deploy` to require the `build` target first.
* When creating a new timestamp entry we no longer refresh the collection from
  the server. Now we use the `success` callback to set the server-supplied
  values on the model.
2013-10-22 16:46:34 +00:00
Jonathan Bernard a3c55e918e Bugfixes: session management, new entry creation.
* Changed the cookie Path value to allow the cookie to be reused for the
  domain, not just ths `/ts_api` path. This allows the user to refresh the page
  and reuse their existing session as long as it is not stale.
* Fixed a bug in the `ts_json:ejson_to_record_strict/2` function. It was
  expecting a record out of `ts_json:ejson_to_record/2` but that function
  returns a tuple with the record and extended data. Because of the way
  `ejson_to_record_strict` uses case statements to check for specific values it
  was still passing the parsed record and data through, but all the checks were
  being bypassed.
* Fixed bugs in the `index.yaws` bootstrap code for the case where the user
  already has a valid session.
* Added `urlRoot` functions to the Backbone model definitions.
* Changed the behavior of the new entry creation method. We were trying to
  fetch just updated attributes from the server for the model we created, but
  we were pulling all the entries due to the URL backbone was using. This led
  to the new client-side model having all the previous entry models as
  attributes. Ideally we would fix the fetch so that only the one model is
  requested from the server, but we run into a catch-22 because the lookup id
  is not know by the client as it is generated on the server-side. For now I
  have changed this behavior so that we still pull all entries, but we pull
  them into the collection. The collection is then smart enough to update the
  entries that have changed (namely the new one). The server returns the newly
  created entry attributes in response to the POST request that the client
  makes initially, so when I have more time to work on this I plan to do away
  with the fetch after create, and just pull in the data from the server's
  response.
* Changed formatting.
2013-10-22 15:32:22 +00:00
Jonathan Bernard 0278179452 Extended the session timeout to 6 hours. 2013-10-15 14:26:38 +00:00
Jonathan Bernard 774778ee55 Added UUID binary. 2013-10-11 20:45:45 +00:00
Jonathan Bernard 98032e2b89 Added UUIDs to timestamps, refactored the build process
* Added UUIDs to `ts_entry` records. Updated `ts_json:construct_record` to
  respond to `uuid` member properties if present. UUIDs are not required by the
  strict parsing functions in `ts_json` because the client will make a request
  with no UUID if it is a purely new timestamp. IN fact, this is the normal
  case. The UUID is only present when another tool is syncing its copy of this
  timeline wand adding entries that it has created and assigned UUIDs to.
* `ts_entry:new` will create a UUID for a new entry if it does not already have
  one.
* Restructured the build process to put all build artifacts into a dedicated
  `build` subdirectory, instead of mising them in an amongst the source code.
* Added the `uuid` module to the project. It can be found at

      https://gitorious.org/avtobiff/erlang-uuid

* Rewrote asset URLs to use relative paths instead of absolute paths. Relative
  paths are correct in this case, becuase assets always live alongside the HTML
  pages. This change was needed to accomodate the new organization of the JDB
  Labs dev environment, where all projects live under subdirectories of the
  same virtual server instead of subdomains.
* Tweaked the timestamp entry fields in the web UI to save when the field is
  blurred, not just when <Enter> or <Ctrl>-<Enter> is pressed (though those
  still work).
2013-10-11 20:06:31 +00:00
Jonathan Bernard 9b357359b6 Rewrote resource URLs to use the page protocol. 2013-09-22 21:48:56 +00:00
Jonathan Bernard 100ca8fd74 Added SSL, CORS support for the API. 2013-09-21 17:19:13 +00:00
Jonathan Bernard 1e05258381 Bugfixes.
* ts_api:list_timelines/2 was looking for keys as atoms instead of lists (strings).
* Exported the ts_json:decode_datetime/1 function (needed by ts_api module).
* Fixed a crash case when trying to check the credentials of a non-existent user.
2013-09-15 00:33:02 +00:00
Jonathan Bernard 38dc560686 Updated yaws_api.hrl, prod configuration (to live alongside VBS). 2013-09-13 01:56:45 +00:00