-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'adventist_dev' into fix-block-content-error
- Loading branch information
Showing
41 changed files
with
1,175 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.