diff --git a/lib/Entity/ModuleTemplate.php b/lib/Entity/ModuleTemplate.php index 30f3975c1a..bc1df3c9bb 100644 --- a/lib/Entity/ModuleTemplate.php +++ b/lib/Entity/ModuleTemplate.php @@ -70,6 +70,12 @@ class ModuleTemplate implements \JsonSerializable */ public $title; + /** + * @SWG\Property(description="Description of the Module Template") + * @var string + */ + public $description; + /** * @SWG\Property() * @var string Icon diff --git a/lib/Factory/ModuleTemplateFactory.php b/lib/Factory/ModuleTemplateFactory.php index 6f18beda0e..6a6e967300 100644 --- a/lib/Factory/ModuleTemplateFactory.php +++ b/lib/Factory/ModuleTemplateFactory.php @@ -414,6 +414,7 @@ private function createFromXml(\DOMElement $xml, string $ownership, string $file $template->type = $this->getFirstValueOrDefaultFromXmlNode($xml, 'type'); $template->dataType = $this->getFirstValueOrDefaultFromXmlNode($xml, 'dataType'); $template->title = __($this->getFirstValueOrDefaultFromXmlNode($xml, 'title')); + $template->description = __($this->getFirstValueOrDefaultFromXmlNode($xml, 'description')); $template->thumbnail = $this->getFirstValueOrDefaultFromXmlNode($xml, 'thumbnail'); $template->icon = $this->getFirstValueOrDefaultFromXmlNode($xml, 'icon'); $template->isVisible = $this->getFirstValueOrDefaultFromXmlNode($xml, 'isVisible') !== 'false'; diff --git a/ui/src/editor-core/toolbar.js b/ui/src/editor-core/toolbar.js index 6d6968d5c8..53fb5911d5 100644 --- a/ui/src/editor-core/toolbar.js +++ b/ui/src/editor-core/toolbar.js @@ -1312,6 +1312,9 @@ Toolbar.prototype.createContent = function( // Adapt card behaviour to current tab self.handleCardsBehaviour(); + // Reload tooltips + app.common.reloadTooltips(self.DOMObject); + return; } @@ -3285,6 +3288,9 @@ Toolbar.prototype.handleCardsBehaviour = function() { } }); } + + // Reload tooltips + app.common.reloadTooltips(self.DOMObject); }; /** diff --git a/ui/src/layout-editor/main.js b/ui/src/layout-editor/main.js index 26a7dd6535..b5d681c727 100644 --- a/ui/src/layout-editor/main.js +++ b/ui/src/layout-editor/main.js @@ -2316,7 +2316,7 @@ lD.dropItemAdd = function(droppable, draggable, dropPosition) { extendsOverride: draggableData.extendsOverride, extendsOverrideId: draggableData.extendsOverrideId, mediaId: draggableData.mediaId, - mediaName: draggableData.title, + mediaName: draggableData.cardTitle, isVisible: draggableData.isVisible, }; @@ -2511,7 +2511,7 @@ lD.dropItemAdd = function(droppable, draggable, dropPosition) { const onUploadDone = function(data) { // Add media id to data draggableData.mediaId = data.response().result.files[0].mediaId; - draggableData.title = data.response().result.files[0].name; + draggableData.cardTitle = data.response().result.files[0].name; }; lD.openUploadForm({ diff --git a/ui/src/style/common.scss b/ui/src/style/common.scss index 72b4d9fc4a..9e39bf6b07 100644 --- a/ui/src/style/common.scss +++ b/ui/src/style/common.scss @@ -83,6 +83,29 @@ $fa-font-path: "~font-awesome/fonts"; } } +/* Tooltip colour */ +div.tooltip.bs-tooltip-auto { + .tooltip-inner { + background-color: darken($xibo-color-secondary, 10%); + } + + &[x-placement^=right] .arrow::before { + border-right-color: darken($xibo-color-secondary, 10%); + } + + &[x-placement^=left] .arrow::before { + border-left-color: darken($xibo-color-secondary, 10%); + } + + &[x-placement^=top] .arrow::before { + border-top-color: darken($xibo-color-secondary, 10%); + } + + &[x-placement^=bottom] .arrow::before { + border-bottom-color: darken($xibo-color-secondary, 10%); + } +} + .no-user-select { @include user-select-none(); } diff --git a/ui/src/templates/toolbar-card-item.hbs b/ui/src/templates/toolbar-card-item.hbs index 46ba53443d..e38661c394 100644 --- a/ui/src/templates/toolbar-card-item.hbs +++ b/ui/src/templates/toolbar-card-item.hbs @@ -1,5 +1,4 @@
- {{title}} + {{title}}