2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Merge pull request #2017 from matmair/fr-1421-sso

SSO!
This commit is contained in:
Oliver
2021-10-11 17:20:08 +11:00
committed by GitHub
31 changed files with 712 additions and 405 deletions

View File

@ -177,6 +177,11 @@ function inventreeDocReady() {
'ui-autocomplete': 'dropdown-menu search-menu',
},
});
// Generate brand-icons
$('.brand-icon').each(function(i, obj) {
loadBrandIcon($(this), $(this).attr('brand_name'));
});
}
function isFileTransfer(transfer) {
@ -275,3 +280,13 @@ function inventreeLoad(name, defaultValue) {
return value;
}
}
function loadBrandIcon(element, name) {
// check if icon exists
var icon = window.FontAwesome.icon({prefix: 'fab', iconName: name});
if (icon) {
// add icon to button
element.addClass('fab fa-' + name);
}
}