Rename v4 FontAwesome icons to match v5/v6 name
While FontAwesome provides aliases for all icons, we switch to the new names for consistency. See all changes at: https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4#icons-renamed-since-version-4
This commit is contained in:

committed by
Sebastian Serth

parent
d93e71dc28
commit
b98c37ae64
@@ -216,7 +216,7 @@ var CodeOceanEditor = {
|
||||
},
|
||||
|
||||
hideSpinner: function () {
|
||||
$('button i.fa, button i.far, button i.fas').show();
|
||||
$('button i.fa-solid, button i.fa-regular').show();
|
||||
$('button i.fa-spin').hide();
|
||||
},
|
||||
|
||||
@@ -697,7 +697,7 @@ var CodeOceanEditor = {
|
||||
},
|
||||
|
||||
showSpinner: function (initiator) {
|
||||
$(initiator).find('i.fa, i.far, i.fas').hide();
|
||||
$(initiator).find('i.fa-solid, i.fa-regular').hide();
|
||||
$(initiator).find('i.fa-spin').show();
|
||||
},
|
||||
|
||||
@@ -743,21 +743,21 @@ var CodeOceanEditor = {
|
||||
|
||||
showContainerDepletedMessage: function () {
|
||||
$.flash.danger({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
icon: ['fa-regular', 'fa-clock'],
|
||||
text: $('#editor').data('message-depleted')
|
||||
});
|
||||
},
|
||||
|
||||
showOutOfMemoryMessage: function () {
|
||||
$.flash.info({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
icon: ['fa-regular', 'fa-clock'],
|
||||
text: $('#editor').data('message-out-of-memory')
|
||||
});
|
||||
},
|
||||
|
||||
showTimeoutMessage: function () {
|
||||
$.flash.info({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
icon: ['fa-regular', 'fa-clock'],
|
||||
text: $('#editor').data('message-timeout')
|
||||
});
|
||||
},
|
||||
|
@@ -6,7 +6,7 @@ CodeOceanEditorFlowr = {
|
||||
'<div class="card-title mb-0">' +
|
||||
'<a class="collapsed" data-toggle="collapse" data-parent="#flowrHint" href="#{{collapseId}}" aria-expanded="false" aria-controls="{{collapseId}}">' +
|
||||
'<div class="clearfix" role="button">' +
|
||||
'<i class="fa" aria-hidden="true"></i>' +
|
||||
'<i class="fa-solid" aria-hidden="true"></i>' +
|
||||
'<span>' +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
|
@@ -172,7 +172,7 @@ $(document).on('turbolinks:load', function() {
|
||||
if (collectionExercises.indexOf(exercise.id) === -1) {
|
||||
// only add exercises that are not already contained in the collection
|
||||
var template = '<tr data-id="' + exercise.id + '">' +
|
||||
'<td><span class="fa fa-bars"></span></td>' +
|
||||
'<td><span class="fa-solid fa-bars"></span></td>' +
|
||||
'<td>' + exercise.title + '</td>' +
|
||||
'<td><a href="/exercises/' + exercise.id + '"><%= I18n.t('shared.show') %></td>' +
|
||||
'<td><a class="remove-exercise" href="#"><%= I18n.t('shared.destroy') %></td></tr>';
|
||||
|
@@ -225,9 +225,9 @@ $(document).on('turbolinks:load', function () {
|
||||
const tip = {id: id, title: title}
|
||||
const template =
|
||||
'<div class="list-group-item d-block" data-tip-id=' + tip.id + ' data-id="">' +
|
||||
'<span class="fa fa-bars mr-3"></span>' + tip.title +
|
||||
'<a class="fa fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' +
|
||||
'<a class="fa fa-xmark ml-2 remove-tip" href="#""></a>' +
|
||||
'<span class="fa-solid fa-bars mr-3"></span>' + tip.title +
|
||||
'<a class="fa-regular fa-eye ml-2" href="/tips/' + tip.id + '" target="_blank"></a>' +
|
||||
'<a class="fa-solid fa-xmark ml-2 remove-tip" href="#""></a>' +
|
||||
'<div class="list-group nested-sortable-list"></div>' +
|
||||
'</div>';
|
||||
const tipList = $('#tip-list').append(template);
|
||||
|
@@ -1381,37 +1381,37 @@
|
||||
};
|
||||
|
||||
var group1 = makeGroup(1);
|
||||
buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa fa-bold", bindCommand("doBold"), group1);
|
||||
buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa fa-italic", bindCommand("doItalic"), group1);
|
||||
buttons.bold = makeButton("wmd-bold-button", "<%= I18n.t('components.markdown_editor.bold.button_title', default: 'Bold (Ctrl+B)') %>", "m-1 fa-solid fa-bold", bindCommand("doBold"), group1);
|
||||
buttons.italic = makeButton("wmd-italic-button", "<%= I18n.t('components.markdown_editor.italic.button_title', default: 'Italic (Ctrl+I)') %>", "m-1 fa-solid fa-italic", bindCommand("doItalic"), group1);
|
||||
|
||||
var group2 = makeGroup(2);
|
||||
buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa fa-link", bindCommand(function (chunk, postProcessing) {
|
||||
buttons.link = makeButton("wmd-link-button", "<%= I18n.t('components.markdown_editor.insert_link.button_title', default: 'Link (Ctrl+L)') %>", "m-1 fa-solid fa-link", bindCommand(function (chunk, postProcessing) {
|
||||
return this.doLinkOrImage(chunk, postProcessing, false);
|
||||
}), group2);
|
||||
buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa fa-picture-o", bindCommand(function (chunk, postProcessing) {
|
||||
buttons.image = makeButton("wmd-image-button", "<%= I18n.t('components.markdown_editor.insert_image.button_title', default: 'Image (Ctrl+G)') %>", "m-1 fa-regular fa-image", bindCommand(function (chunk, postProcessing) {
|
||||
return this.doLinkOrImage(chunk, postProcessing, true);
|
||||
}), group2);
|
||||
buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa fa-quote-left", bindCommand("doBlockquote"), group2);
|
||||
buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa fa-code", bindCommand("doCode"), group2);
|
||||
buttons.quote = makeButton("wmd-quote-button", "<%= I18n.t('components.markdown_editor.blockquoute.button_title', default: 'Blockquote (Ctrl+Q)') %>", "m-1 fa-solid fa-quote-left", bindCommand("doBlockquote"), group2);
|
||||
buttons.code = makeButton("wmd-code-button", "<%= I18n.t('components.markdown_editor.code_sample.button_title', default: 'Code Sample (Ctrl+K)') %>", "m-1 fa-solid fa-code", bindCommand("doCode"), group2);
|
||||
|
||||
var group3 = makeGroup(3);
|
||||
buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa fa-list-ul", bindCommand(function (chunk, postProcessing) {
|
||||
buttons.ulist = makeButton("wmd-ulist-button", "<%= I18n.t('components.markdown_editor.bulleted_list.button_title', default: 'Bulleted List (Ctrl+U)') %>", "m-1 fa-solid fa-list-ul", bindCommand(function (chunk, postProcessing) {
|
||||
this.doList(chunk, postProcessing, false);
|
||||
}), group3);
|
||||
buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa fa-list-ol", bindCommand(function (chunk, postProcessing) {
|
||||
buttons.olist = makeButton("wmd-olist-button", "<%= I18n.t('components.markdown_editor.numbered_list.button_title', default: 'Numbered List (Ctrl+O)') %>", "m-1 fa-solid fa-list-ol", bindCommand(function (chunk, postProcessing) {
|
||||
this.doList(chunk, postProcessing, true);
|
||||
}), group3);
|
||||
buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa fa-font", bindCommand("doHeading"), group3);
|
||||
buttons.heading = makeButton("wmd-heading-button", "<%= I18n.t('components.markdown_editor.heading.button_title', default: 'Heading (Ctrl+H)') %>", "m-1 fa-solid fa-font", bindCommand("doHeading"), group3);
|
||||
|
||||
var group4 = makeGroup(4);
|
||||
buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa fa-arrow-rotate-left", null, group4);
|
||||
buttons.undo = makeButton("wmd-undo-button", "<%= I18n.t('components.markdown_editor.undo.button_title', default: 'Undo (Ctrl+Z)') %>", "m-1 fa-solid fa-arrow-rotate-left", null, group4);
|
||||
buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
|
||||
|
||||
var redoTitle = /win/.test(nav.platform.toLowerCase()) ?
|
||||
"<%= I18n.t('components.markdown_editor.redo.button_title.win', default: 'Redo (Ctrl+Y)') %>" :
|
||||
"<%= I18n.t('components.markdown_editor.redo.button_title.other', default: 'Redo (Ctrl+Shift+Z)') %>"; // mac and other non-Windows platforms
|
||||
|
||||
buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa fa-repeat", null, group4);
|
||||
buttons.redo = makeButton("wmd-redo-button", redoTitle, "m-1 fa-solid fa-arrow-rotate-right", null, group4);
|
||||
buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
|
||||
|
||||
if (helpOptions) {
|
||||
@@ -1419,7 +1419,7 @@
|
||||
group5.className = group5.className + " ml-auto";
|
||||
var helpButton = document.createElement("button");
|
||||
var helpButtonImage = document.createElement("i");
|
||||
helpButtonImage.className = "m-1 fa fa-info";
|
||||
helpButtonImage.className = "m-1 fa-solid fa-info";
|
||||
helpButton.appendChild(helpButtonImage);
|
||||
helpButton.className = "btn btn-info btn-sm";
|
||||
helpButton.id = "wmd-help-button" + postfix;
|
||||
|
Reference in New Issue
Block a user