sitka/overdrive-evergreen-opac.git
5 years agoAdded .gitignore
twirlip [Wed, 1 Oct 2014 18:48:39 +0000 (11:48 -0700)]
Added .gitignore

5 years agoAdd license and copyright
Jeff Davis [Wed, 1 Oct 2014 16:57:17 +0000 (09:57 -0700)]
Add license and copyright

This software was originally published on Google Code with an MIT
License and no copyright statment.  The present commit includes the
license within the source code (see LICENSE.txt) and assigns copyright
to the BC Libraries Cooperative.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
5 years agoComment out console.log in od_api module
Steven Chan [Sun, 21 Sep 2014 20:52:07 +0000 (13:52 -0700)]
Comment out console.log in od_api module

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoComplete the README file
Steven Chan [Fri, 19 Sep 2014 22:41:02 +0000 (15:41 -0700)]
Complete the README file

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFixed erroneous search links for author and title
Steven Chan [Thu, 18 Sep 2014 18:23:56 +0000 (11:23 -0700)]
Fixed erroneous search links for author and title

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoRefine the rendering of myopac account summary table and dashboard
Steven Chan [Thu, 18 Sep 2014 17:51:07 +0000 (10:51 -0700)]
Refine the rendering of myopac account summary table and dashboard

Before, the table and dashboard were built to show empty e-item entries
that would sit there while the user waits for the several API requests
to finish before the total values were available to be placed in the
entries.  Now, the entries are built and shown after values are
available.

A solid gray bar shows in the dashboard during the wait interval. We
would have shown a progress bar, but it's too hard to get it to show
because of interference from the existing style sheet.

The first column of the summary table shows totals for physical items
and was suppressed until the arrival of totals for e-items, but in fact
the totals of physical items are already available from the old table.
Now, we show them immediately, and we don't show the second column at
all until it is filled with values.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix handling of errors for downloading Overdrive Read format
Steven Chan [Mon, 15 Sep 2014 18:33:57 +0000 (11:33 -0700)]
Fix handling of errors for downloading Overdrive Read format

These sort of errors require parameters to be included with the
error-handling URL, and a different format for the notification box.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoHandle errors arising from downloading content
Steven Chan [Sun, 14 Sep 2014 22:39:09 +0000 (15:39 -0700)]
Handle errors arising from downloading content

Any such errors will be embedded in the search parameters of the
myopac/circ page URL. We decode the various components and show them
inside a floating notification box, otherwise we render the page as
normally done.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoWhen decoding search parameters, convert pluses to spaces
Steven Chan [Sun, 14 Sep 2014 22:37:28 +0000 (15:37 -0700)]
When decoding search parameters, convert pluses to spaces

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoUse action dialogue to guide download link process
Steven Chan [Sun, 14 Sep 2014 01:06:17 +0000 (18:06 -0700)]
Use action dialogue to guide download link process

1. Define and use a downloadLink action dialogue
2. Auto-close done content box after 59 seconds
3. For other actions, auto-close after 2 seconds
4. Auto-focus on close button to allow for quick manual close

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix indentation
Steven Chan [Thu, 11 Sep 2014 17:47:27 +0000 (10:47 -0700)]
Fix indentation
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoChange how download button works to allow for right-clicking to work
Steven Chan [Wed, 10 Sep 2014 20:46:56 +0000 (13:46 -0700)]
Change how download button works to allow for right-clicking to work

On user clicking a download button, we convert the download URL to a content URL,
and then convert the button to a link with a new message. This will
allow the link to be used directly, ie, right-clicking to open in a new
tab.

The interaction is not perfect, for example, the content link will be
useful for only 60 seconds. A more elaborate interaction will need to be
devised.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix regression error in checkout action button
Steven Chan [Wed, 10 Sep 2014 20:43:54 +0000 (13:43 -0700)]
Fix regression error in checkout action button

Convert checkout link URLs to reverse proxy format to make it work
again.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix format type mismatch
Steven Chan [Mon, 8 Sep 2014 00:24:24 +0000 (17:24 -0700)]
Fix format type mismatch

The format type that is listed on search results, record details, and
place hold form doesn't match what is listed in the selection option
list of the checkout dialogue.

To remove the mismatch, we need to use the format types found in the
checkout action object, which is gotten from Availability, rather than
the basic list found from Metadata.  The difference is presumably due to
Advantage accounts.

For search results or record details, we omit the call for Metadata and
substitute the format types from checkout action. For place hold form,
we cannot omit a call to Metadata, because it supplies title details as
well as format types. Therefore, we have to reschedule the asynchronous
calls to Metadata and Availability to run in parallel, wait for both
results, and then check to see if there is a checkout action in
Availability before being able to do the right thing.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoRewording of direct link to Overdrive in holds/checkouts list
Steven Chan [Fri, 5 Sep 2014 19:52:56 +0000 (12:52 -0700)]
Rewording of direct link to Overdrive in holds/checkouts list
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoForgot to proxy the URLs in availability actions
Steven Chan [Fri, 5 Sep 2014 18:48:17 +0000 (11:48 -0700)]
Forgot to proxy the URLs in availability actions
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoAdd product ID to context of an action object
Steven Chan [Fri, 5 Sep 2014 18:17:42 +0000 (11:17 -0700)]
Add product ID to context of an action object

Potentially useful for a later refactor

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoImplement a client-side blacklist
Steven Chan [Wed, 3 Sep 2014 22:08:37 +0000 (15:08 -0700)]
Implement a client-side blacklist

Hostnames in the URL can be blacklisted from running Overdrive functions.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoImprove comments for Moment configuration clause in config module
Steven Chan [Wed, 3 Sep 2014 22:07:01 +0000 (15:07 -0700)]
Improve comments for Moment configuration clause in config module
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoRemove unused item_status() function
Steven Chan [Wed, 3 Sep 2014 22:05:07 +0000 (15:05 -0700)]
Remove unused item_status() function
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix error in decoding search parameters in URL
Steven Chan [Wed, 3 Sep 2014 21:03:43 +0000 (14:03 -0700)]
Fix error in decoding search parameters in URL

Was not using a possible delimiter; was not decoding all entities

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoTreat handle() as a method of routes object
Steven Chan [Wed, 3 Sep 2014 19:44:22 +0000 (12:44 -0700)]
Treat handle() as a method of routes object

5 years agoProxy URLs soon rather than late
Steven Chan [Tue, 2 Sep 2014 22:16:37 +0000 (15:16 -0700)]
Proxy URLs soon rather than late
This makes it easier to make the od_data module be primary over od_api.
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoAuto-focus on place hold or checkout action buttons
Steven Chan [Sun, 31 Aug 2014 18:53:16 +0000 (11:53 -0700)]
Auto-focus on place hold or checkout action buttons
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoReplace progress text with a progress bar
Steven Chan [Sun, 31 Aug 2014 17:35:28 +0000 (10:35 -0700)]
Replace progress text with a progress bar

As a way to do it, we slightly generalized the set_message method of the
action dialogue, to default to using a progress bar for the body text if
there is no text string specified as an argument nor as a body property
of the scenario. Thus, for an intent scenario, it is sufficient to use
the default body.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix progress message in action dialogues
Steven Chan [Sun, 31 Aug 2014 17:29:59 +0000 (10:29 -0700)]
Fix progress message in action dialogues

The jQuery ajax method does not implement the full promise interface; it
does not call notify and so the progress callback cannot work. As a
substitute, we pass the progress callback as the beforeSend callback,
which is executed before an ajax send.

Also, we use a progress bar instead of a progress text message.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix manual logout of EG when OD token expires
Steven Chan [Sun, 31 Aug 2014 17:24:05 +0000 (10:24 -0700)]
Fix manual logout of EG when OD token expires
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoCorrect an erroneous edit
Steven Chan [Sun, 31 Aug 2014 17:22:58 +0000 (10:22 -0700)]
Correct an erroneous edit
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoAdd direct links to Overdrive in checkout and hold list
Steven Chan [Sat, 30 Aug 2014 19:54:50 +0000 (12:54 -0700)]
Add direct links to Overdrive in checkout and hold list
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoImplement Overdrive data objects using data classes
Steven Chan [Sat, 30 Aug 2014 18:33:10 +0000 (11:33 -0700)]
Implement Overdrive data objects using data classes

A data class will make a new instance out of an OD object and endow it
with the methods to normalize the object so that it will be easier to use.
Currently, these methods are defined as ad-hoc functions within the
od_api module, making it lengthy and hard to understand.

Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoFix delete an item in checkouts list; regression error
Steven Chan [Fri, 29 Aug 2014 19:41:07 +0000 (12:41 -0700)]
Fix delete an item in checkouts list; regression error
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoUse Session class to implement a session cache
Steven Chan [Fri, 29 Aug 2014 18:47:59 +0000 (11:47 -0700)]
Use Session class to implement a session cache
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoCatchup
Steven Chan [Thu, 28 Aug 2014 01:10:22 +0000 (18:10 -0700)]
Catchup
Signed-off-by: Steven Chan <steven3416@gmail.com>
5 years agoInitial commit
Steven Chan [Wed, 27 Aug 2014 20:51:18 +0000 (13:51 -0700)]
Initial commit
Signed-off-by: Steven Chan <steven3416@gmail.com>