From c4abe3a2d9741be55ee37f2d8857c4110d32f113 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 5 Nov 2013 19:21:57 +0100 Subject: Replace icons with the ones from Font Awesome https://fedorahosted.org/freeipa/ticket/3904 --- install/ui/src/freeipa/association.js | 16 ++++++++-------- install/ui/src/freeipa/details.js | 6 +++--- install/ui/src/freeipa/dns.js | 8 ++++---- install/ui/src/freeipa/hbac.js | 4 ++-- install/ui/src/freeipa/hbactest.js | 10 ++++++---- install/ui/src/freeipa/search.js | 8 ++++---- install/ui/src/freeipa/selinux.js | 4 ++-- install/ui/src/freeipa/sudo.js | 8 ++++---- install/ui/src/freeipa/user.js | 4 ++-- install/ui/src/freeipa/widget.js | 16 +++++++++------- 10 files changed, 44 insertions(+), 40 deletions(-) (limited to 'install/ui/src/freeipa') diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js index f976d58e4..685821e0a 100644 --- a/install/ui/src/freeipa/association.js +++ b/install/ui/src/freeipa/association.js @@ -484,7 +484,7 @@ IPA.association_table_widget = function (spec) { that.remove_button = IPA.action_button({ name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon', + icon: 'fa-trash-o', 'class': 'action-button-disabled', click: function() { if (!that.remove_button.hasClass('action-button-disabled')) { @@ -497,7 +497,7 @@ IPA.association_table_widget = function (spec) { that.add_button = IPA.action_button({ name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon', + icon: 'fa-plus', click: function() { if (!that.add_button.hasClass('action-button-disabled')) { that.add_handler(); @@ -887,17 +887,17 @@ exp.association_facet_pre_op = function(spec, context) { { name: 'refresh', label: '@i18n:buttons.refresh', - icon: 'reset-icon' + icon: 'fa-refresh' }, { name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon' + icon: 'fa-trash-o' }, { name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon' + icon: 'fa-plus' }); spec.state = spec.state || {}; @@ -1312,17 +1312,17 @@ exp.attribute_facet_pre_op = function(spec, context) { { name: 'refresh', label: '@i18n:buttons.refresh', - icon: 'reset-icon' + icon: 'fa-refresh' }, { name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon' + icon: 'fa-trash-o' }, { name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon' + icon: 'fa-plus' }); spec.state = spec.state || {}; diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js index 596dc1ac0..00134a23d 100644 --- a/install/ui/src/freeipa/details.js +++ b/install/ui/src/freeipa/details.js @@ -466,19 +466,19 @@ exp.details_facet_pre_op = function(spec, context) { { name: 'reset', label: '@i18n:buttons.reset', - icon: 'reset-icon' + icon: 'fa-undo' }, { name: 'update', label: '@i18n:buttons.update', - icon: 'update-icon' + icon: 'fa-upload' }); } spec.control_buttons.unshift( { name: 'refresh', label: '@i18n:buttons.refresh', - icon: 'reset-icon' + icon: 'fa-refresh' }); spec.state = spec.state || {}; diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js index ab88cec40..3ef5620f4 100644 --- a/install/ui/src/freeipa/dns.js +++ b/install/ui/src/freeipa/dns.js @@ -119,12 +119,12 @@ return { { name: 'disable', label: '@i18n:buttons.disable', - icon: 'disabled-icon' + icon: 'fa-minus' }, { name: 'enable', label: '@i18n:buttons.enable', - icon: 'enabled-icon' + icon: 'fa-check' } ] }, @@ -1674,7 +1674,7 @@ IPA.dns.record_type_table_widget = function(spec) { that.remove_button = IPA.action_button({ name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon', + icon: 'fa-trash-o', 'class': 'action-button-disabled', click: function() { if (!that.remove_button.hasClass('action-button-disabled')) { @@ -1687,7 +1687,7 @@ IPA.dns.record_type_table_widget = function(spec) { that.add_button = IPA.action_button({ name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon', + icon: 'fa-plus', click: function() { if (!that.add_button.hasClass('action-button-disabled')) { that.add_handler(); diff --git a/install/ui/src/freeipa/hbac.js b/install/ui/src/freeipa/hbac.js index ec2144068..18024953b 100644 --- a/install/ui/src/freeipa/hbac.js +++ b/install/ui/src/freeipa/hbac.js @@ -61,12 +61,12 @@ var spec = { { name: 'disable', label: '@i18n:buttons.disable', - icon: 'disabled-icon' + icon: 'fa-minus' }, { name: 'enable', label: '@i18n:buttons.enable', - icon: 'enabled-icon' + icon: 'fa-check' } ] }, diff --git a/install/ui/src/freeipa/hbactest.js b/install/ui/src/freeipa/hbactest.js index a127db9b7..93155b5ac 100644 --- a/install/ui/src/freeipa/hbactest.js +++ b/install/ui/src/freeipa/hbactest.js @@ -182,7 +182,7 @@ IPA.hbac.test_facet = function(spec) { that.prev_button = IPA.button({ name: 'prev', label: '@i18n:widget.prev', - icon: 'prev-icon', + icon: 'fa-chevron-left', click: function() { if (!that.prev_button.hasClass('action-button-disabled')) { that.prev(); @@ -197,7 +197,7 @@ IPA.hbac.test_facet = function(spec) { that.next_button = IPA.button({ name: 'next', label: '@i18n:widget.next', - icon: 'next-icon', + icon: 'fa-chevron-right', click: function() { if (!that.next_button.hasClass('action-button-disabled')) { that.next(); @@ -309,7 +309,7 @@ IPA.hbac.test_select_facet = function(spec) { that.find_button = IPA.action_button({ name: 'find', - icon: 'search-icon', + icon: 'fa-search', click: function() { that.find(); return false; @@ -533,6 +533,7 @@ IPA.hbac.test_run_facet = function(spec) { that.run_button = IPA.button({ name: 'run_test', label: '@i18n:objects.hbactest.run_test', + icon: 'fa-gear', click: function() { if (!that.run_button.hasClass('action-button-disabled')) { that.run(); @@ -605,7 +606,7 @@ IPA.hbac.test_run_facet = function(spec) { that.prev_button = IPA.button({ name: 'prev', label: '@i18n:widget.prev', - icon: 'prev-icon', + icon: 'fa-chevron-left', click: function() { if (!that.prev_button.hasClass('action-button-disabled')) { that.prev(); @@ -619,6 +620,7 @@ IPA.hbac.test_run_facet = function(spec) { that.new_test_button = IPA.button({ name: 'new_test', label: '@i18n:objects.hbactest.new_test', + icon: 'fa-repeat', click: function() { if (!that.new_test_button.hasClass('action-button-disabled')) { that.new_test(); diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index 10ed0cb9f..680f0268c 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -48,19 +48,19 @@ exp.search_facet_control_buttons_pre_op = function(spec, context) { { name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon' + icon: 'fa-trash-o' }, { name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon' + icon: 'fa-plus' }); } spec.control_buttons.unshift( { name: 'refresh', label: '@i18n:buttons.refresh', - icon: 'reset-icon' + icon: 'fa-refresh' }); spec.state = spec.state || {}; @@ -128,7 +128,7 @@ IPA.search_facet = function(spec, no_init) { that.find_button = IPA.action_button({ name: 'find', - icon: 'search-icon', + icon: 'fa-search', click: function() { that.find(); return false; diff --git a/install/ui/src/freeipa/selinux.js b/install/ui/src/freeipa/selinux.js index ff0ad848c..af21356f5 100644 --- a/install/ui/src/freeipa/selinux.js +++ b/install/ui/src/freeipa/selinux.js @@ -60,12 +60,12 @@ var spec = { { name: 'disable', label: '@i18n:buttons.disable', - icon: 'disabled-icon' + icon: 'fa-minus' }, { name: 'enable', label: '@i18n:buttons.enable', - icon: 'enabled-icon' + icon: 'fa-check' } ] }, diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js index e50615bd7..17e55b08d 100644 --- a/install/ui/src/freeipa/sudo.js +++ b/install/ui/src/freeipa/sudo.js @@ -61,12 +61,12 @@ var spec = { { name: 'disable', label: '@i18n:buttons.disable', - icon: 'disabled-icon' + icon: 'fa-minus' }, { name: 'enable', label: '@i18n:buttons.enable', - icon: 'enabled-icon' + icon: 'fa-check' } ] }, @@ -705,7 +705,7 @@ IPA.sudo.options_section = function(spec) { that.remove_button = IPA.action_button({ name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon', + icon: 'fa-trash-o', 'class': 'action-button-disabled', click: function() { if (!that.remove_button.hasClass('action-button-disabled')) { @@ -718,7 +718,7 @@ IPA.sudo.options_section = function(spec) { that.add_button = IPA.action_button({ name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon', + icon: 'fa-plus', click: function() { if (!that.add_button.hasClass('action-button-disabled')) { that.add_handler(); diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js index c141ea3f0..ecd82296e 100644 --- a/install/ui/src/freeipa/user.js +++ b/install/ui/src/freeipa/user.js @@ -87,12 +87,12 @@ return { { name: 'disable', label: '@i18n:buttons.disable', - icon: 'disabled-icon' + icon: 'fa-minus' }, { name: 'enable', label: '@i18n:buttons.enable', - icon: 'enabled-icon' + icon: 'fa-check' } ] }, diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 641b34862..c39f3326c 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -1905,11 +1905,13 @@ IPA.boolean_status_formatter = function(spec) { that.show_false = true; that.type = 'html'; + that.enabled_icon = spec.disabled_icon || 'fa fa-check'; + that.disabled_icon = spec.disabled_icon || 'fa fa-minus'; that.format = function(value) { - var status = value ? 'enabled' : 'disabled'; + var icon_cls = value ? that.enabled_icon : that.disabled_icon; var formatted_value = that.boolean_formatter_format(value); - formatted_value = ' '+formatted_value; + formatted_value = ' '+formatted_value; return formatted_value; }; @@ -2717,7 +2719,7 @@ IPA.attribute_table_widget = function(spec) { that.remove_button = IPA.action_button({ name: 'remove', label: '@i18n:buttons.remove', - icon: 'remove-icon', + icon: 'fa-trash-o', 'class': 'action-button-disabled', click: function() { if (!that.remove_button.hasClass('action-button-disabled')) { @@ -2730,7 +2732,7 @@ IPA.attribute_table_widget = function(spec) { that.add_button = IPA.action_button({ name: 'add', label: '@i18n:buttons.add', - icon: 'add-icon', + icon: 'fa-plus', click: function() { if (!that.add_button.hasClass('action-button-disabled')) { that.add_handler(); @@ -3078,7 +3080,7 @@ IPA.combobox_widget = function(spec) { that.open_button = IPA.action_button({ name: 'open', - icon: 'combobox-icon', + icon: 'fa-angle-down', focusable: false, click: function() { that.no_close_flag = false; @@ -3116,7 +3118,7 @@ IPA.combobox_widget = function(spec) { that.search_button = IPA.action_button({ name: 'search', - icon: 'search-icon', + icon: 'fa-search', focusable: false, click: function() { that.no_close_flag = false; @@ -3680,7 +3682,7 @@ IPA.button = function(spec) { if (spec.type) button.addClass(spec.type); if (spec.icon) { - $('', { + $('', { 'class': 'fa '+spec.icon }).appendTo(button); } -- cgit