Skip to content

Commit

Permalink
Upgrade FontAwesome to 5.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Nov 3, 2021
1 parent fe6c762 commit cb1ac73
Show file tree
Hide file tree
Showing 47 changed files with 9,584 additions and 5,116 deletions.
7 changes: 3 additions & 4 deletions app/assets/javascripts/rails_admin/ra.filter-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
)
.add(
$('<a href="#" class="switch-select"></a>')
.append($('<i></i>').addClass('icon-' + (multiple_values ? 'minus' : 'plus')))
.append($('<i></i>').addClass('fas fa-' + (multiple_values ? 'minus' : 'plus')))
);
break;
case 'string':
Expand Down Expand Up @@ -172,8 +172,7 @@
.attr('id', filterContainerId)
.addClass('filter form-search')
.append(
$('<span class="label label-info form-label"></span>')
.append($('<a href="#delete" class="delete"></a>').append('<i class="fa fa-trash-o fa-fw icon-white"></i>').append(document.createTextNode(field_label)))
$('<button type="button" class="btn btn-info btn-sm delete"></button>').append('<i class="fas fa-trash"></i>').append(document.createTextNode(field_label))
)
.append('&nbsp;')
.append(control)
Expand Down Expand Up @@ -228,7 +227,7 @@
var not_selected_select = $(this).siblings('select:hidden');
not_selected_select.attr('name', not_selected_select.data('name')).show('slow');
selected_select.attr('name', null).hide('slow');
$(this).find('i').toggleClass("icon-plus icon-minus")
$(this).find('i').toggleClass("fa-plus fa-minus")
});

$(document).on('change', "#filters_box .switch-additional-fieldsets", function(e) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/rails_admin/ra.filtering-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
this.button = this._buttonField();
}
this.clearOption = $('<span style="color: #888"></span>').append(
'<i class="icon-remove"></i> ' + $('<span></span>').text(RailsAdmin.I18n.t("clear")).html()
'<i class="fas fa-times"></i> ' + $('<span></span>').text(RailsAdmin.I18n.t("clear")).html()
);
this.noObjectsPlaceholder = $('<option disabled="disabled" />').text(RailsAdmin.I18n.t("no_objects"));

Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/rails_admin/ra.nested-form-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
nav.filter(':hidden').show('slow');
}
content.filter(':hidden').show('slow');
toggler.addClass('active').removeClass('disabled').children('i').addClass('icon-chevron-down').removeClass('icon-chevron-right');
toggler.addClass('active').removeClass('disabled').children('i').addClass('fa-chevron-down').removeClass('fa-chevron-right');
if (one_to_one) {
controls.find('.add_nested_fields').removeClass('add_nested_fields').text(field.children('.object-infos').data('object-label'));
}
Expand All @@ -46,7 +46,7 @@
current_li.remove();
if (nav.children().length === 0) {
nav.filter(':visible').hide('slow');
toggler.removeClass('active').addClass('disabled').children('i').removeClass('icon-chevron-down').addClass('icon-chevron-right');
toggler.removeClass('active').addClass('disabled').children('i').removeClass('fa-chevron-down').addClass('fa-chevron-right');
}
if (one_to_one) {
add_button = toggler.next();
Expand Down
14 changes: 7 additions & 7 deletions app/assets/javascripts/rails_admin/ra.widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@
if (nav.children().length === 0) {
nav.hide();
tab_content.hide();
toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right');
toggler.addClass('disabled').removeClass('active').children('i').addClass('fa-chevron-right');
} else {
if (toggler.hasClass('active')) {
nav.show();
tab_content.show();
toggler.children('i').addClass('icon-chevron-down');
toggler.children('i').addClass('fa-chevron-down');
} else {
nav.hide();
tab_content.hide();
toggler.children('i').addClass('icon-chevron-right');
toggler.children('i').addClass('fa-chevron-right');
}
}
});
Expand All @@ -165,18 +165,18 @@
});
first_tab = nav.find("> li > a[data-toggle='tab']:first");
first_tab.tab('show');
field.find("> .controls > [data-target]:first").html('<i class="icon-white"></i> ' + first_tab.html());
field.find("> .controls > [data-target]:first").html('<i class="fas"></i> ' + first_tab.html());
nav.hide();
if (nav.children().length === 0) {
nav.hide();
tab_content.hide();
toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right');
toggler.addClass('disabled').removeClass('active').children('i').addClass('fa-chevron-right');
} else {
if (toggler.hasClass('active')) {
toggler.children('i').addClass('icon-chevron-down');
toggler.children('i').addClass('fa-chevron-down');
tab_content.show();
} else {
toggler.children('i').addClass('icon-chevron-right');
toggler.children('i').addClass('fa-chevron-right');
tab_content.hide();
}
}
Expand Down
20 changes: 10 additions & 10 deletions app/assets/javascripts/rails_admin/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@

$(document).on('click', '[data-target]', function() {
if (!$(this).hasClass('disabled')) {
if ($(this).has('i.icon-chevron-down').length) {
$(this).removeClass('active').children('i').toggleClass('icon-chevron-down icon-chevron-right');
if ($(this).has('i.fa-chevron-down').length) {
$(this).removeClass('active').children('i').toggleClass('fa-chevron-down fa-chevron-right');
$($(this).data('target')).filter(':visible').hide('slow');
} else {
if ($(this).has('i.icon-chevron-right').length) {
$(this).addClass('active').children('i').toggleClass('icon-chevron-down icon-chevron-right');
if ($(this).has('i.fa-chevron-right').length) {
$(this).addClass('active').children('i').toggleClass('fa-chevron-down fa-chevron-right');
$($(this).data('target')).filter(':hidden').show('slow');
}
}
}
});

$(document).on('click', '.form-horizontal legend', function() {
if ($(this).has('i.icon-chevron-down').length) {
if ($(this).has('i.fa-chevron-down').length) {
$(this).siblings('.control-group:visible').hide('slow');
$(this).children('i').toggleClass('icon-chevron-down icon-chevron-right');
$(this).children('i').toggleClass('fa-chevron-down fa-chevron-right');
} else {
if ($(this).has('i.icon-chevron-right').length) {
if ($(this).has('i.fa-chevron-right').length) {
$(this).siblings('.control-group:hidden').show('slow');
$(this).children('i').toggleClass('icon-chevron-down icon-chevron-right');
$(this).children('i').toggleClass('fa-chevron-down fa-chevron-right');
}
}
});

$(document).on('click', 'form .tab-content .tab-pane a.remove_nested_one_fields', function() {
$(this).children('input[type="hidden"]').val($(this).hasClass('active')).siblings('i').toggleClass('icon-check icon-trash');
$(this).children('input[type="hidden"]').val($(this).hasClass('active')).siblings('i').toggleClass('fa-check fa-trash');
});

$(document).ready(function() {
Expand All @@ -90,7 +90,7 @@
width: width
}, length, 'easeOutQuad');
});
$('.form-horizontal legend').has('i.icon-chevron-right').each(function() {
$('.form-horizontal legend').has('i.fa-chevron-right').each(function() {
$(this).siblings('.control-group').hide();
});
$(".table").tooltip({
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/stylesheets/rails_admin/rails_admin.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
/*** Font-awesome ***/

@import 'rails_admin/font-awesome';
@import 'rails_admin/base/font-awesome-4-compability';

/*** Bootstrap Theming ***/

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/rails_admin/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def fieldset_for(fieldset, nested_in)

@template.content_tag :fieldset do
contents = []
contents << @template.content_tag(:legend, %(<i class="icon-chevron-#{(fieldset.active? ? 'down' : 'right')}"></i> #{fieldset.label}).html_safe, style: fieldset.name == :default ? 'display:none' : '')
contents << @template.content_tag(:legend, %(<i class="fas fa-chevron-#{(fieldset.active? ? 'down' : 'right')}"></i> #{fieldset.label}).html_safe, style: fieldset.name == :default ? 'display:none' : '')
contents << @template.content_tag(:p, fieldset.help) if fieldset.help.present?
contents << fields.collect { |field| field_wrapper_for(field, nested_in) }.join
contents.join.html_safe
Expand Down
2 changes: 1 addition & 1 deletion app/views/rails_admin/main/_form_file_upload.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- if field.optional? && field.errors.blank? && file && field.delete_method
%a.btn.btn-info.btn-remove-image{href: '#', :'data-toggle' => 'button', role: 'button'}
%i.icon-white.icon-trash
%i.fas.fa-trash
= I18n.t('admin.actions.delete.link', object_label: field.label)

= form.check_box(field.delete_method, style: 'display:none;')
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
- if authorized?(:new, config.abstract_model) && field.inline_add
- path_hash = { model_name: config.abstract_model.to_param, modal: true }
- path_hash.merge!({ associations: { field.inverse_of => (form.object.persisted? ? form.object.id : 'new') } }) if field.inverse_of
= link_to "<i class=\"icon-plus icon-white\"></i> ".html_safe + wording_for(:link, :new, config.abstract_model), '#', data: { link: new_path(path_hash) }, class: "create btn btn-info", style: 'margin-left:10px'
= link_to "<i class=\"fas fa-plus\"></i> ".html_safe + wording_for(:link, :new, config.abstract_model), '#', data: { link: new_path(path_hash) }, class: "create btn btn-info", style: 'margin-left:10px'
4 changes: 2 additions & 2 deletions app/views/rails_admin/main/_form_filtering_select.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- if authorized?(:new, config.abstract_model) && field.inline_add
- path_hash = { model_name: config.abstract_model.to_param, modal: true }
- path_hash.merge!({ associations: { field.inverse_of => (form.object.persisted? ? form.object.id : 'new') } }) if field.inverse_of
= link_to "<i class=\"icon-plus icon-white\"></i> ".html_safe + wording_for(:link, :new, config.abstract_model), '#', data: { link: new_path(path_hash) }, class: "btn btn-info create", style: 'margin-left:10px'
= link_to "<i class=\"fas fa-plus\"></i> ".html_safe + wording_for(:link, :new, config.abstract_model), '#', data: { link: new_path(path_hash) }, class: "btn btn-info create", style: 'margin-left:10px'

- if edit_url.present? && field.inline_edit
= link_to "<i class=\"icon-pencil icon-white\"></i> ".html_safe + wording_for(:link, :edit, config.abstract_model), '#', data: { link: edit_url }, class: "btn btn-info update #{field.value.nil? && 'disabled'}", style: 'margin-left:10px'
= link_to "<i class=\"fas fa-pencil-alt\"></i> ".html_safe + wording_for(:link, :edit, config.abstract_model), '#', data: { link: edit_url }, class: "btn btn-info update #{field.value.nil? && 'disabled'}", style: 'margin-left:10px'
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
= attachment.pretty_value
- if field.delete_method || field.keep_method
%a.btn.btn-info.btn-remove-image{href: '#', :'data-toggle' => 'button', role: 'button'}
%i.icon-white.icon-trash
%i.fas.fa-trash
= I18n.t('admin.form.delete_file', field_label: field.label, number: i + 1)
- if field.keep_method
= form.check_box(field.keep_method, {multiple:true, checked: true, style: 'display:none;'}, attachment.keep_value, nil)
Expand Down
Loading

0 comments on commit cb1ac73

Please sign in to comment.