From 9d6b79c919bcb2b652d5f0e387ced62b131a12aa Mon Sep 17 00:00:00 2001 From: Hauke Klement Date: Wed, 18 Mar 2015 10:19:39 +0100 Subject: [PATCH] replaced Glyphicon icons by Font Awesome icons --- app/assets/javascripts/editor.js | 2 +- app/assets/stylesheets/base.css.scss | 2 +- app/helpers/application_helper.rb | 4 ++-- app/views/application/_session.html.slim | 4 ++-- app/views/exercises/_editor_file_tree.html.slim | 4 ++-- app/views/shared/_new_button.html.slim | 2 +- spec/helpers/application_helper_spec.rb | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/editor.js b/app/assets/javascripts/editor.js index e85634e9..4a9a7275 100644 --- a/app/assets/javascripts/editor.js +++ b/app/assets/javascripts/editor.js @@ -549,7 +549,7 @@ $(function() { }; var showSpinner = function(initiator) { - $(initiator).find('i.fa, i.glyphicon').hide(); + $(initiator).find('i.fa').hide(); $(initiator).find('i.fa-spin').show(); }; diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index c2231d3f..bbd74a94 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -2,7 +2,7 @@ h1 { margin-bottom: 1em; } -i.fa, i.glyphicon { +i.fa { margin-right: 0.5em; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 46be9023..122967ac 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -29,7 +29,7 @@ module ApplicationHelper private :label_column def no - content_tag(:i, nil, class: 'glyphicon glyphicon-remove') + content_tag(:i, nil, class: 'fa fa-times') end def progress_bar(value) @@ -73,6 +73,6 @@ module ApplicationHelper private :value_column def yes - content_tag(:i, nil, class: 'glyphicon glyphicon-ok') + content_tag(:i, nil, class: 'fa fa-check') end end diff --git a/app/views/application/_session.html.slim b/app/views/application/_session.html.slim index fb401cdb..52858f8d 100644 --- a/app/views/application/_session.html.slim +++ b/app/views/application/_session.html.slim @@ -2,7 +2,7 @@ - if current_user.internal_user? li.dropdown a.dropdown-toggle data-toggle='dropdown' href='#' - i.glyphicon.glyphicon-user + i.fa.fa-user = current_user span.caret ul.dropdown-menu role='menu' @@ -12,7 +12,7 @@ - else li p.navbar-text - i.glyphicon.glyphicon-user + i.fa.fa-user = current_user - else li = link_to(sign_in_path) do diff --git a/app/views/exercises/_editor_file_tree.html.slim b/app/views/exercises/_editor_file_tree.html.slim index 1d9598c6..cad3c845 100644 --- a/app/views/exercises/_editor_file_tree.html.slim +++ b/app/views/exercises/_editor_file_tree.html.slim @@ -2,8 +2,8 @@ hr -= render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-cause' => 'file'}, icon: 'glyphicon glyphicon-plus', id: 'create-file', label: t('exercises.editor.create_file')) -= render('editor_button', classes: 'btn-block btn-warning btn-sm', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'glyphicon glyphicon-trash', id: 'destroy-file', label: t('exercises.editor.destroy_file')) += render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: t('exercises.editor.create_file')) += render('editor_button', classes: 'btn-block btn-warning btn-sm', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'fa fa-times', id: 'destroy-file', label: t('exercises.editor.destroy_file')) = render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download')) = render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file')) diff --git a/app/views/shared/_new_button.html.slim b/app/views/shared/_new_button.html.slim index f6edba23..799fab8d 100644 --- a/app/views/shared/_new_button.html.slim +++ b/app/views/shared/_new_button.html.slim @@ -1,4 +1,4 @@ - if policy(model).new? a.btn.btn-success href=(local_assigns.has_key?(:path) ? path : send(:"new_#{model.model_name.singular}_path")) - i.glyphicon.glyphicon-plus + i.fa.fa-plus = t('shared.new_model', model: model.model_name.human) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index c477105d..e8e9b132 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -37,7 +37,7 @@ describe ApplicationHelper do describe '#no' do it "builds an 'i' tag" do - expect(no).to have_css('i.glyphicon.glyphicon-remove') + expect(no).to have_css('i.fa.fa-times') end end @@ -139,7 +139,7 @@ describe ApplicationHelper do describe '#yes' do it "builds an 'i' tag" do - expect(yes).to have_css('i.glyphicon.glyphicon-ok') + expect(yes).to have_css('i.fa.fa-check') end end end