From: Jeff Davis Date: Thu, 6 Nov 2014 19:28:30 +0000 (-0800) Subject: configurable base URL for direct links to OverDrive site X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8b13a1399598b4be4b16901087cf0d554a38401c;p=contrib%2Foverdrive-eg-opac.git configurable base URL for direct links to OverDrive site Signed-off-by: Jeff Davis --- diff --git a/src/od_config_template.coffee b/src/od_config_template.coffee index 90d2c12..157ea78 100644 --- a/src/od_config_template.coffee +++ b/src/od_config_template.coffee @@ -42,6 +42,9 @@ define [ # Define whether a user password is required to complete patron authentication password_required: 'false' # or 'true' + # Main base URL (used for direct links to content provider's site) + baseURL: 'http://example.com/ContentDetails.htm' + # Base URL/FQDN(s) for hyperlinks to OverDrive products productbaseURLs: [ 'elm.lib.overdrive.com' ] diff --git a/src/od_pages_myopac.coffee b/src/od_pages_myopac.coffee index e30a791..2628307 100644 --- a/src/od_pages_myopac.coffee +++ b/src/od_pages_myopac.coffee @@ -4,10 +4,11 @@ define [ 'jquery' 'lodash' + 'od_config' 'jquery-ui' 'od_action' 'od_pages_opac' -], ($, _) -> +], ($, _, config) -> $.fn.extend @@ -357,7 +358,7 @@ define [
  • Hold will expire <%= expires %>
  • - Link to Overdrive Account to change preferences + Link to Overdrive Account to change preferences """ @empty().append tpl position: hold.holdListPosition @@ -366,6 +367,7 @@ define [ expires: hold.holdExpires.fromNow() placed: hold.holdPlacedDate.fromNow() activates: hold.holdSuspension?.numberOfDays.calendar() + baseURL: config.baseURL id: hold.reserveId # Illuminate areas of this row according to the hold status @@ -470,11 +472,12 @@ define [ tpl = _.template """
    Expires <%= expires_relatively %>
    <%= expires_exactly %>
    - Click to access online (library card required) + Click to access online (library card required) """ @empty().append tpl expires_relatively: circ.expires.fromNow() expires_exactly: circ.expires.format 'YYYY MMM D, h:mm:ss a' + baseURL: config.baseURL id: circ.reserveId # Build a element to show the available actions of an item.