mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-02-02 02:58:13 -05:00
Add back title for menu items.
This commit is contained in:
parent
362cb9fd50
commit
5c837b7470
@ -119,17 +119,22 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function addProfilesItems(state) {
|
function addProfilesItems(state) {
|
||||||
|
var systemProfileDisp = document.getElementById('js-system');
|
||||||
|
var directProfileDisp = document.getElementById('js-direct');
|
||||||
var currentProfileClass = 'om-active';
|
var currentProfileClass = 'om-active';
|
||||||
if (state.isSystemProfile) {
|
if (state.isSystemProfile) {
|
||||||
document.getElementById('js-system').parentElement
|
systemProfileDisp.parentElement.classList.add('om-active');
|
||||||
.classList.add('om-active');
|
|
||||||
currentProfileClass = 'om-effective';
|
currentProfileClass = 'om-effective';
|
||||||
}
|
}
|
||||||
if (state.currentProfileName === 'direct') {
|
if (state.currentProfileName === 'direct') {
|
||||||
document.getElementById('js-direct').parentElement
|
directProfileDisp.parentElement.classList.add(currentProfileClass);
|
||||||
.classList.add(currentProfileClass);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
systemProfileDisp.setAttribute('title',
|
||||||
|
state.availableProfiles['+system'].desc);
|
||||||
|
directProfileDisp.setAttribute('title',
|
||||||
|
state.availableProfiles['+direct'].desc);
|
||||||
|
|
||||||
var profilesEnd = document.getElementById('js-profiles-end');
|
var profilesEnd = document.getElementById('js-profiles-end');
|
||||||
var profilesContainer = profilesEnd.parentElement;
|
var profilesContainer = profilesEnd.parentElement;
|
||||||
var profileCount = 0;
|
var profileCount = 0;
|
||||||
@ -192,6 +197,9 @@
|
|||||||
targetProfile = profiles['+' + profile.defaultProfileName];
|
targetProfile = profiles['+' + profile.defaultProfileName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
profileDisp.setAttribute('title',
|
||||||
|
targetProfile.desc || targetProfile.name || '');
|
||||||
|
|
||||||
var iconClass = iconForProfileType[targetProfile.profileType];
|
var iconClass = iconForProfileType[targetProfile.profileType];
|
||||||
var icon = profileDisp.querySelector('.glyphicon');
|
var icon = profileDisp.querySelector('.glyphicon');
|
||||||
icon.setAttribute('class', 'glyphicon ' + iconClass)
|
icon.setAttribute('class', 'glyphicon ' + iconClass)
|
||||||
|
Loading…
Reference in New Issue
Block a user