mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Enhanced the detail popup window, it performs much better now and is less annoying.
You can close a detail popup by clicking into its content now. And it locates itself to the middle of your mouse pointer location.
This commit is contained in:
parent
fce57ba48a
commit
1f0fe601c6
@ -33,19 +33,30 @@
|
||||
{
|
||||
font-weight:normal;
|
||||
text-decoration:none;
|
||||
position:relative;
|
||||
overflow:visible;
|
||||
}
|
||||
.syslogdetails
|
||||
{
|
||||
position:relative; /*this is the key*/
|
||||
position:relative;
|
||||
overflow:visible;
|
||||
z-index:4;
|
||||
}
|
||||
|
||||
.syslogdetails:hover
|
||||
{
|
||||
position:relative; /*this is the key*/
|
||||
font-weight:normal;
|
||||
z-index:5;
|
||||
}
|
||||
.syslogdetails span {display: none}
|
||||
.syslogdetails span
|
||||
{
|
||||
position:relative;
|
||||
overflow:visible;
|
||||
display: none;
|
||||
z-index:-1;
|
||||
|
||||
}
|
||||
/*the span will display just on :hover state*/
|
||||
/*
|
||||
.syslogdetails:hover span
|
||||
@ -60,6 +71,7 @@
|
||||
{
|
||||
display:block;
|
||||
position:absolute;
|
||||
overflow:auto;
|
||||
z-index:5;
|
||||
/* top:15px; */
|
||||
/* left:15px; */
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#menu h2 {
|
||||
font-size: 12px;
|
||||
font: bold;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
@ -234,3 +234,65 @@ function DebugShowElementsById(ObjName)
|
||||
document.write(obj[key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Detail popup handling functions
|
||||
*/
|
||||
var myPopupHovering = false;
|
||||
function HoveringPopup(event, parentObj)
|
||||
{
|
||||
// This will allow the detail window to be relocated
|
||||
myPopupHovering = true;
|
||||
}
|
||||
|
||||
function FinishHoveringPopup(event, parentObj)
|
||||
{
|
||||
// This will avoid moving the detail window when it is open
|
||||
myPopupHovering = false;
|
||||
}
|
||||
|
||||
function initPopupWindow(parentObj)
|
||||
{
|
||||
// Change CSS Class
|
||||
parentObj.className='syslogdetails_popup';
|
||||
}
|
||||
|
||||
function FinishPopupWindow(parentObj)
|
||||
{
|
||||
// Change CSS Class
|
||||
parentObj.className='syslogdetails';
|
||||
}
|
||||
|
||||
function disableEventPropagation(myEvent)
|
||||
{
|
||||
/* This workaround is specially for our beloved Internet Explorer */
|
||||
if ( window.event)
|
||||
{
|
||||
window.event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
|
||||
function movePopupWindow(myEvent, ObjName, PopupContentWidth, parentObj)
|
||||
{
|
||||
var obj = document.getElementById(ObjName);
|
||||
var middle = PopupContentWidth / 2;
|
||||
// alert ( parentObj.className ) ;
|
||||
if (myPopupHovering == false)
|
||||
{
|
||||
obj.style.left = (myEvent.clientX - middle) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function GoToPopupTarget(myTarget, parentObj)
|
||||
{
|
||||
if (!myPopupHovering)
|
||||
{
|
||||
// Change document location
|
||||
document.location=myTarget;
|
||||
}
|
||||
else /* Close Popup */
|
||||
{
|
||||
FinishPopupWindow(parentObj);
|
||||
}
|
||||
}
|
||||
|
@ -265,14 +265,14 @@
|
||||
<!-- ENDIF hasdetails="false" -->
|
||||
|
||||
<!-- IF hasdetails="true" -->
|
||||
<div OnClick="document.location='{detaillink}{additional_url_sourceonly}';" style="cursor:pointer" class="syslogdetails" OnMouseOver="this.className='syslogdetails_popup';" OnMouseOut="this.className='syslogdetails';">{fieldvalue}<br />
|
||||
<span>
|
||||
<table cellpadding="0" cellspacing="1" border="0" width="500" align="left" class="with_border_alternate">
|
||||
<div OnClick="GoToPopupTarget('{detaillink}{additional_url_sourceonly}',this);" style="cursor:pointer" class="syslogdetails" OnMouseMove="movePopupWindow(event,'details_{FieldColumn}_{uid}',500, this);" OnMouseOver="initPopupWindow(this);" OnMouseOut="FinishPopupWindow(this);">{fieldvalue}<br />
|
||||
<span id="details_{FieldColumn}_{uid}" OnMouseOver="HoveringPopup(event,this);" OnMouseOut="FinishHoveringPopup(event,this);">
|
||||
<table cellpadding="0" cellspacing="1" border="0" width="500" align="left" class="with_border_alternate" OnMouseMove="disableEventPropagation();">
|
||||
<tr><td colspan="2" class="cellmenu1" align="center"><B>{popupcaption}</B></td></tr>
|
||||
<!-- BEGIN messagesdetails -->
|
||||
<tr>
|
||||
<td width="150" nowrap class="cellmenu2">{detailfieldtitle}</td>
|
||||
<td width="100%" class="{detailscssclass}" >{detailfieldvalue}</td>
|
||||
<td width="100%" class="{detailscssclass}">{detailfieldvalue}</td>
|
||||
</tr>
|
||||
<!-- END messagesdetails -->
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user