Skip to content

Commit

Permalink
[WIP] Removing pul_uv_rails and using figgy for the UV
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Mar 21, 2019
1 parent 7f02b08 commit 9221e47
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 27 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ gem 'logstash-event'
gem 'omniauth', '~> 1.8.1'
gem 'omniauth-cas'
gem 'open_uri_redirections'
gem 'pul_uv_rails', github: 'pulibrary/pul_uv_rails', branch: 'master'
gem 'redis-namespace'
gem 'riiif'
gem 'rsolr', '~> 1.0.6'
Expand Down
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ GIT
normalize-rails (~> 3.0.3)
susy (~> 2.2.12)

GIT
remote: git://github.com/pulibrary/pul_uv_rails.git
revision: e3dd14a13aa8468751dd5d870b3647bafc0db9ff
branch: master
specs:
pul_uv_rails (2.0.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -636,7 +629,6 @@ DEPENDENCIES
pry-byebug
pry-rails
pul-assets!
pul_uv_rails!
puma
rack (>= 2.0.6)
rails (~> 5.0)
Expand Down
14 changes: 2 additions & 12 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@import 'normalize-rails';
@import 'pul-assets';
@import 'components/font-face';
@import "components/universal_viewer";

@import 'mixins';
@import 'header';
Expand Down Expand Up @@ -218,15 +219,7 @@ li[dir=rtl] {
}
}
}
.uv__overlay {
background:transparent;
position:relative;
width:100%;
height:400px;
top:400px;
margin-top:-400px;
z-index: 1000;
}

.edit-tags .twitter-typeahead input {
border: none;
background-color: transparent;
Expand All @@ -251,9 +244,6 @@ dd {
}
}
}
img.logo {
margin-left: 100%;
}
h2 {
font-size: 16px;
margin-bottom: 0.75em;
Expand Down
15 changes: 15 additions & 0 deletions app/assets/stylesheets/components/_universal_viewer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.uv__overlay {
background:transparent;
z-index: 1000;

iframe {
width: 100%;
height: 100%;
border: none;
}

.logo {
float: right;
}
}

10 changes: 10 additions & 0 deletions app/models/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ def update(current_exhibit, new_attributes)

update_exhibit_resource(resource_attributes) if uploaded_resource?
end

# Retrieve the IIIF manifest URL from the configured field
# @return [String]
def manifest
values = fetch(Spotlight::Engine.config.iiif_manifest_field, nil)
values.first

# Using this for the purposes of debugging
"https://figgy-staging.princeton.edu/concern/scanned_resources/a88d4c51-34a0-4816-b232-0e2fbb43a01e/manifest"
end
end
11 changes: 5 additions & 6 deletions app/views/catalog/_universal_viewer_default.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<% manifest = document.fetch(Spotlight::Engine.config.iiif_manifest_field).first %>
<div class="uv__overlay" onClick="style.pointerEvents='none'"></div>
<div class="uv viewer" data-config="/uv_config.json" data-uri="<%= manifest %>"></div>
<%= PulUvRails::UniversalViewer.script_tag %>
<%= link_to image_tag("iiif.png", class: "logo", alt: "IIIF Drag and Drop"),
viewers_page_path(manifest: manifest, format: :html) %>
<div class="uv__overlay">
<iframe allowFullScreen="true" src="https://figgy-staging.princeton.edu/uv/uv#?manifest=<%= document.manifest %>&config=https://figgy-staging.princeton.edu/viewer/exhibit/config/<%= document.manifest %>">
</iframe>
<%= link_to image_tag("iiif.png", class: "logo", alt: "IIIF Drag and Drop"), viewers_page_path(manifest: document.manifest, format: :html) %>
</div>

0 comments on commit 9221e47

Please sign in to comment.