diff --git a/.gitignore b/.gitignore index 39e6ea18a..ca2de00ed 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ yarn.lock .prettierc.json jsdoc-tutorials */jsdoc-tutorials/* +**/.vscode/* +**/launch.json +*/launch.json aide/config.php aide/custom.css @@ -22,5 +25,7 @@ aide/config_search.php plugins/mel_portail/modules/fluxrss/rss plugins/mel_portail/config plugins/mel_help/public/* +plugins/mel_useful_link/config/* plugins/mel_news/files/* -plugins/mel_nextcloud/nextcloud/apps/*.tar.gz \ No newline at end of file +plugins/mel_nextcloud/nextcloud/apps/*.tar.gz +.vscode/launch.json diff --git a/.prettierignore b/.prettierignore index 3f784dcd5..61b12ee5a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,4 @@ -**/jsdoc-tutorials/**.html \ No newline at end of file +**/jsdoc-tutorials/**.html +**/js_template/**.js +**/barup.html +**/user.html \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 354fd41c8..92bb27b4d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,26 +1,26 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Listen for XDebug", - "type": "php", - "request": "launch", - "port": 9000, - "xdebugSettings": { - "max_children": 99999, - "max_data": -1, - } - }, - { - "name": "Launch currently open script", - "type": "php", - "request": "launch", - "program": "${file}", - "cwd": "${fileDirname}", - "port": 9000 - } - ] -} \ No newline at end of file + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9003, + "xdebugSettings": { + "max_children": 99999, + "max_data": -1 + } + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9003 + } + ] +} diff --git a/aide/index.php b/aide/index.php index 3c11c6fee..06d175f48 100644 --- a/aide/index.php +++ b/aide/index.php @@ -10,8 +10,8 @@ - - + + <?= $config['title'] ?> diff --git a/jsdoc.definitions.js b/jsdoc.definitions.js index 56b6a00ac..ff301bcf0 100644 --- a/jsdoc.definitions.js +++ b/jsdoc.definitions.js @@ -1,8 +1,5 @@ /** * @namespace Plugins - * @property {Plugin.MelMetapage} MelMetapage - * @property {Plugin.Tchap} Tchap - * @property {Plugin.Workspace} Tchap */ /** diff --git a/plugins/annuaire/annuaire.js b/plugins/annuaire/annuaire.js index 1306a5eb1..8d2682449 100644 --- a/plugins/annuaire/annuaire.js +++ b/plugins/annuaire/annuaire.js @@ -498,6 +498,18 @@ rcube_webmail.prototype.annuaire_list_fill_list = function(parent_id, elements) if (parent_id) { $('#rcmrow' + parent_id).find('> ul > li.child').remove(); } + rcmail.annuaire_list.container.find('div.treetoggle, .object').each((i,e) => { + if(!$(e).hasClass('already')) { + $(e).attr('tabindex', 0).addClass('already mel-focus'); + if($(e).hasClass('object')) { + $(e).on('keydown', function(node) { + if(node.originalEvent.key === 'Enter'){ + $(node.currentTarget).click(); + } + }); + } + } + }); }; // Filter list with annuaireSelector diff --git a/plugins/annuaire/skins/mel_elastic/annuaire.css b/plugins/annuaire/skins/mel_elastic/annuaire.css index fb7d7eea1..f66021768 100644 --- a/plugins/annuaire/skins/mel_elastic/annuaire.css +++ b/plugins/annuaire/skins/mel_elastic/annuaire.css @@ -43,6 +43,10 @@ text-overflow: ellipsis; } +#annuaire-list li > .description { + color: var(--listbox-text-color); +} + #annuaire-list li.selected > .name { font-weight: bold; } @@ -96,7 +100,8 @@ background: url(images/carnet.png?v=e784.5000) 17px 14px no-repeat; } -html.dark-mode #annuaire-list .folder.addressbook { +html.dark-mode #annuaire-list .folder.addressbook, +html.dark-mode-custom #annuaire-list .folder.addressbook { background: url(images/carnet-dark.png) 17px 14px no-repeat; } diff --git a/plugins/calendar/calendar_base.js b/plugins/calendar/calendar_base.js index 556b5d5ff..bf3a6ca5b 100644 --- a/plugins/calendar/calendar_base.js +++ b/plugins/calendar/calendar_base.js @@ -28,102 +28,125 @@ */ // Basic setup for Roundcube calendar client class -function rcube_calendar(settings) -{ - // extend base class - rcube_libcalendaring.call(this, settings); +function rcube_calendar(settings) { + // extend base class + rcube_libcalendaring.call(this, settings); - // create new event from current mail message - this.create_from_mail = function(uid) - { - if (!uid && !(uid = rcmail.get_single_uid())) { - return; - } - - var url = {_mbox: rcmail.env.mailbox, _uid: uid, _framed: 1}, - buttons = {}, - button_classes = ['mainaction save', 'cancel'], - title = rcmail.gettext('calendar.createfrommail'), - dialog = $(''; + '" title= "page:' + + eClass + + '"> '; let html = frame; if (eClass === 'discussion') { diff --git a/plugins/mel_metapage/js/actions/test.js b/plugins/mel_metapage/js/actions/test.js index d947504fe..f6ce6d5f4 100644 --- a/plugins/mel_metapage/js/actions/test.js +++ b/plugins/mel_metapage/js/actions/test.js @@ -1,9 +1,38 @@ $(document).ready(async () => { - const loadJsModule = window.loadJsModule ?? parent.loadJsModule ?? top.loadJsModule; - const {RcmailDialog, RcmailDialogChoiceButton} = await loadJsModule('mel_metapage', 'modal.js', '/js/lib/classes/'); + const loadJsModule = + window.loadJsModule ?? parent.loadJsModule ?? top.loadJsModule; + const { RcmailDialog, RcmailDialogChoiceButton, MelDialog, DialogPage } = + await loadJsModule('mel_metapage', 'modal.js', '/js/lib/classes/'); - const button1 = new RcmailDialogChoiceButton('Aller à l\'accueil', 'home', {}); - const button2 = new RcmailDialogChoiceButton('Aller aux paramètres', 'settings', {}); + // const button1 = new RcmailDialogChoiceButton("Aller à l'accueil", 'home', { + // click: () => { + // dialog.switch_page('page2'); + // }, + // }); + // const button2 = new RcmailDialogChoiceButton( + // 'Aller aux paramètres', + // 'settings', + // {}, + // ); - RcmailDialog.DrawChoice('Test', button1, button2); -}); \ No newline at end of file + // const page = DialogPage.DrawChoice('Test', button1, button2, 'index'); + // let dialog = new MelDialog(page); + // dialog.show(); + + // dialog.add_page('page2', { + // content: $('
Yolo
'), + // title: 'Strat', + // buttons: [button1, button2], + // }); + + // window.dialog = dialog; + + if ( + await MelDialog.Confirm('Veux-tu le faire ?', { + title: 'le faire ?', + waiting_button_enabled: 0, + }) + ) { + alert('gg'); + } else alert('notgg'); +}); diff --git a/plugins/mel_metapage/js/changeframe.js b/plugins/mel_metapage/js/changeframe.js index 23db408f1..140c667a9 100644 --- a/plugins/mel_metapage/js/changeframe.js +++ b/plugins/mel_metapage/js/changeframe.js @@ -1,1038 +1,1177 @@ (() => { - //window.addEventListener("message", receiveMessage, false); - function mel_wsp_changeframe(event) - { - - if (window !== top) top.mel_wsp_changeframe(event); - - // console.log("exec_info", event, event.data); - if (event.data.exec_info === undefined) - return; - const message = event.data.exec_info; - const datas = event.data.datas; - switch (message) { - case "uid": - rcmail.env.current_workspace_multipage_uid = datas; - break; - case "UpdateMenu": - //console.log("UpdateMenu", UpdateMenu, datas); - UpdateMenu(datas.class, datas.picture, datas.toolbar); - break; - case "ChangeFrame": - if (metapage_frames.workspace === undefined) - { - metapage_frames.workspace = false; - metapage_frames.addEvent("changepage.before", (eClass) => { - //console.log("addEvent", $(".tiny-wsp-menu")); - if (rcmail.env.wsp_datas.toolbar.exists === true && metapage_frames.workspace === false)//($(".tiny-wsp-menu").length > 0 && $(".tiny-wsp-menu").css("display") !== "none") - { - //console.log("test"); - try { - //console.log("test", $(".wsp-toolbar-edited").css("display") !== "none"); - if (true || window.webconf_master_bar === undefined) - { - $(".tiny-rocket-chat").css("display", "block"); - $(".tiny-wsp-menu").css("display", "none") - .data("toolbaropen", $(".wsp-toolbar-edited").css("display") !== "none") - .data("lastopenedframe", rcmail.env.wsp_datas.toolbar.current); - $(".wsp-toolbar-edited").css("display", "none"); - - $('iframe.mwsp').removeClass("mwsp").each((i,e) => { - if (!$(e).hasClass("workspace-frame")) - e.contentWindow.$("html").removeClass("mwsp").removeClass("mwvcs"); - }); - } - else - { - $(".wsp-toolbar ") - .data("lastopenedframe", rcmail.env.wsp_datas.toolbar.current); - } - } catch (error) { - console.error(error); - } - //console.log("addEvent", $(".tiny-wsp-menu")); - metapage_frames.workspace = true; - } - else { - $('iframe.mwsp').removeClass("mwsp").each((i,e) => { - if (!$(e).hasClass("workspace-frame")) - e.contentWindow.$("html").removeClass("mwsp");//.find(".mwsp-style").remove(); - }); - } - }); - metapage_frames.addEvent("changepage.after", (eClass, changepage, isAriane, querry, id) => { - if (metapage_frames.workspace === true && eClass === "workspace") - { - if (true || window.webconf_master_bar === undefined) - { - $(".tiny-wsp-menu").css("display", ""); - - if (rcmail.env.mel_metapage_mail_configs["mel-chat-placement"] !== rcmail.gettext("up", "mel_metapage")) - $(".tiny-rocket-chat").css("display", "none"); - - const lastFrame = $(".tiny-wsp-menu").data("lastopenedframe"); - const toolbaropen = $(".tiny-wsp-menu").data("toolbaropen"); - //console.log("test", toolbaropen, lastFrame, $(".tiny-wsp-menu").data("toolbaropen")); - if (toolbaropen) - $(".wsp-toolbar-edited").css("display", ""); - - if (lastFrame === "wekan") - ChangeFrame(lastFrame, $("iframe.workspace-frame").length>0 ? $("iframe.workspace-frame")[0].contentWindow.rcmail.env.wekan_datas.id : rcmail.env.wekan_datas.id); - else if(lastFrame === "stockage") - ChangeFrame(lastFrame, `uid:${rcmail.env.current_workspace_multipage_uid}`); - else - ChangeFrame(lastFrame); - } - else { - const lastFrame = $(".wsp-toolbar").data("lastopenedframe"); - ChangeFrame(lastFrame); - } - metapage_frames.workspace = false; - - if (rcmail.env.wsp_datas.toolbar.exists === true && (window.webconf_master_bar !== undefined)) - { - let toolbar_conf = $(".webconf-toolbar"); - if (!toolbar_conf.hasClass("switched-toolbar")) - window.webconf_master_bar.switch_toolbar(); - toolbar_conf.find(".conf-switch-toolbar").css("display", ""); - } - } - else - { - if (rcmail.env.wsp_datas.toolbar.exists === true && (window.webconf_master_bar !== undefined)) - { - let toolbar_conf = $(".webconf-toolbar"); - if (toolbar_conf.hasClass("switched-toolbar")) - window.webconf_master_bar.switch_toolbar(); - toolbar_conf.find(".conf-switch-toolbar").css("display", "none"); - } - } + //window.addEventListener("message", receiveMessage, false); + function mel_wsp_changeframe(event) { + if (window !== top) top.mel_wsp_changeframe(event); + + // console.log("exec_info", event, event.data); + if (event.data.exec_info === undefined) return; + const message = event.data.exec_info; + const datas = event.data.datas; + switch (message) { + case 'uid': + rcmail.env.current_workspace_multipage_uid = datas; + break; + case 'UpdateMenu': + //console.log("UpdateMenu", UpdateMenu, datas); + UpdateMenu(datas.class, datas.picture, datas.toolbar); + break; + case 'ChangeFrame': + if (metapage_frames.workspace === undefined) { + metapage_frames.workspace = false; + metapage_frames.addEvent('changepage.before', (eClass) => { + //console.log("addEvent", $(".tiny-wsp-menu")); + if ( + rcmail.env.wsp_datas.toolbar.exists === true && + metapage_frames.workspace === false + ) { + //($(".tiny-wsp-menu").length > 0 && $(".tiny-wsp-menu").css("display") !== "none") + //console.log("test"); + try { + //console.log("test", $(".wsp-toolbar-edited").css("display") !== "none"); + if (true || window.webconf_master_bar === undefined) { + $('.tiny-rocket-chat').css('display', 'block'); + $('.tiny-wsp-menu') + .css('display', 'none') + .data( + 'toolbaropen', + $('.wsp-toolbar-edited').css('display') !== 'none', + ) + .data( + 'lastopenedframe', + rcmail.env.wsp_datas.toolbar.current, + ); + $('.wsp-toolbar-edited').css('display', 'none'); + + $('iframe.mwsp') + .removeClass('mwsp') + .each((i, e) => { + if (!$(e).hasClass('workspace-frame')) + e.contentWindow + .$('html') + .removeClass('mwsp') + .removeClass('mwvcs'); }); + } else { + $('.wsp-toolbar ').data( + 'lastopenedframe', + rcmail.env.wsp_datas.toolbar.current, + ); } - switch (datas) { - case "rocket": - ChangeFrame(datas, event.data.url); - break; - default: - ChangeFrame(datas, event.data.args === undefined ? null : event.data.args); - break; - } - break; - case "ChangePage": - ChangePage(datas); - break; - case "change_environnement": - InitialiseDatas(); - rcmail.env.wsp_datas.toolbar.current = datas; - break; - case "ChangeToolbarPage": - //console.log("here", datas); - ChangeToolbarPage(datas); - break; - default: - break; - } - } - - window.mel_wsp_changeframe = mel_wsp_changeframe; - -})(); - -function InitialiseDatas() -{ - if (rcmail.env.wsp_datas === undefined) - rcmail.env.wsp_datas = { - toolbar:{} - }; -} - - -function UpdateMenu(_class, _picture, _toolbar) -{ - const is_in_visio = !!top['mel.visio.started']; - var $ = top.$; - InitialiseDatas(); - if (rcmail.env.wsp_datas.toolbar.current === "inpage") - { - if (true || window.webconf_master_bar === undefined) - { - let button = $(".tiny-rocket-chat"); - if (button.length > 0) - button.css("display", "block"); - $(".tiny-wsp-menu").remove(); - if ($(".wsp-toolbar-edited").length > 0) - $(".wsp-toolbar-edited").remove(); - else - $(".wsp-toolbar") - .css("margin", "") - .css("position", "") - .css("bottom", "") - .css("right", "") - .css("z-index", "") - .css("width", ""); - $(".added-wsp-item").remove(); - } - else - { - let toolbar_conf = $(".webconf-toolbar"); - if (toolbar_conf.hasClass("switched-toolbar")) - window.webconf_master_bar.switch_toolbar(); - toolbar_conf.find(".conf-switch-toolbar").remove(); - toolbar_conf.find(".wsp-toolbar-item-wsp").remove(); - } - rcmail.env.wsp_datas.toolbar.exists = false; - - } - else { - if (true || window.webconf_master_bar === undefined) - { - rcmail.env.wsp_datas.toolbar.current = _class; - if (rcmail.env.wsp_datas.toolbar.exists === true || $(".wsp-toolbar-edited").length > 0) - return; - const basePx = "50px"; - let right = basePx; - let bottom = basePx; - - let button = $(".tiny-rocket-chat"); - if (button.length > 0) - { - if (rcmail.env.mel_metapage_mail_configs["mel-chat-placement"] !== rcmail.gettext("up", "mel_metapage")) - button.css("display", "none"); - - right = button.css("right"); - bottom = button.css("bottom"); - - if (right === "auto") - right = basePx; - - if (bottom === "auto") - bottom = basePx; - - } - //console.log("button", button, right, bottom); - button = top.$(".tiny-wsp-menu"); - - if (button.length === 0) - { - let picture = $(".wsp-picture"); - top.$("#layout").append(`
`) - button = top.$(".tiny-wsp-menu"); - button.css("position", "absolute"); - button.css("left", '80px') - .css("bottom", '2px') - .css("height", "54px") - .css("width", "54px") - .css("background-color", _picture === null ? picture.css("background-color") : _picture.color) - .css("z-index", 100) - .addClass("dwp-round") - .append(_picture === null ? picture.html() : _picture.picture); - } - button.css("display", ""); - - (_toolbar !== null && top.$(".wsp-toolbar-edited").length === 0 ? top.$("#layout").append(_toolbar).find(".wsp-toolbar-edited") : top.$(".wsp-toolbar-edited") ) - .css("margin", "initial") - .css("position", "fixed") - // .css("bottom", (parseInt(bottom.replace("px", "")) - 3) + "px") - // .css("right", right) - .css("z-index", 99) - // .css("width", "calc(100% - 120px)") - .prepend('
').find(".wsp-toolbar-melw-wsp-hider").click((e) =>{ - const down = 'icon-mel-chevron-down'; - const up = 'icon-mel-chevron-up'; - let $children = $(e.currentTarget).children(); - - if ($children.hasClass(down)) - { - let $parent = $(e.currentTarget) - .css("right", "0") - .css("width", '100%') - .attr("title", "Afficher la barre d'accès rapide") - .parent(); - $parent.css('bottom', `-${$parent[0].clientHeight}px`); - $(".tiny-wsp-menu").css('bottom', `-${$parent[0].clientHeight}px`); - $children.removeClass(down) - .addClass(up); - //.addClass("moved"); - $(".mwsp").addClass("moved"); - } - else { - let $parent = $(e.currentTarget) - .css("right", "") - .css("width", '') - .attr("title", "Cacher la barre d'accès rapide") - .parent(); - $parent.css('bottom', ''); - $(".tiny-wsp-menu").css('bottom', '2px'); - $children.removeClass(up) - .addClass(down); - $(".mwsp").removeClass("moved"); - } - }); - rcmail.env.wsp_datas.toolbar = { - current: _class, - exists: true - }; - - if (is_in_visio) - { - $(".wsp-toolbar-edited").addClass("webconfstarted").css('max-width', `calc(100% - ${$('iframe.webconf-frame').width()}px)`); - } - - } - else - { - if (rcmail.env.wsp_datas.toolbar.exists === true) - return; - let toolbar_conf = $(".webconf-toolbar"); - const toolbar_wsp = $(_toolbar); - toolbar_wsp.find(".wsp-toolbar-item").each((i,e) => { - toolbar_conf.append(($(e).hasClass("first") ? $(e).css("margin-left","60px").css("pointer-events", "all") : $(e)).addClass("wsp-toolbar-item-wsp").css("display", "none")); - }); - toolbar_conf.append(`
Espace
`); - rcmail.env.wsp_datas.toolbar = { - current: _class, - exists: true - }; - window.webconf_master_bar.switch_toolbar(); - } - - - - } -} - -async function ChangeToolbar(_class, event, otherDatas = null) -{ - const uid = $(event).data("uid"); - - if(rcmail.busy) - { - rcmail.clear_messages(); - rcmail.set_busy(false); - } - - $(".wsp-toolbar-item").removeClass("active").removeAttr("disabled").removeAttr("aria-disabled");; - $(event).addClass("active"); - if (_class !== "rocket") - { - $(event).attr("disabled", "disabled") - .attr("aria-disabled", "true"); - } - - let datas = [{ - exec_info:"uid", - datas:uid - }]; - let picture = $(".wsp-picture"); - - switch (_class) { - case "calendar": - - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar:$(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } - }); - datas.push( - { - exec_info:"ChangeFrame", - datas:_class - } - ); - break; - case "mail": - - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar:$(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } + } catch (error) { + console.error(error); + } + //console.log("addEvent", $(".tiny-wsp-menu")); + metapage_frames.workspace = true; + } else { + $('iframe.mwsp') + .removeClass('mwsp') + .each((i, e) => { + if (!$(e).hasClass('workspace-frame')) + e.contentWindow.$('html').removeClass('mwsp'); //.find(".mwsp-style").remove(); }); - datas.push( - { - exec_info:"ChangeFrame", - datas:_class, - args:$(event).data("email") - } - ); - break; - case "stockage": - - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar:$(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } - }); - datas.push( - { - exec_info:"ChangeFrame", - datas:_class, - args:otherDatas === null ? `uid:${uid}` : otherDatas - } - ); - break; - case "rocket": - if (parent.$("html").hasClass("webconf-started")) - { - if (parent.$(".webconf-toolbar").length > 0 && parent.$(".webconf-toolbar .wsp-toolbar-item.conf-ariane").css("display") !== "none") - { - if (!parent.$(".webconf-toolbar .wsp-toolbar-item.conf-ariane").hasClass("active")) - { - parent.$(".webconf-toolbar .wsp-toolbar-item.conf-ariane").click(); - } - - (parent.$("iframe.webconf-frame").length > 0 ? parent.$("iframe.webconf-frame")[0].contentWindow.$("#mm-ariane")[0] : parent.$("#mm-ariane")[0]) - .contentWindow.postMessage({ - externalCommand: 'go', - path: otherDatas - }, '*'); - - } - else { - alert("Cette option n'est pas compatible avec votre visioconférence."); - } - - return; } - - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar: $(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } - }); - datas.push( - { - exec_info:"ChangeFrame", - datas:"rocket", - url:otherDatas - } - ); - break; - case "home": - datas.push({ - exec_info:"change_environnement", - datas:"inpage" - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:null, - picture:null - }, - toolbar:null - } - }); - datas.push( - { - exec_info:"ChangePage", - datas:_class - } - ); - break; - - case "tasklist": - - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar:$(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } - }); - datas.push( - { - exec_info:"ChangeFrame", - datas:_class, - args:rcmail.env.current_workspace_tasklist_uid - } - ); - break; - - case "wekan": - datas.push({ - exec_info:"change_environnement", - datas:_class - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:_class, - picture:{ - color:picture.css("background-color"), - picture:picture.html() - }, - toolbar:$(".wsp-toolbar")[0].outerHTML.replace("wsp-toolbar", "wsp-toolbar wsp-toolbar-edited") - } - }); - datas.push( - { - exec_info:"ChangeFrame", - datas:_class, - args:otherDatas !== null ? otherDatas : $(event).data("wekan") - } + }); + metapage_frames.addEvent( + 'changepage.after', + (eClass, changepage, isAriane, querry, id) => { + if ( + metapage_frames.workspace === true && + eClass === 'workspace' + ) { + if (true || window.webconf_master_bar === undefined) { + $('.tiny-wsp-menu').css('display', ''); + + if ( + rcmail.env.mel_metapage_mail_configs[ + 'mel-chat-placement' + ] !== rcmail.gettext('up', 'mel_metapage') + ) + $('.tiny-rocket-chat').css('display', 'none'); + + const lastFrame = $('.tiny-wsp-menu').data('lastopenedframe'); + const toolbaropen = $('.tiny-wsp-menu').data('toolbaropen'); + //console.log("test", toolbaropen, lastFrame, $(".tiny-wsp-menu").data("toolbaropen")); + if (toolbaropen) $('.wsp-toolbar-edited').css('display', ''); + + if (lastFrame === 'wekan') + ChangeFrame( + lastFrame, + $('iframe.workspace-frame').length > 0 + ? $('iframe.workspace-frame')[0].contentWindow.rcmail + .env.wekan_datas.id + : rcmail.env.wekan_datas.id, ); - break; - case "params": - datas.push({ - exec_info:"change_environnement", - datas:"inpage" - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:"inpage", - picture:{ - color:null, - picture:null - }, - toolbar:null - } - }); - datas.push( - { - exec_info:"ChangePage", - datas:_class + else if (lastFrame === 'stockage') + ChangeFrame( + lastFrame, + `uid:${rcmail.env.current_workspace_multipage_uid}`, + ); + else ChangeFrame(lastFrame); + } else { + const lastFrame = $('.wsp-toolbar').data('lastopenedframe'); + ChangeFrame(lastFrame); } - ); - break; - case "back": - datas.push({ - exec_info:"change_environnement", - datas:"inpage" - }) - datas.push({ - exec_info:"UpdateMenu", - datas:{ - class:"inpage", - picture:{ - color:null, - picture:null - }, - toolbar:null + metapage_frames.workspace = false; + + if ( + rcmail.env.wsp_datas.toolbar.exists === true && + window.webconf_master_bar !== undefined + ) { + let toolbar_conf = $('.webconf-toolbar'); + if (!toolbar_conf.hasClass('switched-toolbar')) + window.webconf_master_bar.switch_toolbar(); + toolbar_conf.find('.conf-switch-toolbar').css('display', ''); } - }); - datas.push( - { - exec_info:"ChangePage", - datas:_class + } else { + if ( + rcmail.env.wsp_datas.toolbar.exists === true && + window.webconf_master_bar !== undefined + ) { + let toolbar_conf = $('.webconf-toolbar'); + if (toolbar_conf.hasClass('switched-toolbar')) + window.webconf_master_bar.switch_toolbar(); + toolbar_conf + .find('.conf-switch-toolbar') + .css('display', 'none'); } - ); + } + }, + ); + } + switch (datas) { + case 'rocket': + ChangeFrame(datas, event.data.url); break; - - default: - console.log(_class); + default: + ChangeFrame( + datas, + event.data.args === undefined ? null : event.data.args, + ); break; - } - - try { - for (let index = 0; index < datas.length; index++) { - const element = datas[index]; - mel_wsp_changeframe({ - data:element - }) - } - } catch (error) { - console.error('###Une erreur c\'est produite lors du changement de page.', error, datas); + break; + case 'ChangePage': + ChangePage(datas); + break; + case 'change_environnement': + InitialiseDatas(); + rcmail.env.wsp_datas.toolbar.current = datas; + break; + case 'ChangeToolbarPage': + //console.log("here", datas); + ChangeToolbarPage(datas); + break; + default: + break; } + } - if (uid !== undefined) - { - const url = mel_metapage.Functions.url("workspace", "workspace", {_uid:uid, _page:_class}) + '&_force_bnum=1'; - window.history.replaceState({}, document.title, url.replace(`&${rcmail.env.mel_metapage_const.key}=${rcmail.env.mel_metapage_const.value}`, "")); - if (window !== top) - top.history.replaceState({}, document.title, url.replace(`&${rcmail.env.mel_metapage_const.key}=${rcmail.env.mel_metapage_const.value}`, "")); - } -} + window.mel_wsp_changeframe = mel_wsp_changeframe; +})(); -async function ChangeFrame(_class, otherDatas = null) -{ - const is_in_visio = !!top['mel.visio.started']; - //Actions à faire avant de changer de frame - if (rcmail.env.mel_metapage_mail_configs["mel-chat-placement"] === rcmail.gettext("up", "mel_metapage")) - ArianeButton.default().hide_button(); +function InitialiseDatas() { + if (rcmail.env.wsp_datas === undefined) + rcmail.env.wsp_datas = { + toolbar: {}, + }; +} - try { - m_mp_close_ariane(); - } catch (error) { - +function UpdateMenu(_class, _picture, _toolbar) { + const is_in_visio = !!top['mel.visio.started']; + var $ = top.$; + InitialiseDatas(); + if (rcmail.env.wsp_datas.toolbar.current === 'inpage') { + if (true || window.webconf_master_bar === undefined) { + let button = $('.tiny-rocket-chat'); + if (button.length > 0) button.css('display', 'block'); + $('.tiny-wsp-menu').remove(); + if ($('.wsp-toolbar-edited').length > 0) + $('.wsp-toolbar-edited').remove(); + else + $('.wsp-toolbar') + .css('margin', '') + .css('position', '') + .css('bottom', '') + .css('right', '') + .css('z-index', '') + .css('width', ''); + $('.added-wsp-item').remove(); + } else { + let toolbar_conf = $('.webconf-toolbar'); + if (toolbar_conf.hasClass('switched-toolbar')) + window.webconf_master_bar.switch_toolbar(); + toolbar_conf.find('.conf-switch-toolbar').remove(); + toolbar_conf.find('.wsp-toolbar-item-wsp').remove(); } - if (_class === "rocket" && $(".discussion-frame").length > 0 && $(".discussion-frame").css("display") !== "none") - { - $(".discussion-frame")[0].contentWindow.postMessage({ - externalCommand: 'go', - path: otherDatas - }, '*'); + rcmail.env.wsp_datas.toolbar.exists = false; + } else { + if (true || window.webconf_master_bar === undefined) { + rcmail.env.wsp_datas.toolbar.current = _class; + if ( + rcmail.env.wsp_datas.toolbar.exists === true || + $('.wsp-toolbar-edited').length > 0 + ) return; - } - - const style = ($('iframe.workspace-frame').length > 0 ? $('iframe.workspace-frame')[0].contentWindow.rcmail.env.current_bar_colors : rcmail.env.current_bar_colors); - - if (!is_in_visio) - $(".mm-frame").css("display", "none"); - else - $(".mm-frame").each((i,e) => { - if (!$(e).hasClass("webconf-frame")) - $(e).css("display", "none"); + const basePx = '50px'; + let right = basePx; + let bottom = basePx; + + let button = $('.tiny-rocket-chat'); + if (button.length > 0) { + if ( + rcmail.env.mel_metapage_mail_configs['mel-chat-placement'] !== + rcmail.gettext('up', 'mel_metapage') + ) + button.css('display', 'none'); + + right = button.css('right'); + bottom = button.css('bottom'); + + if (right === 'auto') right = basePx; + + if (bottom === 'auto') bottom = basePx; + } + //console.log("button", button, right, bottom); + button = top.$('.tiny-wsp-menu'); + + if (button.length === 0) { + let picture = $('.wsp-picture'); + top.$('#layout').append('
'); + button = top.$('.tiny-wsp-menu'); + button.css('position', 'absolute'); + button + .css('left', '80px') + .css('bottom', '2px') + .css('height', '54px') + .css('width', '54px') + .css( + 'background-color', + _picture === null + ? picture.css('background-color') + : _picture.color, + ) + .css('z-index', 100) + .addClass('dwp-round') + .append(_picture === null ? picture.html() : _picture.picture); + } + button.css('display', ''); + + (_toolbar !== null && top.$('.wsp-toolbar-edited').length === 0 + ? top.$('#layout').append(_toolbar).find('.wsp-toolbar-edited') + : top.$('.wsp-toolbar-edited') + ) + .css('margin', 'initial') + .css('position', 'fixed') + // .css("bottom", (parseInt(bottom.replace("px", "")) - 3) + "px") + // .css("right", right) + .css('z-index', 99) + // .css("width", "calc(100% - 120px)") + .prepend( + '
', + ) + .find('.wsp-toolbar-melw-wsp-hider') + .click((e) => { + const down = 'icon-mel-chevron-down'; + const up = 'icon-mel-chevron-up'; + let $children = $(e.currentTarget).children(); + + if ($children.hasClass(down)) { + let $parent = $(e.currentTarget) + .css('right', '0') + .css('width', '100%') + .attr('title', "Afficher la barre d'accès rapide") + .parent(); + $parent.css('bottom', `-${$parent[0].clientHeight}px`); + $('.tiny-wsp-menu').css('bottom', `-${$parent[0].clientHeight}px`); + $children.removeClass(down).addClass(up); + //.addClass("moved"); + $('.mwsp').addClass('moved'); + } else { + let $parent = $(e.currentTarget) + .css('right', '') + .css('width', '') + .attr('title', "Cacher la barre d'accès rapide") + .parent(); + $parent.css('bottom', ''); + $('.tiny-wsp-menu').css('bottom', '2px'); + $children.removeClass(up).addClass(down); + $('.mwsp').removeClass('moved'); + } }); - - $(".wsp-object").css("display", "none"); - - $(".workspace-frame").css("display", "none"); - - //Gestion de la config en fonction des dofférentes frame voulues - let config = null; - - if (_class === "tasklist" && otherDatas !== undefined && otherDatas !== null) - { - parent.$('.tasks-frame').remove(); - - config = { - source:otherDatas - } - await mel_metapage.Functions.post( - mel_metapage.Functions.url("tasks", "tasklist"), - { - action:"subscribe", - l:{ - id:otherDatas, - active:1 - } - }, - (success) => { - console.log("change task to ok", success); - } + rcmail.env.wsp_datas.toolbar = { + current: _class, + exists: true, + }; + + if (is_in_visio) { + $('.wsp-toolbar-edited') + .addClass('webconfstarted') + .css( + 'max-width', + `calc(100% - ${$('iframe.webconf-frame').width()}px)`, + ); + } + } else { + if (rcmail.env.wsp_datas.toolbar.exists === true) return; + let toolbar_conf = $('.webconf-toolbar'); + const toolbar_wsp = $(_toolbar); + toolbar_wsp.find('.wsp-toolbar-item').each((i, e) => { + toolbar_conf.append( + ($(e).hasClass('first') + ? $(e).css('margin-left', '60px').css('pointer-events', 'all') + : $(e) + ) + .addClass('wsp-toolbar-item-wsp') + .css('display', 'none'), ); + }); + toolbar_conf.append( + '
Espace
', + ); + rcmail.env.wsp_datas.toolbar = { + current: _class, + exists: true, + }; + window.webconf_master_bar.switch_toolbar(); } - else if(_class === "links") - { - - config = { - _task:"workspace", - _action:"show_links", - _id:otherDatas - }; - - if ($(".links-frame").length > 0 && !$(".links-frame")[0].contentWindow.window.location.href.includes(otherDatas) && otherDatas !== null) - $(".links-frame").remove(); - } - else if (_class === "stockage" && otherDatas !== null) - { - if (otherDatas !== undefined && otherDatas !== null && otherDatas.includes('uid:')) - config = {_params: `/apps/files?dir=/dossiers-${otherDatas.replace(':uid', '')}`}; - else - config = {_params: otherDatas.replace(rcmail.env.nextcloud_url, '')}; - } - - if (_class === 'calendar') - rcmail.env.have_calendar_frame = parent.$(".calendar-frame").length !== 0; - - rcmail.set_busy(true, 'loading'); - rcmail.env.can_change_while_busy = true; - - //Ouverture de la frame - const id = top.mm_st_OpenOrCreateFrame(_class, false, config); - await wait(() => rcmail.env.frame_created !== true); - - //Gestion de "l'encadrage" - parent.$(".mwsp").each((i,e) => { + } +} - try { - let $style = (e.nodeName === 'IFRAME' ? e.contentWindow.$(".mwsp-style") : $(".mwsp-style")); +async function ChangeToolbar(_class, event, otherDatas = null) { + const uid = $(event).data('uid'); - if ($style.length > 0) $style.remove(); - } catch (error) { - - } - }); - - if (_class !== "rocket") + if (rcmail.busy) { + rcmail.clear_messages(); + rcmail.set_busy(false); + } + + $('.wsp-toolbar-item') + .removeClass('active') + .removeAttr('disabled') + .removeAttr('aria-disabled'); + $(event).addClass('active'); + if (_class !== 'rocket') { + $(event).attr('disabled', 'disabled').attr('aria-disabled', 'true'); + } + + let datas = [ { - let $querry = $(`iframe#${id}`); - //Si la frame n'existe pas - if ($querry.length === 0) { - - //On récupère le nom de la frame - const $layout_thing = $("#layout-content").length > 0 ? $("#layout-content") : $("#layout-sidebar"); - const currentFrameClasse = Enumerable.from($layout_thing[0].classList).first(x => x.includes('-frame') && x !== 'mm-frame').replaceAll("-frame", ''); - - $(`.${currentFrameClasse}-frame`).remove(); - rcmail.env.frame_created = false; - - //On supprime et on ouvre une nouvelle frame - return await ChangeFrame(mm_st_ClassContract(currentFrameClasse), otherDatas); - + exec_info: 'uid', + datas: uid, + }, + ]; + let picture = $('.wsp-picture'); + + switch (_class) { + case 'calendar': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: _class, + }); + break; + case 'mail': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: _class, + args: $(event).data('email'), + }); + break; + case 'stockage': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: _class, + args: otherDatas === null ? `uid:${uid}` : otherDatas, + }); + break; + case 'rocket': + if (parent.$('html').hasClass('webconf-started')) { + if ( + parent.$('.webconf-toolbar').length > 0 && + parent + .$('.webconf-toolbar .wsp-toolbar-item.conf-ariane') + .css('display') !== 'none' + ) { + if ( + !parent + .$('.webconf-toolbar .wsp-toolbar-item.conf-ariane') + .hasClass('active') + ) { + parent.$('.webconf-toolbar .wsp-toolbar-item.conf-ariane').click(); + } + + (parent.$('iframe.webconf-frame').length > 0 + ? parent + .$('iframe.webconf-frame')[0] + .contentWindow.$('#mm-ariane')[0] + : parent.$('#mm-ariane')[0] + ).contentWindow.postMessage( + { + externalCommand: 'go', + path: otherDatas, + }, + '*', + ); + } else { + alert( + "Cette option n'est pas compatible avec votre visioconférence.", + ); } - else - { - try { - //On ajoute les différents styles et classes - $querry.addClass("mwsp")[0].contentWindow.$("html").addClass("mwsp"); - - if (parent.$("html").hasClass("webconf-started")) - $querry.addClass("mwvcs"); - - if (style !== undefined && style !== null && style !== '') - $querry.addClass("mwsp")[0].contentWindow.$('body').prepend(`
${style}
`); - } catch (error) { - console.error('###[ChangeFrame]', error); - } - } - } - - //Choses à faire en fonction des différentes frames voulues - if ($(`#${id}`).length === 0 || $(`#${id}`).parent()[0].id !== "layout-frames") - $("#layout-frames").css("display", "none"); - - if (window.webconf_master_bar === undefined) - (_class === "rocket" ? $("#" + id).css("display", "").parent().parent() : $("#" + id).css("display", "").parent()).css("display", "").css("position", "absolute").css("height", "100%"); - if (_class === "rocket") - { - $(".a-frame").css("display", ""); - $("#" + id)[0].contentWindow.postMessage({ - externalCommand: 'go', - path: otherDatas - }, '*'); - $('.card-disabled').find("iframe").addClass("mwsp"); - } - else - { - $(".a-frame").css("display", "none"); - $('.card-disabled').find("iframe").removeClass("mwsp"); + return; + } + + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: 'rocket', + url: otherDatas, + }); + break; + case 'tchap': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: 'tchap', + url: otherDatas, + }); + break; + case 'home': + datas.push({ + exec_info: 'change_environnement', + datas: 'inpage', + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: null, + picture: null, + }, + toolbar: null, + }, + }); + datas.push({ + exec_info: 'ChangePage', + datas: _class, + }); + break; + + case 'tasklist': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: _class, + args: rcmail.env.current_workspace_tasklist_uid, + }); + break; + + case 'wekan': + datas.push({ + exec_info: 'change_environnement', + datas: _class, + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: _class, + picture: { + color: picture.css('background-color'), + picture: picture.html(), + }, + toolbar: $('.wsp-toolbar')[0].outerHTML.replace( + 'wsp-toolbar', + 'wsp-toolbar wsp-toolbar-edited', + ), + }, + }); + datas.push({ + exec_info: 'ChangeFrame', + datas: _class, + args: otherDatas !== null ? otherDatas : $(event).data('wekan'), + }); + break; + case 'params': + datas.push({ + exec_info: 'change_environnement', + datas: 'inpage', + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: 'inpage', + picture: { + color: null, + picture: null, + }, + toolbar: null, + }, + }); + datas.push({ + exec_info: 'ChangePage', + datas: _class, + }); + break; + case 'back': + datas.push({ + exec_info: 'change_environnement', + datas: 'inpage', + }); + datas.push({ + exec_info: 'UpdateMenu', + datas: { + class: 'inpage', + picture: { + color: null, + picture: null, + }, + toolbar: null, + }, + }); + datas.push({ + exec_info: 'ChangePage', + datas: _class, + }); + break; + + default: + console.log(_class); + break; + } + + try { + for (let index = 0; index < datas.length; index++) { + const element = datas[index]; + mel_wsp_changeframe({ + data: element, + }); } + } catch (error) { + console.error( + "###Une erreur c'est produite lors du changement de page.", + error, + datas, + ); + } + + if (uid !== undefined) { + const url = + mel_metapage.Functions.url('workspace', 'workspace', { + _uid: uid, + _page: _class, + }) + '&_force_bnum=1'; + window.history.replaceState( + {}, + document.title, + url.replace( + `&${rcmail.env.mel_metapage_const.key}=${rcmail.env.mel_metapage_const.value}`, + '', + ), + ); + if (window !== top) + top.history.replaceState( + {}, + document.title, + url.replace( + `&${rcmail.env.mel_metapage_const.key}=${rcmail.env.mel_metapage_const.value}`, + '', + ), + ); + } +} - let uid = undefined; - if (otherDatas !== undefined && otherDatas !== null && otherDatas.includes('uid:')) - { - uid = otherDatas.replace("uid:", ""); - otherDatas = null; - } +async function ChangeFrame(_class, otherDatas = null) { + const is_in_visio = !!top['mel.visio.started']; + //Actions à faire avant de changer de frame + if ( + rcmail.env.mel_metapage_mail_configs['mel-chat-placement'] === + rcmail.gettext('up', 'mel_metapage') + ) + ArianeButton.default().hide_button(); + + try { + m_mp_close_ariane(); + } catch (error) {} + if ( + _class === 'rocket' && + $('.discussion-frame').length > 0 && + $('.discussion-frame').css('display') !== 'none' + ) { + $('.discussion-frame')[0].contentWindow.postMessage( + { + externalCommand: 'go', + path: otherDatas, + }, + '*', + ); + return; + } + + const style = + $('iframe.workspace-frame').length > 0 + ? $('iframe.workspace-frame')[0].contentWindow.rcmail.env + .current_bar_colors + : rcmail.env.current_bar_colors; + + if (!is_in_visio) $('.mm-frame').css('display', 'none'); + else + $('.mm-frame').each((i, e) => { + if (!$(e).hasClass('webconf-frame')) $(e).css('display', 'none'); + }); - let currentFrame; - //Mails - if (_class === "mail") //`edt.${rcmail.env.current_workspace_uid}@i-carre.net` - { - currentFrame = parent.$("iframe.mail-frame"); - $(currentFrame.length > 0 ? currentFrame[0].contentDocument : parent.document).ready(() => { - mel_metapage.Functions.searchOnMail(otherDatas, ["to", "cc", "bcc"]); - }); - } - if (_class === "calendar") - { - currentFrame = parent.$("iframe.calendar-frame"); - calendar = (currentFrame.length === 0 ? parent : currentFrame[0].contentWindow).$('#calendar');//.scrollToTime( durationInput ); - calendar.fullCalendar('rerenderEvents'); - $scroll = calendar.find(".fc-scroller"); - const currentHour = moment().format('HH'); - var testOffset = calendar.find(`tr[data-time="${currentHour}:00:00"]`); - $scroll.scrollTop(0); - - const y = testOffset[0].getClientRects()[0].y; - const t = $scroll.offset().top - - if (rcmail.env.have_calendar_frame !== true) - { - setTimeout(() => { - $scroll.scrollTop(y - t); - }, 100); - rcmail.env.have_calendar_frame = true; - } - else - $scroll.scrollTop(y - t); - //parent.rotomeca = calendar.fullCalendar('getCalendar');//.scrollToTime(`${rcmail.env.calendar_settings.first_hour}:00`); + $('.wsp-object').css('display', 'none'); + + $('.workspace-frame').css('display', 'none'); + + //Gestion de la config en fonction des dofférentes frame voulues + let config = null; + + if ( + _class === 'tasklist' && + otherDatas !== undefined && + otherDatas !== null + ) { + parent.$('.tasks-frame').remove(); + + config = { + source: otherDatas, + }; + await mel_metapage.Functions.post( + mel_metapage.Functions.url('tasks', 'tasklist'), + { + action: 'subscribe', + l: { + id: otherDatas, + active: 1, + }, + }, + (success) => { + console.log('change task to ok', success); + }, + ); + } else if (_class === 'links') { + config = { + _task: 'workspace', + _action: 'show_links', + _id: otherDatas, + }; + + if ( + $('.links-frame').length > 0 && + !$('.links-frame')[0].contentWindow.window.location.href.includes( + otherDatas, + ) && + otherDatas !== null + ) + $('.links-frame').remove(); + } else if (_class === 'stockage' && otherDatas !== null) { + if ( + otherDatas !== undefined && + otherDatas !== null && + otherDatas.includes('uid:') + ) + config = { + _params: `/apps/files?dir=/dossiers-${otherDatas.replace(':uid', '')}`, + }; + else config = { _params: otherDatas.replace(rcmail.env.nextcloud_url, '') }; + } + + if (_class === 'calendar') + rcmail.env.have_calendar_frame = parent.$('.calendar-frame').length !== 0; + + rcmail.set_busy(true, 'loading'); + rcmail.env.can_change_while_busy = true; + + //Ouverture de la frame + const id = top.mm_st_OpenOrCreateFrame(_class, false, config); + await wait(() => rcmail.env.frame_created !== true); + + //Gestion de "l'encadrage" + parent.$('.mwsp').each((i, e) => { + try { + let $style = + e.nodeName === 'IFRAME' + ? e.contentWindow.$('.mwsp-style') + : $('.mwsp-style'); + + if ($style.length > 0) $style.remove(); + } catch (error) {} + }); + + if (_class !== 'rocket') { + let $querry = $(`iframe#${id}`); + //Si la frame n'existe pas + if ($querry.length === 0) { + //On récupère le nom de la frame + const $layout_thing = + $('#layout-content').length > 0 + ? $('#layout-content') + : $('#layout-sidebar'); + const currentFrameClasse = Enumerable.from($layout_thing[0].classList) + .first((x) => x.includes('-frame') && x !== 'mm-frame') + .replaceAll('-frame', ''); + + $(`.${currentFrameClasse}-frame`).remove(); + rcmail.env.frame_created = false; + + //On supprime et on ouvre une nouvelle frame + return await ChangeFrame( + mm_st_ClassContract(currentFrameClasse), + otherDatas, + ); + } else { + try { + //On ajoute les différents styles et classes + $querry.addClass('mwsp')[0].contentWindow.$('html').addClass('mwsp'); + + if (parent.$('html').hasClass('webconf-started')) + $querry.addClass('mwvcs'); + + if (style !== undefined && style !== null && style !== '') + $querry + .addClass('mwsp')[0] + .contentWindow.$('body') + .prepend(`
${style}
`); + } catch (error) { + console.error('###[ChangeFrame]', error); + } } - - //Stockage - else if (_class === "stockage") - { - currentFrame = parent.$('iframe.stockage-frame'); - //Mode frame - if (currentFrame.length > 0) - { - currentFrame[0].contentWindow.rcmail.env.nextcloud_gotourl = otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; - currentFrame[0].contentWindow.$("#mel_nextcloud_frame")[0].src = otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; - } - else { - parent.rcmail.env.nextcloud_gotourl = otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; - parent.$("#mel_nextcloud_frame")[0].src = otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; - } - // mel_metapage.Functions.call("update_location", false, { - // _integrated:true, - // args:[otherDatas !== null ? otherDatas :`${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`,"stockage-frame","mel_nextcloud_frame"] - // }); + } + + //Choses à faire en fonction des différentes frames voulues + if ( + $(`#${id}`).length === 0 || + $(`#${id}`).parent()[0].id !== 'layout-frames' + ) + $('#layout-frames').css('display', 'none'); + + if (window.webconf_master_bar === undefined) + (_class === 'rocket' + ? $('#' + id) + .css('display', '') + .parent() + .parent() + : $('#' + id) + .css('display', '') + .parent() + ) + .css('display', '') + .css('position', 'absolute') + .css('height', '100%'); + + if (_class === 'rocket') { + $('.a-frame').css('display', ''); + $('#' + id)[0].contentWindow.postMessage( + { + externalCommand: 'go', + path: otherDatas, + }, + '*', + ); + $('.card-disabled').find('iframe').addClass('mwsp'); + } else { + $('.a-frame').css('display', 'none'); + $('.card-disabled').find('iframe').removeClass('mwsp'); + } + + let uid = undefined; + if ( + otherDatas !== undefined && + otherDatas !== null && + otherDatas.includes('uid:') + ) { + uid = otherDatas.replace('uid:', ''); + otherDatas = null; + } + + let currentFrame; + //Mails + if (_class === 'mail') { + //`edt.${rcmail.env.current_workspace_uid}@i-carre.net` + currentFrame = parent.$('iframe.mail-frame'); + $( + currentFrame.length > 0 + ? currentFrame[0].contentDocument + : parent.document, + ).ready(() => { + mel_metapage.Functions.searchOnMail(otherDatas, ['to', 'cc', 'bcc']); + }); + } + if (_class === 'calendar') { + currentFrame = parent.$('iframe.calendar-frame'); + calendar = ( + currentFrame.length === 0 ? parent : currentFrame[0].contentWindow + ).$('#calendar'); //.scrollToTime( durationInput ); + calendar.fullCalendar('rerenderEvents'); + $scroll = calendar.find('.fc-scroller'); + const currentHour = moment().format('HH'); + var testOffset = calendar.find(`tr[data-time="${currentHour}:00:00"]`); + $scroll.scrollTop(0); + + const y = testOffset[0].getClientRects()[0].y; + const t = $scroll.offset().top; + + if (rcmail.env.have_calendar_frame !== true) { + setTimeout(() => { + $scroll.scrollTop(y - t); + }, 100); + rcmail.env.have_calendar_frame = true; + } else $scroll.scrollTop(y - t); + //parent.rotomeca = calendar.fullCalendar('getCalendar');//.scrollToTime(`${rcmail.env.calendar_settings.first_hour}:00`); + } + + //Stockage + else if (_class === 'stockage') { + currentFrame = parent.$('iframe.stockage-frame'); + //Mode frame + if (currentFrame.length > 0) { + currentFrame[0].contentWindow.rcmail.env.nextcloud_gotourl = + otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; + currentFrame[0].contentWindow.$('#mel_nextcloud_frame')[0].src = + otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; + } else { + parent.rcmail.env.nextcloud_gotourl = + otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; + parent.$('#mel_nextcloud_frame')[0].src = + otherDatas ?? `${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`; } - //Kanban - else if (_class === "wekan") - { - - if (otherDatas !== null) - { - mel_metapage.Functions.call("update_location", false, { - _integrated:true, - args:[otherDatas === null ? rcmail.env.wekan_base_url :`${rcmail.env.wekan_base_url}/b/${otherDatas}/null`,"wekan-frame","wekan-iframe"] - }); - } - + // mel_metapage.Functions.call("update_location", false, { + // _integrated:true, + // args:[otherDatas !== null ? otherDatas :`${Nextcloud.index_url}/apps/files?dir=/dossiers-${uid}`,"stockage-frame","mel_nextcloud_frame"] + // }); + } + //Kanban + else if (_class === 'wekan') { + if (otherDatas !== null) { + mel_metapage.Functions.call('update_location', false, { + _integrated: true, + args: [ + otherDatas === null + ? rcmail.env.wekan_base_url + : `${rcmail.env.wekan_base_url}/b/${otherDatas}/null`, + 'wekan-frame', + 'wekan-iframe', + ], + }); } + } + $(`#${id}`).css('display', ''); + $('.workspace-frame').css('display', 'none'); + if (is_in_visio) { + $(`#${id}`).css( + 'width', + `calc(100% - ${$('iframe.webconf-frame').width()}px)`, + ); + } - $(`#${id}`).css("display", ""); - $(".workspace-frame").css("display", "none"); - - if (is_in_visio){ - $(`#${id}`).css('width', `calc(100% - ${$('iframe.webconf-frame').width()}px)`); - } - - rcmail.env.have_frame_positioned = true; - rcmail.set_busy(false); - rcmail.clear_messages(); + rcmail.env.have_frame_positioned = true; + rcmail.set_busy(false); + rcmail.clear_messages(); } -async function ChangePage(_class) -{ - const is_in_visio = !!top['mel.visio.started']; - if (!is_in_visio) - $(".mm-frame").css("display", "none"); - else - $(".mm-frame").each((i,e) => { - if (!$(e).hasClass("webconf-frame")) - $(e).css("display", "none"); - }); - $(".a-frame").css("display", "none"); +async function ChangePage(_class) { + const is_in_visio = !!top['mel.visio.started']; + if (!is_in_visio) $('.mm-frame').css('display', 'none'); + else + $('.mm-frame').each((i, e) => { + if (!$(e).hasClass('webconf-frame')) $(e).css('display', 'none'); + }); + $('.a-frame').css('display', 'none'); - let layout_frame = $("#layout-frames"); + let layout_frame = $('#layout-frames'); - if (true) - { - layout_frame.css("position", "") - .css("height", ""); + if (true) { + layout_frame.css('position', '').css('height', ''); - if (layout_frame.find(".workspace-frame").length >= 1) - layout_frame.css("display", ""); - else - layout_frame.css("display", "none") - } + if (layout_frame.find('.workspace-frame').length >= 1) + layout_frame.css('display', ''); + else layout_frame.css('display', 'none'); + } else { + if ($('iframe.workspace-frame').length > 0) layout_frame.css('width', ''); else - { - if ($("iframe.workspace-frame").length > 0) - layout_frame.css("width", ``); - else - layout_frame.css("width", `${window.webconf_master_bar.webconf.ariane.size}px`); - } - - $(".workspace-frame").css("display", ""); - let frame = $("iframe.workspace-frame"); - - if (frame.length >= 1 )//&& Enumerable.from(frame.parent()).any(x => x.id === "layout-frames")) - { - const base_context = frame[0].contentWindow; - if (!!base_context.workspace_frame_manager) { - const context = base_context.workspace_frame_manager.getActiveFrame().get()[0].contentWindow; - context.ChangeToolbarPage(_class); - context.rcmail.set_busy(false); - context.rcmail.clear_messages(); - } + layout_frame.css( + 'width', + `${window.webconf_master_bar.webconf.ariane.size}px`, + ); + } + + $('.workspace-frame').css('display', ''); + let frame = $('iframe.workspace-frame'); + + if (frame.length >= 1) { + //&& Enumerable.from(frame.parent()).any(x => x.id === "layout-frames")) + const base_context = frame[0].contentWindow; + if (base_context.workspace_frame_manager) { + const context = base_context.workspace_frame_manager + .getActiveFrame() + .get()[0].contentWindow; + context.ChangeToolbarPage(_class); + context.rcmail.set_busy(false); + context.rcmail.clear_messages(); } - else - ChangeToolbarPage(_class); - + } else ChangeToolbarPage(_class); } window.ChangeToolbarPage = ChangeToolbarPage; -async function ChangeToolbarPage(_class) -{ - const is_in_visio = !!top['mel.visio.started']; - let layout_frame = $("#layout-frames"); - let workspace_frame = layout_frame.find(".workspace-frame"); - - const _$ = workspace_frame.length === 0 ? $ : workspace_frame[0].contentWindow.$; - - - if (rcmail.env.mel_metapage_mail_configs["mel-chat-placement"] === rcmail.gettext("up", "mel_metapage")) - ArianeButton.default().show_button() - - _$(".wsp-toolbar").css("z-index", ""); - _$(".wsp-object").css("display", "none"); - _$(".wsp-toolbar-item").removeClass("active").removeAttr("disabled").removeAttr("aria-disabled"); - - // if (window.webconf_master_bar !== undefined) - // window.webconf_master_bar.minify_toolbar(); - if (is_in_visio && !!top.masterbar) - { - top.masterbar.show_masterbar(); - } - //console.log($(".wsp-object"), $(".wsp-toolbar-item.first"), $(".wsp-home")); - switch (_class) { - case "home": - _$(".wsp-toolbar-item.wsp-home").addClass("active") - .attr("disabled", "disabled") - .attr("aria-disabled", "true"); - _$(".wsp-home").css("display", ""); - break; - case "wekan": - _$(".wsp-toolbar-item.wsp-wekan").addClass("active") - .attr("disabled", "disabled") - .attr("aria-disabled", "true"); - - if (_$("iframe.wsp-wekan-frame").length === 0) - { - _$(".body").append(` +async function ChangeToolbarPage(_class) { + const is_in_visio = !!top['mel.visio.started']; + let layout_frame = $('#layout-frames'); + let workspace_frame = layout_frame.find('.workspace-frame'); + + const _$ = + workspace_frame.length === 0 ? $ : workspace_frame[0].contentWindow.$; + + if ( + rcmail.env.mel_metapage_mail_configs['mel-chat-placement'] === + rcmail.gettext('up', 'mel_metapage') + ) + ArianeButton.default().show_button(); + + _$('.wsp-toolbar').css('z-index', ''); + _$('.wsp-object').css('display', 'none'); + _$('.wsp-toolbar-item') + .removeClass('active') + .removeAttr('disabled') + .removeAttr('aria-disabled'); + + // if (window.webconf_master_bar !== undefined) + // window.webconf_master_bar.minify_toolbar(); + if (is_in_visio && !!top.masterbar) { + top.masterbar.show_masterbar(); + } + //console.log($(".wsp-object"), $(".wsp-toolbar-item.first"), $(".wsp-home")); + switch (_class) { + case 'home': + _$('.wsp-toolbar-item.wsp-home') + .addClass('active') + .attr('disabled', 'disabled') + .attr('aria-disabled', 'true'); + _$('.wsp-home').css('display', ''); + break; + case 'wekan': + _$('.wsp-toolbar-item.wsp-wekan') + .addClass('active') + .attr('disabled', 'disabled') + .attr('aria-disabled', 'true'); + + if (_$('iframe.wsp-wekan-frame').length === 0) { + _$('.body').append(`
`); - } - else - _$(".wsp-wekan").css("display", ""); - - //console.log("wekan_url", `${rcmail.env.wekan_base_url}/b/${rcmail.env.wekan_datas.id}/${rcmail.env.wekan_datas.title}`); - break; - case "links": - _$(".wsp-toolbar-item.wsp-links").addClass("active") - .attr("disabled", "disabled") - .attr("aria-disabled", "true"); - - if (_$("iframe.wsp-links-frame").length === 0) - { - _$(".body").append(` + } else _$('.wsp-wekan').css('display', ''); + + //console.log("wekan_url", `${rcmail.env.wekan_base_url}/b/${rcmail.env.wekan_datas.id}/${rcmail.env.wekan_datas.title}`); + break; + case 'links': + _$('.wsp-toolbar-item.wsp-links') + .addClass('active') + .attr('disabled', 'disabled') + .attr('aria-disabled', 'true'); + + if (_$('iframe.wsp-links-frame').length === 0) { + _$('.body').append(` `); - } - else - _$(".wsp-links").css("display", ""); - - //console.log("wekan_url", `${rcmail.env.wekan_base_url}/b/${rcmail.env.wekan_datas.id}/${rcmail.env.wekan_datas.title}`); - break; - case "params": - _$(".wsp-toolbar-item.wsp-item-params").addClass("active") - .attr("disabled", "disabled") - .attr("aria-disabled", "true"); - _$(".wsp-params").css("display", ""); - break; - case "back": - rcmail.set_busy(false); - - if (parent.webconf_master_bar !== undefined) - { - parent.webconf_master_bar.update_toolbar_position(true); - } - - if (!window.workspace_frame_manager) { - _$(".body").html($('')).css("display", "grid").css("justify-content", "center"); - rcmail.command("workspace.go"); - } - else { - await ChangeToolbarPage('home'); - workspace_frame_manager.goToList(); - } - - break; - default: - break; - } + } else _$('.wsp-links').css('display', ''); + + //console.log("wekan_url", `${rcmail.env.wekan_base_url}/b/${rcmail.env.wekan_datas.id}/${rcmail.env.wekan_datas.title}`); + break; + case 'params': + _$('.wsp-toolbar-item.wsp-item-params') + .addClass('active') + .attr('disabled', 'disabled') + .attr('aria-disabled', 'true'); + _$('.wsp-params').css('display', ''); + break; + case 'back': + rcmail.set_busy(false); + + if (parent.webconf_master_bar !== undefined) { + parent.webconf_master_bar.update_toolbar_position(true); + } + + if (!window.workspace_frame_manager) { + _$('.body') + .html( + $( + '', + ), + ) + .css('display', 'grid') + .css('justify-content', 'center'); + rcmail.command('workspace.go'); + } else { + await ChangeToolbarPage('home'); + workspace_frame_manager.goToList(); + } + + break; + default: + break; + } } -function HideOrShowMenu(element) -{ - const enabled = "enabled"; - const disabled = "disabled"; - element = $(element); - if (element.hasClass(enabled)) - { - element.removeClass(enabled); - element.addClass(disabled); - $(".wsp-toolbar-edited").css("display", "none"); - } - else - { - element.removeClass(disabled); - element.addClass(enabled); - $(".wsp-toolbar-edited").css("display", ""); - } - - if ($(".layout-small").length > 0 || $(".layout-phone").length > 0) - { - $("#menu-hanburger-wsp").click(); - } - - if ($("html").hasClass("layout-small") || $("html").hasClass("layout-phone")) - ClickOnButton(true); +function HideOrShowMenu(element) { + const enabled = 'enabled'; + const disabled = 'disabled'; + element = $(element); + if (element.hasClass(enabled)) { + element.removeClass(enabled); + element.addClass(disabled); + $('.wsp-toolbar-edited').css('display', 'none'); + } else { + element.removeClass(disabled); + element.addClass(enabled); + $('.wsp-toolbar-edited').css('display', ''); + } + + if ($('.layout-small').length > 0 || $('.layout-phone').length > 0) { + $('#menu-hanburger-wsp').click(); + } + + if ($('html').hasClass('layout-small') || $('html').hasClass('layout-phone')) + ClickOnButton(true); } -function ClickOnButton(addAll = false) -{ - let options = []; - - $(".wsp-toolbar-item").each((i,e) => { - if ($(e).hasClass("small-item")) - return; - else if (!addAll && ($(e).hasClass("first") || $(e).hasClass("wsp-home"))) - return; - - const text = $(e).find('.text-item').html(); - if (!Enumerable.from(options).any(x => x.text === text) && text != "undefined" && text !== undefined) - options.push(new OptionObject(text, `$('.${Enumerable.from(e.classList).toArray().join(".")}').click()`)); - }); - - let customOption = new CustomOption({options:options}); - customOption.show(); - setTimeout(() => { - customOption.click(); - }, 100); +function ClickOnButton(addAll = false) { + let options = []; + + $('.wsp-toolbar-item').each((i, e) => { + if ($(e).hasClass('small-item')) return; + else if (!addAll && ($(e).hasClass('first') || $(e).hasClass('wsp-home'))) + return; + + const text = $(e).find('.text-item').html(); + if ( + !Enumerable.from(options).any((x) => x.text === text) && + text != 'undefined' && + text !== undefined + ) + options.push( + new OptionObject( + text, + `$('.${Enumerable.from(e.classList).toArray().join('.')}').click()`, + ), + ); + }); + + let customOption = new CustomOption({ options: options }); + customOption.show(); + setTimeout(() => { + customOption.click(); + }, 100); } // function ChangeMenu(hide = true ,_picture = null, _toolbar = null) // { @@ -1075,7 +1214,7 @@ function ClickOnButton(addAll = false) // { // if (rcmail.env.workspace_menu_minified !== true) // rcmail.env.workspace_menu_minified = true; -// else +// else // return; // let right = "50px"; // let bottom = "50px"; @@ -1205,4 +1344,4 @@ function ClickOnButton(addAll = false) // await _ChangeFrameWorkspace("workspace", false, false); // $(".workspace-frame").css("display", ""); // rcmail.env.workspace_menu_minified = false; -// } \ No newline at end of file +// } diff --git a/plugins/mel_metapage/js/functions.js b/plugins/mel_metapage/js/functions.js index a4d24c889..a6f5a1309 100644 --- a/plugins/mel_metapage/js/functions.js +++ b/plugins/mel_metapage/js/functions.js @@ -1,1164 +1,1649 @@ const enable_custom_uid = true; -jQuery.fn.swap = function(b) { - b = jQuery(b)[0]; - var a = this[0]; - var t = a.parentNode.insertBefore(document.createTextNode(''), a); - b.parentNode.insertBefore(a, b); - t.parentNode.insertBefore(b, t); - t.parentNode.removeChild(t); - return this; +jQuery.fn.swap = function (b) { + b = jQuery(b)[0]; + var a = this[0]; + var t = a.parentNode.insertBefore(document.createTextNode(''), a); + b.parentNode.insertBefore(a, b); + t.parentNode.insertBefore(b, t); + t.parentNode.removeChild(t); + return this; }; function get_action(text, icon, action) { - return { - text: rcmail.gettext(text), - icon: icon, - action: action - } + return { + text: rcmail.gettext(text), + icon: icon, + action: action, + }; } -async function m_mp_create_note() -{ - if (window.create_popUp !== undefined) { - window.create_popUp.close(); - window.create_popUp = undefined; - } - - const init = Object.keys(rcmail.env.mel_metapages_notes); +async function m_mp_create_note() { + if (window.create_popUp !== undefined) { + window.create_popUp.close(); + window.create_popUp = undefined; + } - const Sticker = (await loadJsModule('mel_metapage', 'sticker', '/js/lib/metapages_actions/notes/')).Sticker; + const init = Object.keys(rcmail.env.mel_metapages_notes); - await Sticker.new(); + const Sticker = ( + await loadJsModule( + 'mel_metapage', + 'sticker', + '/js/lib/metapages_actions/notes/', + ) + ).Sticker; - let notes = await loadAction('mel_metapage', 'notes.js', '/js/lib/metapages_actions/'); + await Sticker.new(); - if (!!notes) { + let notes = await loadAction( + 'mel_metapage', + 'notes.js', + '/js/lib/metapages_actions/', + ); - const new_note = Enumerable.from(rcmail.env.mel_metapages_notes).where(x => !init.includes(x.key)).firstOrDefault(); + if (notes) { + const new_note = Enumerable.from(rcmail.env.mel_metapages_notes) + .where((x) => !init.includes(x.key)) + .firstOrDefault(); - if (!!new_note) { - let sticker = Sticker.from(new_note.value); + if (new_note) { + let sticker = Sticker.from(new_note.value); - await sticker.post('pin', { - _uid:sticker.uid, - _pin:true - }); - - sticker.pin = true; - rcmail.env.mel_metapages_notes[sticker.uid].pin = true; + await sticker.post('pin', { + _uid: sticker.uid, + _pin: true, + }); - sticker.after = () => { - sticker.uid = `pin-${sticker.uid}`; - sticker.get_html().find("textarea")[0].focus(); - }; + sticker.pin = true; + rcmail.env.mel_metapages_notes[sticker.uid].pin = true; - Sticker.helper.trigger_event('notes.apps.tak', sticker); - } - //notes.select_note_button().click(); + sticker.after = () => { + sticker.uid = `pin-${sticker.uid}`; + sticker.get_html().find('textarea')[0].focus(); + }; - //$('.mel-note').last().find("textarea")[0].focus(); + Sticker.helper.trigger_event('notes.apps.tak', sticker); } + //notes.select_note_button().click(); + + //$('.mel-note').last().find("textarea")[0].focus(); + } } /** * Affiche la modale du bouton "créer". */ function m_mp_Create() { - FullscreenItem.close_if_exist(); - m_mp_step3_param.datas = null; - - //window.create_popUp = undefined; - //Si problème de configuration, on gère. - window.mel_metapage_tmp = rcmail.env.is_stockage_active ? true : null; - - const actions = { - mail: get_action("mel_metapage.a_mail", "icon-mel-mail", "rcmail.command('compose','',this,event)"), - espace: get_action("mel_metapage.a_worspace", "icon-mel-workplace", "m_mp_createworkspace()"), - event: get_action("mel_metapage.a_meeting", "icon-mel-calendar", "mm_create_calendar(this);"), - visio: get_action("mel_metapage.a_web_conf", "icon-mel-videoconference", "window.webconf_helper.go()"), - tache: get_action("mel_metapage.a_task", "icon-mel-survey", "m_mp_CreateOrOpenFrame('tasklist', () => m_mp_set_storage('task_create'), m_mp_NewTask)"), - documents: get_action("mel_metapage.a_document", "icon-mel-folder", "m_mp_InitializeDocument()"), - sondages: get_action("mel_metapage.a_survey", "icon-mel-sondage", "m_mp_sondage()"), - notes: get_action("mel_metapage.a_wordpad", "icon-mel-notes", "m_mp_create_note()"), - }; - - const isSmall = $("html").hasClass("layout-small") || $("html").hasClass("layout-phone"); + FullscreenItem.close_if_exist(); + m_mp_step3_param.datas = null; - if (window.create_event === true) { - eval(actions.event.action); - return; - } + if ( + ($('#otherapps a.wekan').length || $('#taskmenu a.wekan').length) && + !$('.wekan-frame').length + ) + m_mp_Create.current_promise = mel_metapage.Functions.change_frame( + 'wekan', + false, + true, + ); + + //window.create_popUp = undefined; + //Si problème de configuration, on gère. + window.mel_metapage_tmp = rcmail.env.is_stockage_active ? true : null; + + const actions = { + mail: get_action( + 'mel_metapage.a_mail', + 'icon-mel-mail', + "rcmail.command('compose','',this,event)", + ), + espace: get_action( + 'mel_metapage.a_worspace', + 'icon-mel-workplace', + 'm_mp_createworkspace()', + ), + event: get_action( + 'mel_metapage.a_meeting', + 'icon-mel-calendar', + 'mm_create_calendar(this);', + ), + visio: get_action( + 'mel_metapage.a_web_conf', + 'icon-mel-videoconference', + 'window.webconf_helper.go()', + ), + tache: get_action( + 'mel_metapage.a_task', + 'icon-mel-survey', + "m_mp_CreateOrOpenFrame('tasklist', () => m_mp_set_storage('task_create'), m_mp_NewTask)", + ), + documents: get_action( + 'mel_metapage.a_document', + 'icon-mel-folder', + 'm_mp_InitializeDocument()', + ), + sondages: get_action( + 'mel_metapage.a_survey', + 'icon-mel-sondage', + 'm_mp_sondage()', + ), + notes: get_action( + 'mel_metapage.a_wordpad', + 'icon-mel-notes', + 'm_mp_create_note()', + ), + }; + + const isSmall = + $('html').hasClass('layout-small') || $('html').hasClass('layout-phone'); + + if (window.create_event === true) { + eval(actions.event.action); + return; + } - let $have_minified = $('#mel-have-something-minified-main-create'); + let $have_minified = $('#mel-have-something-minified-main-create'); - if ($have_minified.length > 0) $have_minified.remove(); - $have_minified = null; + if ($have_minified.length > 0) $have_minified.remove(); + $have_minified = null; - //Si la popup n'existe pas, on la créer. - if (window.create_popUp === undefined) { - const canDrive = mel_metapage.Functions.stockage.canDriveActions(); - let haveNextcloud = { - style: (!canDrive ? "display:none" : ""), - col: (!canDrive ? "4" : "3") - }; - let button = function(txt, font, click = "") { - let disabled = click === "" ? "disabled" : ""; - return ''; - } - const _button = function(action, block = true) { - return button(action.text, `${action.icon} ${block ? "block" : ""}`, action.action); - } -//debugger; - let workspace = `
  • ` + _button(actions.espace, false) + '
  • ' - let mail = `
  • ` + _button(actions.mail) + "
  • "; - let reu = `
  • ` + _button(actions.event) + "
  • "; - let viso = `
  • ` + _button(actions.visio) + "
  • "; - let tache = `
  • ` + _button(actions.tache) + "
  • "; - let document = `
  • ` + _button(actions.documents) + "
  • "; - let blocnote = `
  • ` + _button(actions.notes) + "
  • "; - let pega = `
  • ` + _button(actions.sondages) + "
  • "; - - if (!rcmail.env.plugin_list_workspace) { - workspace = ''; - } + //Si la popup n'existe pas, on la créer. + if (window.create_popUp === undefined) { + const canDrive = mel_metapage.Functions.stockage.canDriveActions(); + let haveNextcloud = { + style: !canDrive ? 'display:none' : '', + col: !canDrive ? '4' : '3', + }; + let button = function (txt, font, click = '') { + let disabled = click === '' ? 'disabled' : ''; + return ( + '' + ); + }; + const _button = function (action, block = true) { + return button( + action.text, + `${action.icon} ${block ? 'block' : ''}`, + action.action, + ); + }; + //debugger; + let workspace = + `
  • ` + + _button(actions.espace, false) + + '
  • '; + let mail = + `
  • ` + + _button(actions.mail) + + '
  • '; + let reu = + `
  • ` + + _button(actions.event) + + '
  • '; + let viso = + `
  • ` + + _button(actions.visio) + + '
  • '; + let tache = + `
  • ` + + _button(actions.tache) + + '
  • '; + let document = + `
  • ` + + _button(actions.documents) + + '
  • '; + let blocnote = + `
  • ` + + _button(actions.notes) + + '
  • '; + let pega = + `
  • ` + + _button(actions.sondages) + + '
  • '; + + if (!rcmail.env.plugin_list_workspace) { + workspace = ''; + } - if (!rcmail.env.plugin_list_agenda) { - viso = viso.replace('col-6', 'col-12'); - viso = viso.replace('col-sd-4 col-md-4', 'col-6'); - mail = mail.replace('col-6', 'col-12'); - mail = mail.replace('col-sd-4 col-md-4', 'col-6'); - reu = ''; - } + if (!rcmail.env.plugin_list_agenda) { + viso = viso.replace('col-6', 'col-12'); + viso = viso.replace('col-sd-4 col-md-4', 'col-6'); + mail = mail.replace('col-6', 'col-12'); + mail = mail.replace('col-sd-4 col-md-4', 'col-6'); + reu = ''; + } - if (!rcmail.env.plugin_list_visio) { - reu = reu.replace('col-6', 'col-12'); - reu = reu.replace('col-sd-4 col-md-4', 'col-6'); - mail = mail.replace('col-6', 'col-12'); - mail = mail.replace('col-sd-4 col-md-4', 'col-6'); - viso = ''; - } + if (!rcmail.env.plugin_list_visio) { + reu = reu.replace('col-6', 'col-12'); + reu = reu.replace('col-sd-4 col-md-4', 'col-6'); + mail = mail.replace('col-6', 'col-12'); + mail = mail.replace('col-sd-4 col-md-4', 'col-6'); + viso = ''; + } - if (!rcmail.env.plugin_list_tache) { - document = document.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - blocnote = blocnote.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - pega = pega.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - tache = ''; - } + if (!rcmail.env.plugin_list_tache) { + document = document + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + blocnote = blocnote + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + pega = pega + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + tache = ''; + } - if (!rcmail.env.plugin_list_document) { - tache = tache.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - blocnote = blocnote.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - pega = pega.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - document = ''; - } + if (!rcmail.env.plugin_list_document) { + tache = tache + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + blocnote = blocnote + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + pega = pega + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + document = ''; + } - if (!rcmail.env.plugin_list_sondage) { - document = document.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - blocnote = blocnote.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - tache = tache.replace('col-md-6', 'col-md-12').replace('col-md-4', 'col-md-6').replace('col-md-3', 'col-md-4'); - pega = ''; - } + if (!rcmail.env.plugin_list_sondage) { + document = document + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + blocnote = blocnote + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + tache = tache + .replace('col-md-6', 'col-md-12') + .replace('col-md-4', 'col-md-6') + .replace('col-md-3', 'col-md-4'); + pega = ''; + } - html = ''; - let config = new GlobalModalConfig(rcmail.gettext("mel_metapage.what_do_you_want_create"), "default", html, ' '); - let create_popUp = new GlobalModal("globalModal", config, !isSmall); - const func_minifier = () => { - if ($('#mel-have-something-minified-main-create').length === 0 && $("#globallist").length === 0) - { - let $qu = $('#button-create').append(` + html = + ''; + let config = new GlobalModalConfig( + rcmail.gettext('mel_metapage.what_do_you_want_create'), + 'default', + html, + ' ', + ); + let create_popUp = new GlobalModal('globalModal', config, !isSmall); + const func_minifier = () => { + if ( + $('#mel-have-something-minified-main-create').length === 0 && + $('#globallist').length === 0 + ) { + let $qu = $('#button-create').append(` `); - if ($qu.css('position') !== 'relative') $qu.css('position', 'relative'); - } - }; - create_popUp.on_click_exit = () => { - if (!!window.create_popUp) - { - window.create_popUp = undefined; - create_popUp.close(); - - let $have_minified = $('#mel-have-something-minified-main-create'); - if ($have_minified.length > 0) $have_minified.length.remove(); + if ($qu.css('position') !== 'relative') $qu.css('position', 'relative'); + } + }; + create_popUp.on_click_exit = () => { + if (window.create_popUp) { + window.create_popUp = undefined; + create_popUp.close(); - $('#button-create').focus(); - } - } - create_popUp.on_click_minified = () => { - window.create_popUp.close(); - func_minifier(); - $('#button-create').focus(); - }; - create_popUp.onClose(() => { - if (!!window.create_popUp) func_minifier(); - else - { - let $have_minified = $('#mel-have-something-minified-main-create'); - if ($have_minified.length > 0) $have_minified.length.remove(); - } - }); - window.create_popUp = create_popUp.haveReduced(); + let $have_minified = $('#mel-have-something-minified-main-create'); + if ($have_minified.length > 0) $have_minified.length.remove(); - rcmail.triggerEvent('on_create_window.matomo'); + $('#button-create').focus(); + } + }; + create_popUp.on_click_minified = () => { + window.create_popUp.close(); + func_minifier(); + $('#button-create').focus(); + }; + create_popUp.onClose(() => { + if (window.create_popUp) func_minifier(); + else { + let $have_minified = $('#mel-have-something-minified-main-create'); + if ($have_minified.length > 0) $have_minified.length.remove(); + } + }); + window.create_popUp = create_popUp.haveReduced(); - } else if (!isSmall) //Si elle existe, on l'affiche. - { - window.create_popUp.show(); - } + rcmail.triggerEvent('on_create_window.matomo'); + } else if (!isSmall) { + //Si elle existe, on l'affiche. + window.create_popUp.show(); + } - $('.global-modal-body.modal-body').css('height', ''); + $('.global-modal-body.modal-body').css('height', ''); - if ($("#globallist").length > 0 && !isSmall) { - $("#globalModal .icon-mel-undo.mel-return").remove(); - } + if ($('#globallist').length > 0 && !isSmall) { + $('#globalModal .icon-mel-undo.mel-return').remove(); + } - if (isSmall) { - if (!$("#groupoptions-createthings").hasClass("initialized")) { - for (const key in actions) { - if (Object.hasOwnProperty.call(actions, key)) { - const element = actions[key]; - $("#ul-createthings").append(` + if (isSmall) { + if (!$('#groupoptions-createthings').hasClass('initialized')) { + for (const key in actions) { + if (Object.hasOwnProperty.call(actions, key)) { + const element = actions[key]; + $('#ul-createthings').append(`
  • ${element.text}
  • `); - } - } - - $("#groupoptions-createthings").addClass("initialized") - } - window.create_popUp.close(); - - setTimeout(() => { - $("#open-created-popup").click(); - }, 1); + } + $('#groupoptions-createthings').addClass('initialized'); } + window.create_popUp.close(); + + setTimeout(() => { + $('#open-created-popup').click(); + }, 1); + } } function m_mp_createworskpace_steps() { - return { - init: () => { - const tmp = (img) => { - img = img.split("."); - if (img.length > 1) - img[img.length - 1] = ""; - img = img.join("."); - img = img.slice(0, img.length - 1); - return img; - }; - let html = ""; - if (rcmail.env.mel_metapage_workspace_logos.length > 0) { - html += `
  • Aucune image
  • `; - for (let index = 0; index < rcmail.env.mel_metapage_workspace_logos.length; index++) { - const element = rcmail.env.mel_metapage_workspace_logos[index]; - html += `
  • ` + tmp(element.name) + `
  • `; - } - } - $("#ul-wsp").html(html); + return { + init: () => { + const tmp = (img) => { + img = img.split('.'); + if (img.length > 1) img[img.length - 1] = ''; + img = img.join('.'); + img = img.slice(0, img.length - 1); + return img; + }; + let html = ''; + if (rcmail.env.mel_metapage_workspace_logos.length > 0) { + html += + '
  • Aucune image
  • '; + for ( + let index = 0; + index < rcmail.env.mel_metapage_workspace_logos.length; + index++ + ) { + const element = rcmail.env.mel_metapage_workspace_logos[index]; + html += + `
  • ' + + tmp(element.name) + + '
  • '; + } + } + $('#ul-wsp').html(html); + + return ''; + }, + step3: () => { + let html = ''; + html += + '

    Sélectionner les services à intégrer à l’espace de travail

    '; + html += '
    '; + const mel_metapage_templates_services = + rcmail.env.mel_metapage_templates_services; + for ( + let index = 0; + index < mel_metapage_templates_services.length; + ++index + ) { + const element = mel_metapage_templates_services[index]; + + switch (element.type) { + case 'doc': + if (!mel_metapage.Functions.stockage.canDriveActions()) continue; + break; - return ""; - }, - step3: () => { - let html = ""; - html += `

    Sélectionner les services à intégrer à l’espace de travail

    `; - html += "
    "; - const mel_metapage_templates_services = rcmail.env.mel_metapage_templates_services; - for (let index = 0; index < mel_metapage_templates_services.length; ++index) { - const element = mel_metapage_templates_services[index]; - - switch (element.type) { - case 'doc': - if (!mel_metapage.Functions.stockage.canDriveActions()) continue; - break; - - default: - break; - } + default: + break; + } - html += '
    '; - html += ''; - - if (element.param === true) - { - html += `'; + + if (element.param === true) { + html += ``; - } - - html += "
    " - } - html += "
    "; - html += '
    ' - html += '
    ' - html += ' '; - html += ' '; - return html; } - } + + html += '
    '; + } + html += ''; + html += '
    '; + html += + '
    '; + html += + ' '; + html += + ' '; + return html; + }, + }; } -function m_mp_step3_param(type) -{ - let $querry = $('#workspace-step3').css('display', 'none').parent(); - $querry = $querry.append(` +function m_mp_step3_param(type) { + let $querry = $('#workspace-step3').css('display', 'none').parent(); + $querry = $querry + .append( + `
    - `).find('#workspace-step3-extra'); - - const update_title = (str) => { - return mel_metapage.Functions.remove_accents(mel_metapage.Functions.replace_special_char(mel_metapage.Functions.replace_dets(str.toLowerCase(), '-'), '-')).replaceAll(' ', '-'); - }; + `, + ) + .find('#workspace-step3-extra'); + + const update_title = (str) => { + return mel_metapage.Functions.remove_accents( + mel_metapage.Functions.replace_special_char( + mel_metapage.Functions.replace_dets(str.toLowerCase(), '-'), + '-', + ), + ).replaceAll(' ', '-'); + }; + + const wsp_title = $('#workspace-title').val(); + const wsp_uid = $('#custom-uid').val(); + const have_datas = !!m_mp_step3_param.datas && !!m_mp_step3_param.datas[type]; + + switch (type) { + case 'channel': + { + let $master_button = $('.doc-channel'); - const wsp_title = $('#workspace-title').val(); - const wsp_uid = $('#custom-uid').val(); - const have_datas = !!m_mp_step3_param.datas && !!m_mp_step3_param.datas[type]; + if (!$master_button.hasClass('active')) $master_button.click(); - switch (type) { - case 'channel': - { - let $master_button = $('.doc-channel'); + let $param_button = $master_button.parent().find('.under-button'); + let custom_channel_datas = null; + const default_custom_value = + have_datas && m_mp_step3_param.datas[type].mode === 'custom_name' + ? m_mp_step3_param?.datas[type]?.value ?? '' + : null; - if (!$master_button.hasClass('active')) $master_button.click(); + const html_title = + '

    Paramètres du canal

    '; - let $param_button = $master_button.parent().find('.under-button'); - let custom_channel_datas = null; - const default_custom_value = have_datas && m_mp_step3_param.datas[type].mode === 'custom_name' ? (m_mp_step3_param?.datas[type]?.value ?? '') : null; - - const html_title = `

    Paramètres du canal

    `; - - let $select = $(` - + `); - - if (have_datas) $select.val(m_mp_step3_param.datas[type].mode); - - let $custom_name_div = $(` + + if (have_datas) $select.val(m_mp_step3_param.datas[type].mode); + + let $custom_name_div = $(`

    Nom personalisé du nouveau canal

    `).css('display', 'none'); - - let $custom_name_input = $(` + + let $custom_name_input = $(` - `).on('input', () => { - $custom_name_input.val(update_title($custom_name_input.val())); - m_mp_step3_param.datas[type].value = $custom_name_input.val(); - }).appendTo($custom_name_div); - - let $linked_channel_div = $(` + `) + .on('input', () => { + $custom_name_input.val(update_title($custom_name_input.val())); + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + }) + .appendTo($custom_name_div); + + let $linked_channel_div = $(`
    -

    Lié à un canal éxistant

    +

    Entrer l'identifiant interne du canal existant

    `).css('display', 'none'); - let $linked_channel_select = $(` + let $linked_channel_select = $(` - `).on('change', () => { - const val = custom_channel_datas[$linked_channel_select.val()]; - m_mp_step3_param.datas[type].value = { - id:val?._id, - name:val?.name - }; - }).appendTo($linked_channel_div); - - $select.on('change', () => { - if (!m_mp_step3_param.datas) { - m_mp_step3_param.datas = {}; - } + `) + .on('change', () => { + const val = custom_channel_datas[$linked_channel_select.val()]; + m_mp_step3_param.datas[type].value = { + id: val?._id, + name: val?.name, + }; + }) + .appendTo($linked_channel_div); - if (!m_mp_step3_param.datas[type]) m_mp_step3_param.datas[type] = { - mode:$select.val(), - value:undefined + $select.on('change', () => { + if (!m_mp_step3_param.datas) { + m_mp_step3_param.datas = {}; + } + + if (!m_mp_step3_param.datas[type]) + m_mp_step3_param.datas[type] = { + mode: $select.val(), + value: undefined, + }; + else m_mp_step3_param.datas[type].mode = $select.val(); + + switch ($select.val()) { + case 'default': + $custom_name_div.css('display', 'none'); + $linked_channel_div.css('display', 'none'); + $param_button.removeClass('selected'); + break; + + case 'custom_name': + $param_button.addClass('selected'); + $custom_name_div.css('display', ''); + $linked_channel_div.css('display', 'none'); + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + break; + + case 'already_exist': + $param_button.addClass('selected'); + $custom_name_div.css('display', 'none'); + $select.attr('disabled', 'disabled').addClass('disabled'); + rcmail.set_busy(true, 'loading'); + + mel_metapage.Functions.post( + mel_metapage.Functions.url('discussion', 'get_joined'), + { + _moderator: true, + _mode: $('#workspace-private')[0].checked ? 2 : 1, + }, + (datas) => { + //console.log('datas', JSON.parse(datas)); + custom_channel_datas = JSON.parse(datas); + + // for (const iterator of datas) { + // $linked_channel_select.append(``); + // } + for (const key in custom_channel_datas) { + if (Object.hasOwnProperty.call(custom_channel_datas, key)) { + const element = custom_channel_datas[key]; + $linked_channel_select.append( + ``, + ); } - else m_mp_step3_param.datas[type].mode = $select.val(); - - - switch ($select.val()) { - case 'default': - $custom_name_div.css('display', 'none'); - $linked_channel_div.css('display', 'none'); - $param_button.removeClass('selected'); - break; - - case 'custom_name': - $param_button.addClass('selected'); - $custom_name_div.css('display', ''); - $linked_channel_div.css('display', 'none'); - m_mp_step3_param.datas[type].value = $custom_name_input.val(); - break; - - case 'already_exist': - $param_button.addClass('selected'); - $custom_name_div.css('display', 'none'); - $select.attr('disabled', 'disabled').addClass('disabled'); - rcmail.set_busy(true, 'loading'); - - mel_metapage.Functions.post( - mel_metapage.Functions.url('discussion', 'get_joined'), - { - _moderator:true, - _mode:$('#workspace-private')[0].checked ? 2 : 1 - }, - (datas) => { - //console.log('datas', JSON.parse(datas)); - custom_channel_datas = JSON.parse(datas); - - // for (const iterator of datas) { - // $linked_channel_select.append(``); - // } - for (const key in custom_channel_datas) { - if (Object.hasOwnProperty.call(custom_channel_datas, key)) { - const element = custom_channel_datas[key]; - $linked_channel_select.append(``); - } - } - - $linked_channel_div.css('display', ''); - rcmail.clear_messages(); - $select.removeAttr('disabled', 'disabled').removeClass('disabled'); - } - ) - - break; - - default: - break; - } - - m_mp_step3_param.datas[type].mode = $select.val(); - }); - - $select.change(); - - let $button_back = $(` + } + + $linked_channel_div.css('display', ''); + rcmail.clear_messages(); + $select + .removeAttr('disabled', 'disabled') + .removeClass('disabled'); + }, + ); + + break; + + default: + break; + } + + m_mp_step3_param.datas[type].mode = $select.val(); + }); + + $select.change(); + + let $button_back = $(` `).click(() => { - $querry.remove(); - $querry = null; - $('#workspace-step3').css('display', ''); - }); - - $querry.append(html_title).append($select).append($custom_name_div).append($linked_channel_div).append($button_back); - } - break; - + $querry.remove(); + $querry = null; + $('#workspace-step3').css('display', ''); + }); - case 'tasks': - { - let $master_button = $('.doc-tasks'); + $querry + .append(html_title) + .append($select) + .append($custom_name_div) + .append($linked_channel_div) + .append($button_back); + } + break; + + case 'tasks': + { + let $master_button = $('.doc-tasks'); - if (!$master_button.hasClass('active')) $master_button.click(); + if (!$master_button.hasClass('active')) $master_button.click(); - let $param_button = $master_button.parent().find('.under-button'); - const default_custom_value = have_datas && m_mp_step3_param.datas[type].mode === 'custom_name' ? (m_mp_step3_param?.datas[type]?.value ?? '') : null; + let $param_button = $master_button.parent().find('.under-button'); + const default_custom_value = + have_datas && m_mp_step3_param.datas[type].mode === 'custom_name' + ? m_mp_step3_param?.datas[type]?.value ?? '' + : null; - const html_title = `

    Paramètres du kanban

    `; + const html_title = + '

    Paramètres du kanban

    '; - let $select = $(` - - `).attr('title', 'Choisir la méthode de création du kanban'); + + `).attr( + 'title', + 'Choisir la méthode de création du kanban', + ); - if (have_datas) $select.val(m_mp_step3_param.datas[type].mode); + if (have_datas) $select.val(m_mp_step3_param.datas[type].mode); - let $custom_name_div = $(` + let $custom_name_div = $(`

    Nom personalisé du nouveau kanban

    `).css('display', 'none'); - let $custom_name_input = $(` + let $custom_name_input = $(` - `).on('input', () => { - m_mp_step3_param.datas[type].value = $custom_name_input.val(); - }).appendTo($custom_name_div); + `) + .on('input', () => { + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + }) + .appendTo($custom_name_div); - let $linked_kanban_div = $(` + let $linked_kanban_div = $(`
    -

    Lié à un kanban éxistant

    +

    Lié à un kanban existant

    `).css('display', 'none'); - let $linked_kanban_select = $(` - - `).on('change', () => { - m_mp_step3_param.datas[type].value = $linked_kanban_select.val(); - }).appendTo($linked_kanban_div); - - $select.on('change', () => { - if (!m_mp_step3_param.datas) { - m_mp_step3_param.datas = {}; - } + let $linked_kanban_select = $(` + + `) + .on('change', () => { + m_mp_step3_param.datas[type].value = $linked_kanban_select.val(); + }) + .appendTo($linked_kanban_div); + + $select.on('change', () => { + if (!m_mp_step3_param.datas) { + m_mp_step3_param.datas = {}; + } - if (!m_mp_step3_param.datas[type]) m_mp_step3_param.datas[type] = { - mode:$select.val(), - value:undefined - } - else m_mp_step3_param.datas[type].mode = $select.val(); - - switch ($select.val()) { - case 'default': - $param_button.removeClass('selected'); - $custom_name_div.css('display', 'none'); - $linked_kanban_div.css('display', 'none'); - break; - - case 'custom_name': - $param_button.addClass('selected'); - $linked_kanban_div.css('display', 'none'); - $custom_name_div.css('display', ''); - m_mp_step3_param.datas[type].value = $custom_name_input.val(); - break; - - case 'already_exist': - $param_button.addClass('selected'); - $select.attr('disabled', 'disabled').addClass('disabled'); - rcmail.set_busy(true, 'loading'); - $custom_name_div.css('display', 'none'); - mel_metapage.Functions.post( - mel_metapage.Functions.url('wekan', 'get_user_board'), - { - _moderator:true, - _mode:$('#workspace-private')[0].checked ? 2 : 1, - _minified_datas:true - }, - (datas) => { - datas = JSON.parse(datas); - - for (const it of datas) { - $linked_kanban_select.append(` + if (!m_mp_step3_param.datas[type]) + m_mp_step3_param.datas[type] = { + mode: $select.val(), + value: undefined, + }; + else m_mp_step3_param.datas[type].mode = $select.val(); + + switch ($select.val()) { + case 'default': + $param_button.removeClass('selected'); + $custom_name_div.css('display', 'none'); + $linked_kanban_div.css('display', 'none'); + break; + + case 'custom_name': + $param_button.addClass('selected'); + $linked_kanban_div.css('display', 'none'); + $custom_name_div.css('display', ''); + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + break; + + case 'already_exist': + $param_button.addClass('selected'); + $select.attr('disabled', 'disabled').addClass('disabled'); + rcmail.set_busy(true, 'loading'); + $custom_name_div.css('display', 'none'); + mel_metapage.Functions.post( + mel_metapage.Functions.url('wekan', 'get_user_board'), + { + _moderator: true, + _mode: $('#workspace-private')[0].checked ? 2 : 1, + _minified_datas: true, + }, + (datas) => { + datas = JSON.parse(datas); + + for (const it of datas) { + $linked_kanban_select.append(` `); - } + } - $linked_kanban_div.css('display', ''); - rcmail.clear_messages(); - $select.removeAttr('disabled', 'disabled').removeClass('disabled'); - } - ); + $linked_kanban_div.css('display', ''); + rcmail.clear_messages(); + $select + .removeAttr('disabled', 'disabled') + .removeClass('disabled'); + }, + ); - break; - - default: - break; - } + break; - m_mp_step3_param.datas[type].mode = $select.val(); - }); + default: + break; + } - $select.change(); + m_mp_step3_param.datas[type].mode = $select.val(); + }); - let $button_back = $(` + $select.change(); + + let $button_back = $(` `).click(() => { - $querry.remove(); - $querry = null; - $('#workspace-step3').css('display', ''); - }); + $querry.remove(); + $querry = null; + $('#workspace-step3').css('display', ''); + }); - $querry.append(html_title).append($select).append($custom_name_div).append($linked_kanban_div).append($button_back); - } - break; - - default: - break; - } -} + $querry + .append(html_title) + .append($select) + .append($custom_name_div) + .append($linked_kanban_div) + .append($button_back); + } + break; + case 'tchap-channel': + { + let $master_button = $('.doc-tchap-channel'); + if (!$master_button.hasClass('active')) $master_button.click(); -function m_mp_input_change(event) { - return; - // if ($("#workspace-uid").data("edited") || !enable_custom_uid) - // return; - // if ($(".btn-workspace-right").find("span").length === 0) - // $(".btn-workspace-right").html("" + $(".btn-workspace-right").html() + ""); - // const tmp_html = $(".btn-workspace-right").find("span").html(); - // $(".btn-workspace-right").addClass("disabled").find("span").addClass("spinner-border").html(""); - // $.ajax({ // fonction permettant de faire de l'ajax - // type: "POST", // methode de transmission des données au fichier php - // data: { - // "_title": event.value, - // }, - // url: "/?_task=workspace&_action=get_uid", - // success: function(ariane) { - // $("#workspace-uid").val(ariane); - // }, - // error: function(xhr, ajaxOptions, thrownError) { // Add these parameters to display the required response - // console.error(xhr, ajaxOptions, thrownError); - // }, - // }).always(() => { - // $(".btn-workspace-right").removeClass("disabled").find("span").removeClass("spinner-border").html(tmp_html); - // }); -} + let $param_button = $master_button.parent().find('.under-button'); + let custom_channel_datas = null; + const default_custom_value = + have_datas && m_mp_step3_param.datas[type].mode === 'custom_name' + ? m_mp_step3_param?.datas[type]?.value ?? '' + : null; -function m_mp_input_uid_change(params) { - if (params.value === "") { - $(params).data("edited", false); - m_mp_input_change($("#workspace-title")[0]); - } else - $(params).data("edited", true); -} + const html_title = + '

    Paramètres du canal tchap

    '; -function m_mp_createworkspace() { - try { - let html = ""; - const object = m_mp_createworskpace_steps(); - for (const key in object) { - if (Object.hasOwnProperty.call(object, key)) { - const element = object[key]; - if (key === "init") - html += element(); - else - continue; - } - } - rcmail.triggerEvent('on_click_button.matomo', 'Créer - Un espace de travail'); + let $select = + $(` `); - create_popUp.contents.html('
    '); - mel_metapage.Functions.get(mel_metapage.Functions.url("mel_metapage", "get_create_workspace"), {}, - (datas) => { - if ($("#globallist").length > 0) - return; + if (have_datas) $select.val(m_mp_step3_param.datas[type].mode); - create_popUp.contents.html(html + datas + ``); + let $custom_name_div = $(` +
    +

    Nom personalisé du nouveau canal

    +
    + `).css('display', 'none'); - if ($("#tmpavatar").find("a").length === 0) - $("#worspace-avatar-a").html("").css("display", "").appendTo($("#tmpavatar")); + let $custom_name_input = $(` + + `) + .on('input', () => { + $custom_name_input.val(update_title($custom_name_input.val())); + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + }) + .appendTo($custom_name_div); + + let $linked_channel_div = $(` +
    +

    Entrer l'identifiant d'un canal tchap existant

    +
    `).css('display', 'none'); - m_mp_switch_step("workspace-step1"); - rcmail.init_address_input_events($("#_workspace-user-list")); - $(".global-modal-body").css("height", `${window.innerHeight - 200}px`).css("overflow-y", "auto").css("overflow-x", "hidden"); + let image_src = { + parametres: `plugins/mel_metapage/skins/${rcmail.env.skin}/images/tchap_info_salon.png`, + channel_uid: `plugins/mel_metapage/skins/${rcmail.env.skin}/images/tchap_uid_salon.png`, + }; + let $linked_channel_uid = $( + ` + +
    +

    Pour trouver l'identifiant interne d'un canal cliquer sur le nom du canal -> Paramètres -> Avancé +

    + Pour trouver l'identifiant interne d'un canal cliquer sur le nom du canal -> Paramètres -> Avancé + Pour trouver l'identifiant interne d'un canal cliquer sur le nom du canal -> Paramètres -> Avancé + `, + ) + .on('change', () => { + const val = custom_channel_datas[$linked_channel_uid.val()]; + m_mp_step3_param.datas[type].value = { + id: val?._id, + }; + }) + .appendTo($linked_channel_div); - create_popUp.contents.find('#workspace-title-param').click((e) => { - e = $(e.currentTarget); - let $div = $('#custom-div-uid'); - const class_name = 'active'; + $select.on('change', () => { + if (!m_mp_step3_param.datas) { + m_mp_step3_param.datas = {}; + } - if (e.hasClass(class_name)) { - $div.css('display', 'none'); - e.removeClass(class_name) - } - else { - $div.css('display', ''); - e.addClass(class_name) + if (!m_mp_step3_param.datas[type]) + m_mp_step3_param.datas[type] = { + mode: $select.val(), + value: undefined, + }; + else m_mp_step3_param.datas[type].mode = $select.val(); + + switch ($select.val()) { + case 'default': + $custom_name_div.css('display', 'none'); + $linked_channel_div.css('display', 'none'); + $param_button.removeClass('selected'); + break; + + case 'custom_name': + $param_button.addClass('selected'); + $custom_name_div.css('display', ''); + $linked_channel_div.css('display', 'none'); + m_mp_step3_param.datas[type].value = $custom_name_input.val(); + break; + + case 'already_exist': + $param_button.addClass('selected'); + $custom_name_div.css('display', 'none'); + $select.attr('disabled', 'disabled').addClass('disabled'); + rcmail.set_busy(true, 'loading'); + + mel_metapage.Functions.post( + mel_metapage.Functions.url('discussion', 'get_joined'), + { + _moderator: true, + _mode: $('#workspace-private')[0].checked ? 2 : 1, + }, + (datas) => { + //console.log('datas', JSON.parse(datas)); + custom_channel_datas = JSON.parse(datas); + + // for (const iterator of datas) { + // $linked_channel_select.append(``); + // } + for (const key in custom_channel_datas) { + if (Object.hasOwnProperty.call(custom_channel_datas, key)) { + const element = custom_channel_datas[key]; + $linked_channel_uid.append( + ``, + ); } - }); + } - create_popUp.contents.find('#custom-div-uid button').click((e) => { - e = $(e.currentTarget); - let $div = $('#custom-div-input-uid'); - const class_name = 'active'; + $linked_channel_div.css('display', ''); + rcmail.clear_messages(); + $select + .removeAttr('disabled', 'disabled') + .removeClass('disabled'); + }, + ); - if (e.hasClass(class_name)) { - $div.css('display', 'none'); - e.removeClass(class_name) - e.html('Activer l\'id personalisé'); - } - else { - $div.css('display', ''); - e.addClass(class_name) - e.html('Désactiver l\'id personalisé'); + break; - let $input = $('#custom-uid'); + default: + break; + } - if ($input.val() === '') - { - const title = mel_metapage.Functions.remove_accents(mel_metapage.Functions.replace_special_char(mel_metapage.Functions.replace_dets($('#workspace-title').val().toLowerCase(), '-'), '-')).replaceAll(' ', '-'); - $input.val(title); - } + m_mp_step3_param.datas[type].mode = $select.val(); + }); - } - }); - - let $custom_uid = $('#custom-uid'); - $custom_uid.on('input', () => { - let val = $custom_uid.val(); - val = mel_metapage.Functions.replace_special_char(mel_metapage.Functions.remove_accents(val), '-').replaceAll(' ', '-').toLowerCase(); - $custom_uid.val(val); - }); - - - setTimeout(() => { - const rdmColor = MEL_ELASTIC_UI.getRandomColor(); - $('#workspace-color').val(rdmColor).on('change', (e) => { - const color = $(e.currentTarget).val(); - let $span = $('#worspace-avatar-a'); - if ($span.length > 0) - { - if(!mel_metapage.Functions.colors.kMel_LuminanceRatioAAA(mel_metapage.Functions.colors.kMel_extractRGB('#363A5B'), mel_metapage.Functions.colors.kMel_extractRGB(color))){ - $span.attr('style', 'color:white!important'); - } - else { - $span.attr('style', 'color:#363A5B!important'); - } - - $span.css('background-color', color); - } - $span = null; - - }); - let $span = $('#worspace-avatar-a'); - if ($span.length > 0) - { - if(!mel_metapage.Functions.colors.kMel_LuminanceRatioAAA(mel_metapage.Functions.colors.kMel_extractRGB('#363A5B'), mel_metapage.Functions.colors.kMel_extractRGB(rdmColor))){ - $span.attr('style', 'color:white!important'); - } - else { - $span.attr('style', 'color:#363A5B!important'); - } - } - $span.css('background-color', rdmColor); - $span = null; - $("#workspace-date-end").datetimepicker({ - format: 'd/m/Y H:i', - dayOfWeekStart: 1, - }); - MEL_ELASTIC_UI.redStars(); - }, 10); - }); - create_popUp.editTitleAndSetBeforeTitle('Retour à la modale de création', - 'Création d\'un espace de travail'); - create_popUp.modal.focus(); - create_popUp.show(); - } catch (error) { - console.error(error); + $select.change(); + + let $button_back = $(` + + `).click(() => { + $querry.remove(); + $querry = null; + $('#workspace-step3').css('display', ''); + }); + + $querry + .append(html_title) + .append($select) + .append($custom_name_div) + .append($linked_channel_div) + .append($button_back); + } + break; + default: + break; + } +} + +function m_mp_input_change(event) { + return; + // if ($("#workspace-uid").data("edited") || !enable_custom_uid) + // return; + // if ($(".btn-workspace-right").find("span").length === 0) + // $(".btn-workspace-right").html("" + $(".btn-workspace-right").html() + ""); + // const tmp_html = $(".btn-workspace-right").find("span").html(); + // $(".btn-workspace-right").addClass("disabled").find("span").addClass("spinner-border").html(""); + // $.ajax({ // fonction permettant de faire de l'ajax + // type: "POST", // methode de transmission des données au fichier php + // data: { + // "_title": event.value, + // }, + // url: "/?_task=workspace&_action=get_uid", + // success: function(ariane) { + // $("#workspace-uid").val(ariane); + // }, + // error: function(xhr, ajaxOptions, thrownError) { // Add these parameters to display the required response + // console.error(xhr, ajaxOptions, thrownError); + // }, + // }).always(() => { + // $(".btn-workspace-right").removeClass("disabled").find("span").removeClass("spinner-border").html(tmp_html); + // }); +} + +function m_mp_input_uid_change(params) { + if (params.value === '') { + $(params).data('edited', false); + m_mp_input_change($('#workspace-title')[0]); + } else $(params).data('edited', true); +} + +function m_mp_createworkspace() { + try { + let html = ''; + const object = m_mp_createworskpace_steps(); + for (const key in object) { + if (Object.hasOwnProperty.call(object, key)) { + const element = object[key]; + if (key === 'init') html += element(); + else continue; + } } + rcmail.triggerEvent( + 'on_click_button.matomo', + 'Créer - Un espace de travail', + ); + + create_popUp.contents.html( + '
    ', + ); + mel_metapage.Functions.get( + mel_metapage.Functions.url('mel_metapage', 'get_create_workspace'), + {}, + (datas) => { + // eslint-disable-next-line no-async-promise-executor + if ($('#globallist').length > 0) return; + + create_popUp.contents.html( + html + + datas + + ``, + ); + + if ($('#tmpavatar').find('a').length === 0) + $('#worspace-avatar-a') + .html('') + .css('display', '') + .appendTo($('#tmpavatar')); + + m_mp_switch_step('workspace-step1'); + rcmail.init_address_input_events($('#_workspace-user-list')); + $('.global-modal-body') + .css('height', `${window.innerHeight - 200}px`) + .css('overflow-y', 'auto') + .css('overflow-x', 'hidden'); + + create_popUp.contents.find('#workspace-title-param').click((e) => { + e = $(e.currentTarget); + let $div = $('#custom-div-uid'); + const class_name = 'active'; + + if (e.hasClass(class_name)) { + $div.css('display', 'none'); + e.removeClass(class_name); + } else { + $div.css('display', ''); + e.addClass(class_name); + } + }); + + create_popUp.contents.find('#custom-div-uid button').click((e) => { + e = $(e.currentTarget); + let $div = $('#custom-div-input-uid'); + const class_name = 'active'; + + if (e.hasClass(class_name)) { + $div.css('display', 'none'); + e.removeClass(class_name); + e.html("Activer l'id personalisé"); + } else { + $div.css('display', ''); + e.addClass(class_name); + e.html("Désactiver l'id personalisé"); + + let $input = $('#custom-uid'); + + if ($input.val() === '') { + const title = mel_metapage.Functions.remove_accents( + mel_metapage.Functions.replace_special_char( + mel_metapage.Functions.replace_dets( + $('#workspace-title').val().toLowerCase(), + '-', + ), + '-', + ), + ).replaceAll(' ', '-'); + $input.val(title); + } + } + }); + + let $custom_uid = $('#custom-uid'); + $custom_uid.on('input', () => { + let val = $custom_uid.val(); + val = mel_metapage.Functions.replace_special_char( + mel_metapage.Functions.remove_accents(val), + '-', + ) + .replaceAll(' ', '-') + .toLowerCase(); + $custom_uid.val(val); + }); + + setTimeout(() => { + const rdmColor = MEL_ELASTIC_UI.getRandomColor(); + $('#workspace-color') + .val(rdmColor) + .on('change', (e) => { + const color = $(e.currentTarget).val(); + let $span = $('#worspace-avatar-a'); + if ($span.length > 0) { + if ( + !mel_metapage.Functions.colors.kMel_LuminanceRatioAAA( + mel_metapage.Functions.colors.kMel_extractRGB('#363A5B'), + mel_metapage.Functions.colors.kMel_extractRGB(color), + ) + ) { + $span.attr('style', 'color:white!important'); + } else { + $span.attr('style', 'color:#363A5B!important'); + } + + $span.css('background-color', color); + } + $span = null; + }); + let $span = $('#worspace-avatar-a'); + if ($span.length > 0) { + if ( + !mel_metapage.Functions.colors.kMel_LuminanceRatioAAA( + mel_metapage.Functions.colors.kMel_extractRGB('#363A5B'), + mel_metapage.Functions.colors.kMel_extractRGB(rdmColor), + ) + ) { + $span.attr('style', 'color:white!important'); + } else { + $span.attr('style', 'color:#363A5B!important'); + } + } + $span.css('background-color', rdmColor); + $span = null; + $('#workspace-date-end').datetimepicker({ + format: 'd/m/Y H:i', + dayOfWeekStart: 1, + }); + MEL_ELASTIC_UI.redStars(); + }, 10); + }, + ); + create_popUp.editTitleAndSetBeforeTitle( + 'Retour à la modale de création', + "Création d'un espace de travail", + ); + create_popUp.modal.focus(); + create_popUp.show(); + } catch (error) { + console.error(error); + } } function m_mp_change_picture(img) { - if (img === null) { - $("#worspace-avatar-a").html(""); - m_mp_input($("#workspace-title")[0]); - } else - $("#worspace-avatar-a").html(`${Enumerable.from(img.replace(

    - Changer d'avatar

    `); + if (img === null) { + $('#worspace-avatar-a').html(''); + m_mp_input($('#workspace-title')[0]); + } else + $('#worspace-avatar-a').html( + `${Enumerable.from(img.replace('.png', '').replace('.PNG', '').split('/')).last()}

    - Changer d'avatar

    `, + ); } async function m_mp_avatarOnSelect(e) { - if (e.type === "keydown") { - if (e.originalEvent.code === "Enter" || e.originalEvent.code === "Space") { - $("#user-up-panel").focus().popover('show').data("event", "key"); //.trigger("click", e); - } + if (e.type === 'keydown') { + if (e.originalEvent.code === 'Enter' || e.originalEvent.code === 'Space') { + $('#user-up-panel').focus().popover('show').data('event', 'key'); //.trigger("click", e); } + } } function m_mp_input(element) { - if ($("#worspace-avatar-a").find("img").length === 0) - $("#worspace-avatar-a").html("" + element.value.slice(0, 3).toUpperCase() + ""); + if ($('#worspace-avatar-a').find('img').length === 0) + $('#worspace-avatar-a').html( + '' + element.value.slice(0, 3).toUpperCase() + '', + ); } async function m_mp_check_w(step, next) { - let stop = false; - switch (step) { - case 1: - if ($("#workspace-title").val() === "") { - $("#workspace-title").css("border-color", "red"); - if ($("#wspte").length === 0) - $("#workspace-title").parent().append(''); - $("#wspte").html("* L'espace de travail doit avoir un titre !"); - $("#wspte").css("display", ""); - stop = true; - } else { - $("#wspte").css("display", "none"); - $("#workspace-title").css("border-color", ""); - } - if ($("#workspace-private")[0].checked === false && $("#workspace-public")[0].checked === false) { - $("#workspace-private").parent().css("color", "red"); - $("#workspace-public").parent().css("color", "red"); - if ($("#wspae").length === 0) - $("#workspace-private").parent().parent().append(''); - $("#wspae").html("* L'espace de travail doit avoir un accès de défini !"); - $("#wspae").css("display", ""); - stop = true; - } else { - $("#wspae").css("display", "none"); - $("#workspace-private").parent().css("color", ""); - $("#workspace-public").parent().css("color", ""); - } + let stop = false; + switch (step) { + case 1: + if ($('#workspace-title').val() === '') { + $('#workspace-title').css('border-color', 'red'); + if ($('#wspte').length === 0) + $('#workspace-title') + .parent() + .append( + '', + ); + $('#wspte').html("* L'espace de travail doit avoir un titre !"); + $('#wspte').css('display', ''); + stop = true; + } else { + $('#wspte').css('display', 'none'); + $('#workspace-title').css('border-color', ''); + } + if ( + $('#workspace-private')[0].checked === false && + $('#workspace-public')[0].checked === false + ) { + $('#workspace-private').parent().css('color', 'red'); + $('#workspace-public').parent().css('color', 'red'); + if ($('#wspae').length === 0) + $('#workspace-private') + .parent() + .parent() + .append( + '', + ); + $('#wspae').html( + "* L'espace de travail doit avoir un accès de défini !", + ); + $('#wspae').css('display', ''); + stop = true; + } else { + $('#wspae').css('display', 'none'); + $('#workspace-private').parent().css('color', ''); + $('#workspace-public').parent().css('color', ''); + } - if (enable_custom_uid && $('#custom-uid-is-enabled').hasClass('active')) { - const input_uid = '#custom-uid'; - $(".btn-right-step1").addClass("disabled").find("span.plus").addClass("spinner-grow spinner-grow-sm").removeClass('icon-mel-arrow-right');//.html(""); - await $.ajax({ // fonction permettant de faire de l'ajax - type: "POST", // methode de transmission des données au fichier php - data: { - "_uid": $(input_uid).val(), - }, - url: mel_metapage.Functions.url('workspace', 'check_uid'), - success: function(ariane) { - if (ariane !== "uid_ok") { - stop = true; - $(input_uid).css("border-color", "red"); - if ($("#wsptuid").length === 0) - $(input_uid).parent().append(''); - if (ariane === "uid_exists") - $("#wsptuid").html("* L'id existe déjà !"); - else if (ariane === "uid_not_ok") - $("#wsptuid").html("* L'id n'est pas valide !"); - else if (ariane === "ui_empty") - $("#wsptuid").html("* L'id ne doit pas être vide !"); - else - $("#wsptuid").html("* Erreur inconnue !"); - $("#wsptuid").css("display", ""); - } else - $("#wsptuid").css("display", "none"); - }, - error: function(xhr, ajaxOptions, thrownError) { // Add these parameters to display the required response - console.error(xhr, ajaxOptions, thrownError); - }, - }).always(() => { - $(input_uid).css("border-color", ""); - $(".btn-right-step1").removeClass("disabled").find("span.plus").removeClass("spinner-grow").addClass('icon-mel-arrow-right');//.html(tmp_html); - }); - } + if (enable_custom_uid && $('#custom-uid-is-enabled').hasClass('active')) { + const input_uid = '#custom-uid'; + $('.btn-right-step1') + .addClass('disabled') + .find('span.plus') + .addClass('spinner-grow spinner-grow-sm') + .removeClass('icon-mel-arrow-right'); //.html(""); + await $.ajax({ + // fonction permettant de faire de l'ajax + type: 'POST', // methode de transmission des données au fichier php + data: { + _uid: $(input_uid).val(), + }, + url: mel_metapage.Functions.url('workspace', 'check_uid'), + success: function (ariane) { + if (ariane !== 'uid_ok') { + stop = true; + $(input_uid).css('border-color', 'red'); + if ($('#wsptuid').length === 0) + $(input_uid) + .parent() + .append( + '', + ); + if (ariane === 'uid_exists') + $('#wsptuid').html("* L'id existe déjà !"); + else if (ariane === 'uid_not_ok') + $('#wsptuid').html("* L'id n'est pas valide !"); + else if (ariane === 'ui_empty') + $('#wsptuid').html("* L'id ne doit pas être vide !"); + else $('#wsptuid').html('* Erreur inconnue !'); + $('#wsptuid').css('display', ''); + } else $('#wsptuid').css('display', 'none'); + }, + error: function (xhr, ajaxOptions, thrownError) { + // Add these parameters to display the required response + console.error(xhr, ajaxOptions, thrownError); + }, + }).always(() => { + $(input_uid).css('border-color', ''); + $('.btn-right-step1') + .removeClass('disabled') + .find('span.plus') + .removeClass('spinner-grow') + .addClass('icon-mel-arrow-right'); //.html(tmp_html); + }); + } - break; - case 2: - let users = []; - $("#wspf .workspace-recipient").each((i, e) => { - users.push($(e).find(".email").html()); - }); - let input = $("#_workspace-user-list"); - if (input.val().length > 0) - users.push(input.val()); - if (users.length > 0) { - if (confirm("Ajouter les utilisateurs qui n'ont pas été ajouter ?")) { - await m_mp_add_users(); - } else - stop = true; - } - break; - case 3: - break; - default: - break; - } + break; + case 2: + let users = []; + $('#wspf .workspace-recipient').each((i, e) => { + users.push($(e).find('.email').html()); + }); + let input = $('#_workspace-user-list'); + if (input.val().length > 0) users.push(input.val()); + if (users.length > 0) { + if (confirm("Ajouter les utilisateurs qui n'ont pas été ajouter ?")) { + await m_mp_add_users(); + } else stop = true; + } + break; + case 3: + break; + default: + break; + } - if (!stop) { - if (next !== null) - m_mp_switch_step(next); - else - m_mp_CreateWorkSpace() - } + if (!stop) { + if (next !== null) m_mp_switch_step(next); + else m_mp_CreateWorkSpace(); + } } -function m_mp_CreateWorkSpace() { - rcmail.set_busy(true); - rcmail.display_message("Création d'un espace de travail...", "loading"); - let datas = { - avatar: ($("#worspace-avatar-a").find("img").length === 0 ? false : $("#worspace-avatar-a").find("img")[0].src.replace(window.location.origin, "")), - title: $("#workspace-title").val(), - desc: $("#workspace-desc").val(), - end_date: $("#workspace-date-end").val(), - hashtag: $("#workspace-hashtag").val(), - visibility: $("#workspace-private")[0].checked ? "private" : "public", - custom_uid: enable_custom_uid && $('#custom-uid-is-enabled').hasClass('active') ? $("#custom-uid").val() : "", - color: $("#workspace-color").val(), - users: [], - services: [], - _services_params: m_mp_step3_param.datas - }; - - $("#mm-cw-participants").find(".workspace-users-added").each((i, e) => { - datas.users.push($(e).find(".email").html()); +async function m_mp_CreateWorkSpace() { + rcmail.set_busy(true); + rcmail.display_message("Création d'un espace de travail...", 'loading'); + let datas = { + avatar: + $('#worspace-avatar-a').find('img').length === 0 + ? false + : $('#worspace-avatar-a') + .find('img')[0] + .src.replace(window.location.origin, ''), + title: $('#workspace-title').val(), + desc: $('#workspace-desc').val(), + end_date: $('#workspace-date-end').val(), + hashtag: $('#workspace-hashtag').val(), + visibility: $('#workspace-private')[0].checked ? 'private' : 'public', + custom_uid: + enable_custom_uid && $('#custom-uid-is-enabled').hasClass('active') + ? $('#custom-uid').val() + : '', + color: $('#workspace-color').val(), + users: [], + services: [], + _services_params: m_mp_step3_param.datas, + }; + + $('#mm-cw-participants') + .find('.workspace-users-added') + .each((i, e) => { + datas.users.push($(e).find('.email').html()); }); - $(".btn-template-doc.active").each((i, e) => { - datas.services.push($(e).data("type")); - }); - $(`#worspace-avatar-a`).css(`display`, `none`).appendTo($(`#layout`)); - create_popUp.contents.html(''); - create_popUp.editTitle('

    Chargement...

    '); - $.ajax({ // fonction permettant de faire de l'ajax - type: "POST", // methode de transmission des données au fichier php - data: datas, - url: mel_metapage.Functions.url("workspace", "create"), //"/?_task=workspace&_action=create", - success: function(data) { - data = JSON.parse(data); - - rcmail.set_busy(false); - rcmail.clear_messages(); - - for (let it = 0; it < data.errored_user.length; it++) { - const element = data.errored_user[it]; - rcmail.display_message("impossible d'ajouter " + element + " à l'espace de travail !"); - } + $('.btn-template-doc.active').each((i, e) => { + datas.services.push($(e).data('type')); + }); + $('#worspace-avatar-a').css('display', 'none').appendTo($('#layout')); + create_popUp.contents.html(''); + create_popUp.editTitle('

    Chargement...

    '); + + if (m_mp_Create.current_promise) { + await m_mp_Create.current_promise; + m_mp_Create.current_promise = null; + } else if ( + ($('#otherapps a.wekan').length || $('#taskmenu a.wekan').length) && + !$('.wekan-frame').length + ) { + await mel_metapage.Functions.change_frame('wekan', false, true); + } + $.ajax({ + // fonction permettant de faire de l'ajax + type: 'POST', // methode de transmission des données au fichier php + data: datas, + url: mel_metapage.Functions.url('workspace', 'create'), //"/?_task=workspace&_action=create", + success: function (data) { + data = JSON.parse(data); + + rcmail.set_busy(false); + rcmail.clear_messages(); + + for (let it = 0; it < data.errored_user.length; it++) { + const element = data.errored_user[it]; + rcmail.display_message( + "impossible d'ajouter " + element + " à l'espace de travail !", + ); + } - const action = { - func: mel_metapage.Functions.call, - args: [true, { - _uid: data.workspace_uid, - _integrated: true - }], - url: mel_metapage.Functions.url("workspace", "workspace", { - "_uid": data.workspace_uid - }) - }; + const action = { + func: mel_metapage.Functions.call, + args: [ + true, + { + _uid: data.workspace_uid, + _integrated: true, + }, + ], + url: mel_metapage.Functions.url('workspace', 'workspace', { + _uid: data.workspace_uid, + }), + }; - { - const tmp = window.create_popUp; - delete window.create_popUp; - tmp.close(); - } - - top.rcmail.triggerEvent(mel_metapage.EventListeners.workspaces_updated.get); - - if ($(".workspace-frame").length > 0 && $("iframe.workspace-frame").length === 0) - window.location.href = action.url; - else if ($("iframe.workspace-frame").length === 0) { - mel_metapage.Functions.change_frame("wsp", true, true, { - _action: "workspace", - _uid: data.workspace_uid, - - }); - } else if ($("iframe.workspace-frame").length === 1) { - mel_metapage.Functions.change_frame("wsp", true, true).then(() => { - let config = { - "_uid": data.workspace_uid - }; - config[rcmail.env.mel_metapage_const.key] = rcmail.env.mel_metapage_const.value; - - $("iframe.workspace-frame")[0].src = mel_metapage.Functions.url("workspace", "workspace", config); - }); - } else window.location.href = action.url; - - m_mp_step3_param.datas = null; - }, - error: function(xhr, ajaxOptions, thrownError) { // Add these parameters to display the required response - console.error(xhr, ajaxOptions, thrownError); - rcmail.clear_messages(); - rcmail.display_message(xhr, "error") - window.create_popUp.close(); - window.create_popUp = undefined; - }, - }); + { + const tmp = window.create_popUp; + delete window.create_popUp; + tmp.close(); + } + top.rcmail.triggerEvent( + mel_metapage.EventListeners.workspaces_updated.get, + ); + + if ( + $('.workspace-frame').length > 0 && + $('iframe.workspace-frame').length === 0 + ) + window.location.href = action.url; + else if ($('iframe.workspace-frame').length === 0) { + mel_metapage.Functions.change_frame('wsp', true, true, { + _action: 'workspace', + _uid: data.workspace_uid, + }); + } else if ($('iframe.workspace-frame').length === 1) { + mel_metapage.Functions.change_frame('wsp', true, true).then(() => { + let config = { + _uid: data.workspace_uid, + }; + config[rcmail.env.mel_metapage_const.key] = + rcmail.env.mel_metapage_const.value; + + $('iframe.workspace-frame')[0].src = mel_metapage.Functions.url( + 'workspace', + 'workspace', + config, + ); + }); + } else window.location.href = action.url; + + m_mp_step3_param.datas = null; + }, + error: function (xhr, ajaxOptions, thrownError) { + // Add these parameters to display the required response + console.error(xhr, ajaxOptions, thrownError); + rcmail.clear_messages(); + rcmail.display_message(xhr, 'error'); + window.create_popUp.close(); + window.create_popUp = undefined; + }, + }); } function m_mp_UpdateWorkspace_type(event, element) { - //console.log("m_mp_UpdateWorkspace_type", event, element); - event = $(event); - //console.log(event, event.hasClass("active")); - if (event.hasClass("active")) - event.removeClass("active").attr("aria-pressed", false); - else - event.addClass("active").attr("aria-pressed", true); - document.activeElement.blur(); + //console.log("m_mp_UpdateWorkspace_type", event, element); + event = $(event); + //console.log(event, event.hasClass("active")); + if (event.hasClass('active')) + event.removeClass('active').attr('aria-pressed', false); + else event.addClass('active').attr('aria-pressed', true); + document.activeElement.blur(); } -function m_mp_affiche_hashtag_if_exists(containerSelector = '#list-of-all-hashtag') { - let querry = $(containerSelector); - if (querry.find("button").length > 0) querry.css("display", ""); +function m_mp_affiche_hashtag_if_exists( + containerSelector = '#list-of-all-hashtag', +) { + let querry = $(containerSelector); + if (querry.find('button').length > 0) querry.css('display', ''); } -async function m_mp_get_all_hashtag_input(inputSelector = '#workspace-hashtag', containerSelector = '#list-of-all-hashtag') { - const Mel_Promise = (await loadJsModule('mel_metapage', 'mel_promise'))?.Mel_Promise; - - if (!!Mel_Promise) { - if (!!m_mp_get_all_hashtag_input.current) - { - if (m_mp_get_all_hashtag_input.current.isPending()) m_mp_get_all_hashtag_input.current.abort(); - } - - m_mp_get_all_hashtag_input.current = new Mel_Promise(m_mp_get_all_hashtag, inputSelector, containerSelector); - } - else { - console.error('###[m_mp_get_all_hashtag_input]Le module "Mel_Promise" n\'est pas chargé !', Mel_Promise, inputSelector, containerSelector); - rcmail.display_message('Impossible de récupérer les thèmes, le module "Mel_Promise" n\'est pas chargé.', 'error'); +async function m_mp_get_all_hashtag_input( + inputSelector = '#workspace-hashtag', + containerSelector = '#list-of-all-hashtag', +) { + const Mel_Promise = (await loadJsModule('mel_metapage', 'mel_promise')) + ?.Mel_Promise; + + if (Mel_Promise) { + if (m_mp_get_all_hashtag_input.current) { + if (m_mp_get_all_hashtag_input.current.isPending()) + m_mp_get_all_hashtag_input.current.abort(); } + + m_mp_get_all_hashtag_input.current = new Mel_Promise( + m_mp_get_all_hashtag, + inputSelector, + containerSelector, + ); + } else { + console.error( + '###[m_mp_get_all_hashtag_input]Le module "Mel_Promise" n\'est pas chargé !', + Mel_Promise, + inputSelector, + containerSelector, + ); + rcmail.display_message( + 'Impossible de récupérer les thèmes, le module "Mel_Promise" n\'est pas chargé.', + 'error', + ); + } } /** - * - * @param {Mel_Promise} mel_promise - * @param {*} inputSelector - * @param {*} containerSelector - * @returns + * + * @param {Mel_Promise} mel_promise + * @param {*} inputSelector + * @param {*} containerSelector + * @returns */ -async function m_mp_get_all_hashtag(mel_promise ,inputSelector = '#workspace-hashtag', containerSelector = '#list-of-all-hashtag') { - const val = $(inputSelector).val(); - if (val.length > 0) { - let querry = $(containerSelector).css("display", ""); - querry.parent().attr('data-visible', true); - querry.html("
    "); +async function m_mp_get_all_hashtag( + mel_promise, + inputSelector = '#workspace-hashtag', + containerSelector = '#list-of-all-hashtag', +) { + const val = $(inputSelector).val(); + if (val.length > 0) { + let querry = $(containerSelector).css('display', ''); + querry.parent().attr('data-visible', true); + querry.html('
    '); - if (mel_promise.isCancelled()) return; + if (mel_promise.isCancelled()) return; - await mel_promise.create_ajax_get_request( - { - url:mel_metapage.Functions.url("workspace", "hashtag"), - success:(datas) => { - try { - if (mel_promise.isCancelled()) return; - - datas = JSON.parse(datas); - if (datas.length > 0) { - html = "
    "; - - for (let index = 0; index < datas.length; ++index) { - const element = datas[index]; - html += ``; - } - - html += "
    "; - if (mel_promise.isCancelled()) return; - querry.html(html); - } else - { - if (mel_promise.isCancelled()) return; - querry.html(`La thématique "${val}" n'existe pas.
    Elle sera créée lors de la création de l'espace de travail.`); - } - - } catch (error) { - - } - } - } - ).always(() => { - rcmail.triggerEvent("onHashtagChange", { input: inputSelector, container: containerSelector }); - }); + await mel_promise + .create_ajax_get_request({ + url: mel_metapage.Functions.url('workspace', 'hashtag'), + success: (datas) => { + try { + if (mel_promise.isCancelled()) return; - mel_promise.onAbort = () => { - ajax.abort(); - }; + datas = JSON.parse(datas); + if (datas.length > 0) { + html = '
    '; - await ajax; + for (let index = 0; index < datas.length; ++index) { + const element = datas[index]; + html += ``; + } - } else - $(containerSelector).css("display", "none"); + html += '
    '; + if (mel_promise.isCancelled()) return; + querry.html(html); + } else { + if (mel_promise.isCancelled()) return; + querry.html( + `La thématique "${val}" n'existe pas.
    Elle sera créée lors de la création de l'espace de travail.`, + ); + } + } catch (error) {} + }, + }) + .always(() => { + rcmail.triggerEvent('onHashtagChange', { + input: inputSelector, + container: containerSelector, + }); + }); - let tmpfunc = (event) => { - m_mp_hashtag_on_click(event, inputSelector, containerSelector); + mel_promise.onAbort = () => { + ajax.abort(); }; - // if (!mel_metapage.Functions.handlerExist($("body"), tmpfunc)) - // $("body").click(tmpfunc); - if (m_mp_get_all_hashtag.handlers === undefined) m_mp_get_all_hashtag.handlers = []; + await ajax; + } else $(containerSelector).css('display', 'none'); - if (m_mp_get_all_hashtag.handlers[containerSelector] === undefined) { - m_mp_get_all_hashtag.handlers[containerSelector] = tmpfunc; - } + let tmpfunc = (event) => { + m_mp_hashtag_on_click(event, inputSelector, containerSelector); + }; - let clickFunction = (event) => { - for (const key in m_mp_get_all_hashtag.handlers) { - if (Object.hasOwnProperty.call(m_mp_get_all_hashtag.handlers, key)) { - const element = m_mp_get_all_hashtag.handlers[key]; + // if (!mel_metapage.Functions.handlerExist($("body"), tmpfunc)) + // $("body").click(tmpfunc); + if (m_mp_get_all_hashtag.handlers === undefined) + m_mp_get_all_hashtag.handlers = []; - if ($(key).css("display") !== "none") { - element(event); - } - } - } - }; + if (m_mp_get_all_hashtag.handlers[containerSelector] === undefined) { + m_mp_get_all_hashtag.handlers[containerSelector] = tmpfunc; + } - if (mel_promise.isCancelled()) return; + let clickFunction = (event) => { + for (const key in m_mp_get_all_hashtag.handlers) { + if (Object.hasOwnProperty.call(m_mp_get_all_hashtag.handlers, key)) { + const element = m_mp_get_all_hashtag.handlers[key]; + + if ($(key).css('display') !== 'none') { + element(event); + } + } + } + }; - if (!mel_metapage.Functions.handlerExist($("body"), clickFunction)) $("body").click(clickFunction); + if (mel_promise.isCancelled()) return; + if (!mel_metapage.Functions.handlerExist($('body'), clickFunction)) + $('body').click(clickFunction); } -function m_mp_hashtag_select(e, inputSelector = '#workspace-hashtag', containerSelector = '#list-of-all-hashtag') { - $(inputSelector).val($(e).find("text").html()); - $(containerSelector).css("display", "none").parent().attr('data-visible', false);; +function m_mp_hashtag_select( + e, + inputSelector = '#workspace-hashtag', + containerSelector = '#list-of-all-hashtag', +) { + $(inputSelector).val($(e).find('text').html()); + $(containerSelector) + .css('display', 'none') + .parent() + .attr('data-visible', false); } function m_mp_hashtag_on_click(event, inputSelector, containerSelector) { - try { - let querry = $(containerSelector); - const id = querry.attr("id"); - const inputId = $(inputSelector).attr("id"); - - if (querry.css("display") !== "none" && querry.find(".spinner-border").length === 0) { - let target = event.target; - while (target.nodeName !== "BODY") { - if (target.id === id || target.id === inputId) { - return; - } else - target = target.parentElement; - } - querry.css("display", "none").parent().attr('data-visible', false); - } - } catch (error) {} + try { + let querry = $(containerSelector); + const id = querry.attr('id'); + const inputId = $(inputSelector).attr('id'); + + if ( + querry.css('display') !== 'none' && + querry.find('.spinner-border').length === 0 + ) { + let target = event.target; + while (target.nodeName !== 'BODY') { + if (target.id === id || target.id === inputId) { + return; + } else target = target.parentElement; + } + querry.css('display', 'none').parent().attr('data-visible', false); + } + } catch (error) {} } -function m_mp_autocomplete(element, force = false) -{ - element = element.val === undefined ? $(element) : element; +function m_mp_autocomplete(element, force = false) { + element = element.val === undefined ? $(element) : element; - let val = element.val(); - const defaultValue = val; + let val = element.val(); + const defaultValue = val; - m_mp_autocomplete_startup(element, val); + m_mp_autocomplete_startup(element, val); - if ((val.includes(',') || force) && val.includes('@')) - { - val = val.replaceAll(',', ''); - - let email = ''; - let name = ''; - if (val.includes('<') && val.includes('>')) - { - val = val.split('<'); - name = val[0]; - email = val[1].replace('>', ''); - } - else email = name = val; + if ((val.includes(',') || force) && val.includes('@')) { + val = val.replaceAll(',', ''); - html = '
  • '; - html += `${email}`; - html += `${name}`; - html += ''; - html += '
  • '; + let email = ''; + let name = ''; + if (val.includes('<') && val.includes('>')) { + val = val.split('<'); + name = val[0]; + email = val[1].replace('>', ''); + } else email = name = val; - html = $(html); + html = '
  • '; + html += ``; + html += `${name}`; + html += ''; + html += '
  • '; - const remove = () => { - html.remove(); - }; + html = $(html); - html.attr('title', email).find('span').click(() => { - element.val(defaultValue.replace(',', '')); - remove(); - element.focus(); - }); + const remove = () => { + html.remove(); + }; - html.find('a').click(() => { - remove(); - }); + html + .attr('title', email) + .find('span') + .click(() => { + element.val(defaultValue.replace(',', '')); + remove(); + element.focus(); + }); + + html.find('a').click(() => { + remove(); + }); - element.parent().parent().prepend(html); + element.parent().parent().prepend(html); - element.val(''); - } + element.val(''); + } - return element; + return element; } -function m_mp_autocomplete_startup($element, val = '') -{ - if ($element.parent().length > 0 && $element.parent()[0].nodeName !== 'LI') - { - let $parent = $element.parent(); +function m_mp_autocomplete_startup($element, val = '') { + if ($element.parent().length > 0 && $element.parent()[0].nodeName !== 'LI') { + let $parent = $element.parent(); - let $div = $(`
    + let $div = $(`
    • @@ -1172,68 +1657,86 @@ function m_mp_autocomplete_startup($element, val = '')
    `); - $element.on('change', (e) => { - m_mp_autocomplete(e.currentTarget); - }).on('input', (e) => { - m_mp_autocomplete(e.currentTarget); - }).on('focusout', (e) => { - m_mp_autocomplete(e.currentTarget, true); - }).appendTo( $div.find('ul .input')).val(val); - - top.rcmail.init_address_input_events($element); - - $('') - .appendTo($div.find('.input-group-append')) - .click((e) => { - m_mp_openTo(e.currentTarget, $element.attr('id')); - }); + $element + .on('change', (e) => { + m_mp_autocomplete(e.currentTarget); + }) + .on('input', (e) => { + m_mp_autocomplete(e.currentTarget); + }) + .on('focusout', (e) => { + m_mp_autocomplete(e.currentTarget, true); + }) + .appendTo($div.find('ul .input')) + .val(val); + + top.rcmail.init_address_input_events($element); + + $( + '', + ) + .appendTo($div.find('.input-group-append')) + .click((e) => { + m_mp_openTo(e.currentTarget, $element.attr('id')); + }); - $parent.append($div); + $parent.append($div); - return $parent; - } + return $parent; + } } function m_mp_autocoplete(element, action_after = null, append = true) { - element = element.val === undefined ? ("#" + element.id) : ("#" + element[0].id); - - let val = $(element).val(); - - if (val.includes(',')) { - val = val.replace(",", ""); - let html = '
  • '; - if (val.includes("<") && val.includes(">")) { - let _enum = Enumerable.from(val); - let index1 = val.indexOf("<"); - let index2 = val.indexOf(">"); - //console.log(val, _enum); - //.where((x, i) => i > index2).toArray().splice(1).join("").replace(",", "") - html += ''; //.join("") - html += '' + _enum.where((x, i) => i < index1).toArray().join("").replace(",", "") + ''; + element = element.val === undefined ? '#' + element.id : '#' + element[0].id; + + let val = $(element).val(); + + if (val.includes(',')) { + val = val.replace(',', ''); + let html = '
  • '; + if (val.includes('<') && val.includes('>')) { + let _enum = Enumerable.from(val); + let index1 = val.indexOf('<'); + let index2 = val.indexOf('>'); + //console.log(val, _enum); + //.where((x, i) => i > index2).toArray().splice(1).join("").replace(",", "") + html += + ''; //.join("") + html += + '' + + _enum + .where((x, i) => i < index1) + .toArray() + .join('') + .replace(',', '') + + ''; + } else { + html += '' + val + ''; + html += ''; + } + html += ''; + html += '
  • '; - } else { - html += '' + val + ''; - html += '' + val + '' - } - html += ''; - html += ""; - - if (append === true) { - $("#wspf").append(html); - $(element).val(""); - //console.log("html", $($("#wspf").children()[$("#wspf").children().length-1])[0].outerHTML, $(element).parent()[0].outerHTML); - html = $(element).parent()[0].outerHTML; - console.log($(element).parent()); - //$(element).parent().remove(); - rcmail.init_address_input_events($(element)); - $(element).focus(); - } + if (append === true) { + $('#wspf').append(html); + $(element).val(''); + //console.log("html", $($("#wspf").children()[$("#wspf").children().length-1])[0].outerHTML, $(element).parent()[0].outerHTML); + html = $(element).parent()[0].outerHTML; + console.log($(element).parent()); + //$(element).parent().remove(); + rcmail.init_address_input_events($(element)); + $(element).focus(); + } //console.log("auto", $(element).val(), html, append, element); - if (append === true) - { - $("#wspf").append(html); - $(element).val(""); + if (append === true) { + $('#wspf').append(html); + $(element).val(''); html = $(element).parent()[0].outerHTML; @@ -1244,242 +1747,269 @@ function m_mp_autocoplete(element, action_after = null, append = true) { if (action_after !== null) { action_after({ - $element:$(element), - val + $element: $(element), + val, }); } -} + } } function m_mp_add_users() { let users = []; - $("#wspf .workspace-recipient").each((i, e) => { - users.push($(e).find(".email").html()); + $('#wspf .workspace-recipient').each((i, e) => { + users.push($(e).find('.email').html()); }); - let input = $("#_workspace-user-list"); + let input = $('#_workspace-user-list'); if (input.val().length > 0) - users.push(input.val().includes('<') ? input.val().split('<')[1].split('>')[0] : input.val()); + users.push( + input.val().includes('<') + ? input.val().split('<')[1].split('>')[0] + : input.val(), + ); - input.val(""); + input.val(''); - $("#wspf .workspace-recipient").each((i, e) => { + $('#wspf .workspace-recipient').each((i, e) => { $(e).remove(); }); if (users.length > 0) { - $("#mm-wsp-loading").css("display", ""); - return mel_metapage.Functions.post( - mel_metapage.Functions.url("mel_metapage", "check_users"), - { - _users: users - }, - (datas) => { - datas = JSON.parse(datas); - let html; - let querry = $("#mm-cw-participants").css("height", `${window.innerHeight - 442}`); - for (let index = 0; index < datas.added.length; ++index) { - const element = datas.added[index]; - html = "
  • "; - html += "
    "; - html += '
    '; - html += `
    `; - html += "
    "; - html += '
    '; - html += `${element.name}
    `; - html += ``; - html += ``; - html += "
    "; - html += "
  • "; - querry.append(html); - } - for (let it = 0; it < datas.unexist.length; it++) { - const element = datas.unexist[it]; - rcmail.display_message("impossible d'ajouter " + element + " à l'espace de travail !"); - } + $('#mm-wsp-loading').css('display', ''); + return mel_metapage.Functions.post( + mel_metapage.Functions.url('mel_metapage', 'check_users'), + { + _users: users, + }, + (datas) => { + datas = JSON.parse(datas); + let html; + let querry = $('#mm-cw-participants').css( + 'height', + `${window.innerHeight - 442}`, + ); + + /** + * Ajouter un utilisateur + * @param {*} element + */ + function addUser(element) { + html = '
  • '; + html += '
    '; + html += '
    '; + html += `
    `; + html += '
    '; + html += `
    `; + html += `${element.name}
    `; + html += ``; + html += + ''; + html += '
    '; + html += '
  • '; + + querry.append(html); } - ).always(() => { - $("#mm-wsp-loading").css("display", "none"); - }); - } + + // Utilisateurs internes + for (let index = 0; index < datas.added.length; ++index) { + addUser(datas.added[index]); + } + + // Utilisateurs externes + for (let index = 0; index < datas.externs.length; ++index) { + addUser(datas.externs[index]); + } + + // Utilisateurs non trouvés + for (let it = 0; it < datas.unexist.length; it++) { + const element = datas.unexist[it]; + rcmail.display_message( + "impossible d'ajouter " + element + " à l'espace de travail !", + ); + } + }, + ).always(() => { + $('#mm-wsp-loading').css('display', 'none'); + }); + } } function m_mp_remove_user(e) { - $(e).parent().parent().parent().remove(); + $(e).parent().parent().parent().remove(); } function m_mp_remove_li(event) { - $(event).parent().remove(); - $("#_workspace-user-list").focus(); + $(event).parent().remove(); + $('#_workspace-user-list').focus(); } // function m_mp_open_contact(e, idInput, actions = null) // { - + // } function m_mp_openTo(e, idInput, actions = null) { - if ($('#compose-contacts').length === 0 || (parent !== window && (window.mmp_open_contact === undefined || window.mmp_open_contact[idInput] === undefined))) { - new Promise(async() => { - let list = await rcmail.env.mel_metapage_call_parsed.contact_list(); - ($("#layout").length === 0 ? $('body') : $("#layout")).append(list); - list = null; - $("head").append(``); - $("head").append(``) - .append(``); - setTimeout(() => { - rcmail.gui_objects.annuaire_list = $("#annuaire-list")[0]; - if (rcmail.gui_objects.annuaire_list && - window.rcube_treelist_widget) { - rcmail.annuaire_list = new rcube_treelist_widget( - rcmail.gui_objects.annuaire_list, { - selectable: true, - id_prefix: 'rcmrow' - }); - - rcmail.annuaire_list - .addEventListener('expand', function(node) { - rcmail.annuaire_folder_expand(node) - }) - .addEventListener('beforeselect', function(node) { - return !$('#rcmrow' + node.id).hasClass('folder') && !$('#rcmrow' + node.id).hasClass('legend'); - // return !$('#rcmrow' + node.id).hasClass('legend'); - }) - .addEventListener('select', function(node) { - rcmail.annuaire_node_select(node) - - if (!!actions && !!actions.onselect) actions.onselect(node, idInput); - }); - - if (rcmail.env.annuaire_list) { - rcmail.annuaire_list_fill_list(null, - rcmail.env.annuaire_list); - } - //console.log("timeout lunched"); - } - setTimeout(() => { - if (window.mmp_open_contact === undefined) - window.mmp_open_contact = {}; - window.mmp_open_contact[idInput] = true; - m_mp_openTo(e, idInput); - }, 100); - }, 100); - }); - return; - } - - if (rcmail.env.action !== "compose") { - if (!$(e).hasClass("initialized")) { - $(e).addClass("showcontacts")[0].id = `showcontacts_${idInput}`; - setTimeout(() => { - rcmail.annuaire_set_show_contacts(); - setTimeout(() => { - $(e).click(); - }, 100); - }, 100); - - $("#compose-contact-close-modal").click(() => { - $("#compose-contacts").modal("hide"); - - }); - - $("#compose-contacts").on("hide.bs.modal", () => { - if (window.create_popUp !== undefined) - create_popUp.modal.css("z-index", ""); - else if ($("#globalModal").length > 0) - $("#globalModal").css("z-index", ""); - - if (rcmail.env.task === 'calendar') $('.ui-dialog').css("display", ''); - delete rcmail.env.annuaire_select_actions; + if ( + $('#compose-contacts').length === 0 || + (parent !== window && + (window.mmp_open_contact === undefined || + window.mmp_open_contact[idInput] === undefined)) + ) { + new Promise(async () => { + let list = await rcmail.env.mel_metapage_call_parsed.contact_list(); + ($('#layout').length === 0 ? $('body') : $('#layout')).append(list); + list = null; + $('head').append( + '', + ); + $('head') + .append('') + .append( + '', + ); + setTimeout(() => { + rcmail.gui_objects.annuaire_list = $('#annuaire-list')[0]; + if (rcmail.gui_objects.annuaire_list && window.rcube_treelist_widget) { + rcmail.annuaire_list = new rcube_treelist_widget( + rcmail.gui_objects.annuaire_list, + { + selectable: true, + id_prefix: 'rcmrow', + }, + ); + + rcmail.annuaire_list + .addEventListener('expand', function (node) { + rcmail.annuaire_folder_expand(node); + }) + .addEventListener('beforeselect', function (node) { + return ( + !$('#rcmrow' + node.id).hasClass('folder') && + !$('#rcmrow' + node.id).hasClass('legend') + ); + // return !$('#rcmrow' + node.id).hasClass('legend'); + }) + .addEventListener('select', function (node) { + rcmail.annuaire_node_select(node); + + if (!!actions && !!actions.onselect) + actions.onselect(node, idInput); }); - } - if (!!(actions?.onselect)) - { - if (!rcmail.env.annuaire_select_actions) rcmail.env.annuaire_select_actions = {}; - rcmail.env.annuaire_select_actions.onselect = actions.onselect; + if (rcmail.env.annuaire_list) { + rcmail.annuaire_list_fill_list(null, rcmail.env.annuaire_list); + } + //console.log("timeout lunched"); } - - } + setTimeout(() => { + if (window.mmp_open_contact === undefined) + window.mmp_open_contact = {}; + window.mmp_open_contact[idInput] = true; + m_mp_openTo(e, idInput); + }, 100); + }, 100); + }); + return; + } - if (window.create_popUp !== undefined) - create_popUp.modal.css("z-index", 1); - else if ($("#globalModal").length > 0) - $("#globalModal").css("z-index", 1); + if (rcmail.env.action !== 'compose') { + if (!$(e).hasClass('initialized')) { + $(e).addClass('showcontacts')[0].id = `showcontacts_${idInput}`; + setTimeout(() => { + rcmail.annuaire_set_show_contacts(); + setTimeout(() => { + $(e).click(); + }, 100); + }, 100); - if (rcmail.env.task === 'calendar') $('.ui-dialog').css("display", 'none'); + $('#compose-contact-close-modal').click(() => { + $('#compose-contacts').modal('hide'); + }); + $('#compose-contacts').on('hide.bs.modal', () => { + if (window.create_popUp !== undefined) + create_popUp.modal.css('z-index', ''); + else if ($('#globalModal').length > 0) + $('#globalModal').css('z-index', ''); -} - -function m_mp_on_open_select_calendar_contacts(node, node_id, fieldId) -{ - console.log(node, fieldId); + if (rcmail.env.task === 'calendar') $('.ui-dialog').css('display', ''); + delete rcmail.env.annuaire_select_actions; + }); + } - if (!!node.email && !!rcmail.env.email && node.email === rcmail.env.email) - { - rcmail.display_message('Vous êtes déjà l\'organisateur !', 'error'); - $('#rcmrow' + node_id).removeClass('added'); + if (actions?.onselect) { + if (!rcmail.env.annuaire_select_actions) + rcmail.env.annuaire_select_actions = {}; + rcmail.env.annuaire_select_actions.onselect = actions.onselect; } - else { - let can = true; - let title = ''; - $('#edit-attendees-table .attendee-name span').each((i,e) => { - if (can) - { - title = $(e).attr('title'); + } - if (title === node.email) can = false; - } - }); + if (window.create_popUp !== undefined) create_popUp.modal.css('z-index', 1); + else if ($('#globalModal').length > 0) $('#globalModal').css('z-index', 1); - if (node.classes.includes('list')){ - rcmail.display_message('Chargement de la liste...'); - } - else { - if (can) - { - $(`#edit-attendee-add`).click(); - $('#compose-contact-close-modal').click(); - } - else { - rcmail.display_message('Vous avez déjà ajouté cet utilisateur !', 'error'); - $('#rcmrow' + node_id).removeClass('added'); - } - } + if (rcmail.env.task === 'calendar') $('.ui-dialog').css('display', 'none'); +} +function m_mp_on_open_select_calendar_contacts(node, node_id, fieldId) { + console.log(node, fieldId); - } + if (!!node.email && !!rcmail.env.email && node.email === rcmail.env.email) { + rcmail.display_message("Vous êtes déjà l'organisateur !", 'error'); + $('#rcmrow' + node_id).removeClass('added'); + } else { + let can = true; + let title = ''; + $('#edit-attendees-table .attendee-name span').each((i, e) => { + if (can) { + title = $(e).attr('title'); + if (title === node.email) can = false; + } + }); + if (node.classes.includes('list')) { + rcmail.display_message('Chargement de la liste...'); + } else { + if (can) { + $('#edit-attendee-add').click(); + $('#compose-contact-close-modal').click(); + } else { + rcmail.display_message( + 'Vous avez déjà ajouté cet utilisateur !', + 'error', + ); + $('#rcmrow' + node_id).removeClass('added'); + } + } + } } function m_mp_reinitialize_popup(funcBefore = null, funcAfter = null) { - if (rcmail.busy === true) - return; + if (rcmail.busy === true) return; - if ($("html").hasClass("layout-phone") || $("html").hasClass("layout-small")) { - m_mp_Create(); - return; - } - - if (funcBefore !== null) - funcBefore(); - if (window.create_popUp !== undefined) - window.create_popUp.removeBeforeTitle() - delete window.create_popUp; // = undefined; - $(".global-modal-body").css("height", ""); + if ( + $('html').hasClass('layout-phone') || + $('html').hasClass('layout-small') + ) { m_mp_Create(); - if (funcAfter !== null) - funcAfter(); + return; + } + + if (funcBefore !== null) funcBefore(); + if (window.create_popUp !== undefined) + window.create_popUp.removeBeforeTitle(); + delete window.create_popUp; // = undefined; + $('.global-modal-body').css('height', ''); + m_mp_Create(); + if (funcAfter !== null) funcAfter(); } function m_mp_switch_step(id) { - $(".step").css("display", "none"); - $("#" + id).css("display", ""); + $('.step').css('display', 'none'); + $('#' + id).css('display', ''); - create_popUp.modal.focus(); + create_popUp.modal.focus(); } /** @@ -1490,129 +2020,204 @@ function m_mp_switch_step(id) { * Affiche la modale du bouton "créer". */ function m_mp_Help() { - FullscreenItem.close_if_exist(); - - window.help_popUp = undefined; - window.create_popUp = undefined; - - const actions = { - helppage_general: get_action("mel_metapage.h_general", "icon-mel-help", "window.open('" + rcmail.env.help_page + "', '_blank');"), - helppage_video: get_action("mel_metapage.h_video", "icon-mel-camera", "m_mp_help_video()"), - helppage_suggestion: get_action("mel_metapage.h_suggestion", "icon-mel-notes", ``), - helppage_current: get_action("mel_metapage.h_current", "icon-mel-newspaper", "rcmail.current_page_onboarding((m_mp_DecodeUrl().task).replace('#',''))") - }; - - const isSmall = $("html").hasClass("layout-small") || $("html").hasClass("layout-phone"); - - const isTouch = $("html").hasClass("touch"); - - if (window.create_event === true && !!actions.event) { - eval(actions.event.action); - return; - } + FullscreenItem.close_if_exist(); + + window.help_popUp = undefined; + window.create_popUp = undefined; + + const actions = { + helppage_general: get_action( + 'mel_metapage.h_general', + 'icon-mel-help', + "window.open('" + rcmail.env.help_page + "', '_blank');", + ), + helppage_video: get_action( + 'mel_metapage.h_video', + 'icon-mel-camera', + 'm_mp_help_video()', + ), + helppage_suggestion: get_action( + 'mel_metapage.h_suggestion', + 'icon-mel-notes', + '', + ), + helppage_current: get_action( + 'mel_metapage.h_current', + 'icon-mel-newspaper', + "rcmail.current_page_onboarding((m_mp_DecodeUrl().task).replace('#',''))", + ), + }; + + const isSmall = + $('html').hasClass('layout-small') || $('html').hasClass('layout-phone'); + + const isTouch = $('html').hasClass('touch'); + + if (window.create_event === true && !!actions.event) { + eval(actions.event.action); + return; + } - //Si la popup n'existe pas, on la créer. - if (window.help_popUp === undefined) { - // Récupération du json - fetch(window.location.pathname + 'plugins/mel_help/public/help.json', { credentials: "include", cache: "no-cache" }).then((res) => { - res.json().then((help_array) => { - - // Génération de l'index - let index = []; - help_array.forEach((help, k) => { - help.keywords.forEach(word => { - if (index[word]) { - if (index[word] != k) { - index[word].push(k); - } - } else { - index[word] = [k] - } - }); - }); - - // Positionnement des variables d'env - rcmail.env.help_array = help_array; - rcmail.env.help_index = index; - }); + //Si la popup n'existe pas, on la créer. + if (window.help_popUp === undefined) { + // Récupération du json + fetch(window.location.pathname + 'plugins/mel_help/public/help.json', { + credentials: 'include', + cache: 'no-cache', + }).then((res) => { + res.json().then((help_array) => { + // Génération de l'index + let index = []; + help_array.forEach((help, k) => { + help.keywords.forEach((word) => { + if (index[word]) { + if (index[word] != k) { + index[word].push(k); + } + } else { + index[word] = [k]; + } + }); }); - let button = function(txt, font, click = "", external) { - let disabled = click === "" ? "disabled" : ""; - let external_logo = external === true ? '' : ""; - return ''; - } - const _button = function(action, block = true, external = false) { - return button(action.text, `${action.icon} ${block ? "block" : ""}`, action.action, external); - } - let helppage_general = `
  • ` + _button(actions.helppage_general, true, true) + '
  • ' - let helppage_video = `
  • ` + _button(actions.helppage_video) + '
  • ' - let helppage_suggestion = `
  • ` + _button(actions.helppage_suggestion, true, false) + '
  • ' - let helppage_current = ""; - if (rcmail.env.help_page_onboarding[(m_mp_DecodeUrl().task).replace('#','')] && !isTouch) { - helppage_current = `
  • ` + _button(actions.helppage_current, false) + "
  • "; - } + // Positionnement des variables d'env + rcmail.env.help_array = help_array; + rcmail.env.help_index = index; + }); + }); + let button = function (txt, font, click = '', external) { + let disabled = click === '' ? 'disabled' : ''; + let external_logo = + external === true + ? '' + : ''; + return ( + '' + ); + }; + const _button = function (action, block = true, external = false) { + return button( + action.text, + `${action.icon} ${block ? 'block' : ''}`, + action.action, + external, + ); + }; - let html = "
    "; - html += ''; - html += '
    '; - html += ''; - html += ''; - html += '
    '; - html += ''; - html += "
    " - html += '
    ' - html += '
    ' - - html += ''; - let config = new GlobalModalConfig(rcmail.gettext("mel_metapage.assistance"), "default", html, ' '); - help_popUp = new GlobalModal("globalModal", config, !isSmall); - help_popUp.contents.find('#helppage_suggestion button').click(() => { - mel_metapage.Functions.change_page(rcmail.env.help_suggestion_url.task, rcmail.env.help_suggestion_url.action); - help_popUp.close(); - }).removeClass('disabled').removeAttr('disabled'); - - rcmail.triggerEvent('on_create_window.matomo'); - - - } else if (!isSmall) //Si elle existe, on l'affiche. - { - window.help_popUp.show(); + let helppage_general = + `
  • ` + + _button(actions.helppage_general, true, true) + + '
  • '; + let helppage_video = + `
  • ` + + _button(actions.helppage_video) + + '
  • '; + let helppage_suggestion = + `
  • ` + + _button(actions.helppage_suggestion, true, false) + + '
  • '; + let helppage_current = ''; + if ( + rcmail.env.help_page_onboarding[m_mp_DecodeUrl().task.replace('#', '')] && + !isTouch + ) { + helppage_current = + `
  • ` + + _button(actions.helppage_current, false) + + '
  • '; } - if ($("#globallist").length > 0 && !isSmall) { - $("#globalModal .icon-mel-undo.mel-return").remove(); - } + let html = "
    "; + html += + ''; + html += '
    '; + html += + ''; + html += + ''; + html += '
    '; + html += ''; + html += '
    '; + html += '
    '; + html += '
    '; + + html += + ''; + let config = new GlobalModalConfig( + rcmail.gettext('mel_metapage.assistance'), + 'default', + html, + ' ', + ); + help_popUp = new GlobalModal('globalModal', config, !isSmall); + help_popUp.contents + .find('#helppage_suggestion button') + .click(() => { + mel_metapage.Functions.change_page( + rcmail.env.help_suggestion_url.task, + rcmail.env.help_suggestion_url.action, + ); + help_popUp.close(); + }) + .removeClass('disabled') + .removeAttr('disabled'); + + rcmail.triggerEvent('on_create_window.matomo'); + } else if (!isSmall) { + //Si elle existe, on l'affiche. + window.help_popUp.show(); + } + + if ($('#globallist').length > 0 && !isSmall) { + $('#globalModal .icon-mel-undo.mel-return').remove(); + } - if (isSmall) { - if (!$("#groupoptions-createthings").hasClass("initialized")) { - for (const key in actions) { - if (Object.hasOwnProperty.call(actions, key)) { - //On cache l'onboarding sur mobile - if (key !== 'helppage_current') { - const element = actions[key]; - $("#ul-createthings").append(` + if (isSmall) { + if (!$('#groupoptions-createthings').hasClass('initialized')) { + for (const key in actions) { + if (Object.hasOwnProperty.call(actions, key)) { + //On cache l'onboarding sur mobile + if (key !== 'helppage_current') { + const element = actions[key]; + $('#ul-createthings').append(`
  • ${element.text}
  • `); - } } } - - $("#groupoptions-createthings").addClass("initialized") - } - window.help_popUp.close(); - - setTimeout(() => { - $("#open-created-popup").click(); - }, 1); + $('#groupoptions-createthings').addClass('initialized'); } + window.help_popUp.close(); + + setTimeout(() => { + $('#open-created-popup').click(); + }, 1); } +} // Ancienne fonction d'aide // function m_mp_Help() { @@ -1635,96 +2240,126 @@ function m_mp_Help() { // }, 10); // } -/** +/** * Affiche la liste des vidéos d'assistance */ function m_mp_help_video() { - try { - // Génération de l'index - let index = []; - let k = -1; - for (const [key, element] of Object.entries(rcmail.env.help_video)) { - k++ - let keywords = element.description + ' ' + element.title; - let array = keywords.split(' '); - - array.forEach(word => { - if (index[word]) { - if (index[word] != k) { - index[word].push(k); - } - } else { - index[word] = [k] - } - }); - } - - rcmail.triggerEvent('on_click_button.matomo', 'Aide - Voir les vidéos'); - - // Positionnement des variables d'env - rcmail.env.video_index = index; - - let html = ''; - html += ''; - - - - html += '
    ' - html += '
    ' - - html += ''; - - help_popUp.contents.html(html); + }); + } - help_popUp.editTitleAndSetBeforeTitle('Retour à la modale de création', - 'Vidéos du bureau numérique'); + rcmail.triggerEvent('on_click_button.matomo', 'Aide - Voir les vidéos'); + + // Positionnement des variables d'env + rcmail.env.video_index = index; + + let html = + ''; + html += + ''; + + html += '
    '; + html += '
    '; + + html += ''; + help_popUp.contents.html(html); - help_popUp.modal.focus(); - help_popUp.show(); + help_popUp.editTitleAndSetBeforeTitle( + 'Retour à la modale de création', + 'Vidéos du bureau numérique', + ); - } catch (error) { - console.error(error); - } + help_popUp.modal.focus(); + help_popUp.show(); + } catch (error) { + console.error(error); + } } -/** +/** * Affiche une vidéo d'assistance */ -rcube_webmail.prototype.m_mp_help_video_player = function(task) { - try { - help = rcmail.env.help_video[task]; - let html = '
    ' - html += '

    ' + help.title + '

    ' + help.description + '

    '; - - html += '' - - help_popUp.contents.html(html); - - help_popUp.editTitleAndSetBeforeTitle('Retour à la modale de création', help.title); - - - help_popUp.modal.focus(); - help_popUp.show(); - - $("#globalModal").on("hide.bs.modal", function(e) { - let video = document.getElementById("help_video"); - video.pause(); - }); - } catch (error) { - console.error(error); - } -} +rcube_webmail.prototype.m_mp_help_video_player = function (task) { + try { + help = rcmail.env.help_video[task]; + let html = '
    '; + html += + '

    ' + + help.title + + '

    ' + + help.description + + '

    '; + + html += ''; + + help_popUp.contents.html(html); + + help_popUp.editTitleAndSetBeforeTitle( + 'Retour à la modale de création', + help.title, + ); + + help_popUp.modal.focus(); + help_popUp.show(); + + $('#globalModal').on('hide.bs.modal', function (e) { + let video = document.getElementById('help_video'); + video.pause(); + }); + } catch (error) { + console.error(error); + } +}; /** * Change l'icône en classe en fonction du type. @@ -1733,7 +2368,7 @@ rcube_webmail.prototype.m_mp_help_video_player = function(task) { * @returns {string} Classe. */ function m_mp_CreateDocumentIconContract(icon, type) { - return nextcloud_document.getIcon(icon, type); + return nextcloud_document.getIcon(icon, type); } /** @@ -1741,90 +2376,144 @@ function m_mp_CreateDocumentIconContract(icon, type) { * Affiche les données pour créer un document dans la modale de création. */ async function m_mp_InitializeDocument(initPath = null) { - rcmail.triggerEvent('on_click_button.matomo', 'Créer - Un document'); - - create_popUp.editTitleAndSetBeforeTitle('Retour à la modale de création', 'Création d\'un nouveau document'); - create_popUp.contents.html('
    '); - - let url_config = { - "_send": true - }; - - if (initPath !== null) - url_config["_initPath"] = initPath; - - url_config[rcmail.env.mel_metapage_const.key] = rcmail.env.mel_metapage_const.value; - - $(``).on("load", async() => { - create_popUp.contents.find(".spinner-border").parent().remove(); - let iframe = create_popUp.contents.find("iframe").css("display", ""); - - if ($("html").hasClass("layout-normal") || $("html").hasClass("layout-large")) { - let it = 0; - await wait(() => { - - if (++it > 4) - return false; - - return iframe[0].contentWindow.$("#roundrive-elements .col-md-3").length == 0; - }); - iframe[0].contentWindow.$("#roundrive-elements .col-md-3").removeClass('col-md-3').addClass('col-3'); - } - //console.log("iframe", iframe, iframe[0].contentWindow.$("#roundrive-elements .col-md-3")); - - $(".global-modal-body").css("height", `${window.innerHeight - 200}px`).css("overflow-y", "auto").css("overflow-x", "hidden"); - }).appendTo(create_popUp.contents); - create_popUp.show(); - // mel_metapage.Functions.get( - // mel_metapage.Functions.url("roundrive", "files_create"), - // { - // _send:false - // },(datas) => { - // create_popUp.contents.html(datas); - // } - // ) - - return; - //window.create_popUp = new GlobalModal("globalModal", config, true); - //$this->rc->config->get('documents_types'); - let html = "
    "; - html += ""; - html += "
    " - let col = 0; //rcmail.env.mel_metapage_templates_doc.length/5; - let ret = 0; - for (let index = 0; index < rcmail.env.mel_metapage_templates_doc.length; index++) { - const element = rcmail.env.mel_metapage_templates_doc[index]; - html += '
    '; - } - html += "
    "; - html += ""; - html += '
    '; - html += '' - html += "
    "; - html += ""; - html += '
    '; - html += ``; - html += ''; - html += '
    '; - html += '.'; - html += ''; - html += '
    ' - html += '
    '; - html += ''; - html += '' - html += "
    "; - create_popUp.contents.html(html); - $(".doc-" + rcmail.env.mel_metapage_templates_doc[0].type)[0].click(); - /* + rcmail.triggerEvent('on_click_button.matomo', 'Créer - Un document'); + + create_popUp.editTitleAndSetBeforeTitle( + 'Retour à la modale de création', + "Création d'un nouveau document", + ); + create_popUp.contents.html( + '
    ', + ); + + let url_config = { + _send: true, + }; + + if (initPath !== null) url_config['_initPath'] = initPath; + + url_config[rcmail.env.mel_metapage_const.key] = + rcmail.env.mel_metapage_const.value; + + $( + ``, + ) + .on('load', async () => { + create_popUp.contents.find('.spinner-border').parent().remove(); + let iframe = create_popUp.contents.find('iframe').css('display', ''); + + if ( + $('html').hasClass('layout-normal') || + $('html').hasClass('layout-large') + ) { + let it = 0; + await wait(() => { + if (++it > 4) return false; + + return ( + iframe[0].contentWindow.$('#roundrive-elements .col-md-3').length == + 0 + ); + }); + iframe[0].contentWindow + .$('#roundrive-elements .col-md-3') + .removeClass('col-md-3') + .addClass('col-3'); + } + //console.log("iframe", iframe, iframe[0].contentWindow.$("#roundrive-elements .col-md-3")); + + $('.global-modal-body') + .css('height', `${window.innerHeight - 200}px`) + .css('overflow-y', 'auto') + .css('overflow-x', 'hidden'); + }) + .appendTo(create_popUp.contents); + create_popUp.show(); + // mel_metapage.Functions.get( + // mel_metapage.Functions.url("roundrive", "files_create"), + // { + // _send:false + // },(datas) => { + // create_popUp.contents.html(datas); + // } + // ) + + return; + //window.create_popUp = new GlobalModal("globalModal", config, true); + //$this->rc->config->get('documents_types'); + let html = '
    '; + html += + ''; + html += '
    '; + let col = 0; //rcmail.env.mel_metapage_templates_doc.length/5; + let ret = 0; + for ( + let index = 0; + index < rcmail.env.mel_metapage_templates_doc.length; + index++ + ) { + const element = rcmail.env.mel_metapage_templates_doc[index]; + html += + '
    '; + } + html += '
    '; + html += + ''; + html += '
    '; + html += + ''; + html += '
    '; + html += ''; + html += '
    '; + html += + ''; + html += + ''; + html += '
    '; + html += '.'; + html += + ''; + html += '
    '; + html += '
    '; + html += + ''; + html += + ''; + html += '
    '; + create_popUp.contents.html(html); + $('.doc-' + rcmail.env.mel_metapage_templates_doc[0].type)[0].click(); + /* POST https://mel.din.developpement-durable.gouv.fr/mdrive/index.php/apps/richdocuments/ajax/documents/create mimetype "application/vnd.oasis.opendocument.text" filename "Test.odt" @@ -1837,235 +2526,368 @@ dir "/" * @param {string} json Données à traité. */ function m_mp_UpdateCreateDoc(json) { - json = JSON.parse(json.replace(/¤¤¤/g, '"')); - let querry = $(".doc-" + json.type); - $(".btn-template-doc").removeClass("disabled").removeClass("active"); - querry.addClass("active").addClass("disabled"); - $("#" + mel_metapage.Ids.create.doc_input_hidden).val(JSON.stringify(json)); - $("#" + mel_metapage.Ids.create.doc_input).attr("placeholder", (json.tags !== undefined && json.tags.includes("f") ? rcmail.gettext("mel_metapage.new_f") : rcmail.gettext("mel_metapage.new_n")) + " " + (rcmail.gettext("mel_metapage." + json.name)).toLowerCase()); - $("#" + mel_metapage.Ids.create.doc_input_ext).attr("placeholder", json.default_ext); - if (json.tags !== undefined && json.tags.includes("l")) - $("#" + mel_metapage.Ids.create.doc_input_ext).removeClass("disabled").removeAttr("disabled"); - else - $("#" + mel_metapage.Ids.create.doc_input_ext).addClass("disabled").attr("disabled", "disabled"); - - show_models_input(json.name) - + json = JSON.parse(json.replace(/¤¤¤/g, '"')); + let querry = $('.doc-' + json.type); + $('.btn-template-doc').removeClass('disabled').removeClass('active'); + querry.addClass('active').addClass('disabled'); + $('#' + mel_metapage.Ids.create.doc_input_hidden).val(JSON.stringify(json)); + $('#' + mel_metapage.Ids.create.doc_input).attr( + 'placeholder', + (json.tags !== undefined && json.tags.includes('f') + ? rcmail.gettext('mel_metapage.new_f') + : rcmail.gettext('mel_metapage.new_n')) + + ' ' + + rcmail.gettext('mel_metapage.' + json.name).toLowerCase(), + ); + $('#' + mel_metapage.Ids.create.doc_input_ext).attr( + 'placeholder', + json.default_ext, + ); + if (json.tags !== undefined && json.tags.includes('l')) + $('#' + mel_metapage.Ids.create.doc_input_ext) + .removeClass('disabled') + .removeAttr('disabled'); + else + $('#' + mel_metapage.Ids.create.doc_input_ext) + .addClass('disabled') + .attr('disabled', 'disabled'); + + show_models_input(json.name); } function show_models_input(name) { - const models_name = Object.keys(rcmail.env.mel_metapage_templates_models) + const models_name = Object.keys(rcmail.env.mel_metapage_templates_models); let $querry = $('#models-input').html(''); - if (models_name.includes(name)) { - $("#models-inputs-group").show(); + if (models_name.includes(name)) { + $('#models-inputs-group').show(); - for (let i = 0; i < rcmail.env.mel_metapage_templates_models[name].length; i++) { + for ( + let i = 0; + i < rcmail.env.mel_metapage_templates_models[name].length; + i++ + ) { const element = rcmail.env.mel_metapage_templates_models[name][i]; - $querry.append(new Option(rcmail.gettext("mel_metapage." + element.name),element.name)); + $querry.append( + new Option( + rcmail.gettext('mel_metapage.' + element.name), + element.name, + ), + ); } - } - else $("#models-inputs-group").hide() + } else $('#models-inputs-group').hide(); } function m_mp_CreateDocRetour() { - create_popUp = undefined; - m_mp_Create(); + create_popUp = undefined; + m_mp_Create(); } async function m_mp_CreateDoc() { - let configModifier = function(type, value, path, modifiers = null) { - return (config) => { - if (path != null) - path = Nextcloud_File.get_path(path); - config.method = "POST"; - config.body = JSON.stringify({ - mimetype: 'application/' + type, - filename: value, - dir: "/" + (path === null ? "" : path) - }); - if (modifiers !== null && modifiers.length > 0) { - if (modifiers.length === undefined) - config = modifiers(val, path, config); - else if (modifiers.length === 1) - config = modifiers[0](val, path, config); - else { - for (let j = 0; j < modifiers.length; j++) { - const element = modifiers[j]; - config = element(val, path, config); - } - } - } - //'mimetype="application/'+type+'"&filename="'+value+'"&dir="/'+(path === null ? "" : path)+'"'; - return config; - }; - } - let json = JSON.parse($("#" + mel_metapage.Ids.create.doc_input_hidden).val()); - //console.log(json); - if ($("#" + mel_metapage.Ids.create.doc_input).val() === "") - $("#" + mel_metapage.Ids.create.doc_input).val((json.tags !== undefined && json.tags.includes("f") ? "Nouvelle" : "Nouveau") + " " + json.name.toLowerCase()); - if ($("#" + mel_metapage.Ids.create.doc_input_ext).val() === "") - $("#" + mel_metapage.Ids.create.doc_input_ext).val(json.default_ext); - else if ($("#" + mel_metapage.Ids.create.doc_input_ext).val()[0] === ".") - $("#" + mel_metapage.Ids.create.doc_input_ext).val($("#" + mel_metapage.Ids.create.doc_input_ext).val("txt").replace(".", "")); - let val = $("#" + mel_metapage.Ids.create.doc_input).val() + "." + $("#" + mel_metapage.Ids.create.doc_input_ext).val(); - let href = $("#" + mel_metapage.Ids.create.doc_input_path).val(); - if (href === "default") href = null; - //console.log("vall", val, href,$("#" + mel_metapage.Ids.create.doc_input_path).val()); - let nextcloud = new Nextcloud(rcmail.env.nextcloud_username); - if ((await nextcloud.searchDocument(val, null, href)) === undefined) { - create_popUp.contents.html('
    '); { - let embed_datas = { - val: val, - href: href, - path: (href === null ? null : Nextcloud_File.get_path(href)), - json: json - } - if (!await nextcloud_document.createDocument(json.type, nextcloud, embed_datas, configModifier)) { - console.error("Type de fichier inconnu !"); - throw "Type de fichier inconnu !"; - } + let configModifier = function (type, value, path, modifiers = null) { + return (config) => { + if (path != null) path = Nextcloud_File.get_path(path); + config.method = 'POST'; + config.body = JSON.stringify({ + mimetype: 'application/' + type, + filename: value, + dir: '/' + (path === null ? '' : path), + }); + if (modifiers !== null && modifiers.length > 0) { + if (modifiers.length === undefined) + config = modifiers(val, path, config); + else if (modifiers.length === 1) + config = modifiers[0](val, path, config); + else { + for (let j = 0; j < modifiers.length; j++) { + const element = modifiers[j]; + config = element(val, path, config); + } } - - let doc = await nextcloud.searchDocument(val, null, href); - window.create_popUp.close(); - window.create_popUp = undefined; - //console.log(doc, "doc"); - await nextcloud.go(doc); - } else { - window.create_popUp = undefined; - $("#" + mel_metapage.Ids.create.doc_input).css("border-color", "red"); - $("#" + mel_metapage.Ids.create.doc_input + "-div").css("color", "red").html("Le nom " + val + " existe déjà dans ce dossier."); + } + //'mimetype="application/'+type+'"&filename="'+value+'"&dir="/'+(path === null ? "" : path)+'"'; + return config; + }; + }; + let json = JSON.parse( + $('#' + mel_metapage.Ids.create.doc_input_hidden).val(), + ); + //console.log(json); + if ($('#' + mel_metapage.Ids.create.doc_input).val() === '') + $('#' + mel_metapage.Ids.create.doc_input).val( + (json.tags !== undefined && json.tags.includes('f') + ? 'Nouvelle' + : 'Nouveau') + + ' ' + + json.name.toLowerCase(), + ); + if ($('#' + mel_metapage.Ids.create.doc_input_ext).val() === '') + $('#' + mel_metapage.Ids.create.doc_input_ext).val(json.default_ext); + else if ($('#' + mel_metapage.Ids.create.doc_input_ext).val()[0] === '.') + $('#' + mel_metapage.Ids.create.doc_input_ext).val( + $('#' + mel_metapage.Ids.create.doc_input_ext) + .val('txt') + .replace('.', ''), + ); + let val = + $('#' + mel_metapage.Ids.create.doc_input).val() + + '.' + + $('#' + mel_metapage.Ids.create.doc_input_ext).val(); + let href = $('#' + mel_metapage.Ids.create.doc_input_path).val(); + if (href === 'default') href = null; + //console.log("vall", val, href,$("#" + mel_metapage.Ids.create.doc_input_path).val()); + let nextcloud = new Nextcloud(rcmail.env.nextcloud_username); + if ((await nextcloud.searchDocument(val, null, href)) === undefined) { + create_popUp.contents.html( + '
    ', + ); + { + let embed_datas = { + val: val, + href: href, + path: href === null ? null : Nextcloud_File.get_path(href), + json: json, + }; + if ( + !(await nextcloud_document.createDocument( + json.type, + nextcloud, + embed_datas, + configModifier, + )) + ) { + console.error('Type de fichier inconnu !'); + throw 'Type de fichier inconnu !'; + } } - //console.log("nc", await nextcloud.searchDocument(val), val); + + let doc = await nextcloud.searchDocument(val, null, href); + window.create_popUp.close(); + window.create_popUp = undefined; + //console.log(doc, "doc"); + await nextcloud.go(doc); + } else { + window.create_popUp = undefined; + $('#' + mel_metapage.Ids.create.doc_input).css('border-color', 'red'); + $('#' + mel_metapage.Ids.create.doc_input + '-div') + .css('color', 'red') + .html('Le nom ' + val + ' existe déjà dans ce dossier.'); + } + //console.log("nc", await nextcloud.searchDocument(val), val); } async function m_mp_CreateDocCurrent(val = null, close = true) { - let querry = $(".stockage-frame"); - if (val === null) { - if ($("#" + mel_metapage.Ids.create.doc_input).val() === "") - $("#" + mel_metapage.Ids.create.doc_input).val("Nouveau document texte.txt"); - val = $("#" + mel_metapage.Ids.create.doc_input).val(); - } - if (close) { - window.create_popUp.close(); - window.create_popUp = undefined; - } - rcmail.set_busy(true, "loading"); - while (querry.contents().find(".button.new").length === 0) { - await delay(500); - } - rcmail.set_busy(true, "loading"); + let querry = $('.stockage-frame'); + if (val === null) { + if ($('#' + mel_metapage.Ids.create.doc_input).val() === '') + $('#' + mel_metapage.Ids.create.doc_input).val( + 'Nouveau document texte.txt', + ); + val = $('#' + mel_metapage.Ids.create.doc_input).val(); + } + if (close) { + window.create_popUp.close(); + window.create_popUp = undefined; + } + rcmail.set_busy(true, 'loading'); + while (querry.contents().find('.button.new').length === 0) { + await delay(500); + } + rcmail.set_busy(true, 'loading'); - querry.contents().find(".button.new")[0].click(); + querry.contents().find('.button.new')[0].click(); - querry.contents().find(".menuitem").each((i, e) => { - if (e.dataset.filetype !== undefined && e.dataset.filetype === "file") - e.click(); + querry + .contents() + .find('.menuitem') + .each((i, e) => { + if (e.dataset.filetype !== undefined && e.dataset.filetype === 'file') + e.click(); }); - rcmail.set_busy(true, "loading"); - while (!Enumerable.from(querry.contents().find("input")).select(x => x.id).where(x => x.includes("input-file")).any()) { - await delay(500); - } + rcmail.set_busy(true, 'loading'); + while ( + !Enumerable.from(querry.contents().find('input')) + .select((x) => x.id) + .where((x) => x.includes('input-file')) + .any() + ) { + await delay(500); + } - let id = Enumerable.from(querry.contents().find("input")).select(x => x.id).where(x => x.includes("input-file")).first(); - querry.contents().find("#" + id).val(val + (val.includes(".") ? "" : ".txt")); + let id = Enumerable.from(querry.contents().find('input')) + .select((x) => x.id) + .where((x) => x.includes('input-file')) + .first(); + querry + .contents() + .find('#' + id) + .val(val + (val.includes('.') ? '' : '.txt')); + await delay(500); + rcmail.set_busy(true, 'loading'); + if ( + !Enumerable.from(querry.contents().find('div')) + .where( + (x) => + Enumerable.from(x.classList).where((s) => + s.includes('tooltip').any(), + ) && + x.innerHTML.includes(val) && + $(x).parent().hasClass('tooltip'), + ) + .any() + ) + querry + .contents() + .find('#' + id) + .parent() + .find('.icon-confirm') + .click(); + //window.querry = querry; + + let it = 2; + let bool = false; + let tmpval = val; + while ( + !Enumerable.from(querry.contents().find('input')) + .where( + (x) => + x.attributes.type !== undefined && + x.attributes.type.value === 'submit' && + x.classList.contains('primary'), + ) + .any() + ) { await delay(500); - rcmail.set_busy(true, "loading"); - if (!Enumerable.from(querry.contents().find("div")).where(x => Enumerable.from(x.classList).where(s => s.includes("tooltip").any()) && x.innerHTML.includes(val) && $(x).parent().hasClass("tooltip")).any()) - querry.contents().find("#" + id).parent().find(".icon-confirm").click(); - //window.querry = querry; - - let it = 2; - let bool = false; - let tmpval = val; - while (!Enumerable.from(querry.contents().find("input")).where(x => x.attributes.type !== undefined && x.attributes.type.value === "submit" && x.classList.contains("primary")).any()) { - await delay(500); - if (Enumerable.from(querry.contents().find("div")).where(x => Enumerable.from(x.classList).where(s => s.includes("tooltip").any()) && x.innerHTML.includes(val) && $(x).parent().hasClass("tooltip")).any()) { - - // m_mp_Create(); - // m_mp_InitializeDocument(); - // $("#" + mel_metapage.Ids.create.doc_input).val(val).css("border-color", "red").parent().append("
    *Un fichier avec le même nom existe déjà !"); - // rcmail.set_busy(false); - // rcmail.clear_messages(); - // return; - val = it + "-" + tmpval; - ++it; - querry.contents().find("#" + id).val(val); - bool = true; - //await delay(500); - //querry.contents().find("#" + id).parent().find(".icon-confirm").click(); - } else if (bool) { - querry.contents().find("#" + id).parent().find(".icon-confirm").click(); - rcmail.display_message("Le nom " + tmpval + " existe déjà et sera remplacer par " + val); - } + if ( + Enumerable.from(querry.contents().find('div')) + .where( + (x) => + Enumerable.from(x.classList).where((s) => + s.includes('tooltip').any(), + ) && + x.innerHTML.includes(val) && + $(x).parent().hasClass('tooltip'), + ) + .any() + ) { + // m_mp_Create(); + // m_mp_InitializeDocument(); + // $("#" + mel_metapage.Ids.create.doc_input).val(val).css("border-color", "red").parent().append("
    *Un fichier avec le même nom existe déjà !"); + // rcmail.set_busy(false); + // rcmail.clear_messages(); + // return; + val = it + '-' + tmpval; + ++it; + querry + .contents() + .find('#' + id) + .val(val); + bool = true; + //await delay(500); + //querry.contents().find("#" + id).parent().find(".icon-confirm").click(); + } else if (bool) { + querry + .contents() + .find('#' + id) + .parent() + .find('.icon-confirm') + .click(); + rcmail.display_message( + 'Le nom ' + tmpval + ' existe déjà et sera remplacer par ' + val, + ); } - Enumerable.from(querry.contents().find("input")).where(x => x.attributes.type !== undefined && x.attributes.type.value === "submit" && x.classList.contains("primary")).first().click(); - - //console.log("7 change page"); - m_mp_CreateOrOpenFrame("stockage", () => {}, () => { - rcmail.set_busy(false); - rcmail.clear_messages(); - }); + } + Enumerable.from(querry.contents().find('input')) + .where( + (x) => + x.attributes.type !== undefined && + x.attributes.type.value === 'submit' && + x.classList.contains('primary'), + ) + .first() + .click(); + + //console.log("7 change page"); + m_mp_CreateOrOpenFrame( + 'stockage', + () => {}, + () => { + rcmail.set_busy(false); + rcmail.clear_messages(); + }, + ); } function m_mp_CreateDocNotCurrent() { - if ($("#" + mel_metapage.Ids.create.doc_input).val() === "") - $("#" + mel_metapage.Ids.create.doc_input).val("Nouveau document texte.txt"); - let val = $("#" + mel_metapage.Ids.create.doc_input).val(); - create_popUp.contents.html('
    '); - m_mp_CreateOrOpenFrame("stockage", () => {}, () => { - rcmail.set_busy(true, "loading"); - $(".stockage-frame")[0].src = "http://localhost/nextcloud/index.php" + "/apps/files"; - let querry = $(".stockage-frame"); - window.create_popUp.close(); - window.create_popUp = undefined; - querry.css("margin-top", "60px"); - - new Promise(async(a, b) => { - await m_mp_CreateDocCurrent(val, false); - }); - }, false); + if ($('#' + mel_metapage.Ids.create.doc_input).val() === '') + $('#' + mel_metapage.Ids.create.doc_input).val( + 'Nouveau document texte.txt', + ); + let val = $('#' + mel_metapage.Ids.create.doc_input).val(); + create_popUp.contents.html( + '
    ', + ); + m_mp_CreateOrOpenFrame( + 'stockage', + () => {}, + () => { + rcmail.set_busy(true, 'loading'); + $('.stockage-frame')[0].src = + 'http://localhost/nextcloud/index.php' + '/apps/files'; + let querry = $('.stockage-frame'); + window.create_popUp.close(); + window.create_popUp = undefined; + querry.css('margin-top', '60px'); + + new Promise(async (a, b) => { + await m_mp_CreateDocCurrent(val, false); + }); + }, + false, + ); } function m_mp_DecodeUrl() { - let url; // = $("#" + rcmail.env.current_frame)[0].contentDocument.location.href; - if (rcmail.env.current_frame === undefined || rcmail.env.current_frame == "default" || rcmail.env.current_frame_name === "discussion") - url = window.location.href; - else - url = $("#" + rcmail.env.current_frame)[0]?.contentDocument?.location?.href ?? $("#" + rcmail.env.current_frame)[0]?.contentWindow?.location?.href ?? window.location.href; - - let text = ""; - let hasTask = false; - let task = null; - let action = null; - for (let index = 0; index < url.length; ++index) { - const element = url[index]; - if (element === "/") - text = ""; - else if (element === "&" || index == url.length - 1) { - if (index == url.length - 1) - text += element; - if (hasTask && text.includes("_action")) { - action = text.replace("&", "").replace("?", "").replace("_action=", ""); - break; - } else if (!hasTask && text.includes("_task")) { - hasTask = true; - task = text.replace("?", "").replace("&", "").replace("_task=", ""); - text = ";" - } else - text = ""; - } else - text += element; - } - // console.log("url decode", { - // task:task, - // action:action - // }); - return { - task: task, - action: action - }; + let url; // = $("#" + rcmail.env.current_frame)[0].contentDocument.location.href; + if ( + rcmail.env.current_frame === undefined || + rcmail.env.current_frame == 'default' || + rcmail.env.current_frame_name === 'discussion' + ) + url = window.location.href; + else + url = + $('#' + rcmail.env.current_frame)[0]?.contentDocument?.location?.href ?? + $('#' + rcmail.env.current_frame)[0]?.contentWindow?.location?.href ?? + window.location.href; + + let text = ''; + let hasTask = false; + let task = null; + let action = null; + for (let index = 0; index < url.length; ++index) { + const element = url[index]; + if (element === '/') text = ''; + else if (element === '&' || index == url.length - 1) { + if (index == url.length - 1) text += element; + if (hasTask && text.includes('_action')) { + action = text.replace('&', '').replace('?', '').replace('_action=', ''); + break; + } else if (!hasTask && text.includes('_task')) { + hasTask = true; + task = text.replace('?', '').replace('&', '').replace('_task=', ''); + text = ';'; + } else text = ''; + } else text += element; + } + // console.log("url decode", { + // task:task, + // action:action + // }); + return { + task: task, + action: action, + }; } /** @@ -2074,88 +2896,92 @@ function m_mp_DecodeUrl() { * @param {function} funcBefore Fonction à appelé avant d'ouvrir. * @param {function} func Fonction à appelé une fois ouvert. */ -async function m_mp_CreateOrOpenFrame(frameClasse, funcBefore, func = () => {}, changepage = true) { - if (funcBefore !== null) - funcBefore(); - - //mm_st_CreateOrOpenModal(frameClasse, changepage); - await mel_metapage.Functions.change_frame(frameClasse, changepage, true); +async function m_mp_CreateOrOpenFrame( + frameClasse, + funcBefore, + func = () => {}, + changepage = true, +) { + if (funcBefore !== null) funcBefore(); + + //mm_st_CreateOrOpenModal(frameClasse, changepage); + await mel_metapage.Functions.change_frame(frameClasse, changepage, true); + + if (func !== null) { + if (isAsync(func)) await func(); + else func(); + } + // new Promise(async (a,b) => { + // while (parent.rcmail.env.frame_created === false) { + // await delay(1000); + // } + // if (func !== null) + // func(); + // }); +} - if (func !== null) +async function m_mp_sondage() { + $('.modal-close ').click(); + // let $querry = $('iframe.sondage-frame'); + + // if ($querry.length > 0) $querry[0].src = rcmail.env.sondage_create_sondage_url; + // else if($('.sondage-frame').length > 0) $('.sondage-frame')[0].contentWindow.$('#mel_sondage_frame')[0].src = rcmail.env.sondage_create_sondage_url; + // else + // { + // await mel_metapage.Functions.change_frame('sondage', true, true, { + // _url:rcmail.env.sondage_create_sondage_url + // }); + // } + + await mel_metapage.Functions.change_page( + 'sondage', + null, { - if (isAsync(func)) await func(); - else func(); - } - // new Promise(async (a,b) => { - // while (parent.rcmail.env.frame_created === false) { - // await delay(1000); - // } - // if (func !== null) - // func(); - // }); + _url: encodeURIComponent(rcmail.env.sondage_create_sondage_url), + }, + true, + true, + ); } -async function m_mp_sondage() -{ - $('.modal-close ').click(); - // let $querry = $('iframe.sondage-frame'); - - // if ($querry.length > 0) $querry[0].src = rcmail.env.sondage_create_sondage_url; - // else if($('.sondage-frame').length > 0) $('.sondage-frame')[0].contentWindow.$('#mel_sondage_frame')[0].src = rcmail.env.sondage_create_sondage_url; - // else - // { - // await mel_metapage.Functions.change_frame('sondage', true, true, { - // _url:rcmail.env.sondage_create_sondage_url - // }); - // } - - await mel_metapage.Functions.change_page('sondage', null, { - _url:encodeURIComponent(rcmail.env.sondage_create_sondage_url) - }, true, true); -} - /** * Action de créer un évènement. */ function m_mp_CreateEvent(_action = null) { - if (window.create_popUp !== undefined) - window.create_popUp.close(); - const action = _action === null ? () => { - m_mp_set_storage("calendar_create"); - } : _action; - const calendar = 'calendar'; - //console.log(window.rcube_calendar_ui, rcmail.env.current_frame_name, rcmail.env.task); - if (parent.child_cal === undefined) - action(); - else { - if (rcmail.env.current_frame_name !== undefined) { - if (rcmail.env.current_frame_name === calendar) - parent.child_cal.add_event("") - else - action(); - } else if (rcmail.env.task === calendar) - parent.child_cal.add_event("") - else - action(); - } + if (window.create_popUp !== undefined) window.create_popUp.close(); + const action = + _action === null + ? () => { + m_mp_set_storage('calendar_create'); + } + : _action; + const calendar = 'calendar'; + //console.log(window.rcube_calendar_ui, rcmail.env.current_frame_name, rcmail.env.task); + if (parent.child_cal === undefined) action(); + else { + if (rcmail.env.current_frame_name !== undefined) { + if (rcmail.env.current_frame_name === calendar) + parent.child_cal.add_event(''); + else action(); + } else if (rcmail.env.task === calendar) parent.child_cal.add_event(''); + else action(); + } } /** * Action de créer un évènement après affichage de la frame. */ function m_mp_CreateEvent_inpage() { - let event = rcmail.local_storage_get_item("calendar_create"); - let category = rcmail.local_storage_get_item("calendar_category"); - if (event !== null) { - config = {}; - if (category != null) - config["categories"] = ["ws#apitech-1"]; - - if (event === true) - parent.child_cal.add_event(config) - rcmail.local_storage_remove_item("calendar_create"); - rcmail.local_storage_remove_item("calendar_category"); - } + let event = rcmail.local_storage_get_item('calendar_create'); + let category = rcmail.local_storage_get_item('calendar_category'); + if (event !== null) { + config = {}; + if (category != null) config['categories'] = ['ws#apitech-1']; + + if (event === true) parent.child_cal.add_event(config); + rcmail.local_storage_remove_item('calendar_create'); + rcmail.local_storage_remove_item('calendar_category'); + } } /** @@ -2165,9 +2991,8 @@ function m_mp_CreateEvent_inpage() { * @param {boolean} close Ferme la fenêtre de création. "true" par défaut. */ function m_mp_set_storage(key, item = true, close = true) { - rcmail.local_storage_set_item(key, item); - if (close && window.create_popUp !== undefined) - window.create_popUp.close(); + rcmail.local_storage_set_item(key, item); + if (close && window.create_popUp !== undefined) window.create_popUp.close(); } /** @@ -2177,311 +3002,335 @@ function m_mp_set_storage(key, item = true, close = true) { * @param {boolean} remove Supprimer la données après avoir fait l'action. "true" par défaut. * @param {*} eventValue La valeur du stockage pour faire l'action. "true" par défaut. Si "¤avoid", l'action est toujours faite. */ -function m_mp_action_from_storage(storage_key, action, remove = true, eventValue = true) { - let event = rcmail.local_storage_get_item(storage_key); - if (event !== null) { - if (eventValue === "¤avoid") - action(event); - else { - if (event === eventValue) - action(event); - } - if (remove) - rcmail.local_storage_remove_item(storage_key); +function m_mp_action_from_storage( + storage_key, + action, + remove = true, + eventValue = true, +) { + let event = rcmail.local_storage_get_item(storage_key); + if (event !== null) { + if (eventValue === '¤avoid') action(event); + else { + if (event === eventValue) action(event); } + if (remove) rcmail.local_storage_remove_item(storage_key); + } } /** * Ouvre une nouvelle tâche. */ function m_mp_OpenTask() { - let navigator = window.child_rcmail === undefined ? rcmail : child_rcmail; - new Promise(async(a, b) => { - while (navigator.busy || rcmail.busy) { - await delay(100); - } - navigator.command('newtask', '', this, event); - }); + let navigator = window.child_rcmail === undefined ? rcmail : child_rcmail; + new Promise(async (a, b) => { + while (navigator.busy || rcmail.busy) { + await delay(100); + } + navigator.command('newtask', '', this, event); + }); } /** * Ferme ariane. */ function m_mp_close_ariane() { - try { - event.preventDefault(); - }catch(e) {} - - if (parent.mel_metapage.PopUp.ariane !== undefined) - parent.mel_metapage.PopUp.ariane.hide(); + try { + event.preventDefault(); + } catch (e) {} + + if (parent.mel_metapage.PopUp.ariane !== undefined) + parent.mel_metapage.PopUp.ariane.hide(); } /** * Ouvre la frame d'ariane. */ function m_mp_full_screen_ariane() { - event.preventDefault(); - parent.mm_st_CreateOrOpenModal('rocket'); + event.preventDefault(); + parent.mm_st_CreateOrOpenModal('rocket'); } /** * Ancre ariane. */ function m_mp_anchor_ariane() { - event.preventDefault(); - if (parent.mel_metapage.PopUp.ariane !== undefined) - parent.mel_metapage.PopUp.ariane.anchor(); + event.preventDefault(); + if (parent.mel_metapage.PopUp.ariane !== undefined) + parent.mel_metapage.PopUp.ariane.anchor(); } async function m_mp_shortcuts() { - if (window.shortcuts === undefined) { - if ($(".fullscreen-item").length > 0) - $(".fullscreen-item").remove(); + if (window.shortcuts === undefined) { + if ($('.fullscreen-item').length > 0) $('.fullscreen-item').remove(); - const tab_tasks = { - left: "", - right: "Toute les tâches" - }; - const config = { - add_day_navigation: true, - add_create: true, - create_function: `html_helper.Calendars.create({selector:'.fullscreen-item .mm-agenda-date'});window.shortcuts.close();`, - add_see_all: true - }; - const tab_content = 'mel-responsive-tab-content'; - const tab_namespace = 'namespace-reponsive-tab-shortcut'; - const parent_selector = '.mm-shortcuts.apps'; - const attribs = { - tasks:{ - 'data-tab-name':'Tâches', - 'data-selector-tab':'.square_div.shortcut-task.t', - 'data-is-default-tab':false, - 'data-parent-tabs':parent_selector - }, - calendar:{ - 'data-tab-name':'Agenda', - 'data-selector-tab':'.square_div.shorcut-calendar', - 'data-is-default-tab':true, - 'data-parent-tabs':parent_selector - }, - }; + const tab_tasks = { + left: '', + right: 'Toute les tâches', + }; + const config = { + add_day_navigation: true, + add_create: true, + create_function: + "html_helper.Calendars.create({selector:'.fullscreen-item .mm-agenda-date'});window.shortcuts.close();", + add_see_all: true, + }; + const tab_content = 'mel-responsive-tab-content'; + const tab_namespace = 'namespace-reponsive-tab-shortcut'; + const parent_selector = '.mm-shortcuts.apps'; + const attribs = { + tasks: { + 'data-tab-name': 'Tâches', + 'data-selector-tab': '.square_div.shortcut-task.t', + 'data-is-default-tab': false, + 'data-parent-tabs': parent_selector, + }, + calendar: { + 'data-tab-name': 'Agenda', + 'data-selector-tab': '.square_div.shorcut-calendar', + 'data-is-default-tab': true, + 'data-parent-tabs': parent_selector, + }, + }; - let shortcuts = new FullscreenItem("body", true); - shortcuts.generate_flex(); - html = "
    "; - - if (rcmail.env.shortcuts_queue_before !== undefined) - { - for (const key in rcmail.env.shortcuts_queue_before) { - if (Object.hasOwnProperty.call(rcmail.env.shortcuts_queue_before, key)) { - const element = rcmail.env.shortcuts_queue_before[key]; - html += html_helper(html_helper.options.block, (typeof element.html === 'function' ? element.html() : element.html), `shortcut-task shortcut-${element.key} ${tab_content} ${tab_namespace}`, - { - 'data-tab-name':element?.name ?? element.key, - 'data-selector-tab':`.square_div.shortcut-task.shortcut-${element.key}`, - 'data-is-default-tab':false, - 'data-parent-tabs':parent_selector - } - ); - } - } + let shortcuts = new FullscreenItem('body', true); + shortcuts.generate_flex(); + html = '
    '; + + if (rcmail.env.shortcuts_queue_before !== undefined) { + for (const key in rcmail.env.shortcuts_queue_before) { + if ( + Object.hasOwnProperty.call(rcmail.env.shortcuts_queue_before, key) + ) { + const element = rcmail.env.shortcuts_queue_before[key]; + html += html_helper( + html_helper.options.block, + typeof element.html === 'function' ? element.html() : element.html, + `shortcut-task shortcut-${element.key} ${tab_content} ${tab_namespace}`, + { + 'data-tab-name': element?.name ?? element.key, + 'data-selector-tab': `.square_div.shortcut-task.shortcut-${element.key}`, + 'data-is-default-tab': false, + 'data-parent-tabs': parent_selector, + }, + ); } + } + } - html += html_helper(html_helper.options.block, await html_helper.TasksAsync(tab_tasks, null, null, "Toutes mes tâches"), tab_namespace + " shortcut-task t " + tab_content, attribs.tasks); - html += html_helper(html_helper.options.block, await html_helper.CalendarsAsync(config), tab_namespace + " shortcut-task shorcut-calendar " + tab_content, attribs.calendar); - - if (rcmail.env.shortcuts_queue !== undefined) - { - for (const key in rcmail.env.shortcuts_queue) { - if (Object.hasOwnProperty.call(rcmail.env.shortcuts_queue, key)) { - const element = rcmail.env.shortcuts_queue[key]; - html += html_helper(html_helper.options.block, (typeof element.html === 'function' ? element.html() : element.html), `shortcut-task shortcut-${element.key} ${tab_content} ${tab_namespace}`, - { - 'data-tab-name':element?.name ?? element.key, - 'data-selector-tab':`.square_div.shortcut-task.shortcut-${element.key}`, - 'data-is-default-tab':false, - 'data-parent-tabs':parent_selector - }); - } - } + html += html_helper( + html_helper.options.block, + await html_helper.TasksAsync(tab_tasks, null, null, 'Toutes mes tâches'), + tab_namespace + ' shortcut-task t ' + tab_content, + attribs.tasks, + ); + html += html_helper( + html_helper.options.block, + await html_helper.CalendarsAsync(config), + tab_namespace + ' shortcut-task shorcut-calendar ' + tab_content, + attribs.calendar, + ); + + if (rcmail.env.shortcuts_queue !== undefined) { + for (const key in rcmail.env.shortcuts_queue) { + if (Object.hasOwnProperty.call(rcmail.env.shortcuts_queue, key)) { + const element = rcmail.env.shortcuts_queue[key]; + html += html_helper( + html_helper.options.block, + typeof element.html === 'function' ? element.html() : element.html, + `shortcut-task shortcut-${element.key} ${tab_content} ${tab_namespace}`, + { + 'data-tab-name': element?.name ?? element.key, + 'data-selector-tab': `.square_div.shortcut-task.shortcut-${element.key}`, + 'data-is-default-tab': false, + 'data-parent-tabs': parent_selector, + }, + ); } + } + } - html += "
    "; - shortcuts.add_app("items", html); + html += '
    '; + shortcuts.add_app('items', html); - if (!!html_helper.Calendars.$jquery_array) { - const $jquery_array = html_helper.Calendars.$jquery_array; - html_helper.Calendars.$jquery_array = undefined; - shortcuts.item.find('.shorcut-calendar ul').html($jquery_array); - } + if (html_helper.Calendars.$jquery_array) { + const $jquery_array = html_helper.Calendars.$jquery_array; + html_helper.Calendars.$jquery_array = undefined; + shortcuts.item.find('.shorcut-calendar ul').html($jquery_array); + } - window.shortcuts = shortcuts; + window.shortcuts = shortcuts; - //debugger; - MEL_ELASTIC_UI.initResponsive('shortcut', true).update(); + //debugger; + MEL_ELASTIC_UI.initResponsive('shortcut', true).update(); - rcmail.triggerEvent('apps.create'); - } else { - if (window.shortcuts.is_open) - window.shortcuts.close(); - else - window.shortcuts.open(); - } + rcmail.triggerEvent('apps.create'); + } else { + if (window.shortcuts.is_open) window.shortcuts.close(); + else window.shortcuts.open(); + } - setTimeout(() => { - $("#fullscreenreaderfocus").focus(); - }, 100); + setTimeout(() => { + $('#fullscreenreaderfocus').focus(); + }, 100); } -function mm_add_shortcut(key, html, before = false, name = null) -{ - let restart_shortcut = false; - if (window.shortcuts !== undefined) - { - restart_shortcut = true; - } - - if (!before) - { - if (rcmail.env.shortcuts_queue === undefined) rcmail.env.shortcuts_queue = []; +function mm_add_shortcut(key, html, before = false, name = null) { + let restart_shortcut = false; + if (window.shortcuts !== undefined) { + restart_shortcut = true; + } - rcmail.env.shortcuts_queue.push({ - key, - html, - name - }); - } - else { - if (rcmail.env.shortcuts_queue_before === undefined) rcmail.env.shortcuts_queue_before = []; + if (!before) { + if (rcmail.env.shortcuts_queue === undefined) + rcmail.env.shortcuts_queue = []; - rcmail.env.shortcuts_queue_before.push({ - key, - html, - name - }); - } + rcmail.env.shortcuts_queue.push({ + key, + html, + name, + }); + } else { + if (rcmail.env.shortcuts_queue_before === undefined) + rcmail.env.shortcuts_queue_before = []; + + rcmail.env.shortcuts_queue_before.push({ + key, + html, + name, + }); + } - if (restart_shortcut) - { - delete window.shortcuts; - m_mp_shortcuts(); - } - + if (restart_shortcut) { + delete window.shortcuts; + m_mp_shortcuts(); + } } function mm_create_calendar(e, existingEvent = null) { - if (window.create_popUp !== undefined) { - window.create_popUp.close(); - window.create_popUp = undefined; - } + if (window.create_popUp !== undefined) { + window.create_popUp.close(); + window.create_popUp = undefined; + } - let event; + let event; - if (existingEvent === null || existingEvent === undefined) - event = { - // categories:["ws#" + id], - // calendar_blocked:true, - start: moment(), - end: moment().add(1, "h"), - from: "barup" - } - else { - event = existingEvent; - event.completeEvent = true; - } + if (existingEvent === null || existingEvent === undefined) + event = { + // categories:["ws#" + id], + // calendar_blocked:true, + start: moment(), + end: moment().add(1, 'h'), + from: 'barup', + }; + else { + event = existingEvent; + event.completeEvent = true; + } - rcmail.local_storage_set_item("tmp_calendar_event", event); - return rcmail.commands['add-event-from-shortcut'] ? rcmail.command('add-event-from-shortcut', '', e.target, e) : rcmail.command('addevent', '', e.target, e); + rcmail.local_storage_set_item('tmp_calendar_event', event); + return rcmail.commands['add-event-from-shortcut'] + ? rcmail.command('add-event-from-shortcut', '', e.target, e) + : rcmail.command('addevent', '', e.target, e); } function m_mp_NewTask() { - let func = () => { - - if (rcmail._events["pamella.tasks.afterinit"] !== undefined) - rcmail.triggerEvent("pamella.tasks.afterinit", undefined); - - }; + let func = () => { + if (rcmail._events['pamella.tasks.afterinit'] !== undefined) + rcmail.triggerEvent('pamella.tasks.afterinit', undefined); + }; - mel_metapage.Functions.call(func, true); + mel_metapage.Functions.call(func, true); } function open_task(id, config = {}) { - if (event !== undefined) event.preventDefault(); + if (event !== undefined) event.preventDefault(); - mel_metapage.Storage.set("task_to_open", id); - mel_metapage.Functions.change_frame("tasklist", true, false, config); + mel_metapage.Storage.set('task_to_open', id); + mel_metapage.Functions.change_frame('tasklist', true, false, config); - if ($("iframe.tasks-frame").length > 0) $("iframe.tasks-frame")[0].contentWindow.rcmail.triggerEvent("plugin.data_ready"); - else if ($(".tasks-frame").length > 0) rcmail.triggerEvent("plugin.data_ready"); + if ($('iframe.tasks-frame').length > 0) + $('iframe.tasks-frame')[0].contentWindow.rcmail.triggerEvent( + 'plugin.data_ready', + ); + else if ($('.tasks-frame').length > 0) + rcmail.triggerEvent('plugin.data_ready'); } /** * Permet d'afficher masquer la pop up user Bienvenue */ async function m_mp_ToggleGroupOptionsUser(opener) { - let $goupoptions_user = $("#groupoptions-user"); - let $button_settings = $("#button-settings"); - const state = $goupoptions_user.is(":visible") == true; - - if ($goupoptions_user.is(":visible") == true) { - $goupoptions_user.hide(); - $goupoptions_user.data('aria-hidden', 'true'); - $goupoptions_user.data('opener', null); - $button_settings.removeClass('force-fill'); - $(opener).data('aria-expanded', 'false'); - rcmail.triggerEvent('toggle-options-user', {show: false}); - } - else { - $('.options-custom').css('position', 'relative').css('min-height', '300px').html(window.MEL_ELASTIC_UI.create_loader("options-loader")); - $goupoptions_user.show(); - $goupoptions_user.data('opener', opener); - $goupoptions_user.data('aria-hidden', 'false'); - $button_settings.addClass('force-fill'); - $(opener).data('aria-expanded', 'true'); - rcmail.menu_stack.push("groupoptions-user"); - rcmail.triggerEvent('toggle-options-user', {show: true}); - - await mel_metapage.Functions.get( - mel_metapage.Functions.url('mel_settings','load'), - {_option: rcmail.env.current_frame_name}, - (data) => { - data = JSON.parse(data) - $('.options-custom').html(data.html); - for (const [key, value] of Object.entries(data.settings)) { - $input = $(`[name="${key}"]`); - switch ($input[0].nodeName) { - case "INPUT": - switch ($input.attr('type')) { - case 'checkbox': - $input.prop('checked', JSON.parse(value)); - break; - case 'radio': - $input.filter(`[data-value="${value}"]`).prop('checked', true) - break; - case 'text': - $input.val(value) - break; - default: - break; - } + let $goupoptions_user = $('#groupoptions-user'); + let $button_settings = $('#button-settings'); + const state = $goupoptions_user.is(':visible') == true; + + if ($goupoptions_user.is(':visible') == true) { + $goupoptions_user.hide(); + $goupoptions_user.data('aria-hidden', 'true'); + $goupoptions_user.data('opener', null); + $button_settings.removeClass('force-fill'); + $(opener).data('aria-expanded', 'false'); + rcmail.triggerEvent('toggle-options-user', { show: false }); + } else { + $('.options-custom') + .css('position', 'relative') + .css('min-height', '300px') + .html(window.MEL_ELASTIC_UI.create_loader('options-loader')); + $goupoptions_user.show(); + $goupoptions_user.data('opener', opener); + $goupoptions_user.data('aria-hidden', 'false'); + $button_settings.addClass('force-fill'); + $(opener).data('aria-expanded', 'true'); + rcmail.menu_stack.push('groupoptions-user'); + rcmail.triggerEvent('toggle-options-user', { show: true }); + + await mel_metapage.Functions.get( + mel_metapage.Functions.url('mel_settings', 'load'), + { _option: rcmail.env.current_frame_name }, + (data) => { + data = JSON.parse(data); + $('.options-custom').html(data.html); + for (const [key, value] of Object.entries(data.settings)) { + $input = $(`[name="${key}"]`); + switch ($input[0].nodeName) { + case 'INPUT': + switch ($input.attr('type')) { + case 'checkbox': + $input.prop('checked', JSON.parse(value)); break; - - case "SELECT": - $input.val(value) + case 'radio': + $input + .filter(`[data-value="${value}"]`) + .prop('checked', true); + break; + case 'text': + $input.val(value); break; - default: - throw 'error'; + break; } - } + break; + + case 'SELECT': + $input.val(value); + break; + + default: + throw 'error'; } - ) - } + } + }, + ); + } - rcmail.triggerEvent('toggle-quick-options.after', {hidden:state, frame:rcmail.env.current_frame_name}); + rcmail.triggerEvent('toggle-quick-options.after', { + hidden: state, + frame: rcmail.env.current_frame_name, + }); - $goupoptions_user = null; - $button_settings = null; + $goupoptions_user = null; + $button_settings = null; } /** @@ -2491,122 +3340,190 @@ function save_option(_option_name, _option_value, element) { element = $(element); const name = element.attr('name'); - $(`[name="${name}"]`).attr('disabled', 'disabled') - const id = rcmail.set_busy(true, 'loading') - + $(`[name="${name}"]`).attr('disabled', 'disabled'); + const id = rcmail.set_busy(true, 'loading'); + return mel_metapage.Functions.post( mel_metapage.Functions.url('mel_settings', 'save'), { _option_name, _option_value }, (data) => { - const parsed_datas = JSON.parse(data); - const is_string = 'string' === typeof parsed_datas + const parsed_datas = JSON.parse(data); + const is_string = typeof parsed_datas === 'string'; - console.log('datas', parsed_datas, is_string); + console.log('datas', parsed_datas, is_string); - $(`[name="${name}"]`).removeAttr('disabled') + $(`[name="${name}"]`).removeAttr('disabled'); - rcmail.set_busy(false, 'loading', id) - rcmail.display_message("Enregistré avec succès", 'confirmation') + rcmail.set_busy(false, 'loading', id); + rcmail.display_message('Enregistré avec succès', 'confirmation'); + if (element.data('no-action') || false) return; - if (!!(element.data('no-action') || false)) return; - - let func = element.data('function'); - if (func) eval(`${func}({key:'${_option_name}', value:${is_string ? `'${parsed_datas}'` : data}})`); - else { - func = element.data('command'); + let func = element.data('function'); + if (func) + eval( + `${func}({key:'${_option_name}', value:${is_string ? `'${parsed_datas}'` : data}})`, + ); + else { + func = element.data('command'); - if (!!func) rcmail.command(func, {key:_option_name, value:parsed_datas}); - else rcmail.command('refreshFrame') - } - } - ) + if (func) + rcmail.command(func, { key: _option_name, value: parsed_datas }); + else rcmail.command('refreshFrame'); + } + }, + ); } //0007910: Popup d'information lors du clic sur un lien dans un mail function external_link_modal(_url, isSuspect = false) { let url = new URL(_url); let domain = url.hostname; - let html = new mel_html2('div', { attribs: {id:'external-link-modal'},contents: [] }); - let title = new mel_html('label',{class:'span-mel t2'}, rcmail.gettext('mel_metapage.leaving_bnum')); - let link = new mel_html('p',{class:'external_url'}, _url); - let warning = new mel_html2('label', { attribs: {class:'text-danger mt-3 warning-label'},contents: [ - new mel_html('span',{class:'material-symbols-outlined warning-icon-large'}, "warning"), - new mel_html('span',{class:'ml-2'}, rcmail.gettext('mel_metapage.warning_external_link')) - ] }); + let html = new mel_html2('div', { + attribs: { id: 'external-link-modal' }, + contents: [], + }); + let title = new mel_html( + 'label', + { class: 'span-mel t2' }, + rcmail.gettext('mel_metapage.leaving_bnum'), + ); + let link = new mel_html('p', { class: 'external_url' }, _url); + let warning = new mel_html2('label', { + attribs: { class: 'text-danger mt-3 warning-label' }, + contents: [ + new mel_html( + 'span', + { class: 'material-symbols-outlined warning-icon-large' }, + 'warning', + ), + new mel_html( + 'span', + { class: 'ml-2' }, + rcmail.gettext('mel_metapage.warning_external_link'), + ), + ], + }); let disableButton = false; let custom_switch = null; - - if (!isSuspect) { - custom_switch = new mel_html2('div', { attribs: {class:'custom-control custom-switch no-click-focus'},contents: [ - new mel_html('input',{name:'_trust_domain', id:'rcmfd_trust_domain', type:'checkbox', value:'false', class:'form-check-input custom-control-input no-click-focus', onchange:'$(this).val(this.checked)'}), - new mel_html('label',{for:'rcmfd_trust_domain', class:'custom-control-label option-switch no-click-focus pl-6'}, rcmail.gettext('mel_metapage.always_authorize') + ''+domain+''), - ] }); - } - else { + + if (!isSuspect) { + custom_switch = new mel_html2('div', { + attribs: { class: 'custom-control custom-switch no-click-focus' }, + contents: [ + new mel_html('input', { + name: '_trust_domain', + id: 'rcmfd_trust_domain', + type: 'checkbox', + value: 'false', + class: 'form-check-input custom-control-input no-click-focus', + onchange: '$(this).val(this.checked)', + }), + new mel_html( + 'label', + { + for: 'rcmfd_trust_domain', + class: 'custom-control-label option-switch no-click-focus pl-6', + }, + rcmail.gettext('mel_metapage.always_authorize') + + '' + + domain + + '', + ), + ], + }); + } else { disableButton = true; - let check = new mel_field('input', {name:'warning_suspect_url', id:'warning_suspect_url', type:'checkbox', value:'false', class:'form-check-input custom-control-input no-click-focus'}); - check.onchange.push(( e ) => { - e.currentTarget.checked ? $('#modal-save-footer').removeClass('disabled') : $('#modal-save-footer').addClass('disabled'); + let check = new mel_field('input', { + name: 'warning_suspect_url', + id: 'warning_suspect_url', + type: 'checkbox', + value: 'false', + class: 'form-check-input custom-control-input no-click-focus', + }); + check.onchange.push((e) => { + e.currentTarget.checked + ? $('#modal-save-footer').removeClass('disabled') + : $('#modal-save-footer').addClass('disabled'); + }); + + custom_switch = new mel_html2('div', { + attribs: { class: 'custom-control custom-switch no-click-focus' }, + contents: [ + check, + new mel_html( + 'label', + { + for: 'warning_suspect_url', + class: 'custom-control-label option-switch no-click-focus pl-6', + }, + '' + + domain + + '' + + rcmail.gettext('mel_metapage.warning_suspect_url'), + ), + ], }); - - custom_switch = new mel_html2('div', { attribs: {class:'custom-control custom-switch no-click-focus'},contents: [ - check, - new mel_html('label',{for:'warning_suspect_url', class:'custom-control-label option-switch no-click-focus pl-6'}, ''+domain+'' + rcmail.gettext('mel_metapage.warning_suspect_url') ), - ] }); } - html.addContent(title); html.addContent(link); html.addContent(custom_switch); html.addContent(warning); - let buttons = [{ - text: rcmail.gettext('mel_metapage.back'), - 'class': 'modal-close-footer btn mel-button btn-danger mel-before-remover px-4 ', - click: function () { - $(this).closest('.ui-dialog-content').dialog('close'); - } - }, - { - id: 'modal-save-footer', - text: rcmail.gettext('mel_metapage.open_external_link'), - 'class': 'modal-save-footer btn btn-secondary mel-button px-4 ' + (disableButton ? 'disabled' : ''), - click: function () { - if($('#rcmfd_trust_domain').val() === "true") - { - mel_metapage.Functions.post( - mel_metapage.Functions.url('mel_metapage', 'save_user_pref_domain'), - { _domain: domain } - ); - } - window.open(_url, '_blank'); - $(this).closest('.ui-dialog-content').dialog('close'); - } - } + let buttons = [ + { + text: rcmail.gettext('mel_metapage.back'), + class: + 'modal-close-footer btn mel-button btn-danger mel-before-remover px-4 ', + click: function () { + $(this).closest('.ui-dialog-content').dialog('close'); + }, + }, + { + id: 'modal-save-footer', + text: rcmail.gettext('mel_metapage.open_external_link'), + class: + 'modal-save-footer btn btn-secondary mel-button px-4 ' + + (disableButton ? 'disabled' : ''), + click: function () { + if ($('#rcmfd_trust_domain').val() === 'true') { + mel_metapage.Functions.post( + mel_metapage.Functions.url('mel_metapage', 'save_user_pref_domain'), + { _domain: domain }, + ); + } + window.open(_url, '_blank'); + $(this).closest('.ui-dialog-content').dialog('close'); + }, + }, ]; - rcmail.show_popup_dialog(html.generate(), rcmail.gettext("mel_metapage.attention"),buttons,{ width: 600, resizable: false, height: 210 }); + rcmail.show_popup_dialog( + html.generate(), + rcmail.gettext('mel_metapage.attention'), + buttons, + { width: 600, resizable: false, height: 210 }, + ); } -function tchap_options () { - let $tchap = $('.tchap-frame'); - if ($tchap.length > 0){ - $tchap[0].contentWindow.rcmail.triggerEvent("tchap.options"); - } +function tchap_options() { + let $tchap = $('.tchap-frame'); + if ($tchap.length > 0) { + $tchap[0].contentWindow.rcmail.triggerEvent('tchap.options'); + } } -function tchap_disconnect () { - let $tchap = $('.tchap-frame'); - if ($tchap.length > 0){ - $tchap[0].contentWindow.rcmail.triggerEvent("tchap.disconnect"); - } +function tchap_disconnect() { + let $tchap = $('.tchap-frame'); + if ($tchap.length > 0) { + $tchap[0].contentWindow.rcmail.triggerEvent('tchap.disconnect'); + } } -function tchap_sidebar () { - let $tchap = $('.tchap-frame'); - if ($tchap.length > 0){ - $tchap[0].contentWindow.rcmail.triggerEvent("tchap.sidebar"); - } -} \ No newline at end of file +function tchap_sidebar() { + let $tchap = $('.tchap-frame'); + if ($tchap.length > 0) { + $tchap[0].contentWindow.rcmail.triggerEvent('tchap.sidebar'); + } +} diff --git a/plugins/mel_metapage/js/init.js b/plugins/mel_metapage/js/init.js index 0cc4d270b..80e858ac5 100644 --- a/plugins/mel_metapage/js/init.js +++ b/plugins/mel_metapage/js/init.js @@ -508,10 +508,10 @@ }, true); ChatSetupConfig(); - if (rcmail.env.launch_chat_frame_at_startup === true) { mel_metapage.Functions.change_frame('rocket', false); + mel_metapage.Functions.change_frame('tchap', false); } //Ajustement de la barre des tâches @@ -828,20 +828,22 @@ $(document).ready(() => { }); } else { rcmail.addEventListener("init", async function() { - let querry = $("#user-picture"); - // console.log("ping", _ping, rcmail.env.rocket_chat_url + "/avatar/" + rcmail.env.username); - querry.html(''); - let image = querry.find("img")[0]; - image.onerror = function() { - $("#user-picture").html("" + rcmail.env.username.slice(0, 1).toUpperCase() + ""); - }; - - let querry_big = $("#user-big-picture"); - querry_big.html(''); - let image_big = querry_big.find("img")[0]; - image_big.onerror = function() { - $("#user-big-picture").html("" + rcmail.env.username.slice(0, 1).toUpperCase() + ""); - }; + if (rcmail.env.rocket_chat_url) { + let querry = $("#user-picture"); + // console.log("ping", _ping, rcmail.env.rocket_chat_url + "/avatar/" + rcmail.env.username); + querry.html(''); + let image = querry.find("img")[0]; + image.onerror = function() { + $("#user-picture").html("" + rcmail.env.username.slice(0, 1).toUpperCase() + ""); + }; + + let querry_big = $("#user-big-picture"); + querry_big.html(''); + let image_big = querry_big.find("img")[0]; + image_big.onerror = function() { + $("#user-big-picture").html("" + rcmail.env.username.slice(0, 1).toUpperCase() + ""); + }; + } }); // Fermeture du bienvenue diff --git a/plugins/mel_metapage/js/init/classes/addons/calendar_base.js b/plugins/mel_metapage/js/init/classes/addons/calendar_base.js index 5a9e1b091..1323dca65 100644 --- a/plugins/mel_metapage/js/init/classes/addons/calendar_base.js +++ b/plugins/mel_metapage/js/init/classes/addons/calendar_base.js @@ -1,726 +1,959 @@ $(document).ready(() => { + const plugin_text = 'mel_metapage'; + const newline = String.fromCharCode('8199'); + + if (window.rcube_calendar_ui === undefined) + window.rcube_calendar_ui = () => {}; + + /** + * Sauvegarde l'évènement + * @returns {boolean} Faux si il y a des champs invalides + */ + rcube_calendar_ui.save = async function () { + let canContinue = true; + + //Si l'évènement n'a pas de titre + if ($('#edit-title').val() === '') { + //On se met sur le bon onglet, on focus le champs, puis on affiche le texte d'erreur. + $('li > a[href="#event-panel-summary"]').click(); + canContinue = false; + $('#edit-title').focus(); + if ($('#edit-title').parent().find('.required-text').length > 0) + $('#edit-title').parent().find('.required-text').css('display', ''); + else + $('#edit-title') + .parent() + .append( + `*${rcmail.gettext('title_needed', plugin_text)}`, + ); + } + //Sinon, ok + else { + //Suppression du message d'erreur + if ( + $('#wsp-event-all-cal-mm').val() !== '#none' && + $('#wsp-event-all-cal-mm').val() !== '' + ) + $('.have-workspace').css('display', ''); + else $('.have-workspace').css('display', 'none'); + + if ($('#edit-title').parent().find('.required-text').length > 0) + $('#edit-title').parent().find('.required-text').remove(); + } - const plugin_text = 'mel_metapage'; - const newline = String.fromCharCode('8199'); - - if (window.rcube_calendar_ui === undefined) - window.rcube_calendar_ui = () => {}; - - /** - * Sauvegarde l'évènement - * @returns {boolean} Faux si il y a des champs invalides - */ - rcube_calendar_ui.save = async function() - { - let canContinue = true; - - //Si l'évènement n'a pas de titre - if ($("#edit-title").val() === "") - { - //On se met sur le bon onglet, on focus le champs, puis on affiche le texte d'erreur. - $('li > a[href="#event-panel-summary"]').click(); - canContinue = false; - $("#edit-title").focus(); - if ($("#edit-title").parent().find(".required-text").length > 0) - $("#edit-title").parent().find(".required-text").css("display", ""); - else - $("#edit-title").parent().append(`*${rcmail.gettext('title_needed', plugin_text)}`); - } - //Sinon, ok - else { - //Suppression du message d'erreur - if ($("#wsp-event-all-cal-mm").val() !== "#none" && $("#wsp-event-all-cal-mm").val() !== "") - $(".have-workspace").css("display", ""); - else - $(".have-workspace").css("display", "none"); - - if ($("#edit-title").parent().find(".required-text").length > 0) - $("#edit-title").parent().find(".required-text").remove(); - } - - //Si il n'y a pas d'erreurs - if (canContinue) - { - //On sauvegarde l'évènement - let querry = $("#eventedit").parent().parent().find(".ui-dialog-buttonset").find(".save.mainaction"); - - if (querry.length > 0) - querry.click(); - else - { - rcmail.command('event-save'); - mel_metapage.Functions.call("update_cal", false, { - _integrated:true, - eval:"always", - args:{ - refresh:true, - child:true, - goToTop:true - } - }); - } + //Si il n'y a pas d'erreurs + if (canContinue) { + //On sauvegarde l'évènement + let querry = $('#eventedit') + .parent() + .parent() + .find('.ui-dialog-buttonset') + .find('.save.mainaction'); + + if (querry.length > 0) querry.click(); + else { + rcmail.command('event-save'); + mel_metapage.Functions.call('update_cal', false, { + _integrated: true, + eval: 'always', + args: { + refresh: true, + child: true, + goToTop: true, + }, + }); + } - EventUserNotified.Dispose(); + EventUserNotified.Dispose(); - return true; - } - //Si erreur(s) - else return false; - + return true; } + //Si erreur(s) + else return false; + }; + + window.rcube_calendar_ui._beforeSave = (event) => { + if (event._notify === undefined || event._notify === null) { + let checked = false; + $('#edit-attendees-table') + .find('input.edit-attendee-reply') + .each((i, e) => { + if (!checked && e.checked === true) checked = true; + }); - window.rcube_calendar_ui._beforeSave = (event) => { - if (event._notify === undefined || event._notify === null) - { - let checked = false; - $("#edit-attendees-table").find('input.edit-attendee-reply').each((i,e) => { - if (!checked && e.checked === true) checked = true; - }); - - if (checked) event._notify = 1; - - } + if (checked) event._notify = 1; + } - return event; + return event; + }; + + /** + * Affiche la modale d'édition d'un évènement + * @param {JSON} event Event plugin calendar + */ + window.rcube_calendar_ui.edit = async function (event, dialog) { + const loader = + window.loadJsModule ?? parent.loadJsModule ?? top.loadJsModule; + + const { CalendarEvent } = await loader( + 'mel_metapage', + 'edit_event', + '/js/lib/calendar/event/', + ); + + return CalendarEvent.Start(event, dialog); + }; + + rcmail.addEventListener('calendar-event-dialog', ({ dialog }) => { + const event = cal.selected_event; + + window.rcube_calendar_ui.edit(event, dialog); + }); + + rcmail.addEventListener('dialog-attendees-save', (datetimes) => { + const getDate = function (string) { + string = string.split(' '); + const date = string[0].split('/'); + const time = string[1].split(':'); + + return new moment( + `${date[2]}-${date[1]}-${date[0]}T${time[0]}:${time[1]}:00`, + ); }; + const format = 'DD/MM/YYYY HH:mm'; + $('.input-mel-datetime .input-mel.start').val( + getDate(`${datetimes.start.date} ${datetimes.start.time}`).format(format), + ); + $('.input-mel-datetime .input-mel.end').val( + getDate(`${datetimes.end.date} ${datetimes.end.time}`).format(format), + ); + }); + + rcmail.addEventListener('init', () => { + window?.m_mp_action_from_storage?.( + 'calendar_redirect', + SearchResultCalendar.after_loading, + true, + '¤avoid', + ); + rcmail.register_command( + 'calendar-workspace-add-all', + () => { + mel_metapage.Functions.busy(); + mel_metapage.Functions.post( + mel_metapage.Functions.url('workspace', 'get_email_from_ws'), + { + _uid: $('#mel-event-category').val().replace('ws#', ''), + }, + (datas) => { + datas = JSON.parse(datas); + let str = ''; + for (let index = 0; index < datas.length; ++index) { + const element = datas[index]; + str += `${element},`; + } + $('#attendee-input').val(str).change(); + }, + ).always(() => { + mel_metapage.Functions.busy(false); + }); + }, + true, + ); + + rcmail.register_command( + 'calendar-mail-add-all', + () => { + for (const key in rcmail.env['event_prop.mails']) { + if (Object.hasOwnProperty.call(rcmail.env['event_prop.mails'], key)) { + const element = rcmail.env['event_prop.mails'][key]?.split?.(','); + + if (element) { + $('#edit-attendee-name').val(element); + $('#edit-attendee-add').click(); + } + } + } + }, + true, + ); + + try { + $( + '.task-calendar #layout #layout-content > .header #calendartoolbar a.button', + ).each((i, e) => { + if ($(e).data('hidden') == 'small') return; + + let li = $('
  • '); + $(e).clone().appendTo(li); + li.appendTo($('#toolbar-menu-mel ul')); + //console.log("e", $(e).css("display"),e); + }); + } catch (error) {} + + $('#mel-button-small-search').click(() => { + let querry = $('#mel-small-search'); + + if (querry.css('display') === 'none') querry.css('display', ''); + else querry.css('display', 'none'); + }); + $('#mel-small-search input').on('change', () => { + $('#searchform') + .val($('#mel-small-search input').val()) + .parent() + .submit(); + }); - /** - * Affiche la modale d'édition d'un évènement - * @param {JSON} event Event plugin calendar - */ - window.rcube_calendar_ui.edit = async function(event, dialog) - { - const loader = window.loadJsModule ?? parent.loadJsModule ?? top.loadJsModule; - - const {CalendarEvent} = await loader('mel_metapage', 'edit_event', '/js/lib/calendar/event/'); + $('#mel-small-search button').click(() => { + $('.toolbar-calendar .button.reset').click(); + $('#mel-small-search input').val(''); + $('#mel-button-small-search').click(); + }); - return CalendarEvent.Start(event, dialog); + $('#searchform') + .parent() + .on('submit', () => { + $('#calendarOptionSelect').val('ootd'); + }); + }); + + if (!window.rcube_calendar) return; + try { + if (!rcube_calendar) return; + } catch (error) { + return; + } + + rcube_calendar.prototype.create_event_from_somewhere = async function ( + event = null, + ) { + let isFromGlobalModal = false; + + if (event === null) { + event = rcmail.local_storage_get_item('tmp_calendar_event'); + + if (event) isFromGlobalModal = true; } + if (window.create_event !== true) window.create_event = true; + else { + $('#mel-have-something-minified-main-create').remove(); + window.event_reduced = false; + window.kolab_event_dialog_element.show(); + return; + } - rcmail.addEventListener("calendar-event-dialog", ({dialog}) =>{ - const event = cal.selected_event; - - window.rcube_calendar_ui.edit(event, dialog); - - }); - - rcmail.addEventListener("dialog-attendees-save", (datetimes) => { - const getDate = function(string) - { - string = string.split(" "); - const date = string[0].split("/"); - const time = string[1].split(":"); - - return new moment(`${date[2]}-${date[1]}-${date[0]}T${time[0]}:${time[1]}:00`); - }; - const format = "DD/MM/YYYY HH:mm"; - $(".input-mel-datetime .input-mel.start").val(getDate(`${datetimes.start.date} ${datetimes.start.time}`).format(format)); - $(".input-mel-datetime .input-mel.end").val(getDate(`${datetimes.end.date} ${datetimes.end.time}`).format(format)); - }); + var url = { + _category: + event === null || + event.categories === undefined || + event.categories === null || + event.categories.length === 0 + ? null + : event.categories[0], + _framed: true, + _calendar_blocked: event != null && event.calendar_blocked === true, + _startDate: + event == null || event.start === undefined + ? null + : moment(event.start).format('YYYY-MM-DDTHH:mm'), + _endDate: + event == null || event.end === undefined + ? null + : moment(event.end).format('YYYY-MM-DDTHH:mm'), + }; - rcmail.addEventListener("init", () => { - window?.m_mp_action_from_storage?.('calendar_redirect', SearchResultCalendar.after_loading, true, "¤avoid"); - rcmail.register_command('calendar-workspace-add-all', () => { - mel_metapage.Functions.busy(); - mel_metapage.Functions.post(mel_metapage.Functions.url("workspace", "get_email_from_ws"), { - _uid:$("#mel-event-category").val().replace('ws#', '') - }, (datas) => { - datas = JSON.parse(datas); - let str = ''; - for (let index = 0; index < datas.length; ++index) { - const element = datas[index]; - str+=`${element},`; - } - $("#attendee-input").val(str).change(); - }).always(() => { - mel_metapage.Functions.busy(false); - }); - - }, true); - - rcmail.register_command('calendar-mail-add-all', () => { - for (const key in rcmail.env['event_prop.mails'] ) { - if (Object.hasOwnProperty.call( rcmail.env['event_prop.mails'] , key)) { - const element = rcmail.env['event_prop.mails'][key]?.split?.(','); - - if (!!element) { - $("#edit-attendee-name").val(element); - $("#edit-attendee-add").click(); - } - } - } - }, true); - - try { - $(".task-calendar #layout #layout-content > .header #calendartoolbar a.button").each((i,e) => { - - if ($(e).data("hidden") == "small") - return; - - let li = $("
  • "); - $(e).clone().appendTo(li) - li.appendTo($("#toolbar-menu-mel ul")); - //console.log("e", $(e).css("display"),e); - }); - - } catch (error) { - - } + if (event.mail_datas) { + url['_mbox'] = event.mail_datas.mbox; + url['_uid'] = event.mail_datas.uid; + } - $("#mel-button-small-search").click(() => { - let querry = $("#mel-small-search"); - - if (querry.css("display") === "none") - querry.css("display", ""); - else - querry.css("display", "none"); - }); - - $("#mel-small-search input").on("change", () => { - $("#searchform").val($("#mel-small-search input").val()) - .parent().submit(); - }); - - $("#mel-small-search button").click(() => { - $('.toolbar-calendar .button.reset').click(); - $("#mel-small-search input").val(""); - $("#mel-button-small-search").click(); - }); - - $("#searchform").parent().on("submit", () => { - $("#calendarOptionSelect").val("ootd"); - }); + var buttons = {}, + button_classes = ['mainaction save', 'cancel'], + title = rcmail.gettext('mel_metapage.new_event'), + dialog = $('`, - ).appendTo($click_master); - - if ($first) $first = false; - } - - if ($first) { - $('#button-create-new-survey').css('display', 'none'); - $( - `
    Créez un nouveau sondage (ici) puis liez le avec cet espace. (ici)
    `, - ).appendTo($main); - } else { - $('#button-create-new-survey').css('display', ''); - init_clicks(); - } - } - - archive(archive = true) { - this.busy(); - let bool; - if (archive) - bool = confirm( - 'Êtes-vous sûr de vouloir archiver cet espace de travail ?', - ); - else - bool = confirm( - 'Êtes-vous sûr de vouloir désarchiver cet espace de travail ?', - ); - - if (bool) { - return this.ajax( - this.url('archive_workspace'), - { - _uid: this.uid, - }, - datas => { - if (archive) this.quit(); - else window.location.reload(); - }, - (a, b, c) => { - this.busy(false); - console.error(a, b, c); - rcmail.display_message( - "Impossible d'archiver cet espace, regardez la console pour plus d'informations.", - 'error', - ); - }, - ); - } else return this.busyAsync(false); - } - - quit() { - this.busy(); - this.set_body_loading(); - window.location.href = - rcmail.env.current_workspace_back === undefined || - rcmail.env.current_workspace_back === null - ? this.url() - : rcmail.env.current_workspace_back; - } - - endDateChanged() { - //$("#wsp-param-chg-button-enddate").removeAttr("disabled").removeClass("disabled"); - return this.updateButtonState($('#wsp-param-chg-button-enddate')); - } - - updateButtonState(jquery, enable = true) { - if (enable && jquery.hasClass('disabled')) { - jquery.removeAttr('disabled').removeClass('disabled'); - } else if (!enable && !jquery.hasClass('disabled')) { - jquery.attr('disabled', 'disabled').addClass('disabled'); - } - - return this; - } - - paramUpdated($button, newVal = null, authorizeEmpty = false) { - let $jquery = $button; - let $input = $jquery.parent().parent().find('input'); - - if ($input.length === 0) - $input = $jquery.parent().parent().find('textarea'); - - if (newVal !== null) $input.val(newVal); - - const val = $input.val(); - const empty = ''; - if ( - (val !== empty || authorizeEmpty) && - val !== $input.attr('placeholder') - ) - return this.updateButtonState($jquery); - else return this.updateButtonState($jquery, false); - } - - titleUpdated(newVal = null) { - return this.paramUpdated($('#wsp-param-btn-title'), newVal); - } - } - Object.defineProperty(Workspace_Param, 'data_null', { - enumerable: false, - configurable: false, - writable: false, - value: Symbol('null'), - }); - - $(document).ready(() => { - rcmail.env.WSP_Param = new Workspace_Param( - rcmail.env.current_workspace_uid, - ); - rcmail.register_command( - 'workspace.changeColor', - x => rcmail.env.WSP_Param.changeColor(x), - true, - ); - rcmail.register_command( - 'workspace.add_users', - () => rcmail.env.WSP_Param.add_user(), - true, - ); - rcmail.register_command( - 'workspace.update_user', - x => rcmail.env.WSP_Param.update_user_right(x), - true, - ); - rcmail.register_command( - 'workspace.remove_user', - x => rcmail.env.WSP_Param.delete_user(x), - true, - ); - rcmail.register_command( - 'workspace.leave', - () => rcmail.env.WSP_Param.leave(), - true, - ); - rcmail.register_command( - 'workspace.delete', - () => rcmail.env.WSP_Param.delete(), - true, - ); - rcmail.register_command( - 'workspace.join', - () => rcmail.env.WSP_Param.join(), - true, - ); - rcmail.register_command( - 'workspace.go', - () => { - rcmail.env.WSP_Param.quit(); - }, - true, - ); - rcmail.register_command( - 'workspace.archive', - () => rcmail.env.WSP_Param.archive(), - true, - ); - rcmail.register_command( - 'workspace.update_app', - e => rcmail.env.WSP_Param.update_app(e), - true, - ); - rcmail.register_command( - 'workspace.unarchive', - () => rcmail.env.WSP_Param.archive(false), - true, - ); - rcmail.register_command( - 'workspace.changeLogo', - x => rcmail.env.WSP_Param.update_workspace_logo(x), - true, - ); - rcmail.register_command( - 'workspace.change_visibility', - () => rcmail.env.WSP_Param.change_visibility(), - true, - ); - rcmail.register_command( - 'workspace.compose', - () => rcmail.env.WSP_Param.compose(), - true, - ); - rcmail.register_command( - 'workspace.webconf', - () => rcmail.env.WSP_Param.create_webconf(), - true, - ); - rcmail.register_command( - 'workspace.webconf.needParams', - () => rcmail.env.WSP_Param.create_webconf(true), - true, - ); - rcmail.register_command( - 'workspace.update_end_date', - jquery => rcmail.env.WSP_Param.update_end_date(jquery.val()), - true, - ); - rcmail.register_command( - 'workspace.toggle_bar_color', - () => { - rcmail.env.WSP_Param.toggle_nav_color(); - }, - true, - ); - rcmail.register_command( - 'workspace.update_primary_parameter', - config => { - rcmail.env.WSP_Param.update_primary_parameters(config); - }, - true, - ); - rcmail.register_command( - 'workspace.survey.create', - () => { - rcmail.env.WSP_Param.create_survey(); - }, - true, - ); - rcmail.register_command( - 'workspace.survey.edit', - survey => { - rcmail.env.WSP_Param.create_survey(survey); - }, - true, - ); - rcmail.register_command( - 'workspace.survey.delete', - sid => { - rcmail.env.WSP_Param.delete_survey(sid); - }, - true, - ); - rcmail.register_command( - 'workspace.sync_list', - rcmail.env.WSP_Param.sync_list_member.bind(rcmail.env.WSP_Param), - true, - ); - rcmail.register_command( - 'workspace.remove_list', - rcmail.env.WSP_Param.delete_list.bind(rcmail.env.WSP_Param), - true, - ); - rcmail.register_command( - 'workspace.update_title', - () => { - if ( - !confirm( - rcmail.gettext('change_title_confirmation', 'mel_workspace'), - ) - ) - return; - rcmail.env.WSP_Param.update_primary_parameters({ - type: 'title', - input: $('#spaceTitle'), - checks: 'empty;already-exist', - text_on_error: - "Une erreur est survenue.\r\nImpossible de changer le titre de l'espace.", - text_on_succes: 'Le titre a été changer avec succès.', - }); - }, - true, - ); - rcmail.register_command( - 'workspace.update_desc', - (isDelete = false) => { - let $input = $('#spaceDesc'); - if (isDelete) $input.val(''); - - rcmail.env.WSP_Param.update_primary_parameters({ - type: 'desc', - input: $input, - checks: 'already-exist', - text_on_error: - "Une erreur est survenue.\r\nImpossible de changer la description de l'espace.", - text_on_succes: 'la description a été changer avec succès.', - action: (data, config, newValue, empty) => { - $('#wsp-desc-desc').html(newValue); - config.input.attr( - 'placeholder', - newValue === empty ? 'Nouvelle description....' : newValue, - ); - rcmail.env.WSP_Param.paramUpdated( - $('#wsp-param-btn-desc'), - empty, - ); - }, - }); - }, - true, - ); - rcmail.register_command( - 'workspace.update_hashtag', - (isDelete = false) => { - let $input = $('#spaceHashtag'); - - if ($input.val().includes('#')) - $input.val($input.val().replaceAll('#', '')); - - if (isDelete) $input.val(''); - - $('#list-of-all-hashtag-param').css('display', 'none'); - - rcmail.env.WSP_Param.update_primary_parameters({ - type: 'hashtag', - input: $input, - checks: 'already-exist', - text_on_error: - "Une erreur est survenue.\r\nImpossible de changer la thématique de l'espace.", - text_on_succes: 'la thématique a été changer avec succès.', - action: (data, config, newValue, empty) => { - let $querry = $('.wsp-head .col-10'); - let $span = $querry.children()[0]; - - if ($span.nodeName === 'SPAN') $span = $($span); - else $span = false; - - const hashtag = - newValue.includes('#') || newValue === empty - ? newValue - : `#${newValue}`; - - if (hashtag !== empty) { - if ($span !== false) $span.html(hashtag); - else { - $span = null; - $querry.prepend(`${hashtag}`); - } - } else if ($span !== false) $span.remove(); - - config.input.attr( - 'placeholder', - newValue === empty ? 'Nouvelle thématique....' : newValue, - ); - rcmail.env.WSP_Param.paramUpdated( - $('#wsp-param-btn-hashtag'), - empty, - ); - }, - }); - }, - true, - ); - - rcmail.addEventListener('onHashtagChange', selector => { - if (selector.input === '#spaceHashtag') { - rcmail.env.WSP_Param.paramUpdated($('#wsp-param-btn-hashtag')); - } - }); - //init end - }); + $btn_group, + ); + var $button_copy = $( + ``, + ).appendTo($btn_group); + + if (iterator.can_delete) { + var $button_edit = $( + ``, + ).appendTo($btn_group); + var $button_delete = $( + ``, + ).appendTo($btn_group); + } + + $( + `
    `, + ).appendTo($click_master); + + if ($first) $first = false; + } + + if ($first) { + $('#button-create-new-survey').css('display', 'none'); + $( + `
    Créez un nouveau sondage (ici) puis liez le avec cet espace. (ici)
    `, + ).appendTo($main); + } else { + $('#button-create-new-survey').css('display', ''); + init_clicks(); + } + } + + archive(archive = true) { + this.busy(); + let bool; + if (archive) + bool = confirm( + 'Êtes-vous sûr de vouloir archiver cet espace de travail ?', + ); + else + bool = confirm( + 'Êtes-vous sûr de vouloir désarchiver cet espace de travail ?', + ); + + if (bool) { + return this.ajax( + this.url('archive_workspace'), + { + _uid: this.uid, + }, + (datas) => { + if (archive) this.quit(); + else window.location.reload(); + }, + (a, b, c) => { + this.busy(false); + console.error(a, b, c); + rcmail.display_message( + "Impossible d'archiver cet espace, regardez la console pour plus d'informations.", + 'error', + ); + }, + ); + } else return this.busyAsync(false); + } + + quit() { + this.busy(); + this.set_body_loading(); + window.location.href = + rcmail.env.current_workspace_back === undefined || + rcmail.env.current_workspace_back === null + ? this.url() + : rcmail.env.current_workspace_back; + } + + endDateChanged() { + //$("#wsp-param-chg-button-enddate").removeAttr("disabled").removeClass("disabled"); + return this.updateButtonState($('#wsp-param-chg-button-enddate')); + } + + updateButtonState(jquery, enable = true) { + if (enable && jquery.hasClass('disabled')) { + jquery.removeAttr('disabled').removeClass('disabled'); + } else if (!enable && !jquery.hasClass('disabled')) { + jquery.attr('disabled', 'disabled').addClass('disabled'); + } + + return this; + } + + paramUpdated($button, newVal = null, authorizeEmpty = false) { + let $jquery = $button; + let $input = $jquery.parent().parent().find('input'); + + if ($input.length === 0) + $input = $jquery.parent().parent().find('textarea'); + + if (newVal !== null) $input.val(newVal); + + const val = $input.val(); + const empty = ''; + if ( + (val !== empty || authorizeEmpty) && + val !== $input.attr('placeholder') + ) + return this.updateButtonState($jquery); + else return this.updateButtonState($jquery, false); + } + + titleUpdated(newVal = null) { + return this.paramUpdated($('#wsp-param-btn-title'), newVal); + } + } + Object.defineProperty(Workspace_Param, 'data_null', { + enumerable: false, + configurable: false, + writable: false, + value: Symbol('null'), + }); + + $(document).ready(() => { + rcmail.env.WSP_Param = new Workspace_Param( + rcmail.env.current_workspace_uid, + ); + rcmail.register_command( + 'workspace.changeColor', + (x) => rcmail.env.WSP_Param.changeColor(x), + true, + ); + rcmail.register_command( + 'workspace.add_users', + () => rcmail.env.WSP_Param.add_user(), + true, + ); + rcmail.register_command( + 'workspace.update_user', + (x) => rcmail.env.WSP_Param.update_user_right(x), + true, + ); + rcmail.register_command( + 'workspace.remove_user', + (x) => rcmail.env.WSP_Param.delete_user(x), + true, + ); + rcmail.register_command( + 'workspace.leave', + () => rcmail.env.WSP_Param.leave(), + true, + ); + rcmail.register_command( + 'workspace.delete', + () => rcmail.env.WSP_Param.delete(), + true, + ); + rcmail.register_command( + 'workspace.join', + () => rcmail.env.WSP_Param.join(), + true, + ); + rcmail.register_command( + 'workspace.go', + () => { + rcmail.env.WSP_Param.quit(); + }, + true, + ); + rcmail.register_command( + 'workspace.archive', + () => rcmail.env.WSP_Param.archive(), + true, + ); + rcmail.register_command( + 'workspace.update_app', + (e) => rcmail.env.WSP_Param.update_app(e), + true, + ); + rcmail.register_command( + 'workspace.unarchive', + () => rcmail.env.WSP_Param.archive(false), + true, + ); + rcmail.register_command( + 'workspace.changeLogo', + (x) => rcmail.env.WSP_Param.update_workspace_logo(x), + true, + ); + rcmail.register_command( + 'workspace.change_visibility', + () => rcmail.env.WSP_Param.change_visibility(), + true, + ); + rcmail.register_command( + 'workspace.compose', + () => rcmail.env.WSP_Param.compose(), + true, + ); + rcmail.register_command( + 'workspace.webconf', + () => rcmail.env.WSP_Param.create_webconf(), + true, + ); + rcmail.register_command( + 'workspace.webconf.needParams', + () => rcmail.env.WSP_Param.create_webconf(true), + true, + ); + rcmail.register_command( + 'workspace.update_end_date', + (jquery) => rcmail.env.WSP_Param.update_end_date(jquery.val()), + true, + ); + rcmail.register_command( + 'workspace.toggle_bar_color', + () => { + rcmail.env.WSP_Param.toggle_nav_color(); + }, + true, + ); + rcmail.register_command( + 'workspace.update_primary_parameter', + (config) => { + rcmail.env.WSP_Param.update_primary_parameters(config); + }, + true, + ); + rcmail.register_command( + 'workspace.survey.create', + () => { + rcmail.env.WSP_Param.create_survey(); + }, + true, + ); + rcmail.register_command( + 'workspace.survey.edit', + (survey) => { + rcmail.env.WSP_Param.create_survey(survey); + }, + true, + ); + rcmail.register_command( + 'workspace.survey.delete', + (sid) => { + rcmail.env.WSP_Param.delete_survey(sid); + }, + true, + ); + rcmail.register_command( + 'workspace.sync_list', + rcmail.env.WSP_Param.sync_list_member.bind(rcmail.env.WSP_Param), + true, + ); + rcmail.register_command( + 'workspace.remove_list', + rcmail.env.WSP_Param.delete_list.bind(rcmail.env.WSP_Param), + true, + ); + rcmail.register_command( + 'workspace.update_title', + () => { + if ( + !confirm(rcmail.gettext('change_title_confirmation', 'mel_workspace')) + ) + return; + rcmail.env.WSP_Param.update_primary_parameters({ + type: 'title', + input: $('#spaceTitle'), + checks: 'empty;already-exist', + text_on_error: + "Une erreur est survenue.\r\nImpossible de changer le titre de l'espace.", + text_on_succes: 'Le titre a été changer avec succès.', + }); + }, + true, + ); + rcmail.register_command( + 'workspace.update_desc', + (isDelete = false) => { + let $input = $('#spaceDesc'); + if (isDelete) $input.val(''); + + rcmail.env.WSP_Param.update_primary_parameters({ + type: 'desc', + input: $input, + checks: 'already-exist', + text_on_error: + "Une erreur est survenue.\r\nImpossible de changer la description de l'espace.", + text_on_succes: 'la description a été changer avec succès.', + action: (data, config, newValue, empty) => { + $('#wsp-desc-desc').html(newValue); + config.input.attr( + 'placeholder', + newValue === empty ? 'Nouvelle description....' : newValue, + ); + rcmail.env.WSP_Param.paramUpdated($('#wsp-param-btn-desc'), empty); + }, + }); + }, + true, + ); + rcmail.register_command( + 'workspace.update_hashtag', + (isDelete = false) => { + let $input = $('#spaceHashtag'); + + if ($input.val().includes('#')) + $input.val($input.val().replaceAll('#', '')); + + if (isDelete) $input.val(''); + + $('#list-of-all-hashtag-param').css('display', 'none'); + + rcmail.env.WSP_Param.update_primary_parameters({ + type: 'hashtag', + input: $input, + checks: 'already-exist', + text_on_error: + "Une erreur est survenue.\r\nImpossible de changer la thématique de l'espace.", + text_on_succes: 'la thématique a été changer avec succès.', + action: (data, config, newValue, empty) => { + let $querry = $('.wsp-head .col-10'); + let $span = $querry.children()[0]; + + if ($span.nodeName === 'SPAN') $span = $($span); + else $span = false; + + const hashtag = + newValue.includes('#') || newValue === empty + ? newValue + : `#${newValue}`; + + if (hashtag !== empty) { + if ($span !== false) $span.html(hashtag); + else { + $span = null; + $querry.prepend(`${hashtag}`); + } + } else if ($span !== false) $span.remove(); + + config.input.attr( + 'placeholder', + newValue === empty ? 'Nouvelle thématique....' : newValue, + ); + rcmail.env.WSP_Param.paramUpdated( + $('#wsp-param-btn-hashtag'), + empty, + ); + }, + }); + }, + true, + ); + + rcmail.addEventListener('onHashtagChange', (selector) => { + if (selector.input === '#spaceHashtag') { + rcmail.env.WSP_Param.paramUpdated($('#wsp-param-btn-hashtag')); + } + }); + //init end + }); })(); diff --git a/plugins/mel_workspace/js/workspace.js b/plugins/mel_workspace/js/workspace.js index 697aa193c..b2876a57b 100644 --- a/plugins/mel_workspace/js/workspace.js +++ b/plugins/mel_workspace/js/workspace.js @@ -217,6 +217,24 @@ function Start(uid, hasAriane, datas) { hasAriane, datas, }); + + top.rcmail.add_event_listener_ex('frame_loaded', 'wsp-tchap', (args) => { + if ( + top.rcmail.env.current_task === 'workspace' && + args.eClass === 'tchap' + ) { + top + .$('.tchap-frame')[0] + .contentWindow.$('#tchap_frame') + .attr( + 'src', + rcmail.env.tchap_url + + '#/room/' + + top.current_workspace_in_background.get()[0].contentWindow.rcmail + .env.current_workspace_tchap_channel.id, + ); + } + }); } /** @@ -1241,20 +1259,19 @@ async function InitLinks() { } }); - // $("#button-create-new-ulink").click(() =>{ - // GetLinkPopUp().setLinkEditor(new MelLink(), "workspace", "update_ulink", {_workspace_id:rcmail.env.current_workspace_uid}, async (result) => { - - // if (result) - // { - // await mel_metapage.Functions.callAsync(`$(".links-frame").remove()`, false); - // $(".wsp-toolbar-item.wsp-links").click(); - // } - - // GetLinkPopUp().hide(); - // }).show(); - // }); - - } + // $("#button-create-new-ulink").click(() =>{ + // GetLinkPopUp().setLinkEditor(new MelLink(), "workspace", "update_ulink", {_workspace_id:rcmail.env.current_workspace_uid}, async (result) => { + + // if (result) + // { + // await mel_metapage.Functions.callAsync(`$(".links-frame").remove()`, false); + // $(".wsp-toolbar-item.wsp-links").click(); + // } + + // GetLinkPopUp().hide(); + // }).show(); + // }); + } } function PaperClipCopy(link) { diff --git a/plugins/mel_workspace/localization/fr_FR.inc b/plugins/mel_workspace/localization/fr_FR.inc index 6c80fb52a..83b9a62d2 100644 --- a/plugins/mel_workspace/localization/fr_FR.inc +++ b/plugins/mel_workspace/localization/fr_FR.inc @@ -9,6 +9,7 @@ $labels['documents'] = 'Documents'; $labels['rocketchat'] = 'Discussion'; $labels['tasks'] = 'Tâches'; $labels['params'] = 'Paramètres'; +$labels['tchap'] = 'Tchap'; $labels['create_event'] = 'Créer un évènement'; $labels['create_task'] = 'Créer une tâche'; $labels["open_ariane"] = "Afficher la discussion instantanée de l'espace de travail"; diff --git a/plugins/mel_workspace/mel_workspace.php b/plugins/mel_workspace/mel_workspace.php index 28947660c..7822a5f17 100644 --- a/plugins/mel_workspace/mel_workspace.php +++ b/plugins/mel_workspace/mel_workspace.php @@ -34,6 +34,7 @@ class mel_workspace extends bnum_plugin public $workspaces; private $currentWorkspace; private $channel_enabled; + private $tchap_channel_enabled; private $folders = ["init", "lib"]; static private $listenersSet; @@ -45,8 +46,7 @@ public function init() { $this->require_plugin('mel_helper'); $this->setup(); - $this->include_stylesheet($this->local_skin_path().'/workspaces.css'); - $this->include_stylesheet('../mel_useful_link/skins/elastic/links.css'); + $this->include_stylesheet($this->local_skin_path().'/workspaces.css'); $this->include_script('js/init/classes/WSPNotifications.js'); $this->include_script('js/init/classes/RoundriveShow.js'); $this->include_script('js/init/classes/WorkspaceDrive.js'); @@ -119,7 +119,6 @@ function setup() */ function portal() { - $this->include_css(); $this->include_js(); $this->register_action('index', array($this, 'index')); @@ -158,6 +157,7 @@ function portal() $this->register_action('delete_survey', [$this, 'delete_survey']); $this->register_action('check_service_async', [$this, 'check_service_action']); $this->register_action('create_service_async', [$this, 'create_service_action']); + $this->register_action('change_tchap_room', [$this, 'change_tchap_room']); //stockage_user_updated //toggle_nav_color } @@ -565,6 +565,11 @@ function show_workspace() $this->channel_enabled = $this->check_channel($this->get_object($this->currentWorkspace, self::CHANNEL)->id); $this->rc->output->set_env("current_workspace_channel", $this->get_object($this->currentWorkspace, self::CHANNEL)); } + if ($services[self::TCHAP_CHANNEL]) + { + $this->tchap_channel_enabled = $this->check_tchap_channel($this->get_object($this->currentWorkspace, self::TCHAP_CHANNEL)->id); + $this->rc->output->set_env("current_workspace_tchap_channel", $this->get_object($this->currentWorkspace, self::TCHAP_CHANNEL)); + } } catch (\Throwable $th) { //throw $th; } @@ -678,6 +683,7 @@ function get_toolbar() "params" => "settings", "links" => "link", "information" => "info", + "tchap" => "forum" ]; $vseparate = ""; @@ -689,6 +695,8 @@ function get_toolbar() if ($this->channel_enabled !== null && $services[self::CHANNEL]) $services[self::CHANNEL] = $this->channel_enabled; + if ($this->tchap_channel_enabled !== null && $services[self::TCHAP_CHANNEL]) + $services[self::TCHAP_CHANNEL] + $this->tchap_channel_enabled; $wekan_board_id = ""; $email = $services[self::EMAIL] ? self::get_wsp_mail($this->currentWorkspace->uid) ?? "" : ""; @@ -714,7 +722,7 @@ function get_toolbar() { if ($services[self::AGENDA] || $services[self::EMAIL] || $services[self::CHANNEL] - || $services[self::TASKS] || $services[self::CLOUD] || $is_admin) + || $services[self::TASKS] || $services[self::CLOUD] || $services[self::TCHAP_CHANNEL] || $is_admin) $html .= $vseparate; if ($services[self::EMAIL]) @@ -722,7 +730,7 @@ function get_toolbar() $onclick = "ChangeToolbar('mail', this)"; $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => $onclick, "class" => "$add_classes wsp-toolbar-item wsp-mail"], "".$icons["mail"]."".$this->rc->gettext("mail", "mel_workspace").""); - if ($services[self::CHANNEL] || $services[self::CLOUD] || $services[self::AGENDA] || $services[self::TASKS] || $is_admin) + if ($services[self::CHANNEL] || $services[self::CLOUD] || $services[self::AGENDA] || $services[self::TASKS] || $services[self::TCHAP_CHANNEL] || $is_admin) $html .= $vseparate; } @@ -731,7 +739,7 @@ function get_toolbar() $onclick = "ChangeToolbar('calendar', this)"; $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => $onclick, "class" => "$add_classes wsp-toolbar-item wsp-agenda"], "".$icons["agenda"]."".$this->rc->gettext("calendar", "mel_workspace").""); - if ($services[self::CHANNEL] || $services[self::CLOUD] || $services[self::TASKS] || $is_admin) + if ($services[self::CHANNEL] || $services[self::CLOUD] || $services[self::TASKS] || $services[self::TCHAP_CHANNEL] || $is_admin) $html .= $vseparate; } @@ -760,11 +768,28 @@ function get_toolbar() $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => $click,"style"=>"display:none","data-isId" => false, "class" => "$add_classes wsp-toolbar-item wsp-ariane", "id"=>"ariane-notexist"], "".$this->rc->gettext("rocketchat", "mel_workspace").""); } - if ($services[self::TASKS] || $services[self::CLOUD] || $is_admin) + if ($services[self::TASKS] || $services[self::CLOUD] || $services[self::TCHAP_CHANNEL] || $is_admin) $html .= $vseparate; } } + if ($services[self::TCHAP_CHANNEL]) + { + + $channel_datas = $this->get_object($this->currentWorkspace, self::TCHAP_CHANNEL); + if (class_exists('tchap')) $channel_name = tchap::get_room_name($this->get_object($workspace, self::TCHAP_CHANNEL)->id); + $click = "ChangeToolbar('tchap', this)"; + + try { + $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => $click,"data-isId" => true, "class" => "$add_classes wsp-toolbar-item wsp-ariane", "id"=>"tchap"], "".$icons["tchap"]."".$this->rc->gettext("tchap", "mel_workspace").""); + } catch (\Throwable $th) { + $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => $click,"style"=>"display:none","data-isId" => false, "class" => "$add_classes wsp-toolbar-item wsp-ariane", "id"=>"tchap-notexist"], "".$this->rc->gettext("tchap", "mel_workspace").""); + } + + if ($services[self::TASKS] || $services[self::CLOUD] || $is_admin) + $html .= $vseparate; + } + if ($services[self::CLOUD]) { $html .= html::tag("button",["data-email" => $email, "data-wekan" => $wekan_board_id, "data-uid" => $uid, "onclick" => "ChangeToolbar('stockage', this)" ,"class" => "$add_classes wsp-toolbar-item wsp-documents"], "".$icons["documents"]."".$this->rc->gettext("documents", "mel_workspace").""); @@ -1044,6 +1069,7 @@ function toggle_nav_color() const GROUP = "annuaire"; const WEKAN = "wekan"; const LINKS = "useful-links"; + const TCHAP_CHANNEL = "tchap-channel"; public function get_worskpace_services($workspace, $services_to_remove = false, $forceIsInWorkspace = false) { @@ -1057,11 +1083,16 @@ public function get_worskpace_services($workspace, $services_to_remove = false, self::EMAIL => $is_in_wsp && $this->get_object($workspace, self::GROUP) === true, self::CLOUD => $is_in_wsp && $this->get_object($workspace, self::CLOUD) === true, self::WEKAN => $is_in_wsp && $this->get_object($workspace, self::WEKAN) !== null, - self::LINKS => $is_in_wsp && $this->get_object($workspace, self::LINKS) !== null + self::LINKS => $is_in_wsp && $this->get_object($workspace, self::LINKS) !== null, + self::TCHAP_CHANNEL => $is_in_wsp && $this->get_object($workspace, self::TCHAP_CHANNEL) !== null ]; - if ($datas[self::TASKS] && !$datas[self::WEKAN]) - $datas[self::WEKAN] = true; + if ($datas[self::TASKS] && !$datas[self::WEKAN]) $datas[self::WEKAN] = true; + + if (driver_mel::gi()->getUser()->is_external) { + $datas[self::AGENDA] = false; + $datas[self::EMAIL] = false; + } if ($services_to_remove) { @@ -1240,6 +1271,9 @@ function get_services() if ($services[self::CHANNEL] && $this->channel_enabled !== null) $services[self::CHANNEL] = $this->channel_enabled; + if($services[self::TCHAP_CHANNEL] && $this->channel_enabled !== null) + $services[self::TCHAP_CHANNEL] = $this->channel_enabled; + //Email ou discussion if ($services[self::EMAIL] || $services[self::CHANNEL]) { @@ -1374,6 +1408,7 @@ function get_services() if ($services[self::LINKS]) { + $this->include_stylesheet('../mel_useful_link/skins/elastic/links.css'); $this->get_workspace_ulinks(); $before_body_component[] = html::div(["class" => "ressources-links tab-ressources mel-tab-content", "style" => "¤¤¤;text-align: right;"], @@ -1544,6 +1579,8 @@ function setup_user_page() $user = driver_mel::gi()->getUser($value->user); $tmp = $user->name; + if (!isset($user)) continue; + if (isset($tmp) || $tmp !== '') { $html .= html::div(["class" => "row"], @@ -1558,7 +1595,7 @@ function setup_user_page() html::tag("span", ["class" => "email"], driver_mel::gi()->getUser($value->user)->email ?? 'Adresse inconnue') ) ); - $env[$user->email] = ['email' => $user->email, 'name' => $user->name, 'fullname' => $user->fullname]; + $env[$user->email] = ['email' => $user->email, 'name' => $user->name, 'fullname' => $user->fullname, 'is_external' => $user->is_external]; } } @@ -1681,9 +1718,14 @@ function setup_params_apps($workspace) $count = 0; foreach ($services as $key => $value) { - if ($key === self::LINKS || $key === self::EMAIL || $key === self::AGENDA /*|| ($key === self::CLOUD && $value)*/ || $key === self::WEKAN) + if ($key === self::LINKS || $key === self::EMAIL || $key === self::AGENDA || ($key === self::CHANNEL && !$value) || $key === self::WEKAN) continue; + if ($key === self::CLOUD && + (!mel_helper::stockage_active() || + (mel_metapage::have_0_quota() && mel_helper::stockage_active()) + )) continue; + $info = $this->get_type_config($config, $key); $html.= ''; $html.= ' '.$info["name"]; @@ -1695,7 +1737,10 @@ function setup_params_apps($workspace) $html.= html::tag("button", ["title" => ($this->channel_enabled === false ? "Vous n'avez pas accès au canal courant ! Demandez à ce que l'on vous rajoute ou changez de canal avec ce bouton !" : "Choisissez un nouveau canal !"), "id" => "update-channel-button","class" => "mel-button param-button ".($this->channel_enabled === false ? "btn-danger btn" : "") ], "Changer de canal".html::tag("span", ["class" => "plus icon-mel-pencil"])); else if ($key === self::TASKS) $html.= html::tag("button", ["title" => "Choisissez un nouveau tableau !", "id" => "update-wekan-button","class" => "mel-button param-button " ], "Changer de tableau".html::tag("span", ["class" => "plus icon-mel-pencil"])); - + else if ($key === self::TCHAP_CHANNEL) { + $html.= ' ('. tchap::get_room_name($this->get_object($this->currentWorkspace, self::TCHAP_CHANNEL)->id) .')'; + $html.= html::tag("button", ["title" => ($this->tchap_channel_enabled === false ? "Vous n'avez pas accès au canal courant ! Demandez à ce que l'on vous rajoute ou changez de canal avec ce bouton !" : "Choisissez un nouveau canal !"), "id" => "update-tchap-channel-button","class" => "mel-button param-button ".($this->tchap_channel_enabled === false ? "btn-danger btn" : "") ], "Changer de canal tchap".html::tag("span", ["class" => "plus icon-mel-pencil"])); + } $class = "btn btn-danger hidden mel-button no-button-margin"; $span = $icons["minus"]; $func = ''; @@ -1746,13 +1791,16 @@ function setup_params_rights($workspace) $html = ''; $html .= ""; - $html .= ""; + $html .= ""; $html .= ""; $share = $this->sort_user($workspace->shares); $current_user = driver_mel::gi()->getUser(); foreach ($share as $key => $value) { $user =driver_mel::gi()->getUser($value->user); + + if (!isset($user)) continue; + $from_list = $this->_check_if_is_in_list($workspace, $value->user); $html .= ""; $html .= '"; @@ -1764,7 +1812,7 @@ function setup_params_rights($workspace) $html .= ''; $html .= ""; - $env[$user->email] = ['email' => $user->email, 'name' => $user->name, 'fullname' => $user->fullname]; + $env[$user->email] = ['email' => $user->email, 'name' => $user->name, 'fullname' => $user->fullname, 'is_external' => $user->is_external]; } $this->rc->output->set_env('current_workspace_users', $env); @@ -1816,14 +1864,6 @@ function setup_params_value($icons, $titles, $current_titles, $rights, $user) // $html .= ""; // return $html; } - /** - * Récupère le css utile pour ce plugin. - */ - function include_css() - { - // Ajout du css - //$this->include_stylesheet($this->local_skin_path().'/workspaces.css'); - } function include_js() { @@ -1880,6 +1920,21 @@ function block($id,$class, $header, $body, $onclick, $title_button, $attribs = n return $html; } + /** + * Création de l'espace de travail + * + * @param string avatar POST + * @param string title POST + * @param string uid POST + * @param string desc POST + * @param string end_date POST + * @param string hashtag POST + * @param string visibility POST + * @param array users POST + * @param string services POST + * @param string color POST + * @param string service_params POST + */ function create() { try { @@ -1929,22 +1984,39 @@ function create() $count = count($datas["users"]); - for ($i=0; $i < $count; ++$i) { - $tmp_user = driver_mel::gi()->getUser(null, true, false, null, $datas["users"][$i]); + for ($i=0; $i < $count; ++$i) { + $email = $datas["users"][$i]; + $tmp_user = driver_mel::gi()->getUser(null, true, false, null, $email); + $user_exists = true; + $just_created = false; - if ($tmp_user->uid === null && !$tmp_user->is_list) $retour["errored_user"][] = $datas["users"][$i]; - else { + if ($tmp_user->uid === null && !$tmp_user->is_list) { + if (rcmail::get_instance()->config->get('enable_external_users', false)) { + $user_exists = driver_mel::gi()->create_external_user($email, $workspace); + $just_created = true; + } + else { + $user_exists = false; + } + + if ($user_exists) { + $tmp_user = driver_mel::gi()->getUser(null, true, false, null, $email); + } + else { + $retour["errored_user"][] = $email; + } + } + + if ($user_exists) { foreach ($this->_add_internal_user($workspace, $tmp_user) as $added_user) { - if ($added_user !== $user->uid && $added_user !== null) - { + if ($added_user !== $user->uid && $added_user !== null) { $retour["existing_users"][] = $added_user; $share = driver_mel::gi()->workspace_share([$workspace]); $share->user = $added_user; $share->rights = Share::RIGHT_WRITE; $shares[] = $share; - if (class_exists("mel_notification")) - { + if (class_exists("mel_notification") && !$just_created) { $this->_notify_user($added_user, $workspace, $added_user); } } @@ -2089,7 +2161,8 @@ function create_services(&$workspace,$services, $users = null, $update_wsp = tru $services = $this->create_tasklist($workspace,$services, $users, $update_wsp, $default_values); $services = $this->create_agenda($workspace, $services, $users, $update_wsp); - $services = $this->create_channel($workspace, $services, $users, $default_values); + //$services = $this->create_channel($workspace, $services, $users, $default_values); + $services = $this->create_tchap_channel($workspace, $services, $users, $default_values); $services = $this->create_service_group($workspace, $services, $fromUpdateApp); $this->create_service_links($workspace); @@ -2109,7 +2182,7 @@ function create_service_group(&$workspace, $services, $fromUpdateApp = false) $create_nc = $search !== false; if (!$create_nc && $fromUpdateApp) - return $service; + return $services; $this->create_group($workspace, $create_nc); @@ -2264,7 +2337,6 @@ function create_channel(&$workspace, $services, $users, $default_values = null) $uid = $this->generate_channel_id_via_uid($workspace->uid); case 'custom_name': if (!isset($uid)) $uid = $this->generate_channel_id_via_uid($default_values['channel']['value']); - $rocket = $this->rc->plugins->get_plugin('rocket_chat'); $value = $rocket->_create_channel($uid, $users,$workspace->ispublic === 0 ? false : true); break; @@ -2309,6 +2381,60 @@ function create_channel(&$workspace, $services, $users, $default_values = null) return $services; } + function create_tchap_channel(&$workspace, $services, $users, $default_values = null) + { + $service = self::TCHAP_CHANNEL; + mel_logs::get_instance()->log(mel_logs::DEBUG, "[mel_workspace->create_channel]Services : ".json_encode($service)." => $service"); + mel_logs::get_instance()->log(mel_logs::DEBUG, "[mel_workspace->create_channel]Can enter : ".($this->get_object($workspace,$service) === null && array_search($service, $services) !== false)); + + if ($this->get_object($workspace,$service) === null && array_search($service, $services) !== false) + { + $default_values_key = "tchap-channel"; + if (!isset($default_values)) $default_values = [$default_values_key => ['mode' => 'default']]; + else if (!isset($default_values[$default_values_key])) $default_values[$default_values_key] = ['mode' => 'default']; + + $uid = null; + $value = null; + $config = []; + switch ($default_values[$default_values_key]['mode']) { + case 'default': + $uid = $workspace->uid; + case 'custom_name': + if (!isset($uid)) $uid = $default_values[$default_values_key]['value']; + if (class_exists('tchap')) $value = tchap::create_tchap_room($uid, $users); + + break; + + case 'already_exist': + $value = $default_values[$default_values_key]['value']['id']; + + $config['edited'] = true; + break; + default: + return $this->create_tchap_channel($workspace, $services, $users, null); + } + mel_logs::get_instance()->log(mel_logs::DEBUG, "[mel_workspace->create_tchap_channel]Valeur : ".json_encode($value)); + + if (is_string($value)) + { + $config['id'] = $value; + } + else { + $value = $value["content"]["channel"]; + $config['id'] = $value["_id"]; + } + + $this->save_object($workspace, self::TCHAP_CHANNEL, $config); + } + + $key = array_search($service, $services); + + if ($key !== false) + unset($services[$key]); + + return $services; + } + function create_favorites(&$workspace, $services) { @@ -2708,39 +2834,59 @@ function update_setting($uid, $key, $value, $check_if_user_is_admin = false) return $workspace; } + /** + * Add users to workspace + * + * @param string _uid POST + * @param array _users POST + */ function add_users() { //get input $uid = rcube_utils::get_input_value("_uid", rcube_utils::INPUT_POST); - $users = rcube_utils::get_input_value("_users", rcube_utils::INPUT_POST); + $tmp_users = rcube_utils::get_input_value("_users", rcube_utils::INPUT_POST); // $workspace = self::get_workspace($uid); //get users - $count = count($users); - $tmp_users = $users; $users = []; + $noNotifUsers = []; $unexistingUsers = []; foreach ($tmp_users as $key => $value) { $tmp_user = driver_mel::gi()->getUser(null, true, false, null, $value); + $user_exists = true; + + if ($tmp_user->uid === null && !$tmp_user->is_list) { + if (rcmail::get_instance()->config->get('enable_external_users', false)) { + $user_exists = driver_mel::gi()->create_external_user($value, $workspace); + } + else { + $user_exists = false; + } + + if ($user_exists) { + $tmp_user = driver_mel::gi()->getUser(null, true, false, null, $value); + $noNotifUsers[] = $value; + } + else { + $unexistingUsers[] = $value; + } + } - if ($tmp_user->uid !== null || $tmp_user->is_list) { + if ($user_exists) { foreach ($this->_add_internal_user($workspace, $tmp_user) as $cuser) { $users[] = $cuser; } } - else $unexistingUsers[] = $value; } - if (count($users) === 0) - { + if (count($users) === 0) { echo "no one was found"; exit; } else { //get workspace - if (self::is_admin($workspace)) - { - $this->_add_users($workspace, $users); + if (self::is_admin($workspace)) { + $this->_add_users($workspace, $users, null, $noNotifUsers); self::edit_modified_date($workspace, false); //save $workspace->save(); @@ -2753,7 +2899,17 @@ function add_users() } } - function _add_users(&$workspace, $users) + /** + * Add users to workspace + * + * @param Workspace $workspace + * @param array $users + * @param boolean $noNotif + * @param array $noNotifUsers + * + * @return void + */ + function _add_users(&$workspace, $users, $noNotif = false, $noNotifUsers = []) { //get services $services = $this->get_worskpace_services($workspace, true, true); @@ -2769,7 +2925,7 @@ function _add_users(&$workspace, $users) $share->rights = Share::RIGHT_WRITE; $shares[] = $share; - if (class_exists("mel_notification")) + if (class_exists("mel_notification") && !$noNotif && !in_array($users[$i], $noNotifUsers)) { $this->_notify_user($users[$i], $workspace, $users[$i]); } @@ -2786,11 +2942,13 @@ function _add_users(&$workspace, $users) try { if (!(array_search(self::CHANNEL, $services) === false)) { + $rocket = $this->rc->plugins->get_plugin('rocket_chat'); - if ($workspace->uid === "apitech-1") - $rocket->add_users($users, $this->get_object($workspace, self::CHANNEL), $workspace->ispublic === 0 ? true : false); - else - $rocket->add_users($users, $this->get_object($workspace, self::CHANNEL)->id, $workspace->ispublic === 0 ? true : false); + $rocket->add_users($users, $this->get_object($workspace, self::CHANNEL)->id, $workspace->ispublic === 0 ? true : false); + } + if(!(array_search(self::TCHAP_CHANNEL, $services) === false)) + { + if (class_exists('tchap')) $value = tchap::invite_tchap_user($this->get_object($workspace, self::TCHAP_CHANNEL)->id, $users); } } catch (\Throwable $th) { //throw $th; @@ -2838,6 +2996,14 @@ function delete_services_for_user(&$workspace, $user, $services_to_delete) //throw $th; } break; + case self::TCHAP_CHANNEL: + try { + //kick du salon tchap + if (class_exists('tchap')) $value = tchap::kick_member($this->get_object($workspace, self::TCHAP_CHANNEL)->id, $user); + } catch (\Throwable $th) { + //throw $th; + } + break; case self::TASKS: include_once "../mel_moncompte/ressources/tasks.php"; $tasklist = $this->get_object($workspace,self::TASKS); @@ -3050,6 +3216,19 @@ function delete_workspace() $rocket->delete_channel($this->get_object($workspace, self::CHANNEL)->id, $workspace->ispublic === 0 ? true : false); } } + if ($services[self::TCHAP_CHANNEL]) + { + $can =true; + try { + $can = !($this->get_object($workspace, self::TCHAP_CHANNEL)->edited ?? false); + } catch (\Throwable $th) { + //throw $th; + } + if ($can) + { + if (class_exists('tchap')) $value = tchap::delete_tchap_room($this->get_object($workspace, self::TCHAP_CHANNEL)->id); + } + } } catch (\Throwable $th) { throw $th; @@ -3086,6 +3265,7 @@ function update_app() } $users = $tmp_users; unset($tmp_user); + if (class_exists('tchap')) $value = tchap::create_tchap_room($workspace->uid, $users); $rocket = $this->rc->plugins->get_plugin('rocket_chat'); $value = $rocket->_create_channel($workspace->uid, $users,$workspace->ispublic === 0 ? false : true); if (is_string($value["content"])) @@ -3124,6 +3304,21 @@ function update_app() $rocket->delete_channel($this->get_object($workspace, self::CHANNEL)->id, $workspace->ispublic === 0 ? true : false); } + break; + case self::TCHAP_CHANNEL: + $can = true; + try { + if ($this->get_object($workspace, self::TCHAP_CHANNEL)->edited ?? false) + $can = false; + } catch (\Throwable $th) { + //throw $th; + } + + if ($can) + { + if (class_exists('tchap')) tchap::delete_tchap_room($this->get_object($workspace, self::TCHAP_CHANNEL)->id); + } + break; case self::AGENDA: break; @@ -3163,9 +3358,19 @@ function join_user() $workspace = self::get_workspace($uid); if ($workspace->ispublic === 1) { - $this->_add_users($workspace, [driver_mel::gi()->getUser()->uid]); + $this->_add_users($workspace, [driver_mel::gi()->getUser()->uid], true); self::edit_modified_date($workspace, false); $workspace->save(); + $admins = self::get_admins($workspace); + foreach($admins as $admin) + { + if (class_exists("mel_notification")) + { + mel_notification::notify('workspace', driver_mel::gi()->getUser()->name.' vient de rejoindre l\'espace "'.$workspace->title.'" !','',null,$admin); + } + } + //récupérer tout les admins du workspaces + //for each notif } else echo "denied"; @@ -3410,6 +3615,13 @@ function check_channel($channel_id) return $this->get_ariane()->check_if_room_exist($channel_id); } + function check_tchap_channel($room_id) + { + $value = false; + if(class_exists('tchap')) $value = tchap::check_if_room_exist($room_id); + return $value; + } + function check_channel_name($channel_name) { return $this->get_ariane()->check_if_room_exist_by_name($channel_name); @@ -3607,13 +3819,30 @@ public static function nb_users($workspace) public static function get_other_admin($workspace, $username = null) { $me = $username ?? driver_mel::gi()->getUser()->uid; - foreach ($workspace->shares as $key => $value) { - if ($key !== $me && self::is_admin($key)) - return $key; + $users = self::get_users($workspace); + foreach ($users as $user) { + if ($user !== $me && self::is_admin($user)) + return $user; } return null; } + public static function get_users($workspace){ + foreach ($workspace->shares as $key => $value) { + yield $key; + } + } + + public static function get_admins($workspace) + { + $users = self::get_users($workspace); + foreach ($users as $user){ + if(self::is_admin($workspace, $user)){ + yield $user; + } + } + } + public static function is_in_workspace($workspace, $username = null) { return $workspace->shares[$username ?? driver_mel::gi()->getUser()->uid] !== null; @@ -3641,6 +3870,12 @@ public static function generate_uid($title, $rc) $workspace = driver_mel::gi()->workspace(); $workspace->uid = $text."-".(++$it); } while ($workspace->exists()); + + do { + $workspace = driver_mel::gi()->workspace(); + $workspace->uid = $text."-".(++$it); + } while (driver_mel::gi()->if_group_exist($workspace->uid)); + return $text."-".$it; } @@ -3772,10 +4007,9 @@ public function create_group(&$workspace, $activate_drive) public function get_mails_from_workspace($workspace) { $mails = []; - $shares = $workspace->shares; - - foreach ($shares as $key => $value) { - $tmp = driver_mel::gi()->getUser($key)->email; + $users = self::get_users($workspace); + foreach ($users as $user) { + $tmp = driver_mel::gi()->getUser($user)->email; if (isset($tmp)) $mails[] = $tmp; } @@ -3961,7 +4195,7 @@ function get_arianes_rooms() function change_ariane_room() { $name = rcube_utils::get_input_value("_name", rcube_utils::INPUT_GPC); - $uid = rcube_utils::get_input_value("_uid", rcube_utils::INPUT_GPC); + $uid = rcube_utils::get_input_value("_uid", rcube_utils::INPUT_GPC); $name = $this->get_ariane()->room_info($name); $datas = ["id" => $name["content"]->room->_id, "name" => $name["content"]->room->name, "edited" => true]; @@ -3980,14 +4214,47 @@ function sync_workspace_chat($wsp, $room) { //p => group / c => channel $shares = $wsp->shares; + $users = self::get_users($wsp); $rocket = $this->get_ariane(); - foreach ($shares as $key => $user) { + foreach ($users as $user) { $room_id = $room->_id; $isPrivate = $room->t === 'p'; - $rocket->add_users([$key], $room_id, $isPrivate); - $rocket->update_owner($key, $room_id, $isPrivate, !self::is_admin($wsp, $key)); + $rocket->add_users([$user], $room_id, $isPrivate); + $rocket->update_owner($user, $room_id, $isPrivate, !self::is_admin($wsp, $user)); + } + } + + function change_tchap_room() + { + $uid = rcube_utils::get_input_value("_uid", rcube_utils::INPUT_GPC); + $room_id = rcube_utils::get_input_value("_room_uid", rcube_utils::INPUT_GP); + $config = []; + $config['id'] = $room_id; + if(class_exists('tchap') && tchap::check_if_room_exist($room_id)){ + $wsp = self::get_workspace($uid); + $this->sync_workspace_tchap($wsp, $room_id); + $this->save_object($wsp, self::TCHAP_CHANNEL, $config); + self::edit_modified_date($wsp, false); + $wsp->save(); + $value = true; + } else { + $value = false; + } + //si non + echo json_encode($value); + exit; + } + + function sync_workspace_tchap($wsp, $room_id) + { + $users = self::get_users($wsp); + if (class_exists('tchap')) + { + foreach ($users as $user) { + tchap::invite_tchap_user($room_id, $user); + } } } diff --git a/plugins/mel_workspace/skins/elastic/less/workspaces.less b/plugins/mel_workspace/skins/elastic/less/workspaces.less new file mode 100644 index 000000000..7c53fffc7 --- /dev/null +++ b/plugins/mel_workspace/skins/elastic/less/workspaces.less @@ -0,0 +1,991 @@ +// compress:false +.logo-mel { + position: absolute; + margin: 30px; + top: 0px; + left: 0px; + max-width: 150px; + &.startup { + &.mm-frame { + left: 60px; + top: 60px; + } + } +} +html.touch { + .logo-mel { + display: none; + } +} + +.wsp-content { + padding-left: 200px; + padding-right: 200px; + html.touch & { + padding-left: 15px; + padding-right: 15px; + } + html.layout-phone &, + html.layout-small & { + padding: 0px; + } +} + +.wsp-index { + html.layout-small & { + padding-left: 15px; + padding-right: 15px; + } +} + +.workspace { + position: relative; + background-color: #f0f0f0; + padding: 15px; + border-radius: 5px; + margin-top: 15px; +} + +.wsp-title { + white-space: nowrap; + display: block; + margin-bottom: 20px; +} + +.dwp-circle { + position: relative; + display: inline-block; + width: 42px; + height: 42px; + background-color: #80d5c6; + border-radius: 100%; + text-align: center; + color: inherit !important; + text-decoration: none !important; + -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 1), white); + mask-image: linear-gradient(rgba(0, 0, 0, 1), white); + margin-left: -15px; + vertical-align: middle; + &.dwp-user { + &:before { + content: ' '; + border-style: solid; + width: 44px; + height: 44px; + display: block; + position: absolute; + border-radius: 100%; + top: -1px; + left: -1px; + color: white; + border-width: 5px; + } + } + & > img { + height: 100%; + } + & > span { + font-size: x-large; + font-variant-caps: all-petite-caps; + } +} + +.wsp-users { + margin-left: 15px; +} + +.wsp-infos { + position: absolute; + bottom: 0; + html.layout-phone &, + html.layout-small & { + left: -95px; + } +} + +.centered { + text-align: center; +} + +.ariane-icon { + font-size: x-large; +} + +.roundbadge.ariane-notif, +.wsp-notif { + position: absolute; + right: 16px; + top: -4px; + height: 16px; + width: 16px; + line-height: 16px; + font-size: 8px; +} + +.header-wsp { + & > h1 { + font-size: xxx-large; + display: inline-block; + } + & > .roundbadge { + font-size: xx-large; + display: inline-block; + height: 60px; + width: 60px; + line-height: 63px; + border-radius: 100%; + color: white; + background-color: #2c3054; + } +} + +.wsp-header { + padding-bottom: 20px !important; + margin-top: 30px !important; +} + +.tak { + position: absolute; + right: 15px; + &.roundbadge { + font-size: 10px; + font-weight: normal; + height: 20px; + width: 20px; + text-decoration: none; + line-height: 20px; + color: #696d7f; + background-color: transparent; + &.active { + background-color: #fdcf42; + color: #2c3054; + } + &:hover { + background-color: white; + color: #2c3054; + } + &.unactive { + pointer-events: none; + color: #c2c4d1; + background-color: transparent; + } + &.disabled { + pointer-events: none; + color: red; + background-color: transparent; + } + } +} + +body { + &.task-workspace { + separate { + border-top-color: #e0e1e8; + border-top-style: solid; + border-top-width: thin; + margin: 50px 200px; + display: block; + } + .wsp-toolbar { + v_separate { + border-color: #647ccb; + margin: 15px 0; + } + } + } +} + +.wsp-toolbar { + display: flex; + background-color: #5870bf; + border-radius: 50px; + color: white; + width: 100%; + /* width: -moz-fit-content; */ + margin: auto; + position: sticky; + top: 0px; + z-index: 5; + html.layout-phone &, + html.layout-small & { + border-radius: 0px; + width: 100%; + margin: 0; + justify-content: center; + } +} + +.webconf-toolbar { + html.layout-phone &, + html.layout-small & { + border-radius: 50px; + width: unset; + margin: 0; + justify-content: center; + .wsp-toolbar-item { + display: initial; + } + } +} + +.wsp-toolbar-item { + font-size: xx-large; + padding: 0 50px; + border-left-style: solid; + border-color: #7786bd; + border-left-width: 2px; + margin: 10px 0; + position: relative; + button& { + body.task-workspace &, + .wsp-toolbar-edited & { + background-color: transparent; + border-color: transparent !important; + border-radius: 100%; + background-repeat: no-repeat !important; + box-shadow: none !important; + flex: 1 0 auto; + } + .wsp-toolbar-edited & { + font-size: 20px; + padding: 0 50px; + border-left-style: solid; + border-color: #7786bd; + border-left-width: 2px; + margin: 5px 0; + position: relative; + margin-bottom: 20px; + & > .text-item { + position: absolute; + font-size: 13px; + top: 22px; + right: 0; + text-align: center; + width: 100%; + white-space: nowrap; + } + } + } + body.task-workspace & { + font-size: 20px; + padding: 0 50px; + border-left-style: solid; + border-color: #7786bd; + border-left-width: 2px; + margin: 5px 0; + position: relative; + margin-bottom: 20px; + & > .text-item { + position: absolute; + font-size: 13px; + top: 22px; + right: 0; + text-align: center; + width: 100%; + white-space: nowrap; + } + & > span { + display: inline-block; + margin-top: 7px; + } + } + &.toolbar-btn-smaller { + padding: 0 20px !important; + margin-right: auto !important; + margin-left: auto !important; + } + &.first { + border-left-style: none !important; + } + &:hover, + &.active { + cursor: pointer; + background: radial-gradient( + circle, + #42548f 10%, + rgba(255, 255, 255, 0) 10% + ); /*29*/ + & > .mel-return { + color: white; + &:hover { + color: white; + } + } + } + button& { + &:focus { + box-shadow: none; + background: radial-gradient( + circle, + transparent 9%, + #484d7a4f 11%, + rgba(255, 255, 255, 0) 12% + ); + &:hover { + box-shadow: none; + background: radial-gradient( + circle, + #42548f 9%, + #484d7a4f 11%, + rgba(255, 255, 255, 0) 12% + ); + } + } + } + &.active, + &:active { + background: radial-gradient( + circle, + #42548f 10%, + rgba(255, 255, 255, 0) 10% + ) !important; + } + & > span { + display: inline-block; + margin-top: 10px; + } + &.active { + cursor: initial; + } +} + +html { + &.layout-phone, + &.layout-small { + body.task-workspace .wsp-toolbar-item, + .wsp-toolbar-edited button.wsp-toolbar-item { + & > .text-item { + display: none; + } + } + .wsp-toolbar-item { + margin: 10px auto; + border: none; + } + } + &.layout-normal { + .wsp-toolbar-item { + font-size: 18px; + padding: 0 40px; + } + body.task-workspace .wsp-toolbar-item.toolbar-btn-smaller { + padding: 0 30px; + } + } + &.touch { + .wsp-toolbar-item { + font-size: 20px; + padding: 0 25px; + } + body.task-workspace .wsp-toolbar-item.toolbar-btn-smaller { + padding: 0 25px; + } + .tiny-wsp-menu, + .added-wsp-item { + display: none; + } + } + &.layout-small { + .wsp-toolbar-item { + font-size: 20px; + padding: 0 15px !important; + } + body.task-workspace .wsp-toolbar-item.toolbar-btn-smaller { + padding: 0 15px; + } + .wsp-object, + .wsp-toolbar-title { + margin-right: 15px; + margin-left: 15px; + } + } + &.layout-phone { + .wsp-toolbar-item { + font-size: 15px; + padding: 0 20px; + } + } +} + +.notif { + &.roundbadge { + position: absolute; + top: -4px; + right: 15px; + color: black; + .wsp-toolbar & { + html.layout-normal & { + right: 15px; + } + html.touch & { + right: 15px; + top: -4px; + } + } + &.nc { + position: absolute; + top: 6px; + right: -20px; + color: black; + height: 15px; + width: 15px; + font-size: 15px; + line-height: 15px; + } + } +} + +.wsp-picture { + .dwp-round& { + margin-top: 10px; + width: 100%; + padding-top: 100%; + position: relative; + height: unset; + } + & > img { + position: absolute; + left: 0; + top: 0px; + left: 50%; + transform: translate(-50%, 0); + } + & > span { + position: absolute; + top: 50%; + left: 50%; + right: 0; + bottom: 0; + transform: translate(-50%, -50%); + line-height: 200%; + font-size: 2vw; + } +} +.row { + &.wsp-head { + margin-top: 30px; + margin-left: 75px; + margin-bottom: 20px; + html.layout-small &, + html.layout-phone & { + margin: 0 !important; + } + } +} + +.wsp-description { + background-color: #484d7a; + color: white; + padding: 25px; + border-radius: 5px; + margin-top: 30px; + & > div { + & > .wsp-font-size-modifier { + &.smaller { + font-size: smaller; + } + } + } +} + +.wsp-background-color-modifier { + &.dark-blue { + & > .dwp-user, + & > div > .dwp-user, + & > div > div > .dwp-user { + background-color: #363a5b; + } + } +} + +.dwp-user { + &.wsp-font-size-modifier { + &.smaller { + & > span { + font-size: medium; + line-height: 40px; + } + } + } +} + +.invite-button { + &.create { + background-color: #363a5b; + color: white; + &:hover { + background-color: #484d7a; + } + } +} + +.wsp-block { + background-color: #f0f0f0; + border-radius: 5px; + margin-top: 15px; + padding: 20px; +} + +.wsp-agenda-icon { + font-size: x-large; + position: relative; +} + +.block-body { + margin: 15px 0; + max-height: 200px; + overflow: auto; +} + +.roundbadge { + &.notif { + &.edited { + top: 0; + right: -3px; + } + } +} + +.font-size-large { + font-size: x-large; +} + +.nb-task { + justify-content: center; + display: flex; + & > span { + & > .nb { + margin-left: 5px; + } + } +} + +.tiny-wsp-menu { + cursor: pointer; + transition: all 0.1s ease-in; + &:hover { + background-color: #42548f !important; + & > img { + filter: saturate(7); + } + } + & > img { + transition: all 0.1s ease-in; + } +} + +.btn { + &.btn-primary { + &.o, + &.w { + background-color: white; + transition: all 0.1s ease-in; + border-color: #ced4da; + &:hover { + background-color: #484d7a; + border-color: #363a5b; + } + &.active { + background-color: #484d7a; + border-color: #363a5b; + pointer-events: none; + } + } + &.o { + color: #fdcf42; + &.active { + color: #fdcf42; + } + } + &.w { + color: initial; + &:hover { + color: white; + } + } + } +} + +.mel-button { + &.quit-button { + color: initial; + background-color: white; + border-color: #363a5b; + border-style: solid; + border-width: thin; + &:hover { + color: white; + background-color: #363a5b; + } + } +} + +separate { + &.wsp { + border-top-width: medium; + margin-right: 0px; + margin-left: 0px; + margin-top: 50px; + } +} + +.wsp-services { + h2 { + margin-top: 30px; + } +} + +.ariane-count { + &.roundbadge { + top: 0; + right: -10px; + } +} + +.wsp-ariane-header { + cursor: pointer; + & > .arrow { + transition: all 0.1s ease-in; + font-size: large; + } + &:hover { + & > .arrow { + color: #484d7a; + } + } +} + +.wsp-desc-block { + background-color: #484d7a; + color: white; + border-radius: 5px; + margin-top: 30px; + padding: 25px; +} + +.wsp-toolbar-edited { + top: unset; +} + +.pagination { + .mel-pagination { + margin: 0 auto; + margin-top: 30px; + max-width: min-content; + } +} + +.pagination-elements { + width: 100%; + display: flex; +} + +.pagination-number { + transition: all 0.1s ease-in; + margin: 0 auto; + font-size: large; + padding: 5px 10px; + cursor: pointer; + &.active { + cursor: none; + pointer-events: none; + } + &.active, + &:hover { + background: radial-gradient( + circle, + #42548f 48%, + rgba(255, 255, 255, 0) 48% + ); + color: white; + } +} + +.pagination-button { + background: none; + border: none; + color: inherit; + font-size: large; + transition: all 0.1s ease-in; + &:hover { + background-color: #42548f; + color: white; + border-radius: 60px; + } +} + +.pagination_prev { + &::before { + font-family: 'IcoFont'; + content: '\ea9d'; + font-size: larger; + margin-right: 5px; + } +} + +.pagination_next { + &::after { + font-family: 'IcoFont'; + content: '\eaa0'; + font-size: larger; + margin-left: 5px; + } +} + +.task-bureau { + .wsp-title { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: break-spaces; + } +} + +.wsp-notif-block { + display: inline-block; + position: relative; + float: right; + margin-top: 62px; + margin-left: 5px; + .roundbadge { + top: -5px; + right: -5px; + } +} + +.wsp-rd-row { + border: none; + border-radius: 0; + border-bottom-style: solid !important; + border-bottom-width: thin !important; + border-color: #c4c4c4 !important; + margin-bottom: 15px; + &.last, + &.open { + border-bottom: none !important; + } + &.open { + & + .open { + border-bottom-style: solid !important; + border-bottom-width: thin !important; + border-color: #c4c4c4 !important; + } + } + .col-arrow { + text-align: right; + } +} + +.child-for { + border-left-style: dashed; + padding-left: 25px; + margin-left: 15px; +} + +.wsp-email-row { + margin: 15px 0; + border-bottom-style: solid; + padding-bottom: 15px; + border-bottom-width: thin; + border-color: #c4c4c4; +} + +.wsp-email-from, +.wsp-email-subject { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.wsp-email-date { + text-align: right; +} + +.wsp-toolbar-edited .wsp-toolbar-item.toolbar-btn-smaller { + padding: 0 20px !important; +} + +.task-workspace { + .bandeau { + background-color: #5870bf; + padding-bottom: 15px; + border-bottom-left-radius: 15px; + border-bottom-right-radius: 15px; + text-align: center; + .mel-button { + margin-right: 15px; + } + } + .param-button.mel-button { + margin-top: 0; + margin-left: 15px; + } +} + +html.layout-phone .wsp-toolbar v_separate, +html.layout-small .wsp-toolbar v_separate, +html.layout-phone .wsp-toolbar-item, +html.layout-small .wsp-toolbar-item { + display: none; +} + +.wsp-toolbar-item.small-item, +.wsp-toolbar v_separate.first { + display: none; +} + +html.layout-phone .wsp-toolbar-item.small-item, +html.layout-small .wsp-toolbar-item.small-item, +html.layout-phone .wsp-toolbar v_separate.first, +html.layout-small .wsp-toolbar v_separate.first, +html.layout-phone .wsp-toolbar-item.first, +html.layout-small .wsp-toolbar-item.first, +html.layout-phone .wsp-toolbar-item.wsp-home, +html.layout-small .wsp-toolbar-item.wsp-home { + display: initial; +} + +html.layout-phone .webconf-toolbar .wsp-toolbar-item, +html.layout-small .webconf-toolbar .wsp-toolbar-item { + display: initial; +} + +.link-block .tools .roundbadge { + background-color: #00000021 !important; +} + +.wsp-toolbar.melw-wsp { + display: flex; + background-color: #5870bf; + /* border-radius: 50px; */ + color: white; + width: calc(100% - 60px) !important; + /* width: -moz-fit-content; */ + border-radius: 0; + margin: auto; + position: absolute; + bottom: 0px; + top: unset; + z-index: 998; + right: 0 !important; + transition: all 0.1s ease-in; + height: 60px !important; +} + +.touch .wsp-toolbar.melw-wsp, +.framed .wsp-toolbar.melw-wsp { + width: 100% !important; +} + +.btn.btn-block.wsp-toolbar-melw-wsp-hider { + position: absolute; + bottom: 60px; + background-color: #5870bf; + max-height: 16px; + border-radius: 0; + border: none; + padding: 0px !important; + color: white; + border-bottom: solid #647ccb thin; + right: 0; + /* padding-left: 12px !important; */ + /* display: block; */ + width: 100%; + transition: all 0.1s ease-in; +} + +.wsp-toolbar.wsp-toolbar-edited.melw-wsp.webconfstarted { + max-width: calc(100% - 323px); + right: unset !important; +} + +.btn.btn-block.wsp-toolbar-melw-wsp-hider:hover { + background-color: #484d7a; +} + +.btn.btn-block.wsp-toolbar-melw-wsp-hider:active { + background-color: #363a5b; +} + +.click-master { + background-color: #f0f0f0; + margin-bottom: 15px; + border-radius: 5px; + html.dark-mode & { + background-color: #323f4b; + } + .float-right { + margin-top: 7px; + } + &:last-of-type { + margin-bottom: 0; + } +} + +.task-workspace.action-workspace .responsiveTabList { + html.layout-phone &, + html.layout-small & { + flex-wrap: wrap !important; + } +} + +.wsp-copy-button { + html.layout-phone &, + html.layout-small & { + display: none; + } +} + +body.task-workspace { + separate { + html.layout-phone &, + html.layout-small & { + margin-top: 25px; + margin-bottom: 50px; + margin-right: 0; + margin-left: 0; + } + } + .table-bordered { + thead { + td, + th { + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + } + } + } +} + +.toolbar-icons { + font-variation-settings: 'wght' 300; + font-size: 26px; + line-height: 18px; +} + +#wsp-block-calendar { + margin-top: '5px'; + .fc-left h2, + .fc-header-toolbar { + display: none; + } +} + +.block-header .row button, +.swp-agenda-date, +.wsp-agenda-icon { + align-self: center; +} + +#planningmelloader .absolute-center { + z-index: 2; +} + +.tab-events-planning .swp-agenda-date { + display: 'block'; + margin-top: '4px'; +} + +#tmp-id-wsp { + color: var(--main-text-color); +} diff --git a/plugins/mel_workspace/skins/elastic/links.css b/plugins/mel_workspace/skins/elastic/links.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/mel_workspace/skins/elastic/templates/email.html b/plugins/mel_workspace/skins/elastic/templates/email.html index e9958481a..82526bf7d 100644 --- a/plugins/mel_workspace/skins/elastic/templates/email.html +++ b/plugins/mel_workspace/skins/elastic/templates/email.html @@ -2,53 +2,97 @@ -
    Logo du bureau numérique
    -
    -
    +
    + Logo du bureau numérique +
    +
    +

    Vous êtes invité à collaborer sur un espace de travail !

    -

    {{user.name}} ({{user.email}}) vous a invité à collaborer au sein de l'espace de travail {{wsp.name}}

    -
    -

    {{wsp.name}}

    -
    - Rejoindre maintenant +

    + {{user.name}} ({{user.email}}) vous a invité à collaborer au + sein de l'espace de travail {{wsp.name}} +

    +
    +

    {{wsp.name}}

    +
    + Rejoindre maintenant +
    +
    +
    + {{wsp.shares.rounded}}
    -
    -
    - {{wsp.shares.rounded}} -
    -
    - Crée par {{wsp.creator}} -
    - {{wsp.last_action.text}} : {{wsp.last_action.date}} -
    +
    + Crée par {{wsp.creator}} +
    + {{wsp.last_action.text}} : {{wsp.last_action.date}}
    +

    - Une fois que vous aurez rejoint cet espace de travail, vous pourrez également y accéder directement depuis cette adresse : {{url}} + Une fois que vous aurez rejoint cet espace de travail, vous pourrez également + y accéder directement depuis cette adresse : + {{url}}

    -
    +

    Qu'est ce que le Bnum ?

    -
    -

    Le Bnum est une application qui rassemble simplement, et sur une seule page web les outils que vous utilisez au quotidien : mails, agenda, listes de tâches etc...

    +
    +

    + Le Bnum est une application proposée par le Ministère de la Transition + Ecologique qui rassemble simplement, et sur une seule page web les outils que + vous utilisez au quotidien : mails, agenda, listes de tâches etc... +

    -Découvrir le Bnum \ No newline at end of file +Découvrir le Bnum +
    +
    diff --git a/plugins/mel_workspace/skins/elastic/templates/planning.html b/plugins/mel_workspace/skins/elastic/templates/planning.html index d6582cb22..a203d131c 100644 --- a/plugins/mel_workspace/skins/elastic/templates/planning.html +++ b/plugins/mel_workspace/skins/elastic/templates/planning.html @@ -127,7 +127,7 @@

    Mes évènements

    +
    + + + + + + diff --git a/public/forgotten/includes/form.inc.php b/public/forgotten/includes/form.inc.php new file mode 100644 index 000000000..2e8e3ffdb --- /dev/null +++ b/public/forgotten/includes/form.inc.php @@ -0,0 +1,48 @@ +

    Mot de passe oublié

    +
    +
    +

    Quel type de compte utilisez-vous ?

    +
    +
      +
    • + Le Bnum vous sert à consulter vos mails, votre agenda, vos contacts et vos espaces de travail. +
      +

      Vous devez vous tourner vers votre assistance locale, de proximité, informatique ... voici quelques pistes pour vous aider :

      +
        +
      • Pour les personnels de l'Enseignement Agricole, votre assistance est assurée par le service informatique de votre établissement qui pourra au besoin solliciter le DRTIC,
      • +
      • Pour les autres personnels du MASA, vous pouvez solliciter l'assistance en envoyant un mel à outilscollaboratifs,
      • +
      • Pour les personnels du MTE ou autres administrations, vous pouvez solliciter votre service informatique local.
      • +
      +

      En cas de problème, rendez-vous sur le salon Tchap #Bnum-infos

      +
      +
    • +
    • + Vous consultez votre messagerie sur un autre outil que le Bnum. Le Bnum ne vous sert qu'à accéder à des espaces de travail avec d'autres utilisateurs. +
      +

      Saisissez votre adresse e-mail pour recevoir un message de réinitialisation de votre mot de passe Bnum

      +
      +
      +
      +
      + + +
      +
      + +
      +
      + +
      +
      +
    • +
    • + Vous n'utilisez pas le Bnum, mais vous avez une boite Mél sans BALI, et vous souhaitez changer le mot de passe de ce compte. + +
    • +
    +
    + + + \ No newline at end of file diff --git a/public/forgotten/includes/header.inc.php b/public/forgotten/includes/header.inc.php new file mode 100644 index 000000000..b68d2a1be --- /dev/null +++ b/public/forgotten/includes/header.inc.php @@ -0,0 +1,47 @@ + + + + + Initialisation du compte Bnum + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Connexion

    + +
    + +
    +
    + +
    +
    diff --git a/public/forgotten/index.php b/public/forgotten/index.php new file mode 100644 index 000000000..14e4bb2df --- /dev/null +++ b/public/forgotten/index.php @@ -0,0 +1,28 @@ + { + // Ajouter un onclick sur les choix + document.querySelectorAll('ul.actions > li > span').forEach((element) => { + element.addEventListener('click', (event) => { + element.parentElement.classList.toggle('active'); + element.parentElement.setAttribute('aria-pressed', element.parentElement.getAttribute('aria-pressed') == 'true' ? 'false' : 'true'); + }); + }); +}); + +(function($){ + function floatLabel(inputType){ + $(inputType).each(function(){ + var $this = $(this); + // on focus add cladd active to label + $this.focus(function(){ + $this.next().addClass("active"); + }); + //on blur check field and remove class if needed + $this.blur(function(){ + if($this.val() === '' || $this.val() === 'blank'){ + $this.next().removeClass(); + } + }); + }); + } + // just add a class of "floatLabel to the input field!" + floatLabel(".floatLabel"); + + // Lorsque le focus est sur le password, on afficher les indications + $('#password').focus(function(){ + $('.password_hint').show(); + }); + + // Lorsque le focus est sur le password, on afficher les indications + $('#password').blur(function(){ + $('.password_hint').hide(); + }); +})(jQuery); \ No newline at end of file diff --git a/public/forgotten/mail/email_external_reinit.html b/public/forgotten/mail/email_external_reinit.html new file mode 100644 index 000000000..be2feefaa --- /dev/null +++ b/public/forgotten/mail/email_external_reinit.html @@ -0,0 +1,34 @@ + + + + +
    Logo du bureau numérique
    +
    +
    +

    Vous avez demandé la réinitialisation de votre mot de passe

    +
    +

    Vous pouvez réinitialiser votre mot de passe Bnum en suivant ce lien : {{user.url}}

    +

    Si vous n'êtes pas à l'origine de cette réinitialisation, vous pouvez l'ignorer.

    +
    +
    +

    Qu'est ce que le Bnum ?

    +

    Pour plus d'informations sur le fonctionnement du Bnum, nous vous invitons à consulter notre article dédié.

    +Découvrir le Bnum diff --git a/public/fullcalendar/add_event.php b/public/fullcalendar/add_event.php index e3ee71013..3986da9e3 100644 --- a/public/fullcalendar/add_event.php +++ b/public/fullcalendar/add_event.php @@ -10,16 +10,17 @@ define('CONFIGURATION_APP_LIBM2', 'roundcube'); } - if ($config['DEV']) { $dir = str_replace('/public/fullcalendar', '', dirname($_SERVER['SCRIPT_FILENAME'])); } else { - $dir = __DIR__ . '../..'; + $dir = __DIR__ . '/../..'; } // Inclusion de l'ORM M2 @include_once 'includes/libm2.php'; +@include_once '../lib/mel/mel.php'; + // Utilisation de la librairie Sabre VObject pour la conversion ICS require_once '../lib/vendor/autoload.php'; require_once $dir . '/vendor/autoload.php'; @@ -41,8 +42,6 @@ $event->uid = utils::generate_uid($_user); $event->load(); -$events = $calendar->getAllEvents(); - $appointment = json_decode($_POST['appointment'], true); $attendee_post = json_decode($_POST['attendee'], true); @@ -51,10 +50,20 @@ $event->start = new DateTime($appointment['time_start']); $event->end = new DateTime($appointment['time_end']); $event->description = $appointment['description']; +$event->timezone = $event->timezone; +$event->event_creator_id = $data['user']->uid; +$event->alarm = 0; +$event->transparency = "OPAQUE"; +$event->event_private = 0; +$event->modified = $event->created; +$event->modified_json = $event->created; +$event->event_status = 2; +$event->all_day = 0; + if ($appointment['type'] == "webconf") { - $event->location = $appointment['location'] . '(' . $appointment['phone'] . ' | ' . $appointment['pin'] . ')'; + $event->location = $appointment['location'] ? $appointment['location'] . '(' . $appointment['phone'] . ' | ' . $appointment['pin'] . ')' : ""; } else { - $event->location = $appointment['location']; + $event->location = $appointment['location'] ?? ""; } $_attendees = array(); @@ -83,8 +92,7 @@ if ($user_prefs->notification_type === "mail") { Mail::SendOrganizerAppointmentMail($organizer, $attendee_post, $appointment); - } - else { + } else { SendOrganizerNotification($data['user'], $attendee_post, $appointment); } header('Content-Type: application/json; charset=utf-8'); diff --git a/public/fullcalendar/calendar.php b/public/fullcalendar/calendar.php index edf4055cf..d4ebe0017 100644 --- a/public/fullcalendar/calendar.php +++ b/public/fullcalendar/calendar.php @@ -3,16 +3,16 @@ // Inclusion des fichiers require_once '../lib/utils.php'; require_once __DIR__ . '/../config.inc.php'; + // Configuration du nom de l'application pour l'ORM if (!defined('CONFIGURATION_APP_LIBM2')) { define('CONFIGURATION_APP_LIBM2', 'roundcube'); } - if ($config['DEV']) { $dir = str_replace('/public/fullcalendar', '', dirname($_SERVER['SCRIPT_FILENAME'])); } else { - $dir = __DIR__ . '../..'; + $dir = __DIR__ . '/../..'; } // Inclusion de l'ORM M2 @@ -43,8 +43,8 @@ } header('Content-Type: application/json; charset=utf-8'); -header("Expires: ".gmdate("D, d M Y H:i:s")." GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT"); +header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); diff --git a/public/fullcalendar/index.html b/public/fullcalendar/index.html index ab54fc828..c4c0d9731 100644 --- a/public/fullcalendar/index.html +++ b/public/fullcalendar/index.html @@ -8,9 +8,11 @@ Calendrier - + + + diff --git a/public/fullcalendar/mail.php b/public/fullcalendar/mail.php index bf2aea6b4..4eb180b8d 100644 --- a/public/fullcalendar/mail.php +++ b/public/fullcalendar/mail.php @@ -22,7 +22,7 @@ * along with this program. If not, see . */ -require_once __DIR__ . '/../config.inc.php'; + /** * Classe de gestion des mails @@ -35,30 +35,30 @@ class Mail /** * Constructeur privé pour ne pas instancier la classe */ - private function __construct() - { - } + private function __construct() {} /** * Méthode d'envoi du message notification à l'organisateur à la création du sondage * * @param $attendee informations de l'organisateur * @param $attendee informations du participant - * @return boolean + * @param $appointment informations de l'évènement */ public static function SendOrganizerAppointmentMail($organizer, $attendee, $appointment) { - global $config; + require __DIR__ . '/../config.inc.php'; + $subject = $config["organizer_mail_subject"]; $from = $config['mail_from']; $to = '=?UTF-8?B?' . base64_encode('"' . $organizer->name . '"') . '?=' . "\r\n <" . $organizer->email . ">"; $body = file_get_contents(__DIR__ . '/templates/organizer_appointment_mail.html'); + // Replace elements - $subject = str_replace("%%attendee_name%%", $attendee['name'], $subject); + $subject = str_replace("%%attendee_name%%", $attendee['name'] . ' ' . $attendee['firstname'], $subject); $subject = str_replace("%%appointment_date_day%%", $appointment['date_day'], $subject); $body = str_replace("%%appointment_object%%", $appointment['object'], $body); - $body = str_replace("%%attendee_name%%", $attendee['name']. ' ' .$attendee['firstname'], $body); + $body = str_replace("%%attendee_name%%", $attendee['name'] . ' ' . $attendee['firstname'], $body); $body = str_replace("%%attendee_email%%", $attendee['email'], $body); $body = str_replace("%%appointment_date%%", $appointment['date'], $body); $body = str_replace("%%appointment_description%%", $appointment['description'], $body); @@ -72,12 +72,14 @@ public static function SendOrganizerAppointmentMail($organizer, $attendee, $appo * * @param $attendee informations de l'organisateur * @param $attendee informations du participant - * @return boolean + * @param $appointment informations de l'évènement + * @param $appointment ics de l'évènement */ public static function SendAttendeeAppointmentMail($organizer, $attendee, $appointment, $ics) { - global $config; + require __DIR__ . '/../config.inc.php'; + $subject = $config["attendee_mail_subject"]; $from = $config['mail_from']; $to = '=?UTF-8?B?' . base64_encode('"' . $attendee['name'] . '"') . '?=' . "\r\n <" . $attendee['email'] . ">"; @@ -122,6 +124,6 @@ public static function SendAttendeeAppointmentMail($organizer, $attendee, $appoi $body = str_replace("BEGIN:VEVENT", "METHOD:REQUEST\r\nBEGIN:VEVENT", $body); - return \LibMelanie\Mail\Mail::Send($from, $to, $subject, $body,null, null, null, null, null, null, null, null, $ics); + return \LibMelanie\Mail\Mail::Send($from, $to, $subject, $body, null, null, null, null, null, null, null, null, $ics); } } diff --git a/public/fullcalendar/templates/images/favicon.svg b/public/fullcalendar/templates/images/favicon.svg new file mode 100644 index 000000000..4b87961f4 --- /dev/null +++ b/public/fullcalendar/templates/images/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/lib/extern/core.php b/public/lib/extern/core.php new file mode 100644 index 000000000..3f103ae3f --- /dev/null +++ b/public/lib/extern/core.php @@ -0,0 +1,270 @@ +email = $email; + + if (!$user->load(['uid', 'email', 'firstname', 'lastname'])) { + utils::log("Extern/Core::Process() [$email] - User not found"); + return false; + } + + if (!$user->is_external) { + utils::log("Extern/Core::Reinit() [$email] - User is not external"); + return false; + } + + // Récupération de l'objet de la clé + $currentKey = $user->getDefaultPreference('external_key'); + + if (empty($currentKey) || $currentKey != $key) { + utils::log("Extern/Core::Process() [$email] - Invalid key"); + return false; + } + + // Est-ce que la clé est toujours valide ? + $validity = $user->getDefaultPreference('external_key_validity'); + + if (empty($validity) || time() - intval($validity) > intval($config['external_key_validity'])) { + utils::log("Extern/Core::Process() [$email] - Key expired"); + return false; + } + + // Est-ce qu'on est dans un post ? + if (isset($_POST['_email']) && $_POST['_email'] = $user->email) { + return self::Post($user); + } + } + catch (Exception $e) { + return false; + } + + utils::log("Extern/Core::Process() [$email] - Processed"); + return true; + } + + /** + * Méthode de traitement pour la méthode POST + * + * @param LibMelanie\Api\Mel\User $user + */ + public static function Post($user) { + global $message, $step; + + $is_reinit = strpos($_SERVER['SCRIPT_URL'], 'reinit') !== false; + + // Récupération des paramètres + $firstname = utils::get_input_value("_firstname", utils::INPUT_POST); + $lastname = utils::get_input_value("_lastname", utils::INPUT_POST); + $password = utils::get_input_value("_password", utils::INPUT_POST); + + // Vérification des paramètres + if (empty($firstname) || empty($lastname) || empty($password)) { + $message = "Merci de renseigner tous les champs"; + } + + // Inclusion des fichiers + require_once __DIR__ . '/../password.php'; + + if (Password::Validate($password, $user)) { + // Mise à jour de l'utilisateur + if (!$is_reinit) { + $user->firstname = $firstname; + $user->lastname = $lastname; + } + $user->password = Password::SSHA1PasswordGenerator($password); + + $ret = $user->save(); + + // Erreur d'enregistrement ldap + if (is_null($ret)) { + utils::log("Extern/Core::Post() [$user->email] - LDAP error"); + $message = "Impossible d'enregistrer vos informations, merci de réessayer plus tard."; + } + else { + $step = 2; + $user->deletePreference(LibMelanie\Api\Mel\User::PREF_SCOPE_DEFAULT, 'external_key'); + $user->deletePreference(LibMelanie\Api\Mel\User::PREF_SCOPE_DEFAULT, 'external_key_validity'); + } + } + + return true; + } + + /** + * Méthode de réinitialisation d'un email + * + * @return boolean + */ + public static function Reinit() { + try { + // Inclusion des fichiers + require_once __DIR__ . '/../utils.php'; + require __DIR__ . '/../../config.inc.php'; + + if ($config['DEV']) { + $dir = str_replace('/public/forgotten', '', dirname($_SERVER['SCRIPT_FILENAME'])); + } + else { + $dir = __DIR__.'/../../../'; + } + + require_once $dir . '/vendor/autoload.php'; + + global $user, $hash, $step; + + $step = 1; + + // Configuration du nom de l'application pour l'ORM + if (!defined('CONFIGURATION_APP_LIBM2')) { + define('CONFIGURATION_APP_LIBM2', 'roundcube'); + } + + // Inclusion de l'ORM M2 + @include_once 'includes/libm2.php'; + + // Gestion des logs + $log = function ($message) { + utils::log("Extern - $message"); + }; + if ($config['debug']) { + LibMelanie\Log\M2Log::InitDebugLog($log); + } + LibMelanie\Log\M2Log::InitInfoLog($log); + LibMelanie\Log\M2Log::InitErrorLog($log); + + + // Récupération des paramètres de la requête + $email = utils::get_input_value("_email", utils::INPUT_GPC); + + // Récupération de l'objet utilisateur + $user = new LibMelanie\Api\Mel\User(); + $user->email = $email; + + if (!$user->load(['uid', 'email'])) { + utils::log("Extern/Core::Reinit() [$email] - User not found"); + return false; + } + + if (!$user->is_external) { + utils::log("Extern/Core::Reinit() [$email] - User is not external"); + return false; + } + + // Est-ce que la clé est toujours valide ? + $validity = $user->getDefaultPreference('external_key_validity'); + + if (!empty($validity) && time() - intval($validity) <= intval($config['external_key_validity_reinit'])) { + utils::log("Extern/Core::Reinit() [$email] - Key still valid"); + return false; + } + + // Générer une clé unique pour l'utilisateur + $key = bin2hex(random_bytes(32)); + + if (!$user->saveDefaultPreference('external_key', $key) || !$user->saveDefaultPreference('external_key_validity', time())) { + utils::log("Extern/Core::Reinit() [$email] - Unable to set key"); + return false; + } + + $hash = [ + 'email' => $email, + 'key' => $key, + ]; + + // Envoi du mail + require_once __DIR__ . '/../../../plugins/mel_helper/lib/mel_mail.php'; + + // Chargement du body + $body = file_get_contents(__DIR__ . '/../../forgotten/mail/email_external_reinit.html'); + + // Remplacement des variables + $body = str_replace([ + '{{logobnum}}', + '{{user.url}}', + '{{documentation.url}}', + '{{bnum.base_url}}', + ],[ + MailBody::load_image(__DIR__ . '/../../../plugins/mel_workspace/skins/elastic/pictures/logobnum.png', 'png'), + utils::url('public/reinit/?_h=' . base64_encode(serialize($hash))), + 'https://fabrique-numerique.gitbook.io/bnum/ressources/guide-des-fonctionnalites/espaces-de-travail', + 'http://mtes.fr/2', + ], $body); + + $subject = explode('-->' ,explode('Subject : ', $body)[1])[0]; + + // Envoi du mail + \LibMelanie\Mail\Mail::Send('bnum', $email, $subject, $body); + + } + catch (Exception $e) { + if (class_exists('utils')) { + utils::log("Extern/Core::Process() [$email] - Erreur :" . $e->getMessage()); + } + return false; + } + + utils::log("Extern/Core::Process() [$email] - Processed"); + return true; + } +} \ No newline at end of file diff --git a/public/lib/mel/mel.php b/public/lib/mel/mel.php index 4aeec50a7..a00fcbc73 100644 --- a/public/lib/mel/mel.php +++ b/public/lib/mel/mel.php @@ -1,10 +1,13 @@ run(); } + } +} + +class ConfigMel extends AMel { + private $loaded_config; + + public function __construct() { + parent::__construct(); + $this->loaded_config = []; + } + + public function load_config($plugin_name, $fname = 'config.inc.php') + { + if (in_array($fname, $this->loaded_config)) { + return true; + } + + $this->loaded_config[] = $fname; + + $fpath = INSTALL_PATH."plugins/$plugin_name/$fname"; + $rcube = rcube::get_instance(); + + if (($is_local = is_file($fpath)) && !$rcube->config->load_from_file($fpath)) { + rcube::raise_error([ + 'code' => 527, 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Failed to load config from $fpath" + ], true, false + ); + return false; + } + else if (!$is_local) { + // Search plugin_name.inc.php file in any configured path + return $rcube->config->load_from_file($plugin_name . '.inc.php'); + } + + return true; + } + + public function run(...$args) {} + + public function conf($conf, $df = null) { + return rcube::get_instance()->config->get($conf, $df); } } \ No newline at end of file diff --git a/public/lib/password.php b/public/lib/password.php new file mode 100644 index 000000000..c1352f253 --- /dev/null +++ b/public/lib/password.php @@ -0,0 +1,119 @@ +email] - Password too short"); + $message = "Le mot de passe doit contenir au moins " . $config['external_password_min_length'] . " caractères"; + return false; + } + + // Vérification de la longueur maximale + if (strlen($password) > $config['external_password_max_length']) { + utils::log("Extern/Password::Validate() [$user->email] - Password too long"); + $message = "Le mot de passe doit contenir au maximum " . $config['external_password_max_length'] . " caractères"; + return false; + } + + // Est-ce que le mot de passe a une majuscule + if ($config['external_password_uppercase'] && !preg_match('/[A-Z]/', $password)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must have an uppercase letter"); + $message = "Le mot de passe doit contenir au moins une majuscule"; + return false; + } + + // Est-ce que le mot de passe a une minuscule + if ($config['external_password_lowercase'] && !preg_match('/[a-z]/', $password)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must have a lowercase letter"); + $message = "Le mot de passe doit contenir au moins une minuscule"; + return false; + } + + // Est-ce que le mot de passe a un chiffre + if ($config['external_password_number'] && !preg_match('/[0-9]/', $password)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must have a number"); + $message = "Le mot de passe doit contenir au moins un chiffre"; + return false; + } + + // Est-ce que le mot de passe a un caractère spécial + if ($config['external_password_special_char'] && !preg_match('/[\x21-\x2F\x3A-\x40\x5B-\x5F\x7B-\x7E]/', $password)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must have a special character"); + $message = "Le mot de passe doit contenir au moins un caractère spécial"; + return false; + } + + // Le mot de passe ne doit pas contenir de \ + if (strpos($password, "\\") !== false) { + utils::log("Extern/Password::Validate() [$user->email] - Password must not contain a \\"); + $message = "Le mot de passe ne doit pas contenir de \\"; + return false; + } + + // Est-ce que le mot de passe contient des accents + if (!$config['external_password_accented_char'] && preg_match('/[éèêëàâäôöûüç]/', $password)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must not contain accented characters"); + $message = "Le mot de passe ne doit pas contenir de caractères accentués"; + return false; + } + + // Est-ce que le nom prénom ou l'uid est contenu dans le mot de passe + if ($config['external_password_ad_restrictions'] + && (strpos(strtolower($password), strtolower($user->firstname)) !== false + || strpos(strtolower($password), strtolower($user->lastname)) !== false)) { + utils::log("Extern/Password::Validate() [$user->email] - Password must not contain the name or firstname"); + $message = "Le mot de passe ne doit pas contenir votre nom ou prénom"; + return false; + } + + return true; + } +} \ No newline at end of file diff --git a/public/lib/utils.php b/public/lib/utils.php index a6df1255d..9bad08c2a 100644 --- a/public/lib/utils.php +++ b/public/lib/utils.php @@ -350,6 +350,76 @@ public static function request2param($mode = null, $ignore = 'task|action', $all return $out; } + /** + * Récupérer l'url complète à partir de l'url relative + * + * @param string $url Url relative + * @param boolean $absolute Est-ce que l'url doit être absolue + * + * @return string Url complète + */ + public static function url($url, $absolute = true) { + $base_path = ''; + if (!empty($_SERVER['REDIRECT_SCRIPT_URL'])) { + $base_path = $_SERVER['REDIRECT_SCRIPT_URL']; + } + else if (!empty($_SERVER['SCRIPT_NAME'])) { + $base_path = $_SERVER['SCRIPT_NAME']; + } + $base_path = preg_replace('![^/]+$!', '', $base_path); + $base_path = explode('public/', $base_path, 2); + $base_path = $base_path[0]; + + // add base path to this Roundcube installation + $prefix = $base_path ?: '/'; + + // prepend protocol://hostname:port + if ($absolute) { + $prefix = self::resolve_url($prefix); + } + + return $prefix . $url; + } + + /** + * Resolve relative URL + * + * @param string $url Relative URL + * + * @return string Absolute URL + */ + public static function resolve_url($url) + { + // prepend protocol://hostname:port + if (!preg_match('|^https?://|', $url)) { + require __DIR__ . '/../config.inc.php'; + + $schema = 'http'; + $default_port = 80; + + if (self::https_check()) { + $schema = 'https'; + $default_port = 443; + } + + if (isset($config['http_host'])) { + $host = $config['http_host']; + } else { + $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null; + } + $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : null; + + $prefix = $schema . '://' . preg_replace('/:\d+$/', '', $host); + if ($port != $default_port && $port != 80) { + $prefix .= ':' . $port; + } + + $url = $prefix . ($url[0] == '/' ? '' : '/') . $url; + } + + return $url; + } + /** * Check if working in SSL mode * @@ -358,7 +428,7 @@ public static function request2param($mode = null, $ignore = 'task|action', $all * * @return boolean */ - public static function https_check($port = null, $use_https = true) + public static function https_check($port = null) { if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') { return true; @@ -366,16 +436,12 @@ public static function https_check($port = null, $use_https = true) if ( !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' - && in_array($_SERVER['REMOTE_ADDR'], rcube::get_instance()->config->get('proxy_whitelist', array())) ) { return true; } if ($port && $_SERVER['SERVER_PORT'] == $port) { return true; } - if ($use_https && rcube::get_instance()->config->get('use_https')) { - return true; - } return false; } @@ -506,13 +572,15 @@ public static function asciiwords($str, $css_id = false, $replace_with = '') */ public static function log($message) { + global $config; + $ip = self::_get_address_ip(); $procid = getmypid(); $mineqprovenance = $_SERVER["HTTP_X_MINEQPROVENANCE"] ?: 'Intranet'; $courrielleur = isset($_GET['_courrielleur']) ? " {Courrielleur}" : " {Web}"; $date = date('d-M-Y H:i:s O'); $message = "[$date]: [INFO] $ip ($mineqprovenance) PROC[$procid]$courrielleur - $message\r\n"; - error_log($message, 3, '/var/log/roundcube/roundcube_mel.log'); + error_log($message, 3, $config['log_file'] ?: '/var/log/roundcube/roundcube_mel.log'); } /** diff --git a/public/reinit/css/styles.css b/public/reinit/css/styles.css new file mode 100644 index 000000000..9fd410261 --- /dev/null +++ b/public/reinit/css/styles.css @@ -0,0 +1,178 @@ +body, +#layout { + overflow-y: auto; + height: 49em; +} + +div.message.error { + color: rgb(110, 20, 20) +} + +div.password_hint { + display: none; + font-size: 12px; + margin-bottom: 10px; + margin-top: -10px; +} + +#mel-login-form { + top: 0; + margin-top: 5em; +} + +div.form { + margin-top: 2em; +} + +fieldset, form, label, legend { + margin: 0; + padding: 0; + border: 0; + font: inherit; + font-size: 100%; + vertical-align: baseline; +} + +.form-group { + margin-bottom: 20px; +} + +h2.heading { + font-size: 18px; + text-transform: uppercase; + font-weight: 300; + text-align: left; + color: #506982; + border-bottom: 1px solid #506982; + padding-bottom: 3px; + margin-bottom: 20px; +} + +.controls { + text-align: left; + position: relative; +} +.controls input[type="text"], +.controls input[type="password"], +.controls input[type="email"], +.controls input[type="number"], +.controls input[type="date"], +.controls input[type="tel"], +.controls textarea, +.controls button, +.controls select { + padding: 12px; + font-size: 14px; + border: 1px solid #c6c6c6; + width: 100%; + margin-bottom: 18px; + color: #4A4A4A; + font-family: "Lato", "sans-serif"; + font-size: 16px; + font-weight: 300; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -webkit-transition: all 0.3s; + transition: all 0.3s; +} +.controls button { + color: #ddd; +} +.controls input[type="text"]:focus, +.controls input[type="text"]:hover, +.controls input[type="password"]:focus, +.controls input[type="password"]:hover, +.controls input[type="email"]:focus, +.controls input[type="email"]:hover, +.controls input[type="number"]:focus, +.controls input[type="number"]:hover, +.controls input[type="date"]:focus, +.controls input[type="date"]:hover, +.controls input[type="tel"]:focus, +.controls input[type="tel"]:hover, +.controls textarea:focus, +.controls textarea:hover, +.controls button:focus, +.controls button:hover, +.controls select:focus, +.controls select:hover { + outline: none; + border-color: #9fb1c1; +} +.controls input[type="text"]:focus + label, +.controls input[type="text"]:hover + label, +.controls input[type="password"]:focus + label, +.controls input[type="password"]:hover + label, +.controls input[type="email"]:focus + label, +.controls input[type="email"]:hover + label, +.controls input[type="number"]:focus + label, +.controls input[type="number"]:hover + label, +.controls input[type="date"]:focus + label, +.controls input[type="date"]:hover + label, +.controls input[type="tel"]:focus + label, +.controls input[type="tel"]:hover + label, +.controls textarea:focus + label, +.controls textarea:hover + label, +.controls button:focus + label, +.controls button:hover + label, +.controls select:focus + label, +.controls select:hover + label { + color: #2c3054; + cursor: text; +} +.controls .fa-sort { + position: absolute; + right: 10px; + top: 17px; + color: #999; +} +.controls select { + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} +.controls label { + position: absolute; + left: 8px; + top: 12px; + width: 60%; + color: #999; + font-size: 16px; + display: inline-block; + padding: 4px 10px; + font-weight: 400; + background-color: rgba(255, 255, 255, 0); + -moz-transition: color 0.3s, top 0.3s, background-color 0.8s; + -o-transition: color 0.3s, top 0.3s, background-color 0.8s; + -webkit-transition: color 0.3s, top 0.3s, background-color 0.8s; + transition: color 0.3s, top 0.3s, background-color 0.8s; + background-color: white; + line-height: 14px; +} +.controls label.active { + top: -11px; + color: #555; + background-color: white; + width: auto; + font-size: 12px; + padding: 3px 6px; +} +.controls textarea { + resize: none; + height: 200px; +} + +button { + cursor: pointer; + background-color: #1b3d4d; + border: none; + color: #fff; + padding: 12px 0; + float: right; +} +button:hover { + background-color: #224c60; +} diff --git a/public/reinit/includes/confirmation.inc.php b/public/reinit/includes/confirmation.inc.php new file mode 100644 index 000000000..95b0bb724 --- /dev/null +++ b/public/reinit/includes/confirmation.inc.php @@ -0,0 +1,11 @@ +

    Réinitialisation réussie

    +
    +
    +

    Votre mot de passe a bien été réinitialisé.

    +

    Vous pouvez dés à présent vous connecter au Bnum, en utilisant votre adresse e-mail comme nom d'utilisateur et le mot de passe choisi.

    +
    +
    +
    + Se rendre sur le Bnum +
    +
    diff --git a/public/reinit/includes/error.inc.php b/public/reinit/includes/error.inc.php new file mode 100644 index 000000000..795aae390 --- /dev/null +++ b/public/reinit/includes/error.inc.php @@ -0,0 +1,9 @@ +
    +

    Une erreur s'est produite lors de la récupération de votre compte. Le lien fourni n'est probablement plus valide.

    +

    Veuillez-vous rendre sur le Bnum pour demander la réinitialisation de votre mot de passe.

    +

    Si vous êtes un utilisateur interne du Bnum (c'est à dire que vous utilisez le Bnum/Mél pour votre messagerie), vous ne devriez pas être ici, en cas de problème merci de contacter votre support informatique local.

    +
    +
    +
    + Se rendre sur le Bnum +
    \ No newline at end of file diff --git a/public/reinit/includes/footer.inc.php b/public/reinit/includes/footer.inc.php new file mode 100644 index 000000000..a3082d7ef --- /dev/null +++ b/public/reinit/includes/footer.inc.php @@ -0,0 +1,9 @@ +
    +
    +
    + + +
    + + + diff --git a/public/reinit/includes/form.inc.php b/public/reinit/includes/form.inc.php new file mode 100644 index 000000000..0bdd01da5 --- /dev/null +++ b/public/reinit/includes/form.inc.php @@ -0,0 +1,38 @@ +

    Réinitialisation de votre compte

    +
    +
    +

    Vous pouvez modifier votre mot de passe pour vous connecter au Bnum.

    +
    +
    +
    + +
    +
    + + + + + +
    +
    + + +
    + Le mot de passe doit avoir une longueur d'au moins 10 caractères, avec au moins un caractère de chaque type : majuscule, minuscule, chiffre, caractère spécial (!"#$%&'()*+,-./:<=>?@[^]_{|}~). Les accents (â à â é è ê …) ne sont pas autorisés. +
    +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + + + \ No newline at end of file diff --git a/public/reinit/includes/header.inc.php b/public/reinit/includes/header.inc.php new file mode 100644 index 000000000..581f5d8a6 --- /dev/null +++ b/public/reinit/includes/header.inc.php @@ -0,0 +1,47 @@ + + + + + Réinitialisation du mot de passe Bnum + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Connexion

    + +
    + +
    +
    + +
    +
    diff --git a/public/reinit/index.php b/public/reinit/index.php new file mode 100644 index 000000000..43d71b529 --- /dev/null +++ b/public/reinit/index.php @@ -0,0 +1,31 @@ +Étape 2 : Connexion au Bnum +
    +
    +

    Votre compte est correctement initialisé.

    +

    Vous pouvez dés à présent vous connecter au Bnum, en utilisant votre adresse e-mail comme nom d'utilisateur et le mot de passe choisi.

    +

    Vous pourrez ensuite accéder à l'espace de travail auquel vous venez d'être invité.

    +
    +
    +
    + + + +
    Utilisateur ($nbuser) Droits d\'accèsSupprimer
    Utilisateur ($nbuser) Droits d'accèsSupprimer
    '.(count($from_list) > 0 ? 'groups' : ''). $user->fullname."
    + + + + + + + + + + +
    + + + +
    + + + +
    +

    + +

    + + diff --git a/public/welcome/includes/error.inc.php b/public/welcome/includes/error.inc.php new file mode 100644 index 000000000..795aae390 --- /dev/null +++ b/public/welcome/includes/error.inc.php @@ -0,0 +1,9 @@ +
    +

    Une erreur s'est produite lors de la récupération de votre compte. Le lien fourni n'est probablement plus valide.

    +

    Veuillez-vous rendre sur le Bnum pour demander la réinitialisation de votre mot de passe.

    +

    Si vous êtes un utilisateur interne du Bnum (c'est à dire que vous utilisez le Bnum/Mél pour votre messagerie), vous ne devriez pas être ici, en cas de problème merci de contacter votre support informatique local.

    +
    +
    +
    + Se rendre sur le Bnum +
    \ No newline at end of file diff --git a/public/welcome/includes/footer.inc.php b/public/welcome/includes/footer.inc.php new file mode 100644 index 000000000..a3082d7ef --- /dev/null +++ b/public/welcome/includes/footer.inc.php @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/welcome/includes/form.inc.php b/public/welcome/includes/form.inc.php new file mode 100644 index 000000000..46783bd4b --- /dev/null +++ b/public/welcome/includes/form.inc.php @@ -0,0 +1,44 @@ +

    Étape 1 : Initialisation de votre compte

    +
    +
    +

    Durant cette étape vous devez définir votre nom, prénom et mot de passe. Vous pourrez ensuite vous connecter au Bnum pour rejoindre l'espace de travail pour lequel vous avez été invité.

    +
    +
    +
    + +
    +
    + + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + Le mot de passe doit avoir une longueur d'au moins 10 caractères, avec au moins un caractère de chaque type : majuscule, minuscule, chiffre, caractère spécial (!"#$%&'()*+,-./:<=>?@[^]_{|}~). Les accents (â à â é è ê …) ne sont pas autorisés. +
    +
    + +
    +

    +
    + +
    + +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/public/welcome/includes/header.inc.php b/public/welcome/includes/header.inc.php new file mode 100644 index 000000000..b68d2a1be --- /dev/null +++ b/public/welcome/includes/header.inc.php @@ -0,0 +1,47 @@ + + + + + Initialisation du compte Bnum + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Connexion

    + +
    + +
    +
    + +
    +
    diff --git a/public/welcome/index.php b/public/welcome/index.php new file mode 100644 index 000000000..43d71b529 --- /dev/null +++ b/public/welcome/index.php @@ -0,0 +1,31 @@ + #layout { - & > div.sidebar { - ul { - .treelist { - li.context-source:not(.selected) { - & > a { - background-color: var(--secondary-bckg-color) !important; - } - - & > div { - & > a { - background-color: var(--secondary-bckg-color) !important; - } - } - } - } - } - - .listing { - tbody { - tr.context-source:not(.selected) > td { - background-color: var(--secondary-bckg-color) !important; - } - } - - &:not(.treelist) { - li.context-source:not(.selected) { - background-color: var(--secondary-bckg-color) !important; - } - } - } - } - } + .restore-font(); + color: var(--main-text-color); + + & > #layout { + & > div.sidebar { + ul { + .treelist { + li.context-source:not(.selected) { + & > a { + background-color: var(--secondary-bckg-color) !important; + } + + & > div { + & > a { + background-color: var(--secondary-bckg-color) !important; + } + } + } + } + } + + .listing { + tbody { + tr.context-source:not(.selected) > td { + background-color: var(--secondary-bckg-color) !important; + } + } + + &:not(.treelist) { + li.context-source:not(.selected) { + background-color: var(--secondary-bckg-color) !important; + } + } + } + } + } } /** PRINCIPAL **/ @@ -51,807 +51,807 @@ optgroup, select, textarea, .popover { - .restore-font(); + .restore-font(); } a, .falselink { - color: var(--main-link-color); + color: var(--main-link-color); - &:hover { - color: var(--main-link-hover-color); - } + &:hover { + color: var(--main-link-hover-color); + } } p, span, div { - scrollbar-width: var(--scrollbar-width-moz) !important; - scrollbar-color: var(--scrollbar-handler-color) - var(--scrollbar-background-color); + scrollbar-width: var(--scrollbar-width-moz) !important; + scrollbar-color: var(--scrollbar-handler-color) + var(--scrollbar-background-color); - &.more-width { - scrollbar-width: var(--scrollbar-width-hover-moz) !important; - } + &.more-width { + scrollbar-width: var(--scrollbar-width-hover-moz) !important; + } } main { - display: flex; - height: 100%; - width: 100%; + display: flex; + height: 100%; + width: 100%; } /* width */ ::-webkit-scrollbar { - width: var(--scrollbar-width-webkit) !important; - .more-width& { - width: var(--scrollbar-width-hover-webkit) !important; - } + width: var(--scrollbar-width-webkit) !important; + .more-width& { + width: var(--scrollbar-width-hover-webkit) !important; + } - /* Track */ - &-track { - background: var(--scrollbar-background-color); - border-radius: var(--scollbar-border-radius); - } + /* Track */ + &-track { + background: var(--scrollbar-background-color); + border-radius: var(--scollbar-border-radius); + } - /* Handle */ - &-thumb { - background: var(--scrollbar-handler-color); - border-radius: var(--scollbar-border-radius); + /* Handle */ + &-thumb { + background: var(--scrollbar-handler-color); + border-radius: var(--scollbar-border-radius); - &:hover { - background: var(--scrollbar-handler-hover-color); - } - } + &:hover { + background: var(--scrollbar-handler-hover-color); + } + } } /** LAYOUT **/ #layout-sidebar { - .mel-no-border(); - .mel-layout-sidebar-colors() !important; - - & > .header { - /** HEADER **/ - .mel-layout-sidebar-colors() !important; - } + .mel-no-border(); + .mel-layout-sidebar-colors() !important; - .ui-datepicker { - &.ui-widget-content { - .ui-state-default { - /** CALENDRIER **/ - color: var(--secondary-text-color); - } - } + & > .header { + /** HEADER **/ + .mel-layout-sidebar-colors() !important; + } - .ui-state-default { - /** CALENDRIER **/ - color: var(--secondary-text-color); - } - } + .ui-datepicker { + &.ui-widget-content { + .ui-state-default { + /** CALENDRIER **/ + color: var(--secondary-text-color); + } + } + + .ui-state-default { + /** CALENDRIER **/ + color: var(--secondary-text-color); + } + } } #layout-list { - .mel-no-border(); - .mel-layout-list-colors() !important; + .mel-no-border(); + .mel-layout-list-colors() !important; - & > .header { - /** HEADER **/ - .mel-layout-list-colors() !important; - } + & > .header { + /** HEADER **/ + .mel-layout-list-colors() !important; + } } #layout { - & > div { - & > .header { - .mel-no-border(); - - a.button { - color: var(--secondary-text-color); - } - } - } - - .header { - /** HEADER **/ - a { - &.button, - &.options, - &.select, - &.threads { - color: var(--secondary-text-color); - } - } - } - - #layout-content { - & > .header { - a { - &.button { - color: var(--secondary-text-color); - - .task-addressbook &, - .task-tasks &, - .task-settings & { - --secondary-text-color: var(--main-text-color); - } - } - } - - .header-title { - color: var(--secondary-text-color); - - .task-addressbook &, - .task-tasks &, - .task-settings & { - --secondary-text-color: var(--main-text-color); - } - } - } - - html@{layout-phone} &, - html@{layout-small} & { - &.only-content { - padding: 0 15px; - } - } - } + & > div { + & > .header { + .mel-no-border(); + + a.button { + color: var(--secondary-text-color); + } + } + } + + .header { + /** HEADER **/ + a { + &.button, + &.options, + &.select, + &.threads { + color: var(--secondary-text-color); + } + } + } + + #layout-content { + & > .header { + a { + &.button { + color: var(--secondary-text-color); + + .task-addressbook &, + .task-tasks &, + .task-settings & { + --secondary-text-color: var(--main-text-color); + } + } + } + + .header-title { + color: var(--secondary-text-color); + + .task-addressbook &, + .task-tasks &, + .task-settings & { + --secondary-text-color: var(--main-text-color); + } + } + } + + html@{layout-phone} &, + html@{layout-small} & { + &.only-content { + padding: 0 15px; + } + } + } } .layout-hidden { - display: none !important; + display: none !important; } html { - &@{layout-normal} { - .show-normal { - &.layout-hidden { - display: none !important; - } - } - } + &@{layout-normal} { + .show-normal { + &.layout-hidden { + display: none !important; + } + } + } } /** HEADER **/ .header { - a.button.icon:not(.disabled):hover { - .mel-tiercary-colors(); - } + a.button.icon:not(.disabled):hover { + .mel-tiercary-colors(); + } - a.toolbar-button.button.icon:not(.disabled):hover, - a.toolbar-button:hover { - .mel-secondary-colors-important(); - } + a.toolbar-button.button.icon:not(.disabled):hover, + a.toolbar-button:hover { + .mel-secondary-colors-important(); + } } /** MENU **/ .menu { - &.pagenav { - &.pagenav-list { - & + .navlist { - background-color: var(--main-bckg-color); - } - - body.task-tasks & { - a { - color: var(--secondary-text-color); - } - - .pagenav-text { - color: var(--secondary-text-color); - } - } - } - } - - a:not(.disabled):focus, - a:not(.disabled):hover { - .mel-secondary-colors-important(); - } - - a { - /** ICONS **/ - &.icofont-plus-circle:before { - content: '\efc0' !important; - font-family: var(--secondary-icon-font) !important; - } - &.icofont-question-circle:before { - content: '\efca' !important; - font-family: var(--secondary-icon-font) !important; - } - - &.icofont-favourite:before { - content: '\ef25' !important; - font-family: var(--secondary-icon-font) !important; - } - - &.icofont-search:before { - content: '\ed1b' !important; - font-family: var(--secondary-icon-font) !important; - } - } - // .responses { - // display: none!important; - // } + &.pagenav { + &.pagenav-list { + & + .navlist { + background-color: var(--main-bckg-color); + } + + body.task-tasks & { + a { + color: var(--secondary-text-color); + } + + .pagenav-text { + color: var(--secondary-text-color); + } + } + } + } + + a:not(.disabled):focus, + a:not(.disabled):hover { + .mel-secondary-colors-important(); + } + + a { + /** ICONS **/ + &.icofont-plus-circle:before { + content: '\efc0' !important; + font-family: var(--secondary-icon-font) !important; + } + &.icofont-question-circle:before { + content: '\efca' !important; + font-family: var(--secondary-icon-font) !important; + } + + &.icofont-favourite:before { + content: '\ef25' !important; + font-family: var(--secondary-icon-font) !important; + } + + &.icofont-search:before { + content: '\ed1b' !important; + font-family: var(--secondary-icon-font) !important; + } + } + // .responses { + // display: none!important; + // } } .task-settings { - .menu { - &#toolbar-menu { - a { - color: var(--main-text-color) !important; - } - } - } + .menu { + &#toolbar-menu { + a { + color: var(--main-text-color) !important; + } + } + } } #acllist-footer { - a { - color: var(--main-text-color) !important; - } + a { + color: var(--main-text-color) !important; + } } #toolbar-menu { - a { - &.icon-mel-undo { - &::before { - content: '\e936' !important; - font-family: var(--main-icon-font) !important; - } - } - } + a { + &.icon-mel-undo { + &::before { + content: '\e936' !important; + font-family: var(--main-icon-font) !important; + } + } + } } /** LISTES **/ ul.treelist { - li { - &.selected { - & > div { - & > a { - .mel-tiercary-colors(); - } - } - - & > a { - .mel-tiercary-colors(); - } - } - - &.context-source:not(.selected) { - & > a { - color: var(--alternate-text-color); - background-color: var(--secondary-bckg-color) !important; - } - - & > div { - & > a { - background-color: var(--secondary-bckg-color) !important; - } - } - } - - &.droptarget { - & > a { - background-color: var(--drag-n-drop-color); - } - } - } - - .task-addressbook & { - &.iconized { - li { - div { - &.treetoggle { - top: 0px !important; - } - } - } - } - } + li { + &.selected { + & > div { + & > a { + .mel-tiercary-colors(); + } + } + + & > a { + .mel-tiercary-colors(); + } + } + + &.context-source:not(.selected) { + & > a { + color: var(--alternate-text-color); + background-color: var(--secondary-bckg-color) !important; + } + + & > div { + & > a { + background-color: var(--secondary-bckg-color) !important; + } + } + } + + &.droptarget { + & > a { + background-color: var(--drag-n-drop-color); + } + } + } + + .task-addressbook & { + &.iconized { + li { + div { + &.treetoggle { + top: 0px !important; + } + } + } + } + } } .mel-selectable { - &:extend(#theme-panel .picture); - border: solid thin var(--invisible); - cursor: pointer; - - &:hover { - background-color: var(--tierciary-bckg-color); - color: var(--secondary-text-color); - } - - &.selected { - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - } - - &.with-separator { - border-bottom: solid thin #a3a7bc; - } - - &.picture-only { - background-size: 102% !important; - background-repeat: no-repeat !important; - background-position: center !important; - width: 94%; - - &:hover { - &:extend(#theme-panel .picture:hover); - } - - &.selected { - &:extend(#theme-panel .picture.selected); - - html.dark-mode & { - &:extend(html.dark-mode #theme-panel .picture.selected); - border: none; - } - } - - &.with-border { - box-shadow: - 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), - 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108); - - &:hover { - box-shadow: - 0 -0.4px 3.6px 0 rgba(0, 0, 0, 0.132), - 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108); - } - - &.selected { - &:hover { - &:extend(.mel-selectable.picture-only.selected); - } - } - } - } + &:extend(#theme-panel .picture); + border: solid thin var(--invisible); + cursor: pointer; + + &:hover { + background-color: var(--tierciary-bckg-color); + color: var(--secondary-text-color); + } + + &.selected { + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + } + + &.with-separator { + border-bottom: solid thin #a3a7bc; + } + + &.picture-only { + background-size: 102% !important; + background-repeat: no-repeat !important; + background-position: center !important; + width: 94%; + + &:hover { + &:extend(#theme-panel .picture:hover); + } + + &.selected { + &:extend(#theme-panel .picture.selected); + + html.dark-mode & { + &:extend(html.dark-mode #theme-panel .picture.selected); + border: none; + } + } + + &.with-border { + box-shadow: + 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), + 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108); + + &:hover { + box-shadow: + 0 -0.4px 3.6px 0 rgba(0, 0, 0, 0.132), + 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108); + } + + &.selected { + &:hover { + &:extend(.mel-selectable.picture-only.selected); + } + } + } + } } .popupmenu { - .listing { - li { - &.selected { - .mel-secondary-colors(); - } - } - } + .listing { + li { + &.selected { + .mel-secondary-colors(); + } + } + } } .listing { - &:not(.treelist) { - li { - &.context-source { - &:not(.selected) { - background-color: var(--secondary-bckg-color) !important; - } - } - } - } - - .scroller > & { - li { - a { - color: var(--secondary-text-color); - } - } - } - - ul& { - li { - ul { - border-top: none; - } - } - } - - li { - border: none; - &.selected { - .mel-secondary-colors(); - - & > div { - & > * { - /** CALENDRIER **/ - background-color: var(--tierciary-bckg-color) !important; - border: none !important; - } - } - } - - & > div { - &.calendar { - .calname { - &::before { - /** CALENDRIER **/ - opacity: 0.7; - } - } - } - - &.tasklist { - .listname { - &::before { - content: '\e932' !important; - font-family: var(--main-icon-font) !important; - } - } - - &.readonly { - .listname { - &::before { - content: '\e966' !important; - font-family: var(--main-icon-font) !important; - } - - &::after { - display: none; - } - } - } - } - - &.readonly { - a { - &:first-child { - &::after { - /** CALENDRIER **/ - font-size: 0.8em !important; - .mel-invisible-background(); - color: var(--fourth-text-color) !important; - } - } - } - } - - a { - &.quickview { - &::before { - /** CALENDRIER **/ - color: var(--fourth-text-color) !important; - } - } - } - - body.task-tasks & { - & > a { - &:first-child { - cursor: pointer; - } - } - } - } - - &.readonly:not(.virtual) { - & > div { - a { - &:first-child { - a::after { - /** CALENDRIER **/ - font-size: 0.8em !important; - .mel-invisible-background(); - color: var(--fourth-text-color) !important; - } - } - } - } - } - - &:hover { - body.task-tasks & { - & > div { - & > a { - &:first-child { - &:hover { - background-color: var(--tierciary-bckg-color) !important; - border-top-right-radius: 15px; - border-bottom-right-radius: 15px; - } - } - } - } - } - } - - &.disabled { - color: var(--disabled-text-color-listing); - } - } - - tr { - &.selected { - td { - .mel-secondary-colors(); - } - } - - &.disabled { - td { - color: var(--disabled-text-color-listing); - } - } - } - - tbody { - tr { - &.context-source:not(.selected) { - & > td { - background-color: var(--secondary-bckg-color) !important; - } - } - } - - td { - color: var(--secondary-text-color); - border: none; - - a { - color: var(--secondary-text-color); - } - } - } - - table& { - td { - &.subscribed { - width: 30px; - padding: 3px 12px 3px 3px; - text-align: right; - } - } - } + &:not(.treelist) { + li { + &.context-source { + &:not(.selected) { + background-color: var(--secondary-bckg-color) !important; + } + } + } + } + + .scroller > & { + li { + a { + color: var(--secondary-text-color); + } + } + } + + ul& { + li { + ul { + border-top: none; + } + } + } + + li { + border: none; + &.selected { + .mel-secondary-colors(); + + & > div { + & > * { + /** CALENDRIER **/ + background-color: var(--tierciary-bckg-color) !important; + border: none !important; + } + } + } + + & > div { + &.calendar { + .calname { + &::before { + /** CALENDRIER **/ + opacity: 0.7; + } + } + } + + &.tasklist { + .listname { + &::before { + content: '\e932' !important; + font-family: var(--main-icon-font) !important; + } + } + + &.readonly { + .listname { + &::before { + content: '\e966' !important; + font-family: var(--main-icon-font) !important; + } + + &::after { + display: none; + } + } + } + } + + &.readonly { + a { + &:first-child { + &::after { + /** CALENDRIER **/ + font-size: 0.8em !important; + .mel-invisible-background(); + color: var(--fourth-text-color) !important; + } + } + } + } + + a { + &.quickview { + &::before { + /** CALENDRIER **/ + color: var(--fourth-text-color) !important; + } + } + } + + body.task-tasks & { + & > a { + &:first-child { + cursor: pointer; + } + } + } + } + + &.readonly:not(.virtual) { + & > div { + a { + &:first-child { + a::after { + /** CALENDRIER **/ + font-size: 0.8em !important; + .mel-invisible-background(); + color: var(--fourth-text-color) !important; + } + } + } + } + } + + &:hover { + body.task-tasks & { + & > div { + & > a { + &:first-child { + &:hover { + background-color: var(--tierciary-bckg-color) !important; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + } + } + } + } + } + } + + &.disabled { + color: var(--disabled-text-color-listing); + } + } + + tr { + &.selected { + td { + .mel-secondary-colors(); + } + } + + &.disabled { + td { + color: var(--disabled-text-color-listing); + } + } + } + + tbody { + tr { + &.context-source:not(.selected) { + & > td { + background-color: var(--secondary-bckg-color) !important; + } + } + } + + td { + color: var(--secondary-text-color); + border: none; + + a { + color: var(--secondary-text-color); + } + } + } + + table& { + td { + &.subscribed { + width: 30px; + padding: 3px 12px 3px 3px; + text-align: right; + } + } + } } /* EXCEPTIONS */ body.task-tasks .listing li.selected:hover > div > a:first-child:hover { - background-color: var(--tierciary-bckg-color) !important; - border-top-right-radius: 0; - border-bottom-right-radius: 0; + background-color: var(--tierciary-bckg-color) !important; + border-top-right-radius: 0; + border-bottom-right-radius: 0; } /* FIN EXCEPTION */ .listing-info { - color: var(--secondary-text-color); + color: var(--secondary-text-color); } li { - &.mel { - & > a { - &::before { - content: var(--empty-content); - } - } - } + &.mel { + & > a { + &::before { + content: var(--empty-content); + } + } + } } .mel-list { - background-color: var(--main-bckg-color); - - li { - .mel-invisible-background-unimportant(); - color: var(--secondary-text-color); - padding: 0 1.25rem; - - &.selected { - background-color: var(--tierciary-bckg-color) !important; - } - - .mel-text { - margin-left: 15px; - width: 100%; - display: inline-block; - padding: 0.75rem 0; - } - - .mel-item-icon { - position: absolute; - top: 14px; - left: 10px; - } - } - - .mel-list-item { - &.mel-item-7 { - background-color: var(--main-bckg-color); - } - - &:hover { - background-color: var(--document-create-list-folder-bckg-color); - } - } - - &.mel-tree { - .mel-list-item { - &:hover { - & > .mel-text { - text-decoration: underline; - } - } - } - } + background-color: var(--main-bckg-color); + + li { + .mel-invisible-background-unimportant(); + color: var(--secondary-text-color); + padding: 0 1.25rem; + + &.selected { + background-color: var(--tierciary-bckg-color) !important; + } + + .mel-text { + margin-left: 15px; + width: 100%; + display: inline-block; + padding: 0.75rem 0; + } + + .mel-item-icon { + position: absolute; + top: 14px; + left: 10px; + } + } + + .mel-list-item { + &.mel-item-7 { + background-color: var(--main-bckg-color); + } + + &:hover { + background-color: var(--document-create-list-folder-bckg-color); + } + } + + &.mel-tree { + .mel-list-item { + &:hover { + & > .mel-text { + text-decoration: underline; + } + } + } + } } /** AUTRE **/ a.button.icon:not(.disabled):focus { - .mel-tiercary-colors(); + .mel-tiercary-colors(); } .mel-animated { - .mel-all-ease-in-animation(); + .mel-all-ease-in-animation(); } .hidden-item-mt { - width: 0; + width: 0; } #menu-gu-black { - width: 100%; - height: 100%; - background-color: var(--ghost-div-background); - z-index: 1; - position: absolute; - top: 0; - left: 0; + width: 100%; + height: 100%; + background-color: var(--ghost-div-background); + z-index: 1; + position: absolute; + top: 0; + left: 0; } /** MESSAGES **/ #message-header { - .short-header { - display: flex; - - img.contactphoto { - margin: 0 1rem 0 0; - border-radius: 50%; - width: 4rem; - height: 4rem; - object-fit: cover; - } - } + .short-header { + display: flex; + + img.contactphoto { + margin: 0 1rem 0 0; + border-radius: 50%; + width: 4rem; + height: 4rem; + object-fit: cover; + } + } } .messagelist { - tr { - &:hover { - span { - &.unflagged { - &::before { - font-size: 90%; - } - } - } - } - } - - td { - &.subject { - flex-wrap: wrap; - - span { - line-height: 1.8em; - - &.date { - font-size: 85%; - padding-top: 4px; - } - } - } - - &.labels { - flex-basis: 100%; - border: none !important; - } - } - - span { - &.attachment { - span { - &::before { - font-size: 80%; - color: var(--other-text-color); - } - - &.flagged { - &::before { - font-size: 90%; - } - } - } - } - } + tr { + &:hover { + span { + &.unflagged { + &::before { + font-size: 90%; + } + } + } + } + } + + td { + &.subject { + flex-wrap: wrap; + + span { + line-height: 1.8em; + + &.date { + font-size: 85%; + padding-top: 4px; + } + } + } + + &.labels { + flex-basis: 100%; + border: none !important; + } + } + + span { + &.attachment { + span { + &::before { + font-size: 80%; + color: var(--other-text-color); + } + + &.flagged { + &::before { + font-size: 90%; + } + } + } + } + } } .folderlist { - ul& { - &.treelist { - li { - ul { - li /*1*/ { - a { - padding-left: 1.5em; - } - - div { - &.treetoggle { - left: 0; - } - } - - li /*2*/ { - a { - padding-left: 3em; - } - - div { - &.treetoggle { - left: 1.5em; - } - } - - li /*3*/ { - a { - padding-left: 4.5em; - } - - div { - &.treetoggle { - left: 3em; - } - } - - li /*4*/ { - a { - padding-left: 6em; - } - - div { - &.treetoggle { - left: 4.5em; - } - } - - li /*5*/ { - a { - padding-left: 7.5em; - } - - div { - &.treetoggle { - left: 6em; - } - } - } - } - } - } - } - } - } - } - } - - li { - &.mailbox { - .unreadcount { - background: var(--roundbadge-bckg-color); - color: var(--tierciary-text-color); - font-size: 0.9rem; - border-radius: 5rem; - } - } - - &.boite { - & > a { - &::before { - content: '\f01c'; - font-weight: 900; - } - } - } - } + ul& { + &.treelist { + li { + ul { + li /*1*/ { + a { + padding-left: 1.5em; + } + + div { + &.treetoggle { + left: 0; + } + } + + li /*2*/ { + a { + padding-left: 3em; + } + + div { + &.treetoggle { + left: 1.5em; + } + } + + li /*3*/ { + a { + padding-left: 4.5em; + } + + div { + &.treetoggle { + left: 3em; + } + } + + li /*4*/ { + a { + padding-left: 6em; + } + + div { + &.treetoggle { + left: 4.5em; + } + } + + li /*5*/ { + a { + padding-left: 7.5em; + } + + div { + &.treetoggle { + left: 6em; + } + } + } + } + } + } + } + } + } + } + } + + li { + &.mailbox { + .unreadcount { + background: var(--roundbadge-bckg-color); + color: var(--tierciary-text-color); + font-size: 0.9rem; + border-radius: 5rem; + } + } + + &.boite { + & > a { + &::before { + content: '\f01c'; + font-weight: 900; + } + } + } + } } /* JOKER */ @@ -871,402 +871,402 @@ a.button.icon:not(.disabled):focus { .listing li.virtual.trash > a, .listing li > a.virtual.dossier, .listing li.virtual.dossier > a { - opacity: 0.9; + opacity: 0.9; } /*FIN JOKER*/ .task-mail { - &.action-compose { - #layout-sidebar { - margin-left: 0px !important; - - .scroller { - a { - &.button.icon.dropdown { - color: var(--secondary-text-color); - border-radius: 5px; - .mel-all-ease-in-animation(); - - &:hover { - .mel-secondary-colors(); - } - } - - &.delete { - color: var(--secondary-text-color); - border-radius: 5px; - .mel-all-ease-in-animation(); - - &:hover { - .mel-secondary-colors(); - } - } - } - } - } - - #files-compose-dialog { - display: none !important; - } - - .popup { - #files-compose-dialog { - display: flex !important; - } - } - } - - .header { - .attach { - display: none; - } - } + &.action-compose { + #layout-sidebar { + margin-left: 0px !important; + + .scroller { + a { + &.button.icon.dropdown { + color: var(--secondary-text-color); + border-radius: 5px; + .mel-all-ease-in-animation(); + + &:hover { + .mel-secondary-colors(); + } + } + + &.delete { + color: var(--secondary-text-color); + border-radius: 5px; + .mel-all-ease-in-animation(); + + &:hover { + .mel-secondary-colors(); + } + } + } + } + } + + #files-compose-dialog { + display: none !important; + } + + .popup { + #files-compose-dialog { + display: flex !important; + } + } + } + + .header { + .attach { + display: none; + } + } } html { - &@{layout-normal} { - body.task-mail { - &.action-compose { - #layout-sidebar { - display: initial !important; - } - } - } - } - - body { - a { - &.filename { - .attachment-name { - color: black; - } - } - } - } + &@{layout-normal} { + body.task-mail { + &.action-compose { + #layout-sidebar { + display: initial !important; + } + } + } + } + + body { + a { + &.filename { + .attachment-name { + color: black; + } + } + } + } } body.task-mail { - &.action-compose { - a.filename { - .attachment-name { - color: var(--secondary-text-color); - } - } - @media screen and (max-width: 997px) { - #layout-content { - .header { - .menu { - &.toolbar { - a { - font-size: 1rem; - } - } - } - } - } - } - } - - &.action-none { - #layout-content { - border-left: solid #484d7a; - } - } - - @media screen and (max-width: 997px) { - #layout-content { - .header { - .menu { - &.toolbar { - a { - font-size: 0.65rem; - line-height: 2; - - &::before { - font-size: 1rem; - } - } - } - } - } - } - } - - html@{layout-phone} & { - a { - &.toolbar-list-button { - display: inline-block !important; - } - } - } - - html@{layout-small} & { - a { - &.toolbar-list-button { - display: inline-block !important; - } - } - } - - html@{touch} & { - #layout-sidebar { - max-width: 100%; - } - } + &.action-compose { + a.filename { + .attachment-name { + color: var(--secondary-text-color); + } + } + @media screen and (max-width: 997px) { + #layout-content { + .header { + .menu { + &.toolbar { + a { + font-size: 1rem; + } + } + } + } + } + } + } + + &.action-none { + #layout-content { + border-left: solid #484d7a; + } + } + + @media screen and (max-width: 997px) { + #layout-content { + .header { + .menu { + &.toolbar { + a { + font-size: 0.65rem; + line-height: 2; + + &::before { + font-size: 1rem; + } + } + } + } + } + } + } + + html@{layout-phone} & { + a { + &.toolbar-list-button { + display: inline-block !important; + } + } + } + + html@{layout-small} & { + a { + &.toolbar-list-button { + display: inline-block !important; + } + } + } + + html@{touch} & { + #layout-sidebar { + max-width: 100%; + } + } } a { - &.filename { - &:hover { - .attachment-name { - text-decoration: underline; - } - } - } + &.filename { + &:hover { + .attachment-name { + text-decoration: underline; + } + } + } } #compose-contacts { - #annuaire-list { - [aria-expanded='true'] { - background-color: var(--default-background) !important; - color: var(--alternate-text-color) !important; - } - - html & { - &.folder { - color: #757575 !important; - } - } - - .object { - &:hover { - background-color: var(--tierciary-bckg-color) !important; - color: var(--secondary-text-color); - } - - &.person { - &.selected { - color: var(--secondary-text-color); - } - - &.added { - background-color: var(--main-bckg-color) !important; - color: var(--secondary-text-color); - } - } - } - } + #annuaire-list { + [aria-expanded='true'] { + background-color: var(--default-background) !important; + color: var(--alternate-text-color) !important; + } + + html & { + &.folder { + color: #757575 !important; + } + } + + .object { + &:hover { + background-color: var(--tierciary-bckg-color) !important; + color: var(--secondary-text-color); + } + + &.person { + &.selected { + color: var(--secondary-text-color); + } + + &.added { + background-color: var(--main-bckg-color) !important; + color: var(--secondary-text-color); + } + } + } + } } #files-folder-list { - div& { - ul { - li { - &.selected { - .mel-main-colors(); - } - } - } - } + div& { + ul { + li { + &.selected { + .mel-main-colors(); + } + } + } + } } #toolbar-list-menu { - li { - .compose { - display: none; - - .task-mail & { - display: unset; - } - } - } + li { + .compose { + display: none; + + .task-mail & { + display: unset; + } + } + } } #mailsearchlist { - html@{layout-phone} & { - a { - &::before { - height: auto !important; - } - } - } - - html@{layout-small} & { - a { - &::before { - height: auto !important; - } - } - } + html@{layout-phone} & { + a { + &::before { + height: auto !important; + } + } + } + + html@{layout-small} & { + a { + &::before { + height: auto !important; + } + } + } } #mel-added-list-menu { - html@{layout-phone} & { - display: none !important; - } + html@{layout-phone} & { + display: none !important; + } - html@{layout-small} & { - display: none !important; - } + html@{layout-small} & { + display: none !important; + } } .recipient-input { - .recipient { - max-width: 300px; - } + .recipient { + max-width: 300px; + } } #compose-content { - html@{layout-phone} & { - overflow-x: hidden; - } + html@{layout-phone} & { + overflow-x: hidden; + } - html@{layout-small} & { - overflow-x: hidden; - } + html@{layout-small} & { + overflow-x: hidden; + } } #stockage-space-text { - &::before { - content: '\e94f'; - font-family: var(--main-icon-font); - margin-right: 5px; - } + &::before { + content: '\e94f'; + font-family: var(--main-icon-font); + margin-right: 5px; + } } .quota-widget { - &::before { - display: none; - } + &::before { + display: none; + } } #message-model { - width: 100%; - text-align: center; - background-color: var(--alternate-bckg-color); - padding: 5px 0; - border-radius: 5px; + width: 100%; + text-align: center; + background-color: var(--alternate-bckg-color); + padding: 5px 0; + border-radius: 5px; } #abs_msg_inter { - display: block !important; + display: block !important; } /** POPUP **/ .popup { - & > div { - & > div { - #directorylist { - & > li { - background-color: var(--secondary-bckg-color); - - &:hover { - background-color: var(--tierciary-bckg-color); - } - - & > a { - &:hover { - .mel-invisible-background-unimportant(); - } - } - } - } - } - } + & > div { + & > div { + #directorylist { + & > li { + background-color: var(--secondary-bckg-color); + + &:hover { + background-color: var(--tierciary-bckg-color); + } + + & > a { + &:hover { + .mel-invisible-background-unimportant(); + } + } + } + } + } + } } .popover-overlay { - html@{touch} & { - z-index: 1000; - background-color: var(--overlay-background); - position: absolute; - top: 0; - bottom: 0; - width: 100%; - } + html@{touch} & { + z-index: 1000; + background-color: var(--overlay-background); + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } } .wlp_box { - background-color: var(--main-bckg-color); - border: 2px solid var(--windows-like-popup-border); - z-index: 2; - - &.fullscreen { - left: 60px !important; - top: 60px !important; - width: calc(100% - 60px) !important; - height: calc(100% - 60px) !important; - - .framed & { - left: 0 !important; - width: 100% !important; - } - - html.touch & { - left: 0 !important; - width: 100% !important; - } - - .wlp-contents { - height: calc(100% - 47px) !important; - } - } + background-color: var(--main-bckg-color); + border: 2px solid var(--windows-like-popup-border); + z-index: 2; + + &.fullscreen { + left: 60px !important; + top: 60px !important; + width: calc(100% - 60px) !important; + height: calc(100% - 60px) !important; + + .framed & { + left: 0 !important; + width: 100% !important; + } + + html.touch & { + left: 0 !important; + width: 100% !important; + } + + .wlp-contents { + height: calc(100% - 47px) !important; + } + } } .wlp-header { - padding-left: 1rem; - margin-top: 5px; - border-bottom: solid thin; - color: var(--secondary-text-color); - border-color: var(--invisible); - - h3 { - margin-top: 5px; - margin-bottom: 10px; - } - - .mel-focus { - &.focused { - box-shadow: 0 0 0 0.2rem var(--windows-like-popup-button-focus); - } - } - - .mel-button { - &:focus { - box-shadow: 0 0 0 0.2rem var(--windows-like-popup-button-focus); - } - } + padding-left: 1rem; + margin-top: 5px; + border-bottom: solid thin; + color: var(--secondary-text-color); + border-color: var(--invisible); + + h3 { + margin-top: 5px; + margin-bottom: 10px; + } + + .mel-focus { + &.focused { + box-shadow: 0 0 0 0.2rem var(--windows-like-popup-button-focus); + } + } + + .mel-button { + &:focus { + box-shadow: 0 0 0 0.2rem var(--windows-like-popup-button-focus); + } + } } .wlp-contents { - background-color: var(--default-background); - border: solid 4px var(--windows-like-popup-border-content); + background-color: var(--default-background); + border: solid 4px var(--windows-like-popup-border-content); } .wlp-minifieds { - position: absolute; - bottom: 0; - white-space: nowrap; - overflow: auto; - - &.auto { - left: 60px; - width: auto; - - html@{touch} & { - left: 0; - } - } + position: absolute; + bottom: 0; + white-space: nowrap; + overflow: auto; + + &.auto { + left: 60px; + width: auto; + + html@{touch} & { + left: 0; + } + } - .wlp-header { - display: inline-block; - margin: 0; - padding: 5px; - background-color: var(--main-bckg-color); - border: solid thin var(--windows-like-popup-border-header); - } + .wlp-header { + display: inline-block; + margin: 0; + padding: 5px; + background-color: var(--main-bckg-color); + border: solid thin var(--windows-like-popup-border-header); + } } /** CALENDRIER **/ @@ -1314,259 +1314,259 @@ a.button.saveas::before, #tasklist .taskhead:not(.flagged):hover span.flagged::before, #tasklist .taskhead.flagged span.flagged::before, #taskshow.status-flagged h2::before { - font-size: 1em !important; + font-size: 1em !important; } /** FIN JOKER **/ div.calendar-invitebox { - .rsvp-status { - font-weight: bold; - } + .rsvp-status { + font-weight: bold; + } } .calendar-datepicker { - .ui-datepicker-header { - background-color: var(--tierciary-bckg-color) !important; - border: none !important; - } + .ui-datepicker-header { + background-color: var(--tierciary-bckg-color) !important; + border: none !important; + } - .ui-datepicker { - background-color: var(--tierciary-bckg-color) !important; - border: none !important; - } + .ui-datepicker { + background-color: var(--tierciary-bckg-color) !important; + border: none !important; + } } body { - &.task-calendar { - .ui-datepicker-inline { - .ui-datepicker-activerange { - background-color: var(--main-bckg-color) !important; - } - - .ui-datepicker-week-col { - color: var(--calendar-week-text-color) !important; - } - } - - .popup { - &.ui-dialog-content { - #showcontacts { - display: none; - } - } - } - } + &.task-calendar { + .ui-datepicker-inline { + .ui-datepicker-activerange { + background-color: var(--main-bckg-color) !important; + } + + .ui-datepicker-week-col { + color: var(--calendar-week-text-color) !important; + } + } + + .popup { + &.ui-dialog-content { + #showcontacts { + display: none; + } + } + } + } } .ui-datepicker { - &.ui-widget-content { - a { - &.ui-state-active { - background-color: var(--roundbadge-bckg-color) !important; - color: var(--calendar-highlight-text-color) !important; - - &.ui-state-highlight { - background-color: var(--roundbadge-bckg-color) !important; - color: var(--calendar-highlight-text-color) !important; - } - } - } - - .ui-state-highlight { - .mel-secondary-colors-important(); - } - } - - a { - &.ui-state-active { - &.ui-state-highlight { - background-color: var(--roundbadge-bckg-color) !important; - color: var(--calendar-highlight-text-color) !important; - } - } - } - - th { - padding: 0.7em 0 !important; - } - - select { - &.ui-datepicker-year { - width: 5em !important; - margin-left: 15px; - } - } - - .ui-state-highlight { - .mel-secondary-colors-important(); - } + &.ui-widget-content { + a { + &.ui-state-active { + background-color: var(--roundbadge-bckg-color) !important; + color: var(--calendar-highlight-text-color) !important; + + &.ui-state-highlight { + background-color: var(--roundbadge-bckg-color) !important; + color: var(--calendar-highlight-text-color) !important; + } + } + } + + .ui-state-highlight { + .mel-secondary-colors-important(); + } + } + + a { + &.ui-state-active { + &.ui-state-highlight { + background-color: var(--roundbadge-bckg-color) !important; + color: var(--calendar-highlight-text-color) !important; + } + } + } + + th { + padding: 0.7em 0 !important; + } + + select { + &.ui-datepicker-year { + width: 5em !important; + margin-left: 15px; + } + } + + .ui-state-highlight { + .mel-secondary-colors-important(); + } } #mailvelope-warning { - &.ui { - &.alert { - span { - color: var(--main-text-color); - } - } - } + &.ui { + &.alert { + span { + color: var(--main-text-color); + } + } + } } .mm-agenda-icon { - font-size: x-large; - position: relative; + font-size: x-large; + position: relative; } #eventshow { - .event-attendees { - .attendee { - display: block; - margin-bottom: 5px; - } - } + .event-attendees { + .attendee { + display: block; + margin-bottom: 5px; + } + } } #datepicker-onoff { - color: var(--secondary-text-color) !important; + color: var(--secondary-text-color) !important; - &:hover { - background-color: var(--alternate-bckg-color-2) !important; - } + &:hover { + background-color: var(--alternate-bckg-color-2) !important; + } - &:focus { - box-shadow: none; - } + &:focus { + box-shadow: none; + } - html@{layout-small} & { - display: none; - } + html@{layout-small} & { + display: none; + } - html@{layout-phone} & { - &:extend(html.layout-small #datepicker-onoff); - } + html@{layout-phone} & { + &:extend(html.layout-small #datepicker-onoff); + } } #datepicker { - .mel-all-ease-in-animation(); + .mel-all-ease-in-animation(); } /*** Full Calendar ***/ .fc-event { - border-width: 1px 7px 1px 1px !important; - font-size: 12px !important; - - &.cal-event-status-cancelled { - color: var(--main-text-color) !important; - - div { - text-decoration: line-through; - } - - .fc-title { - opacity: 1; - text-decoration: line-through; - } - } - - &.cal-event-status-tentative { - opacity: 0.6 !important; - - .fc-title { - opacity: 1; - font-style: italic; - } - - .fc-time, - .fc-time::before, - .fc-time span { - font-style: italic; - font-weight: normal; - } - } - - &.cal-event-status-telework, - &.cal-event-status-free { - color: var(--main-text-color) !important; - } - - &.cal-event-status-confirmed { - .fc-time::before, - .fc-time span { - font-weight: bold; - } - } - - &.cal-event-partstat-declined { - .fc-time::before, - .fc-time span { - opacity: 0.7; - text-decoration: line-through; - font-style: italic; - } - } - - &.cal-event-partstat-delegated { - .fc-time::before, - .fc-time span { - opacity: 0.7; - text-decoration: line-through; - font-style: italic; - } - } - - &.cal-event-partstat-tentative { - .fc-time::before, - .fc-time span { - font-style: italic; - } - } - - &.cal-event-partstat-needs-action { - .fc-time::before, - .fc-time span { - font-style: italic; - } - } + border-width: 1px 7px 1px 1px !important; + font-size: 12px !important; + + &.cal-event-status-cancelled { + color: var(--main-text-color) !important; + + div { + text-decoration: line-through; + } + + .fc-title { + opacity: 1; + text-decoration: line-through; + } + } + + &.cal-event-status-tentative { + opacity: 0.6 !important; + + .fc-title { + opacity: 1; + font-style: italic; + } + + .fc-time, + .fc-time::before, + .fc-time span { + font-style: italic; + font-weight: normal; + } + } + + &.cal-event-status-telework, + &.cal-event-status-free { + color: var(--main-text-color) !important; + } + + &.cal-event-status-confirmed { + .fc-time::before, + .fc-time span { + font-weight: bold; + } + } + + &.cal-event-partstat-declined { + .fc-time::before, + .fc-time span { + opacity: 0.7; + text-decoration: line-through; + font-style: italic; + } + } + + &.cal-event-partstat-delegated { + .fc-time::before, + .fc-time span { + opacity: 0.7; + text-decoration: line-through; + font-style: italic; + } + } + + &.cal-event-partstat-tentative { + .fc-time::before, + .fc-time span { + font-style: italic; + } + } + + &.cal-event-partstat-needs-action { + .fc-time::before, + .fc-time span { + font-style: italic; + } + } } html.dark-mode .fc-event.cal-event-status-cancelled, html.dark-mode .fc-event.cal-event-status-free, html.dark-mode .fc-event.cal-event-status-telework { - color: #c7dfff !important; + color: #c7dfff !important; } .fc { - .fc-event { - .fc-title { - font-weight: 400 !important; - padding: 3px; - } - - .fc-bg { - opacity: 0 !important; - } - } - .fc-time i { - float: left; - margin-left: 0 !important; - margin-right: 0.25rem; - } + .fc-event { + .fc-title { + font-weight: 400 !important; + padding: 3px; + } + + .fc-bg { + opacity: 0 !important; + } + } + .fc-time i { + float: left; + margin-left: 0 !important; + margin-right: 0.25rem; + } } .fc-event-location { - padding: 1px 3px; + padding: 1px 3px; } .fc-agenda-divider-inner { - height: 0 !important; + height: 0 !important; } .fc-time-grid-event { - opacity: 0.9; + opacity: 0.9; - .fc-time { - text-align: center; - } + .fc-time { + text-align: center; + } } // .ui-dialog { @@ -1578,55 +1578,55 @@ html.dark-mode .fc-event.cal-event-status-telework { /** MEL ADD **/ .mel-add { - display: inline-block; - width: 107px; - height: 32px; - border-radius: 50px; - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - padding: 5px 10px; - padding-top: 5px; - padding-right: 10px; - padding-bottom: 5px; - padding-left: 10px; - cursor: pointer; - transition: all 0.1s ease-in; - float: right; - font-size: 1rem; - font-weight: initial; - - &:hover { - background-color: var(--tierciary-bckg-color); - } - - &.left { - float: left; - } - - & > span { - & > .plus { - position: absolute; - top: 3px; - right: -43px; - } - } + display: inline-block; + width: 107px; + height: 32px; + border-radius: 50px; + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + padding: 5px 10px; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + cursor: pointer; + transition: all 0.1s ease-in; + float: right; + font-size: 1rem; + font-weight: initial; + + &:hover { + background-color: var(--tierciary-bckg-color); + } + + &.left { + float: left; + } + + & > span { + & > .plus { + position: absolute; + top: 3px; + right: -43px; + } + } } /** FORM **/ select { - &.mel-select { - &.form-control { - border-radius: 60px; - background-color: var(--alternate-bckg-color); - border: none; - color: var(--main-text-color); - } - } + &.mel-select { + &.form-control { + border-radius: 60px; + background-color: var(--alternate-bckg-color); + border: none; + color: var(--main-text-color); + } + } } .form-control:disabled, .form-control[readonly] { - background-color: var(--input-mel-disabled-background-color); + background-color: var(--input-mel-disabled-background-color); } /** CUSTOM HTML **/ @@ -1634,553 +1634,553 @@ select { /* SEPARATE */ separate { - border-top-color: var(--separate); - border-top-style: solid; - border-top-width: thin; - margin: 20px 30px; - - &.device { - display: block; - border-color: var(--separate-device); - margin-bottom: 14px; - margin-top: 9px; - margin-left: 0; - margin-right: 0; - } + border-top-color: var(--separate); + border-top-style: solid; + border-top-width: thin; + margin: 20px 30px; + + &.device { + display: block; + border-color: var(--separate-device); + margin-bottom: 14px; + margin-top: 9px; + margin-left: 0; + margin-right: 0; + } } /* FRAMED_ITEM */ framed_item { - & > .framed_item { - padding: 15px; - } + & > .framed_item { + padding: 15px; + } } /** CONTACTS **/ #contacts-table { - & > tbody { - & > tr { - & > td { - &.contactgroup { - background-color: var(--secondary-bckg-color); - &:hover { - background-color: var(--tierciary-bckg-color); - } - } - - &.contact { - background-color: var(--secondary-bckg-color); - &:hover { - background-color: var(--tierciary-bckg-color); - } - } - } - - &.selected { - & > td { - &.contactgroup { - background-color: var(--tierciary-bckg-color); - } - - a.contact { - background-color: var(--tierciary-bckg-color); - } - } - } - } - } - - tr { - td { - cursor: pointer; - } - } - - &.listing { - li { - &.selected { - cursor: default; - - .popupmenu & { - cursor: default; - } - } - - &:hover { - background-color: var(--secondary-bckg-color); - - .popupmenu & { - background-color: var(--secondary-bckg-color); - } - } - } - - tr { - &.selected { - td { - cursor: default; - } - } - - &:hover { - td { - background-color: var(--secondary-bckg-color); - } - } - } - } + & > tbody { + & > tr { + & > td { + &.contactgroup { + background-color: var(--secondary-bckg-color); + &:hover { + background-color: var(--tierciary-bckg-color); + } + } + + &.contact { + background-color: var(--secondary-bckg-color); + &:hover { + background-color: var(--tierciary-bckg-color); + } + } + } + + &.selected { + & > td { + &.contactgroup { + background-color: var(--tierciary-bckg-color); + } + + a.contact { + background-color: var(--tierciary-bckg-color); + } + } + } + } + } + + tr { + td { + cursor: pointer; + } + } + + &.listing { + li { + &.selected { + cursor: default; + + .popupmenu & { + cursor: default; + } + } + + &:hover { + background-color: var(--secondary-bckg-color); + + .popupmenu & { + background-color: var(--secondary-bckg-color); + } + } + } + + tr { + &.selected { + td { + cursor: default; + } + } + + &:hover { + td { + background-color: var(--secondary-bckg-color); + } + } + } + } } #showcontacts { - &::before { - vertical-align: sub; - margin: 0 !important; - } + &::before { + vertical-align: sub; + margin: 0 !important; + } } #_button-back-adressbook { - position: absolute; - left: 5px; + position: absolute; + left: 5px; } #button-back-adressbook { - #_button-back-adressbook(); + #_button-back-adressbook(); - &:hover { - color: var(--main-text-color) !important; - } + &:hover { + color: var(--main-text-color) !important; + } } #button-back-adressbook2 { - #_button-back-adressbook(); + #_button-back-adressbook(); - &:hover { - color: var(--tierciary-text-color) !important; - .mel-invisible-background(); - } + &:hover { + color: var(--tierciary-text-color) !important; + .mel-invisible-background(); + } } .task-addressbook { - #layout-content { - html.layout-phone &, - html.layout-small & { - margin-left: var(--space-margin) !important; - } - } - - &.action-plugin-annuaire { - .searchbar { - form { - &:after { - content: none !important; - } - } - } - } - - & > #layout { - #layout-sidebar { - & > .header { - height: 120px; - } - } - - #layout-list { - & > .header { - height: 120px; - } - } - } - - &.action-show { - &.formcontainer { - #layout { - display: none; - } - } - } - - .searchbar { - border-radius: 60px; - border: none !important; - - &:after { - content: '\f002'; - height: 36px; - color: var(--main-text-color); - margin: 0 0.75rem 0 0; - - font-size: 1.25em; - display: block; - float: left; - width: 1.18em; - font-family: 'Icons'; - font-style: normal; - font-weight: 900; - text-decoration: inherit; - text-align: center; - speak: none; - font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - } - - form { - &::before { - content: none; - } - } - } - - .button { - &.reset { - display: block !important; - color: var(--main-text-color) !important; - - &:hover { - color: var(--secondary-text-color) !important; - } - } - - &.options { - color: var(--main-text-color) !important; - - &:hover { - color: var(--secondary-text-color) !important; - } - } - } - - ul.treelist { - &.iconized { - li { - div { - &.treetoggle { - &:hover { - // text-shadow: 1px 3px 0px var(--text-shadow); - } - } - } - } - } - } + #layout-content { + html.layout-phone &, + html.layout-small & { + margin-left: var(--space-margin) !important; + } + } + + &.action-plugin-annuaire { + .searchbar { + form { + &:after { + content: none !important; + } + } + } + } + + & > #layout { + #layout-sidebar { + & > .header { + height: 120px; + } + } + + #layout-list { + & > .header { + height: 120px; + } + } + } + + &.action-show { + &.formcontainer { + #layout { + display: none; + } + } + } + + .searchbar { + border-radius: 60px; + border: none !important; + + &:after { + content: '\f002'; + height: 36px; + color: var(--main-text-color); + margin: 0 0.75rem 0 0; + + font-size: 1.25em; + display: block; + float: left; + width: 1.18em; + font-family: 'Icons'; + font-style: normal; + font-weight: 900; + text-decoration: inherit; + text-align: center; + speak: none; + font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + } + + form { + &::before { + content: none; + } + } + } + + .button { + &.reset { + display: block !important; + color: var(--main-text-color) !important; + + &:hover { + color: var(--secondary-text-color) !important; + } + } + + &.options { + color: var(--main-text-color) !important; + + &:hover { + color: var(--secondary-text-color) !important; + } + } + } + + ul.treelist { + &.iconized { + li { + div { + &.treetoggle { + &:hover { + // text-shadow: 1px 3px 0px var(--text-shadow); + } + } + } + } + } + } } .searchgroup { - & > center { - &span { - font-size: larger; - } - } + & > center { + &span { + font-size: larger; + } + } } .filtergroup { - & > center { - &span { - font-size: larger; - } - } + & > center { + &span { + font-size: larger; + } + } - & > .row { - margin-top: -11px; + & > .row { + margin-top: -11px; - & > div { - & > select { - border-radius: 60px; - } - } - } + & > div { + & > select { + border-radius: 60px; + } + } + } } #annuaire-list { - li { - cursor: unset !important; + li { + cursor: unset !important; - .treetoggle { - cursor: pointer; - } - } + .treetoggle { + cursor: pointer; + } + } } ul#directorylist { - &.treelist { - li { - & > div { - & > a { - cursor: pointer; - } - } - - & > a { - cursor: pointer; - } - - &.selected { - & > div { - & > a { - cursor: default; - } - } - - & > a { - cursor: default; - } - } - - &:hover { - & > div { - & > a { - background-color: var(--tierciary-bckg-color); - } - } - - & > a { - background-color: var(--tierciary-bckg-color); - } - } - } - } + &.treelist { + li { + & > div { + & > a { + cursor: pointer; + } + } + + & > a { + cursor: pointer; + } + + &.selected { + & > div { + & > a { + cursor: default; + } + } + + & > a { + cursor: default; + } + } + + &:hover { + & > div { + & > a { + background-color: var(--tierciary-bckg-color); + } + } + + & > a { + background-color: var(--tierciary-bckg-color); + } + } + } + } } /** TACHES **/ #tasklist { - li { - &.taskitem { - div { - &.taskhead { - &.selected { - background-color: var(--secondary-bckg-color) !important; - } - - &.complete { - span.title { - color: var(--secondary-text-color) !important; - } - } - } - } - - & > div { - border-color: var(--tierciary-border-color) !important; - } - - & > span { - border-color: var(--tierciary-border-color) !important; - } - - ul& { - &:nth-child(2n) { - background-color: var(--alternate-tierciary-bckg-color); - } - } - } - } - - span { - &.date { - color: var(--secondary-text-color) !important; - font-style: italic; - font-size: smaller; - } - } + li { + &.taskitem { + div { + &.taskhead { + &.selected { + background-color: var(--secondary-bckg-color) !important; + } + + &.complete { + span.title { + color: var(--secondary-text-color) !important; + } + } + } + } + + & > div { + border-color: var(--tierciary-border-color) !important; + } + + & > span { + border-color: var(--tierciary-border-color) !important; + } + + ul& { + &:nth-child(2n) { + background-color: var(--alternate-tierciary-bckg-color); + } + } + } + } + + span { + &.date { + color: var(--secondary-text-color) !important; + font-style: italic; + font-size: smaller; + } + } } #taskmenu { - a { - &:hover { - & > sup { - & > span { - color: var(--tierciary-text-color); - } - } - } - - &.selected { - &:hover { - & > sup { - & > span { - color: var(--tierciary-text-color); - } - } - } - - & > sup { - & > span { - color: var(--tierciary-text-color); - } - } - } - } - - .action-buttons { - a { - &:hover { - & > sup { - & > span { - color: var(--tierciary-text-color); - } - } - } - } - } + a { + &:hover { + & > sup { + & > span { + color: var(--tierciary-text-color); + } + } + } + + &.selected { + &:hover { + & > sup { + & > span { + color: var(--tierciary-text-color); + } + } + } + + & > sup { + & > span { + color: var(--tierciary-text-color); + } + } + } + } + + .action-buttons { + a { + &:hover { + & > sup { + & > span { + color: var(--tierciary-text-color); + } + } + } + } + } } .taskhead { - body.task-tasks & { - cursor: pointer; + body.task-tasks & { + cursor: pointer; - &:hover { - cursor: pointer; - background-color: var(--main-bckg-color); - } - } + &:hover { + cursor: pointer; + background-color: var(--main-bckg-color); + } + } } /** PARAMETRES **/ #settingstabpluginmel_resources { - .noselect(); + .noselect(); - & > a { - ::before { - font-family: var(--secondary-icon-font); - content: '\eaa0'; - } - } + & > a { + ::before { + font-family: var(--secondary-icon-font); + content: '\eaa0'; + } + } - & > ._selected { - & > a { - ::before { - font-family: var(--secondary-icon-font); - content: '\ea99'; - } - } - } + & > ._selected { + & > a { + ::before { + font-family: var(--secondary-icon-font); + content: '\ea99'; + } + } + } } #settingstabpluginmel_statistics { - .noselect(); + .noselect(); - & > a { - ::before { - font-family: var(--secondary-icon-font); - content: '\eaa0'; - } - } + & > a { + ::before { + font-family: var(--secondary-icon-font); + content: '\eaa0'; + } + } - & > ._selected { - & > a { - ::before { - font-family: var(--secondary-icon-font); - content: '\ea99'; - } - } - } + & > ._selected { + & > a { + ::before { + font-family: var(--secondary-icon-font); + content: '\ea99'; + } + } + } } body { - &.task-settings { - &.action-plugin-mel_resources_bal { - #layout-content { - .header { - display: none !important; - - html@{layout-small} & { - display: initial !important; - - .toolbar-menu-button { - display: none !important; - } - } - } - } - - #layout-list { - html@{layout-small} & { - .floating-action-buttons { - .create { - &.button { - display: none !important; - } - } - } - } - } - } - - &.action-plugin-managesieve { - #layout-list { - .menu { - &.toolbar { - a { - color: var(--alternative-layout-list-text-color) !important; - } - } - } - } - } - - &.action-plugin-mel_statistics_mobile { - #layout-list { - .listing { - tbody { - td { - color: var(--secondary-text-color); - } - } - } - } - - .listing { - tbody { - td { - color: var(--main-text-color); - } - } - } - } - - .listing { - tbody { - td { - cursor: pointer; - - &:hover { - background-color: var(--secondary-bckg-color); - color: var(--secondary-text-color); - } - } - - .selected { - td { - cursor: default; - } - } - } - } - - .scroller { - & > .listing { - li { - a { - cursor: pointer; - } - - &.selected { - a { - cursor: default; - } - } - - &:hover { - background-color: var(--secondary-bckg-color); - } - } - } - } - } + &.task-settings { + &.action-plugin-mel_resources_bal { + #layout-content { + .header { + display: none !important; + + html@{layout-small} & { + display: initial !important; + + .toolbar-menu-button { + display: none !important; + } + } + } + } + + #layout-list { + html@{layout-small} & { + .floating-action-buttons { + .create { + &.button { + display: none !important; + } + } + } + } + } + } + + &.action-plugin-managesieve { + #layout-list { + .menu { + &.toolbar { + a { + color: var(--alternative-layout-list-text-color) !important; + } + } + } + } + } + + &.action-plugin-mel_statistics_mobile { + #layout-list { + .listing { + tbody { + td { + color: var(--secondary-text-color); + } + } + } + } + + .listing { + tbody { + td { + color: var(--main-text-color); + } + } + } + } + + .listing { + tbody { + td { + cursor: pointer; + + &:hover { + background-color: var(--secondary-bckg-color); + color: var(--secondary-text-color); + } + } + + .selected { + td { + cursor: default; + } + } + } + } + + .scroller { + & > .listing { + li { + a { + cursor: pointer; + } + + &.selected { + a { + cursor: default; + } + } + + &:hover { + background-color: var(--secondary-bckg-color); + } + } + } + } + } } // #settingstabresponses { @@ -2192,993 +2192,1007 @@ body { .row.separate, .btn.separate, .mel_separate { - margin-top: 5px; + margin-top: 5px; } /** ROUNDBADGE **/ .roundbadge { - display: inline-block; - height: 12px; - width: 12px; - line-height: 12px; - -moz-border-radius: 15px; - border-radius: 15px; - background-color: var(--roundbadge-default-bckg-color); - text-align: center; - font-weight: bold; - font-size: 6px; - - &.no-weight { - font-weight: normal; - } - - &.large { - height: 30px; - width: 30px; - line-height: 30px; - font-size: initial; - } - - &.clear { - background-color: var(--alternate-bckg-color); - border-color: var(--alternate-bckg-color); - } - - &.dark { - background-color: var(--main-bckg-color); - } - - &.setalign { - top: -1px; - left: -6px; - position: absolute; - } - - &.warning { - background-color: var(--warning-color); - } - - &.danger { - background-color: var(--danger-color); - } - - &.royal { - background-color: var(--royal-color); - } - - &.lightgreen { - background-color: var(--roundbadge-bckg-color); - } - - &.hover { - &.tick { - cursor: pointer; - - &:hover { - background-color: var(--roundbadge-bckg-color); - - &::before { - content: '\eed8' !important; - } - } - } - } - - &.menu { - top: -15px; - position: absolute; - height: 15px; - width: 15px; - line-height: 16px; - font-size: 8px; - color: var(--roundbadge-menu-bckg-color); - left: -12px; - - @{layout-phone} & { - top: 32px; - left: -20px; - } - - #otherapps & { - top: -5px; - left: 5px; - margin: 0; - } - } - - a& { - &.link { - color: var(--secondary-text-color); - text-decoration: none; - font-weight: normal; - - &:hover { - background-color: var(--tierciary-bckg-color); - } - } - } + display: inline-block; + height: 12px; + width: 12px; + line-height: 12px; + -moz-border-radius: 15px; + border-radius: 15px; + background-color: var(--roundbadge-default-bckg-color); + text-align: center; + font-weight: bold; + font-size: 6px; + + &.no-weight { + font-weight: normal; + } + + &.large { + height: 30px; + width: 30px; + line-height: 30px; + font-size: initial; + } + + &.clear { + background-color: var(--alternate-bckg-color); + border-color: var(--alternate-bckg-color); + } + + &.dark { + background-color: var(--main-bckg-color); + } + + &.setalign { + top: -1px; + left: -6px; + position: absolute; + } + + &.warning { + background-color: var(--warning-color); + } + + &.danger { + background-color: var(--danger-color); + } + + &.royal { + background-color: var(--royal-color); + } + + &.lightgreen { + background-color: var(--roundbadge-bckg-color); + } + + &.hover { + &.tick { + cursor: pointer; + + &:hover { + background-color: var(--roundbadge-bckg-color); + + &::before { + content: '\eed8' !important; + } + } + } + } + + &.menu { + top: -15px; + position: absolute; + height: 15px; + width: 15px; + line-height: 16px; + font-size: 8px; + color: var(--roundbadge-menu-bckg-color); + left: -12px; + + @{layout-phone} & { + top: 32px; + left: -20px; + } + + #otherapps & { + top: -5px; + left: 5px; + margin: 0; + } + } + + a& { + &.link { + color: var(--secondary-text-color); + text-decoration: none; + font-weight: normal; + + &:hover { + background-color: var(--tierciary-bckg-color); + } + } + } } .dwp-round { - width: 64px; - height: 64px; - background-color: var(--roundbadge-bckg-color); - display: block; - border-radius: 100%; - text-align: center; - color: inherit !important; - text-decoration: none !important; - -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 1), white); - - & > span { - line-height: 64px; - font-size: x-large; - } - - & > img { - height: 100%; - } + width: 64px; + height: 64px; + background-color: var(--roundbadge-bckg-color); + display: block; + border-radius: 100%; + text-align: center; + color: inherit !important; + text-decoration: none !important; + -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 1), white); + + & > span { + line-height: 64px; + font-size: x-large; + } + + & > img { + height: 100%; + } } /** LOGIN **/ .task-error-login { - & > #layout { - & > #layout-content { - margin-top: 60px; - } - } + & > #layout { + & > #layout-content { + margin-top: 60px; + } + } } .task-login { - #layout.overflowed { - overflow: auto; - } + #layout.overflowed { + overflow: auto; + } } /** BOUTTONS **/ html { - &@{layout-small} { - .floating-action-buttons { - top: 0px; - - & > a { - .mel-invisible-background-unimportant(); - box-shadow: none; - transition: all 0.1s ease-in; - - &:hover { - color: #2c3054 !important; - background-color: var(--tierciary-bckg-color) !important; - } - } - } - } + &@{layout-small} { + .floating-action-buttons { + top: 0px; + + & > a { + .mel-invisible-background-unimportant(); + box-shadow: none; + transition: all 0.1s ease-in; + + &:hover { + color: #2c3054 !important; + background-color: var(--tierciary-bckg-color) !important; + } + } + } + } } body { - &.task-mail { - .floating-action-buttons { - display: none; - } - } + &.task-mail { + .floating-action-buttons { + display: none; + } + } } .mel-return { - .mel-all-ease-in-animation(); - cursor: pointer; + .mel-all-ease-in-animation(); + cursor: pointer; - &:hover { - color: var(--danger-color); - } + &:hover { + color: var(--danger-color); + } } .btn-primary { - color: var(--tierciary-text-color); - background: var(--roundbadge-bckg-color); - border-color: var(--btn-primary-border-color); - - &:hover { - color: var(--tierciary-text-color); - background: var(--btn-primary-bckg-color-hover); - border-color: var(--btn-primary-border-color-hover); - } + color: var(--tierciary-text-color); + background: var(--roundbadge-bckg-color); + border-color: var(--btn-primary-border-color); + + &:hover { + color: var(--tierciary-text-color); + background: var(--btn-primary-bckg-color-hover); + border-color: var(--btn-primary-border-color-hover); + } } .mel-selected-content-button { - border-radius: 0; - min-width: 50px; + border-radius: 0; + min-width: 50px; } .mel-button { - .mel-all-ease-in-animation(); - color: var(--secondary-text-color); - background-color: var(--main-bckg-color); - border-color: var(--mel-button-border-color); - display: inline-block; - width: -moz-fit-content; - width: fit-content; - border-radius: 50px; - padding: 5px 10px; - margin-top: 15px; - cursor: pointer; - - &.mel-button-block { - display: block; - - html@{layout-phone} & { - display: inline-block; - } - - html@{layout-small} & { - display: inline-block; - } - } - - &.ignoreActive { - color: var(--secondary-text-color) !important; - background-color: var(--main-bckg-color) !important; - border-color: var(--mel-button-border-color) !important; - - &.inverse { - border-color: var(--mel-button-border-color-alt) !important; - background-color: var(--tierciary-bckg-color) !important; - - &:hover { - background-color: var(--main-bckg-color) !important; - border-color: var(--mel-button-border-color) !important; - } - } - - &:hover { - background-color: var(--tierciary-bckg-color) !important; - border-color: var(--mel-button-border-color-alt) !important; - } - } - - &.inverse { - border-color: var(--mel-button-border-color-alt); - background-color: var(--tierciary-bckg-color); - - &:hover { - background-color: var(--main-bckg-color); - border-color: var(--mel-button-border-color); - } - } - - &.white { - background-color: var(--default-background); - color: unset; - border-style: solid; - border-width: thin; - border-color: var(--mel-button-border-color); - - &:hover { - color: var(--secondary-text-color); - } - } - - button.btn-mel:hover + button&.under-button, - button.btn-mel.active + button&.under-button { - color: var(--secondary-text-color); - - &:hover { - color: var(--main-text-color); - background-color: var(--alternate-bckg-color); - } - } - - &.bckg { - .mel-invisible-background-unimportant(); - color: unset; - border-style: solid; - border-width: thin; - border-color: var(--mel-button-border-color); - - &.true { - border-color: var(--invisible); - } - - &.color-for-dark { - color: var(--secondary-text-color); - } - - &:hover { - color: var(--secondary-text-color); - } - } - - &.btn-danger { - background-color: var(--warning-color); - border-color: var(--warning-color); - } - - &.btn-success { - background-color: var(--success-color); - border-color: var(--success-color); - } - - &.mel-test-audio-button { - position: absolute; - top: 0; - right: 5px; - } - - &.without-text { - border-radius: 100%; - line-height: 0; - - &.px45 { - width: 35px; - height: 35px; - } - - span { - font-size: 20px; - margin-left: -3px; - } - } - - &:hover { - background-color: var(--tierciary-bckg-color); - border-color: var(--mel-button-border-color-alt); - - & > .mel-return { - color: var(--danger-color); - } - } - - &:focus { - .mel-bnum-indirect-actions(); - } - - &.button-white { - &:hover { - color: var(--secondary-text-color); - } - } - - &.disabled { - color: var(--secondary-text-color); - background-color: var(--disabled-mel-button-color) !important; - border-color: var(--disabled-mel-button-color) !important; - pointer-events: none; - } - - &.no-button-margin { - margin-top: 0; - } - - &.under-button { - &.selected { - &:extend(.mel-button.btn-success); - color: var(--secondary-text-color); - - &:hover { - &:extend(.mel-button:hover); - } - } - } - - &.selected-item { - background-color: var(--mel-button-active-background-color); - color: var(--mel-button-active-text-color); - pointer-events: none; - } - - .btn-group-vertical & { - border-radius: 5px; - width: 100%; - } + .btn-group & { + border-radius: 0; + + &:first-of-type { + border-top-left-radius: 50px; + border-bottom-left-radius: 50px; + } + + &:last-of-type { + border-top-right-radius: 50px; + border-bottom-right-radius: 50px; + } + } + + .mel-all-ease-in-animation(); + color: var(--secondary-text-color); + background-color: var(--main-bckg-color); + border-color: var(--mel-button-border-color); + display: inline-block; + width: -moz-fit-content; + width: fit-content; + border-radius: 50px; + padding: 5px 10px; + margin-top: 15px; + cursor: pointer; + + &.mel-button-block { + display: block; + + html@{layout-phone} & { + display: inline-block; + } + + html@{layout-small} & { + display: inline-block; + } + } + + &.ignoreActive { + color: var(--secondary-text-color) !important; + background-color: var(--main-bckg-color) !important; + border-color: var(--mel-button-border-color) !important; + + &.inverse { + border-color: var(--mel-button-border-color-alt) !important; + background-color: var(--tierciary-bckg-color) !important; + + &:hover { + background-color: var(--main-bckg-color) !important; + border-color: var(--mel-button-border-color) !important; + } + } + + &:hover { + background-color: var(--tierciary-bckg-color) !important; + border-color: var(--mel-button-border-color-alt) !important; + } + } + + &.inverse { + border-color: var(--mel-button-border-color-alt); + background-color: var(--tierciary-bckg-color); + + &:hover { + background-color: var(--main-bckg-color); + border-color: var(--mel-button-border-color); + } + } + + &.white { + background-color: var(--default-background); + color: unset; + border-style: solid; + border-width: thin; + border-color: var(--mel-button-border-color); + + &:hover { + color: var(--secondary-text-color); + } + } + + button.btn-mel:hover + button&.under-button, + button.btn-mel.active + button&.under-button { + color: var(--secondary-text-color); + + &:hover { + color: var(--main-text-color); + background-color: var(--alternate-bckg-color); + } + } + + &.bckg { + .mel-invisible-background-unimportant(); + color: unset; + border-style: solid; + border-width: thin; + border-color: var(--mel-button-border-color); + + &.true { + border-color: var(--invisible); + } + + &.color-for-dark { + color: var(--secondary-text-color); + } + + &:hover { + color: var(--secondary-text-color); + } + } + + &.btn-danger { + background-color: var(--warning-color); + border-color: var(--warning-color); + } + + &.btn-success { + background-color: var(--success-color); + border-color: var(--success-color); + } + + &.mel-test-audio-button { + position: absolute; + top: 0; + right: 5px; + } + + &.without-text { + border-radius: 100%; + line-height: 0; + + &.px45 { + width: 35px; + height: 35px; + } + + span { + font-size: 20px; + margin-left: -3px; + } + } + + &:hover { + background-color: var(--tierciary-bckg-color); + border-color: var(--mel-button-border-color-alt); + + & > .mel-return { + color: var(--danger-color); + } + } + + &:focus { + .mel-bnum-indirect-actions(); + } + + &.button-white { + &:hover { + color: var(--secondary-text-color); + } + } + + &.disabled { + color: var(--secondary-text-color); + background-color: var(--disabled-mel-button-color) !important; + border-color: var(--disabled-mel-button-color) !important; + pointer-events: none; + } + + &.no-button-margin { + margin-top: 0; + } + + &.under-button { + &.selected { + &:extend(.mel-button.btn-success); + color: var(--secondary-text-color); + + &:hover { + &:extend(.mel-button:hover); + } + } + } + + &.selected-item { + background-color: var(--mel-button-active-background-color); + color: var(--mel-button-active-text-color); + pointer-events: none; + } + + .btn-group-vertical & { + border-radius: 5px; + width: 100%; + } } .popover { - .btn-group-vertical { - width: 100%; - } + .btn-group-vertical { + width: 100%; + } } .mel-ui-button { - &.btn { - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - border-color: var(--mel-button-border-color); - - .large-toolbar & { - background-color: var(--invisible); - border-color: var(--invisible); - text-align: left; - margin-bottom: 5px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - border-radius: 5px !important; - } - - &:hover { - background-color: var(--tierciary-bckg-color); - border-color: var(--mel-button-border-color-alt); - border-radius: 5px; - } - - &:active { - .large-toolbar & { - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - border-color: var(--invisible); - border-radius: 5px; - } - } - - &:focus { - .large-toolbar & { - .mel-bnum-indirect-actions() !important; - } - } - - &.disabled { - background-color: var(--disabled-mel-button-color); /*#a3a7bc;*/ - border-color: var(--disabled-mel-button-color); /*#a3a7bc;*/ - - .large-toolbar & { - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - border-color: var(--invisible); - opacity: 1; - border-radius: 5px; - } - } - } + &.btn { + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + border-color: var(--mel-button-border-color); + + .large-toolbar & { + background-color: var(--invisible); + border-color: var(--invisible); + text-align: left; + margin-bottom: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + border-radius: 5px !important; + } + + &:hover { + background-color: var(--tierciary-bckg-color); + border-color: var(--mel-button-border-color-alt); + border-radius: 5px; + } + + &:active { + .large-toolbar & { + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + border-color: var(--invisible); + border-radius: 5px; + } + } + + &:focus { + .large-toolbar & { + .mel-bnum-indirect-actions() !important; + } + } + + &.disabled { + background-color: var(--disabled-mel-button-color); /*#a3a7bc;*/ + border-color: var(--disabled-mel-button-color); /*#a3a7bc;*/ + + .large-toolbar & { + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + border-color: var(--invisible); + opacity: 1; + border-radius: 5px; + } + } + } } .btn-arrow { - .mel-all-ease-in-animation(); - cursor: pointer; - - button& { - &.btn { - .mel-invisible-background(); - color: var(--main-text-color); - border-color: var(--invisible) !important; - - &:hover { - color: var(--tierciary-text-color); - } - } - } + .mel-all-ease-in-animation(); + cursor: pointer; + + button& { + &.btn { + .mel-invisible-background(); + color: var(--main-text-color); + border-color: var(--invisible) !important; + + &:hover { + color: var(--tierciary-text-color); + } + } + } - &:hover { - color: var(--tierciary-text-color); - } + &:hover { + color: var(--tierciary-text-color); + } } button { - &.btn { - &.no-style { - color: var(--main-text-color); - text-align: left; - .mel-invisible-background-unimportant(); - border-color: var(--invisible); - - &.full-width { - width: 100%; - } - - &:hover { - color: var(--tierciary-text-color); - } - - &:active { - color: var(--secondary-text-color) !important; - background-color: var(--tierciary-bckg-color) !important; - border-color: transparent !important; - } - } - } + &.btn { + &.no-style { + color: var(--main-text-color); + text-align: left; + .mel-invisible-background-unimportant(); + border-color: var(--invisible); + + &.full-width { + width: 100%; + } + + &:hover { + color: var(--tierciary-text-color); + } + + &:active { + color: var(--secondary-text-color) !important; + background-color: var(--tierciary-bckg-color) !important; + border-color: transparent !important; + } + } + } } .btn-text { - &.btn-mel-invisible { - background-color: var(--invisible) !important; - color: var(--main-text-color); - border-color: var(--invisible) !important; - border-radius: 15px !important; - - &:hover { - color: var(--tierciary-text-color); - } - } + &.btn-mel-invisible { + background-color: var(--invisible) !important; + color: var(--main-text-color); + border-color: var(--invisible) !important; + border-radius: 15px !important; + + &:hover { + color: var(--tierciary-text-color); + } + } } /** INPUT **/ .form-control { - &:focus { - border-color: var(--secondary-focus-border); - box-shadow: 0 0 0 0.2rem var(--secondary-focus); - } + &:focus { + border-color: var(--secondary-focus-border); + box-shadow: 0 0 0 0.2rem var(--secondary-focus); + } } .mel-hover { - &:hover { - .mel-bnum-indirect-actions(); - border-radius: 15px; + &:hover { + .mel-bnum-indirect-actions(); + border-radius: 15px; - &:focus { - border-radius: initial; - } - } + &:focus { + border-radius: initial; + } + } } .mel-focus { - &:focus { - .mel-bnum-indirect-actions(); - } - - &.focused { - .mel-bnum-indirect-actions(); - } - - .light-focus { - &:focus { - .mel-bnum-indirect-actions-light(); - } - } - - &.focus-bordered { - &:focus { - border: solid; - box-shadow: none; - border-width: thin; - border-color: var(--tierciary-focus); - } - } - - &.focus-text { - &:focus { - box-shadow: none; - text-shadow: 0 0 0.2rem var(--tierciary-focus); - } - } - - &.focus-background { - &:focus { - box-shadow: none; - background: var(--background-focus); - background-repeat: no-repeat; - } - } + &:focus { + .mel-bnum-indirect-actions(); + } + + &.focused { + .mel-bnum-indirect-actions(); + } + + .light-focus { + &:focus { + .mel-bnum-indirect-actions-light(); + } + } + + &.focus-bordered { + &:focus { + border: solid; + box-shadow: none; + border-width: thin; + border-color: var(--tierciary-focus); + } + } + + &.focus-text { + &:focus { + box-shadow: none; + text-shadow: 0 0 0.2rem var(--tierciary-focus); + } + } + + &.focus-background { + &:focus { + box-shadow: none; + background: var(--background-focus); + background-repeat: no-repeat; + } + } } .input-child-mel-focus { - input { - &:focus { - .mel-bnum-indirect-actions(); - } - } + input { + &:focus { + .mel-bnum-indirect-actions(); + } + } } .a-child-mel-focus { - a { - &:focus { - box-shadow: 0 0 0 0.2rem var(--other-focus); - } - } + a { + &:focus { + box-shadow: 0 0 0 0.2rem var(--other-focus); + } + } } a.filename { - &:focus { - .mel-bnum-indirect-actions-light(); - } + &:focus { + .mel-bnum-indirect-actions-light(); + } } /* FORM */ form { - &#mel_doubleauth-form { - overflow: auto; - } + &#mel_doubleauth-form { + overflow: auto; + } } /* INPUT TEXT */ ._red-star { - /** MIXIN **/ - content: '*'; - color: var(--red-star); + /** MIXIN **/ + content: '*'; + color: var(--red-star); } .red-star { - &::before { - ._red-star(); - } + &::before { + ._red-star(); + } - &.mel-before-remover { - color: var(--red-star); - } + &.mel-before-remover { + color: var(--red-star); + } } .red-star-after { - &::after { - ._red-star(); - } + &::after { + ._red-star(); + } } /** IMAGES **/ img { - &.menu-image { - width: 30px; - margin-left: -26px; - margin-right: 15px; - } + &.menu-image { + width: 30px; + margin-left: -26px; + margin-right: 15px; + } } /** ??? **/ html:not(.touch) .listing li > a:focus, html:not(.touch) .listing.focus tbody tr.focused > td:first-child, html:not(.touch) - .listing.focus:not(.withselection) - tbody - tr.focused - > td.selection - + td { - // border-left: 2px solid var(--invisible) !important; - border-radius: 0; + .listing.focus:not(.withselection) + tbody + tr.focused + > td.selection + + td { + // border-left: 2px solid var(--invisible) !important; + border-radius: 0; } .menu a:not(.disabled):focus { - border-left: 2px solid var(--button-background-color) !important; + border-left: 2px solid var(--button-background-color) !important; } html:not(.touch) .listing.focus tbody tr.focused.unread > td:first-child, html:not(.touch) - .listing.focus:not(.withselection) - tbody - tr.focused.unread - > td.selection - + td { - border-left: 2px solid var(--message-list-unread-border-left) !important; - border-radius: 0; + .listing.focus:not(.withselection) + tbody + tr.focused.unread + > td.selection + + td { + border-left: 2px solid var(--message-list-unread-border-left) !important; + border-radius: 0; } td.mel-fit-content { - max-width: min-content; - max-width: -moz-min-content; + max-width: min-content; + max-width: -moz-min-content; } a.button.icon.attach::before, button.btn.attach::before { - content: '\e91c'; - font-family: var(--main-icon-font); - font-weight: normal; - font-size: unset; + content: '\e91c'; + font-family: var(--main-icon-font); + font-weight: normal; + font-size: unset; } #mainscreen.box.mel_help-box { - display: block !important; + display: block !important; } tr.elementmoveup > td { - border-top-style: dotted; - border-top-color: black; + border-top-style: dotted; + border-top-color: black; } .upload-form { - .hint { - color: var(--secondary-text-color); - } + .hint { + color: var(--secondary-text-color); + } } #sections-table { - tr { - td { - width: 100%; - } - } + tr { + td { + width: 100%; + } + } } .mel-r { - .name { - margin-right: 5px; - } + .name { + margin-right: 5px; + } } .subject .mel-search-location { - font-size: smaller; + font-size: smaller; } /** CARDS **/ .card-header-disabled { - display: none; + display: none; } /** RECHERCHE **/ ._mel-search { - border-right: none; - border-color: var(--secondary-border-color); - border-bottom-left-radius: 15px; - border-top-left-radius: 15px; + border-right: none; + border-color: var(--secondary-border-color); + border-bottom-left-radius: 15px; + border-top-left-radius: 15px; } .mel-search { - ._mel-search(); - border-bottom-right-radius: 15px; - border-top-right-radius: 15px; + ._mel-search(); + border-bottom-right-radius: 15px; + border-top-right-radius: 15px; } .mel-search-group { - & > input { - ._mel-search(); - } + & > input { + ._mel-search(); + } - & .input-group-append { - & > .input-group-text { - background-color: var(--default-background); - border-bottom-right-radius: 15px; - border-top-right-radius: 15px; - border-color: var(--secondary-border-color); - } - } + & .input-group-append { + & > .input-group-text { + background-color: var(--default-background); + border-bottom-right-radius: 15px; + border-top-right-radius: 15px; + border-color: var(--secondary-border-color); + } + } } .searchbar { - html@{layout-phone} & { - a { - &::before { - height: auto !important; - } - } - } - - html@{layout-small} & { - a { - &::before { - height: auto !important; - } - } - } - - body.task-tasks & { - form { - &::before { - content: none; - } - - &::after { - content: '\e92d'; - font-family: var(--main-icon-font) !important; - } - } - } + html@{layout-phone} & { + a { + &::before { + height: auto !important; + } + } + } + + html@{layout-small} & { + a { + &::before { + height: auto !important; + } + } + } + + body.task-tasks & { + form { + &::before { + content: none; + } + + &::after { + content: '\e92d'; + font-family: var(--main-icon-font) !important; + } + } + } } #quicksearchbar { - .button.options.annuaire-filter-selected { - background-color: var(--quicksearchbar-annuaire-filter-bckg-color); - } + .button.options.annuaire-filter-selected { + background-color: var(--quicksearchbar-annuaire-filter-bckg-color); + } } .mel-search-margin { - margin: 0 15px; - width: auto; + margin: 0 15px; + width: auto; } /** ONGLETS **/ ._mel-tab { - cursor: pointer; - padding: 1rem 1.4rem; - display: inline-block; - margin: 0 15px; - border-bottom: 2px solid var(--invisible); + cursor: pointer; + padding: 1rem 1.4rem; + display: inline-block; + margin: 0 15px; + border-bottom: 2px solid var(--invisible); } ._mel-tabheader { - font-size: larger; - white-space: nowrap; - border-color: transparent !important; + font-size: larger; + white-space: nowrap; + border-color: transparent !important; - border-radius: 0px !important; + border-radius: 0px !important; } ._mel-tab-state { - color: var(--mel-tab-text-color) !important; - border-bottom: 2px solid var(--mel-tab-text-color) !important; + color: var(--mel-tab-text-color) !important; + border-bottom: 2px solid var(--mel-tab-text-color) !important; } .mel-tabheader { - ._mel-tabheader(); + ._mel-tabheader(); } .mel-responsive-tabheader { - ._mel-tabheader(); + ._mel-tabheader(); - &.last { - border: none !important; - } + &.last { + border: none !important; + } } .mel-tab { - ._mel-tab(); - - &:hover { - background-color: #eaeaea !important; - border-bottom-color: var(--invisible) !important; - } + ._mel-tab(); - &.active { - ._mel-tab-state(); - cursor: initial; - } + &:hover { + background-color: #eaeaea !important; + border-bottom-color: var(--invisible) !important; + } - button.btn& { - .mel-invisible-background(); - color: var(--main-text-color) !important; + &.active { + ._mel-tab-state(); + cursor: initial; + } - &:hover { - background-color: #eaeaea !important; - border-bottom-color: var(--invisible) !important; - } - &:active, - &.active { - ._mel-tab-state(); - } - } + button.btn& { + .mel-invisible-background(); + color: var(--main-text-color) !important; + + &:hover { + background-color: #eaeaea !important; + border-bottom-color: var(--invisible) !important; + } + &:active, + &.active { + ._mel-tab-state(); + } + } } .mel-responsive-tab { - ._mel-tab(); - margin: 0; - padding: 0; - .mel-invisible-background(); - color: var(--main-text-color) !important; - - &:hover { - ._mel-tab-state(); - } + ._mel-tab(); + margin: 0; + padding: 0; + .mel-invisible-background(); + color: var(--main-text-color) !important; + + &:hover { + ._mel-tab-state(); + } - &.active, - &.selected { - ._mel-tab-state(); - cursor: initial; - } + &.active, + &.selected { + ._mel-tab-state(); + cursor: initial; + } - button.btn& { - .mel-invisible-background(); - color: var(--main-text-color) !important; - } + button.btn& { + .mel-invisible-background(); + color: var(--main-text-color) !important; + } } .responsiveTabList { - margin-bottom: 15px; - flex-wrap: nowrap; - justify-content: space-around; + margin-bottom: 15px; + flex-wrap: nowrap; + justify-content: space-around; - button { - white-space: break-spaces; - } + button { + white-space: break-spaces; + } - .row& { - &.namespace-reponsive-tab-shortcut { - margin-left: 15px; - margin-right: 15px; - background-color: var(--alternate-bckg-color); - padding: 15px 0; - border-radius: 5px; - } - } + .row& { + &.namespace-reponsive-tab-shortcut { + margin-left: 15px; + margin-right: 15px; + background-color: var(--alternate-bckg-color); + padding: 15px 0; + border-radius: 5px; + } + } } /** SQUARE DIV **/ .square_div { - & > .contents { - background-color: var(--alternate-bckg-color); - height: 230px; - border-radius: 5px; - - &.DARK { - background-color: var(--tierciary-bckg-color); - color: var(--secondary-text-color); /*#E6E7ED;*/ - } - } + & > .contents { + background-color: var(--alternate-bckg-color); + height: 230px; + border-radius: 5px; + + &.DARK { + background-color: var(--tierciary-bckg-color); + color: var(--secondary-text-color); /*#E6E7ED;*/ + } + } } .square-contents { - padding: 30px; + padding: 30px; } /** VISIOCONFERENCE **/ .webconf-myday { - text-align: center; + text-align: center; } .span-webconf { - span& { - display: block; - font-size: 10px; - } + span& { + display: block; + font-size: 10px; + } } /** CONTENTS REMOVER **/ .mel-before-remover { - &::before { - content: none !important; - } + &::before { + content: none !important; + } } .mel-child-form-before-remover { - & > form { - &:before { - content: none !important; - } - } + & > form { + &:before { + content: none !important; + } + } } .mel-after-remover { - &::after { - content: none !important; - } + &::after { + content: none !important; + } } /** LINKS **/ .mel-not-link { - color: var(--main-text-color); + color: var(--main-text-color); - &.color-white { - color: var(--secondary-text-color); + &.color-white { + color: var(--secondary-text-color); - &:hover { - text-decoration: underline; - } - } + &:hover { + text-decoration: underline; + } + } - &:hover { - text-decoration: none; - } + &:hover { + text-decoration: none; + } } .link-ellipse { - white-space: nowrap; - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; } /** SCREEN READER **/ .sr-only-focusable { - &.mel-rapid-link { - &:focus { - position: absolute; - top: 0; - z-index: 9999999; - background-color: var(--sr-background); - padding: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - } - } + &.mel-rapid-link { + &:focus { + position: absolute; + top: 0; + z-index: 9999999; + background-color: var(--sr-background); + padding: 5px; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } + } } /** DIALOG **/ .ui-dialog { - border-radius: 1em; + border-radius: 1em; - iframe { - &.ui-dialog-content { - padding: 0; - } - } + iframe { + &.ui-dialog-content { + padding: 0; + } + } - .ui-dialog-titlebar { - border-radius: 1em; - border-bottom: none; - } + .ui-dialog-titlebar { + border-radius: 1em; + border-bottom: none; + } } /** RCMAIL **/ @@ -3186,144 +3200,144 @@ tr.elementmoveup > td { /* NOTIFS */ #messagestack { - z-index: 9999; - - .notice { - &.private { - background-color: var(--private-color); - - .icon { - &::before { - font-family: var(--main-icon-font) !important; - content: '\e966' !important; - font-weight: normal !important; - } - } - } - - &.notif { - background-color: var(--royal-color); - - &::before { - font-family: var(--main-icon-font) !important; - content: '\e964' !important; - font-weight: normal !important; - } - } - } + z-index: 9999; + + .notice { + &.private { + background-color: var(--private-color); + + .icon { + &::before { + font-family: var(--main-icon-font) !important; + content: '\e966' !important; + font-weight: normal !important; + } + } + } + + &.notif { + background-color: var(--royal-color); + + &::before { + font-family: var(--main-icon-font) !important; + content: '\e964' !important; + font-weight: normal !important; + } + } + } } /** CONTEXTMENU **/ .contextmenu { - .moved-item-mt { - display: none !important; - } + .moved-item-mt { + display: none !important; + } } /** ICONS **/ .icon-mel::before { - font-family: var(--main-icon-font) !important; - font-weight: normal; + font-family: var(--main-icon-font) !important; + font-weight: normal; } .icon-mel-send::before { - content: '\e954' !important; + content: '\e954' !important; } .icon-mel-videoconference::before { - content: '\e938' !important; + content: '\e938' !important; } .icon-mel-plus::before { - content: '\e929' !important; + content: '\e929' !important; } .icon-mel-close::before { - content: '\e908' !important; - font-family: var(--main-icon-font) !important; + content: '\e908' !important; + font-family: var(--main-icon-font) !important; } a.roadmap::before { - content: '\efd8' !important; - font-family: var(--secondary-icon-font) !important; - font-weight: normal !important; + content: '\efd8' !important; + font-family: var(--secondary-icon-font) !important; + font-weight: normal !important; } #mel_envoi_differe::before { - font-family: var(--secondary-icon-font) !important; - font-weight: normal !important; - content: '\eedc' !important; + font-family: var(--secondary-icon-font) !important; + font-weight: normal !important; + content: '\eedc' !important; } .menu a.folders::before { - content: '\e951' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e951' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } .menu a.source::before { - content: '\eef0' !important; - font-family: var(--secondary-icon-font) !important; - font-weight: normal !important; + content: '\eef0' !important; + font-family: var(--secondary-icon-font) !important; + font-weight: normal !important; } .menu a.move::before { - content: '\e2c8' !important; - ._material-icon() !important; + content: '\e2c8' !important; + ._material-icon() !important; } .menu a.extwin::before { - content: '\e910' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e910' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } .menu a.calendarlink::before { - content: '\e901' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e901' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } .menu a.tasklistlink::before, .menu a.taskaddlink::before { - content: '\e931' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e931' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } html .menu a.selection::before { - ._material-icon() !important; - content: '\e834' !important; + ._material-icon() !important; + content: '\e834' !important; } .menu a.select.page::before { - content: '\e5d2' !important; - ._material-icon() !important; + content: '\e5d2' !important; + ._material-icon() !important; } .menu a.unread::before, .menu a.expand.unread::before, .menu a.select.unread::before { - ._material-icon() !important; - content: '\e158' !important; + ._material-icon() !important; + content: '\e158' !important; } .menu a.flag::before, .menu a.select.flagged::before { - ._material-icon() !important; - content: '\e153' !important; + ._material-icon() !important; + content: '\e153' !important; } /***/ .menu a.select.invert::before { - ._material-icon() !important; - content: '\e834' !important; - font-variation-settings: - 'wght' 300, - 'opsz' 48, - 'FILL' 1 !important; + ._material-icon() !important; + content: '\e834' !important; + font-variation-settings: + 'wght' 300, + 'opsz' 48, + 'FILL' 1 !important; } // .menu a.select.invert:hover:before { @@ -3332,1762 +3346,1761 @@ html .menu a.selection::before { // } .menu a.select.none::before { - content: '\e5c9' !important; - ._material-icon() !important; + content: '\e5c9' !important; + ._material-icon() !important; } .menu a.logout::before { - content: '\e967' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e967' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } .icon-mel-videoconference::before { - font-family: var(--main-icon-font) !important; - content: '\e938' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e938' !important; + font-weight: normal !important; } .icon-mel-mail::before { - font-family: var(--main-icon-font) !important; - content: '\e91e' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e91e' !important; + font-weight: normal !important; } .icon-mel-workplace::before { - font-family: var(--main-icon-font) !important; - content: '\e93a' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e93a' !important; + font-weight: normal !important; } .icon-mel-calendar::before { - font-family: var(--main-icon-font) !important; - content: '\e901' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e901' !important; + font-weight: normal !important; } .icon-mel-survey::before { - font-family: var(--main-icon-font) !important; - content: '\e931' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e931' !important; + font-weight: normal !important; } .icon-mel-folder::before { - font-family: var(--main-icon-font) !important; - content: '\e915' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e915' !important; + font-weight: normal !important; } .icon-mel-sondage::before { - font-family: var(--main-icon-font) !important; - content: '\e930' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e930' !important; + font-weight: normal !important; } .icon-mel-notes::before { - font-family: var(--main-icon-font) !important; - content: '\e923' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e923' !important; + font-weight: normal !important; } .icon-mel-parameters-invert::before { - font-family: var(--main-icon-font) !important; - content: '\e925' !important; - font-weight: normal !important; + font-family: var(--main-icon-font) !important; + content: '\e925' !important; + font-weight: normal !important; } .listing.iconized li a.news::before { - font-family: var(--main-icon-font) !important; - content: '\e91a'; + font-family: var(--main-icon-font) !important; + content: '\e91a'; } .mel-button.iconized-mel-button:after { - margin-left: 15px; - font-family: var(--main-icon-font); + margin-left: 15px; + font-family: var(--main-icon-font); } .mel-button.iconized-mel-button.edit:after { - content: '\e95c'; + content: '\e95c'; } .mel-button.iconized-mel-button.create:after { - content: '\e929'; + content: '\e929'; } .button.down-icon::before { - content: '\e907'; - font-family: var(--main-icon-font) !important; + content: '\e907'; + font-family: var(--main-icon-font) !important; } .button.up-icon::before { - content: '\e906'; - font-family: var(--main-icon-font) !important; + content: '\e906'; + font-family: var(--main-icon-font) !important; } .button.search-icon::before { - content: '\e92d'; - font-family: var(--main-icon-font) !important; + content: '\e92d'; + font-family: var(--main-icon-font) !important; } .menu a.phone::before { - content: '\e927' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e927' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } .menu a.background::before { - content: '\e968' !important; - font-family: var(--main-icon-font) !important; - font-weight: normal !important; + content: '\e968' !important; + font-family: var(--main-icon-font) !important; + font-weight: normal !important; } /** LINES **/ ._multiple-lines(@l: 3) { - display: -webkit-box; - -webkit-box-orient: vertical; - white-space: normal; - -webkit-line-clamp: @l; + display: -webkit-box; + -webkit-box-orient: vertical; + white-space: normal; + -webkit-line-clamp: @l; } .one-line { - ._multiple-lines(1); + ._multiple-lines(1); } .two-lines { - ._multiple-lines(2); + ._multiple-lines(2); } .three-lines { - ._multiple-lines(); + ._multiple-lines(); } /** MSWP **/ ._mwsp() { - border-style: solid; - border-width: thick; - border-color: var(--default-workspace-side-color); + border-style: solid; + border-width: thick; + border-color: var(--default-workspace-side-color); } .mwsp { - html& { - ._mwsp(); - - .task-workspace { - &.action-workspace { - margin-bottom: 75px; - .mel-all-ease-in-animation(); - } - } - - &.moved { - .task-workspace { - &.action-workspace { - margin-bottom: 15px; - } - } - } - } - - #layout-content& { - ._mwsp(); - - .task-workspace.action-workspace & { - margin-bottom: 75px; - .mel-all-ease-in-animation(); - - &.moved { - margin-bottom: 15px; - } - } - } - - &.moved { - padding-bottom: 15px; - - iframe.discussion-frame& { - padding-bottom: 0; - margin-bottom: 15px; - } - } - - iframe.discussion-frame& { - ._mwsp() !important; - background-color: var(--default-workspace-side-color); - } - - iframe& { - padding-bottom: 75px; - .mel-all-ease-in-animation(); - - &.discussion-frame { - padding-bottom: 75px; - margin-bottom: 0; - } - } - - .conditionNoSatisfy { - display: none !important; - } + html& { + ._mwsp(); + + .task-workspace { + &.action-workspace { + margin-bottom: 75px; + .mel-all-ease-in-animation(); + } + } + + &.moved { + .task-workspace { + &.action-workspace { + margin-bottom: 15px; + } + } + } + } + + #layout-content& { + ._mwsp(); + + .task-workspace.action-workspace & { + margin-bottom: 75px; + .mel-all-ease-in-animation(); + + &.moved { + margin-bottom: 15px; + } + } + } + + &.moved { + padding-bottom: 15px; + + iframe.discussion-frame& { + padding-bottom: 0; + margin-bottom: 15px; + } + } + + iframe.discussion-frame& { + ._mwsp() !important; + background-color: var(--default-workspace-side-color); + } + + iframe& { + padding-bottom: 75px; + .mel-all-ease-in-animation(); + + &.discussion-frame { + padding-bottom: 75px; + margin-bottom: 0; + } + } + + .conditionNoSatisfy { + display: none !important; + } } /* AMSWP */ .amwsp { - background-color: var(--invisible); + background-color: var(--invisible); - iframe { - padding-bottom: 80px; - } + iframe { + padding-bottom: 80px; + } } /** THEME **/ .theme-mode-switch { - margin-top: 3px; - - span { - font-size: 0.8rem; - } - - &.btn { - &.btn-primary { - &.btn-block { - border-radius: 60px; - height: 21px; - width: 43px; - // border-color: var(--alternate-primary-border-color); - border: none; - background-color: #e8e8e8; - position: relative; - margin-top: 0; - - &::before { - content: '\ee66'; - font-family: var(--secondary-icon-font); - margin: 0 !important; - position: absolute; - top: 0px; - left: 25px; - color: var(--alternate-primary-border-color) !important; - .mel-all-ease-in-animation(); - font-size: 14px; - } - - &:after { - content: ''; - // border: solid var(--alternate-primary-border-color) thin; - border: none; - background-color: var(--default-background); - width: 17px; - height: 17px; - display: block; - border-radius: 100%; - position: absolute; - top: 2px; - right: 23px; - .mel-all-ease-in-animation(); - } - } - } - } + margin-top: 3px; + + span { + font-size: 0.8rem; + } + + &.btn { + &.btn-primary { + &.btn-block { + border-radius: 60px; + height: 21px; + width: 43px; + // border-color: var(--alternate-primary-border-color); + border: none; + background-color: #e8e8e8; + position: relative; + margin-top: 0; + + &::before { + content: '\ee66'; + font-family: var(--secondary-icon-font); + margin: 0 !important; + position: absolute; + top: 0px; + left: 25px; + color: var(--alternate-primary-border-color) !important; + .mel-all-ease-in-animation(); + font-size: 14px; + } + + &:after { + content: ''; + // border: solid var(--alternate-primary-border-color) thin; + border: none; + background-color: var(--default-background); + width: 17px; + height: 17px; + display: block; + border-radius: 100%; + position: absolute; + top: 2px; + right: 23px; + .mel-all-ease-in-animation(); + } + } + } + } } /** NAVIGATION SECONDAIRE **/ .barup { - .user-child { - .mel-icofont-theme { - &::before { - font-family: var(--secondary-icon-font); - content: '\ee7e'; - } - } - } + .user-child { + .mel-icofont-theme { + &::before { + font-family: var(--secondary-icon-font); + content: '\ee7e'; + } + } + } } #createthings { - margin-right: 5px; + margin-right: 5px; } /* RACCOURCIS */ .shortcut-notes { - .square-contents { - padding: 0; - } + .square-contents { + padding: 0; + } - .contents { - background-color: var(--invisible) !important; - } + .contents { + background-color: var(--invisible) !important; + } } /* USER */ #mail-user-gp { - color: var(--main-text-color); + color: var(--main-text-color); - &:hover { - color: var(--main-text-color) !important; - background-color: var(--invisible) !important; - } + &:hover { + color: var(--main-text-color) !important; + background-color: var(--invisible) !important; + } } #barup-user { - height: 100%; + height: 100%; } /** MAINTENANCE **/ .maintenance-text { - text-align: center; - color: red; + text-align: center; + color: red; } /** TABLEAUX **/ table { - &.table-striped { - thead { - &.mel_striped { - td { - background-color: var(--default-background); - } - } - } - } + &.table-striped { + thead { + &.mel_striped { + td { + background-color: var(--default-background); + } + } + } + } } .table { - tbody { - th { - font-weight: 400; - } - } + tbody { + th { + font-weight: 400; + } + } } /** NOTES **/ .mel-note { - border-radius: 5px; - margin-bottom: 15px; - max-width: 315px; - margin: 10px; - // display: inline-block; - float: left; - position: relative; - - .note-header { - input { - border: none; - } - } - - .note-body { - padding: 5px; - - textarea { - border: none; - } - } - - &.eye-focus { - max-width: 100%; - width: 100%; - height: 100%; - } + border-radius: 5px; + margin-bottom: 15px; + max-width: 315px; + margin: 10px; + // display: inline-block; + float: left; + position: relative; + + .note-header { + input { + border: none; + } + } + + .note-body { + padding: 5px; + + textarea { + border: none; + } + } + + &.eye-focus { + max-width: 100%; + width: 100%; + height: 100%; + } } /******************ADDED******************/ .folderlist li.mailbox .unreadcount { - background: var(--roundbadge-bckg-color); - font-weight: normal; - color: #000; + background: var(--roundbadge-bckg-color); + font-weight: normal; + color: #000; } ul.folderlist.treelist li ul li a { - font-weight: 200; + font-weight: 200; } .messagelist td.subject .adr { - font-weight: lighter; + font-weight: lighter; } table.messagelist .unread td.subject span.msgicon::before { - content: '\e94d' !important; - color: var(--tierciary-text-color) !important; + content: '\e94d' !important; + color: var(--tierciary-text-color) !important; } .roundbadge.lightgreen, .roundbadge.hover.tick:hover { - background-color: var(--roundbadge-bckg-color); + background-color: var(--roundbadge-bckg-color); } .task-mail .quota-widget .bar { - background-color: var(--quota-bar-bckg-color); - border-color: var(--quota-bar-border-color); - margin-left: 0; + background-color: var(--quota-bar-bckg-color); + border-color: var(--quota-bar-border-color); + margin-left: 0; } a.rcmContactAddress { - color: var(--dropdown-menu-text-color); /*#96b9e7 */ - font-weight: lighter; + color: var(--dropdown-menu-text-color); /*#96b9e7 */ + font-weight: lighter; } /**********************end added**************************/ /** BLOCKS **/ .mel-block-list { - white-space: nowrap; - background-color: var(--alternate-bckg-color); - width: 100%; - padding: 15px; - margin-bottom: 15px; - border-radius: 5px; + white-space: nowrap; + background-color: var(--alternate-bckg-color); + width: 100%; + padding: 15px; + margin-bottom: 15px; + border-radius: 5px; - .icon { - margin-right: 5px; + .icon { + margin-right: 5px; - &.no-icon { - margin-right: 0; - display: none; - } - } + &.no-icon { + margin-right: 0; + display: none; + } + } - .col-item { - overflow: hidden; - text-overflow: ellipsis; - } + .col-item { + overflow: hidden; + text-overflow: ellipsis; + } } /** BOOTSTRAP **/ ._mixin-col-2() { - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - max-width: 33.333333%; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; } @{touch} { - .col-2 { - &.col-item { - ._mixin-col-2(); - } - } + .col-2 { + &.col-item { + ._mixin-col-2(); + } + } - .col-6 { - &.col-item { - ._mixin-col-2(); - } - } + .col-6 { + &.col-item { + ._mixin-col-2(); + } + } } .alert { - &.ui { - &.boxalert { - &.boxdanger { - background-color: var(--danger-color-2); - } - } - } + &.ui { + &.boxalert { + &.boxdanger { + background-color: var(--danger-color-2); + } + } + } } /** HISTORIQUE **/ #frame-mel-history { - position: absolute; - top: 0; - left: 0; - width: 120px; - height: 100%; - z-index: 999999; - background-color: var(--secondary-bckg-color); - overflow: auto; + position: absolute; + top: 0; + left: 0; + width: 120px; + height: 100%; + z-index: 999999; + background-color: var(--secondary-bckg-color); + overflow: auto; } #black-frame-mel-history { - position: absolute; - top: 0; - left: 120px; - width: 100%; - height: 100%; - background-color: var(--overlay-background); - z-index: 9999999; + position: absolute; + top: 0; + left: 120px; + width: 100%; + height: 100%; + background-color: var(--overlay-background); + z-index: 9999999; } .waiting-events-number { - text-align: center; - padding: 5px 0; - background-color: var(--alternate-bckg-color-2); - position: relative; + text-align: center; + padding: 5px 0; + background-color: var(--alternate-bckg-color-2); + position: relative; } #waiting-events-list { - position: absolute; - padding: 15px; - bottom: 30px; - - &-items { - background-color: var(--alternate-bckg-color); - border-radius: 5px; - padding: 15px; - max-height: 400px; - overflow: auto; - - .waiting-event-button { - border-radius: 5px; - margin-top: 5px; - width: 100%; - - span { - .element-block(); - } - } - } + position: absolute; + padding: 15px; + bottom: 30px; + + &-items { + background-color: var(--alternate-bckg-color); + border-radius: 5px; + padding: 15px; + max-height: 400px; + overflow: auto; + + .waiting-event-button { + border-radius: 5px; + margin-top: 5px; + width: 100%; + + span { + .element-block(); + } + } + } } /** END **/ ._material-icon() { - font-family: 'Material Symbols Outlined'; - font-weight: normal; - font-variation-settings: - 'wght' 300, - 'opsz' 48; - font-size: 17px; - transform: scale(1.5); + font-family: 'Material Symbols Outlined'; + font-weight: normal; + font-variation-settings: + 'wght' 300, + 'opsz' 48; + font-size: 17px; + transform: scale(1.5); } .show-on-small { - display: none; + display: none; - html@{layout-phone} &, - html@{layout-small} & { - display: initial; - } + html@{layout-phone} &, + html@{layout-small} & { + display: initial; + } } .hide-on-small { - html@{layout-phone} &, - html@{layout-small} & { - display: none; - } + html@{layout-phone} &, + html@{layout-small} & { + display: none; + } } .menu a.ct-cm { - &::before { - ._material-icon() !important; - content: '\e0bf' !important; - } + &::before { + ._material-icon() !important; + content: '\e0bf' !important; + } } .falselink { - cursor: pointer; + cursor: pointer; - &:hover { - } + &:hover { + } } .multilink-sub { - display: flex; - background-color: var(--ghost-div-background); - transition: @mel-default-animation; - cursor: pointer; - - &-copy { - text-decoration: none !important; - transition: @mel-default-animation; - display: block; - align-self: center; - padding-left: 5px; - padding-right: 5px; - color: var(--white); - } - - &:hover { - background-color: var(--ghost-div-background-inverse); - - .multilink-sub-copy { - color: var(--main-text-color) !important; - } - } + display: flex; + background-color: var(--ghost-div-background); + transition: @mel-default-animation; + cursor: pointer; + + &-copy { + text-decoration: none !important; + transition: @mel-default-animation; + display: block; + align-self: center; + padding-left: 5px; + padding-right: 5px; + color: var(--white); + } + + &:hover { + background-color: var(--ghost-div-background-inverse); + + .multilink-sub-copy { + color: var(--main-text-color) !important; + } + } } button { - &.btn { - &.import:before { - content: '\f090' !important; - font-family: 'Material Symbols Outlined' !important; - font-variation-settings: - 'wght' 400, - 'opsz' 48; - font-size: 17px; - transform: scale(1.5) !important; - } - &.export:before { - content: '\f09b' !important; - font-family: 'Material Symbols Outlined' !important; - font-variation-settings: - 'wght' 400, - 'opsz' 48; - font-size: 17px; - transform: scale(1.5) !important; - } - } + &.btn { + &.import:before { + content: '\f090' !important; + font-family: 'Material Symbols Outlined' !important; + font-variation-settings: + 'wght' 400, + 'opsz' 48; + font-size: 17px; + transform: scale(1.5) !important; + } + &.export:before { + content: '\f09b' !important; + font-family: 'Material Symbols Outlined' !important; + font-variation-settings: + 'wght' 400, + 'opsz' 48; + font-size: 17px; + transform: scale(1.5) !important; + } + } } .display { - &-inline-block { - display: inline-block; + &-inline-block { + display: inline-block; - &.important { - display: inline-block !important; - } - } + &.important { + display: inline-block !important; + } + } } .tabs { - &.mel-ui-tab-system { - display: flex; + &.mel-ui-tab-system { + display: flex; - button { - flex: 1 0 auto; - } - } + button { + flex: 1 0 auto; + } + } } .modal-dialog { - html@{layout-phone} &, - html@{layout-small} & { - padding: 0 !important; - } + html@{layout-phone} &, + html@{layout-small} & { + padding: 0 !important; + } } .shortcut-notes { - .crossed-eye, - .eye { - html@{layout-phone} &, - html@{layout-small} & { - display: none; - } - } + .crossed-eye, + .eye { + html@{layout-phone} &, + html@{layout-small} & { + display: none; + } + } } .webconf-minimize { - html@{layout-phone} &, - html@{layout-small} & { - display: none; - } + html@{layout-phone} &, + html@{layout-small} & { + display: none; + } } .wsp-toolbar { - &.webconf-toolbar { - html@{layout-phone} &, - html@{layout-small} & { - display: flex !important; - } - } + &.webconf-toolbar { + html@{layout-phone} &, + html@{layout-small} & { + display: flex !important; + } + } } .webconf-frame { - #mm-ariane { - html@{layout-phone} &, - html@{layout-small} & { - display: none; - } - } + #mm-ariane { + html@{layout-phone} &, + html@{layout-small} & { + display: none; + } + } } .toolbar-popup { - html@{layout-phone} &, - html@{layout-small} & { - right: unset; - } + html@{layout-phone} &, + html@{layout-small} & { + right: unset; + } } #calendaroptionsmenulink { - &:hover, - &:focus { - background-color: #2c3054; - } + &:hover, + &:focus { + background-color: #2c3054; + } } #visio-right-pannel-util { - position: absolute; - height: 100%; - width: calc(25% - 60px); - min-width: 150px; - top: 60px; - right: 0; - background-color: #f0f0f0; - display: none; - padding: 15px; - border-bottom-left-radius: 5px; - border-top-left-radius: 5px; - .mel-all-ease-in-animation(); - - &.right-mode { - width: 200px; - right: 323px; - } - - &.visible-mode { - display: unset; - } - - &.password { - border-radius: 5px; - top: calc(50% + 60px); - left: calc(50% + 60px); - right: unset; - transform: translateY(-50%) translateX(-50%); - width: 50%; - height: fit-content; - background-color: white; - } - - .title { - margin-bottom: 15px; - } - - .mel-selectable { - padding: 15px; - margin-bottom: 5px; - } - - html.dark-mode & { - background-color: #141414; - } + position: absolute; + height: 100%; + width: calc(25% - 60px); + min-width: 150px; + top: 60px; + right: 0; + background-color: #f0f0f0; + display: none; + padding: 15px; + border-bottom-left-radius: 5px; + border-top-left-radius: 5px; + .mel-all-ease-in-animation(); + + &.right-mode { + width: 200px; + right: 323px; + } + + &.visible-mode { + display: unset; + } + + &.password { + border-radius: 5px; + top: calc(50% + 60px); + left: calc(50% + 60px); + right: unset; + transform: translateY(-50%) translateX(-50%); + width: 50%; + height: fit-content; + background-color: white; + } + + .title { + margin-bottom: 15px; + } + + .mel-selectable { + padding: 15px; + margin-bottom: 5px; + } + + html.dark-mode & { + background-color: #141414; + } } #html-pannel { - max-height: 80%; - overflow: hidden auto; + max-height: 80%; + overflow: hidden auto; } .rotovisua { - display: flex; - - .button { - max-width: 70%; - } - - .visu { - max-width: 30%; - position: relative; - display: flex; - justify-content: center; - align-items: center; - - & > div { - display: inline-block; - width: 3px; - height: 33px; - margin: 0 1px; - background: currentColor; - transform: scaleY(0.5); - opacity: 0.25; - } - } + display: flex; + + .button { + max-width: 70%; + } + + .visu { + max-width: 30%; + position: relative; + display: flex; + justify-content: center; + align-items: center; + + & > div { + display: inline-block; + width: 3px; + height: 33px; + margin: 0 1px; + background: currentColor; + transform: scaleY(0.5); + opacity: 0.25; + } + } } .video-visio-label { - position: absolute; - /* bottom: 5px; */ - /* left: 18%; */ - background-color: #00000094; - color: white; - padding: 5px; - border-radius: 5px; - bottom: 0; - left: 50%; - transform: translate(-50%, -50%); - text-align: center; + position: absolute; + /* bottom: 5px; */ + /* left: 18%; */ + background-color: #00000094; + color: white; + padding: 5px; + border-radius: 5px; + bottom: 0; + left: 50%; + transform: translate(-50%, -50%); + text-align: center; } .loader { - &-base { - width: var(--loader-width); - height: var(--loader-height); - mask: var(--loader-mask); - -webkit-mask: var(--loader-mask); - animation: mel-mask-loader-spin 1s linear infinite; - animation-direction: reverse; - - /** Exemple **/ - &.tiny { - --loader-width: 50px; - --loader-height: 50px; - } - - &.large { - --loader-width: 400px; - --loader-height: 400px; - } - /** FIN Exemple **/ - - .loaded & { - // animation: loaded 0.5s linear forwards; - // animation-direction: reverse; - animation: none; - display: none; - - .loader-looping { - animation: none; - display: none; - } - } - } - - &-looping { - background: var(--loader-image); - background-size: 50%; - background-repeat: no-repeat; - width: 100%; - height: 100%; - // animation: spin 1s linear infinite; - // animation-direction: reverse; - background-position: var(--loader-background-position); - } - - &-div { - position: absolute; - top: 60px; - left: 60px; - width: calc(100% - 60px); - height: calc(100% - 60px); - - &.loaded { - display: none; - } - } + &-base { + width: var(--loader-width); + height: var(--loader-height); + mask: var(--loader-mask); + -webkit-mask: var(--loader-mask); + animation: mel-mask-loader-spin 1s linear infinite; + animation-direction: reverse; + + /** Exemple **/ + &.tiny { + --loader-width: 50px; + --loader-height: 50px; + } + + &.large { + --loader-width: 400px; + --loader-height: 400px; + } + /** FIN Exemple **/ + + .loaded & { + // animation: loaded 0.5s linear forwards; + // animation-direction: reverse; + animation: none; + display: none; + + .loader-looping { + animation: none; + display: none; + } + } + } + + &-looping { + background: var(--loader-image); + background-size: 50%; + background-repeat: no-repeat; + width: 100%; + height: 100%; + // animation: spin 1s linear infinite; + // animation-direction: reverse; + background-position: var(--loader-background-position); + } + + &-div { + position: absolute; + top: 60px; + left: 60px; + width: calc(100% - 60px); + height: calc(100% - 60px); + + &.loaded { + display: none; + } + } } #theme-panel { - .themescontents { - overflow-y: auto; - overflow-x: hidden; - } - - .picture { - display: inline-block; - width: 92%; - // height: 121px; - aspect-ratio: 1.6 / 1; - - border: solid thin var(--invisible); - border-radius: 5px; - margin-bottom: 5px; - box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); - // margin: 0 15px; - // transition: all 0.1s ease-in; - - &.barup-background-color { - // border: solid thin var(--primary-border-color); - - html.dark-mode & { - --primary-border-color: #e1c58f; - } - - &:hover, - &.selected { - background-color: var(--secondary-nav-background-color); - } - } - - &:hover { - background-color: var(--background-pannel-hover) !important; - background-blend-mode: multiply !important; - box-shadow: none; - } - - &.selected { - border-bottom: solid thin var(--invisible) !important; - border-left: solid thin var(--invisible) !important; - background-blend-mode: color-dodge; - // border: solid thick #484D7A; - - html.dark-mode & { - border: solid thin var(--invisible) !important; //border: solid thick #E1C58F; - } - } - } - - .input-top-selectable { - &:extend(#theme-panel .picture); - &:extend(#theme-panel .picture.barup-background-color); - - border-right: none; - border-bottom-right-radius: 0; - border-top-right-radius: 0; - width: 50%; - margin: 0; - - button { - width: 100%; - height: 100%; - border-top-left-radius: 5px; - border-top-right-radius: 0; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 0; - border: none; - --main-bckg-color: var(--invisible); - // --secondary-text-color: var(--main-text-color); - - &:hover { - // border-top-left-radius: 100%; - // border-bottom-left-radius: 100%; - - .color-icon { - --main-text-color: var(--secondary-text-color); - } - } - } - - &.hovered { - &:extend(#theme-panel .picture:hover); - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - & + .picture.half-resize { - border-bottom-left-radius: 0; - border-top-left-radius: 0; - width: 50%; - margin: 0; - aspect-ratio: 0.8/1; - - &.barup-background-color { - border-top: solid thin var(--primary-border-color); - } - } - - html.dark-mode & { - &:extend(html.dark-mode #theme-panel .picture.barup-background-color); - } - } + .themescontents { + overflow-y: auto; + overflow-x: hidden; + } + + .picture { + display: inline-block; + width: 92%; + // height: 121px; + aspect-ratio: 1.6 / 1; + + border: solid thin var(--invisible); + border-radius: 5px; + margin-bottom: 5px; + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); + // margin: 0 15px; + // transition: all 0.1s ease-in; + + &.barup-background-color { + // border: solid thin var(--primary-border-color); + + html.dark-mode & { + --primary-border-color: #e1c58f; + } + + &:hover, + &.selected { + background-color: var(--secondary-nav-background-color); + } + } + + &:hover { + background-color: var(--background-pannel-hover) !important; + background-blend-mode: multiply !important; + box-shadow: none; + } + + &.selected { + border-bottom: solid thin var(--invisible) !important; + border-left: solid thin var(--invisible) !important; + background-blend-mode: color-dodge; + // border: solid thick #484D7A; + + html.dark-mode & { + border: solid thin var(--invisible) !important; //border: solid thick #E1C58F; + } + } + } + + .input-top-selectable { + &:extend(#theme-panel .picture); + &:extend(#theme-panel .picture.barup-background-color); + + border-right: none; + border-bottom-right-radius: 0; + border-top-right-radius: 0; + width: 50%; + margin: 0; + + button { + width: 100%; + height: 100%; + border-top-left-radius: 5px; + border-top-right-radius: 0; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 0; + border: none; + --main-bckg-color: var(--invisible); + // --secondary-text-color: var(--main-text-color); + + &:hover { + // border-top-left-radius: 100%; + // border-bottom-left-radius: 100%; + + .color-icon { + --main-text-color: var(--secondary-text-color); + } + } + } + + &.hovered { + &:extend(#theme-panel .picture:hover); + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + & + .picture.half-resize { + border-bottom-left-radius: 0; + border-top-left-radius: 0; + width: 50%; + margin: 0; + aspect-ratio: 0.8/1; + + &.barup-background-color { + border-top: solid thin var(--primary-border-color); + } + } + + html.dark-mode & { + &:extend(html.dark-mode #theme-panel .picture.barup-background-color); + } + } } .green-badge { - position: absolute; - top: 0; - right: 9px; - background-color: #484d7ac7; - border-radius: 5px; - width: calc(100% - 19px); - // height: 121px; - aspect-ratio: 1.6 / 1; - text-align: center; - line-height: 26px; - color: white; - - html.dark-mode & { - // background-color: #2E2E2EC7; - color: #e1c58f; - } - - span { - font-size: xx-large; - } - - .div-custom-picture & { - right: 3px; - width: 47%; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - aspect-ratio: 0.8/1; - } + position: absolute; + top: 0; + right: 9px; + background-color: #484d7ac7; + border-radius: 5px; + width: calc(100% - 19px); + // height: 121px; + aspect-ratio: 1.6 / 1; + text-align: center; + line-height: 26px; + color: white; + + html.dark-mode & { + // background-color: #2E2E2EC7; + color: #e1c58f; + } + + span { + font-size: xx-large; + } + + .div-custom-picture & { + right: 3px; + width: 47%; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + aspect-ratio: 0.8/1; + } } .tiny-rocket-chat { - &.inbarup { - position: unset; - height: 100%; - font-size: 0; - float: left; - width: fit-content; - - .tiny-rocket-chat-icon { - position: initial; - font-size: 24px; - color: #fdcf42; - } - } + &.inbarup { + position: unset; + height: 100%; + font-size: 0; + float: left; + width: fit-content; + + .tiny-rocket-chat-icon { + position: initial; + font-size: 24px; + color: #fdcf42; + } + } } #list-contacts { - .scroller { - position: absolute; - } + .scroller { + position: absolute; + } } .material-symbols-outlined { - &.fill-on-hover:hover { - font-variation-settings: 'FILL' 1; - } + &.fill-on-hover:hover { + font-variation-settings: 'FILL' 1; + } - .fill-on-hover:hover & { - &:extend(.material-symbols-outlined.fill-on-hover:hover); - } + .fill-on-hover:hover & { + &:extend(.material-symbols-outlined.fill-on-hover:hover); + } - &.force-fill { - font-variation-settings: 'FILL' 1; - } + &.force-fill { + font-variation-settings: 'FILL' 1; + } - .force-fill & { - &:extend(.material-symbols-outlined.force-fill); - } + .force-fill & { + &:extend(.material-symbols-outlined.force-fill); + } } .mv2-app { - &.fill-on-hover:hover { - font-variation-settings: 'FILL' 1; - } + &.fill-on-hover:hover { + font-variation-settings: 'FILL' 1; + } } .aprilfool { - background-image: url(../images/aprilfools.png); - width: 500px; - height: 300px; + background-image: url(../images/aprilfools.png); + width: 500px; + height: 300px; } //Settings icons .task-settings { - #layout-sidebar { - .listing.iconized { - li { - a::before { - font-family: 'Material Symbols Outlined' !important; - font-variation-settings: - 'wght' 500, - 'opsz' 40; - font-weight: normal !important; - font-size: 20px; - height: 1em; - } - - a:hover { - &::before { - font-variation-settings: - 'wght' 500, - 'opsz' 40, - 'FILL' 1; - } - } - - &.preferences > a::before { - content: '\e429'; - } - - &.folders > a::before { - content: '\e2c7'; - } - - &.identities > a::before { - content: '\e7fd'; - } - - &.signatures.identities > a::before { - content: '\f74c'; - } - - &.nextcloud > a::before { - content: '\e2c8'; - } - - &.filter > a::before { - content: '\ef4f'; - } - - &.roadmap > a::before { - content: '\ef3b' !important; - } - - &.news > a::before { - content: '\f009'; - } - - &.mel_doubleauth > a::before { - content: '\e0dc'; - } - - &.resources > a::before { - content: '\e5cc'; - } - - &.resources._selected > a::before { - content: '\e5cf'; - } - - &#settingstabpluginmel_resources_bal > a::before { - content: '\e156'; - height: 2em; - } - - &#settingstabpluginmel_resources_agendas > a::before { - content: '\ebcc'; - height: 2em; - } - - &#settingstabpluginmel_resources_contacts > a::before { - content: '\e7fd'; - height: 2em; - } - - &#settingstabpluginmel_resources_tasks > a::before { - content: '\e834'; - height: 2em; - } - - &.moncompte > a::before { - content: '\f02e'; - } - - &.mel.statistics > a::before { - content: '\e5cc'; - } - - &.mel.statistics._selected > a::before { - content: '\e5cf'; - } - - &.mel.statistics.mobile > a::before { - content: '\e325'; - height: 2em; - } - - &.mel_suggestion_box > a::before { - content: '\e175'; - } - - &.rocketchat > a::before { - content: '\e0b7'; - } - } - } - } + #layout-sidebar { + .listing.iconized { + li { + a::before { + font-family: 'Material Symbols Outlined' !important; + font-variation-settings: + 'wght' 500, + 'opsz' 40; + font-weight: normal !important; + font-size: 20px; + height: 1em; + } + + a:hover { + &::before { + font-variation-settings: + 'wght' 500, + 'opsz' 40, + 'FILL' 1; + } + } + + &.preferences > a::before { + content: '\e429'; + } + + &.folders > a::before { + content: '\e2c7'; + } + + &.identities > a::before { + content: '\e7fd'; + } + + &.signatures.identities > a::before { + content: '\f74c'; + } + + &.nextcloud > a::before { + content: '\e2c8'; + } + + &.filter > a::before { + content: '\ef4f'; + } + + &.roadmap > a::before { + content: '\ef3b' !important; + } + + &.news > a::before { + content: '\f009'; + } + + &.mel_doubleauth > a::before { + content: '\e0dc'; + } + + &.resources > a::before { + content: '\e5cc'; + } + + &.resources._selected > a::before { + content: '\e5cf'; + } + + &#settingstabpluginmel_resources_bal > a::before { + content: '\e156'; + height: 2em; + } + + &#settingstabpluginmel_resources_agendas > a::before { + content: '\ebcc'; + height: 2em; + } + + &#settingstabpluginmel_resources_contacts > a::before { + content: '\e7fd'; + height: 2em; + } + + &#settingstabpluginmel_resources_tasks > a::before { + content: '\e834'; + height: 2em; + } + + &.moncompte > a::before { + content: '\f02e'; + } + + &.mel.statistics > a::before { + content: '\e5cc'; + } + + &.mel.statistics._selected > a::before { + content: '\e5cf'; + } + + &.mel.statistics.mobile > a::before { + content: '\e325'; + height: 2em; + } + + &.mel_suggestion_box > a::before { + content: '\e175'; + } + + &.rocketchat > a::before { + content: '\e0b7'; + } + } + } + } } .task-settings { - #layout-list { - .listing.iconized.settings-default-icon { - tr { - td.section::before { - font-family: 'Material Symbols Outlined' !important; - font-variation-settings: - 'wght' 500, - 'opsz' 40; - font-weight: normal !important; - font-size: 20px; - height: 1em; - } - - td.section:hover { - &::before { - font-variation-settings: - 'wght' 500, - 'opsz' 40, - 'FILL' 1; - } - } - - &.general > td.section::before { - content: '\e30c'; - } - - &.mailbox > td.section::before { - content: '\e158'; - } - - &.mailview > td.section::before { - content: '\e156'; - } - - &.compose > td.section::before { - content: '\e163'; - } - - &.addressbook > td.section::before { - content: '\f233'; - } - - &.server > td.section::before { - content: '\e875'; - } - - &.encryption > td.section::before { - content: '\e898'; - } - - &.globalsearch > td.section::before { - content: '\e8b6'; - } - - &.visio > td.section::before { - content: '\e04b'; - } - - &.chat > td.section::before { - content: '\e0b7'; - } - - &.navigation > td.section::before { - content: '\e5d2'; - } - - &.bnum-experimental > td.section::before { - content: '\ea4b'; - } - - &.labels > td.section::before { - content: '\e892'; - } - - &.notifications > td.section::before { - content: '\e7f4'; - } - - &.calendar > td.section::before { - content: '\ebcc'; - } - - &.a_mel_news_flux > td.section::before { - content: '\e8b8'; - } - - &#section_mel_chat_settings > td::before { - content: '\f02e'; - } - - &#rcmrowmel_chat_ui > td::before { - content: '\e3c4'; - } - } - } - } + #layout-list { + .listing.iconized.settings-default-icon { + tr { + td.section::before { + font-family: 'Material Symbols Outlined' !important; + font-variation-settings: + 'wght' 500, + 'opsz' 40; + font-weight: normal !important; + font-size: 20px; + height: 1em; + } + + td.section:hover { + &::before { + font-variation-settings: + 'wght' 500, + 'opsz' 40, + 'FILL' 1; + } + } + + &.general > td.section::before { + content: '\e30c'; + } + + &.mailbox > td.section::before { + content: '\e158'; + } + + &.mailview > td.section::before { + content: '\e156'; + } + + &.compose > td.section::before { + content: '\e163'; + } + + &.addressbook > td.section::before { + content: '\f233'; + } + + &.server > td.section::before { + content: '\e875'; + } + + &.encryption > td.section::before { + content: '\e898'; + } + + &.globalsearch > td.section::before { + content: '\e8b6'; + } + + &.visio > td.section::before { + content: '\e04b'; + } + + &.chat > td.section::before { + content: '\e0b7'; + } + + &.navigation > td.section::before { + content: '\e5d2'; + } + + &.bnum-experimental > td.section::before { + content: '\ea4b'; + } + + &.labels > td.section::before { + content: '\e892'; + } + + &.notifications > td.section::before { + content: '\e7f4'; + } + + &.calendar > td.section::before { + content: '\ebcc'; + } + + &.a_mel_news_flux > td.section::before { + content: '\e8b8'; + } + + &#section_mel_chat_settings > td::before { + content: '\f02e'; + } + + &#rcmrowmel_chat_ui > td::before { + content: '\e3c4'; + } + } + } + } } .mel-toolbar { - position: absolute; - - .toolbar-buttons { - display: flex; - height: 100%; - - .mel-button { - flex: 1; - // --secondary-text-color:white; - --main-bckg-color: var(--invisible); - --mel-button-border-color: var(--invisible); - border-radius: 0; - - span { - display: block; - } - } - - .v-separate { - width: 1px; - background: white; - margin: 10px 0; - } - } + position: absolute; + + .toolbar-buttons { + display: flex; + height: 100%; + + .mel-button { + flex: 1; + // --secondary-text-color:white; + --main-bckg-color: var(--invisible); + --mel-button-border-color: var(--invisible); + border-radius: 0; + + span { + display: block; + } + } + + .v-separate { + width: 1px; + background: white; + margin: 10px 0; + } + } } .melv2-card-shadow { - box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); + box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); } .melv2-card { - border-radius: 15px; - // box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2); - .melv2-card-shadow(); - padding: 5px; - - html.dark-mode & { - background-color: #323f4b; - box-shadow: none; - } + border-radius: 15px; + // box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2); + .melv2-card-shadow(); + padding: 5px; + + html.dark-mode & { + background-color: #323f4b; + box-shadow: none; + } } .melv2-card-pre { - margin-top: 10px; - margin-left: 10px; - display: flex; + margin-top: 10px; + margin-left: 10px; + display: flex; } .melv2-card-title { - font-size: 1.4rem; - font-weight: bold; + font-size: 1.4rem; + font-weight: bold; - a& { - color: var(--main-text-color); + a& { + color: var(--main-text-color); - html.dark-mode & { - --main-text-color: #c7dfff; - } - } + html.dark-mode & { + --main-text-color: #c7dfff; + } + } } .melv2-card-icon { - margin-right: 5px; - align-self: center; + margin-right: 5px; + align-self: center; } .melv2-card .contents, .melv2-card-contents { - height: 237px; - max-height: 237px; - overflow: auto; - - li { - &:first-child > div { - margin-top: 0; - } - - &:last-child > div { - margin-bottom: 0; - } - } + height: 237px; + max-height: 237px; + overflow: auto; + + li { + &:first-child > div { + margin-top: 0; + } + + &:last-child > div { + // margin-bottom: 0; + } + } } .module_Headlines { - .melv2-card-contents { - overflow: unset; - } + .melv2-card-contents { + overflow: unset; + } } .module_Mails { - .melv2-card-contents { - &:extend(.module_Headlines .melv2-card-contents); - } + .melv2-card-contents { + &:extend(.module_Headlines .melv2-card-contents); + } } .module_My_day { - .melv2-card-contents { - &:extend(.module_Headlines .melv2-card-contents); - } + .melv2-card-contents { + &:extend(.module_Headlines .melv2-card-contents); + } } .melv2-color { - --mv2-item-background-color: #f8f9fa; - --mv2-item-text-color: var(--main-text-color); + --mv2-item-background-color: #f8f9fa; + --mv2-item-text-color: var(--main-text-color); } .melv2-event { - &:extend(.melv2-color); - &:extend(.mel-animated); - background-color: var(--mv2-item-background-color); - color: var(--mv2-item-text-color); - border-radius: 10px; - display: flex; - margin: 2.5px 13px; - padding: 5px; - padding-left: 10px; - - &[data-ignore-date='true'] { - box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2); - margin-left: 0; - margin-right: 0; - margin-bottom: 5px; - } - - &.hovered { - --mv2-item-background-color: var(--tierciary-bckg-color); - --mv2-item-text-color: var(--secondary-text-color); - // background-color: var(--tierciary-bckg-color); - // color: var(--secondary-text-color); - cursor: pointer; - } - - html.dark-mode & { - --mv2-item-background-color: #3e4c59; - --mv2-item-text-color: #c7dfff; - // background-color: #3e4c59; - - &.hovered { - --mv2-item-background-color: #2e2e2e; - // background-color: #2E2E2E; - --mv2-item-text-color: #e1c58f; - // color: #E1C58F; - } - } + &:extend(.melv2-color); + &:extend(.mel-animated); + background-color: var(--mv2-item-background-color); + color: var(--mv2-item-text-color); + border-radius: 10px; + display: flex; + margin: 2.5px 13px; + padding: 5px; + padding-left: 10px; + + &[data-ignore-date='true'] { + box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2); + margin-left: 0; + margin-right: 0; + margin-bottom: 5px; + } + + &.hovered { + --mv2-item-background-color: var(--tierciary-bckg-color); + --mv2-item-text-color: var(--secondary-text-color); + // background-color: var(--tierciary-bckg-color); + // color: var(--secondary-text-color); + cursor: pointer; + } + + html.dark-mode & { + --mv2-item-background-color: #3e4c59; + --mv2-item-text-color: #c7dfff; + // background-color: #3e4c59; + + &.hovered { + --mv2-item-background-color: #2e2e2e; + // background-color: #2E2E2E; + --mv2-item-text-color: #e1c58f; + // color: #E1C58F; + } + } } .melv2-event-clickable { - display: flex; - flex-wrap: wrap; - width: 75%; - border-radius: 15px; + display: flex; + flex-wrap: wrap; + width: 75%; + border-radius: 15px; } .melv2-event-date { - flex-basis: 100%; - font-size: 12px; - font-weight: 600; - margin-bottom: 5px; + flex-basis: 100%; + font-size: 12px; + font-weight: 600; + margin-bottom: 5px; } .melv2-event-hour { - p { - margin-bottom: 0; - padding-right: 10px; - font-size: 12px; - - &.melv2-event-hour-top { - margin-bottom: 4px; - } - } + p { + margin-bottom: 0; + padding-right: 10px; + font-size: 12px; + + &.melv2-event-hour-top { + margin-bottom: 4px; + } + } } .melv2-event-hour-top { - margin-bottom: 2px; + margin-bottom: 2px; } .melv2-event-separator { - width: 1px; - background-color: var(--main-text-color); - border-radius: 100px; - height: calc(100% - 30.2px); - margin-top: 3px; - - [data-ignore-date='true'] & { - height: unset; - } + width: 1px; + background-color: var(--main-text-color); + border-radius: 100px; + height: calc(100% - 30.2px); + margin-top: 3px; + + [data-ignore-date='true'] & { + height: unset; + } } .melv2-event-content { - margin-left: 10px; - max-width: calc(100% - 75px); - - p { - &:extend(.melv2-event-hour p); - text-overflow: ellipsis; - max-width: 100%; - overflow: hidden; - white-space: nowrap; - - &.melv2-event-content-top { - font-size: 14px; - font-weight: 600; - } - } + margin-left: 10px; + max-width: calc(100% - 75px); + + p { + &:extend(.melv2-event-hour p); + text-overflow: ellipsis; + max-width: 100%; + overflow: hidden; + white-space: nowrap; + + &.melv2-event-content-top { + font-size: 14px; + font-weight: 600; + } + } } .melv2-event-content-bottom { - font-weight: 300; + font-weight: 300; } .melv2-event-side { - display: flex; - justify-content: center; - width: 25%; - .melv2-event-button { - border-radius: 0; - align-self: center; - height: fit-content; - border-right: solid thin white; - line-height: 0; - &:first-of-type { - border-bottom-left-radius: 50px; - border-top-left-radius: 50px; - } - &:last-of-type { - border-bottom-right-radius: 50px; - border-top-right-radius: 50px; - border-right: none; - } - } + display: flex; + justify-content: center; + width: 25%; + .melv2-event-button { + border-radius: 0; + align-self: center; + height: fit-content; + border-right: solid thin white; + line-height: 0; + &:first-of-type { + border-bottom-left-radius: 50px; + border-top-left-radius: 50px; + } + &:last-of-type { + border-bottom-right-radius: 50px; + border-top-right-radius: 50px; + border-right: none; + } + } } .melv2-mail { - &:extend(.melv2-event); - &:extend(.mel-animated); - padding: 15px; - margin: 3px 13px; - - &:hover { - // background-color: var(--tierciary-bckg-color); - // color: var(--secondary-text-color); - // cursor: pointer; - &:extend(.melv2-event.hovered); - } - - html.dark-mode & { - // background-color: #3e4c59; - &:extend(html.dark-mode .melv2-event); - - &:hover { - &:extend(html.dark-mode .melv2-event.hovered); - // background-color: #2E2E2E; - // color: #E1C58F; - } - } + &:extend(.melv2-event); + &:extend(.mel-animated); + padding: 15px; + margin: 3px 13px; + + &:hover { + // background-color: var(--tierciary-bckg-color); + // color: var(--secondary-text-color); + // cursor: pointer; + &:extend(.melv2-event.hovered); + } + + html.dark-mode & { + // background-color: #3e4c59; + &:extend(html.dark-mode .melv2-event); + + &:hover { + &:extend(html.dark-mode .melv2-event.hovered); + // background-color: #2E2E2E; + // color: #E1C58F; + } + } } .melv2-mail-left { - &:extend(.melv2-event-clickable); - display: block; + &:extend(.melv2-event-clickable); + display: block; } .melv2-mail-right { - width: 25%; - display: flex; - align-content: space-between; + width: 25%; + display: flex; + align-content: space-between; } .melv2-mail-date { - text-align: end; - &.melv2-mail-old { - width: 100%; - align-self: center; - - div { - display: inline-block; - } - } + text-align: end; + &.melv2-mail-old { + width: 100%; + align-self: center; + + div { + display: inline-block; + } + } } .melv2-mail-from { - &:extend(.melv2-event-date); - font-size: 14px; - overflow: hidden; - max-width: 100%; - white-space: nowrap; - text-overflow: ellipsis; + &:extend(.melv2-event-date); + font-size: 14px; + overflow: hidden; + max-width: 100%; + white-space: nowrap; + text-overflow: ellipsis; } .melv2-mail-subject { - &:extend(.melv2-event-content p); - font-size: 11px; + &:extend(.melv2-event-content p); + font-size: 11px; } .melv2-mail-date { - &:extend(.melv2-event-date); + &:extend(.melv2-event-date); } .melv2-mail-date-left { - &:extend(.melv2-event-content p); - font-weight: normal; - overflow: unset; - font-size: 11px; + &:extend(.melv2-event-content p); + font-weight: normal; + overflow: unset; + font-size: 11px; } .melv2-hello { - font-weight: bold; - margin-top: 15px; - margin-bottom: 15px; + font-weight: bold; + margin-top: 15px; + margin-bottom: 15px; } .mel-news { - font-family: Marianne, Roboto, sans-serif; + font-family: Marianne, Roboto, sans-serif; } .module_Workspaces { - .workspace { - background-color: var(--default-background); - .melv2-card-shadow(); - } + .workspace { + background-color: var(--default-background); + .melv2-card-shadow(); + } } button.melv2-sec-nav-correction { - padding: 0; - border-radius: 100%; - width: 35px; - height: 35px; - line-height: 1; + padding: 0; + border-radius: 100%; + width: 35px; + height: 35px; + line-height: 1; } .fullscreen-item { - .mel-button { - &.close-fs-button { - position: absolute; - top: 30px; - right: 30px; - border-radius: 100%; - /* background-color: var(--invisible); */ - width: 35px; - height: 35px; - padding: 4px; - } - } + .mel-button { + &.close-fs-button { + position: absolute; + top: 30px; + right: 30px; + border-radius: 100%; + /* background-color: var(--invisible); */ + width: 35px; + height: 35px; + padding: 4px; + } + } } #app-notes_container { - display: flex; - margin-top: 110px; - justify-content: center; - flex-wrap: wrap; + display: flex; + margin-top: 110px; + justify-content: center; + flex-wrap: wrap; } .mel-note { - &.dragover { - &::before { - height: 158px; - content: ''; - width: 4px; - display: block; - position: absolute; - top: 50%; - background-color: black; - transform: translateY(-50%); - - html.dark-mode & { - background-color: white; - } - } - - &.dragover-left::before { - margin-left: -12px; - left: 0; - } - - &.dragover-right::before { - margin-right: -12px; - right: 0; - } - } + &.dragover { + &::before { + height: 158px; + content: ''; + width: 4px; + display: block; + position: absolute; + top: 50%; + background-color: black; + transform: translateY(-50%); + + html.dark-mode & { + background-color: white; + } + } + + &.dragover-left::before { + margin-left: -12px; + left: 0; + } + + &.dragover-right::before { + margin-right: -12px; + right: 0; + } + } } #button-notes { - &.on-focus { - .material-symbols-outlined { - font-variation-settings: 'FILL' 1; - } - } + &.on-focus { + .material-symbols-outlined { + font-variation-settings: 'FILL' 1; + } + } } .drag-zone { - position: absolute; - top: 60px; - left: 60px; - background-color: #0000006e; - z-index: 1; - width: calc(100% - 60px); - height: calc(100% - 60px); - border: solid 2px lightgreen; - /* box-shadow: -5px -10px -9px -15px white; */ + position: absolute; + top: 60px; + left: 60px; + background-color: #0000006e; + z-index: 1; + width: calc(100% - 60px); + height: calc(100% - 60px); + border: solid 2px lightgreen; + /* box-shadow: -5px -10px -9px -15px white; */ } .elastic-contact-qr-button-code { - position: absolute; - right: 15px; - top: 15px; + position: absolute; + right: 15px; + top: 15px; - html.layout-phone &, - html.layout-small & { - top: 30px; - } + html.layout-phone &, + html.layout-small & { + top: 30px; + } } .new-note-button { - margin: 10px; - border: none; - border-radius: 5px; - width: 315px; - height: 158px; - border: solid thin var(--main-bckg-color); - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - float: left; - - .new-note-icon { - display: block; - margin-bottom: 5px; - } - - html.dark-mode & { - color: #e1c58f; - border-color: #e1c58f; - background-color: #181c28; - height: 149px; - } - - &:hover { - background-color: var(--tierciary-bckg-color); - border: solid thin var(--tierciary-bckg-color); - - html.dark-mode & { - background-color: #2e2e2e; - } - } + margin: 10px; + border: none; + border-radius: 5px; + width: 315px; + height: 158px; + border: solid thin var(--main-bckg-color); + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + float: left; + + .new-note-icon { + display: block; + margin-bottom: 5px; + } + + html.dark-mode & { + color: #e1c58f; + border-color: #e1c58f; + background-color: #181c28; + height: 149px; + } + + &:hover { + background-color: var(--tierciary-bckg-color); + border: solid thin var(--tierciary-bckg-color); + + html.dark-mode & { + background-color: #2e2e2e; + } + } } .module_Links { - .melv2-card { - box-shadow: none; - - html.dark-mode & { - // &{ - background-color: transparent; - // } - } - } - - .melv2-card-pre { - border-bottom: solid thin #e0e0e0; - margin-bottom: 15px; - } - - .melv2-card-contents { - display: flex; - // padding: 0 308px; - flex-wrap: wrap; - overflow: unset; - height: 260px; - max-height: 260px; - justify-content: center; - - .touch & { - padding: 0; - overflow: auto; - height: 275px; - max-height: 275px; - } - } + .melv2-card { + box-shadow: none; + + html.dark-mode & { + // &{ + background-color: transparent; + // } + } + } + + .melv2-card-pre { + border-bottom: solid thin #e0e0e0; + margin-bottom: 15px; + } + + .melv2-card-contents { + display: flex; + // padding: 0 308px; + flex-wrap: wrap; + height: auto; + max-height: none; + justify-content: center; + + .touch & { + padding: 0; + overflow: auto; + height: 275px; + max-height: 275px; + } + } } .mv2-app-line { - display: flex; - flex: 1 0 100%; - justify-content: center; + display: flex; + flex: 1 0 100%; + justify-content: center; - html.layout-phone & { - margin-left: 230px; - } + html.layout-phone & { + margin-left: 230px; + } } .mv2-app { - border: none; - background-color: transparent; - margin: 5px 17px 50px; - max-width: 92px; - max-height: 80px; - flex: 1 0 auto; - - @media screen and (max-width: 904px) { - & { - margin: 0; - } - } - - .mv2-app-icon { - width: 80px; - height: 80px; - max-width: 80px; - max-height: 80px; - font-size: 60px; - line-height: 1.35; - border: none; - background-color: var(--main-bckg-color); - color: var(--secondary-text-color); - border-radius: 10px; - display: block; - margin-bottom: 5px; - } - - .mv2-app-text { - font-size: 12px; - } + border: none; + background-color: transparent; + margin: 5px 17px 50px; + max-width: 92px; + max-height: 80px; + flex: 1 0 auto; + + @media screen and (max-width: 904px) { + & { + margin: 0; + } + } + + .mv2-app-icon { + width: 80px; + height: 80px; + max-width: 80px; + max-height: 80px; + font-size: 60px; + line-height: 1.35; + border: none; + background-color: var(--main-bckg-color); + color: var(--secondary-text-color); + border-radius: 10px; + display: block; + margin-bottom: 5px; + } + + .mv2-app-text { + font-size: 12px; + } } each(@apps, { @@ -5095,170 +5108,170 @@ each(@apps, { }); .app-icon-color(@name) { - @color: e('var(--@{name}-app-color)'); - .@{name}_app { - .mv2-app-icon { - background-color: @color; - - &:hover { - background-color: var(--hover-app-color); - } - } - - &.only-text { - .mv2-app-icon { - color: @color; - } - } - - &.only-current.only-background { - background-color: @color; - color: white; - - &.can-be-hovered:hover { - background-color: var(--hover-app-color); - } - } - - &.only-current.only-text { - color: @color; - } - } + @color: e('var(--@{name}-app-color)'); + .@{name}_app { + .mv2-app-icon { + background-color: @color; + + &:hover { + background-color: var(--hover-app-color); + } + } + + &.only-text { + .mv2-app-icon { + color: @color; + } + } + + &.only-current.only-background { + background-color: @color; + color: white; + + &.can-be-hovered:hover { + background-color: var(--hover-app-color); + } + } + + &.only-current.only-text { + color: @color; + } + } } html.dark-mode { - &:root { - --hover-app-color: #2e2e2e; - } + &:root { + --hover-app-color: #2e2e2e; + } - .mv2-app-icon { - color: #e1c58f; - background-color: #181c28; - border: solid thin #e1c58f; + .mv2-app-icon { + color: #e1c58f; + background-color: #181c28; + border: solid thin #e1c58f; - &:hover { - background-color: var(--hover-app-color); - } - } + &:hover { + background-color: var(--hover-app-color); + } + } - .mv2-app-text { - color: #96b9e7; - } + .mv2-app-text { + color: #96b9e7; + } } .colored-header-icon { - font-size: 30px; - border-radius: 8px; - margin: auto; - padding: 6px; - font-variation-settings: 'wght' 300; + font-size: 30px; + border-radius: 8px; + margin: auto; + padding: 6px; + font-variation-settings: 'wght' 300; } .colored-header-title { - flex: 1 0 auto; - font-weight: bold; - margin-left: 10px; - font-size: 16px; + flex: 1 0 auto; + font-weight: bold; + margin-left: 10px; + font-size: 16px; } #messagestack { - .mel-message-timer { - --background-message-timer: #dbdbdb; - --foreground-message-timer: var(--main-bckg-color); - display: block; - - p { - margin-top: 5px; - } - - .mel-message-timer-bckg { - width: 100%; - height: 5px; - border-radius: 50px; - background-color: var(--background-message-timer); - - .mel-message-timer-fg { - height: 5px; - background-color: var(--foreground-message-timer); - transition: all 1s ease-in; - } - } - - .mel-timer-cancel { - position: absolute; - top: -22px; - left: -28px; - height: 40px; - width: 40px; - line-height: 5px; - - &:hover { - --tierciary-bckg-color: var(--danger-color); - } - - span { - margin-left: -3px; - display: block; - margin-top: -3px; - } - } - - .mel-timer-start { - &:extend(#messagestack .mel-message-timer .mel-timer-cancel); - - top: 5px; - right: 5px; - left: unset; - } - - &.alert-info { - background-color: #6b7275; - } - - &.alert-success { - --background-message-timer: #b0ffa9; - --foreground-message-timer: green; - } - - &.alert-danger { - --background-message-timer: #ffa1a1; - --foreground-message-timer: red; - } - - &.alert-warning { - --background-message-timer: #fffea1; - --foreground-message-timer: #c1610c; - } - } + .mel-message-timer { + --background-message-timer: #dbdbdb; + --foreground-message-timer: var(--main-bckg-color); + display: block; + + p { + margin-top: 5px; + } + + .mel-message-timer-bckg { + width: 100%; + height: 5px; + border-radius: 50px; + background-color: var(--background-message-timer); + + .mel-message-timer-fg { + height: 5px; + background-color: var(--foreground-message-timer); + transition: all 1s ease-in; + } + } + + .mel-timer-cancel { + position: absolute; + top: -22px; + left: -28px; + height: 40px; + width: 40px; + line-height: 5px; + + &:hover { + --tierciary-bckg-color: var(--danger-color); + } + + span { + margin-left: -3px; + display: block; + margin-top: -3px; + } + } + + .mel-timer-start { + &:extend(#messagestack .mel-message-timer .mel-timer-cancel); + + top: 5px; + right: 5px; + left: unset; + } + + &.alert-info { + background-color: #6b7275; + } + + &.alert-success { + --background-message-timer: #b0ffa9; + --foreground-message-timer: green; + } + + &.alert-danger { + --background-message-timer: #ffa1a1; + --foreground-message-timer: red; + } + + &.alert-warning { + --background-message-timer: #fffea1; + --foreground-message-timer: #c1610c; + } + } } .page-abs { - margin: 15px; + margin: 15px; - .div-last { - margin: 15px 0; - } + .div-last { + margin: 15px 0; + } } .abs- { - &title { - margin-bottom: 15px; - } + &title { + margin-bottom: 15px; + } - &flex { - display: flex; - justify-content: space-around; - } + &flex { + display: flex; + justify-content: space-around; + } - &link { - display: block; - text-align: center; - margin-top: 20px; - } + &link { + display: block; + text-align: center; + margin-top: 20px; + } } #abs-loader { - height: 200px; + height: 200px; } // .mel-tooltip { @@ -5344,695 +5357,759 @@ html.dark-mode { // } .popover { - button.mel-button { - color: var(--popover-text-color); - - &:hover { - background-color: var(--popover-hover-background-color); - color: var(--popover-hover-text-color); - border-color: transparent !important; - } - - &.btn-secondary.active { - background-color: var(--popover-hover-background-color); - color: var(--popover-hover-text-color); - border-color: transparent !important; - } - } + button.mel-button { + color: var(--popover-text-color); + + &:hover { + background-color: var(--popover-hover-background-color); + color: var(--popover-hover-text-color); + border-color: transparent !important; + } + + &.btn-secondary.active { + background-color: var(--popover-hover-background-color); + color: var(--popover-hover-text-color); + border-color: transparent !important; + } + } } .external_url { - background: var(--card-background-color); - padding: 10px; - border-radius: 5px; - max-height: 60px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + background: var(--card-background-color); + padding: 10px; + border-radius: 5px; + max-height: 60px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } html.dark-mode .external_url { - background: #000; + background: #000; } .external_domain { - font-weight: bold; + font-weight: bold; } .pl-6 { - padding-left: 3.5rem !important; + padding-left: 3.5rem !important; } .warning-label { - display: flex; - align-items: center; + display: flex; + align-items: center; } .warning-icon-large { - font-size: 46px; + font-size: 46px; } .theme-saison-date { - position: absolute; - bottom: 14px; - left: 50%; - transform: translateX(-50%); - background-color: var(--default-bckg-color); - border-radius: 5px; - box-shadow: 0px 0px 2px black; - pointer-events: none; - - .col-6:hover & { - background-color: var(--tierciary-bckg-color); - color: var(--secondary-text-color); - } + position: absolute; + bottom: 14px; + left: 50%; + transform: translateX(-50%); + background-color: var(--default-bckg-color); + border-radius: 5px; + box-shadow: 0px 0px 2px black; + pointer-events: none; + + .col-6:hover & { + background-color: var(--tierciary-bckg-color); + color: var(--secondary-text-color); + } } .double-auth-modal { - &:focus-visible { - outline: none !important; - } - .subtitle { - color: var(--modal-da-title-text-color); //#5C5CFF; - font-size: 19px; - font-weight: 600; - } - - .title { - font-size: 23px; - font-weight: 700; - color: var(--main-text-color); //#3A3E5E; - } - - .content { - max-width: 335px; - } - - .modal-custom-button { - border-radius: 30px !important; - padding: 8px 25px 8px 25px !important; - border: none !important; - text-shadow: none !important; - float: left !important; - font-weight: 600 !important; - width: 140px !important; - } - - .next-button { - background-color: var(--modal-da-next-button-background-color) !important; - color: var(--modal-da-next-button-text-color) !important; - - &:hover { - --modal-da-next-button-text-color: var( - --modal-da-next-button-hover-text-color - ); - background-color: var( - --modal-da-next-button-hover-background-color - ) !important; - } - } - - .done-button { - background-color: var(--modal-da-button-background-color) !important; - color: var(--modal-da-button-text-color) !important; - &:hover { - --modal-da-button-text-color: var(--modal-da-button-hover-text-color); - background-color: var( - --modal-da-button-hover-background-color - ) !important; - } - } - - input { - background-color: #eee; - border: none; - - &:focus { - background-color: #eee !important; - } - } - - .code-input { - max-width: 180px; - background-color: #eee; - } - - .secret-code-input { - max-width: 315px; - background-color: #eee; - - &:focus { - box-shadow: none; - } - } - - .input-group-code .input-group-append { - background-color: #eee; - border-top-right-radius: 60px; - border-bottom-right-radius: 60px; - cursor: pointer; - - &:hover { - background-color: #e1e1e1; - } - } - - .check_logo { - width: 100px; - height: 100px; - margin: 10px 0; - background-color: #5c5cff; - border-radius: 100%; - display: flex; - justify-content: center; - align-items: center; - - .material-symbols-outlined { - font-size: 68px; - color: #fff; - font-variation-settings: 'wght' 600; - } - } - - #qr-code { - padding: 10px; - background-color: #fff; - border-radius: 5px; - } + &:focus-visible { + outline: none !important; + } + .subtitle { + color: var(--modal-da-title-text-color); //#5C5CFF; + font-size: 19px; + font-weight: 600; + } + + .title { + font-size: 23px; + font-weight: 700; + color: var(--main-text-color); //#3A3E5E; + } + + .content { + max-width: 335px; + } + + .modal-custom-button { + border-radius: 30px !important; + padding: 8px 25px 8px 25px !important; + border: none !important; + text-shadow: none !important; + float: left !important; + font-weight: 600 !important; + width: 140px !important; + } + + .next-button { + background-color: var(--modal-da-next-button-background-color) !important; + color: var(--modal-da-next-button-text-color) !important; + + &:hover { + --modal-da-next-button-text-color: var( + --modal-da-next-button-hover-text-color + ); + background-color: var( + --modal-da-next-button-hover-background-color + ) !important; + } + } + + .done-button { + background-color: var(--modal-da-button-background-color) !important; + color: var(--modal-da-button-text-color) !important; + &:hover { + --modal-da-button-text-color: var(--modal-da-button-hover-text-color); + background-color: var( + --modal-da-button-hover-background-color + ) !important; + } + } + + input { + background-color: #eee; + border: none; + + &:focus { + background-color: #eee !important; + } + } + + .code-input { + max-width: 180px; + background-color: #eee; + } + + .secret-code-input { + max-width: 315px; + background-color: #eee; + + &:focus { + box-shadow: none; + } + } + + .input-group-code .input-group-append { + background-color: #eee; + border-top-right-radius: 60px; + border-bottom-right-radius: 60px; + cursor: pointer; + + &:hover { + background-color: #e1e1e1; + } + } + + .check_logo { + width: 100px; + height: 100px; + margin: 10px 0; + background-color: #5c5cff; + border-radius: 100%; + display: flex; + justify-content: center; + align-items: center; + + .material-symbols-outlined { + font-size: 68px; + color: #fff; + font-variation-settings: 'wght' 600; + } + } + + #qr-code { + padding: 10px; + background-color: #fff; + border-radius: 5px; + } } html.dark-mode-custom .double-auth-modal { - .title { - color: #96b9e7 !important; - } - - input { - border: solid thin var(--input-border-color) !important; - background-color: var(--input-background-color); - &:focus { - background-color: var(--input-background-color) !important; - } - } - - .done-button { - background-color: var(--mel-button-background-color) !important; - border: var(--mel-button-border) !important; - color: var(--mel-button-text-color) !important; - - &:hover { - background-color: var(--mel-button-hover-background-color) !important; - } - } - .input-group-code .input-group-append { - border: solid thin var(--input-border-color) !important; - background-color: var(--input-background-color); - color: var(--input-mel-text-color); - - &:hover { - background-color: var(--mel-button-hover-background-color); - } - } + .title { + color: #96b9e7 !important; + } + + input { + border: solid thin var(--input-border-color) !important; + background-color: var(--input-background-color); + &:focus { + background-color: var(--input-background-color) !important; + } + } + + .done-button { + background-color: var(--mel-button-background-color) !important; + border: var(--mel-button-border) !important; + color: var(--mel-button-text-color) !important; + + &:hover { + background-color: var(--mel-button-hover-background-color) !important; + } + } + .input-group-code .input-group-append { + border: solid thin var(--input-border-color) !important; + background-color: var(--input-background-color); + color: var(--input-mel-text-color); + + &:hover { + background-color: var(--mel-button-hover-background-color); + } + } } .double-auth-modal-progress { - display: flex; - justify-content: center; - margin-top: 25px; - padding-left: 2rem; - - .progress-point { - width: 30px; - height: 7px; - background-color: #eee; - border-radius: 50px; - margin: 0 5px; - } + display: flex; + justify-content: center; + margin-top: 25px; + padding-left: 2rem; + + .progress-point { + width: 30px; + height: 7px; + background-color: #eee; + border-radius: 50px; + margin: 0 5px; + } - .active { - background-color: #5c5cff; - color: #fff; - } + .active { + background-color: #5c5cff; + color: #fff; + } } .ui-dialog .ui-dialog-content { - margin-bottom: 10px; + margin-bottom: 10px; } .cursor-help { - cursor: help; + cursor: help; } html:not(.touch) .listing li > a:focus, html:not(.touch) .listing.focus tbody tr.focused > td:first-child, html:not(.touch) - .listing.focus:not(.withselection) - tbody - tr.focused - > td.selection - + td, + .listing.focus:not(.withselection) + tbody + tr.focused + > td.selection + + td, .menu a:not(.disabled):focus { - border-top-left-radius: 0 !important; - border-bottom-left-radius: 0 !important; + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; } bnum-separate { - width: 100%; - height: 1px; - background-color: var(--main-border-color); - display: block; + width: 100%; + height: 1px; + background-color: var(--main-border-color); + display: block; } .square-item { - border: solid thin var(--main-border-color); - border-radius: 5px; + border: solid thin var(--main-border-color); + border-radius: 5px; - &.px25 { - width: 25px; - height: 25px; - } + &.px25 { + width: 25px; + height: 25px; + } } .mel-button.no-button-margin.no-margin-button.btn.btn-block-mel.btn-secondary.btn-mel { - min-height: 160px; - width: 100%; - margin-right: 15px; - border-radius: 5px; + min-height: 160px; + width: 100%; + margin-right: 15px; + border-radius: 5px; - &:first-of-type { - margin-left: 15px; - } + &:first-of-type { + margin-left: 15px; + } - .btn-txt { - display: block; - } + .btn-txt { + display: block; + } - bnum-icon { - margin-right: 0px; - font-size: 60px; - margin-bottom: 20px; - display: block; - } + bnum-icon { + margin-right: 0px; + font-size: 60px; + margin-bottom: 20px; + display: block; + } } .mel-button { - & > span.plus { - margin-left: 40px; - - &::before { - /* font-size: 15px; */ - display: inline-block; - vertical-align: middle; - margin-bottom: 3px; - } - } + & > span.plus { + margin-left: 40px; + + &::before { + /* font-size: 15px; */ + display: inline-block; + vertical-align: middle; + margin-bottom: 3px; + } + } - & > .plus { - &:extend(.mel-button > span.plus); + & > .plus { + &:extend(.mel-button > span.plus); - &::before { - &:extend(.mel-button > span.plus::before); - } - } + &::before { + &:extend(.mel-button > span.plus::before); + } + } } .input-mel.border-bottom-input { - border: none; - background: transparent; - border-radius: 0; - padding: 0; - border-bottom: solid thin var(--main-border-color-transparent); - height: 30px; - - &.forced-focus, - &:focus { - box-shadow: none; - border-color: var(--mel-button-border-color) !important; - color: var(--input-mel-text-color) !important; - } - - input { - border: none; - background: transparent; - color: var(--input-text-color) !important; - width: 100%; - height: 99%; - padding: 0; - - &:focus { - border: none !important; - box-shadow: none !important; - background: transparent !important; - } - } + border: none; + background: transparent; + border-radius: 0; + padding: 0; + border-bottom: solid thin var(--main-border-color-transparent); + height: 30px; + + &.forced-focus, + &:focus { + box-shadow: none; + border-color: var(--mel-button-border-color) !important; + color: var(--input-mel-text-color) !important; + } + + input { + border: none; + background: transparent; + color: var(--input-text-color) !important; + width: 100%; + height: 99%; + padding: 0; + + &:focus { + border: none !important; + box-shadow: none !important; + background: transparent !important; + } + } } .input-mel.large-input { - font-size: 21px; - height: 35px; + font-size: 21px; + height: 35px; } .event-subtitle { - font-size: 16px; - font-weight: bold; - color: var(--main-text-color); + font-size: 16px; + font-weight: bold; + color: var(--main-text-color); } .border-bottom-input-icon { - width: 100%; - position: relative; + width: 100%; + position: relative; } .border-bottom-input-button { - position: absolute; - right: -5px; - top: 0px; - border-radius: 100%; - background: none; - border: none; - color: var(--main-text-color); - - &:hover, - &:active { - color: var(--main-text-color) !important; - background: none !important; - box-shadow: none !important; - border-color: none !important; - } - - &:focus { - background: none !important; - box-shadow: none !important; - border-color: none !important; - } + position: absolute; + right: -5px; + top: 0px; + border-radius: 100%; + background: none; + border: none; + color: var(--main-text-color); + + &:hover, + &:active { + color: var(--main-text-color) !important; + background: none !important; + box-shadow: none !important; + border-color: none !important; + } + + &:focus { + background: none !important; + box-shadow: none !important; + border-color: none !important; + } } .icon-weight-400 { - font-variation-settings: 'wght' 400; + font-variation-settings: 'wght' 400; } .icon-weight-300 { - font-variation-settings: 'wght' 300; + font-variation-settings: 'wght' 300; } .close-button { - color: var(--default-placeholder-text-color); - - &:hover, - &:active { - color: red !important; - } + color: var(--default-placeholder-text-color); - &.for-attendee { - color: var(--main-text-color); - background-color: transparent !important; - border: none !important; - height: unset; - padding: 0; + &:hover, + &:active { + color: red !important; + } - bnum-icon { - &:extend(.icon-weight-400); - font-size: 16px; - vertical-align: middle; - } - } + &.for-attendee { + color: var(--main-text-color); + background-color: transparent !important; + border: none !important; + height: unset; + padding: 0; + + bnum-icon { + &:extend(.icon-weight-400); + font-size: 16px; + vertical-align: middle; + } + } } #update-sensivity { - background: none; - border: none; - color: var(--input-mel-text-color); - margin-top: 4px; + background: none; + border: none; + color: var(--input-mel-text-color); + margin-top: 4px; } .button-icon-hover:hover { - span { - font-variation-settings: 'FILL' 1; - } + span { + font-variation-settings: 'FILL' 1; + } } .button-icon-hover:focus, .button-icon-hover:active, .button-icon-hover:active:focus { - box-shadow: none !important; + box-shadow: none !important; } .icon-front-col { - display: flex; - align-items: center; - margin-right: 10px; - color: var(--input-mel-text-color); + display: flex; + align-items: center; + margin-right: 10px; + color: var(--input-mel-text-color); } .no-icon-front-col { - margin-left: 31px; + margin-left: 31px; } .input-mel-color { - color: var(--input-mel-text-color); + color: var(--input-mel-text-color); } .relative { - position: relative; + position: relative; } .icon-datepicker { - height: 30px; + height: 30px; - .input-mel { - width: 12em !important; - } + .input-mel { + width: 12em !important; + } - span { - position: absolute; - top: 4px; - right: 19px; - } + span { + position: absolute; + top: 4px; + right: 19px; + } } .datetime .hour-select { - width: 120px !important; + width: 120px !important; } .mel-show-attendee { - display: flex; - flex-wrap: wrap; + display: flex; + flex-wrap: wrap; } .mel-attendee { - white-space: nowrap; - max-width: 155px; - min-height: 26px; - background-color: #f0f0f0; - border-radius: 60px; - padding: 1px 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; - display: flex; - align-items: center; - cursor: move; - - .availability { - height: 24px; - - .availabilityicon { - margin: 0; - display: inline-block; - vertical-align: middle; - - &::before { - content: '\e836'; - font-variation-settings: 'FILL' 1; - font-family: 'Material Symbols Outlined'; - font-weight: normal !important; - margin: 0; - font-size: 16px !important; - vertical-align: sub; - } - - &.loading { - &::before { - content: '\e917'; - } - } - - &.unknown { - &::before { - content: '\e887'; - } - } - } - } - - .attendee-name { - overflow: hidden; - text-overflow: ellipsis; - width: 100%; - color: var(--main-text-color); - } + white-space: nowrap; + max-width: 155px; + min-height: 26px; + background-color: #f0f0f0; + border-radius: 60px; + padding: 1px 5px; + margin-right: 5px; + margin-top: 5px; + margin-bottom: 5px; + display: flex; + align-items: center; + cursor: move; + + .availability { + height: 24px; + + .availabilityicon { + margin: 0; + display: inline-block; + vertical-align: middle; + + &::before { + content: '\e836'; + font-variation-settings: 'FILL' 1; + font-family: 'Material Symbols Outlined'; + font-weight: normal !important; + margin: 0; + font-size: 16px !important; + vertical-align: sub; + } + + &.loading { + &::before { + content: '\e917'; + } + } + + &.unknown { + &::before { + content: '\e887'; + } + } + } + } + + .attendee-name { + overflow: hidden; + text-overflow: ellipsis; + width: 100%; + color: var(--main-text-color); + } } .mel-show-attendee-container { - display: flex; + display: flex; } .no-background { - color: var(--input-button-text-color); - border: none !important; - background: none !important; - padding: 0; - - &:hover, - &:active { - color: var(--input-button-hover-text-color) !important; - background: none !important; - // box-shadow: none !important; - border-color: none !important; - } - - &:focus { - background: none !important; - // box-shadow: none !important; - border-color: none !important; - } + color: var(--input-button-text-color); + border: none !important; + background: none !important; + padding: 0; + + &:hover, + &:active { + color: var(--input-button-hover-text-color) !important; + background: none !important; + // box-shadow: none !important; + border-color: none !important; + } + + &:focus { + background: none !important; + // box-shadow: none !important; + border-color: none !important; + } } .mel-guest-drag-started { - input { - box-shadow: 0 0 0 0.2rem green; - } + input { + box-shadow: 0 0 0 0.2rem green; + } } div.all-day { - div.relative { - width: 100%; - } + div.relative { + width: 100%; + } - input.input-mel { - width: 100% !important; + input.input-mel { + width: 100% !important; - &#edit-enddate { - width: calc(100% - 34px) !important; - } - } + &#edit-enddate { + width: calc(100% - 34px) !important; + } + } } .event-mel-icon-absolute { - position: absolute; - top: 5px; - right: 10px; + position: absolute; + top: 5px; + right: 10px; } #emel-free-busy { - position: relative; + position: relative; - &.full-power { - min-height: 101px; - } + &.full-power { + min-height: 101px; + } } #preferences-details { - .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle) { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - margin-bottom: 5px; - } - .btn-group-vertical > .btn-group:not(:first-child) > .btn, - .btn-group-vertical > .btn:not(:first-child) { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; - } + .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle) { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + margin-bottom: 5px; + } + .btn-group-vertical > .btn-group:not(:first-child) > .btn, + .btn-group-vertical > .btn:not(:first-child) { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } } .before-margin-right { - &:before { - margin-right: 5px; - } + &:before { + margin-right: 5px; + } } .location-container { - .material-symbols-outlined { - color: var(--input-mel-text-color); - font-variation-settings: 'wght' 300; - } + .material-symbols-outlined { + color: var(--input-mel-text-color); + font-variation-settings: 'wght' 300; + } } .menu { - &.toolbar { - a { - color: var(--calendar-sidebar-header-color); - } - } + &.toolbar { + a { + color: var(--calendar-sidebar-header-color); + } + } } @media screen and (max-width: 480px) { - .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.btn-primary { - color: var(--quit-button-text-color); - } + .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.btn-primary { + color: var(--quit-button-text-color); + } } #layout > div > .header a.button.mel-circle-icon-button { - background: var(--calendar-header-folder-button-background) !important; - border-radius: 100%; - margin: 8px !important; - margin-right: 15px !important; - display: flex; - align-items: center; - justify-content: center; - min-width: 42px; - color: var(--mel-button-text-color) !important; - border: solid thin var(--default-border-color); - - &:hover { - background-color: var(--tierciary-bckg-color) !important; - color: var(--mel-button-text-color) !important; - } - - &:before { - font-size: 16px !important; - margin-top: -2px; - } + background: var(--calendar-header-folder-button-background) !important; + border-radius: 100%; + margin: 8px !important; + margin-right: 15px !important; + display: flex; + align-items: center; + justify-content: center; + min-width: 42px; + color: var(--mel-button-text-color) !important; + border: solid thin var(--default-border-color); + + &:hover { + background-color: var(--tierciary-bckg-color) !important; + color: var(--mel-button-text-color) !important; + } + + &:before { + font-size: 16px !important; + margin-top: -2px; + } } html.layout-large { - &.hidden-large { - display: none !important; - } + &.hidden-large { + display: none !important; + } } html.layout-phone .task-settings.action-edit-folder.formcontainer .formbuttons { - display: block; + display: block; } html.layout-phone .task-mail { - .popover .menu { - .dropbutton a.dropdown { - background: transparent; - } - - li a[aria-haspopup].dropdown::after { - color: var(--popover-text-color); - } - } + .popover .menu { + .dropbutton a.dropdown { + background: transparent; + } + + li a[aria-haspopup].dropdown::after { + color: var(--popover-text-color); + } + } } .wlp_box, .wlp_contents { - border: none; + border: none; } -.wsp-block-calendar{ - position:relative; +.wsp-block-calendar { + position: relative; } .qrcode_frame { box-shadow: var(--secondary-box-shadow); border-radius: 5px; padding: 15px; + border: 1px solid var(--alt-default-border-color); + + img { + border-radius: 5px; + } } -input[type="date"]::-webkit-calendar-picker-indicator { - filter: brightness(0) saturate(100%) invert(22%) sepia(19%) saturate(1076%) hue-rotate(195deg) brightness(93%) contrast(93%); +input[type='date']::-webkit-calendar-picker-indicator { + filter: brightness(0) saturate(100%) invert(22%) sepia(19%) saturate(1076%) + hue-rotate(195deg) brightness(93%) contrast(93%); } html.dark-mode-custom { - input[type="date"]::-webkit-calendar-picker-indicator { - filter: brightness(0) saturate(100%) invert(80%) sepia(47%) saturate(262%) hue-rotate(358deg) brightness(93%) contrast(89%); + input[type='date']::-webkit-calendar-picker-indicator { + filter: brightness(0) saturate(100%) invert(80%) sepia(47%) saturate(262%) + hue-rotate(358deg) brightness(93%) contrast(89%); + } +} + +.download_app { + margin: 0; + font-weight: bold; +} + +.material-symbols-outlined { + &.clock-loader { + &.animate { + &::before { + content: ''; + animation: materialsymbolclockanimate 1s infinite; + } + } + } +} + +.menu { + a { + &.alpha-sort-icon { + &::before { + ._material-icon() !important; + content: '\e053'; + } + } + } +} + +@media screen and (max-width: 904px) { + .ui-dialog { + width: 100% !important; + height: 100% !important; + display: flex; + flex-direction: column; + border: 0; + top: 0 !important; // for Chrome + + .ui-resizable-handle, + .ui-dialog-titlebar-close { + display: block !important; + } + } +} + +.boxwarning { + .custom-switch { + .custom-control-label { + color: var(--modal-title-color); + } } -} \ No newline at end of file +} + +.task-mel_metapage { + #eventfreebusy { + height: 100% !important; + } +} diff --git a/skins/mel_elastic/styles/less/variables/apps-colors.less b/skins/mel_elastic/styles/less/variables/apps-colors.less index 9c86faa54..0ee1ba064 100644 --- a/skins/mel_elastic/styles/less/variables/apps-colors.less +++ b/skins/mel_elastic/styles/less/variables/apps-colors.less @@ -1,18 +1,19 @@ // out: false -@BUREAU_COLOR: #A26859; -@MAIL_COLOR: #00A95F; +@BUREAU_COLOR: #a26859; +@MAIL_COLOR: #00a95f; @CALENDAR_COLOR: #009081; @STOCKAGE_COLOR: #009099; -@ADDRESSBOOK_COLOR: #465F9D; -@VISIO_COLOR: #417DC4; -@PARAPHEUR_COLOR: #A558A0; -@CHAT_COLOR: #E18B76; -@WORKSPACE_COLOR: #CE614A; -@SONDAGE_COLOR: #C8AA39; -@RIZOMO_COLOR: #E4794A; -@WEKAN_COLOR: #D1B781; -@USEFUL_LINKS_COLOR: #BD987A; -@TASKS_COLOR: #FFC29E; +@ADDRESSBOOK_COLOR: #465f9d; +@VISIO_COLOR: #417dc4; +@PARAPHEUR_COLOR: #a558a0; +@CHAT_COLOR: #e18b76; +@WORKSPACE_COLOR: #ce614a; +@SONDAGE_COLOR: #c8aa39; +@RIZOMO_COLOR: #e4794a; +@WEKAN_COLOR: #d1b781; +@USEFUL_LINKS_COLOR: #bd987a; +@TASKS_COLOR: #ffc29e; @SETTINGS_COLOR: #808080; @NEWS_COLOR: #466964; -@NOTES_COLOR: #DDB435; \ No newline at end of file +@NOTES_COLOR: #ddb435; +@TCHAP_COLOR: #000091; diff --git a/skins/mel_elastic/styles/less/variables/apps.less b/skins/mel_elastic/styles/less/variables/apps.less index f942b789f..4490f899c 100644 --- a/skins/mel_elastic/styles/less/variables/apps.less +++ b/skins/mel_elastic/styles/less/variables/apps.less @@ -1,15 +1,17 @@ // out: false -@apps: mail, calendar, stockage, addressbook, visio, parapheur, chat, workspace, sondage, rizomo, wekan, useful_links, bureau, settings, news, tasks, notes; +@apps: mail, calendar, stockage, addressbook, visio, parapheur, chat, workspace, + sondage, rizomo, wekan, useful_links, bureau, settings, news, tasks, notes, + tchap; .update-app-color(@name, @color:'') { - @named_color: e('@{name}_color'); - @truecolor: if((@color = ''), @@named_color, @color); + @named_color: e('@{name}_color'); + @truecolor: if((@color = ''), @@named_color, @color); - --@{name}-app-color: @truecolor; + --@{name}-app-color: @truecolor; } .update-each-app-color(@color) { - each(@apps, { + each(@apps, { .update-app-color(@value, @color); }); -} \ No newline at end of file +} diff --git a/skins/mel_elastic/styles/root.css b/skins/mel_elastic/styles/root.css index 40cc70c55..b22abcaca 100644 --- a/skins/mel_elastic/styles/root.css +++ b/skins/mel_elastic/styles/root.css @@ -203,7 +203,7 @@ --layout-sidebar-text-color: var(--secondary-text-color); --layout-sidebar-header-text-color: var(--layout-sidebar-text-color); --layout-list-background-color: var(--tierciary-bckg-color); - --layout-list-header-background-color: red; + --layout-list-header-background-color: var(--layout-list-background-color); --layout-list-text-color: var(--secondary-text-color); --layout-list-header-text-color: var(--layout-list-text-color); --layout-content-background-color: var(--default-background); @@ -244,23 +244,24 @@ --calendar-list-item-switch-tick-stroke: 1px var(--calendar-list-item-switch-tick-stroke-color); --calendar-widget-header-background-color: var(--alternate-bckg-color-2); --calendar-widget-header-text-color: var(--secondary-text-color); - --mail-app-color: #00A95F; + --mail-app-color: #00a95f; --calendar-app-color: #009081; --stockage-app-color: #009099; - --addressbook-app-color: #465F9D; - --visio-app-color: #417DC4; - --parapheur-app-color: #A558A0; - --chat-app-color: #E18B76; - --workspace-app-color: #CE614A; - --sondage-app-color: #C8AA39; - --rizomo-app-color: #E4794A; - --wekan-app-color: #D1B781; - --useful_links-app-color: #BD987A; - --bureau-app-color: #A26859; + --addressbook-app-color: #465f9d; + --visio-app-color: #417dc4; + --parapheur-app-color: #a558a0; + --chat-app-color: #e18b76; + --workspace-app-color: #ce614a; + --sondage-app-color: #c8aa39; + --rizomo-app-color: #e4794a; + --wekan-app-color: #d1b781; + --useful_links-app-color: #bd987a; + --bureau-app-color: #a26859; --settings-app-color: #808080; --news-app-color: #466964; - --tasks-app-color: #FFC29E; - --notes-app-color: #DDB435; + --tasks-app-color: #ffc29e; + --notes-app-color: #ddb435; + --tchap-app-color: #000091; } @media screen and (min-width: 1578px) { :root { diff --git a/skins/mel_elastic/styles/style.css b/skins/mel_elastic/styles/style.css index 0100f8028..07524820f 100644 --- a/skins/mel_elastic/styles/style.css +++ b/skins/mel_elastic/styles/style.css @@ -1504,6 +1504,17 @@ body.task-mail .floating-action-buttons { margin-top: 15px; cursor: pointer; } +.btn-group .mel-button { + border-radius: 0; +} +.btn-group .mel-button:first-of-type { + border-top-left-radius: 50px; + border-bottom-left-radius: 50px; +} +.btn-group .mel-button:last-of-type { + border-top-right-radius: 50px; + border-bottom-right-radius: 50px; +} .mel-button.mel-button-block { display: block; } @@ -3143,10 +3154,6 @@ html.dark-mode a.melv2-card-title { .melv2-card-contents li:first-child > div { margin-top: 0; } -.melv2-card .contents li:last-child > div, -.melv2-card-contents li:last-child > div { - margin-bottom: 0; -} .module_Headlines .melv2-card-contents, .module_Mails .melv2-card-contents, .module_My_day .melv2-card-contents { @@ -3426,9 +3433,8 @@ html.dark-mode .module_Links .melv2-card { .module_Links .melv2-card-contents { display: flex; flex-wrap: wrap; - overflow: unset; - height: 260px; - max-height: 260px; + height: auto; + max-height: none; justify-content: center; } .touch .module_Links .melv2-card-contents { @@ -3798,6 +3804,25 @@ html.layout-phone .mv2-app-line { .notes_app.only-current.only-text { color: var(--notes-app-color); } +.tchap_app .mv2-app-icon { + background-color: var(--tchap-app-color); +} +.tchap_app .mv2-app-icon:hover { + background-color: var(--hover-app-color); +} +.tchap_app.only-text .mv2-app-icon { + color: var(--tchap-app-color); +} +.tchap_app.only-current.only-background { + background-color: var(--tchap-app-color); + color: white; +} +.tchap_app.only-current.only-background.can-be-hovered:hover { + background-color: var(--hover-app-color); +} +.tchap_app.only-current.only-text { + color: var(--tchap-app-color); +} html.dark-mode:root { --hover-app-color: #2e2e2e; } @@ -4427,10 +4452,51 @@ html.layout-phone .task-mail .popover .menu li a[aria-haspopup].dropdown::after box-shadow: var(--secondary-box-shadow); border-radius: 5px; padding: 15px; + border: 1px solid var(--alt-default-border-color); } -input[type="date"]::-webkit-calendar-picker-indicator { +.qrcode_frame img { + border-radius: 5px; +} +input[type='date']::-webkit-calendar-picker-indicator { filter: brightness(0) saturate(100%) invert(22%) sepia(19%) saturate(1076%) hue-rotate(195deg) brightness(93%) contrast(93%); } -html.dark-mode-custom input[type="date"]::-webkit-calendar-picker-indicator { +html.dark-mode-custom input[type='date']::-webkit-calendar-picker-indicator { filter: brightness(0) saturate(100%) invert(80%) sepia(47%) saturate(262%) hue-rotate(358deg) brightness(93%) contrast(89%); } +.download_app { + margin: 0; + font-weight: bold; +} +.material-symbols-outlined.clock-loader.animate::before { + content: ''; + animation: materialsymbolclockanimate 1s infinite; +} +.menu a.alpha-sort-icon::before { + font-size: 26px !important; + font-family: 'Material Symbols Outlined' !important; + font-weight: normal !important; + font-variation-settings: 'wght' 300, 'opsz' 48 !important; + font-size: 17px !important; + transform: scale(1.5) !important; + content: '\e053'; +} +@media screen and (max-width: 904px) { + .ui-dialog { + width: 100% !important; + height: 100% !important; + display: flex; + flex-direction: column; + border: 0; + top: 0 !important; + } + .ui-dialog .ui-resizable-handle, + .ui-dialog .ui-dialog-titlebar-close { + display: block !important; + } +} +.boxwarning .custom-switch .custom-control-label { + color: var(--modal-title-color); +} +.task-mel_metapage #eventfreebusy { + height: 100% !important; +} diff --git a/skins/mel_elastic/styles/taskbar.css b/skins/mel_elastic/styles/taskbar.css index 989c904c1..565eeff02 100644 --- a/skins/mel_elastic/styles/taskbar.css +++ b/skins/mel_elastic/styles/taskbar.css @@ -702,6 +702,11 @@ li#menu-small-li #layout-menu.main-nav-cannot-deploy:hover a .inner { display: none!important; } +.layout-phone #layout-menu.main-nav-cannot-deploy:hover a .button-inner, +.layout-phone #layout-menu.main-nav-cannot-deploy:hover a .inner{ + display: flex!important; +} + .tchap { order: 6; diff --git a/skins/mel_elastic/templates/login.html b/skins/mel_elastic/templates/login.html index e37fca168..3a007574d 100644 --- a/skins/mel_elastic/templates/login.html +++ b/skins/mel_elastic/templates/login.html @@ -1,39 +1,82 @@
    -

    - +

    + +

    +
    -
    - - -
    -
    - - - - -
    -
    -
    -
    +
    + +
    +
    + +
    +
    +
    +
    + + + + +
    + +
    + +
    +
    +
    +
    - - - + +
    @@ -59,5 +102,3 @@

    /images/splitter.png /images/watermark.jpg " /> --> - - diff --git a/skins/mel_elastic/themes/hiver/theme.json b/skins/mel_elastic/themes/hiver/theme.json index 8635c5dfb..9d61ad5f5 100644 --- a/skins/mel_elastic/themes/hiver/theme.json +++ b/skins/mel_elastic/themes/hiver/theme.json @@ -1,15 +1,15 @@ { - "parent":"abstract-picture-theme-two-colored", - "id":"season-winter", - "display":"white", - "description":"desc", - "icon":"icon.svg", - "enabled":true, - "style":"style", - "class":"season-winter", - "custom_dark_mode":true, - "order":100, - "saison":"22/09-21/03", - "animation_class":"snow-animation", - "animation_enabled_by_default":true -} \ No newline at end of file + "parent": "abstract-picture-theme-two-colored", + "id": "season-winter", + "display": "white", + "description": "desc", + "icon": "icon.svg", + "enabled": true, + "style": "style", + "class": "season-winter", + "custom_dark_mode": true, + "order": 100, + "saison": "21/12-21/03", + "animation_class": "snow-animation", + "animation_enabled_by_default": true +} diff --git a/skins/mel_elastic/themes/main/style/colors.css b/skins/mel_elastic/themes/main/style/colors.css index c0034b40d..5a00e510f 100644 --- a/skins/mel_elastic/themes/main/style/colors.css +++ b/skins/mel_elastic/themes/main/style/colors.css @@ -1 +1 @@ -:root{--main-bckg-color:#363A5B;--secondary-bckg-color:#2C3054;--tierciary-bckg-color:#484D7A;--default-bckg-color:#FFF;--default-background:var(--default-bckg-color);--button-background-color:#F0F0F0;--warning-color:#FC945A;--card-background-color:#f0f0f0;--active-button-background-color:var(--main-bckg-color);--body-background-color:var(--default-bckg-color);--background-color-dialog-message:rgba(255,255,102,0.25);--disabled-background-color:#828282;--main-text-color:#363A5B;--secondary-text-color:#FFFFFF;--tierciary-text-color:#484D7A;--fourth-text-color:#80D5C6;--input-button-text-color:var(--main-text-color);--header-title-color:var(--main-text-color);--default-text-color:var(--secondary-text-color);--default-placeholder-text-color:#a8a9b8;--hint-text-color:#737677;--active-button-text-color:var(--secondary-text-color);--modal-da-title-text-color:#5C5CFF;--main-border-radius:0;--secondary-border-radius:0;--main-panel-border-radius:0;--main-box-shadow:none;--secondary-box-shadow:0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);--main-margin:0;--space-margin:0;--separate-margin:20px 30px;--sidebar-list-padding:0;--task-list-padding:0;--hover-background-color:rgba(113,117,152,0.5);--secondary-hover-background-color:#f8f9fa;--hover-close-color:red;--list-hover-background-color:var(--secondary-bckg-color);--input-button-hover-text-color:#717598;--addressbook-list-item-text-color:var(--secondary-text-color);--addressbook-list-item-hover-text-color:var(--secondary-text-color);--addressbook-list-item-selected-text-color:var(--secondary-text-color);--addressbook-list-item-hover-background-color:var(--secondary-bckg-color);--addressbook-list-item-selected-background-color:var(--secondary-bckg-color);--addressbook-list-pagenav-background-color:var(--alternative-layout-list-background-color);--badge-background-color:var(--fourth-text-color);--badge-text-color:var(--tierciary-text-color);--barup-search-input-background-color:var(--default-bckg-color);--barup-search-input-border-color:var(--main-border-color);--barup-search-input-text-color:var(--input-button-text-color);--barup-create-button-background-color:var(--main-text-color);--barup-create-button-hover-background-color:var(--tierciary-bckg-color);--barup-icon-color:var(--main-text-color);--barup-icon-color-picture:var(--secondary-text-color);--barup-icon-badge-background-color:#aa3333;--barup-icon-badge-text-color:var(--secondary-text-color);--note-text-color:var(--main-text-color);--main-border-color:var(--main-text-color);--secondary-border-color:#ced4da;--main-separator-border-color:#0000000c;--layout-border:white;--default-border-color:transparent;--layout-list-separate-color:var(--separate);--foldersearchform-searchbar-border-color:var(--default-border-color);--main-border-color-transparent:#363a5b80;--bureau-background-color:var(--default-bckg-color);--bureau-card-background-color:var(--default-bckg-color);--bureau-card-box-shadow:0 4px 15px rgba(0,0,0,0.2);--bureau-card-border-radius:10px;--bureau-card-text-color:var(--main-text-color);--bureau-card-content-background-color:#F8F9FA;--bureau-card-content-hover-background-color:var(--main-bckg-color);--bureau-card-content-hover-text-color:var(--secondary-text-color);--bureau-app-icon-color:var(--secondary-text-color);--bureau-app-text-color:var(--main-text-color);--mel-button-background-color:var(--main-bckg-color);--mel-button-hover-background-color:var(--tierciary-bckg-color);--mel-button-border-color:var(--main-border-color);--mel-button-hover-border-color:var(--tierciary-bckg-color);--mel-button-text-color:var(--default-text-color);--mel-button-hover-text-color:var(--secondary-text-color);--mel-button-active-background-color:var(--tierciary-bckg-color);--mel-button-active-text-color:var(--secondary-text-color);--secondary-mel-button-background-color:var(--button-background-color);--secondary-mel-button-hover-background-color:var(--main-bckg-color);--secondary-mel-button-border-color:var(--secondary-mel-button-background-color);--secondary-mel-button-hover-border-color:var(--main-bckg-color);--secondary-mel-button-text-color:var(--main-text-color);--secondary-mel-button-hover-text-color:var(--secondary-text-color);--mel-button-danger-background-color:var(--warning-color);--mel-button-danger-text-color:var(--secondary-text-color);--mel-button-danger-hover-background-color:#f7ab82;--mel-button-danger-hover-text-color:var(--mel-button-danger-text-color);--mel-button-danger-border-color:transparent;--mel-button-danger-hover-border-color:transparent;--quit-button-background-color:var(--bureau-background-color);--quit-button-hover-background-color:var(--main-bckg-color);--quit-button-border-color:var(--main-border-color);--quit-button-hover-border-color:var(--quit-button-border-color);--quit-button-text-color:var(--main-text-color);--quit-button-hover-text-color:var(--secondary-text-color);--jitsii-input-mel-background-color:var(--input-mel-background-color);--jitsii-mel-button-text-color:var(--mel-button-text-color);--modal-da-button-text-color:var(--modal-da-title-text-color);--modal-da-button-hover-text-color:var(--modal-da-button-text-color);--modal-da-button-background-color:var(--button-background-color);--modal-da-button-hover-background-color:#e1e1ec;--modal-da-next-button-text-color:var(--secondary-text-color);--modal-da-next-button-hover-text-color:var(--modal-da-next-button-text-color);--modal-da-next-button-background-color:var(--modal-da-title-text-color);--modal-da-next-button-hover-background-color:#4c4cbb;--calendar-list-item-hover-background-color:var(--main-bckg-color);--calendar-list-item-selected-background-color:var(--main-bckg-color);--calendar-sidebar-header-bottom-separator-color:var(--secondary-border-color);--calendar-widget-background-color:#31365b;--calendar-widget-text-color:var(--secondary-text-color);--calendar-widget-header-text-color:var(--secondary-text-color);--calendar-widget-header-background-color:#5870bf;--calendar-toolbar-search-icon-color:var(--input-button-text-color);--calendar-toolbar-roundcube-hover-background-color:var(--main-bckg-color);--calendar-table-header:#e3e4ea;--calendar-table-separator-color:var(--calendar-table-header);--calendar-table-text-color:var(--main-text-color);--calendar-table-background-color:var(--body-background-color);--calendar-table-today-background-color:#f2faf9;--calendar-header-folder-button-background:var(--tierciary-bckg-color);--calendar-header-transparent-button-color:var(--default-text-color);--dropdown-menu-background-color:var(--default-bckg-color);--dropdown-menu-text-color:var(--main-text-color);--dropdown-menu-icon-color:var(--secondary-text-color);--dropdown-item-hover-background-color:var(--secondary-hover-background-color);--input-background-color:var(--default-bckg-color);--input-focus-background-color:var(--default-bckg-color);--input-text-color:var(--main-text-color);--input-border-color:var(--secondary-border-color);--input-mel-background-color:var(--button-background-color);--input-mel-focus-background-color:var(--input-mel-background-color);--input-mel-focus-border-color:var(--main-text-color);--input-mel-focus-shadow-color:#C8CDFC59;--input-mel-text-color:var(--main-text-color);--input-mel-border-color:var(--input-mel-background-color);--input-mel-disabled-background-color:#e9ecef;--layout-menu-background-color:var(--secondary-bckg-color);--layout-menu-background-selected-color:var(--tierciary-bckg-color);--layout-menu-background-hover-color:var(--tierciary-bckg-color);--layout-menu-text-color:var(--secondary-text-color);--layout-menu-text-selected-color:var(--secondary-text-color);--layout-menu-text-hover-color:var(--secondary-text-color);--layout-menu-border-top:solid thin var(--main-border-color);--layout-menu-border-right:transparent;--layout-sidebar-background-color:var(--tierciary-bckg-color);--layout-sidebar-background-hover-color:var(--secondary-bckg-color);--layout-sidebar-background-selected-color:var(--secondary-bckg-color);--layout-sidebar-background-hover-selected-color:var(--layout-sidebar-background-selected-color);--layout-sidebar-text-color:var(--secondary-text-color);--layout-sidebar-text-hover-color:var(--secondary-text-color);--layout-sidebar-text-selected-color:var(--secondary-text-color);--layout-sidebar-text-hover-selected-color:var(--layout-sidebar-text-selected-color);--layout-sidebar-border-color:var(--layout-border);--layout-sidebar-border-selected-color:transparent;--primary-layout-sidebar-background-color:var(--main-bckg-color);--primary-layout-sidebar-background-selected-color:var(--secondary-bckg-color);--primary-layout-sidebar-text-color:var(--layout-sidebar-text-color);--layout-list-header-background-color:var(--tierciary-bckg-color);--layout-list-header-background-hover-color:var(--secondary-bckg-color);--layout-list-header-text-color:var(--secondary-text-color);--layout-list-header-text-hover-color:var(--secondary-text-color);--layout-list-header-input-text-color:var(--main-text-color);--layout-list-pagenav-color:var(--secondary-text-color);--layout-list-background-color:var(--layout-list-header-background-color);--alternative-layout-list-background-color:var(--tierciary-bckg-color);--alternative-layout-list-header-background-color:var(--alternative-layout-list-background-color);--alternative-layout-list-header-text-color:var(--secondary-text-color);--alternative-layout-list-text-color:var(--secondary-text-color);--alternative-layout-list-hover-background-color:var(--main-bckg-color);--alternative-layout-list-hover-text-color:var(--secondary-text-color);--layout-content-header-background-color:var(--tierciary-bckg-color);--alternative-layout-content-header-background-color:#f4f4f4;--layout-content-header-background-hover-color:var(--secondary-bckg-color);--layout-content-header-text-color:var(--secondary-text-color);--layout-content-header-text-hover-color:var(--secondary-text-color);--layout-content-text-color:var(--main-text-color);--layout-content-background-color:var(--default-bckg-color);--layout-content-border-left-color:none;--mail-unread-text-color:var(--main-text-color);--mail-unread-flagged-text-color:#15193A;--mail-unread-icon-color:#A8ACC0;--mail-unread-icon-hover-color:#779BD6;--message-list-quick-filter-active-background-color:var(--active-button-background-color);--message-list-quick-filter-active-text-color:var(--secondary-text-color);--message-list-quick-filter-active-border-color:var(--main-border-color);--message-list-quick-filter-hover-background-color:var(--mel-button-hover-background-color);--message-list-quick-filter-text-color:var(--default-text-color);--message-list-quick-filter-hover-text-color:var(--secondary-text-color);--message-list-quick-filter-button-background-color:transparent;--message-list-quick-filter-button-text-color:var(--main-text-color);--message-list-quick-filter-button-border-color:transparent;--message-list-quick-filter-button-hover-background-color:var(--active-button-background-color);--message-list-quick-filter-button-hover-text-color:var(--main-text-color);--message-list-quick-filter-button-hover-border-color:transparent;--message-list-content-row-background-color:#FFFFFF;--message-list-content-row-alternate-background-color:#FAFAFA;--message-list-content-row-background-hover-color:none;--message-list-content-selected-row-background-color:var(--secondary-bckg-color);--message-list-content-selected-row-background-hover-color:var(--secondary-bckg-color);--message-list-content-selected-row-border-color:transparent;--message-list-border-bottom:1px solid var(--message-list-content-border-color);--message-list-unread-border-left:var(--primary-border-color);--mail-quota-widget-text-color:var(--secondary-text-color);--mail-header-button-color:var(--secondary-text-color);--message-list-content-mail-button-color:var(--mail-unread-icon-color);--message-list-content-mail-button-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-button-color:var(--secondary-text-color);--message-list-content-selected-mail-button-hover-color:var(--secondary-text-color);--message-list-content-mail-address-color:var(--mail-unread-text-color);--message-list-content-mail-address-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-address-color:var(--secondary-text-color);--message-list-content-selected-mail-address-hover-color:var(--secondary-text-color);--message-list-content-mail-subject-color:var(--main-text-color);--message-list-content-mail-subject-hover-color:var(--main-text-color);--message-list-content-selected-mail-subject-color:var(--secondary-text-color);--message-list-content-selected-mail-subject-hover-color:var(--secondary-text-color);--message-list-content-hover-shadow:#26283b47;--message-list-content-border-color:#D1D3DD;--layout-content-header-right-border-color:var(--secondary-text-color);--layout-content-contact-address-color:#333;--layout-content-message-partheaders:#fcfcfc;--layout-content-message-partheaders-top-border-color:#f4f4f4;--layout-content-message-partheaders-title:var(--hint-text-color);--layout-content-message-attachment-text-color:var(--layout-content-contact-address-color);--layout-content-message-attachment-size-color:var(--hint-text-color);--modal-background-color:var(--default-bckg-color);--modal-text-color:var(--main-text-color);--modal-title-color:var(--main-text-color);--modal-border:solid thin var(--secondary-border-color);--nav-tabs-background-color:var(--modal-background-color);--nav-tabs-border-bottom-color:#dee2e6;--nav-item-background-color:#dbdbdb;--nav-item-active-background-color:var(--button-background-color);--nav-item-hover-background-color:var(--button-background-color);--nav-item-text-color:var(--main-text-color);--nav-item-active-text-color:var(--nav-item-text-color);--nav-item-hover-text-color:var(--nav-item-text-color);--nav-item-border-bottom:none;--nav-item-active-border-bottom:none;--nav-item-hover-border-bottom:none;--option-menu-title-color:var(--main-text-color);--option-menu-button-background-color:var(--default-bckg-color);--option-menu-button-hover-background-color:var(--hover-background-color);--option-menu-button-text-color:var(--main-text-color);--option-menu-button-border-color:transparent;--option-menu-radio-button-background-color:var(--default-bckg-color);--option-menu-radio-button-hover-background-color:var(--hover-background-color);--option-menu-radio-button-icon-color:var(--main-text-color);--ui-widget-overlay:rgba(44,54,58,0.5);--popover-background-color:var(--default-bckg-color);--popover-hover-background-color:var(--tierciary-bckg-color);--popover-text-color:var(--main-text-color);--popover-hover-text-color:var(--secondary-text-color);--popover-hover-icon-color:var(--secondary-text-color);--popover-box-shadow-color:#f1f3f4;--popover-border-color:#d4dbde;--popover-focus-border-color:#37beff;--popover-icon-color:var(--popover-background-color);--scrollbar-width-moz:thin;--scrollbar-handler-color:#363A5B;--scrollbar-background-color:#A3A7BC;--searchbar-background-color:var(--default-bckg-color);--searchbar-alternate-background-color:var(--default-bckg-color);--searchbar-text-color:var(--input-button-text-color);--searchbar-text-hover-color:var(--secondary-text-color);--searchbar-border-color:transparent;--searchbar-alternate-border-color:var(--main-bckg-color);--foldersearchform-searchbar-background-color:var(--default-bckg-color);--searchmenu-text-color:var(--secondary-text-color);--custom-switch-unchecked-background-color:#e8e8e8;--custom-switch-checked-background-color:var(--tierciary-bckg-color);--custom-switch-unchecked-dot-color:#fff;--custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--custom-switch-border-color:transparent;--alternate-custom-switch-unchecked-background-color:#bfbfbf;--alternate-custom-switch-checked-background-color:var(--tierciary-bckg-color);--alternate-custom-switch-unchecked-dot-color:#fff;--alternate-custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--alternate-custom-switch-border-color:transparent;--mel-tabs-background-color:transparent;--mel-tabs-active-background-color:transparent;--mel-tabs-hover-background-color:var(--hover-background-color);--mel-tabs-text-color:var(--main-text-color);--mel-tabs-active-text-color:#5069BC;--mel-tabs-hover-text-color:null;--tasklist-row-background-color:var(--tierciary-bckg-color);--tasklist-alternate-row-background-color:#52588c;--tasklist-row-hover-background-color:var(--main-bckg-color);--tasklist-row-selected-background-color:var(--main-bckg-color);--tasklist-row-text-color:var(--secondary-text-color);--tasklist-row-selected-text-color:var(--secondary-text-color);--tasklist-row-hover-text-color:var(--secondary-text-color);--tasklist-row-border-color:var(--default-border-color);--workspace-item-background-color:var(--button-background-color);--workspace-separator-color:var(--secondary-border-color);--password-E:#e63e11;--password-D:#ee8100;--password-C:#c19c1f;--password-B:#85bb2f;--password-A:#038141;--folder-background-color:var(--card-background-color);--link-context-menu-hover-background-color:var(--folder-background-color)} \ No newline at end of file +:root{--main-bckg-color:#363A5B;--secondary-bckg-color:#2C3054;--tierciary-bckg-color:#484D7A;--default-bckg-color:#FFF;--default-background:var(--default-bckg-color);--button-background-color:#F0F0F0;--warning-color:#FC945A;--card-background-color:#f0f0f0;--active-button-background-color:var(--main-bckg-color);--body-background-color:var(--default-bckg-color);--background-color-dialog-message:rgba(255,255,102,0.25);--disabled-background-color:#828282;--main-text-color:#363A5B;--secondary-text-color:#FFFFFF;--tierciary-text-color:#484D7A;--fourth-text-color:#80D5C6;--input-button-text-color:var(--main-text-color);--header-title-color:var(--main-text-color);--default-text-color:var(--secondary-text-color);--default-placeholder-text-color:#a8a9b8;--hint-text-color:#737677;--active-button-text-color:var(--secondary-text-color);--modal-da-title-text-color:#5C5CFF;--main-border-radius:0;--secondary-border-radius:0;--main-panel-border-radius:0;--main-box-shadow:none;--secondary-box-shadow:0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);--main-margin:0;--space-margin:0;--separate-margin:20px 30px;--sidebar-list-padding:0;--task-list-padding:0;--hover-background-color:rgba(113,117,152,0.5);--secondary-hover-background-color:#f8f9fa;--hover-close-color:red;--list-hover-background-color:var(--secondary-bckg-color);--input-button-hover-text-color:#717598;--addressbook-list-item-text-color:var(--secondary-text-color);--addressbook-list-item-hover-text-color:var(--secondary-text-color);--addressbook-list-item-selected-text-color:var(--secondary-text-color);--addressbook-list-item-hover-background-color:var(--secondary-bckg-color);--addressbook-list-item-selected-background-color:var(--secondary-bckg-color);--addressbook-list-pagenav-background-color:var(--alternative-layout-list-background-color);--badge-background-color:var(--fourth-text-color);--badge-text-color:var(--tierciary-text-color);--barup-search-input-background-color:var(--default-bckg-color);--barup-search-input-border-color:var(--main-border-color);--barup-search-input-text-color:var(--input-button-text-color);--barup-create-button-background-color:var(--main-text-color);--barup-create-button-hover-background-color:var(--tierciary-bckg-color);--barup-icon-color:var(--main-text-color);--barup-icon-color-picture:var(--secondary-text-color);--barup-icon-badge-background-color:#aa3333;--barup-icon-badge-text-color:var(--secondary-text-color);--note-text-color:var(--main-text-color);--main-border-color:var(--main-text-color);--secondary-border-color:#ced4da;--main-separator-border-color:#0000000c;--layout-border:white;--default-border-color:transparent;--alt-default-border-color:transparent;--layout-list-separate-color:var(--separate);--foldersearchform-searchbar-border-color:var(--default-border-color);--main-border-color-transparent:#363a5b80;--bureau-background-color:var(--default-bckg-color);--bureau-card-background-color:var(--default-bckg-color);--bureau-card-box-shadow:0 4px 15px rgba(0,0,0,0.2);--bureau-card-border-radius:10px;--bureau-card-text-color:var(--main-text-color);--bureau-card-content-background-color:#F8F9FA;--bureau-card-content-hover-background-color:var(--main-bckg-color);--bureau-card-content-hover-text-color:var(--secondary-text-color);--bureau-app-icon-color:var(--secondary-text-color);--bureau-app-text-color:var(--main-text-color);--mel-button-background-color:var(--main-bckg-color);--mel-button-hover-background-color:var(--tierciary-bckg-color);--mel-button-border-color:var(--main-border-color);--mel-button-hover-border-color:var(--tierciary-bckg-color);--mel-button-text-color:var(--default-text-color);--mel-button-hover-text-color:var(--secondary-text-color);--mel-button-active-background-color:var(--tierciary-bckg-color);--mel-button-active-text-color:var(--secondary-text-color);--secondary-mel-button-background-color:var(--button-background-color);--secondary-mel-button-hover-background-color:var(--main-bckg-color);--secondary-mel-button-border-color:var(--secondary-mel-button-background-color);--secondary-mel-button-hover-border-color:var(--main-bckg-color);--secondary-mel-button-text-color:var(--main-text-color);--secondary-mel-button-hover-text-color:var(--secondary-text-color);--mel-button-danger-background-color:var(--warning-color);--mel-button-danger-text-color:var(--secondary-text-color);--mel-button-danger-hover-background-color:#f7ab82;--mel-button-danger-hover-text-color:var(--mel-button-danger-text-color);--mel-button-danger-border-color:transparent;--mel-button-danger-hover-border-color:transparent;--quit-button-background-color:var(--bureau-background-color);--quit-button-hover-background-color:var(--main-bckg-color);--quit-button-border-color:var(--main-border-color);--quit-button-hover-border-color:var(--quit-button-border-color);--quit-button-text-color:var(--main-text-color);--quit-button-hover-text-color:var(--secondary-text-color);--jitsii-input-mel-background-color:var(--input-mel-background-color);--jitsii-mel-button-text-color:var(--mel-button-text-color);--modal-da-button-text-color:var(--modal-da-title-text-color);--modal-da-button-hover-text-color:var(--modal-da-button-text-color);--modal-da-button-background-color:var(--button-background-color);--modal-da-button-hover-background-color:#e1e1ec;--modal-da-next-button-text-color:var(--secondary-text-color);--modal-da-next-button-hover-text-color:var(--modal-da-next-button-text-color);--modal-da-next-button-background-color:var(--modal-da-title-text-color);--modal-da-next-button-hover-background-color:#4c4cbb;--calendar-list-item-hover-background-color:var(--main-bckg-color);--calendar-list-item-selected-background-color:var(--main-bckg-color);--calendar-sidebar-header-bottom-separator-color:var(--secondary-border-color);--calendar-widget-background-color:#31365b;--calendar-widget-text-color:var(--secondary-text-color);--calendar-widget-header-text-color:var(--secondary-text-color);--calendar-widget-header-background-color:#5870bf;--calendar-toolbar-search-icon-color:var(--input-button-text-color);--calendar-toolbar-roundcube-hover-background-color:var(--main-bckg-color);--calendar-table-header:#e3e4ea;--calendar-table-separator-color:var(--calendar-table-header);--calendar-table-text-color:var(--main-text-color);--calendar-table-background-color:var(--body-background-color);--calendar-table-today-background-color:#f2faf9;--calendar-header-folder-button-background:var(--tierciary-bckg-color);--calendar-header-transparent-button-color:var(--default-text-color);--dropdown-menu-background-color:var(--default-bckg-color);--dropdown-menu-text-color:var(--main-text-color);--dropdown-menu-icon-color:var(--secondary-text-color);--dropdown-item-hover-background-color:var(--secondary-hover-background-color);--input-background-color:var(--default-bckg-color);--input-focus-background-color:var(--default-bckg-color);--input-text-color:var(--main-text-color);--input-border-color:var(--secondary-border-color);--input-mel-background-color:var(--button-background-color);--input-mel-focus-background-color:var(--input-mel-background-color);--input-mel-focus-border-color:var(--main-text-color);--input-mel-focus-shadow-color:#C8CDFC59;--input-mel-text-color:var(--main-text-color);--input-mel-border-color:var(--input-mel-background-color);--input-mel-disabled-background-color:#e9ecef;--layout-menu-background-color:var(--secondary-bckg-color);--layout-menu-background-selected-color:var(--tierciary-bckg-color);--layout-menu-background-hover-color:var(--tierciary-bckg-color);--layout-menu-text-color:var(--secondary-text-color);--layout-menu-text-selected-color:var(--secondary-text-color);--layout-menu-text-hover-color:var(--secondary-text-color);--layout-menu-border-top:solid thin var(--main-border-color);--layout-menu-border-right:transparent;--layout-sidebar-background-color:var(--tierciary-bckg-color);--layout-sidebar-background-hover-color:var(--secondary-bckg-color);--layout-sidebar-background-selected-color:var(--secondary-bckg-color);--layout-sidebar-background-hover-selected-color:var(--layout-sidebar-background-selected-color);--layout-sidebar-text-color:var(--secondary-text-color);--layout-sidebar-text-hover-color:var(--secondary-text-color);--layout-sidebar-text-selected-color:var(--secondary-text-color);--layout-sidebar-text-hover-selected-color:var(--layout-sidebar-text-selected-color);--layout-sidebar-border-color:var(--layout-border);--layout-sidebar-border-selected-color:transparent;--primary-layout-sidebar-background-color:var(--main-bckg-color);--primary-layout-sidebar-background-selected-color:var(--secondary-bckg-color);--primary-layout-sidebar-text-color:var(--layout-sidebar-text-color);--layout-list-header-background-color:var(--tierciary-bckg-color);--layout-list-header-background-hover-color:var(--secondary-bckg-color);--layout-list-header-text-color:var(--secondary-text-color);--layout-list-header-text-hover-color:var(--secondary-text-color);--layout-list-header-input-text-color:var(--main-text-color);--layout-list-pagenav-color:var(--secondary-text-color);--layout-list-background-color:var(--layout-list-header-background-color);--alternative-layout-list-background-color:var(--tierciary-bckg-color);--alternative-layout-list-header-background-color:var(--alternative-layout-list-background-color);--alternative-layout-list-header-text-color:var(--secondary-text-color);--alternative-layout-list-text-color:var(--secondary-text-color);--alternative-layout-list-hover-background-color:var(--main-bckg-color);--alternative-layout-list-hover-text-color:var(--secondary-text-color);--layout-content-header-background-color:var(--tierciary-bckg-color);--alternative-layout-content-header-background-color:#f4f4f4;--layout-content-header-background-hover-color:var(--secondary-bckg-color);--layout-content-header-text-color:var(--secondary-text-color);--layout-content-header-text-hover-color:var(--secondary-text-color);--layout-content-text-color:var(--main-text-color);--layout-content-background-color:var(--default-bckg-color);--layout-content-border-left-color:none;--mail-unread-text-color:var(--main-text-color);--mail-unread-flagged-text-color:#15193A;--mail-unread-icon-color:#A8ACC0;--mail-unread-icon-hover-color:#779BD6;--message-list-quick-filter-active-background-color:var(--active-button-background-color);--message-list-quick-filter-active-text-color:var(--secondary-text-color);--message-list-quick-filter-active-border-color:var(--main-border-color);--message-list-quick-filter-hover-background-color:var(--mel-button-hover-background-color);--message-list-quick-filter-text-color:var(--default-text-color);--message-list-quick-filter-hover-text-color:var(--secondary-text-color);--message-list-quick-filter-button-background-color:transparent;--message-list-quick-filter-button-text-color:var(--main-text-color);--message-list-quick-filter-button-border-color:transparent;--message-list-quick-filter-button-hover-background-color:var(--active-button-background-color);--message-list-quick-filter-button-hover-text-color:var(--main-text-color);--message-list-quick-filter-button-hover-border-color:transparent;--message-list-content-row-background-color:#FFFFFF;--message-list-content-row-alternate-background-color:#FAFAFA;--message-list-content-row-background-hover-color:none;--message-list-content-selected-row-background-color:var(--secondary-bckg-color);--message-list-content-selected-row-background-hover-color:var(--secondary-bckg-color);--message-list-content-selected-row-border-color:transparent;--message-list-border-bottom:1px solid var(--message-list-content-border-color);--message-list-unread-border-left:var(--primary-border-color);--mail-quota-widget-text-color:var(--secondary-text-color);--mail-header-button-color:var(--secondary-text-color);--message-list-content-mail-button-color:var(--mail-unread-icon-color);--message-list-content-mail-button-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-button-color:var(--secondary-text-color);--message-list-content-selected-mail-button-hover-color:var(--secondary-text-color);--message-list-content-mail-address-color:var(--mail-unread-text-color);--message-list-content-mail-address-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-address-color:var(--secondary-text-color);--message-list-content-selected-mail-address-hover-color:var(--secondary-text-color);--message-list-content-mail-subject-color:var(--main-text-color);--message-list-content-mail-subject-hover-color:var(--main-text-color);--message-list-content-selected-mail-subject-color:var(--secondary-text-color);--message-list-content-selected-mail-subject-hover-color:var(--secondary-text-color);--message-list-content-hover-shadow:#26283b47;--message-list-content-border-color:#D1D3DD;--layout-content-header-right-border-color:var(--secondary-text-color);--layout-content-contact-address-color:#333;--layout-content-message-partheaders:#fcfcfc;--layout-content-message-partheaders-top-border-color:#f4f4f4;--layout-content-message-partheaders-title:var(--hint-text-color);--layout-content-message-attachment-text-color:var(--layout-content-contact-address-color);--layout-content-message-attachment-size-color:var(--hint-text-color);--modal-background-color:var(--default-bckg-color);--modal-text-color:var(--main-text-color);--modal-title-color:var(--main-text-color);--modal-border:solid thin var(--secondary-border-color);--nav-tabs-background-color:var(--modal-background-color);--nav-tabs-border-bottom-color:#dee2e6;--nav-item-background-color:#dbdbdb;--nav-item-active-background-color:var(--button-background-color);--nav-item-hover-background-color:var(--button-background-color);--nav-item-text-color:var(--main-text-color);--nav-item-active-text-color:var(--nav-item-text-color);--nav-item-hover-text-color:var(--nav-item-text-color);--nav-item-border-bottom:none;--nav-item-active-border-bottom:none;--nav-item-hover-border-bottom:none;--option-menu-title-color:var(--main-text-color);--option-menu-button-background-color:var(--default-bckg-color);--option-menu-button-hover-background-color:var(--hover-background-color);--option-menu-button-text-color:var(--main-text-color);--option-menu-button-border-color:transparent;--option-menu-radio-button-background-color:var(--default-bckg-color);--option-menu-radio-button-hover-background-color:var(--hover-background-color);--option-menu-radio-button-icon-color:var(--main-text-color);--ui-widget-overlay:rgba(44,54,58,0.5);--popover-background-color:var(--default-bckg-color);--popover-hover-background-color:var(--tierciary-bckg-color);--popover-text-color:var(--main-text-color);--popover-hover-text-color:var(--secondary-text-color);--popover-hover-icon-color:var(--secondary-text-color);--popover-box-shadow-color:#f1f3f4;--popover-border-color:#d4dbde;--popover-focus-border-color:#37beff;--popover-icon-color:var(--popover-background-color);--scrollbar-width-moz:thin;--scrollbar-handler-color:#363A5B;--scrollbar-background-color:#A3A7BC;--searchbar-background-color:var(--default-bckg-color);--searchbar-alternate-background-color:var(--default-bckg-color);--searchbar-text-color:var(--input-button-text-color);--searchbar-text-hover-color:var(--secondary-text-color);--searchbar-border-color:transparent;--searchbar-alternate-border-color:var(--main-bckg-color);--foldersearchform-searchbar-background-color:var(--default-bckg-color);--searchmenu-text-color:var(--secondary-text-color);--custom-switch-unchecked-background-color:#e8e8e8;--custom-switch-checked-background-color:var(--tierciary-bckg-color);--custom-switch-unchecked-dot-color:#fff;--custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--custom-switch-border-color:transparent;--alternate-custom-switch-unchecked-background-color:#bfbfbf;--alternate-custom-switch-checked-background-color:var(--tierciary-bckg-color);--alternate-custom-switch-unchecked-dot-color:#fff;--alternate-custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--alternate-custom-switch-border-color:transparent;--mel-tabs-background-color:transparent;--mel-tabs-active-background-color:transparent;--mel-tabs-hover-background-color:var(--hover-background-color);--mel-tabs-text-color:var(--main-text-color);--mel-tabs-active-text-color:#5069BC;--mel-tabs-hover-text-color:null;--tasklist-row-background-color:var(--tierciary-bckg-color);--tasklist-alternate-row-background-color:#52588c;--tasklist-row-hover-background-color:var(--main-bckg-color);--tasklist-row-selected-background-color:var(--main-bckg-color);--tasklist-row-text-color:var(--secondary-text-color);--tasklist-row-selected-text-color:var(--secondary-text-color);--tasklist-row-hover-text-color:var(--secondary-text-color);--tasklist-row-border-color:var(--default-border-color);--workspace-item-background-color:var(--button-background-color);--workspace-separator-color:var(--secondary-border-color);--password-E:#e63e11;--password-D:#ee8100;--password-C:#c19c1f;--password-B:#85bb2f;--password-A:#038141;--folder-background-color:var(--card-background-color);--link-context-menu-hover-background-color:var(--folder-background-color)} \ No newline at end of file diff --git a/skins/mel_elastic/themes/main/style/dark-colors.css b/skins/mel_elastic/themes/main/style/dark-colors.css index b0c2c80f6..da754a91e 100644 --- a/skins/mel_elastic/themes/main/style/dark-colors.css +++ b/skins/mel_elastic/themes/main/style/dark-colors.css @@ -1 +1 @@ -html.dark-mode-custom:root{--main-bckg-color:#1f2933;--secondary-bckg-color:#1f2933;--tierciary-bckg-color:#323f4b;--default-bckg-color:#1f2933;--button-background-color:#E1C58F;--warning-color:#4d0404;--card-background-color:#3e4c59;--active-button-background-color:#E1C58F;--body-background-color:var(--default-bckg-color);--secondary-nav-background-color:#181C28;--background-color-dialog-message:#D7BD8A;--main-text-color:#96b9e7;--secondary-text-color:#c7dfff;--tierciary-text-color:#323f4b;--fourth-text-color:#80d5c6;--input-button-text-color:#E1C58F;--header-title-color:#c5d1d3;--default-text-color:#E1C58F;--default-placeholder-text-color:#96845f;--hint-text-color:#8ba3a7;--active-button-text-color:var(--tierciary-text-color);--main-border-color:var(--default-text-color);--secondary-border-color:#4d6066;--main-separator-border-color:#96b9e71c;--layout-border:var(--secondary-border-color);--default-border-color:var(--main-border-color);--calendar-table-border:#64666e;--main-border-color-transparent:var(--default-text-color);--main-border-radius:0;--secondary-border-radius:0;--main-panel-border-radius:0;--main-box-shadow:none;--main-margin:0;--space-margin:0;--separate-margin:20px 30px;--sidebar-list-padding:0;--task-list-padding:0;--hover-background-color:#2E2E2E;--secondary-hover-background-color:#f8f9fa;--hover-close-color:red;--input-button-hover-text-color:#96845f;--ui-widget-overlay:rgba(0,0,0,0.7);--nav-tabs-background-color:var(--modal-background-color);--nav-tabs-border-bottom-color:transparent;--nav-item-background-color:transparent;--nav-item-active-background-color:var(--button-background-color);--nav-item-hover-background-color:var(--hover-background-color);--nav-item-text-color:var(--default-text-color);--nav-item-active-text-color:var(--tierciary-text-color);--nav-item-hover-text-color:var(--nav-item-text-color);--nav-item-border-bottom:solid thin var(--main-border-color);--nav-item-active-border-bottom:solid thin var(--main-border-color);--nav-item-hover-border-bottom:solid thin var(--main-border-color);--mel-button-background-color:var(--main-bckg-color);--mel-button-hover-background-color:var(--hover-background-color);--mel-button-border-color:var(--main-border-color);--mel-button-hover-border-color:var(--main-border-color);--mel-button-text-color:var(--default-text-color);--mel-button-hover-text-color:var(--default-text-color);--secondary-mel-button-background-color:#374549;--secondary-mel-button-hover-background-color:var(--hover-background-color);--secondary-mel-button-border-color:var(--main-border-color);--secondary-mel-button-hover-border-color:var(--main-border-color);--secondary-mel-button-text-color:var(--header-title-color);--secondary-mel-button-hover-text-color:var(--default-text-color);--mel-button-danger-background-color:var(--warning-color);--mel-button-danger-text-color:var(--default-text-color);--mel-button-danger-hover-background-color:var(--hover-background-color);--mel-button-danger-hover-text-color:var(--mel-button-danger-text-color);--mel-button-danger-border-color:var(--main-border-color);--mel-button-danger-hover-border-color:var(--main-border-color);--quit-button-background-color:var(--bureau-background-color);--quit-button-hover-background-color:var(--hover-background-color);--quit-button-border-color:var(--main-border-color);--quit-button-hover-border-color:var(--quit-button-border-color);--quit-button-text-color:var(--default-text-color);--quit-button-hover-text-color:var(--default-text-color);--jitsii-input-mel-background-color:white;--jitsii-mel-button-text-color:#363A5B;--barup-icon-color:var(--input-button-text-color);--barup-icon-color-picture:var(--input-button-text-color);--calendar-list-item-hover-background-color:var(--main-bckg-color);--calendar-list-item-selected-background-color:var(--main-bckg-color);--calendar-sidebar-header-bottom-separator-color:var(--secondary-border-color);--calendar-widget-background-color:#181c28;--calendar-widget-text-color:var(--secondary-text-color);--calendar-widget-header-background-color:var(--card-background-color);--calendar-toolbar-search-icon-color:var(--input-button-text-color);--calendar-table-header:var(--main-bckg-color);--calendar-table-separator-color:var(--calendar-table-header);--calendar-table-text-color:var(--main-text-color);--calendar-table-today-background-color:var(--tierciary-bckg-color);--calendar-header-folder-button-background:var(--barup-search-input-background-color);--calendar-header-transparent-button-color:var(--default-text-color);--searchbar-background-color:transparent;--searchbar-alternate-background-color:var(--tierciary-bckg-color);--searchbar-text-color:var(--input-button-text-color);--searchbar-text-hover-color:var(--input-button-text-color);--searchbar-border-color:var(--main-border-color);--searchbar-alternate-border-color:var(--main-border-color);--modal-background-color:var(--default-bckg-color);--modal-text-color:var(--main-text-color);--modal-title-color:var(--header-title-color);--modal-border:solid thin var(--secondary-border-color);--custom-switch-unchecked-background-color:#3e4c59;--custom-switch-checked-background-color:#182633;--custom-switch-unchecked-dot-color:var(--default-text-color);--custom-switch-checked-dot-color:var(--default-text-color);--custom-switch-border-color:var(--main-border-color);--alternate-custom-switch-unchecked-background-color:#bfbfbf;--alternate-custom-switch-checked-background-color:var(--main-bckg-color);--alternate-custom-switch-unchecked-dot-color:#fff;--alternate-custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--alternate-custom-switch-border-color:transparent;--workspace-item-background-color:var(--card-background-color);--workspace-separator-color:var(--secondary-border-color);--layout-sidebar-background-color:var(--tierciary-bckg-color);--layout-sidebar-background-hover-color:var(--secondary-bckg-color);--layout-sidebar-background-selected-color:transparent;--layout-sidebar-background-hover-selected-color:var(--layout-sidebar-background-selected-color);--layout-sidebar-text-color:var(--secondary-text-color);--layout-sidebar-text-hover-color:var(--secondary-text-color);--layout-sidebar-text-selected-color:var(--default-text-color);--layout-sidebar-text-hover-selected-color:var(--layout-sidebar-text-selected-color);--layout-sidebar-border-color:var(--secondary-border-color);--layout-sidebar-border-selected-color:var(--main-border-color);--primary-layout-sidebar-background-color:var(--tierciary-bckg-color);--primary-layout-sidebar-background-selected-color:var(--card-background-color);--primary-layout-sidebar-text-color:var(--layout-sidebar-text-color);--input-background-color:var(--default-bckg-color);--input-focus-background-color:var(--default-bckg-color);--input-text-color:var(--main-text-color);--input-border-color:var(--secondary-border-color);--input-mel-background-color:transparent;--input-mel-focus-background-color:transparent;--input-mel-focus-border-color:var(--main-border-color);--input-mel-focus-shadow:#C8CDFC59;--input-mel-text-color:var(--default-text-color);--input-mel-border-color:var(--main-border-color);--input-mel-disabled-background-color:#2b3946;--layout-menu-border-top:solid thin transparent;--layout-menu-border-right:solid thin var(--secondary-border-color);--layout-content-header-background-color:var(--tierciary-bckg-color);--alternative-layout-content-header-background-color:var(--tierciary-bckg-color);--layout-content-header-background-hover-color:var(--secondary-bckg-color);--layout-content-header-text-color:var(--secondary-text-color);--layout-content-header-text-hover-color:var(--secondary-text-color);--layout-content-background-color:var(--default-bckg-color);--layout-content-text-color:var(--layout-list-header-text-color);--layout-list-header-background-color:var(--tierciary-bckg-color);--layout-list-header-background-hover-color:var(--secondary-bckg-color);--layout-list-header-text-color:var(--secondary-text-color);--layout-list-header-text-hover-color:var(--secondary-text-color);--layout-list-header-input-text-color:var(--main-text-color);--mail-header-layout-list-background-color:var(--tierciary-bckg-color);--alternative-layout-list-background-color:#3e4c59;--alternative-layout-list-header-text-color:#fff;--alternative-layout-list-header-background-color:var(--alternative-layout-list-background-color);--layout-content-header-right-border-color:var(--secondary-border-color);--layout-content-contact-address-color:var(--main-text-color);--layout-content-message-partheaders:#374549;--layout-content-message-partheaders-top-border-color:transparent;--layout-content-message-partheaders-title:var(--header-title-color);--layout-content-message-attachment-text-color:var(--layout-content-message-partheaders-title);--layout-content-message-attachment-size-color:var(--hint-text-color);--message-list-quick-filter-active-background-color:var(--active-button-background-color);--message-list-quick-filter-active-text-color:var(--tierciary-text-color);--message-list-quick-filter-active-border-color:var(--main-border-color);--message-list-quick-filter-hover-background-color:var(--mel-button-hover-background-color);--message-list-quick-filter-text-color:var(--default-text-color);--message-list-quick-filter-hover-text-color:var(--default-text-color);--message-list-quick-filter-button-background-color:transparent;--message-list-quick-filter-button-text-color:var(--default-text-color);--message-list-quick-filter-button-border-color:transparent;--message-list-quick-filter-button-hover-background-color:var(--hover-background-color);--message-list-quick-filter-button-hover-text-color:var(--default-text-color);--message-list-quick-filter-button-hover-border-color:transparent;--mail-header-button-color:var(--secondary-text-color);--tasklist-row-background-color:#3e4c59;--tasklist-alternate-row-background-color:#4b5c6c;--option-menu-title-color:var(--main-text-color);--option-menu-button-background-color:var(--default-bckg-color);--option-menu-button-hover-background-color:var(--hover-background-color);--option-menu-button-text-color:var(--default-text-color);--option-menu-button-border-color:var(--default-text-color);--bureau-card-background-color:var(--tierciary-bckg-color);--bureau-card-box-shadow:0 4px 15px rgba(0,0,0,0.2);--bureau-card-border-radius:10px;--bureau-card-content-background-color:var(--card-background-color);--bureau-card-text-color:var(--secondary-text-color);--barup-search-input-background-color:#181c28;--barup-create-button-background-color:var(--barup-search-input-background-color);--note-text-color:var(--tierciary-text-color);--barup-create-button-hover-background-color:#2E2E2E;--dropdown-menu-background-color:#25323e;--dropdown-menu-text-color:var(--main-text-color);--dropdown-menu-icon-color:var(--secondary-text-color);--dropdown-item-hover-background-color:var(--tierciary-bckg-color);--popover-background-color:#161b1d;--popover-hover-background-color:var(--tierciary-bckg-color);--popover-text-color:var(--secondary-text-color);--popover-hover-text-color:var(--secondary-text-color);--popover-box-shadow-color:transparent;--popover-border-color:#8b9fa7;--popover-focus-border-color:#37beff;--popover-icon-color:var(--popover-border-color);--mail-unread-text-color:var(--main-text-color);--mail-unread-flagged-text-color:#96b9e7;--mail-unread-icon-color:var(--main-text-color);--mail-unread-icon-hover-color:var(--default-text-color);--message-list-content-row-background-color:var(--main-bckg-color);--message-list-content-row-alternate-background-color:#1a222b;--message-list-content-row-background-hover-color:none;--message-list-content-selected-row-background-color:var(--secondary-bckg-color);--message-list-border-bottom:1px solid #2c373a;--message-list-unread-border-left:var(--primary-border-color);--message-list-content-mail-button-color:var(--mail-unread-icon-color);--message-list-content-mail-button-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-button-color:var(--default-text-color);--message-list-content-selected-mail-button-hover-color:var(--default-text-color);--message-list-content-mail-address-color:var(--mail-unread-text-color);--message-list-content-mail-address-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-address-color:var(--default-text-color);--message-list-content-selected-mail-address-hover-color:var(--default-text-color);--message-list-content-mail-subject-color:var(--secondary-text-color);--message-list-content-mail-subject-hover-color:var(--secondary-text-color);--message-list-content-selected-mail-subject-color:var(--default-text-color);--message-list-content-selected-mail-subject-hover-color:var(--default-text-color);--message-list-content-hover-shadow:#8FABE147;--message-list-content-border-color:#D1D3DD;--scrollbar-handler-color:var(--default-text-color);--scrollbar-background-color:var(--hover-background-color);--folder-background-color:var(--card-background-color);--link-context-menu-hover-background-color:var(--bureau-card-content-hover-background-color)} \ No newline at end of file +html.dark-mode-custom:root{--main-bckg-color:#1f2933;--secondary-bckg-color:#1f2933;--tierciary-bckg-color:#323f4b;--default-bckg-color:#1f2933;--button-background-color:#e1c58f;--warning-color:#4d0404;--card-background-color:#3e4c59;--active-button-background-color:#e1c58f;--body-background-color:var(--default-bckg-color);--secondary-nav-background-color:#181c28;--background-color-dialog-message:#d7bd8a;--main-text-color:#96b9e7;--secondary-text-color:#c7dfff;--tierciary-text-color:#323f4b;--fourth-text-color:#80d5c6;--input-button-text-color:#e1c58f;--header-title-color:#c5d1d3;--default-text-color:#e1c58f;--default-placeholder-text-color:#96845f;--hint-text-color:#8ba3a7;--active-button-text-color:var(--tierciary-text-color);--main-border-color:var(--default-text-color);--secondary-border-color:#4d6066;--main-separator-border-color:#96b9e71c;--layout-border:var(--secondary-border-color);--default-border-color:var(--main-border-color);--alt-default-border-color:var(--main-text-color);--calendar-table-border:#64666e;--main-border-color-transparent:var(--default-text-color);--main-border-radius:0;--secondary-border-radius:0;--main-panel-border-radius:0;--main-box-shadow:none;--main-margin:0;--space-margin:0;--separate-margin:20px 30px;--sidebar-list-padding:0;--task-list-padding:0;--hover-background-color:#2e2e2e;--secondary-hover-background-color:#f8f9fa;--hover-close-color:red;--input-button-hover-text-color:#96845f;--ui-widget-overlay:rgba(0,0,0,0.7);--nav-tabs-background-color:var(--modal-background-color);--nav-tabs-border-bottom-color:transparent;--nav-item-background-color:transparent;--nav-item-active-background-color:var(--button-background-color);--nav-item-hover-background-color:var(--hover-background-color);--nav-item-text-color:var(--default-text-color);--nav-item-active-text-color:var(--tierciary-text-color);--nav-item-hover-text-color:var(--nav-item-text-color);--nav-item-border-bottom:solid thin var(--main-border-color);--nav-item-active-border-bottom:solid thin var(--main-border-color);--nav-item-hover-border-bottom:solid thin var(--main-border-color);--mel-button-background-color:var(--main-bckg-color);--mel-button-hover-background-color:var(--hover-background-color);--mel-button-border-color:var(--main-border-color);--mel-button-hover-border-color:var(--main-border-color);--mel-button-text-color:var(--default-text-color);--mel-button-hover-text-color:var(--default-text-color);--secondary-mel-button-background-color:#374549;--secondary-mel-button-hover-background-color:var(--hover-background-color);--secondary-mel-button-border-color:var(--main-border-color);--secondary-mel-button-hover-border-color:var(--main-border-color);--secondary-mel-button-text-color:var(--header-title-color);--secondary-mel-button-hover-text-color:var(--default-text-color);--mel-button-danger-background-color:var(--warning-color);--mel-button-danger-text-color:var(--default-text-color);--mel-button-danger-hover-background-color:var(--hover-background-color);--mel-button-danger-hover-text-color:var(--mel-button-danger-text-color);--mel-button-danger-border-color:var(--main-border-color);--mel-button-danger-hover-border-color:var(--main-border-color);--quit-button-background-color:var(--bureau-background-color);--quit-button-hover-background-color:var(--hover-background-color);--quit-button-border-color:var(--main-border-color);--quit-button-hover-border-color:var(--quit-button-border-color);--quit-button-text-color:var(--default-text-color);--quit-button-hover-text-color:var(--default-text-color);--jitsii-input-mel-background-color:white;--jitsii-mel-button-text-color:#363a5b;--barup-icon-color:var(--input-button-text-color);--barup-icon-color-picture:var(--input-button-text-color);--calendar-list-item-hover-background-color:var(--main-bckg-color);--calendar-list-item-selected-background-color:var(--main-bckg-color);--calendar-sidebar-header-bottom-separator-color:var(--secondary-border-color);--calendar-widget-background-color:#181c28;--calendar-widget-text-color:var(--secondary-text-color);--calendar-widget-header-background-color:var(--card-background-color);--calendar-toolbar-search-icon-color:var(--input-button-text-color);--calendar-table-header:var(--main-bckg-color);--calendar-table-separator-color:var(--calendar-table-header);--calendar-table-text-color:var(--main-text-color);--calendar-table-today-background-color:var(--tierciary-bckg-color);--calendar-header-folder-button-background:var(--barup-search-input-background-color);--calendar-header-transparent-button-color:var(--default-text-color);--searchbar-background-color:transparent;--searchbar-alternate-background-color:var(--tierciary-bckg-color);--searchbar-text-color:var(--input-button-text-color);--searchbar-text-hover-color:var(--input-button-text-color);--searchbar-border-color:var(--main-border-color);--searchbar-alternate-border-color:var(--main-border-color);--modal-background-color:var(--default-bckg-color);--modal-text-color:var(--main-text-color);--modal-title-color:var(--header-title-color);--modal-border:solid thin var(--secondary-border-color);--custom-switch-unchecked-background-color:#3e4c59;--custom-switch-checked-background-color:#182633;--custom-switch-unchecked-dot-color:var(--default-text-color);--custom-switch-checked-dot-color:var(--default-text-color);--custom-switch-border-color:var(--main-border-color);--alternate-custom-switch-unchecked-background-color:#bfbfbf;--alternate-custom-switch-checked-background-color:var(--main-bckg-color);--alternate-custom-switch-unchecked-dot-color:#fff;--alternate-custom-switch-checked-dot-color:var(--custom-switch-unchecked-dot-color);--alternate-custom-switch-border-color:transparent;--workspace-item-background-color:var(--card-background-color);--workspace-separator-color:var(--secondary-border-color);--layout-sidebar-background-color:var(--tierciary-bckg-color);--layout-sidebar-background-hover-color:var(--secondary-bckg-color);--layout-sidebar-background-selected-color:transparent;--layout-sidebar-background-hover-selected-color:var(--layout-sidebar-background-selected-color);--layout-sidebar-text-color:var(--secondary-text-color);--layout-sidebar-text-hover-color:var(--secondary-text-color);--layout-sidebar-text-selected-color:var(--default-text-color);--layout-sidebar-text-hover-selected-color:var(--layout-sidebar-text-selected-color);--layout-sidebar-border-color:var(--secondary-border-color);--layout-sidebar-border-selected-color:var(--main-border-color);--primary-layout-sidebar-background-color:var(--tierciary-bckg-color);--primary-layout-sidebar-background-selected-color:var(--card-background-color);--primary-layout-sidebar-text-color:var(--layout-sidebar-text-color);--input-background-color:var(--default-bckg-color);--input-focus-background-color:var(--default-bckg-color);--input-text-color:var(--main-text-color);--input-border-color:var(--secondary-border-color);--input-mel-background-color:transparent;--input-mel-focus-background-color:transparent;--input-mel-focus-border-color:var(--main-border-color);--input-mel-focus-shadow:#c8cdfc59;--input-mel-text-color:var(--default-text-color);--input-mel-border-color:var(--main-border-color);--input-mel-disabled-background-color:#2b3946;--layout-menu-border-top:solid thin transparent;--layout-menu-border-right:solid thin var(--secondary-border-color);--layout-content-header-background-color:var(--tierciary-bckg-color);--alternative-layout-content-header-background-color:var(--tierciary-bckg-color);--layout-content-header-background-hover-color:var(--secondary-bckg-color);--layout-content-header-text-color:var(--secondary-text-color);--layout-content-header-text-hover-color:var(--secondary-text-color);--layout-content-background-color:var(--default-bckg-color);--layout-content-text-color:var(--layout-list-header-text-color);--layout-list-header-background-color:var(--tierciary-bckg-color);--layout-list-header-background-hover-color:var(--secondary-bckg-color);--layout-list-header-text-color:var(--secondary-text-color);--layout-list-header-text-hover-color:var(--secondary-text-color);--layout-list-header-input-text-color:var(--main-text-color);--mail-header-layout-list-background-color:var(--tierciary-bckg-color);--alternative-layout-list-background-color:#3e4c59;--alternative-layout-list-header-text-color:#fff;--alternative-layout-list-header-background-color:var(--alternative-layout-list-background-color);--layout-content-header-right-border-color:var(--secondary-border-color);--layout-content-contact-address-color:var(--main-text-color);--layout-content-message-partheaders:#374549;--layout-content-message-partheaders-top-border-color:transparent;--layout-content-message-partheaders-title:var(--header-title-color);--layout-content-message-attachment-text-color:var(--layout-content-message-partheaders-title);--layout-content-message-attachment-size-color:var(--hint-text-color);--message-list-quick-filter-active-background-color:var(--active-button-background-color);--message-list-quick-filter-active-text-color:var(--tierciary-text-color);--message-list-quick-filter-active-border-color:var(--main-border-color);--message-list-quick-filter-hover-background-color:var(--mel-button-hover-background-color);--message-list-quick-filter-text-color:var(--default-text-color);--message-list-quick-filter-hover-text-color:var(--default-text-color);--message-list-quick-filter-button-background-color:transparent;--message-list-quick-filter-button-text-color:var(--default-text-color);--message-list-quick-filter-button-border-color:transparent;--message-list-quick-filter-button-hover-background-color:var(--hover-background-color);--message-list-quick-filter-button-hover-text-color:var(--default-text-color);--message-list-quick-filter-button-hover-border-color:transparent;--mail-header-button-color:var(--secondary-text-color);--tasklist-row-background-color:#3e4c59;--tasklist-alternate-row-background-color:#4b5c6c;--option-menu-title-color:var(--main-text-color);--option-menu-button-background-color:var(--default-bckg-color);--option-menu-button-hover-background-color:var(--hover-background-color);--option-menu-button-text-color:var(--default-text-color);--option-menu-button-border-color:var(--default-text-color);--bureau-card-background-color:var(--tierciary-bckg-color);--bureau-card-box-shadow:0 4px 15px rgba(0,0,0,0.2);--bureau-card-border-radius:10px;--bureau-card-content-background-color:var(--card-background-color);--bureau-card-text-color:var(--secondary-text-color);--barup-search-input-background-color:#181c28;--barup-create-button-background-color:var(--barup-search-input-background-color);--note-text-color:var(--tierciary-text-color);--barup-create-button-hover-background-color:#2e2e2e;--dropdown-menu-background-color:#25323e;--dropdown-menu-text-color:var(--main-text-color);--dropdown-menu-icon-color:var(--secondary-text-color);--dropdown-item-hover-background-color:var(--tierciary-bckg-color);--popover-background-color:#161b1d;--popover-hover-background-color:var(--tierciary-bckg-color);--popover-text-color:var(--secondary-text-color);--popover-hover-text-color:var(--secondary-text-color);--popover-box-shadow-color:transparent;--popover-border-color:#8b9fa7;--popover-focus-border-color:#37beff;--popover-icon-color:var(--popover-border-color);--mail-unread-text-color:var(--main-text-color);--mail-unread-flagged-text-color:#96b9e7;--mail-unread-icon-color:var(--main-text-color);--mail-unread-icon-hover-color:var(--default-text-color);--message-list-content-row-background-color:var(--main-bckg-color);--message-list-content-row-alternate-background-color:#1a222b;--message-list-content-row-background-hover-color:none;--message-list-content-selected-row-background-color:var(--secondary-bckg-color);--message-list-border-bottom:1px solid #2c373a;--message-list-unread-border-left:var(--primary-border-color);--listbox-text-color:#96b9e7;--message-list-content-mail-button-color:var(--mail-unread-icon-color);--message-list-content-mail-button-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-button-color:var(--default-text-color);--message-list-content-selected-mail-button-hover-color:var(--default-text-color);--message-list-content-mail-address-color:var(--mail-unread-text-color);--message-list-content-mail-address-hover-color:var(--mail-unread-text-color);--message-list-content-selected-mail-address-color:var(--default-text-color);--message-list-content-selected-mail-address-hover-color:var(--default-text-color);--message-list-content-mail-subject-color:var(--secondary-text-color);--message-list-content-mail-subject-hover-color:var(--secondary-text-color);--message-list-content-selected-mail-subject-color:var(--default-text-color);--message-list-content-selected-mail-subject-hover-color:var(--default-text-color);--message-list-content-hover-shadow:#8fabe147;--message-list-content-border-color:#d1d3dd;--scrollbar-handler-color:var(--default-text-color);--scrollbar-background-color:var(--hover-background-color);--folder-background-color:var(--card-background-color);--link-context-menu-hover-background-color:var(--bureau-card-content-hover-background-color)}html.dark-mode input[type='time']::-webkit-calendar-picker-indicator,html.dark-mode-custom input[type='time']::-webkit-calendar-picker-indicator{color-scheme:dark} \ No newline at end of file diff --git a/skins/mel_elastic/themes/main/style/less/colors.less b/skins/mel_elastic/themes/main/style/less/colors.less index 786b5091d..e2b0dfffd 100644 --- a/skins/mel_elastic/themes/main/style/less/colors.less +++ b/skins/mel_elastic/themes/main/style/less/colors.less @@ -82,6 +82,7 @@ --main-separator-border-color: #0000000c; --layout-border: white; --default-border-color: transparent; + --alt-default-border-color: transparent; --layout-list-separate-color:var(--separate); --foldersearchform-searchbar-border-color:var(--default-border-color); --main-border-color-transparent: #363a5b80; diff --git a/skins/mel_elastic/themes/main/style/less/dark-colors.less b/skins/mel_elastic/themes/main/style/less/dark-colors.less index 1b87ba408..984e87b10 100644 --- a/skins/mel_elastic/themes/main/style/less/dark-colors.less +++ b/skins/mel_elastic/themes/main/style/less/dark-colors.less @@ -4,22 +4,22 @@ html.dark-mode-custom:root { --secondary-bckg-color: #1f2933; --tierciary-bckg-color: #323f4b; --default-bckg-color: #1f2933; - --button-background-color: #E1C58F; + --button-background-color: #e1c58f; --warning-color: #4d0404; --card-background-color: #3e4c59; - --active-button-background-color: #E1C58F; + --active-button-background-color: #e1c58f; --body-background-color: var(--default-bckg-color); - --secondary-nav-background-color:#181C28; - --background-color-dialog-message: #D7BD8A; - + --secondary-nav-background-color: #181c28; + --background-color-dialog-message: #d7bd8a; + //Main text colors --main-text-color: #96b9e7; --secondary-text-color: #c7dfff; --tierciary-text-color: #323f4b; --fourth-text-color: #80d5c6; - --input-button-text-color: #E1C58F; + --input-button-text-color: #e1c58f; --header-title-color: #c5d1d3; - --default-text-color: #E1C58F; + --default-text-color: #e1c58f; --default-placeholder-text-color: #96845f; --hint-text-color: #8ba3a7; --active-button-text-color: var(--tierciary-text-color); @@ -30,36 +30,37 @@ html.dark-mode-custom:root { --main-separator-border-color: #96b9e71c; --layout-border: var(--secondary-border-color); --default-border-color: var(--main-border-color); + --alt-default-border-color: var(--main-text-color); --calendar-table-border: #64666e; --main-border-color-transparent: var(--default-text-color); - //Main border radius - --main-border-radius: 0px; - --secondary-border-radius: 0px; - --main-panel-border-radius: 0; - - //Main box shadow - --main-box-shadow: none; - - //Main margin - --main-margin: 0px; - --space-margin: 0px; - --separate-margin: 20px 30px; - - //Padding - --sidebar-list-padding: 0; - --task-list-padding: 0px; + //Main border radius + --main-border-radius: 0px; + --secondary-border-radius: 0px; + --main-panel-border-radius: 0; + + //Main box shadow + --main-box-shadow: none; + + //Main margin + --main-margin: 0px; + --space-margin: 0px; + --separate-margin: 20px 30px; + + //Padding + --sidebar-list-padding: 0; + --task-list-padding: 0px; //Hover - --hover-background-color: #2E2E2E; + --hover-background-color: #2e2e2e; --secondary-hover-background-color: #f8f9fa; --hover-close-color: red; --input-button-hover-text-color: #96845f; //Overlay - --ui-widget-overlay: rgba(0, 0, 0, .7); + --ui-widget-overlay: rgba(0, 0, 0, 0.7); - //Nav tabs + //Nav tabs --nav-tabs-background-color: var(--modal-background-color); --nav-tabs-border-bottom-color: transparent; @@ -103,15 +104,17 @@ html.dark-mode-custom:root { --quit-button-hover-text-color: var(--default-text-color); --jitsii-input-mel-background-color: white; - --jitsii-mel-button-text-color: #363A5B; + --jitsii-mel-button-text-color: #363a5b; --barup-icon-color: var(--input-button-text-color); --barup-icon-color-picture: var(--input-button-text-color); - - //Calendar + + //Calendar --calendar-list-item-hover-background-color: var(--main-bckg-color); --calendar-list-item-selected-background-color: var(--main-bckg-color); - --calendar-sidebar-header-bottom-separator-color: var(--secondary-border-color); + --calendar-sidebar-header-bottom-separator-color: var( + --secondary-border-color + ); --calendar-widget-background-color: #181c28; --calendar-widget-text-color: var(--secondary-text-color); @@ -124,8 +127,10 @@ html.dark-mode-custom:root { --calendar-table-text-color: var(--main-text-color); --calendar-table-today-background-color: var(--tierciary-bckg-color); - --calendar-header-folder-button-background: var(--barup-search-input-background-color); - --calendar-header-transparent-button-color:var(--default-text-color); + --calendar-header-folder-button-background: var( + --barup-search-input-background-color + ); + --calendar-header-transparent-button-color: var(--default-text-color); //Searchbar --searchbar-background-color: transparent; @@ -151,28 +156,35 @@ html.dark-mode-custom:root { --alternate-custom-switch-unchecked-background-color: #bfbfbf; --alternate-custom-switch-checked-background-color: var(--main-bckg-color); --alternate-custom-switch-unchecked-dot-color: #fff; - --alternate-custom-switch-checked-dot-color: var(--custom-switch-unchecked-dot-color); + --alternate-custom-switch-checked-dot-color: var( + --custom-switch-unchecked-dot-color + ); --alternate-custom-switch-border-color: transparent; - //Workspace + //Workspace --workspace-item-background-color: var(--card-background-color); --workspace-separator-color: var(--secondary-border-color); - //Layout sidebar --layout-sidebar-background-color: var(--tierciary-bckg-color); --layout-sidebar-background-hover-color: var(--secondary-bckg-color); --layout-sidebar-background-selected-color: transparent; - --layout-sidebar-background-hover-selected-color: var(--layout-sidebar-background-selected-color); + --layout-sidebar-background-hover-selected-color: var( + --layout-sidebar-background-selected-color + ); --layout-sidebar-text-color: var(--secondary-text-color); --layout-sidebar-text-hover-color: var(--secondary-text-color); --layout-sidebar-text-selected-color: var(--default-text-color); - --layout-sidebar-text-hover-selected-color: var(--layout-sidebar-text-selected-color); + --layout-sidebar-text-hover-selected-color: var( + --layout-sidebar-text-selected-color + ); --layout-sidebar-border-color: var(--secondary-border-color); --layout-sidebar-border-selected-color: var(--main-border-color); --primary-layout-sidebar-background-color: var(--tierciary-bckg-color); - --primary-layout-sidebar-background-selected-color: var(--card-background-color); + --primary-layout-sidebar-background-selected-color: var( + --card-background-color + ); --primary-layout-sidebar-text-color: var(--layout-sidebar-text-color); //Input @@ -184,7 +196,7 @@ html.dark-mode-custom:root { --input-mel-background-color: transparent; --input-mel-focus-background-color: transparent; --input-mel-focus-border-color: var(--main-border-color); - --input-mel-focus-shadow: #C8CDFC59; + --input-mel-focus-shadow: #c8cdfc59; --input-mel-text-color: var(--default-text-color); --input-mel-border-color: var(--main-border-color); --input-mel-disabled-background-color: #2b3946; @@ -195,14 +207,15 @@ html.dark-mode-custom:root { //Layout content --layout-content-header-background-color: var(--tierciary-bckg-color); - --alternative-layout-content-header-background-color: var(--tierciary-bckg-color); + --alternative-layout-content-header-background-color: var( + --tierciary-bckg-color + ); --layout-content-header-background-hover-color: var(--secondary-bckg-color); --layout-content-header-text-color: var(--secondary-text-color); --layout-content-header-text-hover-color: var(--secondary-text-color); --layout-content-background-color: var(--default-bckg-color); --layout-content-text-color: var(--layout-list-header-text-color); - //Layout list --layout-list-header-background-color: var(--tierciary-bckg-color); --layout-list-header-background-hover-color: var(--secondary-bckg-color); @@ -212,11 +225,11 @@ html.dark-mode-custom:root { --mail-header-layout-list-background-color: var(--tierciary-bckg-color); - --alternative-layout-list-background-color: #3e4c59; --alternative-layout-list-header-text-color: #fff; - --alternative-layout-list-header-background-color: var(--alternative-layout-list-background-color); - + --alternative-layout-list-header-background-color: var( + --alternative-layout-list-background-color + ); //Mail --layout-content-header-right-border-color: var(--secondary-border-color); @@ -224,23 +237,32 @@ html.dark-mode-custom:root { --layout-content-message-partheaders: #374549; --layout-content-message-partheaders-top-border-color: transparent; --layout-content-message-partheaders-title: var(--header-title-color); - --layout-content-message-attachment-text-color: var(--layout-content-message-partheaders-title); + --layout-content-message-attachment-text-color: var( + --layout-content-message-partheaders-title + ); --layout-content-message-attachment-size-color: var(--hint-text-color); - - --message-list-quick-filter-active-background-color: var(--active-button-background-color); + --message-list-quick-filter-active-background-color: var( + --active-button-background-color + ); --message-list-quick-filter-active-text-color: var(--tierciary-text-color); --message-list-quick-filter-active-border-color: var(--main-border-color); - --message-list-quick-filter-hover-background-color: var(--mel-button-hover-background-color); + --message-list-quick-filter-hover-background-color: var( + --mel-button-hover-background-color + ); --message-list-quick-filter-text-color: var(--default-text-color); --message-list-quick-filter-hover-text-color: var(--default-text-color); --message-list-quick-filter-button-background-color: transparent; --message-list-quick-filter-button-text-color: var(--default-text-color); --message-list-quick-filter-button-border-color: transparent; - --message-list-quick-filter-button-hover-background-color: var(--hover-background-color); - --message-list-quick-filter-button-hover-text-color: var(--default-text-color); + --message-list-quick-filter-button-hover-background-color: var( + --hover-background-color + ); + --message-list-quick-filter-button-hover-text-color: var( + --default-text-color + ); --message-list-quick-filter-button-hover-border-color: transparent; --mail-header-button-color: var(--secondary-text-color); @@ -266,9 +288,11 @@ html.dark-mode-custom:root { //Barup --barup-search-input-background-color: #181c28; - --barup-create-button-background-color: var(--barup-search-input-background-color); + --barup-create-button-background-color: var( + --barup-search-input-background-color + ); --note-text-color: var(--tierciary-text-color); - --barup-create-button-hover-background-color: #2E2E2E; + --barup-create-button-hover-background-color: #2e2e2e; //Dropdown --dropdown-menu-background-color: #25323e; @@ -295,36 +319,56 @@ html.dark-mode-custom:root { --message-list-content-row-background-color: var(--main-bckg-color); --message-list-content-row-alternate-background-color: #1a222b; --message-list-content-row-background-hover-color: none; - --message-list-content-selected-row-background-color: var(--secondary-bckg-color); + --message-list-content-selected-row-background-color: var( + --secondary-bckg-color + ); --message-list-border-bottom: 1px solid #2c373a; --message-list-unread-border-left: var(--primary-border-color); + --listbox-text-color: #96b9e7; //Mail - msgicon, flags --message-list-content-mail-button-color: var(--mail-unread-icon-color); --message-list-content-mail-button-hover-color: var(--mail-unread-text-color); --message-list-content-selected-mail-button-color: var(--default-text-color); - --message-list-content-selected-mail-button-hover-color: var(--default-text-color); + --message-list-content-selected-mail-button-hover-color: var( + --default-text-color + ); //Mail - address --message-list-content-mail-address-color: var(--mail-unread-text-color); - --message-list-content-mail-address-hover-color: var(--mail-unread-text-color); + --message-list-content-mail-address-hover-color: var( + --mail-unread-text-color + ); --message-list-content-selected-mail-address-color: var(--default-text-color); - --message-list-content-selected-mail-address-hover-color: var(--default-text-color); + --message-list-content-selected-mail-address-hover-color: var( + --default-text-color + ); //Mail - subject, date, size, attachment --message-list-content-mail-subject-color: var(--secondary-text-color); --message-list-content-mail-subject-hover-color: var(--secondary-text-color); --message-list-content-selected-mail-subject-color: var(--default-text-color); - --message-list-content-selected-mail-subject-hover-color: var(--default-text-color); + --message-list-content-selected-mail-subject-hover-color: var( + --default-text-color + ); - --message-list-content-hover-shadow: #8FABE147; - --message-list-content-border-color: #D1D3DD; + --message-list-content-hover-shadow: #8fabe147; + --message-list-content-border-color: #d1d3dd; - //Scrollbar + //Scrollbar --scrollbar-handler-color: var(--default-text-color); --scrollbar-background-color: var(--hover-background-color); - //Useful links - --folder-background-color: var(--card-background-color); - --link-context-menu-hover-background-color : var(--bureau-card-content-hover-background-color); -} \ No newline at end of file + //Useful links + --folder-background-color: var(--card-background-color); + --link-context-menu-hover-background-color: var( + --bureau-card-content-hover-background-color + ); +} + +html.dark-mode, +html.dark-mode-custom { + input[type='time']::-webkit-calendar-picker-indicator { + color-scheme: dark; + } +} diff --git a/skins/mel_elastic/themes/main/style/less/mails.less b/skins/mel_elastic/themes/main/style/less/mails.less index 70fd7000a..40fa5ce36 100644 --- a/skins/mel_elastic/themes/main/style/less/mails.less +++ b/skins/mel_elastic/themes/main/style/less/mails.less @@ -153,6 +153,9 @@ body.task-mail { &.message { &.selected:hover { background-color: var(--message-list-content-selected-row-background-hover-color) !important; + html.dark-mode-custom &{ + background-color: var(--message-list-content-row-background-hover-color) !important; + } } &:hover { diff --git a/skins/mel_elastic/themes/main/style/less/taskbar.less b/skins/mel_elastic/themes/main/style/less/taskbar.less index 957b01b82..d8ecd0563 100644 --- a/skins/mel_elastic/themes/main/style/less/taskbar.less +++ b/skins/mel_elastic/themes/main/style/less/taskbar.less @@ -10,14 +10,15 @@ color: var(--layout-menu-text-color) !important; } - &:focus>span.inner { + &:focus > span.inner { background-color: var(--layout-menu-background-color); border: none; - } &.selected { - background-color: var(--layout-menu-background-selected-color) !important; + background-color: var( + --layout-menu-background-selected-color + ) !important; color: var(--layout-menu-text-selected-color) !important; } @@ -39,13 +40,16 @@ nav.otherapps { color: var(--layout-menu-text-color) !important; } -#taskmenu a.selected:focus, #taskmenu a:focus, #taskmenu .action-buttons a:focus { +#taskmenu a.selected:focus, +#taskmenu a:focus, +#taskmenu .action-buttons a:focus { box-shadow: none; } -.menu a:not(.disabled):focus, .menu a:not(.disabled):hover, +.menu a:not(.disabled):focus, +.menu a:not(.disabled):hover, #layout-menu #taskmenu a:focus > span.inner { - background-color: var(--layout-menu-background-selected-color) !important; + background-color: var(--card-background-color) !important; color: var(--layout-menu-text-selected-color) !important; } #taskmenu a.selected, @@ -57,20 +61,20 @@ nav.otherapps { #otherapps a.selected:hover, #otherapps .action-buttons a:hover, #otherapps a:hover span, -#layout-menu:hover a:hover>span.inner, -#layout-menu.force-open a.force-hover>span.inner, -#layout-menu:hover a.selected>span.inner, -#layout-menu.force-open a.selected>span.inner { +#layout-menu:hover a:hover > span.inner, +#layout-menu.force-open a.force-hover > span.inner, +#layout-menu:hover a.selected > span.inner, +#layout-menu.force-open a.selected > span.inner { background-color: var(--layout-menu-background-hover-color) !important; } -html.touch #layout-menu a>span.inner, -html.touch #layout-menu span>a>span.inner, -#layout-menu:hover a>span.inner, -#layout-menu:hover span>a>span.inner, -#layout-menu.force-open a>span.inner, -#layout-menu.force-open span>a>span.inner, -#layout-menu a:focus>span.inner, -#layout-menu span>a:focus>span.inner { +html.touch #layout-menu a > span.inner, +html.touch #layout-menu span > a > span.inner, +#layout-menu:hover a > span.inner, +#layout-menu:hover span > a > span.inner, +#layout-menu.force-open a > span.inner, +#layout-menu.force-open span > a > span.inner, +#layout-menu a:focus > span.inner, +#layout-menu span > a:focus > span.inner { border-top: var(--layout-menu-border-top); -} \ No newline at end of file +} diff --git a/skins/mel_elastic/themes/main/style/less/theme.less b/skins/mel_elastic/themes/main/style/less/theme.less index 80e592be1..411976e1d 100644 --- a/skins/mel_elastic/themes/main/style/less/theme.less +++ b/skins/mel_elastic/themes/main/style/less/theme.less @@ -11,8 +11,7 @@ body.action-dialog-ui { border-top-color: var(--separate); } -.menu.pagenav.pagenav-list -{ +.menu.pagenav.pagenav-list { border-bottom-color: transparent; } .task-workspace, @@ -32,9 +31,9 @@ body.action-dialog-ui { #layout-list #layout-list-content, #layout-list #messagelist-header, #layout-list #messagelist-content, -#layout-list>.scroller, +#layout-list > .scroller, #layout #layout-content #calendar, -#layout-content>.header, +#layout-content > .header, #layout-content .iframe-wrapper, #layout-content #mel_suggestion_box_option_box { margin: var(--main-margin) !important; @@ -55,14 +54,12 @@ body.action-dialog-ui { } #layout-menu { - #taskmenu a.selected, #taskmenu a:hover { border-radius: var(--layout-menu-border-radius); } } - .mel-button { background-color: var(--mel-button-background-color); border: var(--mel-button-border); @@ -125,21 +122,20 @@ body.action-dialog-ui { } } -ul.treelist li.selected>div>a, -.scroller>.listing li a, -.scroller>.listing li div { +ul.treelist li.selected > div > a, +.scroller > .listing li a, +.scroller > .listing li div { color: var(--layout-sidebar-text-color); } #folderlistbox, -#files-compose-dialog{ - ul.treelist li.selected>div>a, -.scroller>.listing li a, -.scroller>.listing li div -{ - color: var(--main-text-color); -} - li.selected div.treetoggle{ +#files-compose-dialog { + ul.treelist li.selected > div > a, + .scroller > .listing li a, + .scroller > .listing li div { + color: var(--main-text-color); + } + li.selected div.treetoggle { color: var(--secondary-text-color); } } @@ -173,38 +169,37 @@ ul.treelist li.selected>div>a, } .mel-radio-1 { - //Correction checkbox journée entiere pour création d'évèvenement - input[type="checkbox"]+label span::before { + input[type='checkbox'] + label span::before { top: 2px; left: 3px; height: 24px; width: 24px; } - input[type="checkbox"]:checked+label span::before { - content: ""; + input[type='checkbox']:checked + label span::before { + content: ''; top: 2px; right: 3px; left: unset; } span { - background-color: var(--custom-switch-unchecked-background-color) !important; + background-color: var( + --custom-switch-unchecked-background-color + ) !important; border: var(--custom-switch-border) !important; } - input[type="checkbox"]:checked+label span { + input[type='checkbox']:checked + label span { background-color: var(--custom-switch-checked-background-color) !important; - } - input[type="checkbox"]+label span::before { + input[type='checkbox'] + label span::before { background-color: var(--custom-switch-unchecked-dot-color) !important; border-color: var(--custom-switch-unchecked-dot-color) !important; } } - #eventedit .edit-alarm-value, #eventedit .edit-alarm-offset, #eventedit .edit-alarm-related { @@ -214,7 +209,7 @@ ul.treelist li.selected>div>a, &:focus { background-color: var(--input-mel-focus-background-color) !important; - box-shadow: 0 0 0 .2rem var(--input-mel-focus-shadow-color) !important; + box-shadow: 0 0 0 0.2rem var(--input-mel-focus-shadow-color) !important; border-color: var(--input-mel-focus-border-color) !important; } } @@ -223,23 +218,21 @@ ul.treelist li.selected>div>a, color: var(--input-mel-text-color); } -.search>.input-group { - >.form-control { +.search > .input-group { + > .form-control { background-color: var(--barup-search-input-background-color); border-color: var(--barup-search-input-border-color); color: var(--barup-search-input-text-color); &::placeholder { color: var(--default-placeholder-text-color); - } } - >.input-group-append>.input-group-text { + > .input-group-append > .input-group-text { background-color: var(--barup-search-input-background-color); border-color: var(--barup-search-input-border-color); color: var(--barup-search-input-text-color); - } } @@ -266,7 +259,7 @@ ul.treelist li.selected>div>a, color: var(--popover-hover-icon-color); } -.search>.input-group>.task-mail { +.search > .input-group > .task-mail { #layout-sidebar { background-color: var(--layout-sidebar-background-color) !important; } @@ -280,7 +273,7 @@ ul.treelist li.selected>div>a, button { color: var(--barup-icon-color) !important; - .barup-picture &{ + .barup-picture & { --barup-icon-color: var(--barup-icon-color-picture); } } @@ -326,7 +319,8 @@ ul.treelist li.selected>div>a, .dropdown-menu-scroll { scrollbar-width: var(--scrollbar-width-moz) !important; - scrollbar-color: var(--scrollbar-handler-color) var(--scrollbar-background-color); + scrollbar-color: var(--scrollbar-handler-color) + var(--scrollbar-background-color); } } @@ -338,12 +332,12 @@ ul.treelist li.selected>div>a, #folderlist-content { color: var(--layout-sidebar-text-color); - >a.button, - >.listing li a { + > a.button, + > .listing li a { color: var(--layout-sidebar-text-color); } - >a.button:hover { + > a.button:hover { background-color: var(--list-hover-background-color); border-radius: var(--secondary-border-radius); } @@ -366,14 +360,16 @@ ul.treelist li.selected>div>a, border-left: solid thin var(--layout-sidebar-border-selected-color) !important; } - &:hover>a:first-of-type { - background-color: var(--layout-sidebar-background-hover-selected-color); + &:hover > a:first-of-type { + background-color: var( + --layout-sidebar-background-hover-selected-color + ); color: var(--layout-sidebar-text-hover-selected-color); border-left: solid thin var(--layout-sidebar-border-selected-color); &:focus { - border-left: solid thin var(--layout-sidebar-border-selected-color) !important; - + border-left: solid thin + var(--layout-sidebar-border-selected-color) !important; } } @@ -382,7 +378,7 @@ ul.treelist li.selected>div>a, } } - &:hover>a:first-of-type { + &:hover > a:first-of-type { background-color: var(--layout-sidebar-background-hover-color); border-radius: var(--layout-sidebar-item-border-radius); @@ -393,7 +389,7 @@ ul.treelist li.selected>div>a, } } -.bs-popover-bottom>.arrow::after { +.bs-popover-bottom > .arrow::after { border-bottom-color: var(--popover-icon-color); } @@ -418,7 +414,7 @@ ul.treelist li.selected>div>a, #layout-list { background-color: var(--layout-list-background-color); - >.header { + > .header { background-color: var(--layout-list-header-background-color) !important; a.button, @@ -432,7 +428,9 @@ ul.treelist li.selected>div>a, .menu a:not(.disabled):hover, a.toolbar-button.button.icon:not(.disabled):hover, .header a.toolbar-button:hover { - background-color: var(--layout-list-header-background-hover-color) !important; + background-color: var( + --layout-list-header-background-hover-color + ) !important; color: var(--layout-list-header-text-hover-color) !important; } @@ -456,16 +454,15 @@ ul.treelist li.selected>div>a, } } - - #layout-content { - >.header { - + > .header { .menu a:not(.disabled):focus, .menu a:not(.disabled):hover, a.toolbar-button.button.icon:not(.disabled):hover, .header a.toolbar-button:hover { - background-color: var(--layout-content-header-background-hover-color) !important; + background-color: var( + --layout-content-header-background-hover-color + ) !important; color: var(--layout-content-header-text-hover-color) !important; } } @@ -490,13 +487,15 @@ ul.treelist li.selected>div>a, border: var(--secondary-mel-button-hover-border); } &:focus { - background-color: var(--secondary-mel-button-hover-background-color) !important; + background-color: var( + --secondary-mel-button-hover-background-color + ) !important; color: var(--secondary-mel-button-hover-text-color) !important; border: var(--secondary-mel-button-hover-border) !important; } } -#search_row>.input-group>.form-control { +#search_row > .input-group > .form-control { border-right: none; border-bottom-left-radius: 15px; border-top-left-radius: 15px; @@ -505,7 +504,7 @@ ul.treelist li.selected>div>a, color: var(--barup-search-input-text-color); } -#search_row>.input-group>.input-group-append>.input-group-text { +#search_row > .input-group > .input-group-append > .input-group-text { border-bottom-right-radius: 15px; border-top-right-radius: 15px; background-color: var(--barup-search-input-background-color); @@ -535,7 +534,6 @@ ul.treelist li.selected>div>a, &:hover { &:extend(#groupoptions-user .option_radio_wrapper .option:hover); } - } .color-icon { @@ -549,7 +547,9 @@ ul.treelist li.selected>div>a, border: var(--option-menu-button-border) !important; &:hover { - background-color: var(--option-menu-button-hover-background-color) !important; + background-color: var( + --option-menu-button-hover-background-color + ) !important; } } @@ -571,7 +571,7 @@ ul.treelist li.selected>div>a, } } - .custom-control-input:checked~.custom-control-label { + .custom-control-input:checked ~ .custom-control-label { &::before { background-color: var(--alternate-custom-switch-checked-background-color); border: var(--custom-switch-border); @@ -671,23 +671,23 @@ button.btn.mel-tab { } .mel-search-group { - >input { + > input { border: var(--searchbar-border); } - .input-group-append>.input-group-text { + .input-group-append > .input-group-text { border: var(--searchbar-border); background-color: var(--searchbar-background-color); color: var(--searchbar-text-color); } } - p, span, div { scrollbar-width: var(--scrollbar-width-moz) !important; - scrollbar-color: var(--scrollbar-handler-color) var(--scrollbar-background-color) !important; + scrollbar-color: var(--scrollbar-handler-color) + var(--scrollbar-background-color) !important; } .input-group-text { @@ -726,10 +726,11 @@ optgroup { background-color: var(--primary-layout-sidebar-background-color) !important; color: var(--primary-layout-sidebar-text-color) !important; - .scroller>.listing li { - + .scroller > .listing li { &.selected { - background-color: var(--primary-layout-sidebar-background-selected-color) !important; + background-color: var( + --primary-layout-sidebar-background-selected-color + ) !important; } a { @@ -737,24 +738,40 @@ optgroup { } } - >.header { + > .header { &:extend(.task-tasks #layout-sidebar); } } -#layout>div>.header { +#layout > div > .header { background-color: var(--layout-content-header-background-color); color: var(--layout-content-text-color); } #listview-float-right #list-contacts .listsearchbox input, - - .custom-select:disabled { background-color: var(--input-mel-background-color); color: var(--input-mel-text-color); border-color: var(--input-mel-border-color); - opacity: .5; + opacity: 0.5; +} + +.custom-select { + &#edit-calendar, + .compose-headers &, + #eventsimport &, + #eventsexport &, + .action-edit-folder &, + #tasksexport &, + #tasksimport &, + #listoptions-menu & { + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") + no-repeat right 0.75rem center / 8px 10px !important; + html.dark-mode-custom & { + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%2396b9e7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") + no-repeat right 0.75rem center / 8px 10px !important; + } + } } .wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select, @@ -775,6 +792,7 @@ textarea.input-mel, select.input-mel, input.input-mel, #wspf.form-control.input-mel, +.multiselect.form-control.input-mel, .input-group-append > .input-group-text.mel-text { background-color: var(--input-mel-background-color); color: var(--input-mel-text-color); @@ -782,7 +800,7 @@ input.input-mel, &:focus { background-color: var(--input-mel-focus-background-color); - box-shadow: 0 0 0 .2rem var(--input-mel-focus-shadow-color); + box-shadow: 0 0 0 0.2rem var(--input-mel-focus-shadow-color); border-color: var(--input-mel-focus-border-color); } @@ -791,7 +809,7 @@ input.input-mel, } } -.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select{ +.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select { background-color: var(--jitsii-input-mel-background-color); color: var(--jitsii-mel-button-text-color); border-color: var(--input-mel-border-color); @@ -829,7 +847,7 @@ input.input-mel, .menu.toolbar li, #taskmenu a, #otherapps a, -#layout-menu:hover a>span.inner { +#layout-menu:hover a > span.inner { height: 60px !important; } @@ -869,32 +887,32 @@ input.input-mel, } .button.icon.toolbar-button.refresh:focus, -html:not(.touch) #messagelist-header .listing li>a:focus, -html:not(.touch) #layout-content .header .listing li>a:focus { +html:not(.touch) #messagelist-header .listing li > a:focus, +html:not(.touch) #layout-content .header .listing li > a:focus { border-left: none !important; } -.mel-radio-1.radio-small input[type="checkbox"] + label span::before { - height: 11px; - width: 11px; +.mel-radio-1.radio-small input[type='checkbox'] + label span::before { + height: 11px; + width: 11px; } -.mel-radio-1 input[type="checkbox"] + label span::before { - top: 1px; - left: 1px; +.mel-radio-1 input[type='checkbox'] + label span::before { + top: 1px; + left: 1px; } -.mel-radio-1 input[type="checkbox"]:checked + label span::before { - top: 1px; - right: 1px; +.mel-radio-1 input[type='checkbox']:checked + label span::before { + top: 1px; + right: 1px; } -.table{ - color: var(--main-text-color)!important; +.table { + color: var(--main-text-color) !important; } -// html:not(.touch) .listing li > a:focus, -// html:not(.touch) .listing.focus tbody tr.focused > td:first-child, +// html:not(.touch) .listing li > a:focus, +// html:not(.touch) .listing.focus tbody tr.focused > td:first-child, // html:not(.touch) .listing.focus:not(.withselection) tbody tr.focused > td.selection + td { // border-left-color: var(--button-background-color); // } @@ -907,9 +925,10 @@ html body a.filename .attachment-name { color: var(--main-text-color); } -#compose-contacts{ - ul.treelist li.selected > div > a, .scroller > .listing li a, .scroller > .listing li div - { +#compose-contacts { + ul.treelist li.selected > div > a, + .scroller > .listing li a, + .scroller > .listing li div { --layout-sidebar-text-color: var(--main-text-color); } } @@ -919,6 +938,6 @@ html body a.filename .attachment-name { border: 1px solid var(--input-mel-border-color); } -.mel-attendee{ - background-color:var(--card-background-color); -} \ No newline at end of file +.mel-attendee { + background-color: var(--card-background-color); +} diff --git a/skins/mel_elastic/themes/main/style/mails.css b/skins/mel_elastic/themes/main/style/mails.css index 7dc11a5e0..6536587c9 100644 --- a/skins/mel_elastic/themes/main/style/mails.css +++ b/skins/mel_elastic/themes/main/style/mails.css @@ -1 +1 @@ -table.messagelist tr.message span.attachment span::before{color:var(--message-list-content-mail-subject-color)}table.messagelist tr.message .flags{color:var(--message-list-content-mail-address-color)}table.messagelist tr.message.flagged td{color:var(--message-list-content-mail-address-color)}table.messagelist tr.message:hover td.subject span.fromto,table.messagelist tr.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-mail-address-hover-color) !important}table.messagelist tr.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-mail-button-hover-color) !important}table.messagelist tr.message:hover td.subject span.date,table.messagelist tr.message:hover td.subject span.size,table.messagelist tr.message:hover td.subject a{color:var(--message-list-content-mail-subject-hover-color) !important}table.messagelist tr.message:hover span.attachment span::before{color:var(--message-list-content-mail-subject-hover-color)}table.messagelist tr.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-mail-button-hover-color) !important}table.messagelist tr.message td.subject span.fromto{color:var(--message-list-content-mail-address-color) !important}table.messagelist tr.message td.subject span.msgicon::before{color:var(--message-list-content-mail-button-color) !important}table.messagelist tr.message td.subject span.date{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.message td.subject span.size{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.message td.subject a{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.selected.message span.attachment span::before{color:var(--message-list-content-selected-mail-subject-color)}table.messagelist tr.selected.message .flags{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.selected.message.flagged td{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.selected.message:hover td.subject span.fromto,table.messagelist tr.selected.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-selected-mail-address-hover-color) !important}table.messagelist tr.selected.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.selected.message:hover td.subject span.date,table.messagelist tr.selected.message:hover td.subject span.size,table.messagelist tr.selected.message:hover td.subject a{color:var(--message-list-content-selected-mail-subject-hover-color) !important}table.messagelist tr.selected.message:hover span.attachment span::before{color:var(--message-list-content-selected-mail-subject-hover-color)}table.messagelist tr.selected.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.selected.message td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}table.messagelist tr.selected.message td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}table.messagelist tr.selected.message td.subject span.date{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.selected.message td.subject span.size{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.selected.message td.subject a{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message span.attachment span::before{color:var(--message-list-content-selected-mail-subject-color)}table.messagelist tr.contextRow.message .flags{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.contextRow.message.flagged td{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.contextRow.message:hover td.subject span.fromto,table.messagelist tr.contextRow.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-selected-mail-address-hover-color) !important}table.messagelist tr.contextRow.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.contextRow.message:hover td.subject span.date,table.messagelist tr.contextRow.message:hover td.subject span.size,table.messagelist tr.contextRow.message:hover td.subject a{color:var(--message-list-content-selected-mail-subject-hover-color) !important}table.messagelist tr.contextRow.message:hover span.attachment span::before{color:var(--message-list-content-selected-mail-subject-hover-color)}table.messagelist tr.contextRow.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.contextRow.message td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}table.messagelist tr.contextRow.message td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}table.messagelist tr.contextRow.message td.subject span.date{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message td.subject span.size{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message td.subject a{color:var(--message-list-content-selected-mail-subject-color) !important}body.task-mail{background-color:var(--theme-background-color)}.task-mail #layout-content .iframe-wrapper{margin-top:0px !important}.task-mail #layout-list #messagelist-content{border-top-right-radius:0 !important;border-top-left-radius:0 !important;margin-top:0px !important}.task-mail #layout-list .message-list-filter-container{border-radius:var(--main-panel-border-radius) var(--main-panel-border-radius) 0 0;background-color:var(--message-list-quick-filter-background-color)}.task-mail #layout-sidebar .scroller>.listing li.selected a{border-radius:var(--layout-sidebar-selected-item-border-radius)}.task-mail #messagecontframe{border-radius:var(--main-panel-border-radius)}.task-mail #messagelist-content{background-color:var(--message-list-content-row-background-color) !important}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr:nth-child(2n) td{background-color:var(--message-list-content-row-alternate-background-color)}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr:nth-child(2n):hover{background-color:var(--message-list-content-row-background-hover-color)}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr.unread td{background-color:var(--message-list-content-row-background-color)}.task-mail #messagelist-content table.messagelist tr.selected td{background-color:var(--message-list-content-selected-row-background-color) !important}.task-mail #messagelist-content table.messagelist tr.message.selected:hover{background-color:var(--message-list-content-selected-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover{box-shadow:var(--message-list-hover-shadow);background-color:var(--message-list-content-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover td{background-color:var(--message-list-content-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover td.subject span.msgicon.status:hover::before{color:var(--mail-unread-icon-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message td{border-bottom:var(--message-list-border-bottom)}.task-mail #messagelist-content table.messagelist tr.message.selected>td.selection+td{border-left-color:var(--message-list-content-selected-row-border-color) !important}.task-mail #messagelist-content table.messagelist tr.unread td.subject span.msgicon::before{color:var(--message-list-content-mail-address-color) !important}.task-mail #messagelist-content table.messagelist tr.unread.selected td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}.task-mail #messagelist-content table.messagelist tr.flagged td.subject span.fromto{color:var(--mail-unread-flagged-text-color) !important}.task-mail #messagelist-content table.messagelist tr.flagged.selected td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}.task-mail #layout-sidebar,.task-mail #layout-sidebar>.header,.task-mail .upload-form .hint{color:var(--layout-sidebar-text-color) !important}.task-mail #message-list-filters li .quick-filter.active,.task-mail #message-list-filters-extra button.active{background-color:var(--message-list-quick-filter-active-background-color);color:var(--message-list-quick-filter-active-text-color);border-color:var(--message-list-quick-filter-active-border-color)}.task-mail #message-list-filters li .quick-filter:hover{color:var(--message-list-quick-filter-hover-text-color);background-color:var(--message-list-quick-filter-hover-background-color)}.task-mail .message-list-filter-container .mel-filter-more .mel-button{background-color:var(--message-list-quick-filter-button-background-color);color:var(--message-list-quick-filter-button-text-color);border-color:var(--message-list-quick-filter-button-border-color);border-top-right-radius:var(--main-panel-border-radius)}.task-mail .message-list-filter-container .mel-filter-more .mel-button:hover{background-color:var(--message-list-quick-filter-button-hover-background-color);color:var(--message-list-quick-filter-button-hover-text-color);border-color:var(--message-list-quick-filter-button-hover-border-color)}.task-mail .quota-widget,.task-mail .quota-widget .count{color:var(--mail-quota-widget-text-color)}.task-mail #mail-search-border{background-color:var(--searchbar-alternate-background-color)}.task-mail.action-preview #layout-content{background-color:var(--layout-content-background-color) !important}.task-mail #layout-sidebar>.header a.button{color:var(--mail-header-button-color) !important}.task-mail #layout-content>.header{background-color:var(--layout-content-header-background-color) !important}.task-mail #layout-content>.header .parent-close-visu{border-right:var(--layout-content-header-right-border) !important}.task-mail #layout-content>.header #toolbar-menu li a{color:var(--layout-content-header-text-color)}.task-mail #layout-content>.header #toolbar-menu li .dropbutton{background-color:var(--layout-content-header-background-color)}html.layout-phone .task-mail #layout-content>.header .header-title,html.layout-phone .task-mail #layout-content>.header a.button,html.layout-small .task-mail #layout-content>.header .header-title,html.layout-small .task-mail #layout-content>.header a.button{color:var(--mail-header-button-color) !important}.task-mail #layout-content .attachmentslist{background-color:var(--layout-content-message-partheaders);border-top:solid thin var(--layout-content-message-partheaders-top-border-color) !important;border:none}.task-mail #layout-content .attachmentslist a.filename .attachment-name{color:var(--layout-content-message-attachment-text-color)}.task-mail #layout-content .attachmentslist a.filename .attachment-size{color:var(--layout-content-message-attachment-size-color)}.task-mail #layout-content a.rcmContactAddress{color:var(--layout-content-contact-address-color)}.task-mail #layout-content .message-partheaders{background-color:var(--layout-content-message-partheaders);border-top:var(--layout-content-partheaders-top-border)}.task-mail #layout-content .message-partheaders table.headers-table{color:var(--layout-content-message-partheaders-title)}.task-mail #layout-content .recipient-input input{color:var(--input-text-color)}body.task-mail.action-none #layout-content{border-left:var(--layout-content-border-left-color)}.recipient-input .recipient{background-color:var(--mel-button-background-color);color:var(--mel-button-text-color)}.recipient-input .recipient *{color:var(--mel-button-text-color) !important} \ No newline at end of file +table.messagelist tr.message span.attachment span::before{color:var(--message-list-content-mail-subject-color)}table.messagelist tr.message .flags{color:var(--message-list-content-mail-address-color)}table.messagelist tr.message.flagged td{color:var(--message-list-content-mail-address-color)}table.messagelist tr.message:hover td.subject span.fromto,table.messagelist tr.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-mail-address-hover-color) !important}table.messagelist tr.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-mail-button-hover-color) !important}table.messagelist tr.message:hover td.subject span.date,table.messagelist tr.message:hover td.subject span.size,table.messagelist tr.message:hover td.subject a{color:var(--message-list-content-mail-subject-hover-color) !important}table.messagelist tr.message:hover span.attachment span::before{color:var(--message-list-content-mail-subject-hover-color)}table.messagelist tr.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-mail-button-hover-color) !important}table.messagelist tr.message td.subject span.fromto{color:var(--message-list-content-mail-address-color) !important}table.messagelist tr.message td.subject span.msgicon::before{color:var(--message-list-content-mail-button-color) !important}table.messagelist tr.message td.subject span.date{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.message td.subject span.size{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.message td.subject a{color:var(--message-list-content-mail-subject-color) !important}table.messagelist tr.selected.message span.attachment span::before{color:var(--message-list-content-selected-mail-subject-color)}table.messagelist tr.selected.message .flags{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.selected.message.flagged td{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.selected.message:hover td.subject span.fromto,table.messagelist tr.selected.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-selected-mail-address-hover-color) !important}table.messagelist tr.selected.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.selected.message:hover td.subject span.date,table.messagelist tr.selected.message:hover td.subject span.size,table.messagelist tr.selected.message:hover td.subject a{color:var(--message-list-content-selected-mail-subject-hover-color) !important}table.messagelist tr.selected.message:hover span.attachment span::before{color:var(--message-list-content-selected-mail-subject-hover-color)}table.messagelist tr.selected.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.selected.message td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}table.messagelist tr.selected.message td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}table.messagelist tr.selected.message td.subject span.date{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.selected.message td.subject span.size{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.selected.message td.subject a{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message span.attachment span::before{color:var(--message-list-content-selected-mail-subject-color)}table.messagelist tr.contextRow.message .flags{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.contextRow.message.flagged td{color:var(--message-list-content-selected-mail-address-color)}table.messagelist tr.contextRow.message:hover td.subject span.fromto,table.messagelist tr.contextRow.message:hover td.subject span.msgicon.status::before{color:var(--message-list-content-selected-mail-address-hover-color) !important}table.messagelist tr.contextRow.message:hover td.subject span.msgicon.status:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.contextRow.message:hover td.subject span.date,table.messagelist tr.contextRow.message:hover td.subject span.size,table.messagelist tr.contextRow.message:hover td.subject a{color:var(--message-list-content-selected-mail-subject-hover-color) !important}table.messagelist tr.contextRow.message:hover span.attachment span::before{color:var(--message-list-content-selected-mail-subject-hover-color)}table.messagelist tr.contextRow.message:hover td.flags span.flagged:hover::before{color:var(--message-list-content-selected-mail-button-hover-color) !important}table.messagelist tr.contextRow.message td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}table.messagelist tr.contextRow.message td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}table.messagelist tr.contextRow.message td.subject span.date{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message td.subject span.size{color:var(--message-list-content-selected-mail-subject-color) !important}table.messagelist tr.contextRow.message td.subject a{color:var(--message-list-content-selected-mail-subject-color) !important}body.task-mail{background-color:var(--theme-background-color)}.task-mail #layout-content .iframe-wrapper{margin-top:0px !important}.task-mail #layout-list #messagelist-content{border-top-right-radius:0 !important;border-top-left-radius:0 !important;margin-top:0px !important}.task-mail #layout-list .message-list-filter-container{border-radius:var(--main-panel-border-radius) var(--main-panel-border-radius) 0 0;background-color:var(--message-list-quick-filter-background-color)}.task-mail #layout-sidebar .scroller>.listing li.selected a{border-radius:var(--layout-sidebar-selected-item-border-radius)}.task-mail #messagecontframe{border-radius:var(--main-panel-border-radius)}.task-mail #messagelist-content{background-color:var(--message-list-content-row-background-color) !important}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr:nth-child(2n) td{background-color:var(--message-list-content-row-alternate-background-color)}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr:nth-child(2n):hover{background-color:var(--message-list-content-row-background-hover-color)}.task-mail #messagelist-content table.messagelist:not(.threaded) tbody tr.unread td{background-color:var(--message-list-content-row-background-color)}.task-mail #messagelist-content table.messagelist tr.selected td{background-color:var(--message-list-content-selected-row-background-color) !important}.task-mail #messagelist-content table.messagelist tr.message.selected:hover{background-color:var(--message-list-content-selected-row-background-hover-color) !important}html.dark-mode-custom .task-mail #messagelist-content table.messagelist tr.message.selected:hover{background-color:var(--message-list-content-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover{box-shadow:var(--message-list-hover-shadow);background-color:var(--message-list-content-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover td{background-color:var(--message-list-content-row-background-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message:hover td.subject span.msgicon.status:hover::before{color:var(--mail-unread-icon-hover-color) !important}.task-mail #messagelist-content table.messagelist tr.message td{border-bottom:var(--message-list-border-bottom)}.task-mail #messagelist-content table.messagelist tr.message.selected>td.selection+td{border-left-color:var(--message-list-content-selected-row-border-color) !important}.task-mail #messagelist-content table.messagelist tr.unread td.subject span.msgicon::before{color:var(--message-list-content-mail-address-color) !important}.task-mail #messagelist-content table.messagelist tr.unread.selected td.subject span.msgicon::before{color:var(--message-list-content-selected-mail-button-color) !important}.task-mail #messagelist-content table.messagelist tr.flagged td.subject span.fromto{color:var(--mail-unread-flagged-text-color) !important}.task-mail #messagelist-content table.messagelist tr.flagged.selected td.subject span.fromto{color:var(--message-list-content-selected-mail-address-color) !important}.task-mail #layout-sidebar,.task-mail #layout-sidebar>.header,.task-mail .upload-form .hint{color:var(--layout-sidebar-text-color) !important}.task-mail #message-list-filters li .quick-filter.active,.task-mail #message-list-filters-extra button.active{background-color:var(--message-list-quick-filter-active-background-color);color:var(--message-list-quick-filter-active-text-color);border-color:var(--message-list-quick-filter-active-border-color)}.task-mail #message-list-filters li .quick-filter:hover{color:var(--message-list-quick-filter-hover-text-color);background-color:var(--message-list-quick-filter-hover-background-color)}.task-mail .message-list-filter-container .mel-filter-more .mel-button{background-color:var(--message-list-quick-filter-button-background-color);color:var(--message-list-quick-filter-button-text-color);border-color:var(--message-list-quick-filter-button-border-color);border-top-right-radius:var(--main-panel-border-radius)}.task-mail .message-list-filter-container .mel-filter-more .mel-button:hover{background-color:var(--message-list-quick-filter-button-hover-background-color);color:var(--message-list-quick-filter-button-hover-text-color);border-color:var(--message-list-quick-filter-button-hover-border-color)}.task-mail .quota-widget,.task-mail .quota-widget .count{color:var(--mail-quota-widget-text-color)}.task-mail #mail-search-border{background-color:var(--searchbar-alternate-background-color)}.task-mail.action-preview #layout-content{background-color:var(--layout-content-background-color) !important}.task-mail #layout-sidebar>.header a.button{color:var(--mail-header-button-color) !important}.task-mail #layout-content>.header{background-color:var(--layout-content-header-background-color) !important}.task-mail #layout-content>.header .parent-close-visu{border-right:var(--layout-content-header-right-border) !important}.task-mail #layout-content>.header #toolbar-menu li a{color:var(--layout-content-header-text-color)}.task-mail #layout-content>.header #toolbar-menu li .dropbutton{background-color:var(--layout-content-header-background-color)}html.layout-phone .task-mail #layout-content>.header .header-title,html.layout-phone .task-mail #layout-content>.header a.button,html.layout-small .task-mail #layout-content>.header .header-title,html.layout-small .task-mail #layout-content>.header a.button{color:var(--mail-header-button-color) !important}.task-mail #layout-content .attachmentslist{background-color:var(--layout-content-message-partheaders);border-top:solid thin var(--layout-content-message-partheaders-top-border-color) !important;border:none}.task-mail #layout-content .attachmentslist a.filename .attachment-name{color:var(--layout-content-message-attachment-text-color)}.task-mail #layout-content .attachmentslist a.filename .attachment-size{color:var(--layout-content-message-attachment-size-color)}.task-mail #layout-content a.rcmContactAddress{color:var(--layout-content-contact-address-color)}.task-mail #layout-content .message-partheaders{background-color:var(--layout-content-message-partheaders);border-top:var(--layout-content-partheaders-top-border)}.task-mail #layout-content .message-partheaders table.headers-table{color:var(--layout-content-message-partheaders-title)}.task-mail #layout-content .recipient-input input{color:var(--input-text-color)}body.task-mail.action-none #layout-content{border-left:var(--layout-content-border-left-color)}.recipient-input .recipient{background-color:var(--mel-button-background-color);color:var(--mel-button-text-color)}.recipient-input .recipient *{color:var(--mel-button-text-color) !important} \ No newline at end of file diff --git a/skins/mel_elastic/themes/main/style/taskbar.css b/skins/mel_elastic/themes/main/style/taskbar.css index f2ff13069..a89980848 100644 --- a/skins/mel_elastic/themes/main/style/taskbar.css +++ b/skins/mel_elastic/themes/main/style/taskbar.css @@ -1 +1 @@ -#layout-menu{background-color:var(--layout-menu-background-color);border-right:var(--layout-menu-border-right)}#layout-menu #taskmenu a{color:var(--layout-menu-text-color)}#layout-menu #taskmenu a:hover{color:var(--layout-menu-text-color) !important}#layout-menu #taskmenu a:focus>span.inner{background-color:var(--layout-menu-background-color);border:none}#layout-menu #taskmenu a.selected{background-color:var(--layout-menu-background-selected-color) !important;color:var(--layout-menu-text-selected-color) !important}#layout-menu #taskmenu a .roundbadge.lightgreen,#layout-menu #taskmenu a .roundbadge.hover.tick:hover{background-color:var(--badge-background-color);color:var(--badge-text-color)}nav.otherapps{background-color:var(--layout-menu-background-color);border-right:var(--layout-menu-border-right)}#otherapps a{color:var(--layout-menu-text-color) !important}#taskmenu a.selected:focus,#taskmenu a:focus,#taskmenu .action-buttons a:focus{box-shadow:none}.menu a:not(.disabled):focus,.menu a:not(.disabled):hover,#layout-menu #taskmenu a:focus>span.inner{background-color:var(--layout-menu-background-selected-color) !important;color:var(--layout-menu-text-selected-color) !important}#taskmenu a.selected,#taskmenu a:hover,#taskmenu a.selected:hover,#taskmenu .action-buttons a:hover,#otherapps a.selected,#otherapps a:hover,#otherapps a.selected:hover,#otherapps .action-buttons a:hover,#otherapps a:hover span,#layout-menu:hover a:hover>span.inner,#layout-menu.force-open a.force-hover>span.inner,#layout-menu:hover a.selected>span.inner,#layout-menu.force-open a.selected>span.inner{background-color:var(--layout-menu-background-hover-color) !important}html.touch #layout-menu a>span.inner,html.touch #layout-menu span>a>span.inner,#layout-menu:hover a>span.inner,#layout-menu:hover span>a>span.inner,#layout-menu.force-open a>span.inner,#layout-menu.force-open span>a>span.inner,#layout-menu a:focus>span.inner,#layout-menu span>a:focus>span.inner{border-top:var(--layout-menu-border-top)} \ No newline at end of file +#layout-menu{background-color:var(--layout-menu-background-color);border-right:var(--layout-menu-border-right)}#layout-menu #taskmenu a{color:var(--layout-menu-text-color)}#layout-menu #taskmenu a:hover{color:var(--layout-menu-text-color) !important}#layout-menu #taskmenu a:focus>span.inner{background-color:var(--layout-menu-background-color);border:none}#layout-menu #taskmenu a.selected{background-color:var(--layout-menu-background-selected-color) !important;color:var(--layout-menu-text-selected-color) !important}#layout-menu #taskmenu a .roundbadge.lightgreen,#layout-menu #taskmenu a .roundbadge.hover.tick:hover{background-color:var(--badge-background-color);color:var(--badge-text-color)}nav.otherapps{background-color:var(--layout-menu-background-color);border-right:var(--layout-menu-border-right)}#otherapps a{color:var(--layout-menu-text-color) !important}#taskmenu a.selected:focus,#taskmenu a:focus,#taskmenu .action-buttons a:focus{box-shadow:none}.menu a:not(.disabled):focus,.menu a:not(.disabled):hover,#layout-menu #taskmenu a:focus>span.inner{background-color:var(--card-background-color) !important;color:var(--layout-menu-text-selected-color) !important}#taskmenu a.selected,#taskmenu a:hover,#taskmenu a.selected:hover,#taskmenu .action-buttons a:hover,#otherapps a.selected,#otherapps a:hover,#otherapps a.selected:hover,#otherapps .action-buttons a:hover,#otherapps a:hover span,#layout-menu:hover a:hover>span.inner,#layout-menu.force-open a.force-hover>span.inner,#layout-menu:hover a.selected>span.inner,#layout-menu.force-open a.selected>span.inner{background-color:var(--layout-menu-background-hover-color) !important}html.touch #layout-menu a>span.inner,html.touch #layout-menu span>a>span.inner,#layout-menu:hover a>span.inner,#layout-menu:hover span>a>span.inner,#layout-menu.force-open a>span.inner,#layout-menu.force-open span>a>span.inner,#layout-menu a:focus>span.inner,#layout-menu span>a:focus>span.inner{border-top:var(--layout-menu-border-top)} \ No newline at end of file diff --git a/skins/mel_elastic/themes/main/style/theme.css b/skins/mel_elastic/themes/main/style/theme.css index 6b1602d16..37c22c579 100644 --- a/skins/mel_elastic/themes/main/style/theme.css +++ b/skins/mel_elastic/themes/main/style/theme.css @@ -1 +1 @@ -body{background-color:var(--body-background-color)}body.action-dialog-ui{background-color:transparent}#layout>div>.footer{background-color:var(--addressbook-list-pagenav-background-color);border-top-color:var(--separate)}.menu.pagenav.pagenav-list{border-bottom-color:transparent}.task-workspace #layout #layout-content,.task-search #layout #layout-content,.task-useful_links #layout #layout-content,.task-news #layout #layout-content,.task-bureau #layout #layout-content{background-color:var(--bureau-background-color) !important;margin-right:0px !important}.task-settings #layout-list .searchbar.menu,#layout-list .header,#layout-list .pagenav.pagenav-list.menu,#layout-list #layout-list-content,#layout-list #messagelist-header,#layout-list #messagelist-content,#layout-list>.scroller,#layout #layout-content #calendar,#layout-content>.header,#layout-content .iframe-wrapper,#layout-content #mel_suggestion_box_option_box{margin:var(--main-margin) !important;border-radius:var(--main-panel-border-radius) !important;box-shadow:var(--main-box-shadow) !important}#layout-content .content{border-radius:var(--main-panel-border-radius) !important;box-shadow:var(--main-box-shadow) !important;background-color:var(--layout-content-background-color) !important;margin:var(--main-margin) !important;margin-top:0px !important}#layout-sidebar separate{border-top-color:var(--layout-list-separate-color)}#layout-menu #taskmenu a.selected,#layout-menu #taskmenu a:hover{border-radius:var(--layout-menu-border-radius)}.mel-button,.invite-button.create{background-color:var(--mel-button-background-color);border:var(--mel-button-border);color:var(--mel-button-text-color)}.mel-button.inverse{border-color:transparent}.mel-button:hover,.invite-button.create:hover{background-color:var(--mel-button-hover-background-color);border-color:var(--mel-button-hover-border-color);color:var(--mel-button-hover-text-color)}.mel-button.btn-danger{background-color:var(--mel-button-danger-background-color);border-color:var(--mel-button-danger-border-color);color:var(--mel-button-danger-text-color)}.mel-button.btn-danger:hover{background-color:var(--mel-button-danger-hover-background-color);border-color:var(--mel-button-danger-hover-border-color);color:var(--mel-button-danger-hover-text-color)}.mel-button.quit-button,.mel-button.white{background-color:var(--quit-button-background-color);border-color:var(--quit-button-border-color);color:var(--quit-button-text-color)}.mel-button.quit-button:hover,.mel-button.white:hover{background-color:var(--quit-button-hover-background-color);border-color:var(--quit-button-hover-border-color);color:var(--quit-button-hover-text-color)}.mel-button.ignoreActive,.mel-button#showcontacts_edit-attendee-name{background-color:var(--mel-button-background-color) !important;border-color:var(--mel-button-border-color) !important;color:var(--mel-button-text-color) !important}.mel-button.ignoreActive:hover,.mel-button#showcontacts_edit-attendee-name:hover{background-color:var(--mel-button-hover-background-color) !important;border-color:var(--mel-button-hover-border-color) !important;color:var(--mel-button-hover-text-color) !important}ul.treelist li.selected>div>a,.scroller>.listing li a,.scroller>.listing li div{color:var(--layout-sidebar-text-color)}#folderlistbox ul.treelist li.selected>div>a,#files-compose-dialog ul.treelist li.selected>div>a,#folderlistbox .scroller>.listing li a,#files-compose-dialog .scroller>.listing li a,#folderlistbox .scroller>.listing li div,#files-compose-dialog .scroller>.listing li div{color:var(--main-text-color)}#folderlistbox li.selected div.treetoggle,#files-compose-dialog li.selected div.treetoggle{color:var(--secondary-text-color)}#eventedit .nav-tabs{border-bottom:var(--nav-tabs-border-bottom)}#eventedit ul{background-color:var(--nav-tabs-background-color)}#eventedit ul li.nav-item a{background-color:var(--nav-item-background-color);color:var(--nav-item-text-color);border-bottom:var(--nav-item-border-bottom)}#eventedit ul li.nav-item a:hover{background-color:var(--nav-item-hover-background-color);color:var(--nav-item-hover-text-color);border-bottom:var(--nav-item-hover-border-bottom)}#eventedit ul li.nav-item a.active{color:var(--nav-item-active-text-color);background-color:var(--nav-item-active-background-color);border-bottom:var(--nav-item-active-border-bottom)}.mel-radio-1 input[type="checkbox"]+label span::before{top:2px;left:3px;height:24px;width:24px}.mel-radio-1 input[type="checkbox"]:checked+label span::before{content:"";top:2px;right:3px;left:unset}.mel-radio-1 span{background-color:var(--custom-switch-unchecked-background-color) !important;border:var(--custom-switch-border) !important}.mel-radio-1 input[type="checkbox"]:checked+label span{background-color:var(--custom-switch-checked-background-color) !important}.mel-radio-1 input[type="checkbox"]+label span::before{background-color:var(--custom-switch-unchecked-dot-color) !important;border-color:var(--custom-switch-unchecked-dot-color) !important}#eventedit .edit-alarm-value,#eventedit .edit-alarm-offset,#eventedit .edit-alarm-related{background-color:var(--input-mel-background-color) !important;color:var(--input-mel-text-color) !important;border-color:var(--input-mel-border-color) !important}#eventedit .edit-alarm-value:focus,#eventedit .edit-alarm-offset:focus,#eventedit .edit-alarm-related:focus{background-color:var(--input-mel-focus-background-color) !important;box-shadow:0 0 0 .2rem var(--input-mel-focus-shadow-color) !important;border-color:var(--input-mel-focus-border-color) !important}.input-mel-datetime::after{color:var(--input-mel-text-color)}.search>.input-group>.form-control{background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}.search>.input-group>.form-control::placeholder{color:var(--default-placeholder-text-color)}.search>.input-group>.input-group-append>.input-group-text{background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}.custom-file-label:not(.is-invalid){background-color:var(--input-background-color);color:var(--input-text-color);border-color:var(--input-border-color)}.input-group-text{color:var(--header-title-color)}#layout-sidebar{border-right-color:var(--layout-sidebar-border-color) !important}.task-mail #layout-sidebar,.task-calendar #layout-sidebar{background-color:var(--layout-sidebar-background-color) !important}.popover .menu li a[aria-haspopup]:hover::after{color:var(--popover-hover-icon-color)}.search>.input-group>.task-mail #layout-sidebar{background-color:var(--layout-sidebar-background-color) !important}.search>.input-group>.task-mail .quota-widget{color:var(--layout-sidebar-text-color)}#barup-right-buttons button{color:var(--barup-icon-color) !important}.barup-picture #barup-right-buttons button{--barup-icon-color:var(--barup-icon-color-picture)}#barup-right-buttons #notificationunread.active{background-color:var(--barup-icon-badge-background-color);color:var(--barup-icon-badge-text-color)}#barup-right-buttons .dropdown-menu{background-color:var(--dropdown-menu-background-color);color:var(--dropdown-menu-text-color)}#barup-right-buttons .dropdown-menu::after{border-bottom-color:var(--dropdown-menu-background-color)}#barup-right-buttons .dropdown-menu .blue-color,#barup-right-buttons .dropdown-menu .notification-button-icon,#barup-right-buttons .dropdown-menu .notification-category,#barup-right-buttons .dropdown-menu .notification-title,#barup-right-buttons .dropdown-menu .dropdown-color{color:var(--dropdown-menu-text-color)}#barup-right-buttons .dropdown-menu .notification-button-icon:hover{color:var(--hover-close-color)}#barup-right-buttons .dropdown-menu .notification-icon{color:var(--dropdown-menu-icon-color)}#barup-right-buttons .dropdown-menu .notifications-header{border-bottom:var(--main-separator-border)}#barup-right-buttons .dropdown-menu .dropdown-item:focus,#barup-right-buttons .dropdown-menu .dropdown-item:hover,#barup-right-buttons .dropdown-menu .dropdown-item.unread{background-color:var(--dropdown-item-hover-background-color)}#barup-right-buttons .dropdown-menu .dropdown-menu-scroll{scrollbar-width:var(--scrollbar-width-moz) !important;scrollbar-color:var(--scrollbar-handler-color) var(--scrollbar-background-color)}#barup-right-buttons #user-up-panel .user-menu-separator{border-bottom:var(--main-separator-border)}#folderlist-content{color:var(--layout-sidebar-text-color)}#folderlist-content>a.button,#folderlist-content>.listing li a{color:var(--layout-sidebar-text-color)}#folderlist-content>a.button:hover{background-color:var(--list-hover-background-color);border-radius:var(--secondary-border-radius)}#folderlist-content li.mailbox .unreadcount{background-color:var(--badge-background-color);color:var(--badge-text-color)}#folderlist-content ul ul li.mailbox.selected a{background-color:var(--layout-sidebar-background-selected-color);border-radius:var(--layout-sidebar-selected-item-border-radius);color:var(--layout-sidebar-text-selected-color);border-left:solid thin var(--layout-sidebar-border-selected-color) !important}#folderlist-content ul ul li.mailbox.selected:hover>a:first-of-type{background-color:var(--layout-sidebar-background-hover-selected-color);color:var(--layout-sidebar-text-hover-selected-color);border-left:solid thin var(--layout-sidebar-border-selected-color)}#folderlist-content ul ul li.mailbox.selected:hover>a:first-of-type:focus{border-left:solid thin var(--layout-sidebar-border-selected-color) !important}#folderlist-content ul ul li.mailbox.selected .treetoggle{color:var(--layout-sidebar-text-selected-color)}#folderlist-content ul ul li.mailbox:hover>a:first-of-type{background-color:var(--layout-sidebar-background-hover-color);border-radius:var(--layout-sidebar-item-border-radius);color:var(--layout-sidebar-text-hover-color)}.bs-popover-bottom>.arrow::after{border-bottom-color:var(--popover-icon-color)}#searchmenu{color:var(--searchmenu-text-color)}#layout #layout-list{margin-right:var(--space-margin) !important;margin-left:var(--space-margin) !important}#layout #layout-content{margin-right:var(--space-margin) !important}.task-mail.action-compose #layout-content,.task-settings.action-plugin-mel_suggestion_box #layout #layout-content{margin-left:var(--space-margin)}#layout-list{background-color:var(--layout-list-background-color)}#layout-list>.header{background-color:var(--layout-list-header-background-color) !important}#layout-list>.header a.button,#layout-list>.header a.options,#layout-list>.header a.select,#layout-list>.header a.threads{color:var(--layout-list-header-text-color) !important}#layout-list>.header .menu a:not(.disabled):focus,#layout-list>.header .menu a:not(.disabled):hover,#layout-list>.header a.toolbar-button.button.icon:not(.disabled):hover,#layout-list>.header .header a.toolbar-button:hover{background-color:var(--layout-list-header-background-hover-color) !important;color:var(--layout-list-header-text-hover-color) !important}#layout-list>.header #mailsearchlist .searchbar a,#layout-list>.header #mail-search-icon{color:var(--searchbar-text-color) !important}#layout-list>.header #mailsearchlist .searchbar a:hover,#layout-list>.header #mailsearchlist .searchbar a:focus{color:var(--searchbar-text-hover-color) !important}.searchbar a.button{color:var(--searchbar-text-color) !important}.searchbar a.button:hover{color:var(--searchbar-text-hover-color) !important}#layout-content{background-color:var(--body-background-color);color:var(--layout-content-text-color)}#layout-content>.header .menu a:not(.disabled):focus,#layout-content>.header .menu a:not(.disabled):hover,#layout-content>.header a.toolbar-button.button.icon:not(.disabled):hover,#layout-content>.header .header a.toolbar-button:hover{background-color:var(--layout-content-header-background-hover-color) !important;color:var(--layout-content-header-text-hover-color) !important}.modal-content{background-color:var(--modal-background-color) !important;color:var(--modal-text-color) !important}.btn.btn-block.btn-secondary.btn-mel{background-color:var(--secondary-mel-button-background-color);color:var(--secondary-mel-button-text-color);border:var(--secondary-mel-button-border)}.btn.btn-block.btn-secondary.btn-mel:hover{background-color:var(--secondary-mel-button-hover-background-color);color:var(--secondary-mel-button-hover-text-color);border:var(--secondary-mel-button-hover-border)}.btn.btn-block.btn-secondary.btn-mel:focus{background-color:var(--secondary-mel-button-hover-background-color) !important;color:var(--secondary-mel-button-hover-text-color) !important;border:var(--secondary-mel-button-hover-border) !important}#search_row>.input-group>.form-control{border-right:none;border-bottom-left-radius:15px;border-top-left-radius:15px;border-color:var(--barup-search-input-border-color);background-color:var(--barup-search-input-background-color);color:var(--barup-search-input-text-color)}#search_row>.input-group>.input-group-append>.input-group-text{border-bottom-right-radius:15px;border-top-right-radius:15px;background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}#groupoptions-user,#groupoptions-user .bottom-option{background-color:var(--modal-background-color);color:var(--main-text-color);box-shadow:var(--groupotions-box-shadow)}#groupoptions-user::after{border-bottom-color:var(--modal-background-color)}#groupoptions-user .option_radio_wrapper .option,#groupoptions-user .option_radio_wrapper .option .option-image{background-color:var(--option-menu-radio-button-background-color)}#groupoptions-user .option_radio_wrapper .option:hover,#groupoptions-user .option_radio_wrapper .option .option-image:hover{background-color:var(--option-menu-radio-button-hover-background-color)}#groupoptions-user .option_radio_wrapper .option .color-icon{color:var(--option-menu-radio-button-icon-color) !important}#groupoptions-user .option-menu-button{background-color:var(--option-menu-button-background-color) !important;color:var(--option-menu-button-text-color) !important;border:var(--option-menu-button-border) !important}#groupoptions-user .option-menu-button:hover{background-color:var(--option-menu-button-hover-background-color) !important}.custom-switch .custom-control-label::before,.selected .custom-switch .custom-control-label::before{background-color:var(--custom-switch-unchecked-background-color);border:var(--custom-switch-border)}.custom-switch .custom-control-label::after,.selected .custom-switch .custom-control-label::after{background-color:var(--custom-switch-unchecked-dot-color)}.custom-switch .custom-control-input:checked~.custom-control-label::before,.selected .custom-switch .custom-control-input:checked~.custom-control-label::before{background-color:var(--alternate-custom-switch-checked-background-color);border:var(--custom-switch-border)}.custom-switch .custom-control-input:checked~.custom-control-label::after,.selected .custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:var(--custom-switch-checked-dot-color)}.mel-tab,button.btn.mel-tab{color:var(--mel-tabs-text-color) !important;background-color:var(--mel-tabs-background-color) !important}.mel-tab:hover,button.btn.mel-tab:hover{color:var(--mel-tabs-hover-text-color) !important;background-color:var(--mel-tabs-hover-background-color) !important}.mel-tab.active,button.btn.mel-tab.active{color:var(--mel-tabs-active-text-color) !important;background-color:var(--mel-tabs-active-background-color) !important}.popover{background-color:var(--popover-background-color);color:var(--popover-text-color);border:var(--popover-border);box-shadow:var(--popover-box-shadow)}.popover.menu a:not(.disabled):focus,.popover .menu a:not(.disabled):hover,.popover li:focus,.popover li:hover{background-color:var(--popover-hover-background-color) !important;color:var(--popover-hover-text-color) !important;--popover-text-color:var(--popover-hover-text-color)}.popover .listing li a,.popover .listing tbody td{color:var(--popover-text-color)}.ui-widget{border:var(--modal-border)}.ui-widget-content,.ui-widget-header{background-color:var(--modal-background-color) !important;color:var(--modal-text-color)}.ui-widget-header .ui-dialog-title{color:var(--modal-title-color)}.ui-widget-header .ui-dialog-titlebar-close{color:var(--modal-title-color)}.ui-widget-header .ui-dialog-titlebar-close:hover{color:var(--hover-close-color)}.form-control{background-color:var(--input-background-color);color:var(--input-text-color);border-color:var(--input-border-color)}.form-control:focus{background-color:var(--input-focus-background-color) !important;color:var(--input-text-color) !important;border-color:var(--popover-focus-border-color) !important}.mel-input-container.form-control.input-mel,.searchbar{background-color:var(--searchbar-background-color)}.mel-input-container.form-control.input-mel input,.searchbar input{color:var(--searchbar-text-color)}#mail-search-border{border:var(--searchbar-border)}.mel-search-group>input{border:var(--searchbar-border)}.mel-search-group .input-group-append>.input-group-text{border:var(--searchbar-border);background-color:var(--searchbar-background-color);color:var(--searchbar-text-color)}p,span,div{scrollbar-width:var(--scrollbar-width-moz) !important;scrollbar-color:var(--scrollbar-handler-color) var(--scrollbar-background-color) !important}.input-group-text{background-color:var(--secondary-mel-button-background-color);border-color:var(--input-border-color)}.html-editor .editor-toolbar{background-color:var(--secondary-mel-button-background-color)}optgroup{background-color:transparent;color:var(--main-text-color)}.melv2-card,.task-news.square_div.mel-news.news{box-shadow:var(--bureau-card-box-shadow);border-radius:var(--bureau-card-border-radius)}.mel-button.bckg.true:hover{border-color:var(--default-border-color)}#button-search.btn.btn-secondary{background-color:var(--barup-search-input-background-color) !important;color:var(--barup-search-input-text-color) !important;border:solid thin var(--default-border-color) !important}.task-tasks #layout-sidebar,.task-addressbook #layout-sidebar,.task-settings #layout-sidebar,.task-tasks #layout-sidebar>.header,.task-addressbook #layout-sidebar>.header,.task-settings #layout-sidebar>.header{background-color:var(--primary-layout-sidebar-background-color) !important;color:var(--primary-layout-sidebar-text-color) !important}.task-tasks #layout-sidebar .scroller>.listing li.selected,.task-addressbook #layout-sidebar .scroller>.listing li.selected,.task-settings #layout-sidebar .scroller>.listing li.selected{background-color:var(--primary-layout-sidebar-background-selected-color) !important}.task-tasks #layout-sidebar .scroller>.listing li a,.task-addressbook #layout-sidebar .scroller>.listing li a,.task-settings #layout-sidebar .scroller>.listing li a{color:var(--primary-layout-sidebar-text-color) !important}#layout>div>.header{background-color:var(--layout-content-header-background-color);color:var(--layout-content-text-color)}#listview-float-right #list-contacts .listsearchbox input,.custom-select:disabled{background-color:var(--input-mel-background-color);color:var(--input-mel-text-color);border-color:var(--input-mel-border-color);opacity:.5}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select,#edit-attendees-comment,#edit-attendee-name,#edit-identities-list,.edit-attendee-role,.fake-input.input-mel,.roundbadge.icon-mel-videoconference,.tiny-webconf-menu.dwp-round,#rcmloginsubmit,.btn.btn-block.btn-secondary.btn-mel,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button,.barup .tiny-rocket-chat,.my_favorites,#edit-alarm-item,textarea.input-mel,select.input-mel,input.input-mel,#wspf.form-control.input-mel,.input-group-append>.input-group-text.mel-text{background-color:var(--input-mel-background-color);color:var(--input-mel-text-color);border-color:var(--input-mel-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:focus,#edit-attendees-comment:focus,#edit-attendee-name:focus,#edit-identities-list:focus,.edit-attendee-role:focus,.fake-input.input-mel:focus,.roundbadge.icon-mel-videoconference:focus,.tiny-webconf-menu.dwp-round:focus,#rcmloginsubmit:focus,.btn.btn-block.btn-secondary.btn-mel:focus,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button:focus,.barup .tiny-rocket-chat:focus,.my_favorites:focus,#edit-alarm-item:focus,textarea.input-mel:focus,select.input-mel:focus,input.input-mel:focus,#wspf.form-control.input-mel:focus,.input-group-append>.input-group-text.mel-text:focus{background-color:var(--input-mel-focus-background-color);box-shadow:0 0 0 .2rem var(--input-mel-focus-shadow-color);border-color:var(--input-mel-focus-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select::placeholder,#edit-attendees-comment::placeholder,#edit-attendee-name::placeholder,#edit-identities-list::placeholder,.edit-attendee-role::placeholder,.fake-input.input-mel::placeholder,.roundbadge.icon-mel-videoconference::placeholder,.tiny-webconf-menu.dwp-round::placeholder,#rcmloginsubmit::placeholder,.btn.btn-block.btn-secondary.btn-mel::placeholder,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button::placeholder,.barup .tiny-rocket-chat::placeholder,.my_favorites::placeholder,#edit-alarm-item::placeholder,textarea.input-mel::placeholder,select.input-mel::placeholder,input.input-mel::placeholder,#wspf.form-control.input-mel::placeholder,.input-group-append>.input-group-text.mel-text::placeholder{color:var(--default-placeholder-text-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select{background-color:var(--jitsii-input-mel-background-color);color:var(--jitsii-mel-button-text-color);border-color:var(--input-mel-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select.light-focus:focus,.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:focus,.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:hover{background-color:var(--mel-button-hover-background-color);color:var(--mel-button-text-color);border-color:var(--input-mel-border-color)}#button-create{display:inline-flex;justify-content:space-between;align-items:center;width:110px;background-color:var(--barup-create-button-background-color)}#button-create:hover{background-color:var(--barup-create-button-hover-background-color)}.btn-text.btn-mel-invisible:hover{color:var(--main-text-color)}.option-menu-title{color:var(--option-menu-title-color)}.menu.toolbar li,#taskmenu a,#otherapps a,#layout-menu:hover a>span.inner{height:60px !important}.html-editor .editor-toolbar{border-bottom-color:var(--input-border-color)}.html-editor .editor-toolbar .mce-i-html{color:var(--header-title-color)}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-state-default,.ui-datepicker.ui-widget-content .ui-state-default,.datepicker-dp-title{color:var(--main-text-color)}.ui-datepicker.ui-widget-content .ui-state-default.ui-state-highlight{background-color:var(--badge-background-color) !important;color:var(--badge-text-color) !important}.ui-widget-overlay{background-color:var(--ui-widget-overlay)}.custom-file-label::after{color:var(--secondary-mel-button-text-color);background-color:var(--secondary-mel-button-background-color);border-color:var(--secondary-mel-button-border)}.formcontent .hint{color:var(--hint-text-color)}.button.icon.toolbar-button.refresh:focus,html:not(.touch) #messagelist-header .listing li>a:focus,html:not(.touch) #layout-content .header .listing li>a:focus{border-left:none !important}.mel-radio-1.radio-small input[type="checkbox"]+label span::before{height:11px;width:11px}.mel-radio-1 input[type="checkbox"]+label span::before{top:1px;left:1px}.mel-radio-1 input[type="checkbox"]:checked+label span::before{top:1px;right:1px}.table{color:var(--main-text-color) !important}.dialog-message{background-color:var(--background-color-dialog-message)}html body a.filename .attachment-name{color:var(--main-text-color)}#compose-contacts ul.treelist li.selected>div>a,#compose-contacts .scroller>.listing li a,#compose-contacts .scroller>.listing li div{--layout-sidebar-text-color:var(--main-text-color)}#mm-cw-participants{background-color:var(--input-mel-background-color);border:1px solid var(--input-mel-border-color)}.mel-attendee{background-color:var(--card-background-color)} \ No newline at end of file +body{background-color:var(--body-background-color)}body.action-dialog-ui{background-color:transparent}#layout>div>.footer{background-color:var(--addressbook-list-pagenav-background-color);border-top-color:var(--separate)}.menu.pagenav.pagenav-list{border-bottom-color:transparent}.task-workspace #layout #layout-content,.task-search #layout #layout-content,.task-useful_links #layout #layout-content,.task-news #layout #layout-content,.task-bureau #layout #layout-content{background-color:var(--bureau-background-color) !important;margin-right:0px !important}.task-settings #layout-list .searchbar.menu,#layout-list .header,#layout-list .pagenav.pagenav-list.menu,#layout-list #layout-list-content,#layout-list #messagelist-header,#layout-list #messagelist-content,#layout-list>.scroller,#layout #layout-content #calendar,#layout-content>.header,#layout-content .iframe-wrapper,#layout-content #mel_suggestion_box_option_box{margin:var(--main-margin) !important;border-radius:var(--main-panel-border-radius) !important;box-shadow:var(--main-box-shadow) !important}#layout-content .content{border-radius:var(--main-panel-border-radius) !important;box-shadow:var(--main-box-shadow) !important;background-color:var(--layout-content-background-color) !important;margin:var(--main-margin) !important;margin-top:0px !important}#layout-sidebar separate{border-top-color:var(--layout-list-separate-color)}#layout-menu #taskmenu a.selected,#layout-menu #taskmenu a:hover{border-radius:var(--layout-menu-border-radius)}.mel-button,.invite-button.create{background-color:var(--mel-button-background-color);border:var(--mel-button-border);color:var(--mel-button-text-color)}.mel-button.inverse{border-color:transparent}.mel-button:hover,.invite-button.create:hover{background-color:var(--mel-button-hover-background-color);border-color:var(--mel-button-hover-border-color);color:var(--mel-button-hover-text-color)}.mel-button.btn-danger{background-color:var(--mel-button-danger-background-color);border-color:var(--mel-button-danger-border-color);color:var(--mel-button-danger-text-color)}.mel-button.btn-danger:hover{background-color:var(--mel-button-danger-hover-background-color);border-color:var(--mel-button-danger-hover-border-color);color:var(--mel-button-danger-hover-text-color)}.mel-button.quit-button,.mel-button.white{background-color:var(--quit-button-background-color);border-color:var(--quit-button-border-color);color:var(--quit-button-text-color)}.mel-button.quit-button:hover,.mel-button.white:hover{background-color:var(--quit-button-hover-background-color);border-color:var(--quit-button-hover-border-color);color:var(--quit-button-hover-text-color)}.mel-button.ignoreActive,.mel-button#showcontacts_edit-attendee-name{background-color:var(--mel-button-background-color) !important;border-color:var(--mel-button-border-color) !important;color:var(--mel-button-text-color) !important}.mel-button.ignoreActive:hover,.mel-button#showcontacts_edit-attendee-name:hover{background-color:var(--mel-button-hover-background-color) !important;border-color:var(--mel-button-hover-border-color) !important;color:var(--mel-button-hover-text-color) !important}ul.treelist li.selected>div>a,.scroller>.listing li a,.scroller>.listing li div{color:var(--layout-sidebar-text-color)}#folderlistbox ul.treelist li.selected>div>a,#files-compose-dialog ul.treelist li.selected>div>a,#folderlistbox .scroller>.listing li a,#files-compose-dialog .scroller>.listing li a,#folderlistbox .scroller>.listing li div,#files-compose-dialog .scroller>.listing li div{color:var(--main-text-color)}#folderlistbox li.selected div.treetoggle,#files-compose-dialog li.selected div.treetoggle{color:var(--secondary-text-color)}#eventedit .nav-tabs{border-bottom:var(--nav-tabs-border-bottom)}#eventedit ul{background-color:var(--nav-tabs-background-color)}#eventedit ul li.nav-item a{background-color:var(--nav-item-background-color);color:var(--nav-item-text-color);border-bottom:var(--nav-item-border-bottom)}#eventedit ul li.nav-item a:hover{background-color:var(--nav-item-hover-background-color);color:var(--nav-item-hover-text-color);border-bottom:var(--nav-item-hover-border-bottom)}#eventedit ul li.nav-item a.active{color:var(--nav-item-active-text-color);background-color:var(--nav-item-active-background-color);border-bottom:var(--nav-item-active-border-bottom)}.mel-radio-1 input[type='checkbox']+label span::before{top:2px;left:3px;height:24px;width:24px}.mel-radio-1 input[type='checkbox']:checked+label span::before{content:'';top:2px;right:3px;left:unset}.mel-radio-1 span{background-color:var(--custom-switch-unchecked-background-color) !important;border:var(--custom-switch-border) !important}.mel-radio-1 input[type='checkbox']:checked+label span{background-color:var(--custom-switch-checked-background-color) !important}.mel-radio-1 input[type='checkbox']+label span::before{background-color:var(--custom-switch-unchecked-dot-color) !important;border-color:var(--custom-switch-unchecked-dot-color) !important}#eventedit .edit-alarm-value,#eventedit .edit-alarm-offset,#eventedit .edit-alarm-related{background-color:var(--input-mel-background-color) !important;color:var(--input-mel-text-color) !important;border-color:var(--input-mel-border-color) !important}#eventedit .edit-alarm-value:focus,#eventedit .edit-alarm-offset:focus,#eventedit .edit-alarm-related:focus{background-color:var(--input-mel-focus-background-color) !important;box-shadow:0 0 0 .2rem var(--input-mel-focus-shadow-color) !important;border-color:var(--input-mel-focus-border-color) !important}.input-mel-datetime::after{color:var(--input-mel-text-color)}.search>.input-group>.form-control{background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}.search>.input-group>.form-control::placeholder{color:var(--default-placeholder-text-color)}.search>.input-group>.input-group-append>.input-group-text{background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}.custom-file-label:not(.is-invalid){background-color:var(--input-background-color);color:var(--input-text-color);border-color:var(--input-border-color)}.input-group-text{color:var(--header-title-color)}#layout-sidebar{border-right-color:var(--layout-sidebar-border-color) !important}.task-mail #layout-sidebar,.task-calendar #layout-sidebar{background-color:var(--layout-sidebar-background-color) !important}.popover .menu li a[aria-haspopup]:hover::after{color:var(--popover-hover-icon-color)}.search>.input-group>.task-mail #layout-sidebar{background-color:var(--layout-sidebar-background-color) !important}.search>.input-group>.task-mail .quota-widget{color:var(--layout-sidebar-text-color)}#barup-right-buttons button{color:var(--barup-icon-color) !important}.barup-picture #barup-right-buttons button{--barup-icon-color:var(--barup-icon-color-picture)}#barup-right-buttons #notificationunread.active{background-color:var(--barup-icon-badge-background-color);color:var(--barup-icon-badge-text-color)}#barup-right-buttons .dropdown-menu{background-color:var(--dropdown-menu-background-color);color:var(--dropdown-menu-text-color)}#barup-right-buttons .dropdown-menu::after{border-bottom-color:var(--dropdown-menu-background-color)}#barup-right-buttons .dropdown-menu .blue-color,#barup-right-buttons .dropdown-menu .notification-button-icon,#barup-right-buttons .dropdown-menu .notification-category,#barup-right-buttons .dropdown-menu .notification-title,#barup-right-buttons .dropdown-menu .dropdown-color{color:var(--dropdown-menu-text-color)}#barup-right-buttons .dropdown-menu .notification-button-icon:hover{color:var(--hover-close-color)}#barup-right-buttons .dropdown-menu .notification-icon{color:var(--dropdown-menu-icon-color)}#barup-right-buttons .dropdown-menu .notifications-header{border-bottom:var(--main-separator-border)}#barup-right-buttons .dropdown-menu .dropdown-item:focus,#barup-right-buttons .dropdown-menu .dropdown-item:hover,#barup-right-buttons .dropdown-menu .dropdown-item.unread{background-color:var(--dropdown-item-hover-background-color)}#barup-right-buttons .dropdown-menu .dropdown-menu-scroll{scrollbar-width:var(--scrollbar-width-moz) !important;scrollbar-color:var(--scrollbar-handler-color) var(--scrollbar-background-color)}#barup-right-buttons #user-up-panel .user-menu-separator{border-bottom:var(--main-separator-border)}#folderlist-content{color:var(--layout-sidebar-text-color)}#folderlist-content>a.button,#folderlist-content>.listing li a{color:var(--layout-sidebar-text-color)}#folderlist-content>a.button:hover{background-color:var(--list-hover-background-color);border-radius:var(--secondary-border-radius)}#folderlist-content li.mailbox .unreadcount{background-color:var(--badge-background-color);color:var(--badge-text-color)}#folderlist-content ul ul li.mailbox.selected a{background-color:var(--layout-sidebar-background-selected-color);border-radius:var(--layout-sidebar-selected-item-border-radius);color:var(--layout-sidebar-text-selected-color);border-left:solid thin var(--layout-sidebar-border-selected-color) !important}#folderlist-content ul ul li.mailbox.selected:hover>a:first-of-type{background-color:var(--layout-sidebar-background-hover-selected-color);color:var(--layout-sidebar-text-hover-selected-color);border-left:solid thin var(--layout-sidebar-border-selected-color)}#folderlist-content ul ul li.mailbox.selected:hover>a:first-of-type:focus{border-left:solid thin var(--layout-sidebar-border-selected-color) !important}#folderlist-content ul ul li.mailbox.selected .treetoggle{color:var(--layout-sidebar-text-selected-color)}#folderlist-content ul ul li.mailbox:hover>a:first-of-type{background-color:var(--layout-sidebar-background-hover-color);border-radius:var(--layout-sidebar-item-border-radius);color:var(--layout-sidebar-text-hover-color)}.bs-popover-bottom>.arrow::after{border-bottom-color:var(--popover-icon-color)}#searchmenu{color:var(--searchmenu-text-color)}#layout #layout-list{margin-right:var(--space-margin) !important;margin-left:var(--space-margin) !important}#layout #layout-content{margin-right:var(--space-margin) !important}.task-mail.action-compose #layout-content,.task-settings.action-plugin-mel_suggestion_box #layout #layout-content{margin-left:var(--space-margin)}#layout-list{background-color:var(--layout-list-background-color)}#layout-list>.header{background-color:var(--layout-list-header-background-color) !important}#layout-list>.header a.button,#layout-list>.header a.options,#layout-list>.header a.select,#layout-list>.header a.threads{color:var(--layout-list-header-text-color) !important}#layout-list>.header .menu a:not(.disabled):focus,#layout-list>.header .menu a:not(.disabled):hover,#layout-list>.header a.toolbar-button.button.icon:not(.disabled):hover,#layout-list>.header .header a.toolbar-button:hover{background-color:var(--layout-list-header-background-hover-color) !important;color:var(--layout-list-header-text-hover-color) !important}#layout-list>.header #mailsearchlist .searchbar a,#layout-list>.header #mail-search-icon{color:var(--searchbar-text-color) !important}#layout-list>.header #mailsearchlist .searchbar a:hover,#layout-list>.header #mailsearchlist .searchbar a:focus{color:var(--searchbar-text-hover-color) !important}.searchbar a.button{color:var(--searchbar-text-color) !important}.searchbar a.button:hover{color:var(--searchbar-text-hover-color) !important}#layout-content{background-color:var(--body-background-color);color:var(--layout-content-text-color)}#layout-content>.header .menu a:not(.disabled):focus,#layout-content>.header .menu a:not(.disabled):hover,#layout-content>.header a.toolbar-button.button.icon:not(.disabled):hover,#layout-content>.header .header a.toolbar-button:hover{background-color:var(--layout-content-header-background-hover-color) !important;color:var(--layout-content-header-text-hover-color) !important}.modal-content{background-color:var(--modal-background-color) !important;color:var(--modal-text-color) !important}.btn.btn-block.btn-secondary.btn-mel{background-color:var(--secondary-mel-button-background-color);color:var(--secondary-mel-button-text-color);border:var(--secondary-mel-button-border)}.btn.btn-block.btn-secondary.btn-mel:hover{background-color:var(--secondary-mel-button-hover-background-color);color:var(--secondary-mel-button-hover-text-color);border:var(--secondary-mel-button-hover-border)}.btn.btn-block.btn-secondary.btn-mel:focus{background-color:var(--secondary-mel-button-hover-background-color) !important;color:var(--secondary-mel-button-hover-text-color) !important;border:var(--secondary-mel-button-hover-border) !important}#search_row>.input-group>.form-control{border-right:none;border-bottom-left-radius:15px;border-top-left-radius:15px;border-color:var(--barup-search-input-border-color);background-color:var(--barup-search-input-background-color);color:var(--barup-search-input-text-color)}#search_row>.input-group>.input-group-append>.input-group-text{border-bottom-right-radius:15px;border-top-right-radius:15px;background-color:var(--barup-search-input-background-color);border-color:var(--barup-search-input-border-color);color:var(--barup-search-input-text-color)}#groupoptions-user,#groupoptions-user .bottom-option{background-color:var(--modal-background-color);color:var(--main-text-color);box-shadow:var(--groupotions-box-shadow)}#groupoptions-user::after{border-bottom-color:var(--modal-background-color)}#groupoptions-user .option_radio_wrapper .option,#groupoptions-user .option_radio_wrapper .option .option-image{background-color:var(--option-menu-radio-button-background-color)}#groupoptions-user .option_radio_wrapper .option:hover,#groupoptions-user .option_radio_wrapper .option .option-image:hover{background-color:var(--option-menu-radio-button-hover-background-color)}#groupoptions-user .option_radio_wrapper .option .color-icon{color:var(--option-menu-radio-button-icon-color) !important}#groupoptions-user .option-menu-button{background-color:var(--option-menu-button-background-color) !important;color:var(--option-menu-button-text-color) !important;border:var(--option-menu-button-border) !important}#groupoptions-user .option-menu-button:hover{background-color:var(--option-menu-button-hover-background-color) !important}.custom-switch .custom-control-label::before,.selected .custom-switch .custom-control-label::before{background-color:var(--custom-switch-unchecked-background-color);border:var(--custom-switch-border)}.custom-switch .custom-control-label::after,.selected .custom-switch .custom-control-label::after{background-color:var(--custom-switch-unchecked-dot-color)}.custom-switch .custom-control-input:checked~.custom-control-label::before,.selected .custom-switch .custom-control-input:checked~.custom-control-label::before{background-color:var(--alternate-custom-switch-checked-background-color);border:var(--custom-switch-border)}.custom-switch .custom-control-input:checked~.custom-control-label::after,.selected .custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:var(--custom-switch-checked-dot-color)}.mel-tab,button.btn.mel-tab{color:var(--mel-tabs-text-color) !important;background-color:var(--mel-tabs-background-color) !important}.mel-tab:hover,button.btn.mel-tab:hover{color:var(--mel-tabs-hover-text-color) !important;background-color:var(--mel-tabs-hover-background-color) !important}.mel-tab.active,button.btn.mel-tab.active{color:var(--mel-tabs-active-text-color) !important;background-color:var(--mel-tabs-active-background-color) !important}.popover{background-color:var(--popover-background-color);color:var(--popover-text-color);border:var(--popover-border);box-shadow:var(--popover-box-shadow)}.popover.menu a:not(.disabled):focus,.popover .menu a:not(.disabled):hover,.popover li:focus,.popover li:hover{background-color:var(--popover-hover-background-color) !important;color:var(--popover-hover-text-color) !important;--popover-text-color:var(--popover-hover-text-color)}.popover .listing li a,.popover .listing tbody td{color:var(--popover-text-color)}.ui-widget{border:var(--modal-border)}.ui-widget-content,.ui-widget-header{background-color:var(--modal-background-color) !important;color:var(--modal-text-color)}.ui-widget-header .ui-dialog-title{color:var(--modal-title-color)}.ui-widget-header .ui-dialog-titlebar-close{color:var(--modal-title-color)}.ui-widget-header .ui-dialog-titlebar-close:hover{color:var(--hover-close-color)}.form-control{background-color:var(--input-background-color);color:var(--input-text-color);border-color:var(--input-border-color)}.form-control:focus{background-color:var(--input-focus-background-color) !important;color:var(--input-text-color) !important;border-color:var(--popover-focus-border-color) !important}.mel-input-container.form-control.input-mel,.searchbar{background-color:var(--searchbar-background-color)}.mel-input-container.form-control.input-mel input,.searchbar input{color:var(--searchbar-text-color)}#mail-search-border{border:var(--searchbar-border)}.mel-search-group>input{border:var(--searchbar-border)}.mel-search-group .input-group-append>.input-group-text{border:var(--searchbar-border);background-color:var(--searchbar-background-color);color:var(--searchbar-text-color)}p,span,div{scrollbar-width:var(--scrollbar-width-moz) !important;scrollbar-color:var(--scrollbar-handler-color) var(--scrollbar-background-color) !important}.input-group-text{background-color:var(--secondary-mel-button-background-color);border-color:var(--input-border-color)}.html-editor .editor-toolbar{background-color:var(--secondary-mel-button-background-color)}optgroup{background-color:transparent;color:var(--main-text-color)}.melv2-card,.task-news.square_div.mel-news.news{box-shadow:var(--bureau-card-box-shadow);border-radius:var(--bureau-card-border-radius)}.mel-button.bckg.true:hover{border-color:var(--default-border-color)}#button-search.btn.btn-secondary{background-color:var(--barup-search-input-background-color) !important;color:var(--barup-search-input-text-color) !important;border:solid thin var(--default-border-color) !important}.task-tasks #layout-sidebar,.task-addressbook #layout-sidebar,.task-settings #layout-sidebar,.task-tasks #layout-sidebar>.header,.task-addressbook #layout-sidebar>.header,.task-settings #layout-sidebar>.header{background-color:var(--primary-layout-sidebar-background-color) !important;color:var(--primary-layout-sidebar-text-color) !important}.task-tasks #layout-sidebar .scroller>.listing li.selected,.task-addressbook #layout-sidebar .scroller>.listing li.selected,.task-settings #layout-sidebar .scroller>.listing li.selected{background-color:var(--primary-layout-sidebar-background-selected-color) !important}.task-tasks #layout-sidebar .scroller>.listing li a,.task-addressbook #layout-sidebar .scroller>.listing li a,.task-settings #layout-sidebar .scroller>.listing li a{color:var(--primary-layout-sidebar-text-color) !important}#layout>div>.header{background-color:var(--layout-content-header-background-color);color:var(--layout-content-text-color)}#listview-float-right #list-contacts .listsearchbox input,.custom-select:disabled{background-color:var(--input-mel-background-color);color:var(--input-mel-text-color);border-color:var(--input-mel-border-color);opacity:.5}.custom-select#edit-calendar,.compose-headers .custom-select,#eventsimport .custom-select,#eventsexport .custom-select,.action-edit-folder .custom-select,#tasksexport .custom-select,#tasksimport .custom-select,#listoptions-menu .custom-select{background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center / 8px 10px !important}html.dark-mode-custom .custom-select#edit-calendar,html.dark-mode-custom .compose-headers .custom-select,html.dark-mode-custom #eventsimport .custom-select,html.dark-mode-custom #eventsexport .custom-select,html.dark-mode-custom .action-edit-folder .custom-select,html.dark-mode-custom #tasksexport .custom-select,html.dark-mode-custom #tasksimport .custom-select,html.dark-mode-custom #listoptions-menu .custom-select{background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%2396b9e7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center / 8px 10px !important}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select,#edit-attendees-comment,#edit-attendee-name,#edit-identities-list,.edit-attendee-role,.fake-input.input-mel,.roundbadge.icon-mel-videoconference,.tiny-webconf-menu.dwp-round,#rcmloginsubmit,.btn.btn-block.btn-secondary.btn-mel,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button,.barup .tiny-rocket-chat,.my_favorites,#edit-alarm-item,textarea.input-mel,select.input-mel,input.input-mel,#wspf.form-control.input-mel,.multiselect.form-control.input-mel,.input-group-append>.input-group-text.mel-text{background-color:var(--input-mel-background-color);color:var(--input-mel-text-color);border-color:var(--input-mel-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:focus,#edit-attendees-comment:focus,#edit-attendee-name:focus,#edit-identities-list:focus,.edit-attendee-role:focus,.fake-input.input-mel:focus,.roundbadge.icon-mel-videoconference:focus,.tiny-webconf-menu.dwp-round:focus,#rcmloginsubmit:focus,.btn.btn-block.btn-secondary.btn-mel:focus,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button:focus,.barup .tiny-rocket-chat:focus,.my_favorites:focus,#edit-alarm-item:focus,textarea.input-mel:focus,select.input-mel:focus,input.input-mel:focus,#wspf.form-control.input-mel:focus,.multiselect.form-control.input-mel:focus,.input-group-append>.input-group-text.mel-text:focus{background-color:var(--input-mel-focus-background-color);box-shadow:0 0 0 .2rem var(--input-mel-focus-shadow-color);border-color:var(--input-mel-focus-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select::placeholder,#edit-attendees-comment::placeholder,#edit-attendee-name::placeholder,#edit-identities-list::placeholder,.edit-attendee-role::placeholder,.fake-input.input-mel::placeholder,.roundbadge.icon-mel-videoconference::placeholder,.tiny-webconf-menu.dwp-round::placeholder,#rcmloginsubmit::placeholder,.btn.btn-block.btn-secondary.btn-mel::placeholder,body.task-calendar .fc-toolbar.fc-header-toolbar .fc-right button::placeholder,.barup .tiny-rocket-chat::placeholder,.my_favorites::placeholder,#edit-alarm-item::placeholder,textarea.input-mel::placeholder,select.input-mel::placeholder,input.input-mel::placeholder,#wspf.form-control.input-mel::placeholder,.multiselect.form-control.input-mel::placeholder,.input-group-append>.input-group-text.mel-text::placeholder{color:var(--default-placeholder-text-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select{background-color:var(--jitsii-input-mel-background-color);color:var(--jitsii-mel-button-text-color);border-color:var(--input-mel-border-color)}.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select.light-focus:focus,.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:focus,.wsp-toolbar.webconf-toolbar .roundbadge.jitsi-select:hover{background-color:var(--mel-button-hover-background-color);color:var(--mel-button-text-color);border-color:var(--input-mel-border-color)}#button-create{display:inline-flex;justify-content:space-between;align-items:center;width:110px;background-color:var(--barup-create-button-background-color)}#button-create:hover{background-color:var(--barup-create-button-hover-background-color)}.btn-text.btn-mel-invisible:hover{color:var(--main-text-color)}.option-menu-title{color:var(--option-menu-title-color)}.menu.toolbar li,#taskmenu a,#otherapps a,#layout-menu:hover a>span.inner{height:60px !important}.html-editor .editor-toolbar{border-bottom-color:var(--input-border-color)}.html-editor .editor-toolbar .mce-i-html{color:var(--header-title-color)}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-state-default,.ui-datepicker.ui-widget-content .ui-state-default,.datepicker-dp-title{color:var(--main-text-color)}.ui-datepicker.ui-widget-content .ui-state-default.ui-state-highlight{background-color:var(--badge-background-color) !important;color:var(--badge-text-color) !important}.ui-widget-overlay{background-color:var(--ui-widget-overlay)}.custom-file-label::after{color:var(--secondary-mel-button-text-color);background-color:var(--secondary-mel-button-background-color);border-color:var(--secondary-mel-button-border)}.formcontent .hint{color:var(--hint-text-color)}.button.icon.toolbar-button.refresh:focus,html:not(.touch) #messagelist-header .listing li>a:focus,html:not(.touch) #layout-content .header .listing li>a:focus{border-left:none !important}.mel-radio-1.radio-small input[type='checkbox']+label span::before{height:11px;width:11px}.mel-radio-1 input[type='checkbox']+label span::before{top:1px;left:1px}.mel-radio-1 input[type='checkbox']:checked+label span::before{top:1px;right:1px}.table{color:var(--main-text-color) !important}.dialog-message{background-color:var(--background-color-dialog-message)}html body a.filename .attachment-name{color:var(--main-text-color)}#compose-contacts ul.treelist li.selected>div>a,#compose-contacts .scroller>.listing li a,#compose-contacts .scroller>.listing li div{--layout-sidebar-text-color:var(--main-text-color)}#mm-cw-participants{background-color:var(--input-mel-background-color);border:1px solid var(--input-mel-border-color)}.mel-attendee{background-color:var(--card-background-color)} \ No newline at end of file diff --git a/skins/mel_elastic/themes/noel/theme.json b/skins/mel_elastic/themes/noel/theme.json index 667d2bf6b..ff3b89f01 100644 --- a/skins/mel_elastic/themes/noel/theme.json +++ b/skins/mel_elastic/themes/noel/theme.json @@ -1,13 +1,13 @@ { - "parent":"abstract-picture-theme-two-colored", - "id":"party-christmas", - "display":"white", - "description":"desc", - "icon":"icon.svg", - "enabled":true, - "style":"style", - "class":"party-christmas", - "custom_dark_mode":true, - "order":100, - "saison":"22/09-31/12" -} \ No newline at end of file + "parent": "abstract-picture-theme-two-colored", + "id": "party-christmas", + "display": "white", + "description": "desc", + "icon": "icon.svg", + "enabled": true, + "style": "style", + "class": "party-christmas", + "custom_dark_mode": true, + "order": 100, + "saison": "01/12-31/12" +} diff --git a/skins/mel_elastic/ui.js b/skins/mel_elastic/ui.js index e799ed187..dcdf329ec 100644 --- a/skins/mel_elastic/ui.js +++ b/skins/mel_elastic/ui.js @@ -3,4319 +3,4411 @@ */ $(document).ready(() => { - const CONST_CLASS_THEME_BADGE_SELECTED = 'green-badge'; - //const CONST_THEME_CLASSE_CAN_RESIZE = 'mel-resize-ok'; - const CONST_SELECTOR_THEME_BADGE_SELECTED = `${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_THEME_BADGE_SELECTED}`; - const CONST_THEME_PANEL_ID = 'theme-panel'; - const CONST_THEME_PANEL_CONTENTS_CLASS = 'contents'; - const CONST_SELECTOR_THEME_PANEL_CONTENT_DEFAULT = `${CONST_JQUERY_SELECTOR_ID}${CONST_THEME_PANEL_ID} ${CONST_JQUERY_SELECTOR_CLASS}${CONST_THEME_PANEL_CONTENTS_CLASS}`; - const CONST_SELECTOR_THEME_PANEL_TAB_DIV = `${CONST_JQUERY_SELECTOR_ID}${CONST_THEME_PANEL_ID} ${CONST_JQUERY_SELECTOR_CLASS}title`; - const CONST_THEME_BUTTON_ID = 'theme-switch-button'; - const CONST_THEME_ICON_PREFIX = 'icon-theme-'; - const CONST_CLASS_MEL_RESIZE_OK = 'mel-resize-ok'; - //const CONST_FORMAT_THEME_TITLE = '%1?/( -?(%1?&&%2?||!%1?)? )/%2?'; - const CONST_TAB_THEME_ID = 'theme-pannel-tab-theme'; - const CONST_TAB_PICTURE_ID = 'theme-pannel-tab-pictures'; - const CONST_TABS_LIST = [ - { - display: 'Thèmes', - id: CONST_TAB_THEME_ID, - already: true, - }, - { - display: 'Images', - id: CONST_TAB_PICTURE_ID, - already: false, - }, - ]; - - try { - Enumerable.from([]); - } catch (error) { - window.Enumerable = null; - } - - /** - * Classe qui gère une règle css. Elle pourra être ajouter ou supprimer. - * @class - * @classdesc Représente une règle CSS et est utilisé par `Mel_CSS_Style_Sheet` - * @example new Mel_CSS_Rule('p{color:red;}') - * @see {@link Mel_CSS_Style_Sheet} - * @package - */ - class Mel_CSS_Rule { - /** - * - * @param {!string} rule Règle css style `p{color:red;}` - */ - constructor(rule) { - /** - * Règle css - * @type {!string} - */ - this.rule = rule; - /** - * Lien de la règle dans le stylesheet associé - * @type {?CSSStyleRule} - */ - this.styleRule = null; - } - - /** - * Récupère l'id de la règle dans la stylesheet - * @returns {number} - */ - id() { - return Enumerable.from(Mel_CSS_Rule.component().cssRules) - .select((x, i) => [x, i]) - .where(x => x[0] === this.styleRule) - .firstOrDefault()[1]; - } - - /** - * Intègre le style à la page web - * @returns {Mel_CSS_Rule} Chaînage - */ - set() { - let id = Mel_CSS_Rule.component().insertRule( - this.toString(), - Mel_CSS_Rule.lastIndex(), - ); - this.styleRule = Mel_CSS_Rule.component().cssRules[id]; - return this; - } - - /** - * Supprime le style de la page web - * @returns {Mel_CSS_Rule} Chaînage - */ - delete() { - let id = this.id(); - - if (id === 0 || !!id) Mel_CSS_Rule.component().deleteRule(id); - - return this; - } - - /** - * Retourne la règle css sous forme de string - * @returns {string} - */ - toString() { - return this.rule; - } - - /** - * Récupère la feuille de style lié à cette classe. - * - * Si elle n'éxiste pas, elle sera créée. - * @static - * @returns {!CSSStyleSheet} - */ - static component() { - if (!Mel_CSS_Rule.component._instance) { - let style = document.createElement('style'); - document.head.appendChild(style); - Mel_CSS_Rule.component._instance = style.sheet; - } - return Mel_CSS_Rule.component._instance; - } - - /** - * Récupère le prochain index de la feuille de style - * @returns {number} - * @static - */ - static lastIndex() { - return Mel_CSS_Rule.component().cssRules.length; - } - - /** - * Génère une règle css à partir d'un tableau de règles - * @param {Mel_CSS_Rule[]} rules - * @returns {Mel_CSS_Rule} - * @static - */ - static from_array(rules = []) { - return new Mel_CSS_Rule(rules.map(x => x.toString()).join('')); - } - } - - /** - * Classe qui gère une règle css. - * Gère un sélécteur ainsi qu'une liste de modificateur css. - * @class - * @classdesc Représentation d'une règle css avec un sélecteur et c'est différentes propriétés css. - * @extends Mel_CSS_Rule - * @package - * @example new Mel_CSS_Advanced_Rule('p', 'color:red', 'background-color:blue'); - */ - class Mel_CSS_Advanced_Rule extends Mel_CSS_Rule { - /** - * - * @param {string} selector Selector html (exemple: p.maclass) - * @param {...string} rules Liste de règles html (exemple : color:red) sans les ';' - */ - constructor(selector, ...rules) { - super(rules); - /** - * Liste des propriétés css - * @type {string[]} - */ - // eslint-disable-next-line no-self-assign - this.rule = this.rule; - /** - * Sélécteur - * @type {string} - */ - this.selector = selector; - } - - /** - * Intègre le style à la page web - * @returns {Mel_CSS_Advanced_Rule} Chaînage - * @override - */ - set() { - let id = Mel_CSS_Rule.component().insertRule( - this.toString(), - Mel_CSS_Rule.lastIndex(), - ); - this.styleRule = Mel_CSS_Rule.component().cssRules[id]; - return this; - } - - /** - * Ajoute une propriété à la règle - * @param {string} rule Règle à ajouter (sans les `;`) - * @param {!boolean} force_set Si vrai, met à jour la règle dans la page web - * @returns Chaînage - */ - add(rule, force_set = true) { - this.rule.push(rule); - return this._update_rule(force_set); - } - - /** - * Supprime la règle. - * @private - * @param {!boolean} force_set Si vrai, ajoute la règle dans la page web - * @returns {Mel_CSS_Advanced_Rule} Chaînage - */ - _update_rule(force_set = true) { - let id = this.id(); - if (id === 0 || !!id) { - this.delete(); - - if (force_set) this.set(); - } - - return this; - } - - /** - * Supprime une propriétée - * @param {!number} index Index de la propriété à supprimer - * @param {!boolean} force_set Si vrai, met à jour la règle dans la page web - * @returns Chaînage - */ - remove(index, force_set = true) { - this.rule.splice(index, 1); - return this._update_rule(force_set); - } - - /** - * Met à jour une règle - * @param {number} index Index de la règle à modifier - * @param {string} new_rule Nouvelle règle - * @param {boolean} force_set Si vrai, met à jour la règle dans la page web - * @returns Chaînage - */ - update(index, new_rule, force_set = true) { - this.rule[index] = new_rule; - return this._update_rule(force_set); - } - - /** - * Récupère les règles - * @returns {string} Règles - */ - rules() { - return this.rule; - } - - /** - * Retourne la règle css sous forme de string - * @returns {string} - * @override - */ - toString() { - return `${this.selector}{${this.rule.join(';\r\n')}}`; - } - } - - /** - * Classe qui représente une liste de règle css - * @extends Mel_CSS_Rule - * @class - * @classdesc Représente une liste de règle css - * @package - */ - class Mel_CSS_Array_Rule extends Mel_CSS_Rule { - constructor(rules) { - super(rules); - - /** - * Liste des ids des règles par rapport à leurs stylesheet - * @type {number[]} - */ - this.ids = []; - /** - * Liste des règles css - * @type {CSSStyleRule[]} - */ - this.styleRule = {}; - } - - /** - * Ajoute les règles à la liste de règles - * @override - * @returns {Mel_CSS_Array_Rule} Chaînage - */ - set() { - for (let index = 0, len = this.rule.length, id; index < len; ++index) { - const element = this.rule[index]; - id = Mel_CSS_Rule.component().insertRule( - element.toString(), - Mel_CSS_Rule.lastIndex(), - ); - this.ids.push(id); - this.styleRule[id] = Mel_CSS_Rule.component().cssRules[id]; - } - return this; - } - - /** - * Récupère l'id de la règle dans la stylesheet à partir de son id dans ce tableau - * @param {!number} id - * @returns {number} - */ - rule_id(id) { - return Enumerable.from(Mel_CSS_Rule.component().cssRules) - .select((x, i) => [x, i]) - .where(x => x[0] === this.styleRule[id]) - .firstOrDefault()[1]; - } - - /** - * Supprime la règle - * @overload - * @returns {Mel_CSS_Array_Rule} Chaînage - */ - delete() { - for (const iterator of this.ids) { - Mel_CSS_Rule.component().deleteRule(this.rule_id(iterator)); - } - this.ids.length = 0; - this.styleRule = null; - return this; - } - - /** - * Convertit en string - * @returns {string} - * @override - */ - toString() { - return this.rule.map(x => x.toString()).join(';\r\n'); - } - } - - /** - * Gère les différentes règles d'une feuille de style. - * @class - * @classdesc Représente une feuille de style et gère les règles qui se trouvent à l'intérieur. - * @package - */ - class Mel_CSS_Style_Sheet { - constructor() { - /** - * Dictionnaire de règle css - * @type {Object.} - */ - this.css = {}; - } - - /** - * Ajoute une règle à la liste de règles - * @private - * @param {string} key Clé qui permettra de récupérer la règle ajouté - * @param {Mel_CSS_Rule} rule Règle qui sera ajouté - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - _add(key, rule) { - if (!this.ruleExist(key)) this.css[key] = rule.set(); - else { - throw Mel_CSS_Style_Sheet.exception( - `###[Mel_CSS_Style_Sheet] ${key} existe déjà !`, - ); - } - return this; - } - - /** - * Ajoute une règle à la liste - * @param {!string} key Clé qui permettra de récupérer la règle ajouté - * @param {!string} rule Règle qui sera ajouté (ex : p{color:red;}) - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - add(key, rule) { - return this._add(key, new Mel_CSS_Rule(rule)); - } - - /** - * Ajoute une règle à la liste - * - * Cette fonction permet d'ajouter une règle avec un sélécteur et une liste de propriétés. - * @param {string} key Clé qui permettra de récupérer la règle ajouté - * @param {string} selector Sélécteur html - * @param {...string} rules Liste de propriétés (ex : 'color:red', 'background-color:blue') - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - addAdvanced(key, selector, ...rules) { - return this._add(key, new Mel_CSS_Advanced_Rule(selector, ...rules)); - } - - /** - * @typedef RuleKeyValuePair - * @property {string} key - * @property {string} rule - */ - - /** - * Ajoute plusieurs règles - * @param {...RuleKeyValuePair} rules Règles à ajouter - * @returns {Mel_CSS_Style_Sheet} Chaînage - * @see {@link RuleKeyValuePair} - */ - addRules(...rules) { - for (const key in rules) { - if (Object.hasOwnProperty.call(rules, key)) { - const element = rules[key]; - this.add(element.key, element.rule); - } - } - - return this; - } - - /** - * Supprime une règle - * @param {!string} key - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - remove(key) { - if (this.ruleExist(key)) { - this.css[key].delete(); - delete this.css[key]; - } - - return this; - } - - /** - * Supprime plusieurs règles - * @param {...string} keys - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - removeRules(...keys) { - for (const key in keys) { - if (Object.hasOwnProperty.call(keys, key)) { - const element = keys[key]; - this.remove(element); - } - } - - return this; - } - - /** - * Vérifie si une règle éxiste - * @param {string} key - * @returns {boolean} - */ - ruleExist(key) { - return !!this.css[key]; - } - - /** - * Récupère les clés de la classe - * @returns {string[]} - */ - getKeys() { - return ( - Enumerable.from(this.css) - .select(x => x.key) - .toArray() || [] - ); - } - - /** - * Récupère la feuille de style - * @returns {string} - */ - getStyleSheet() { - return ( - Enumerable.from(this.css) - .select(x => x.value) - .toArray() - .join('\r\n') || '' - ); - } - - /** - * Vide la feuille de style - * @returns {Mel_CSS_Style_Sheet} Chaînage - */ - reset() { - for (const key in this.css) { - if (Object.hasOwnProperty.call(this.css, key)) { - const element = this.css[key]; - element.delete(); - } - } - - this.css = {}; - return this; - } - - static exception(message, ...datas) { - return { - message, - datas, - }; - } - } - - /** - * @class - * @classdesc Gère la sauvegarde de données dans le stockage local pour ce fichier js - * @static - * @package - * @hideconstructor - */ - class Mel_Elastic_Storage { - /** - * Sauvegarde dans le stockage local - * @param {!string} key Clé qui permettra de retrouver la données plus tard - * @param {*} item Item à sauvegarder, si ce n'est pas un `string` il sera serialiser. - */ - static save(key, item) { - localStorage.setItem( - `${Mel_Elastic_Storage.KEY}_${key}`, - JSON.stringify(item), - ); - } - - /** - * Charge une donnée sauvegardé dans le stockage local - * @param {!string} key Clé qui permet de retrouver la données - * @param {?any} _default Si la données n'éxiste pas, cette valeur sera retournée. - * @returns {?any} - */ - static load(key, _default = null) { - return ( - JSON.parse(localStorage.getItem(`${Mel_Elastic_Storage.KEY}_${key}`)) ?? - _default - ); - } - - /** - * Supprime une donnée dans le stockage local - * @param {!string} key Clé qui permet de retrouver la données - */ - static remove(key) { - localStorage.removeItem(`${Mel_Elastic_Storage.KEY}_${key}`); - } - } - - /** - * Texte qui sera ajouté devant chaque clé dans le stockage local de la classe `Mel_Elastic_Storage` - * @static - * @readonly - * @type {string} - */ - Mel_Elastic_Storage.KEY = 'MEL_ELASTIC'; - - /** - * Classe qui sert à gérer les différentes interfaces - * @class - * @classdesc Gère le visuel du bnum. Donne aussi des fonctions utiles lié au visuel du Bnum. - * @package - */ - class Mel_Elastic { - constructor() { - this.init().setup().update(); - - $('#theme-panel #theme-pannel-tab-pictures').on('click', () => { - this._resize_themes(); - }); - - $('.tab-meltheme.mel-tab.mel-tabheader').click(() => { - this._resize_themes(); - }); - } - - ////////////************* Inits and setups functions *************/////////// - - /** - * Initialise les différentes variables et constantes de la classe. - * @returns {Mel_Elastic} Chaînage - * @package - */ - init() { - this.set_font_size(); - const ID_THEME_CONTENT = 0; - const ID_PICTURES_CONTENT = 1; - /** - * Type d'écran - * @type {string} - */ - this.screen_type = null; - /** - * Si on cache les menu ou non - * @type {boolean} - * @package - */ - this._hide_main_menu = - rcmail.env.mel_metapage_is_from_iframe || rcmail.env.extwin; - /** - * Feuille du style css - * @type {Mel_CSS_Style_Sheet} - */ - this.css_rules = new Mel_CSS_Style_Sheet(); - const tabs = this.init_theme_tabs({}); - return this.init_const() - .init_theme($(`#theme-panel .${tabs[ID_THEME_CONTENT].id}`)) - .init_theme_pictures({ - picturePannel: `#theme-panel .${tabs[ID_PICTURES_CONTENT].id}`, - }); - } - - /** - * Initialise les différentes constantes de la classe. - * @returns {Mel_Elastic} Chaînage - */ - init_const() { - /** - * @type {string} - * @constant - * @default '¤¤¤' - */ - this.JSON_CHAR_REPLACE; - /** - * @type {string} - * @constant - * @default '' - */ - this.SELECT_VALUE_REPLACE; - /** - * Si l'url contient extwin - * @type {boolean} - * @constant - */ - this.IS_EXTERNE; - /** - * Si l'url contient _is_from - * @type {boolean} - * @constant - */ - this.FROM_INFOS; - /** - * @type {number} - * @constant - * @package - * @default 8 - */ - this._integer; - - /** - * @typedef Keys - * @property {35} end - * @property {36} home - * @property {37} left - * @property {38} up - * @property {39} right - * @property {40} down - * @property {41} delete - * @package - */ - - /** - * @type {Keys} - * @readonly - * @package - * @see {@link Keys} - */ - this.keys; - - Object.defineProperty(this, 'JSON_CHAR_REPLACE', { - enumerable: false, - configurable: false, - writable: false, - value: '¤¤¤', - }); - - Object.defineProperty(this, 'SELECT_VALUE_REPLACE', { - enumerable: false, - configurable: false, - writable: false, - value: '', - }); - - Object.defineProperty(this, '_integer', { - enumerable: false, - configurable: false, - writable: false, - value: 8, - }); - - Object.defineProperty(this, 'IS_EXTERNE', { - enumerable: false, - configurable: false, - writable: false, - value: window.location.href.includes('_extwin'), - }); - - Object.defineProperty(this, 'FROM_INFOS', { - enumerable: false, - configurable: false, - writable: false, - value: { - key: '_is_from', - value: 'iframe', - }, - }); - - Object.defineProperty(this, 'keys', { - enumerable: false, - configurable: false, - writable: false, - value: { - end: 35, - home: 36, - left: 37, - up: 38, - right: 39, - down: 40, - delete: 46, - }, - }); - - return this; - } - - onthemeclick($parent) { - let $green = $parent.find(CONST_SELECTOR_THEME_BADGE_SELECTED); - - if (0 === $green.length) { - new mel_html2(CONST_HTML_DIV, { - attribs: { - class: CONST_CLASS_THEME_BADGE_SELECTED, - title: $parent.children().attr('title'), - }, - contents: [ - new mel_html(CONST_HTML_SPAN, { - class: `${CONST_ICON_CHECK} ${CONST_CLASS_ABSOLUTE_CENTER}`, - }), - ], - }).create($parent.css(CONST_CSS_POSITION, CONST_CSS_POSITION_RELATIVE)); - } else $green.css(CONST_CSS_DISPLAY, EMPTY_STRING); - } - - format_text(format, ...values) { - for ( - let index = 0, - len = values.length, - trueIndex = index + 1, - exist, - formatted = { - index: EMPTY_STRING, - conditional_index: EMPTY_STRING, - conditional_item: EMPTY_STRING, - }; - index < len; - ++index, ++trueIndex - ) { - const element = values[index]; - formatted.index = `%${trueIndex}`; - formatted.conditional_index = `${formatted.index}?`; - formatted.conditional_item = `(${formatted.conditional_index})`; - exist = 0 === element || !!element; - - if (format.includes(formatted.conditional_item)) { - for (let iterator of this._find_conditionnal_text( - format, - formatted.conditional_item, - )) { - format = format.replace( - iterator.get(), - exist ? iterator.getFormated() : EMPTY_STRING, - ); - } - } else if (format.includes(formatted.conditional_index)) { - format = format.replaceAll( - formatted.conditional_index, - exist ? element : EMPTY_STRING, - ); - } else format = format.replaceAll(formatted.index, element); - } - - return format; - } - - *_find_conditionnal_text(format, conditionnal) { - let splited = format.split(conditionnal); - let text = []; - for (let index = 0, len = splited.length; index < len; ++index) { - const element = splited[index]; - if (element.includes('/(')) text.push(element.split('/(')[1]); - else if (element.includes(')/')) { - text.push(element.split(')/')[0]); - - yield { - format: conditionnal, - array: text, - joined: EMPTY_STRING, - get() { - if (EMPTY_STRING === this.joined) - this.joined = this.array.join(this.format); - return this.joined; - }, - getFormated() { - return this.get() - .replace('/(', EMPTY_STRING) - .replace('/)', EMPTY_STRING) - .replace(this.format, EMPTY_STRING); - }, - }; - - text.length = 0; - } - } - - splited = ((text = null), null); - } - - /** - * TODO FINIR - * @param {*} format - * @param {*} values - */ - _format_replace_conditions(format, values) { - const regex = /\?\(([^)]+)\)\?/gm; - - if (regex.test(format)) { - let matches = format.match(regex); - - for ( - let index = 0, - len = matches.length, - element, - break_first_loop = false; - index < len; - ++index - ) { - element = matches[index] - .replace('?(', EMPTY_STRING) - .replace(')?', ''); - for (let j = 0, values_len = values.length; j < values_len; ++j) { - const value = values[j]; - const index_condition = `%${j + 1}?`; - } - - if (break_first_loop) break; - } - } - } - - /** - * Initialise la liste des thèles - * @param {$} $panel - * @param {boolean} $force - * @param {Function} callback_click - * @param {Function[]} callback_add - * @returns Chaîne - */ - init_theme( - $panel = $(CONST_SELECTOR_THEME_PANEL_CONTENT_DEFAULT), - $force = false, - callback_click = null, - callback_add = null, - ) { - //CONSTANTES - const THEME_BUTTON_CLASS_ACTIVE = 'activated'; - const THEME_BUTTON_ICON_INACTIVE = 'palette'; - const THEME_BUTTON_ICON_ACTIVE = 'arrow_back'; - const STYLE_MAIN_DIV_THEME = 'margin:0;padding:0 5px;'; - const STYLE_THEME_BUTTON = 'margin:0;margin-bottom:5px;'; - const STYLE_THEME_BUTTON_PARENT = 'padding:0 5px;'; - const THEME_CLASS_COL_NUMBER = 6; - const THEME_MAIN_CLASS_COL = `${CONST_CLASS_COL}-${THEME_CLASS_COL_NUMBER}`; - const SELECTOR_NOTIFICATION_PANEL = `${CONST_JQUERY_SELECTOR_ID}notifications-panel`; - const SELECTOR_THEME_PANEL = `${CONST_JQUERY_SELECTOR_ID}${CONST_THEME_PANEL_ID}`; - - const DEFAULT_THEME = - rcmail.env.mel_themes[CONST_THEME_DEFAULT_ID]?.default_theme ?? - CONST_THEME_DEFAULT_ID; - - /** - * Thèmes additionnels, générer par le javascript - * @type {Function[]} - */ - let additionnalThemes = callback_add || []; - /** - * Div html qui contient la liste des thèmes - * @type {mel_html2} - */ - let html = new mel_html2(CONST_HTML_DIV, { - attribs: { class: CONST_CLASS_ROW, style: STYLE_MAIN_DIV_THEME }, - }); - this.theme = rcmail.env.current_theme || DEFAULT_THEME; - - if ( - rcmail.env.current_theme === CONST_THEME_DEFAULT_ID && - DEFAULT_THEME !== CONST_THEME_DEFAULT_ID - ) - rcmail.env.current_theme = DEFAULT_THEME; - - //Si il y a un thème courant, on l'applique à la page - if (rcmail.env.current_theme) { - let $html = mel_html.select_html(); - - if (!rcmail.env.mel_themes[rcmail.env.current_theme]) { - rcmail.env.current_theme = DEFAULT_THEME; - this.theme = rcmail.env.current_theme; - } - - let current = rcmail.env.mel_themes[rcmail.env.current_theme]; - - do { - //Gestion du multi-thème - $html.addClass(current.class); - current = rcmail.env.mel_themes[current.parent]; - } while (current); - } - - //Si il y a des thèmes ou que l'on souhaite forcer une génération de thème - if (!!rcmail.env.mel_themes || $force) { - const themes = rcmail.env.mel_themes; - rcmail.env.mel_themes = null; //Ne plus le rendre disponible via rcmail.env.mel_themes pour éviter les doublons - this.themes = themes || this.themes; - - if (0 !== $panel.length) { - /** - * Thème traité - * @type {mel_html} - */ - let html_theme; - /** - * Thème selectionné ou non - * @type {boolean} - */ - let is_selected; - let html_main_div; - for (const iterator of Enumerable.from(this.themes) - .concat(additionnalThemes) - .where(x => x.value.showed) - .orderBy(x => x.value.order ?? Infinity)) { - if ( - iterator.value.id === CONST_THEME_DEFAULT_ID && - CONST_THEME_DEFAULT_ID !== DEFAULT_THEME - ) - continue; - - is_selected = iterator.value.id === this.theme; - //Création du "bouton" du thème - html_theme = new mel_html(CONST_HTML_DIV, { - class: `${CONST_THEME_ICON_PREFIX}${iterator.value.id} ${CONST_CLASS_SELECTABLE} ${CONST_CLASS_SELECTABLE_PICTURE_ONLY} ${CONST_CLASS_SELECTABLE_PICTURE_ONLY_WITH_BORDER} ${CONST_CLASS_MEL_RESIZE_OK} ${is_selected ? CONST_CLASS_SELECTED : EMPTY_STRING}`, - style: `${CONST_CSS_BACKGROUND}${CONST_CSS_ASSIGN}${CONST_CSS_BACKGROUND_URL}(${iterator.value.icon})${CONST_CSS_SEPARATOR}${STYLE_THEME_BUTTON}`, - title: `${iterator.value.displayed}${iterator.value.desc ? ` - ${iterator.value.desc}` : EMPTY_STRING}`, - role: CONST_ATTRIB_ROLE_BUTTON, - 'tab-index': 0, - 'data-name': iterator.value.id, - 'aria-pressed': iterator.value.id === this.theme, - }); - //Action à faire au clique - html_theme.onclick.push(e => { - let dosomething = callback_click ? callback_click(e) : true; - if (!dosomething) return; - - e = $(e.currentTarget); - $panel - .find(CONST_SELECTOR_THEME_BADGE_SELECTED) - .css(CONST_CSS_DISPLAY, CONST_CSS_NONE); - $panel - .find(`${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTABLE}`) - .removeClass(CONST_CLASS_SELECTED) - .attr(CONST_ATTRIB_ARIA_PRESSED, false); - e.addClass(CONST_CLASS_SELECTED).attr( - CONST_ATTRIB_ARIA_PRESSED, - true, - ); - - this.onthemeclick(e.parent()); - - this.update_theme(e.data('name')); - this._update_theme_color(); - }); - html_main_div = new mel_html2(CONST_HTML_DIV, { - attribs: { - class: THEME_MAIN_CLASS_COL, - style: STYLE_THEME_BUTTON_PARENT, - }, - contents: [html_theme], - }); - html_main_div.css('position', 'flex'); - - if (iterator.value.saison) { - html_main_div.addContent( - new mel_html( - CONST_HTML_SPAN, - { class: 'theme-saison-date' }, - `${iterator.value.saison.start} - ${iterator.value.saison.end}`, - ), - ); - } - - //Ajouter à la DIV des thèmes, le bouton de thème dans une div "col-6" - html.addContent(html_main_div); - } - - //Après la génération de la liste des thèmes, appliquer les effets visuels sur le thème selectionné. - html.aftergenerate.push(generated => { - if (0 !== $panel.length) - this.onthemeclick( - generated - .find(`${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTED}`) - .parent(), - ); - }); - } - } - - let $theme_button = $( - `${CONST_JQUERY_SELECTOR_ID}${CONST_THEME_BUTTON_ID}`, - ); - if (top === window) { - //Si on est en Top & que le bouton de thème existe - if (html.count() > 1) { - //Si il y + d'un thème, on active les propriétés du bouton - if (!this.theme_button_activated) { - this.theme_button_activated = true; - $theme_button.click($e => { - $e = $($e.currentTarget); - - if (!$e.hasClass(THEME_BUTTON_CLASS_ACTIVE)) { - $e.addClass(THEME_BUTTON_CLASS_ACTIVE).html( - THEME_BUTTON_ICON_ACTIVE, - ); - $e.attr({ - title: rcmail.gettext( - 'back_to_notifications', - 'mel_metapage', - ), - }); - $(SELECTOR_NOTIFICATION_PANEL).css( - CONST_CSS_DISPLAY, - CONST_CSS_NONE, - ); - $(SELECTOR_THEME_PANEL).css(CONST_CSS_DISPLAY, EMPTY_STRING); - this._resize_themes(); - } else { - $e.removeClass(THEME_BUTTON_CLASS_ACTIVE).html( - THEME_BUTTON_ICON_INACTIVE, - ); - $e.attr({ - title: rcmail.gettext('change_theme', 'mel_metapage'), - }); - $(SELECTOR_NOTIFICATION_PANEL).css( - CONST_CSS_DISPLAY, - EMPTY_STRING, - ); - $(SELECTOR_THEME_PANEL).css(CONST_CSS_DISPLAY, CONST_CSS_NONE); - } - }); - } - - if (0 !== $panel.length) html.create($panel); - } else { - //Sinon, on le désactive - $theme_button - .addClass(CONST_ATTRIB_DISABLED) - .attr(CONST_ATTRIB_DISABLED, CONST_ATTRIB_DISABLED); - } - } - - if ($('#rcmfd-toggle-anims').length > 0) { - //Affichage du bouton de thème - if (!this.themes[this.theme].animation_class) { - $('#rcmfd-toggle-anims') - .addClass('disabled') - .attr('disabled', 'disabled') - .parent() - .parent() - .css({ opacity: 0, position: 'absolute' }); - } else { - $('#rcmfd-toggle-anims') - .removeClass('disabled') - .removeAttr('disabled') - .parent() - .parent() - .css({ opacity: '', position: '' }); - } - - let current = this.themes[this.theme]; - - if (current.animation_class) { - if ( - rcmail.env.animation_enabled ?? - current.animation_enabled_by_default - ) { - $('body').addClass(current.animation_class); - $('#rcmfd-toggle-anims')[0].checked = false; - } else $('#rcmfd-toggle-anims')[0].checked = true; - } - } - - return this._update_theme_color(); - } - - init_theme_tabs({ - tabs_div_selector = CONST_SELECTOR_THEME_PANEL_TAB_DIV, - $themePannel = $(CONST_SELECTOR_THEME_PANEL_CONTENT_DEFAULT), - tabs = CONST_TABS_LIST, - }) { - const CLASS_TAB = 'mel-tab'; - const NAMESPACE = 'tab-meltheme'; - const CLASS_TAB_HEADER = 'mel-tabheader'; - const CLASS_TAB_CONTENT = 'mel-tab-content'; - const TAB_ACTIVE = 'active'; - const TAB_LAST = 'last'; - const CLASS_CONTENTS = 'themescontents'; - - let themeIndex = null; - let $tabs = $(tabs_div_selector).html(EMPTY_STRING); - - if (0 === $tabs.length) return tabs; - - for (let index = 0, len = tabs.length; index < len; ++index) { - //On génère les onglets - const element = tabs[index]; - new mel_html( - CONST_HTML_DIV, - { - id: element.id, - class: `${NAMESPACE} ${CLASS_TAB} ${CLASS_TAB_HEADER} ${0 === index ? TAB_ACTIVE : len - 1 === index ? TAB_LAST : EMPTY_STRING}`, - }, - element.display, - ).create($tabs); - - if (CONST_TAB_THEME_ID === element.id) themeIndex = index; - } - - let $pannelParent = $themePannel.parent(); - let $contents = new mel_html2(CONST_HTML_DIV, { - attribs: { - class: CLASS_CONTENTS, - tabindex: 0, - }, - }); - - //Passer les thèmes dans le panel des thèmes - if (themeIndex !== null) { - let $divThemes = new mel_html(CONST_HTML_DIV, { - class: `${tabs[themeIndex].id} ${NAMESPACE} ${CLASS_TAB_CONTENT}`, - }); - $contents.addContent($divThemes); - $divThemes.aftergenerate.push($generated => { - $themePannel.appendTo($generated); - }); - } - - //Ajout des onglets et apnneaux supplémentaires - for (let index = 0, len = tabs.length; index < len; ++index) { - const element = tabs[index]; - if (!element.already) { - $contents.addContent( - new mel_html(CONST_HTML_DIV, { - class: `${element.id} ${NAMESPACE} ${CLASS_TAB_CONTENT}`, - style: `${CONST_CSS_DISPLAY}${CONST_CSS_ASSIGN}${CONST_CSS_NONE}${CONST_CSS_SEPARATOR}`, - }), - ); - } - } - - $contents.create($pannelParent); - - return tabs; - } - - init_theme_pictures({ - picturePannel = '#theme-panel .theme-pannel-tab-pictures', - picturesToIgnore = [], - picturesToAdd = [], - }) { - const CLASS_PARENT_DIV = `${CONST_CLASS_COL}-4`; - const CLASS_PARENT_HOVER = 'hovered'; - const CUSTOM_THEME_CLASSES = - 'input-top-selectable mel-resize-ok half-resize'; - const CUSTOM_THEME_PARENT_DIV_CLASS = 'div-custom-picture px-1'; - const CUSTOM_THEME_CLASSES_PIC = 'half-resize'; - const INPUT_CLASS = 'hidden'; - const INPUT_ACCEPT = ['.png', '.jpg', '.svg', '.gif'].join(','); - const THEME_ATTRIB_DATA_USER_PREF_ID = 'prefid'; - const THEME_ATTRIB_DATA_PATH = 'picpath'; - const THEME_ATTRIB_DATA_ID = 'picid'; - const THEME_ATTRIB_DATA_IS_CUSTOM = 'iscustom'; - const THEME_DEFAULT_CLASS = 'barup-background-color'; - const THEME_CLASSES = 'mel-selectable picture mel-resize-ok'; - const RULE_KEY = 'barup-background'; - const DATA_PIC_ID = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_ID}`; - const DATA_PIC_PATH = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_PATH}`; - const DATA_IS_CUSTOM = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_IS_CUSTOM}`; - const CONST_SELECTOR_SELECTED = `${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTED}`; - const STYLE = 'padding:0 5px;'; - let $pannel = $(picturePannel); - - if (0 === $pannel.length) return this; - const pictures = rcmail.env.mel_themes_pictures; - let $item; - /** - * Contient la liste des images - * @type {mel_html2} - */ - let $mainrow = new mel_html2(CONST_HTML_DIV, { - attribs: { - class: CONST_CLASS_ROW, - style: STYLE, - }, - }); - this.theme_selected_picture = rcmail.env.theme_selected_picture || null; - - for (const iterator of Enumerable.from(pictures) - .where(x => !picturesToIgnore.includes(x.key)) - .concat(picturesToAdd) - .orderBy(x => - true === x.value.isFirst - ? Number.NEGATIVE_INFINITY - : x.value.customOrder || Number.POSITIVE_INFINITY, - )) { - //Div de position - $item = new mel_html2(CONST_HTML_DIV, { - attribs: { - class: CLASS_PARENT_DIV, - style: STYLE, - }, - }).appendTo($mainrow); - //Vrai DIV - $item = new mel_html2(CONST_HTML_DIV, {}).appendTo($item); - - //Si c'est on peux choisir une image custom - if (iterator.value.userprefid) { - /** - * Input caché - * @type {mel_input} - */ - var $input = new mel_input({ - class: INPUT_CLASS, - type: CONST_ATTRIB_TYPE_FILE, - accept: INPUT_ACCEPT, - 'data-prefid': iterator.value.userprefid, - }); - - //MAJ de l'image - $input.onchange.push(ev => { - ev = $(ev.currentTarget); - const prefid = ev.data(THEME_ATTRIB_DATA_USER_PREF_ID); - const file = ev[0].files[0]; - var reader = new FileReader(); - reader.onload = e => { - const picture = e.target.result; - const size = - mel_metapage.Functions.calculateObjectSizeInMo(picture); - - if (size < 2) { - this.update_custom_picture(picture, prefid); - let $selectable = ev - .parent() - .parent() - .find( - `${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTABLE}`, - ) - .removeClass(THEME_DEFAULT_CLASS) - .css( - CONST_CSS_BACKGROUND_IMAGE, - `${CONST_CSS_BACKGROUND_URL}(${picture})`, - ) - .css( - CONST_CSS_BACKGROUND_SIZE, - CONST_CSS_BACKGROUND_SIZE_COVER, - ) - .data(THEME_ATTRIB_DATA_PATH, picture) - .data(THEME_ATTRIB_DATA_IS_CUSTOM, true); - - if ( - $selectable.data(THEME_ATTRIB_DATA_ID) === - this.get_theme_picture() - ) { - this.css_rules.remove(RULE_KEY); - this._add_background(picture, true); - } - } else { - rcmail.display_message( - 'Votre image est trop lourde !', - 'error', - ); - } - }; - reader.readAsDataURL(file); - }); - //Bouton qui sert à cliquer sur l'input - var $icon = new mel_html( - 'span', - { class: 'material-symbols-outlined' }, - 'upload', - ); - var $button = new mel_button({}, $icon.toString()); - $button.onmouseover.push(e => { - $(e.currentTarget).parent().addClass(CLASS_PARENT_HOVER); - }); - $button.onmouseout.push(e => { - $(e.currentTarget).parent().removeClass(CLASS_PARENT_HOVER); - }); - $button.onclick.push(e => { - $(e.currentTarget).parent().find(CONST_HTML_INPUT).click(); - }); - - if (iterator.value.title) - $button.setAttr('title', iterator.value.title); - - //Mise en forme - $item.addContent( - new mel_html2(CONST_HTML_DIV, { - attribs: { - class: CUSTOM_THEME_CLASSES, - }, - contents: [$input, $button], - }), - ); - $item.css(CONST_CSS_DISPLAY, CONST_CSS_DISPLAY_FLEX).attribs[ - CONST_ATTRIB_CLASS - ] = - ($item.attribs[CONST_ATTRIB_CLASS] || EMPTY_STRING) + - ` ${CUSTOM_THEME_PARENT_DIV_CLASS}`; - $item = new mel_html2(CONST_HTML_DIV, { - attribs: { - style: `${CONST_CSS_DISPLAY}${CONST_CSS_ASSIGN}${CONST_CSS_DISPLAY_FLEX}`, - }, - }) - .addClass(CUSTOM_THEME_CLASSES_PIC) - .appendTo($item); - } else if (iterator.value.title) { - $item.setAttr('title', iterator.value.title); - } - - //Ajout des classes et du fonctionnement des boutons - $item.addClass(THEME_CLASSES); - $item.attribs[DATA_PIC_ID] = iterator.key; - - const isCustom = - !!iterator.value.userprefid && !!iterator.value.background; - if (true === iterator.value.isThemeColor) { - $item.addClass(THEME_DEFAULT_CLASS); - } else { - $item.attribs[DATA_PIC_PATH] = iterator.value.background; - $item - .css( - CONST_CSS_BACKGROUND_IMAGE, - `${CONST_CSS_BACKGROUND_URL}(${isCustom ? iterator.value.background : iterator.value.view})`, - ) - .css(CONST_CSS_BACKGROUND_SIZE, CONST_CSS_BACKGROUND_SIZE_COVER) - .css( - CONST_CSS_BACKGROUND_POSITION, - CONST_CSS_BACKGROUND_POSITION_CENTER, - ); - if (isCustom) $item.attribs[DATA_IS_CUSTOM] = true; - } - - $item.onclick.push(e => { - e = $(e.currentTarget); - $pannel - .find(CONST_SELECTOR_THEME_BADGE_SELECTED) - .css(CONST_CSS_DISPLAY, CONST_CSS_NONE); - $pannel - .find(CONST_SELECTOR_SELECTED) - .removeClass(CONST_CLASS_SELECTED); - e.addClass(CONST_CLASS_SELECTED); - const data = e.data(THEME_ATTRIB_DATA_PATH); - const isCustom = e.data(THEME_ATTRIB_DATA_IS_CUSTOM); - - try { - this.css_rules.remove(RULE_KEY); - } catch (error) {} - - if (data) { - this._add_background(data, isCustom); - $(CONST_HTML_HTML).addClass(CONST_CLASS_HTML_HAS_PICTURE); - } else { - $(CONST_HTML_HTML).removeClass(CONST_CLASS_HTML_HAS_PICTURE); - } - - this.onthemeclick(e.parent()); - - this.set_theme_picture(e.data(THEME_ATTRIB_DATA_ID)); - }); - - //Effectuer les actions de séléction si il s'agit du thèmes en cours - if ( - this.theme_selected_picture === null || - iterator.key === this.theme_selected_picture - ) { - $item.addClass(CONST_CLASS_SELECTED); - $item.parent.aftergenerate.push($generated => { - this.onthemeclick($generated); - }); - - if ( - this.theme_selected_picture === null || - !iterator.value.background - ) { - this.theme_selected_picture = iterator.key; - this.css_rules.remove(RULE_KEY); - } else { - this._add_background(iterator.value.background, isCustom); - $(CONST_HTML_HTML).addClass(CONST_CLASS_HTML_HAS_PICTURE); - } - } - } //FIN FOR - - $mainrow.create($pannel); - - return this; - } - - _resize_themes() { - const size = - $('#theme-panel .container').height() + - $('#groupoptions-user .container.menu').height() + - 60 + - 30; - $('#theme-panel .themescontents').css( - 'max-height', - `${window.innerHeight - size}px`, - ); - } - - _add_background(path, isRule) { - this.css_rules.addAdvanced( - 'barup-background', - '.barup', - `background-image:url(${isRule ? path : (window.location.origin + window.location.pathname + path.replace('./', '/')).replaceAll('://', '¤').replaceAll('//', '/').replaceAll('¤', '://')})!important`, - 'background-size: cover !important', - 'background-position: center !important', - ); - return this; - } - - async update_custom_picture(datas, pref) { - await mel_metapage.Functions.post( - mel_metapage.Functions.url( - 'mel_metapage', - 'plugin.update_custom_picture', - ), - { - _datas: datas, - _prefid: pref, - }, - datas => { - const VALIDATION = 'ok'; - if (VALIDATION === datas) { - rcmail.display_message( - 'Image chargée avec succès !', - 'confirmation', - ); - } - }, - ); - } - - async set_theme_picture(id) { - this.theme_selected_picture = id || null; - - if (this.theme_selected_picture !== null) { - await mel_metapage.Functions.post( - mel_metapage.Functions.url( - 'mel_metapage', - 'plugin.update_theme_picture', - ), - { - _id: id, - }, - datas => { - const VALIDATION = 'ok'; - if (VALIDATION === datas) { - rcmail.display_message( - 'Image changée avec succès !', - 'confirmation', - ); - } - }, - ); - } - } - - get_theme_picture() { - return this.theme_selected_picture; - } - - /** - * Différentes actions à faire après l'initialisation. - * @returns {Mel_Elastic} Chaînage - */ - setup() { - if (rcmail === undefined) return this; - - return this.setup_html() - .setup_nav() - .setup_tasks() - .setup_search() - .setup_other_apps() - .setup_calendar(); - } - - /** - * Met en place l'apparence et le fonctionnel de la barre de navigation principale - * @returns {Mel_Elastic} Chaînage - */ - setup_nav() { - if (parent === window) { - //La sidebar étant en position absolue, on décale certaines divs pour que l'affichage soit correct. - const width = '60px'; - - if (!this.IS_EXTERNE && $('#layout-sidebar').length > 0) - $('#layout-sidebar').css('margin-left', width); - else if (!this.IS_EXTERNE && $('#layout-content').length > 0) - $('#layout-content').css('margin-left', width); - } - - let $taskmenu = $('#taskmenu'); - if ($taskmenu.length > 0) { - if (this._hide_main_menu) { - $('#layout-menu').remove(); - } else { - //On met dans l'ordre les différents boutons de la barre de navigation principale - let array = []; - $taskmenu.find('a').each((i, e) => { - e = $(e); - - if (e.parent().hasClass('special-buttons')) return; - - // if (e.hasClass('settings')) { - // e.css('display', 'none'); - // return; - // } - - const order = e.css('order'); - const tmp = e.removeAttr('title')[0].outerHTML; - e.remove(); - e = null; - array.push({ - order: order, - item: $(tmp).keypress(event => { - if (event.originalEvent.keyCode === 32) - $(event.currentTarget).click(); - }), - }); - }); - - $taskmenu.append('
      '); - - let li; - Enumerable.from(array) - .orderBy(x => parseInt(x.order)) - .forEach(e => { - li = $( - `
    • `, - ); - e.item.attr('data-order', e.order); - e = e.item; - if ( - e.css('display') === 'none' || - e.hasClass('hidden') || - e.hasClass('compose') - ) - li.css('display', 'none'); - - e.appendTo(li); - li.appendTo($('#taskmenu ul')); - }); - - li = null; - - let $taskMenu = $('#taskmenu .menu-last-frame').attr( - 'tabIndex', - '-1', - ); - - if (true !== rcmail.env.menu_last_frame_enabled) - $taskMenu.parent().css(CONST_CSS_DISPLAY, CONST_CSS_NONE); - - //On supprime le stockage si on y a pas accès. - if (!mel_metapage.Functions.stockage.is_stockage_active()) - $('#taskmenu .stockage').parent().remove(); - } - } - - return this.update_main_nav_meca(); - } - - update_main_nav_meca() { - let $menu = $('#layout-menu'); - if ($menu.length > 0) { - if (!rcmail.env.main_nav_can_deploy) { - $menu - .addClass('main-nav-cannot-deploy') - .find('a') - .each((index, element) => { - element = $(element); - element.attr('title', element.find('span').first().text()); - }); - } else { - $menu - .removeClass('main-nav-cannot-deploy') - .find('a') - .each((index, element) => { - element = $(element); - element.removeAttr('title'); - }); - } - } - - $menu = $('#otherapps'); - if ($menu.length > 0) { - if (!rcmail.env.main_nav_can_deploy) { - $menu.find('a').each((index, element) => { - element = $(element); - element.attr('title', element.find('span').first().text()); - }); - } else { - $menu.find('a').each((index, element) => { - element = $(element); - element.removeAttr('title'); - }); - } - } - - $menu = null; - - return this; - } - - /** - * Met en place les actions pour les tâches qui en ont besoins. - * @returns {Mel_Elastic} Chaînage - */ - setup_tasks() { - try { - //Gérer le texte du bouton de login. - if (rcmail.env.task == 'login' || rcmail.env.task == 'logout') - $('#rcmloginsubmit').val('Se connecter').html('Se connecter'); - - //Revenir à la liste des mails sans rafraîchir la page. - if ( - rcmail.env.task === 'mail' && - rcmail.env.action === 'show' && - !this.IS_EXTERNE - ) { - $( - '
    • Retour
    • ', - ) - .on('click', () => { - window.location.href = this.url('mail'); - }) - .prependTo($('#toolbar-menu')); - } - } catch (error) {} - - try { - //Gérer le changement de mot de passe dans le login. - $('#login-form p.formbuttons a').click(() => { - event.preventDefault(); - window.location.href = window.location.href.replaceAll( - '/changepassword/index.php', - '', - ); - }); - } catch (error) { - console.error(error); - } - - return this.setup_mails().setup_adressbook(); - } - - /** - * Met en place les mails. - * @returns {Mel_Elastic} Chaînage - */ - setup_mails() { - if (rcmail.env.task === 'mail' && $('#mailsearchform').length > 0) { - $('#mailsearchform') - .parent() - .parent() - .find('.unread') - .on('click', e => { - if (!$(e.target).hasClass('selected')) - $(e.target).attr('title', 'Afficher tout les courriels'); - else $(e.target).attr('title', rcmail.gettext('showunread')); - }); - } - - if (rcmail.env.task === 'mail') { - $('.header-content a.headers').remove(); - - $('.task-mail #quotadisplay') - .prepend(`Espace de stockage

      { + let dosomething = callback_click ? callback_click(e) : true; + if (!dosomething) return; + + e = $(e.currentTarget); + $panel + .find(CONST_SELECTOR_THEME_BADGE_SELECTED) + .css(CONST_CSS_DISPLAY, CONST_CSS_NONE); + $panel + .find(`${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTABLE}`) + .removeClass(CONST_CLASS_SELECTED) + .attr(CONST_ATTRIB_ARIA_PRESSED, false); + e.addClass(CONST_CLASS_SELECTED).attr( + CONST_ATTRIB_ARIA_PRESSED, + true, + ); + + this.onthemeclick(e.parent()); + + this.update_theme(e.data('name')); + this._update_theme_color(); + }); + html_main_div = new mel_html2(CONST_HTML_DIV, { + attribs: { + class: THEME_MAIN_CLASS_COL, + style: STYLE_THEME_BUTTON_PARENT, + }, + contents: [html_theme], + }); + html_main_div.css('position', 'flex'); + + if (iterator.value.saison) { + html_main_div.addContent( + new mel_html( + CONST_HTML_SPAN, + { class: 'theme-saison-date' }, + `${iterator.value.saison.start} - ${iterator.value.saison.end}`, + ), + ); + } + + //Ajouter à la DIV des thèmes, le bouton de thème dans une div "col-6" + html.addContent(html_main_div); + } + + //Après la génération de la liste des thèmes, appliquer les effets visuels sur le thème selectionné. + html.aftergenerate.push((generated) => { + if ($panel.length !== 0) + this.onthemeclick( + generated + .find(`${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTED}`) + .parent(), + ); + }); + } + } + + let $theme_button = $( + `${CONST_JQUERY_SELECTOR_ID}${CONST_THEME_BUTTON_ID}`, + ); + + if (top === window) { + //Si on est en Top & que le bouton de thème existe + if (html.count() > 1) { + //Si il y + d'un thème, on active les propriétés du bouton + if (!this.theme_button_activated) { + this.theme_button_activated = true; + $theme_button.click(($e) => { + $e = $($e.currentTarget); + + if (!$e.hasClass(THEME_BUTTON_CLASS_ACTIVE)) { + $e.addClass(THEME_BUTTON_CLASS_ACTIVE).html( + THEME_BUTTON_ICON_ACTIVE, + ); + $e.attr({ + title: rcmail.gettext( + 'back_to_notifications', + 'mel_metapage', + ), + }); + $(SELECTOR_NOTIFICATION_PANEL).css( + CONST_CSS_DISPLAY, + CONST_CSS_NONE, + ); + $(SELECTOR_THEME_PANEL).css(CONST_CSS_DISPLAY, EMPTY_STRING); + this._resize_themes(); + } else { + $e.removeClass(THEME_BUTTON_CLASS_ACTIVE).html( + THEME_BUTTON_ICON_INACTIVE, + ); + $e.attr({ + title: rcmail.gettext('change_theme', 'mel_metapage'), + }); + $(SELECTOR_NOTIFICATION_PANEL).css( + CONST_CSS_DISPLAY, + EMPTY_STRING, + ); + $(SELECTOR_THEME_PANEL).css(CONST_CSS_DISPLAY, CONST_CSS_NONE); + } + }); + } + + if ($panel.length !== 0) html.create($panel); + } else { + //Sinon, on le désactive + $theme_button + .addClass(CONST_ATTRIB_DISABLED) + .attr(CONST_ATTRIB_DISABLED, CONST_ATTRIB_DISABLED); + } + } else if ( + rcmail.env.task === 'settings' && + parent.MEL_ELASTIC_UI.color_mode() !== this.color_mode() + ) { + if (parent.MEL_ELASTIC_UI.color_mode() === 'dark') { + if (this.themes[this.theme]?.custom_dark_mode) + $('html').addClass('dark-mode-custom'); + else $('html').addClass('dark-mode'); + } else + $('html').removeClass('dark-mode-custom').removeClass('dark-mode'); + } + + if ($('#rcmfd-toggle-anims').length > 0) { + //Affichage du bouton de thème + if (!this.themes[this.theme].animation_class) { + $('#rcmfd-toggle-anims') + .addClass('disabled') + .attr('disabled', 'disabled') + .parent() + .parent() + .css({ opacity: 0, position: 'absolute' }); + } else { + $('#rcmfd-toggle-anims') + .removeClass('disabled') + .removeAttr('disabled') + .parent() + .parent() + .css({ opacity: '', position: '' }); + } + + let current = this.themes[this.theme]; + + if (current.animation_class) { + if ( + rcmail.env.animation_enabled ?? + current.animation_enabled_by_default + ) { + $('body').addClass(current.animation_class); + $('#rcmfd-toggle-anims')[0].checked = false; + } else $('#rcmfd-toggle-anims')[0].checked = true; + } + } + + return this._update_theme_color(); + } + + init_theme_tabs({ + tabs_div_selector = CONST_SELECTOR_THEME_PANEL_TAB_DIV, + $themePannel = $(CONST_SELECTOR_THEME_PANEL_CONTENT_DEFAULT), + tabs = CONST_TABS_LIST, + }) { + const CLASS_TAB = 'mel-tab'; + const NAMESPACE = 'tab-meltheme'; + const CLASS_TAB_HEADER = 'mel-tabheader'; + const CLASS_TAB_CONTENT = 'mel-tab-content'; + const TAB_ACTIVE = 'active'; + const TAB_LAST = 'last'; + const CLASS_CONTENTS = 'themescontents'; + + let themeIndex = null; + let $tabs = $(tabs_div_selector).html(EMPTY_STRING); + + if ($tabs.length === 0) return tabs; + + for (let index = 0, len = tabs.length; index < len; ++index) { + //On génère les onglets + const element = tabs[index]; + new mel_html( + CONST_HTML_DIV, + { + id: element.id, + class: `${NAMESPACE} ${CLASS_TAB} ${CLASS_TAB_HEADER} ${index === 0 ? TAB_ACTIVE : len - 1 === index ? TAB_LAST : EMPTY_STRING}`, + }, + element.display, + ).create($tabs); + + if (CONST_TAB_THEME_ID === element.id) themeIndex = index; + } + + let $pannelParent = $themePannel.parent(); + let $contents = new mel_html2(CONST_HTML_DIV, { + attribs: { + class: CLASS_CONTENTS, + tabindex: 0, + }, + }); + + //Passer les thèmes dans le panel des thèmes + if (themeIndex !== null) { + let $divThemes = new mel_html(CONST_HTML_DIV, { + class: `${tabs[themeIndex].id} ${NAMESPACE} ${CLASS_TAB_CONTENT}`, + }); + $contents.addContent($divThemes); + $divThemes.aftergenerate.push(($generated) => { + $themePannel.appendTo($generated); + }); + } + + //Ajout des onglets et apnneaux supplémentaires + for (let index = 0, len = tabs.length; index < len; ++index) { + const element = tabs[index]; + if (!element.already) { + $contents.addContent( + new mel_html(CONST_HTML_DIV, { + class: `${element.id} ${NAMESPACE} ${CLASS_TAB_CONTENT}`, + style: `${CONST_CSS_DISPLAY}${CONST_CSS_ASSIGN}${CONST_CSS_NONE}${CONST_CSS_SEPARATOR}`, + }), + ); + } + } + + $contents.create($pannelParent); + + return tabs; + } + + init_theme_pictures({ + picturePannel = '#theme-panel .theme-pannel-tab-pictures', + picturesToIgnore = [], + picturesToAdd = [], + }) { + const CLASS_PARENT_DIV = `${CONST_CLASS_COL}-4`; + const CLASS_PARENT_HOVER = 'hovered'; + const CUSTOM_THEME_CLASSES = + 'input-top-selectable mel-resize-ok half-resize'; + const CUSTOM_THEME_PARENT_DIV_CLASS = 'div-custom-picture px-1'; + const CUSTOM_THEME_CLASSES_PIC = 'half-resize'; + const INPUT_CLASS = 'hidden'; + const INPUT_ACCEPT = ['.png', '.jpg', '.svg', '.gif'].join(','); + const THEME_ATTRIB_DATA_USER_PREF_ID = 'prefid'; + const THEME_ATTRIB_DATA_PATH = 'picpath'; + const THEME_ATTRIB_DATA_ID = 'picid'; + const THEME_ATTRIB_DATA_IS_CUSTOM = 'iscustom'; + const THEME_DEFAULT_CLASS = 'barup-background-color'; + const THEME_CLASSES = 'mel-selectable picture mel-resize-ok'; + const RULE_KEY = 'barup-background'; + const DATA_PIC_ID = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_ID}`; + const DATA_PIC_PATH = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_PATH}`; + const DATA_IS_CUSTOM = `${CONST_ATTRIB_DATA}-${THEME_ATTRIB_DATA_IS_CUSTOM}`; + const CONST_SELECTOR_SELECTED = `${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTED}`; + const STYLE = 'padding:0 5px;'; + let $pannel = $(picturePannel); + + if ($pannel.length === 0) return this; + const pictures = rcmail.env.mel_themes_pictures; + let $item; + /** + * Contient la liste des images + * @type {mel_html2} + */ + let $mainrow = new mel_html2(CONST_HTML_DIV, { + attribs: { + class: CONST_CLASS_ROW, + style: STYLE, + }, + }); + this.theme_selected_picture = rcmail.env.theme_selected_picture || null; + + for (const iterator of Enumerable.from(pictures) + .where((x) => !picturesToIgnore.includes(x.key)) + .concat(picturesToAdd) + .orderBy((x) => + x.value.isFirst === true + ? Number.NEGATIVE_INFINITY + : x.value.customOrder || Number.POSITIVE_INFINITY, + )) { + //Div de position + $item = new mel_html2(CONST_HTML_DIV, { + attribs: { + class: CLASS_PARENT_DIV, + style: STYLE, + }, + }).appendTo($mainrow); + //Vrai DIV + $item = new mel_html2(CONST_HTML_DIV, {}).appendTo($item); + + //Si c'est on peux choisir une image custom + if (iterator.value.userprefid) { + /** + * Input caché + * @type {mel_input} + */ + var $input = new mel_input({ + class: INPUT_CLASS, + type: CONST_ATTRIB_TYPE_FILE, + accept: INPUT_ACCEPT, + 'data-prefid': iterator.value.userprefid, + }); + + //MAJ de l'image + $input.onchange.push((ev) => { + ev = $(ev.currentTarget); + const prefid = ev.data(THEME_ATTRIB_DATA_USER_PREF_ID); + const file = ev[0].files[0]; + var reader = new FileReader(); + reader.onload = (e) => { + const picture = e.target.result; + const size = + mel_metapage.Functions.calculateObjectSizeInMo(picture); + + if (size < 2) { + this.update_custom_picture(picture, prefid); + let $selectable = ev + .parent() + .parent() + .find( + `${CONST_JQUERY_SELECTOR_CLASS}${CONST_CLASS_SELECTABLE}`, + ) + .removeClass(THEME_DEFAULT_CLASS) + .css( + CONST_CSS_BACKGROUND_IMAGE, + `${CONST_CSS_BACKGROUND_URL}(${picture})`, + ) + .css( + CONST_CSS_BACKGROUND_SIZE, + CONST_CSS_BACKGROUND_SIZE_COVER, + ) + .data(THEME_ATTRIB_DATA_PATH, picture) + .data(THEME_ATTRIB_DATA_IS_CUSTOM, true); + + if ( + $selectable.data(THEME_ATTRIB_DATA_ID) === + this.get_theme_picture() + ) { + this.css_rules.remove(RULE_KEY); + this._add_background(picture, true); + } + } else { + rcmail.display_message( + 'Votre image est trop lourde !', + 'error', + ); + } + }; + reader.readAsDataURL(file); + }); + //Bouton qui sert à cliquer sur l'input + var $icon = new mel_html( + 'span', + { class: 'material-symbols-outlined' }, + 'upload', + ); + var $button = new mel_button({}, $icon.toString()); + $button.onmouseover.push((e) => { + $(e.currentTarget).parent().addClass(CLASS_PARENT_HOVER); + }); + $button.onmouseout.push((e) => { + $(e.currentTarget).parent().removeClass(CLASS_PARENT_HOVER); + }); + $button.onclick.push((e) => { + $(e.currentTarget).parent().find(CONST_HTML_INPUT).click(); + }); + + if (iterator.value.title) + $button.setAttr('title', iterator.value.title); + + //Mise en forme + $item.addContent( + new mel_html2(CONST_HTML_DIV, { + attribs: { + class: CUSTOM_THEME_CLASSES, + }, + contents: [$input, $button], + }), + ); + $item.css(CONST_CSS_DISPLAY, CONST_CSS_DISPLAY_FLEX).attribs[ + CONST_ATTRIB_CLASS + ] = + ($item.attribs[CONST_ATTRIB_CLASS] || EMPTY_STRING) + + ` ${CUSTOM_THEME_PARENT_DIV_CLASS}`; + $item = new mel_html2(CONST_HTML_DIV, { + attribs: { + style: `${CONST_CSS_DISPLAY}${CONST_CSS_ASSIGN}${CONST_CSS_DISPLAY_FLEX}`, + }, + }) + .addClass(CUSTOM_THEME_CLASSES_PIC) + .appendTo($item); + } else if (iterator.value.title) { + $item.setAttr('title', iterator.value.title); + } + + //Ajout des classes et du fonctionnement des boutons + $item.addClass(THEME_CLASSES); + $item.attribs[DATA_PIC_ID] = iterator.key; + + const isCustom = + !!iterator.value.userprefid && !!iterator.value.background; + if (iterator.value.isThemeColor === true) { + $item.addClass(THEME_DEFAULT_CLASS); + } else { + $item.attribs[DATA_PIC_PATH] = iterator.value.background; + $item + .css( + CONST_CSS_BACKGROUND_IMAGE, + `${CONST_CSS_BACKGROUND_URL}(${isCustom ? iterator.value.background : iterator.value.view})`, + ) + .css(CONST_CSS_BACKGROUND_SIZE, CONST_CSS_BACKGROUND_SIZE_COVER) + .css( + CONST_CSS_BACKGROUND_POSITION, + CONST_CSS_BACKGROUND_POSITION_CENTER, + ); + if (isCustom) $item.attribs[DATA_IS_CUSTOM] = true; + } + + $item.onclick.push((e) => { + e = $(e.currentTarget); + $pannel + .find(CONST_SELECTOR_THEME_BADGE_SELECTED) + .css(CONST_CSS_DISPLAY, CONST_CSS_NONE); + $pannel + .find(CONST_SELECTOR_SELECTED) + .removeClass(CONST_CLASS_SELECTED); + e.addClass(CONST_CLASS_SELECTED); + const data = e.data(THEME_ATTRIB_DATA_PATH); + const isCustom = e.data(THEME_ATTRIB_DATA_IS_CUSTOM); + + try { + this.css_rules.remove(RULE_KEY); + } catch (error) {} + + if (data) { + this._add_background(data, isCustom); + $(CONST_HTML_HTML).addClass(CONST_CLASS_HTML_HAS_PICTURE); + } else { + $(CONST_HTML_HTML).removeClass(CONST_CLASS_HTML_HAS_PICTURE); + } + + this.onthemeclick(e.parent()); + + this.set_theme_picture(e.data(THEME_ATTRIB_DATA_ID)); + }); + + //Effectuer les actions de séléction si il s'agit du thèmes en cours + if ( + this.theme_selected_picture === null || + iterator.key === this.theme_selected_picture + ) { + $item.addClass(CONST_CLASS_SELECTED); + $item.parent.aftergenerate.push(($generated) => { + this.onthemeclick($generated); + }); + + if ( + this.theme_selected_picture === null || + !iterator.value.background + ) { + this.theme_selected_picture = iterator.key; + this.css_rules.remove(RULE_KEY); + } else { + this._add_background(iterator.value.background, isCustom); + $(CONST_HTML_HTML).addClass(CONST_CLASS_HTML_HAS_PICTURE); + } + } + } //FIN FOR + + $mainrow.create($pannel); + + return this; + } + + _resize_themes() { + const size = + $('#theme-panel .container').height() + + $('#groupoptions-user .container.menu').height() + + 60 + + 30; + $('#theme-panel .themescontents').css( + 'max-height', + `${window.innerHeight - size}px`, + ); + } + + _add_background(path, isRule) { + this.css_rules.addAdvanced( + 'barup-background', + '.barup', + `background-image:url(${isRule ? path : (window.location.origin + window.location.pathname + path.replace('./', '/')).replaceAll('://', '¤').replaceAll('//', '/').replaceAll('¤', '://')})!important`, + 'background-size: cover !important', + 'background-position: center !important', + ); + return this; + } + + async update_custom_picture(datas, pref) { + await mel_metapage.Functions.post( + mel_metapage.Functions.url( + 'mel_metapage', + 'plugin.update_custom_picture', + ), + { + _datas: datas, + _prefid: pref, + }, + (datas) => { + const VALIDATION = 'ok'; + if (VALIDATION === datas) { + rcmail.display_message( + 'Image chargée avec succès !', + 'confirmation', + ); + } + }, + ); + } + + async set_theme_picture(id) { + this.theme_selected_picture = id || null; + + if (this.theme_selected_picture !== null) { + await mel_metapage.Functions.post( + mel_metapage.Functions.url( + 'mel_metapage', + 'plugin.update_theme_picture', + ), + { + _id: id, + }, + (datas) => { + const VALIDATION = 'ok'; + if (VALIDATION === datas) { + rcmail.display_message( + 'Image changée avec succès !', + 'confirmation', + ); + } + }, + ); + } + } + + get_theme_picture() { + return this.theme_selected_picture; + } + + /** + * Différentes actions à faire après l'initialisation. + * @returns {Mel_Elastic} Chaînage + */ + setup() { + if (rcmail === undefined) return this; + + return this.setup_html() + .setup_nav() + .setup_tasks() + .setup_search() + .setup_other_apps() + .setup_calendar() + .setup_settings(); + } + + /** + * Met en place l'apparence et le fonctionnel de la barre de navigation principale + * @returns {Mel_Elastic} Chaînage + */ + setup_nav() { + if (parent === window) { + //La sidebar étant en position absolue, on décale certaines divs pour que l'affichage soit correct. + const width = '60px'; + + if (!this.IS_EXTERNE && $('#layout-sidebar').length > 0) + $('#layout-sidebar').css('margin-left', width); + else if (!this.IS_EXTERNE && $('#layout-content').length > 0) + $('#layout-content').css('margin-left', width); + } + + let $taskmenu = $('#taskmenu'); + if ($taskmenu.length > 0) { + if (this._hide_main_menu) { + $('#layout-menu').remove(); + } else { + //On met dans l'ordre les différents boutons de la barre de navigation principale + let array = []; + $taskmenu.find('a').each((i, e) => { + e = $(e); + + if (e.parent().hasClass('special-buttons')) return; + + // if (e.hasClass('settings')) { + // e.css('display', 'none'); + // return; + // } + + const order = e.css('order'); + const tmp = e.removeAttr('title')[0].outerHTML; + e.remove(); + e = null; + array.push({ + order: order, + item: $(tmp).keypress((event) => { + if (event.originalEvent.keyCode === 32) + $(event.currentTarget).click(); + }), + }); + }); + + $taskmenu.append('

        '); + + let li; + Enumerable.from(array) + .orderBy((x) => parseInt(x.order)) + .forEach((e) => { + li = $( + `
      • `, + ); + e.item.attr('data-order', e.order); + e = e.item; + if ( + e.css('display') === 'none' || + e.hasClass('hidden') || + e.hasClass('compose') + ) + li.css('display', 'none'); + + e.appendTo(li); + li.appendTo($('#taskmenu ul')); + }); + + li = null; + + let $taskMenu = $('#taskmenu .menu-last-frame').attr( + 'tabIndex', + '-1', + ); + + if (rcmail.env.menu_last_frame_enabled !== true) + $taskMenu.parent().css(CONST_CSS_DISPLAY, CONST_CSS_NONE); + + //On supprime le stockage si on y a pas accès. + if (!mel_metapage.Functions.stockage.is_stockage_active()) + $('#taskmenu .stockage').parent().remove(); + } + } + + return this.update_main_nav_meca(); + } + + update_main_nav_meca() { + let $menu = $('#layout-menu'); + if ($menu.length > 0) { + if (!rcmail.env.main_nav_can_deploy) { + $menu + .addClass('main-nav-cannot-deploy') + .find('a') + .each((index, element) => { + element = $(element); + element.attr('title', element.find('span').first().text()); + }); + } else { + $menu + .removeClass('main-nav-cannot-deploy') + .find('a') + .each((index, element) => { + element = $(element); + element.removeAttr('title'); + }); + } + } + + $menu = $('#otherapps'); + if ($menu.length > 0) { + if (!rcmail.env.main_nav_can_deploy) { + $menu.find('a').each((index, element) => { + element = $(element); + element.attr('title', element.find('span').first().text()); + }); + } else { + $menu.find('a').each((index, element) => { + element = $(element); + element.removeAttr('title'); + }); + } + } + + $menu = null; + + return this; + } + + /** + * Met en place les actions pour les tâches qui en ont besoins. + * @returns {Mel_Elastic} Chaînage + */ + setup_tasks() { + try { + //Gérer le texte du bouton de login. + if (rcmail.env.task == 'login' || rcmail.env.task == 'logout') + $('#rcmloginsubmit').val('Se connecter').html('Se connecter'); + + //Revenir à la liste des mails sans rafraîchir la page. + if ( + rcmail.env.task === 'mail' && + rcmail.env.action === 'show' && + !this.IS_EXTERNE + ) { + $( + '
      • Retour
      • ', + ) + .on('click', () => { + window.location.href = this.url('mail'); + }) + .prependTo($('#toolbar-menu')); + } + } catch (error) {} + + try { + //Gérer le changement de mot de passe dans le login. + $('#login-form p.formbuttons a').click(() => { + event.preventDefault(); + window.location.href = window.location.href.replaceAll( + '/changepassword/index.php', + '', + ); + }); + } catch (error) { + console.error(error); + } + + return this.setup_mails().setup_adressbook(); + } + + /** + * Met en place les mails. + * @returns {Mel_Elastic} Chaînage + */ + setup_mails() { + if (rcmail.env.task === 'mail' && $('#mailsearchform').length > 0) { + $('#mailsearchform') + .parent() + .parent() + .find('.unread') + .on('click', (e) => { + if (!$(e.target).hasClass('selected')) + $(e.target).attr('title', 'Afficher tout les courriels'); + else $(e.target).attr('title', rcmail.gettext('showunread')); + }); + } + + if (rcmail.env.task === 'mail') { + $('.header-content a.headers').remove(); + + $('.task-mail #quotadisplay') + .prepend(`Espace de stockage

        `); - //Gérer la prévisu des mails. - rcmail.show_contentframe_parent = rcmail.show_contentframe; - rcmail.show_contentframe = function (show) { - //On ne fait rien si en mode small ou phone - if ( - show && - ($('html').hasClass('layout-small') || - $('html').hasClass('layout-phone')) - ) { - rcmail.show_contentframe_parent(show); - $('#layout-content') - .css('display', '') - .removeClass('layout-hidden'); - return; - } - - if (rcmail.env.is_from_scroll === true) - delete rcmail.env.is_from_scroll; - else if ($('#layout-list').hasClass('initial') && show) { - rcmail.triggerEvent('ui.open-mail-visu'); - //Mise en place du système - $('#layout-content') - .css('display', '') - .removeClass('hidden layout-hidden'); - $('#layout-list').removeClass('initial'); - - //On réduit la recherche au besoin - $('#mailsearchlist') - .addClass('hoverable') - .on('mouseover focusin', () => { - if ( - $('#mailsearchlist').hasClass('hoverable') && - !$('#layout-list').hasClass('full') - ) - $('#mailsearchlist').removeClass('hoverable'); - }) - .on('mouseleave focusout', () => { - if (document.activeElement === $('#mailsearchform')[0]) return; - - if ( - !$('#mailsearchlist').hasClass('hoverable') && - !$('#layout-list').hasClass('full') - ) - $('#mailsearchlist').addClass('hoverable'); - }) - .find('#mailsearchform') - .on('focusout', e => { - if (e.relatedTarget === $('#mailsearchlist .reset')[0]) return; - - if ( - !$('#mailsearchlist').hasClass('hoverable') && - !$('#layout-list').hasClass('full') - ) - $('#mailsearchlist').addClass('hoverable'); - }); - - let $back = ``; - $('#layout-content ul#toolbar-menu').prepend($back); - - $('#layout-content .header .move.simplified').css( - 'display', - 'none', - ); - - //Fermer la prévisu - rcmail.register_command( - 'close-mail-visu', - args => { - const { ignore_select } = args; - - if (!ignore_select) - $('#messagelist-content .selected') - .removeClass('selected') - .removeClass('focused') - .removeAttr('aria-selected') - .find('.selection input') - .click(); - - $('#layout-content') - .css('display', 'none') - .addClass('hidden layout-hidden'); - $('#layout-list').addClass('full'); - - $('#mailsearchlist').removeClass('hoverable'); - - rcmail.triggerEvent('ui.close-mail-visu'); - }, - true, - ); - } else if ($('#layout-list').hasClass('full') && show) { - //Afficher ou fermer - $('#layout-content') - .css('display', '') - .removeClass('hidden') - .removeClass('layout-hidden'); - $('#layout-list').removeClass('full'); - - $('#mailsearchlist').addClass('hoverable'); - - rcmail.triggerEvent('ui.open-mail-visu'); - } - - rcmail.show_contentframe_parent(show); - - let hidden = $( - '#layout-content .header #toolbar-menu .hidden-item-mt a', - ); - if (hidden.length > 0) { - hidden.each(async (i, e) => { - let a = $(`#message-menu #${e.id}`); - if (a.hasClass('disabled') && !$(e).hasClass('disabled')) - a.removeClass('disabled'); - else if (!a.hasClass('disabled') && $(e).hasClass('disabled')) - a.addClass('disabled'); - }); - } - }; ///////// - - if (rcmail.env.action === 'compose') { - //Ajouter "Envoyer" en haut. - $('.btn.btn-primary.send').remove(); - $('#toolbar-menu').prepend(` + $('#layout-content ul#toolbar-menu').prepend($back); + + $('#layout-content .header .move.simplified').css( + 'display', + 'none', + ); + + //Fermer la prévisu + rcmail.register_command( + 'close-mail-visu', + (args) => { + const { ignore_select } = args; + + if (!ignore_select) + $('#messagelist-content .selected') + .removeClass('selected') + .removeClass('focused') + .removeAttr('aria-selected') + .find('.selection input') + .click(); + + $('#layout-content') + .css('display', 'none') + .addClass('hidden layout-hidden'); + $('#layout-list').addClass('full'); + + $('#mailsearchlist').removeClass('hoverable'); + + rcmail.triggerEvent('ui.close-mail-visu'); + }, + true, + ); + } else if ($('#layout-list').hasClass('full') && show) { + //Afficher ou fermer + $('#layout-content') + .css('display', '') + .removeClass('hidden') + .removeClass('layout-hidden'); + $('#layout-list').removeClass('full'); + + $('#mailsearchlist').addClass('hoverable'); + + rcmail.triggerEvent('ui.open-mail-visu'); + } + + rcmail.show_contentframe_parent(show); + + let hidden = $( + '#layout-content .header #toolbar-menu .hidden-item-mt a', + ); + if (hidden.length > 0) { + hidden.each(async (i, e) => { + let a = $(`#message-menu #${e.id}`); + if (a.hasClass('disabled') && !$(e).hasClass('disabled')) + a.removeClass('disabled'); + else if (!a.hasClass('disabled') && $(e).hasClass('disabled')) + a.addClass('disabled'); + }); + } + }; ///////// + + if (rcmail.env.action === 'compose') { + //Ajouter "Envoyer" en haut. + $('.btn.btn-primary.send').remove(); + $('#toolbar-menu').prepend(`
      • Envoyer
      • `); - } else if (rcmail.env.action === '' || rcmail.env.action === 'index') { - rcmail.addEventListener('init', () => { - let i = 7; - let $aria = null; - - for (i; ($aria = $(`li[aria-level="${i}"] a`)).length > 0; ++i) { - $aria.css('padding-left', `${i * 1.5 - 2}em`); - } - }); - - //Gestion de l'apparence et de l'affichage des mails. - // add roundcube events - rcmail.addEventListener('insertrow', function (event) { - var rowobj = $(event.row.obj); - rowobj.find('.selection input').on('change', () => { - let hidden = $( - '#layout-content .header #toolbar-menu .hidden-item-mt a', - ); - if (hidden.length > 0) { - hidden.each(async (i, e) => { - let a = $(`#message-menu #${e.id}`); - if (a.hasClass('disabled') && !$(e).hasClass('disabled')) - a.removeClass('disabled'); - else if (!a.hasClass('disabled') && $(e).hasClass('disabled')) - a.addClass('disabled'); - }); - } - }); - }); - - $('#mailsearchlist .searchbar .reset').click(() => { - $('#mailsearchlist .searchbar .flag').removeClass('selected'); - }); - $('#mailsearchlist .searchbar .unread') - .click(() => { - $('#mailsearchlist .searchbar .flag').removeClass('selected'); - }) - .before( - $( - '', - ).click(e => { - const item = $(e.target); - - if (item.hasClass('selected')) item.removeClass('selected'); - else item.addClass('selected'); - - $(rcmail.gui_objects.search_filter).val( - !item.is('.selected') ? 'ALL' : 'FLAGGED', - ); - rcmail.command('search'); - }), - ); - - $('#toolbar-list-menu .compose') - .parent() - .prependTo($('#toolbar-list-menu .compose').parent().parent()); - - //Ajout de "plus" - $('#toolbar-list-menu').append( - $(` + } else if (rcmail.env.action === '' || rcmail.env.action === 'index') { + rcmail.addEventListener('init', () => { + let i = 7; + let $aria = null; + + for (i; ($aria = $(`li[aria-level="${i}"] a`)).length > 0; ++i) { + $aria.css('padding-left', `${i * 1.5 - 2}em`); + } + }); + + //Gestion de l'apparence et de l'affichage des mails. + // add roundcube events + rcmail.addEventListener('insertrow', function (event) { + var rowobj = $(event.row.obj); + rowobj.find('.selection input').on('change', () => { + let hidden = $( + '#layout-content .header #toolbar-menu .hidden-item-mt a', + ); + if (hidden.length > 0) { + hidden.each(async (i, e) => { + let a = $(`#message-menu #${e.id}`); + if (a.hasClass('disabled') && !$(e).hasClass('disabled')) + a.removeClass('disabled'); + else if (!a.hasClass('disabled') && $(e).hasClass('disabled')) + a.addClass('disabled'); + }); + } + }); + }); + + $('#mailsearchlist .searchbar .reset').click(() => { + $('#mailsearchlist .searchbar .flag').removeClass('selected'); + }); + $('#mailsearchlist .searchbar .unread') + .click(() => { + $('#mailsearchlist .searchbar .flag').removeClass('selected'); + }) + .before( + $( + '', + ).click((e) => { + const item = $(e.target); + + if (item.hasClass('selected')) item.removeClass('selected'); + else item.addClass('selected'); + + $(rcmail.gui_objects.search_filter).val( + !item.is('.selected') ? 'ALL' : 'FLAGGED', + ); + rcmail.command('search'); + }), + ); + + $('#toolbar-list-menu .compose') + .parent() + .prependTo($('#toolbar-list-menu .compose').parent().parent()); + + //Ajout de "plus" + $('#toolbar-list-menu').append( + $(` `).append($('#melplusmails').css('display', '')), - ); - - let test = new ResizeObserver(() => { - let value = 0; - { - let iterator; - for (iterator of $('#toolbar-list-menu li')) { - iterator = $(iterator); - if (!iterator.hasClass('marked')) { - value += iterator.width(); - } - } - iterator = null; - const additional_width = $( - '.header .toolbar-button.refresh', - ).width(); - value += additional_width + additional_width / 2.0; - } - const max = - $('#layout-list').width() - $('#mail-search-border').width(); //mailConfig === null || mailConfig["mel-icon-size"] === rcmail.gettext("normal", "mel_metapage") ? 370 : 347; //370; - - if (value > max) { - $('#toolbar-list-menu li') - .css('display', 'none') - .find('.compose') - .parent() - .css('display', ''); - $('#limelmailplusmenu').css('display', ''); - } else { - $('#toolbar-list-menu li').css('display', ''); - $('#limelmailplusmenu').css('display', 'none'); - } - - if ( - !$('html').hasClass('touch') && - $('#toolbar-list-menu').hasClass('hidden') - ) { - $('#toolbar-list-menu') - .removeClass('hidden') - .removeAttr('aria-hidden'); - } - - if ( - rcmail.env.search_initialized !== true && - window.innerWidth < 410 && - window.innerWidth > 0 - ) { - console.log( - 'hoverable observer', - rcmail.env.search_initialized, - window.innerWidth, - ); - rcmail.env.search_initialized = true; - $('#mailsearchlist') - .addClass('hoverable') - .click(e => { - //console.log("e", $("#mailsearchlist").hasClass("stopclick")); - if ($('#mailsearchlist').hasClass('stopclick')) { - $('#mailsearchlist').removeClass('stopclick'); - - if (!$('#mailsearchlist').hasClass('hoverable')) { - $('#mailsearchlist').addClass('hoverable'); - return; - } - } - - if (window.innerWidth < 410) { - $('#mailsearchlist').removeClass('hoverable'); - $('#mailsearchlist input').focus(); - } - }) - .find('input') - .on('focusout', e => { - if (window.innerWidth < 410) { - console.log('hoverable observer', e, window.innerWidth); - let parent = - e.relatedTarget === null ? null : $(e.relatedTarget); //e.originalEvent === null || e.originalEvent.explicitOriginalTarget === null ? null : $(e.originalEvent.explicitOriginalTarget); - while ( - parent !== null && - parent.attr('id') != 'mailsearchlist' && - parent[0].nodeName != 'BODY' && - !parent.hasClass('icon-mel-search') - ) { - parent = parent.parent(); - } - - if ( - parent === null || - parent.hasClass('icon-mel-search') || - parent[0].nodeName === 'BODY' - ) { - if (!!parent && parent.hasClass('icon-mel-search')) - $('#mailsearchlist').addClass('stopclick'); - else { - $('#mailsearchlist').addClass('hoverable'); - } - document.activeElement.blur(); - } - } - }); - } - }); - test.observe($('#layout-list')[0]); - - this.update_mail_css({}); - - //message_extwin @Rotomeca - const alias_mel_rcmail_show_message = rcmail.show_message; - rcmail.show_message = function (id, safe, preview) { - const openInPopUp = - !preview && !this.env.message_extwin && !this.env.extwin; - - if (openInPopUp) { - let url = this.params_from_uid(id, { - _caps: this.browser_capabilities(), - }); - - if (safe) url._safe = 1; - url._extwin = 1; - url = this.url('show', url); - new Windows_Like_PopUp(top.$('body'), { - title: "Ouverture d'un mail...", - content: `${MEL_ELASTIC_UI.create_loader('rotomecamelloader', true)[0].outerHTML}