diff --git a/css/backoffice/components/_newsroom-menu.scss b/css/backoffice/components/_newsroom-menu.scss index f8446f30c..b515ad547 100644 --- a/css/backoffice/components/_newsroom-menu.scss +++ b/css/backoffice/components/_newsroom-menu.scss @@ -19,9 +19,19 @@ $ibo-navigation-menu--notifications--item--content--padding-x: 14px !default; $ibo-navigation-menu--notifications--item--content--img--max-height: 100px !default; $ibo-navigation-menu--notifications--item--content--img--padding: 5px !default; -$ibo-navigation-menu--notifications--item--new-message-indicator--width: 10px !default; -$ibo-navigation-menu--notifications--item--new-message-indicator--height: 10px !default; -$ibo-navigation-menu--notifications--item--new-message-indicator--background-color: $ibo-color-blue-500 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--width: 13px !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--height: 13px !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--background-color: $ibo-color-white-100 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--border: solid 2px $ibo-color-grey-500 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-1--background-color: $ibo-color-red-100 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-1--border: solid 2px $ibo-color-red-500 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-2--background-color: $ibo-color-orange-100 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-2--border: solid 2px $ibo-color-orange-500 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-3--background-color: $ibo-color-blue-100 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-3--border: solid 2px $ibo-color-blue-500 !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-4--background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--background-color !default; +$ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-4--border: $ibo-navigation-menu--notifications--item--new-message-indicator--border !default; + $ibo-navigation-menu--notifications--item--new-message-indicator--border-radius: $ibo-border-radius-full !default; $ibo-navigation-menu--notifications--item--new-message-indicator--margin-top: $ibo-spacing-200 !default; @@ -87,8 +97,25 @@ $ibo-popover-menu--item--no-message--image--svg--padding : 15px !default; width: $ibo-navigation-menu--notifications--item--new-message-indicator--width; height: $ibo-navigation-menu--notifications--item--new-message-indicator--height; background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--background-color; + border: $ibo-navigation-menu--notifications--item--new-message-indicator--border; border-radius: $ibo-navigation-menu--notifications--item--new-message-indicator--border-radius; margin-top: $ibo-navigation-menu--notifications--item--new-message-indicator--margin-top; + &.ibo-is-priority-1{ + background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-1--background-color; + border: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-1--border; + } + &.ibo-is-priority-2{ + background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-2--background-color; + border: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-2--border; + } + &.ibo-is-priority-3{ + background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-3--background-color; + border: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-3--border; + } + &.ibo-is-priority-4{ + background-color: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-4--background-color; + border: $ibo-navigation-menu--notifications--item--new-message-indicator--is-priority-4--border; + } } .ibo-navigation-menu--notifications-show-all-multiple ~ .ibo-popover-menu { diff --git a/dictionaries/cs.dictionary.itop.ui.php b/dictionaries/cs.dictionary.itop.ui.php index 142180d32..be74a5d24 100755 --- a/dictionaries/cs.dictionary.itop.ui.php +++ b/dictionaries/cs.dictionary.itop.ui.php @@ -1626,6 +1626,10 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Zobrazit zprávy od %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Zobrazit %1$s zpráv v menu %2$s', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/da.dictionary.itop.ui.php b/dictionaries/da.dictionary.itop.ui.php index f575ec5c5..07864f249 100644 --- a/dictionaries/da.dictionary.itop.ui.php +++ b/dictionaries/da.dictionary.itop.ui.php @@ -1617,6 +1617,10 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index d9d68e989..0e9e5bc58 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -1615,6 +1615,10 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Nachrichten von %1$s anzeigen', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Zeigen Sie höchstens %1$s Beiträge im Menü (%2$s) an.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php index 997cae8d7..cd6dfb68f 100644 --- a/dictionaries/en.dictionary.itop.ui.php +++ b/dictionaries/en.dictionary.itop.ui.php @@ -1713,6 +1713,10 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal', )); diff --git a/dictionaries/es_cr.dictionary.itop.ui.php b/dictionaries/es_cr.dictionary.itop.ui.php index 66e2e0186..aaa30a9b1 100644 --- a/dictionaries/es_cr.dictionary.itop.ui.php +++ b/dictionaries/es_cr.dictionary.itop.ui.php @@ -1634,6 +1634,10 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Desplegar mensajes de %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Desplegar hasta %1$s mensajes en el menú %2$s.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 6eb17f8de..b5bfaf4e0 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1623,6 +1623,10 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Le cache de la newsroom a été réinitialisé avec succès', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Afficher les messages de %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Afficher au plus %1$s messages dans le menu %2$s.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critique', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important', + 'UI:Newsroom:Priority:4:Tooltip' => 'Standard', )); diff --git a/dictionaries/hu.dictionary.itop.ui.php b/dictionaries/hu.dictionary.itop.ui.php index d211a86b1..0ec0a3ea6 100755 --- a/dictionaries/hu.dictionary.itop.ui.php +++ b/dictionaries/hu.dictionary.itop.ui.php @@ -1618,6 +1618,10 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => '%1$s üzeneteinek megjelenítése', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Mutasson %1$s üzenetet a %2$s menüben.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/it.dictionary.itop.ui.php b/dictionaries/it.dictionary.itop.ui.php index 1420b88f5..1d603f5da 100644 --- a/dictionaries/it.dictionary.itop.ui.php +++ b/dictionaries/it.dictionary.itop.ui.php @@ -1634,6 +1634,10 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Mostra messaggi da %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Mostra fino a %1$s messaggi nel menu %2$s.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/ja.dictionary.itop.ui.php b/dictionaries/ja.dictionary.itop.ui.php index d00b7d8ca..36de21900 100644 --- a/dictionaries/ja.dictionary.itop.ui.php +++ b/dictionaries/ja.dictionary.itop.ui.php @@ -1616,6 +1616,10 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/nl.dictionary.itop.ui.php b/dictionaries/nl.dictionary.itop.ui.php index 412985fd3..3f704c8e3 100644 --- a/dictionaries/nl.dictionary.itop.ui.php +++ b/dictionaries/nl.dictionary.itop.ui.php @@ -1631,6 +1631,10 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Bekijk berichten van %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Toon maximaal %1$s berichten in het %2$s menu.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/pl.dictionary.itop.ui.php b/dictionaries/pl.dictionary.itop.ui.php index c680bfa99..f32661fa2 100644 --- a/dictionaries/pl.dictionary.itop.ui.php +++ b/dictionaries/pl.dictionary.itop.ui.php @@ -1628,6 +1628,10 @@ Dict::Add('PL PL', 'Polish', 'Polski', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Wyświetl wiadomości od %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Wyświetlaj do %1$s wiadomiości w %2$s menu.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/pt_br.dictionary.itop.ui.php b/dictionaries/pt_br.dictionary.itop.ui.php index 99333d4e3..465aff78a 100644 --- a/dictionaries/pt_br.dictionary.itop.ui.php +++ b/dictionaries/pt_br.dictionary.itop.ui.php @@ -1628,6 +1628,10 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Exibir mensagens do(a) %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Exibir até %1$s mensagem(ns) no menu %2$s', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/ru.dictionary.itop.ui.php b/dictionaries/ru.dictionary.itop.ui.php index dd5115bb0..2ec1c2b14 100644 --- a/dictionaries/ru.dictionary.itop.ui.php +++ b/dictionaries/ru.dictionary.itop.ui.php @@ -1628,6 +1628,10 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Показать сообщения от %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Отобразите не более %1$s сообщений в меню %2$s.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/sk.dictionary.itop.ui.php b/dictionaries/sk.dictionary.itop.ui.php index 9923753e2..0e244191e 100644 --- a/dictionaries/sk.dictionary.itop.ui.php +++ b/dictionaries/sk.dictionary.itop.ui.php @@ -1620,6 +1620,10 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/tr.dictionary.itop.ui.php b/dictionaries/tr.dictionary.itop.ui.php index 88f348c82..253dcd19d 100644 --- a/dictionaries/tr.dictionary.itop.ui.php +++ b/dictionaries/tr.dictionary.itop.ui.php @@ -1628,6 +1628,10 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/dictionaries/zh_cn.dictionary.itop.ui.php b/dictionaries/zh_cn.dictionary.itop.ui.php index 75a6fafcb..6cd95468d 100644 --- a/dictionaries/zh_cn.dictionary.itop.ui.php +++ b/dictionaries/zh_cn.dictionary.itop.ui.php @@ -1712,6 +1712,10 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~', 'UI:Newsroom:DisplayMessagesFor_Provider' => '显示来自%1$s的消息', 'UI:Newsroom:DisplayAtMost_X_Messages' => '在%2$s菜单中最多显示%1$s条消息.', + 'UI:Newsroom:Priority:1:Tooltip' => 'Critical~~', + 'UI:Newsroom:Priority:2:Tooltip' => 'Urgent~~', + 'UI:Newsroom:Priority:3:Tooltip' => 'Important~~', + 'UI:Newsroom:Priority:4:Tooltip' => 'Normal~~', )); diff --git a/js/components/newsroom-menu.js b/js/components/newsroom-menu.js index 8168e7274..e72d37cc3 100644 --- a/js/components/newsroom-menu.js +++ b/js/components/newsroom-menu.js @@ -203,8 +203,9 @@ $(function() _buildShowAllMessagesSection: function () { return '
'; }, - _buildMessageItems: function (sId, sText, sImage, sStartDate, sProvider, sUrl, sTarget, oConverter) { - var sNewMessageIndicator = '
'; + _buildMessageItems: function (sId, sText, sImage, sStartDate, sProvider, sUrl, sTarget, sPriority, oConverter) { + let sNewMessageIndicatorTooltip = Dict.S('UI:Newsroom:Priority:'+sPriority+':Tooltip'); + var sNewMessageIndicator = '
'; sImage = ''; var div = document.createElement("div"); @@ -263,7 +264,7 @@ $(function() var oMessage = aAllMessages[k]; aUnreadMessagesByProvider[oMessage.provider]++; if (iCount < this.options.display_limit + 4) { - var sMessageItem = this._buildMessageItems(oMessage.id, oMessage.text, oMessage.image, oMessage.start_date, oMessage.provider, oMessage.url, oMessage.target, oConverter) + var sMessageItem = this._buildMessageItems(oMessage.id, oMessage.text, oMessage.image, oMessage.start_date, oMessage.provider, oMessage.url, oMessage.target, oMessage.priority, oConverter) sMessageSection += sMessageItem; } iCount++; @@ -293,7 +294,7 @@ $(function() $('.ibo-navigation-menu--notifications--item--content img').each(function(){ tippy(this, {'content': this.outerHTML, 'placement': 'left', 'trigger': 'mouseenter focus', 'animation':'shift-away-subtle', 'allowHTML': true }); }); - + CombodoTooltip.InitAllNonInstantiatedTooltips($(this.element), true); // Add events listeners $(this.js_selectors.notification_message).on('click', function(oEvent){ me._handleClick(this, oEvent);