mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Font Awesome icons in header
https://fedorahosted.org/freeipa/ticket/3904
This commit is contained in:
parent
40ad71726e
commit
4bc1942f53
2
install/ui/less/font-awesome/variables.less
vendored
2
install/ui/less/font-awesome/variables.less
vendored
@ -1,7 +1,7 @@
|
|||||||
// Variables
|
// Variables
|
||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
@fa-font-path: "../fonts";
|
@fa-font-path: "../font";
|
||||||
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts"; // for referencing Bootstrap CDN font files directly
|
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts"; // for referencing Bootstrap CDN font files directly
|
||||||
@fa-css-prefix: fa;
|
@fa-css-prefix: fa;
|
||||||
@fa-version: "4.0.3";
|
@fa-version: "4.0.3";
|
||||||
|
@ -3681,7 +3681,7 @@ IPA.button = function(spec) {
|
|||||||
|
|
||||||
if (spec.icon) {
|
if (spec.icon) {
|
||||||
$('<span/>', {
|
$('<span/>', {
|
||||||
'class': 'icon '+spec.icon
|
'class': 'fa '+spec.icon
|
||||||
}).appendTo(button);
|
}).appendTo(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ define(['dojo/_base/declare',
|
|||||||
_fullnameSetter: function(value) {
|
_fullnameSetter: function(value) {
|
||||||
this.fullname = value;
|
this.fullname = value;
|
||||||
if (this.logged_user_node) {
|
if (this.logged_user_node) {
|
||||||
prop.set(this.logged_user_node, 'textContent', value);
|
prop.set(this.logged_user_node, 'textContent', ' '+ value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ define(['dojo/_base/declare',
|
|||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
|
||||||
nodes.push(construct.create('span', {
|
nodes.push(construct.create('span', {
|
||||||
'class': 'icon-user icon-white'
|
'class': 'fa fa-user'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.logged_user_node = construct.create('span', {
|
this.logged_user_node = construct.create('span', {
|
||||||
@ -205,18 +205,21 @@ define(['dojo/_base/declare',
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
name: 'profile',
|
name: 'profile',
|
||||||
label: 'Profile'
|
label: 'Profile',
|
||||||
|
icon: 'fa-user'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'password_reset',
|
name: 'password_reset',
|
||||||
label: 'Change password'
|
label: 'Change password',
|
||||||
|
icon: 'fa-key'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'class': 'divider'
|
'class': 'divider'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'logout',
|
name: 'logout',
|
||||||
label: 'Logout'
|
label: 'Logout',
|
||||||
|
icon: 'fa-sign-out'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -173,11 +173,20 @@ define(['dojo/_base/declare',
|
|||||||
var li = construct.create('li', {
|
var li = construct.create('li', {
|
||||||
'data-name': item.name || ''
|
'data-name': item.name || ''
|
||||||
});
|
});
|
||||||
|
|
||||||
var a = construct.create('a', {
|
var a = construct.create('a', {
|
||||||
'href': '#' + item.name || '',
|
'href': '#' + item.name || ''
|
||||||
innerHTML: item.label || ''
|
|
||||||
}, li);
|
}, li);
|
||||||
|
|
||||||
|
if (item.icon) {
|
||||||
|
construct.create('i', {
|
||||||
|
'class': 'fa ' + item.icon
|
||||||
|
}, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
var text = document.createTextNode(' '+item.label || '');
|
||||||
|
construct.place(text, a);
|
||||||
|
|
||||||
if (item['class']) {
|
if (item['class']) {
|
||||||
dom_class.add(li, item['class']);
|
dom_class.add(li, item['class']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user