From 11f27019e4aeb163fa74ca2dfd6d31aff187a1e4 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Thu, 20 Aug 2020 11:07:06 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02847=20-=20Add=20Html=20component=20-=20?= =?UTF-8?q?Fix=20icons=20on=20buttons=20-=20Comment=20some=20rules=20from?= =?UTF-8?q?=20legacy=20css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/light-grey.scss | 38 +++++----- lib/composer/autoload_classmap.php | 1 + lib/composer/autoload_static.php | 1 + .../application/UI/Component/Html/Html.php | 71 +++++++++++++++++++ templates/components/button/layout.html.twig | 4 +- templates/components/html/layout.html.twig | 1 + 6 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 sources/application/UI/Component/Html/Html.php create mode 100644 templates/components/html/layout.html.twig diff --git a/css/light-grey.scss b/css/light-grey.scss index a071b1230..8e1e1c24b 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -63,25 +63,25 @@ padding: 0.25em; margin-top: 1em; } - - h1 { - font-family: Tahoma, Verdana, Arial, Helvetica; - color: $text-color; - font-weight: bold; - font-size: 12pt; - } - h2 { - font-family: Tahoma, Verdana, Arial, Helvetica; - color: $text-color; - font-weight: normal; - font-size: 12pt; - } - h3 { - font-family: Tahoma, Verdana, Arial, Helvetica; - color: $text-color; - font-weight: normal; - font-size: 10pt; - } + // + //h1 { + // font-family: Tahoma, Verdana, Arial, Helvetica; + // color: $text-color; + // font-weight: bold; + // font-size: 12pt; + //} + //h2 { + // font-family: Tahoma, Verdana, Arial, Helvetica; + // color: $text-color; + // font-weight: normal; + // font-size: 12pt; + //} + //h3 { + // font-family: Tahoma, Verdana, Arial, Helvetica; + // color: $text-color; + // font-weight: normal; + // font-size: 10pt; + //} label { cursor: pointer; diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index 9882f6439..35361bc28 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -154,6 +154,7 @@ return array( 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearch' => $baseDir . '/sources/application/UI/Component/GlobalSearch/GlobalSearch.php', 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearchFactory' => $baseDir . '/sources/application/UI/Component/GlobalSearch/GlobalSearchFactory.php', 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearchHelper' => $baseDir . '/sources/application/UI/Component/GlobalSearch/GlobalSearchHelper.php', + 'Combodo\\iTop\\Application\\UI\\Component\\Html\\Html\\Html' => $baseDir . '/sources/application/UI/Component/Html/Html.php', 'Combodo\\iTop\\Application\\UI\\Component\\Panel\\Panel\\Panel' => $baseDir . '/sources/application/UI/Component/Panel/Panel.php', 'Combodo\\iTop\\Application\\UI\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenu' => $baseDir . '/sources/application/UI/Component/PopoverMenu/NewsroomMenu/NewsroomMenu.php', 'Combodo\\iTop\\Application\\UI\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenuFactory' => $baseDir . '/sources/application/UI/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php', diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 966b7b017..af16acf1c 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -384,6 +384,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearch' => __DIR__ . '/../..' . '/sources/application/UI/Component/GlobalSearch/GlobalSearch.php', 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearchFactory' => __DIR__ . '/../..' . '/sources/application/UI/Component/GlobalSearch/GlobalSearchFactory.php', 'Combodo\\iTop\\Application\\UI\\Component\\GlobalSearch\\GlobalSearchHelper' => __DIR__ . '/../..' . '/sources/application/UI/Component/GlobalSearch/GlobalSearchHelper.php', + 'Combodo\\iTop\\Application\\UI\\Component\\Html\\Html\\Html' => __DIR__ . '/../..' . '/sources/application/UI/Component/Html/Html.php', 'Combodo\\iTop\\Application\\UI\\Component\\Panel\\Panel\\Panel' => __DIR__ . '/../..' . '/sources/application/UI/Component/Panel/Panel.php', 'Combodo\\iTop\\Application\\UI\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenu' => __DIR__ . '/../..' . '/sources/application/UI/Component/PopoverMenu/NewsroomMenu/NewsroomMenu.php', 'Combodo\\iTop\\Application\\UI\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenuFactory' => __DIR__ . '/../..' . '/sources/application/UI/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php', diff --git a/sources/application/UI/Component/Html/Html.php b/sources/application/UI/Component/Html/Html.php new file mode 100644 index 000000000..20d443890 --- /dev/null +++ b/sources/application/UI/Component/Html/Html.php @@ -0,0 +1,71 @@ + + * @package Combodo\iTop\Application\UI\Component\Html\Html + * @since 2.8.0 + */ +class Html extends UIBlock +{ + // Overloaded constants + const BLOCK_CODE = 'ibo-html'; + const HTML_TEMPLATE_REL_PATH = 'components/html/layout'; + const JS_TEMPLATE_REL_PATH = 'components/html/layout'; + + /** @var string $sHtml */ + protected $sHtml; + + /** + * Html constructor. + * + * @param string $sHtml + */ + public function __construct($sHtml = '') + { + $this->sHtml = $sHtml; + parent::__construct(); + } + + /** + * @return string + */ + public function GetHtml() + { + return $this->sHtml; + } + + /** + * @param string $sHtml + * @return $this + */ + public function SetHtml($sHtml) + { + $this->sHtml = $sHtml; + return $this; + } +} \ No newline at end of file diff --git a/templates/components/button/layout.html.twig b/templates/components/button/layout.html.twig index 3302e968b..7ab6279c7 100644 --- a/templates/components/button/layout.html.twig +++ b/templates/components/button/layout.html.twig @@ -1,4 +1,6 @@ \ No newline at end of file diff --git a/templates/components/html/layout.html.twig b/templates/components/html/layout.html.twig new file mode 100644 index 000000000..ef12b8056 --- /dev/null +++ b/templates/components/html/layout.html.twig @@ -0,0 +1 @@ +{{ oUIBlock.GetHtml()|raw }} \ No newline at end of file