Skip to content

Commit

Permalink
Merge branch 'adventist_dev' into fix-block-content-error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shana Moore committed Sep 25, 2023
2 parents 326576e + 5b72d50 commit 3acad8e
Show file tree
Hide file tree
Showing 41 changed files with 1,175 additions and 200 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ gem 'addressable', '2.8.1' # remove once https://github.com/postrank-labs/postra
gem 'apartment'
gem 'aws-sdk-sqs', group: %i[aws]
gem 'blacklight', '~> 6.7'
gem 'blacklight_advanced_search'
gem 'blacklight_oai_provider', '~> 6.1', '>= 6.1.1'
gem 'blacklight_range_limit', '6.5.0'
gem 'bolognese', '>= 1.9.10'
gem 'bootstrap-datepicker-rails'
gem 'bulkrax', '~> 5.3'
Expand Down Expand Up @@ -54,6 +56,7 @@ gem 'omniauth-multi-provider'
gem 'omniauth-rails_csrf_protection', '~> 1.0'
gem 'omniauth-saml', '~> 2.1'
gem 'omniauth_openid_connect'
gem 'order_already'
gem 'parser', '~> 2.5.3'
gem 'pg'
gem 'postrank-uri', '>= 1.0.24'
Expand Down
25 changes: 25 additions & 0 deletions app/actors/hyrax/environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

# OVERRIDE Hyrax 2.9 to add in import flag
module Hyrax
module Actors
class Environment
# @param [ActiveFedora::Base] curation_concern work to operate on
# @param [Ability] current_ability the authorizations of the acting user
# @param [ActionController::Parameters] attributes user provided form attributes
def initialize(curation_concern, current_ability, attributes, importing = false)
@curation_concern = curation_concern
@current_ability = current_ability
@attributes = attributes.to_h.with_indifferent_access
@importing = importing
end

attr_reader :curation_concern, :current_ability, :attributes, :importing

# @return [User] the user from the current_ability
def user
current_ability.current_user
end
end
end
end
32 changes: 30 additions & 2 deletions app/assets/javascripts/admin_font_select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Blacklight.onLoad(function() {
if($("#admin_appearance_body_font").length > 0){
$("#admin_appearance_body_font").fontselect({lookahead: 20});
$("#admin_appearance_headline_font").fontselect({lookahead: 20});
$("#admin_appearance_body_font").fontselect({lookahead: 20})
$("#admin_appearance_headline_font").fontselect({lookahead: 20})
}
});

$('div.defaultable-fonts a.restore-default-font').click(function(e) {
e.preventDefault()
var defaultTarget = $(e.target).data('default-target')
var input = $("input[name='admin_appearance["+ defaultTarget +"]']")
var defaultValue = input.data('default-value').replace(';', '')
var inputDisplay = $("div[class$='"+ defaultTarget +"']").find('div.font-select span')

input.val(defaultValue)
inputDisplay.css("font-family", defaultValue)
inputDisplay.text(defaultValue)
})

$('.panel-footer a.restore-all-default-fonts').click(function(e) {
e.preventDefault()

var allFontInputs = $("input[name*='font']")

allFontInputs.each(function() {
var thisTarget = $(this).attr('id').replace('admin_appearance_', '')
var defaultValue = $(this).data('default-value').replace(';', '')
var inputDisplay = $("div[class$='"+ thisTarget +"']").find('div.font-select span')

$(this).val(defaultValue)
inputDisplay.css("font-family", defaultValue)
inputDisplay.text(defaultValue)
})
});
11 changes: 11 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
// Required by Blacklight
//= require blacklight/blacklight
//= require admin_font_select
//= require admin_color_select
//= require blacklight_advanced_search

// Moved the Hyku JS *above* the Hyrax JS to resolve #1187 (following
// a pattern found in ScholarSphere)
Expand All @@ -49,3 +51,12 @@
//= require flot_graph
//= require statistics_tab_manager
//= require blacklight_gallery/default

// Required for blacklight range limit
//= require blacklight_range_limit/range_limit_distro_facets
//= require blacklight_range_limit/range_limit_shared
//= require blacklight_range_limit/range_limit_slider
//= require bootstrap-slider
//= require jquery.flot.js

//= require tinymce
Loading

0 comments on commit 3acad8e

Please sign in to comment.