Commit 87a56480 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge remote-tracking branch 'origin/master'

parents 8957b3fa ddcdedd9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ $actionsDev = [
    "build-tableaux-bord"   => "Reconstruction des tableaux de bord",
];

if ($oa->inDev()) {
if ($this->inDev()) {
    $actions = array_merge($actions, $actionsDev);
}

+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
class OseAdmin
{
    const OSE_ORIGIN  = 'https://git.unicaen.fr/open-source/OSE.git';
    const MIN_VERSION = 14; // version minimum installable
    const MIN_VERSION = 17; // version minimum installable

    private static ?OseAdmin         $instance    = null;

+8 −70
Original line number Diff line number Diff line
<?php

use Unicaen\OpenDocument\Calc;

/**
 * @var $this       \Application\View\Renderer\PhpRenderer
 * @var $controller \Laminas\Mvc\Controller\AbstractController
@@ -10,75 +8,15 @@ use Unicaen\OpenDocument\Calc;
 * @var $viewFile   string
 */

?>

<button onclick="ts()">Suceess</button>
<button onclick="te()">Error</button>

<script>


    function toast(message, severity) {
        const bgClasses = {
            info: 'bg-info',
            success: 'bg-success',
            warning: 'bg-warning',
            error: 'bg-danger'
        };
        const iconClasses = {
            info: 'info-circle',
            success: 'check-circle',
            warning: 'exclamation-circle',
            error: 'exclamation-triangle'
        };

        let toastContainer = document.getElementById('unicaen-vue-toast-container');
        if (!toastContainer) {
            toastContainer = document.createElement('div');
            toastContainer.id = 'unicaen-vue-toast-container';
            toastContainer.classList.add('toast-container', 'position-fixed', 'top-0', 'end-0', 'p-3');
            document.body.appendChild(toastContainer);
        }
$controller->flashMessenger()->addSuccessMessage('addSuccessMessage');
$controller->flashMessenger()->addInfoMessage('addInfoMessage');
$controller->flashMessenger()->addWarningMessage('addWarningMessage');
$controller->flashMessenger()->addErrorMessage('addErrorMessage');

        // Création de l'élément HTML pour le toast
        const toast = document.createElement('div');
        toast.classList.add('toast', 'show', 'text-white', bgClasses[severity] ? bgClasses[severity] : 'bg-secondary');
        toast.setAttribute('role', 'alert');
        toast.setAttribute('aria-live', 'assertive');
        toast.setAttribute('aria-atomic', 'true');
$messenger = $this->messenger();

        if (severity === 'error'){
            toast.setAttribute('style', 'width:100%');
        }
$messenger->addCurrentMessagesFromFlashMessengerWithNamespace('error');

        const toastContent =
            '<button class="btn-close btn-close-white h5" style="float:right" data-bs-dismiss="toast" aria-label="Close"></button>' +
            '<i class="icon fas fa-' + iconClasses[severity] + '" style="float: left;font-size: 26pt;padding-left: .4rem;margin-top:.4rem;padding-right: 1rem;"></i>' +
            '<div class="toast-body">' + message + '  </div>';
echo $messenger;


        toast.innerHTML = toastContent;

        // Ajout du toast à l'élément du conteneur de toasts
        toastContainer.appendChild(toast);

        // Affichage du toast
        //const bsToast = new bootstrap.Toast(toast);
        //bsToast.show();

        // Masquage du toast si ce n'est pas une erreur
        if (severity !== 'error') {
            // setTimeout(() => {
            //     toast.classList.remove('show');
            // }, 3000);
        }
    }

    $(() => {
        toast('mon success est phénoménal et j\'ai envie d\'en parler tout le temps mais ce serait bien trop long à expliquer et patati et patatta', 'success');
        toast('Et voici une info à ne pas rater!!', 'info');
        toast('Warning', 'warning');
        toast('Erreur magistrale!!!', 'error');
    });

</script>
?>
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
    ],
    "require"          : {
        "php"                                         : ">=8.0",
        "unicaen/app"                                 : "6.0.5",
        "unicaen/app"                                 : "6.0.6",
        "unicaen/authentification"                    : "6.0.3",
        "unicaen/privilege"                           : "6.0.1",
        "unicaen/utilisateur"                         : "6.0.4",
+40 −40
Original line number Diff line number Diff line
@@ -460,16 +460,16 @@
        },
        {
            "name": "doctrine/dbal",
            "version": "3.6.1",
            "version": "3.6.2",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/dbal.git",
                "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e"
                "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/57815c7bbcda3cd18871d253c1dd8cbe56f8526e",
                "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c",
                "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c",
                "shasum": ""
            },
            "require": {
@@ -485,9 +485,9 @@
                "doctrine/coding-standard": "11.1.0",
                "fig/log-test": "^1",
                "jetbrains/phpstorm-stubs": "2022.3",
                "phpstan/phpstan": "1.10.3",
                "phpstan/phpstan": "1.10.9",
                "phpstan/phpstan-strict-rules": "^1.5",
                "phpunit/phpunit": "9.6.4",
                "phpunit/phpunit": "9.6.6",
                "psalm/plugin-phpunit": "0.18.4",
                "squizlabs/php_codesniffer": "3.7.2",
                "symfony/cache": "^5.4|^6.0",
@@ -552,7 +552,7 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/dbal/issues",
                "source": "https://github.com/doctrine/dbal/tree/3.6.1"
                "source": "https://github.com/doctrine/dbal/tree/3.6.2"
            },
            "funding": [
                {
@@ -568,7 +568,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2023-03-02T19:26:24+00:00"
            "time": "2023-04-14T07:25:38+00:00"
        },
        {
            "name": "doctrine/deprecations",
@@ -1271,16 +1271,16 @@
        },
        {
            "name": "doctrine/orm",
            "version": "2.14.1",
            "version": "2.14.3",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/orm.git",
                "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e"
                "reference": "a64f315dfeae5e50b17f132626fd9e9b4ec8985d"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/orm/zipball/de7eee5ed7b1b35c99b118f26f210a8281e6db8e",
                "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e",
                "url": "https://api.github.com/repos/doctrine/orm/zipball/a64f315dfeae5e50b17f132626fd9e9b4ec8985d",
                "reference": "a64f315dfeae5e50b17f132626fd9e9b4ec8985d",
                "shasum": ""
            },
            "require": {
@@ -1309,14 +1309,14 @@
                "doctrine/annotations": "^1.13 || ^2",
                "doctrine/coding-standard": "^9.0.2 || ^11.0",
                "phpbench/phpbench": "^0.16.10 || ^1.0",
                "phpstan/phpstan": "~1.4.10 || 1.9.8",
                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
                "phpstan/phpstan": "~1.4.10 || 1.10.6",
                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
                "psr/log": "^1 || ^2 || ^3",
                "squizlabs/php_codesniffer": "3.7.1",
                "squizlabs/php_codesniffer": "3.7.2",
                "symfony/cache": "^4.4 || ^5.4 || ^6.0",
                "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
                "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
                "vimeo/psalm": "4.30.0 || 5.4.0"
                "vimeo/psalm": "4.30.0 || 5.9.0"
            },
            "suggest": {
                "ext-dom": "Provides support for XSD validation for XML mapping files",
@@ -1366,9 +1366,9 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/orm/issues",
                "source": "https://github.com/doctrine/orm/tree/2.14.1"
                "source": "https://github.com/doctrine/orm/tree/2.14.3"
            },
            "time": "2023-01-16T18:36:59+00:00"
            "time": "2023-04-20T09:46:32+00:00"
        },
        {
            "name": "doctrine/persistence",
@@ -5229,26 +5229,26 @@
        },
        {
            "name": "php-http/message-factory",
            "version": "v1.0.2",
            "version": "1.1.0",
            "source": {
                "type": "git",
                "url": "https://github.com/php-http/message-factory.git",
                "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
                "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
                "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
                "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
                "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
                "shasum": ""
            },
            "require": {
                "php": ">=5.4",
                "psr/http-message": "^1.0"
                "psr/http-message": "^1.0 || ^2.0"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "1.0-dev"
                    "dev-master": "1.x-dev"
                }
            },
            "autoload": {
@@ -5277,9 +5277,9 @@
            ],
            "support": {
                "issues": "https://github.com/php-http/message-factory/issues",
                "source": "https://github.com/php-http/message-factory/tree/master"
                "source": "https://github.com/php-http/message-factory/tree/1.1.0"
            },
            "time": "2015-12-19T14:08:53+00:00"
            "time": "2023-04-14T14:16:17+00:00"
        },
        {
            "name": "psr/cache",
@@ -7298,7 +7298,7 @@
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/vue.git",
                "reference": "d97686f3adfd79a11046229ea84f005ad6b35462"
                "reference": "367aa23bbafb44b9da51605e8d2ce38ac49deace"
            },
            "type": "library",
            "autoload": {
@@ -7310,7 +7310,7 @@
                ]
            },
            "description": "Module pour utiliser Vue.js",
            "time": "2023-04-06T13:55:38+00:00"
            "time": "2023-04-26T07:54:05+00:00"
        },
        {
            "name": "unicaen/zfc-user",
@@ -7792,16 +7792,16 @@
        },
        {
            "name": "netresearch/jsonmapper",
            "version": "v4.1.0",
            "version": "v4.2.0",
            "source": {
                "type": "git",
                "url": "https://github.com/cweiske/jsonmapper.git",
                "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f"
                "reference": "f60565f8c0566a31acf06884cdaa591867ecc956"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f",
                "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f",
                "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956",
                "reference": "f60565f8c0566a31acf06884cdaa591867ecc956",
                "shasum": ""
            },
            "require": {
@@ -7837,9 +7837,9 @@
            "support": {
                "email": "cweiske@cweiske.de",
                "issues": "https://github.com/cweiske/jsonmapper/issues",
                "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0"
                "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0"
            },
            "time": "2022-12-08T20:46:14+00:00"
            "time": "2023-04-09T17:37:40+00:00"
        },
        {
            "name": "pdepend/pdepend",
@@ -8292,16 +8292,16 @@
        },
        {
            "name": "phpstan/phpdoc-parser",
            "version": "1.18.0",
            "version": "1.20.3",
            "source": {
                "type": "git",
                "url": "https://github.com/phpstan/phpdoc-parser.git",
                "reference": "882eabc9b6a12e25c27091a261397f9c8792e722"
                "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/882eabc9b6a12e25c27091a261397f9c8792e722",
                "reference": "882eabc9b6a12e25c27091a261397f9c8792e722",
                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6c04009f6cae6eda2f040745b6b846080ef069c2",
                "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2",
                "shasum": ""
            },
            "require": {
@@ -8331,9 +8331,9 @@
            "description": "PHPDoc parser with support for nullable, intersection and generic types",
            "support": {
                "issues": "https://github.com/phpstan/phpdoc-parser/issues",
                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.18.0"
                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.3"
            },
            "time": "2023-04-06T07:26:43+00:00"
            "time": "2023-04-25T09:01:03+00:00"
        },
        {
            "name": "sabre/event",
Loading