|
|
|
@@ -1036,21 +1036,53 @@ app.state.Home = function() |
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
// TODO: Nur, wenn nicht aktiviert
|
|
|
|
app.core.View.showModal({
|
|
|
|
title: _lc('HOME_MODAL_NOT_ACTIVATED_TITLE'),
|
|
|
|
body: app.core.View.getTemplate('home-modal-not-activated'),
|
|
|
|
hideButtons: true,
|
|
|
|
hideCloseBtn: true,
|
|
|
|
cancelButtonText: _lc('HOME_MODAL_NOT_ACTIVATED_BUTTON')
|
|
|
|
});
|
|
|
|
|
|
|
|
$("body").on( 'click', '[data-id="not-activated"]', function(e)
|
|
|
|
{
|
|
|
|
e.preventDefault();
|
|
|
|
app.core.View.closeModal();
|
|
|
|
window.location.href = $(this).attr("href");
|
|
|
|
});
|
|
|
|
let profile = app.model.SessionUser.getUserProfile();
|
|
|
|
let groupId = null;
|
|
|
|
let groupName = null;
|
|
|
|
let status = null;
|
|
|
|
let showPopup = false;
|
|
|
|
let deleteStorageValues = true;
|
|
|
|
let storageGroupIds = JSON.parse(sessionStorage.getItem("g_ids_popup_shown"));
|
|
|
|
if (storageGroupIds === null) {
|
|
|
|
storageGroupIds = [];
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i = 0; i < userGroups.length; i++) {
|
|
|
|
groupId = userGroups[i].getId();
|
|
|
|
status = profile.getGroupData(groupId).status;
|
|
|
|
|
|
|
|
if (status === 'not_approved') {
|
|
|
|
deleteStorageValues = false;
|
|
|
|
if (!storageGroupIds.includes(groupId)) {
|
|
|
|
groupName = userGroups[i].getName();
|
|
|
|
showPopup = true;
|
|
|
|
storageGroupIds.push(groupId);
|
|
|
|
window.sessionStorage.setItem("g_ids_popup_shown", JSON.stringify(storageGroupIds));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (deleteStorageValues) {
|
|
|
|
sessionStorage.removeItem("g_ids_popup_shown");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (showPopup) {
|
|
|
|
app.core.View.showModal({
|
|
|
|
title: _lc('HOME_MODAL_NOT_ACTIVATED_TITLE'),
|
|
|
|
body: app.core.View.getTemplate('home-modal-not-activated', { groupName: groupName }),
|
|
|
|
hideButtons: true,
|
|
|
|
hideCloseBtn: true,
|
|
|
|
cancelButtonText: _lc('HOME_MODAL_NOT_ACTIVATED_BUTTON')
|
|
|
|
});
|
|
|
|
|
|
|
|
$("body").on( 'click', '[data-id="not-activated"]', function(e)
|
|
|
|
{
|
|
|
|
e.preventDefault();
|
|
|
|
app.core.View.closeModal();
|
|
|
|
window.location.href = $(this).attr("href");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|