Add German localization and styling for administration module
- Introduced new JavaScript file `fis.admin_txt_de.js` for German translations of administration-related terms and messages. - Created `fis.admin.css` for styling the administration interface, including layout, cards, and buttons. - Added `fis.admin.de.js` for the main functionality of the administration module, implementing features such as system status checks and email testing. - Minified version of the German JavaScript file created as `fis.admin.de.min.js`. - Minified CSS file created as `fis.admin.min.css` for optimized loading.
This commit is contained in:
@@ -2842,6 +2842,7 @@ $.extend($t, {
|
||||
, m_rep: 'Berichte'
|
||||
, m_todo: 'ToDos'
|
||||
, m_bcd: 'BankBuchungen'
|
||||
, m_admin: 'Administration'
|
||||
, rsp: 'Passwort ändern'
|
||||
, pnm: 'Die Passwörter stimmen nicht überein'
|
||||
, cps: 'Das neue Passwort wurde gespeichert.'
|
||||
@@ -3221,8 +3222,26 @@ $fis.draft = {
|
||||
//, { lbl: $t.m_efa, id: 'm_efa', fnc: 'init:efa' }
|
||||
]);
|
||||
})();
|
||||
|
||||
/* The Administration module is restricted to users whose fds_sys authorization exceeds 4.
|
||||
The button is added — and only then does clicking it load the module script — after the
|
||||
asynchronous auth check resolves, so lower-privileged users never see it or fetch the code.
|
||||
Called from fis_main_go.js once the DOM (and the initial main menu) is ready. */
|
||||
$fis.addAdminMenuIfAuthorized = function () {
|
||||
if ($('#m_admin').length > 0) { return; } // idempotent
|
||||
$fis.getAuth('fds_sys').then(function (auth) {
|
||||
if ((auth || -1) > 4 && $('#m_admin').length === 0) {
|
||||
$ocms.ocmsmenu.push({ lbl: $t.m_admin, id: 'm_admin', fnc: 'init:admin', ico: 'glyphicon glyphicon-cog' });
|
||||
/* Re-render the main menu cleanly: drop the previously generated menu list
|
||||
(never the .nav-right settings dropdown) and rebuild it from the array. */
|
||||
$('#mainmenu').children('ul:not(.nav-right)').remove();
|
||||
$('#mainmenu').ocmsmenu($ocms.ocmsmenu);
|
||||
}
|
||||
}).catch(function () { /* auth lookup failed → leave the menu unchanged */ });
|
||||
};
|
||||
$(document).ready(function () {
|
||||
$fis.notifications.init();
|
||||
$fis.draft.init();
|
||||
$fis.ov();
|
||||
$fis.addAdminMenuIfAuthorized();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user