Installed FontAwesome 4. Modified form and list generation to force icon selection through a single method so that icons, icon sizes and button colors are all consistent. Everything seems to be working now with the exception of the status bubbles on list pages. Will need to modify ansible-ui.less anc change the unicode strings to new FontAwesome values.

This commit is contained in:
Chris Houseknecht
2013-12-20 23:16:52 +00:00
parent e16e5a0dfa
commit d02d2ebf15
41 changed files with 944 additions and 1688 deletions

View File

@@ -18,11 +18,12 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
function(Empty, InventoryHosts, GetBasePath, SearchInit, PaginateInit) {
return function(params) {
var group_id = params.group_id;
var scope = params.scope;
var group_id = params.group_id;
var inventory_id = params.inventory_id;
var url = ( !Empty(group_id) ) ? GetBasePath('groups') + group_id + '/all_hosts/' :
GetBasePath('inventory') + params.inventory_id + '/hosts/';
GetBasePath('inventory') + inventory_id + '/hosts/';
SearchInit({ scope: scope, set: 'hosts', list: InventoryHosts, url: url });
PaginateInit({ scope: scope, list: InventoryHosts, url: url });
@@ -35,10 +36,11 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
return function(params) {
var scope = params.scope;
var inventory_id = params.inventory_id;
var generator = GenerateList;
generator.inject(InventoryHosts, { mode: 'edit', id: 'hosts-container', breadCrumbs: false, searchSize: 'col-lg-5' });
HostsReload({ scope: scope, group_id: null });
HostsReload({ scope: scope, group_id: null, inventory_id: inventory_id });
}
}])

View File

@@ -459,7 +459,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
$('.list-header').each(function(index) {
if ($(this).attr('id') != fld + '-header') {
var icon = $(this).find('i');
icon.attr('class','icon-sort');
icon.attr('class','fa-sort');
}
});
@@ -467,18 +467,18 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
// and set the sort direction
var icon = $('#' + fld + '-header i');
var direction = '';
if (icon.hasClass('icon-sort')) {
icon.removeClass('icon-sort');
icon.addClass('icon-sort-up');
if (icon.hasClass('fa-sort')) {
icon.removeClass('fa-sort');
icon.addClass('fa-sort-up');
}
else if (icon.hasClass('icon-sort-up')) {
icon.removeClass('icon-sort-up');
icon.addClass('icon-sort-down');
else if (icon.hasClass('fa-sort-up')) {
icon.removeClass('fa-sort-up');
icon.addClass('fa-sort-down');
direction = '-';
}
else if (icon.hasClass('icon-sort-down')) {
icon.removeClass('icon-sort-down');
icon.addClass('icon-sort-up');
else if (icon.hasClass('fa-sort-down')) {
icon.removeClass('fa-sort-down');
icon.addClass('fa-sort-up');
}
// Set the sorder order value and call the API to refresh the list with the new order