From 28caba16fc3ba8724b4141ebec4e213a31c441c4 Mon Sep 17 00:00:00 2001 From: Nguyen Lam Date: Thu, 14 Oct 2021 19:37:56 +0200 Subject: [PATCH] feat(aside): add optional tooltip on header --- docs/src/xhtml/components/asides/index.xhtml | 40 +++++++++++++++++++ .../edbml/scripts/ts.ui.HeaderBarSpirit.edbml | 3 +- .../edbml/scripts/ts.ui.ToolBarSpirit.edbml | 15 ++++--- .../api/ts.ui.Header.js | 12 ++++++ .../models/global/ts.ui.HeaderBarModel.js | 13 ++++++ .../local/toolbar/ts.ui.ToolBarModel.js | 6 +++ .../spirits/global/ts.ui.HeaderBarSpirit.js | 14 +++++++ .../local/toolbar/ts.ui.ToolBarSpirit.js | 21 ++++++++++ .../models/asides/ts.ui.AsideModel.js | 6 +++ .../spirits/tooltip/ts.ui.TooltipSpirit.js | 18 ++++++++- .../spirits/asides/ts.ui.SideShowSpirit.js | 14 +++++++ 11 files changed, 154 insertions(+), 8 deletions(-) diff --git a/docs/src/xhtml/components/asides/index.xhtml b/docs/src/xhtml/components/asides/index.xhtml index 4d661df7d..ad60b1181 100644 --- a/docs/src/xhtml/components/asides/index.xhtml +++ b/docs/src/xhtml/components/asides/index.xhtml @@ -289,6 +289,35 @@
  • The new Aside will float the top of the z-index
  • + +

    Tooltip on aside header

    +
    +

    + A tooltip can be added to the aside header with the + data-ts.tooltip attribute. Set the value equal to the text to be + displayed in the tooltip. +

    +
    + +
    +

    + Run the script below to open the Aside with tooltip. +

    +
    + +
    +
    @@ -413,5 +442,16 @@ + + diff --git a/src/runtime/edbml/scripts/ts.ui.HeaderBarSpirit.edbml b/src/runtime/edbml/scripts/ts.ui.HeaderBarSpirit.edbml index 71d6f0018..01c549afb 100644 --- a/src/runtime/edbml/scripts/ts.ui.HeaderBarSpirit.edbml +++ b/src/runtime/edbml/scripts/ts.ui.HeaderBarSpirit.edbml @@ -4,6 +4,7 @@ var id = (this.$instanceid + header.$instanceid); var color = header.color; + var tooltip = header.tooltip;