* [perf bug #50934] click message to close.
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
.messagers > .messager-holder {max-width: 35%;}
|
||||
.messager-notice, .score-notice {align-items: flex-start;}
|
||||
.messager-notice > .icon-envelope-o, .score-notice > .icon-diamond {margin-top: 2px;}
|
||||
.messager-notice > .alert-close {position: fixed; top: 10px; right: 30px; width: 20px; height: 20px;}
|
||||
.messager-notice > .alert-close {position: fixed; top: 10px; right: 15px; width: 20px; height: 20px;}
|
||||
.messager-notice .browser-message-content {color: rgba(30,168,254); max-height: calc(100vh - 14rem); overflow-y: auto;}
|
||||
.messager-notice .browser-message-content > span {width: 94%; display: inline-block;}
|
||||
.messager-notice .browser-message-content > a {color: rgba(49,60,82)}
|
||||
|
||||
@@ -953,6 +953,14 @@ window.browserNotify = function()
|
||||
}, pollTime * 1000);
|
||||
};
|
||||
|
||||
window.clickMessage = function(obj)
|
||||
{
|
||||
let $obj = $(obj);
|
||||
let url = $obj.data('url');
|
||||
openApp(url);
|
||||
$(obj).closest('.alert.messager').find('.alert-close').trigger('click');
|
||||
}
|
||||
|
||||
window.ping = function()
|
||||
{
|
||||
setInterval(function(){$.get($.createLink('misc', 'ping'));}, pollTime * 1000);
|
||||
|
||||
@@ -134,6 +134,7 @@ class message extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$messages = preg_replace("/<a href='([^\']+)'/", "<a data-url='$1' href='###' onclick='clickMessage(this)'", $messages);
|
||||
echo html_entity_decode("<div class='browser-message-content'><span class='text-secondary-500'>{$messages}</span></div>");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user