Replace icons with the ones from Font Awesome

https://fedorahosted.org/freeipa/ticket/3904
This commit is contained in:
Petr Vobornik 2013-11-05 19:21:57 +01:00 committed by Martin Kosek
parent 4bc1942f53
commit c4abe3a2d9
12 changed files with 51 additions and 45 deletions

View File

@ -1028,14 +1028,15 @@ table.scrollable tbody {
width: 250px;
}
.combobox-widget-input .combobox-icon {
.combobox-widget-input a i {
display: inline-block;
position: absolute;
top: 0;
bottom: 0;
right: 0;
margin-top: 4px;
margin-right: 4px;
margin-right: 8px;
font-size: 16px;
}
.combobox-widget-list {
@ -1057,13 +1058,14 @@ table.scrollable tbody {
margin: 0;
}
.combobox-widget-list .search-icon {
.combobox-widget-list a i {
position: absolute;
top: 0;
bottom: 0;
right: 0;
margin-top: 6px;
margin-right: 3px;
font-size: 16px;
}
.host-adder-dialog table.fqdn {

View File

@ -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 || {};

View File

@ -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 || {};

View File

@ -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();

View File

@ -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'
}
]
},

View File

@ -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();

View File

@ -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;

View File

@ -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'
}
]
},

View File

@ -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();

View File

@ -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'
}
]
},

View File

@ -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 = '<span class=\"icon '+status+'-icon\"/> '+formatted_value;
formatted_value = '<i class=\"'+icon_cls+'\"/> '+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) {
$('<span/>', {
$('<i/>', {
'class': 'fa '+spec.icon
}).appendTo(button);
}

View File

@ -742,12 +742,12 @@ class UI_driver(object):
parent = self.get_form()
s = "[name='%s'].combobox-widget" % name
cb = self.find(s, By.CSS_SELECTOR, parent, strict=True)
open_btn = self.find('a[name=open] span', By.CSS_SELECTOR, cb, strict=True)
open_btn = self.find('a[name=open] i', By.CSS_SELECTOR, cb, strict=True)
open_btn.click()
self.wait()
self.wait_for_request()
search_btn = self.find('a[name=search] span', By.CSS_SELECTOR, cb, strict=True)
search_btn = self.find('a[name=search] i', By.CSS_SELECTOR, cb, strict=True)
opt_s = "select[name=list] option[value='%s']" % value
option = self.find(opt_s, By.CSS_SELECTOR, cb)
if not option: