diff --git a/composer.json b/composer.json index 3638ad6..80f27e8 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": "^7.2" + "php": ">=7.4" }, "require-dev": { "glpi-project/tools": "^0.4" @@ -8,7 +8,7 @@ "config": { "optimize-autoloader": true, "platform": { - "php": "7.2.0" + "php": "7.4.0" }, "sort-packages": true } diff --git a/composer.lock b/composer.lock index e7a6c4e..9dbff32 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8354308e8805d3f53d35251aac6a4525", + "content-hash": "fc83e1062054dc8c9ba6b4c2ba423677", "packages": [], "packages-dev": [ { "name": "glpi-project/tools", - "version": "0.4.2", + "version": "0.4.5", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "34369dd85cc99c18c3b8cf441bba11ec32173f2d" + "reference": "55ffa6566813d3c40d621892713ef63614820c79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/34369dd85cc99c18c3b8cf441bba11ec32173f2d", - "reference": "34369dd85cc99c18c3b8cf441bba11ec32173f2d", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/55ffa6566813d3c40d621892713ef63614820c79", + "reference": "55ffa6566813d3c40d621892713ef63614820c79", "shasum": "" }, "require": { - "symfony/console": "^4.4 || ^5.0" + "symfony/console": "^4.4 || ^5.0", + "twig/twig": "^3.3" }, "bin": [ "bin/extract-locales", @@ -57,24 +58,24 @@ "issues": "https://github.com/glpi-project/tools/issues", "source": "https://github.com/glpi-project/tools" }, - "time": "2022-01-28T13:44:12+00:00" + "time": "2022-04-20T06:57:59+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -103,49 +104,52 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "symfony/console", - "version": "v4.4.37", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6" + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0259f01dbf9d77badddbbf4c2abb681f24c9cac6", - "reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6", + "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0|2.0" }, "require-dev": { "psr/log": "^1|^2", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -178,8 +182,244 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-31T17:09:19+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-10-20T20:35:02+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/symfony/console/tree/v4.4.37" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -195,11 +435,95 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:15:26+00:00" + "time": "2021-11-23T21:10:46+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -231,12 +555,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -262,7 +586,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -282,7 +606,7 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -308,12 +632,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -341,7 +665,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" }, "funding": [ { @@ -361,16 +685,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -387,12 +711,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -424,7 +748,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -440,25 +764,29 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.11", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "633df678bec3452e04a7b0337c9bcfe7354124b3" + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/633df678bec3452e04a7b0337c9bcfe7354124b3", - "reference": "633df678bec3452e04a7b0337c9bcfe7354124b3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -466,7 +794,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -503,7 +831,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.11" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" }, "funding": [ { @@ -519,7 +847,169 @@ "type": "tidelift" } ], - "time": "2021-11-04T13:32:43+00:00" + "time": "2022-03-13T20:07:29+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "twig/twig", + "version": "v3.3.10", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "8442df056c51b706793adf80a9fd363406dd3674" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674", + "reference": "8442df056c51b706793adf80a9fd363406dd3674", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.3.10" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2022-04-06T06:47:41+00:00" } ], "aliases": [], @@ -528,11 +1018,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": ">=7.4" }, "platform-dev": [], "platform-overrides": { - "php": "7.2.0" + "php": "7.4.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } diff --git a/css/treeview.css b/css/treeview.css index 78303ba..318e3ef 100644 --- a/css/treeview.css +++ b/css/treeview.css @@ -26,24 +26,6 @@ * ------------------------------------------------------------------------- */ -.skin0{ -position:absolute; -width:165px; -border:2px solid black; -background-color:menu; -font-family:Verdana; -line-height:20px; -cursor:default; -font-size:14px; -z-index:100; -visibility:hidden; -} - -.menuitems{ -padding-left:10px; -padding-right:10px; -} - body { margin-top:0px; margin-left:0px; @@ -52,13 +34,18 @@ body { #explorer_bar { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; - background-color:#1B2F62; + background-color:#2f3f64; color: white; padding: 10px; margin-bottom: 15px; } #explorer_title { - padding: 3px; + font-family: var(--tblr-body-font-family); + font-size: var(--tblr-body-font-size); + font-weight: var(--tblr-body-font-weight); + line-height: var(--tblr-body-line-height); + text-align: var(--tblr-body-text-align); + -webkit-text-size-adjust: 100%; float:left; } #explorer_close { @@ -67,4 +54,4 @@ body { } #explorer_close img { cursor: pointer; -} \ No newline at end of file +} diff --git a/hook.php b/hook.php index b2bf521..5dc92b8 100644 --- a/hook.php +++ b/hook.php @@ -31,6 +31,10 @@ function plugin_treeview_install() { global $DB; + $default_charset = DBConnection::getDefaultCharset(); + $default_collation = DBConnection::getDefaultCollation(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + // version 1.0 if ($DB->tableExists("glpi_plugin_treeview_display") && !$DB->tableExists("glpi_plugin_treeview_preference")) { @@ -56,19 +60,18 @@ function plugin_treeview_install() { // not installed if (!$DB->tableExists("glpi_plugin_treeview_configs")) { - $query = "CREATE TABLE IF NOT EXISTS `glpi_plugin_treeview_configs` ( - `id` int(11) NOT NULL auto_increment, + `id` int {$default_key_sign} NOT NULL auto_increment, `target` varchar(255) NOT NULL default 'right', - `folderLinks` tinyint(1) NOT NULL default '0', - `useSelection` tinyint(1) NOT NULL default '0', - `useLines` tinyint(1) NOT NULL default '0', - `useIcons` tinyint(1) NOT NULL default '0', - `closeSameLevel` tinyint(1) NOT NULL default '0', - `itemName` int(11) NOT NULL default '0', - `locationName` int(11) NOT NULL default '0', + `folderLinks` tinyint NOT NULL default '0', + `useSelection` tinyint NOT NULL default '0', + `useLines` tinyint NOT NULL default '0', + `useIcons` tinyint NOT NULL default '0', + `closeSameLevel` tinyint NOT NULL default '0', + `itemName` int NOT NULL default '0', + `locationName` int NOT NULL default '0', PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci "; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die($DB->error()); @@ -80,21 +83,21 @@ function plugin_treeview_install() { $DB->query($query) or die($DB->error()); $query = "CREATE TABLE IF NOT EXISTS `glpi_plugin_treeview_profiles` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `treeview` char(1) collate utf8_unicode_ci default NULL, + `id` int {$default_key_sign} NOT NULL auto_increment, + `name` varchar(255) default NULL, + `treeview` char(1) default NULL, PRIMARY KEY (`id`), KEY `name` (`name`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci "; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die($DB->error()); $query = "CREATE TABLE IF NOT EXISTS `glpi_plugin_treeview_preferences` ( - `id` int(11) NOT NULL auto_increment, - `users_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_users (id)', - `show_on_load` int(11) NOT NULL default '0', + `id` int {$default_key_sign} NOT NULL auto_increment, + `users_id` int {$default_key_sign} NOT NULL default '0' COMMENT 'RELATION to glpi_users (id)', + `show_on_load` int NOT NULL default '0', PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci "; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die($DB->error()); @@ -112,14 +115,18 @@ function plugin_treeview_install() { function plugin_treeview_upgrade10to11() { global $DB; + $default_charset = DBConnection::getDefaultCharset(); + $default_collation = DBConnection::getDefaultCollation(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + // plugin tables if (!$DB->tableExists("glpi_plugin_treeview_preference")) { $query = "CREATE TABLE `glpi_plugin_treeview_preference` ( - `ID` int(11) auto_increment, - `user_id` int(11) NOT NULL default '0', + `ID` int {$default_key_sign} auto_increment, + `user_id` int {$default_key_sign} NOT NULL default '0', `show` varchar(255) NOT NULL default '0', PRIMARY KEY (`ID`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci "; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die($DB->error()); } @@ -147,34 +154,36 @@ function plugin_treeview_upgrade11to12() { function plugin_treeview_upgrade12to13() { global $DB; + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + if ($DB->tableExists("glpi_plugin_treeview_display")) { $DB->query("RENAME TABLE `glpi_plugin_treeview_display` to `glpi_plugin_treeview_displayprefs`"); $query = "ALTER TABLE `glpi_plugin_treeview_displayprefs` "; if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "ID")) { - $query .= " CHANGE `ID` `id` int(11) NOT NULL auto_increment,"; + $query .= " CHANGE `ID` `id` int {$default_key_sign} NOT NULL auto_increment,"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "folderLinks")) { - $query .= " CHANGE `folderLinks` `folderLinks` tinyint(1) NOT NULL default '0',"; + $query .= " CHANGE `folderLinks` `folderLinks` tinyint NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "useSelection")) { - $query .= " CHANGE `useSelection` `useSelection` tinyint(1) NOT NULL default '0',"; + $query .= " CHANGE `useSelection` `useSelection` tinyint NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "useLines")) { - $query .= " CHANGE `useLines` `useLines` tinyint(1) NOT NULL default '0',"; + $query .= " CHANGE `useLines` `useLines` tinyint NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "useIcons")) { - $query .= " CHANGE `useIcons` `useIcons` tinyint(1) NOT NULL default '0',"; + $query .= " CHANGE `useIcons` `useIcons` tinyint NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "closeSameLevel")) { - $query .= " CHANGE `closeSameLevel` `closeSameLevel` tinyint(1) NOT NULL default '0',"; + $query .= " CHANGE `closeSameLevel` `closeSameLevel` tinyint NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "itemName")) { - $query .= " CHANGE `itemName` `itemName` int(11) NOT NULL default '0',"; + $query .= " CHANGE `itemName` `itemName` int NOT NULL default '0',"; } if ($DB->fieldExists("glpi_plugin_treeview_displayprefs", "locationName")) { - $query .= " CHANGE `locationName` `locationName` int(11) NOT NULL default '0'"; + $query .= " CHANGE `locationName` `locationName` int NOT NULL default '0'"; } $DB->query($query) or die($DB->error()); @@ -184,7 +193,7 @@ function plugin_treeview_upgrade12to13() { $query = "ALTER TABLE `glpi_plugin_treeview_profiles` "; if ($DB->fieldExists("glpi_plugin_treeview_profiles", "ID")) { - $query .= " CHANGE `ID` `id` int(11) NOT NULL auto_increment"; + $query .= " CHANGE `ID` `id` int {$default_key_sign} NOT NULL auto_increment"; } $DB->query($query) or die($DB->error()); } @@ -195,13 +204,13 @@ function plugin_treeview_upgrade12to13() { $query = "ALTER TABLE `glpi_plugin_treeview_preferences` "; if ($DB->fieldExists("glpi_plugin_treeview_preferences", "ID")) { - $query .= " CHANGE `ID` `id` int(11) NOT NULL auto_increment,"; + $query .= " CHANGE `ID` `id` int {$default_key_sign} NOT NULL auto_increment,"; } if ($DB->fieldExists("glpi_plugin_treeview_preferences", "user_id")) { - $query .= " CHANGE `user_id` `users_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_users (id)',"; + $query .= " CHANGE `user_id` `users_id` int {$default_key_sign} NOT NULL default '0' COMMENT 'RELATION to glpi_users (id)',"; } if ($DB->fieldExists("glpi_plugin_treeview_preferences", "show")) { - $query .= " CHANGE `show` `show_on_load` int(11) NOT NULL default '0'"; + $query .= " CHANGE `show` `show_on_load` int NOT NULL default '0'"; } $DB->query($query) or die($DB->error()); } diff --git a/inc/config.class.php b/inc/config.class.php index 09b6c1f..01ed4a5 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -208,53 +208,6 @@ static function getTypes($all = false) { return $types; } - static function getPicbyType($type) { - global $PLUGIN_HOOKS; - $pic = ''; - switch ($type) { - case 'Computer' : - $pic = 'pics/computer.png'; - break; - case 'Monitor' : - $pic = 'pics/monitor.png'; - break; - case 'NetworkEquipment' : - $pic = 'pics/network.png'; - break; - case 'Peripheral' : - $pic = 'pics/device.gif'; - break; - case 'Printer' : - $pic = 'pics/printer.png'; - break; - case 'Software' : - $pic = 'pics/software.ico'; - break; - case 'Phone' : - $pic = 'pics/phone.png'; - break; - case 'Rack' : - $pic = 'pics/rack.png'; - break; - case 'PDU' : - $pic = 'pics/pdu.png'; - break; - case 'Enclosure' : - $pic = 'pics/enclosure.png'; - break; - case 'PassiveDCEquipment' : - $pic = 'pics/passivedcequipment.png'; - break; - } - //Like $PLUGIN_HOOKS['treeview']['PluginExampleExample'] = '../example/pics/mypic.png'; - if (in_array($type, self::$types) && isPluginItemtype($type)) { - if (isset($PLUGIN_HOOKS['treeview'][$type])) { - return $PLUGIN_HOOKS['treeview'][$type]; - } - } - return $pic; - } - /** * The function to see the treeview @@ -272,8 +225,6 @@ function seeTreeview() { echo "\n"; echo "\n"; echo "\n"; - echo "\n"; echo "\n"; @@ -484,7 +435,7 @@ function getNodesFromDb() { // Add items parent node echo "d.add($tv_id,".$r['id'].",\"".strtr($item::getTypeName(2), $trans). "\", $dontLoad, '" .$type ."', '" .$opt['searchurl'] . "', '', '', '" . - self::getPicbyType($type). "', '". self::getPicbyType($type) . "');\n"; + $type::getIcon(). "', '". $type::getIcon() . "');\n"; if ($openedType == $type && $nodes[count($nodes)-1] == $tv_id) { $openedType = $tv_id; @@ -524,7 +475,7 @@ function getNodesFromDb() { } $url = Toolbox::getItemTypeFormURL($type). "?id=" .$r_1['id']; - $pic = "pics/node.gif"; + $pic = "ti ti-chevrons-right"; $name = strtr($i_name, $trans); $opt = ['url' => $url, 'pic' => $pic, diff --git a/js/dtree.js b/js/dtree.js index c7d9f0e..c1f07a9 100644 --- a/js/dtree.js +++ b/js/dtree.js @@ -4,7 +4,7 @@ |---------------------------------------------------| -| Copyright (c) 2002-2003 Geir Landr� | +| Copyright (c) 2002-2003 Geir Landrö | | | @@ -100,9 +100,9 @@ function dTree(objName) { root : this.config.iconFolder + 'base.ico', - folder : this.config.iconFolder + 'folder.png', + folder : 'ti ti-map-pin', - folderOpen : this.config.iconFolder + 'folderopen.png', + folderOpen : 'ti ti-map-pin', node : this.config.iconFolder + 'page.gif', @@ -272,9 +272,10 @@ dTree.prototype.node = function(node, nodeId) { if (this.config.useIcons) { - if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node); - if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node; + if (!node.icon || node.icon === undefined) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node); + + if (!node.iconOpen || node.icon === undefined) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node; if (this.root.id == node.pid) { @@ -284,7 +285,14 @@ dTree.prototype.node = function(node, nodeId) { } - str += ''; + + //if font-awesome / tabler icon + if(!node.icon.includes('pics') || !node.iconOpen.includes('pics')){ + str += ''; + } else { + str += ''; + + } } diff --git a/js/treeview.js b/js/treeview.js index beb5266..e69de29 100644 --- a/js/treeview.js +++ b/js/treeview.js @@ -1,139 +0,0 @@ -/** - * ------------------------------------------------------------------------- - * TreeView plugin for GLPI - * ------------------------------------------------------------------------- - * - * LICENSE - * - * This file is part of TreeView. - * - * TreeView is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * TreeView is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TreeView. If not, see . - * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2007-2022 by Teclib'. - * @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html - * @link https://github.com/pluginsGLPI/treeview - * ------------------------------------------------------------------------- - */ - -///////////////functions -function SelectAll(pForm) { - obj = pForm; - for(n=0; n"; -echo "\n".sprintf(__('%1$s - %2$s'), "GLPI", __('Tree view', 'treeview')).""; -echo ""; -// Send extra expires header if configured -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; +Html::includeHeader("TreeView"); -echo '
'; -echo '
'; -echo ""; +echo ""; // Title bar echo '
'; echo '
'.sprintf(__('%1$s - %2$s'), "GLPI", __('Tree view', 'treeview')); diff --git a/pics/computer.png b/pics/computer.png deleted file mode 100644 index ae87b05..0000000 Binary files a/pics/computer.png and /dev/null differ diff --git a/pics/device.gif b/pics/device.gif deleted file mode 100644 index 26559a2..0000000 Binary files a/pics/device.gif and /dev/null differ diff --git a/pics/enclosure.png b/pics/enclosure.png deleted file mode 100755 index 6882c8e..0000000 Binary files a/pics/enclosure.png and /dev/null differ diff --git a/pics/monitor.png b/pics/monitor.png deleted file mode 100644 index b1c2297..0000000 Binary files a/pics/monitor.png and /dev/null differ diff --git a/pics/network.png b/pics/network.png deleted file mode 100644 index f5b7ebf..0000000 Binary files a/pics/network.png and /dev/null differ diff --git a/pics/passivedcequipment.png b/pics/passivedcequipment.png deleted file mode 100755 index d2ac368..0000000 Binary files a/pics/passivedcequipment.png and /dev/null differ diff --git a/pics/pdu.png b/pics/pdu.png deleted file mode 100755 index 37bc93e..0000000 Binary files a/pics/pdu.png and /dev/null differ diff --git a/pics/phone.png b/pics/phone.png deleted file mode 100644 index 763f015..0000000 Binary files a/pics/phone.png and /dev/null differ diff --git a/pics/printer.png b/pics/printer.png deleted file mode 100644 index 6bc45ea..0000000 Binary files a/pics/printer.png and /dev/null differ diff --git a/pics/rack.png b/pics/rack.png deleted file mode 100755 index 77c7249..0000000 Binary files a/pics/rack.png and /dev/null differ diff --git a/pics/software.ico b/pics/software.ico deleted file mode 100644 index 7f9cefe..0000000 Binary files a/pics/software.ico and /dev/null differ diff --git a/pics/treeview.jpg b/pics/treeview.jpg deleted file mode 100644 index adf1c6b..0000000 Binary files a/pics/treeview.jpg and /dev/null differ diff --git a/setup.php b/setup.php index d52a843..3899c4e 100644 --- a/setup.php +++ b/setup.php @@ -31,9 +31,9 @@ define('PLUGIN_TREEVIEW_VERSION', '1.9.1'); // Minimal GLPI version, inclusive -define('PLUGIN_TREEVIEW_MIN_GLPI', '9.5'); +define('PLUGIN_TREEVIEW_MIN_GLPI', '10.0.0'); // Maximum GLPI version, exclusive -define('PLUGIN_TREEVIEW_MAX_GLPI', '9.6'); +define('PLUGIN_TREEVIEW_MAX_GLPI', '10.0.99'); /** * Init the hooks of the plugins -Needed @@ -89,12 +89,7 @@ function plugin_init_treeview() { $config->hideTreeview(); } // Add specific files to add to the header : javascript or css - $PLUGIN_HOOKS['add_javascript']['treeview'] = "js/dtree.js"; - $PLUGIN_HOOKS['add_css']['treeview'] = "css/dtree.css"; - $PLUGIN_HOOKS['add_javascript']['treeview'] = "js/functions.js"; - $PLUGIN_HOOKS['add_css']['treeview'] = "css/style.css"; - $PLUGIN_HOOKS['add_javascript']['treeview'] = "js/treeview.js"; - $PLUGIN_HOOKS['add_css']['treeview'] = "css/treeview.css"; + $PLUGIN_HOOKS['add_css']['treeview'] = "css/treeview.css"; } // Config page