-
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 'blacklight_advanced_and_range' into adventist_dev
- Loading branch information
Showing
22 changed files
with
473 additions
and
335 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
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 |
---|---|---|
|
@@ -17,4 +17,4 @@ $(document).on('turbolinks:load', function() { | |
$(this).val($(this).data('default-value')) | ||
}) | ||
}) | ||
}); | ||
}); |
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,34 +1,38 @@ | ||
Blacklight.onLoad(function() { | ||
if($("#admin_appearance_body_font").length > 0){ | ||
$("#admin_appearance_body_font").fontselect({lookahead: 20}) | ||
$("#admin_appearance_headline_font").fontselect({lookahead: 20}) | ||
Blacklight.onLoad(function () { | ||
if ($("#admin_appearance_body_font").length > 0) { | ||
$("#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') | ||
$("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) | ||
}) | ||
input.val(defaultValue); | ||
inputDisplay.css("font-family", defaultValue); | ||
inputDisplay.text(defaultValue); | ||
}); | ||
|
||
$('.panel-footer a.restore-all-default-fonts').click(function(e) { | ||
e.preventDefault() | ||
$(".panel-footer a.restore-all-default-fonts").click(function (e) { | ||
e.preventDefault(); | ||
|
||
var allFontInputs = $("input[name*='font']") | ||
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') | ||
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).val(defaultValue); | ||
inputDisplay.css("font-family", defaultValue); | ||
inputDisplay.text(defaultValue); | ||
}); | ||
}); |
Oops, something went wrong.