mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Alert component : title is now clickable to expand/collapse
This commit is contained in:
@@ -92,6 +92,7 @@ $ibo-alert-colors: (
|
||||
|
||||
.ibo-alert--title {
|
||||
padding-bottom: $ibo-alert--title--padding-bottom;
|
||||
cursor: pointer;
|
||||
|
||||
@extend %ibo-font-ral-bol-150;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ $(function()
|
||||
close_button: '[data-role="ibo-alert--close-button"]',
|
||||
minimize_button: '[data-role="ibo-alert--minimize-button"]',
|
||||
maximize_button: '[data-role="ibo-alert--maximize-button"]',
|
||||
title: '[data-role="ibo-alert--title"]',
|
||||
},
|
||||
|
||||
// the constructor
|
||||
@@ -58,6 +59,9 @@ $(function()
|
||||
this.element.find(this.js_selectors.maximize_button).on('click', function (oEvent) {
|
||||
me._onMaximizeButtonClick(oEvent);
|
||||
});
|
||||
this.element.find(this.js_selectors.title).on('click', function (oEvent) {
|
||||
me._onToggleVisibility(oEvent);
|
||||
});
|
||||
},
|
||||
_onCloseButtonClick: function (oEvent) {
|
||||
this.element.hide();
|
||||
@@ -68,5 +72,8 @@ $(function()
|
||||
_onMaximizeButtonClick: function (oEvent) {
|
||||
this.element.addClass(this.css_classes.opened);
|
||||
},
|
||||
_onToggleVisibility: function (oEvent) {
|
||||
this.element.toggleClass(this.css_classes.opened);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
class="fas fa-caret-up"></i>
|
||||
</div>
|
||||
<div class="ibo-alert--action-button ibo-alert--close-button" data-role="ibo-alert--close-button"><i class="fas fa-times"></i></div>
|
||||
<div class="ibo-alert--title">{{ oUIBlock.GetTitle() }}</div>
|
||||
<div class="ibo-alert--title" data-role="ibo-alert--title">{{ oUIBlock.GetTitle() }}</div>
|
||||
<div class="ibo-alert--body">{{ oUIBlock.GetContent()|raw }}</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user