mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Changed Main Menu Implementation to jquery ui
This commit is contained in:
parent
2c57bcd474
commit
d217ad7017
@ -102,7 +102,7 @@
|
||||
|
||||
.gridline
|
||||
{
|
||||
vertical-align: top;
|
||||
vertical-align: middle;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
|
@ -439,10 +439,16 @@ function HoverPopupMenuHelp( myEvent, parentObj, myPopupTitle, HoverContent )
|
||||
* New JQUERY Helper functions
|
||||
*/
|
||||
|
||||
function CreateMenuFunction ( szbuttonobjid, szmenuobjid )
|
||||
function CreateMenuFunction ( szbuttonobjid, szmenuobjid, bHide )
|
||||
{
|
||||
// Popup Menu Code
|
||||
var menu = $("ul" + szmenuobjid).menu().hide();
|
||||
var menu = $("ul" + szmenuobjid).menu();
|
||||
|
||||
if (bHide) {
|
||||
// Hide
|
||||
menu.hide();
|
||||
}
|
||||
|
||||
$(szbuttonobjid).button()
|
||||
.click(function() {
|
||||
// Make use of the general purpose show and position operations
|
||||
@ -470,8 +476,15 @@ function CreateMenuFunction ( szbuttonobjid, szmenuobjid )
|
||||
// Helper function to click a link by keypress
|
||||
menu.menu({
|
||||
select: function(event, ui){
|
||||
if ($(ui.item).find('a').attr('href') != null) {
|
||||
window.location.href = $(ui.item).find('a').attr('href');
|
||||
var szHref = $(ui.item).find('a').attr('href');
|
||||
if (szHref != null && szHref.length > 0) {
|
||||
alert ( szHref );
|
||||
var szTarget = $(ui.item).find('a').attr('target');
|
||||
if (szTarget == "_top") {
|
||||
window.location.href = szHref;
|
||||
} else {
|
||||
window.open(szHref, szTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -486,9 +499,11 @@ function CreateLinkFunction ( szbuttonobjid, szlink )
|
||||
{
|
||||
$(szbuttonobjid).button()
|
||||
.click(function() {
|
||||
// Perform Button Click now!
|
||||
if (szlink != null && szlink.length > 0) {
|
||||
window.location.href = szlink;
|
||||
// Make sure to return false here or the click registration above gets invoked.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure to return false here or the click registration above gets invoked.
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
@ -1,3 +1,41 @@
|
||||
<button id="button_menu_begin"><img align="left" src="{MENU_BULLET_GREEN}" width="16" height="16" vspace="0"></button>
|
||||
<button id="button_menu_search"><img align="left" src="{MENU_SEARCH}" width="16" height="16" vspace="0">{LN_MENU_SEARCH}</button>
|
||||
<button id="button_menu_showevt"><img align="left" src="{MENU_HOMEPAGE}" width="16" height="16" vspace="0">{LN_MENU_SHOWEVENTS}</button>
|
||||
<button id="button_menu_stats"><img align="left" src="{MENU_CHARTS}" width="16" height="16" vspace="0">{LN_MENU_STATISTICS}</button>
|
||||
<button id="button_menu_reports"><img align="left" src="{MENU_CHARTPRESENTATION}" width="16" height="16" vspace="0">{LN_MENU_REPORTS}</button>
|
||||
<button id="button_menu_help"><img align="left" src="{MENU_HELP}" width="16" height="16" vspace="0">{LN_MENU_HELP}</button>
|
||||
<ul id="menu_help" style="position:absolute;z-index:99;">
|
||||
<li><a href="{PHPLOGCON_HELPLINK}" target="phplogcon_help"><img align="left" src="{MENU_BULLET_YELLOW}" width="16" height="16" vspace="0">{LN_MENU_DOC}</a></li>
|
||||
<li><a href="http://kb.monitorware.com/phplogcon-f39.html" target="phplogcon_help"><img align="left" src="{MENU_BULLET_YELLOW}" width="16" height="16" vspace="0">{LN_MENU_FORUM}</a></li>
|
||||
<li><a href="http://wiki.rsyslog.com/index.php/PhpLogCon_FAQ" target="phplogcon_help"><img align="left" src="{MENU_BULLET_YELLOW}" width="16" height="16" vspace="0">{LN_MENU_WIKI}</a></li>
|
||||
<li><a href="http://loganalyzer.adiscon.com/doc-professional_services.html" target="phplogcon_help"><img align="left" src="{MENU_BULLET_YELLOW}" width="16" height="16" vspace="0">{LN_MENU_PROSERVICES}</a></li>
|
||||
</ul>
|
||||
<button id="button_menu_searchkb"><img align="left" src="{MENU_KB}" width="16" height="16" vspace="0">{LN_MENU_SEARCHINKB}</button>
|
||||
<!-- IF UserDBEnabled="true" -->
|
||||
<!-- IF SESSION_LOGGEDIN!="true" -->
|
||||
<button id="button_menu_login"><img align="left" src="{MENU_ADMINLOGOFF}" width="16" height="16" vspace="0">{LN_MENU_LOGIN}</button><script>CreateLinkFunction( "#button_menu_login", "{BASEPATH}login.php"); </script>
|
||||
<!-- ENDIF SESSION_LOGGEDIN!="true" -->
|
||||
<!-- IF SESSION_LOGGEDIN="true" -->
|
||||
<button id="button_menu_admcnt"><img align="left" src="{MENU_ADMINENTRY}" width="16" height="16" vspace="0">{LN_MENU_ADMINCENTER}</button><script>CreateLinkFunction( "#button_menu_admcnt", "{BASEPATH}admin/index.php"); </script>
|
||||
<button id="button_menu_logoff"><img align="left" src="{MENU_ADMINLOGOFF}" width="16" height="16" vspace="0">{LN_MENU_LOGOFF}</button><script>CreateLinkFunction( "#button_menu_logoff", "{BASEPATH}login.php?op=logoff"); </script>
|
||||
<button id="button_menu_end">{LN_MENU_LOGGEDINAS} "{SESSION_USERNAME}"</button><script>CreateLinkFunction( "#button_menu_end", ""); </script>
|
||||
<!-- ENDIF SESSION_LOGGEDIN="true" -->
|
||||
<!-- ENDIF UserDBEnabled="true" -->
|
||||
<!-- IF IS_NOLOGINPAGE!="true" -->
|
||||
<button id="button_menu_minmax"><img align="left" src="{MAXIMAGE}" width="16" height="16" vspace="0">{MAXLANGTEXT}</button><script>CreateLinkFunction( "#button_menu_minmax", "{MAXURL}"); </script>
|
||||
<!-- ENDIF IS_NOLOGINPAGE!="true" -->
|
||||
|
||||
<script>
|
||||
CreateLinkFunction( "#button_menu_begin", "");
|
||||
CreateLinkFunction( "#button_menu_search", "{BASEPATH}search.php");
|
||||
CreateLinkFunction( "#button_menu_showevt", "{BASEPATH}index.php?{additional_url}");
|
||||
CreateLinkFunction( "#button_menu_stats", "{BASEPATH}statistics.php");
|
||||
CreateLinkFunction( "#button_menu_reports", "{BASEPATH}reports.php");
|
||||
CreateMenuFunction( "#button_menu_help", "#menu_help", true );
|
||||
CreateLinkFunction( "#button_menu_searchkb", "http://kb.monitorware.com/search.php");
|
||||
</script>
|
||||
|
||||
<!-- BEGIN DISABLED -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="topmenu1begin" nowrap align="center" width="16"><img align="left" src="{MENU_BULLET_GREEN}" width="16" height="16" vspace="0"></td>
|
||||
@ -43,3 +81,4 @@
|
||||
<!-- ENDIF IS_NOLOGINPAGE!="true" -->
|
||||
</tr>
|
||||
</table>
|
||||
<!-- END DISABLED -->
|
@ -23,7 +23,7 @@
|
||||
<li><a href="?{SearchQuery}{additional_url_sourceonly}" target="_top">{DisplayName}</a></li>
|
||||
<!-- END Search -->
|
||||
</ul>
|
||||
<script> CreateMenuFunction( "#openmenu_searches", "#menu_searches" );</script>
|
||||
<script> CreateMenuFunction( "#openmenu_searches", "#menu_searches", true );</script>
|
||||
|
||||
<!-- BEGIN DISABLED -->
|
||||
<div id="menu">
|
||||
@ -305,7 +305,7 @@
|
||||
</li>
|
||||
<!-- END buttons -->
|
||||
</ul>
|
||||
<script> CreateMenuFunction( "#button_menu_{FieldColumn}_{uid}", "#menu_{FieldColumn}_{uid}" );</script>
|
||||
<script> CreateMenuFunction( "#button_menu_{FieldColumn}_{uid}", "#menu_{FieldColumn}_{uid}", true );</script>
|
||||
|
||||
<!-- BEGIN DISABLED -->
|
||||
<div id="menu" style="position: absolute;">
|
||||
@ -325,13 +325,15 @@
|
||||
</div>
|
||||
<!-- END DISABLED -->
|
||||
|
||||
<!-- BEGIN DISABLED -->
|
||||
<!-- IF searchonline="true" -->
|
||||
<button id="onlinesearch_{FieldColumn}_{uid}"><img style="position:relative; top:0px; left:0px;" src="{MENU_EARTH_FIND}" width="16" height="16"></button>
|
||||
<script> CreateLinkFunction( "#onlinesearch_{FieldColumn}_{uid}", "{SearchOnlineUrl}" );</script>
|
||||
<!-- BEGIN DISABLED -->
|
||||
<!-- BEGIN DISABLED2 -->
|
||||
<a href="{SearchOnlineUrl}" target="_blank"><img style="position:relative; top:0px; left:0px;" src="{MENU_EARTH_FIND}" width="16" height="16" vspace="0" hspace="0"></a>
|
||||
<!-- END DISABLED -->
|
||||
<!-- END DISABLED2 -->
|
||||
<!-- ENDIF searchonline="true" -->
|
||||
<!-- END DISABLED -->
|
||||
|
||||
<!-- ENDIF hasbuttons="true" -->
|
||||
|
||||
@ -347,7 +349,7 @@
|
||||
<!-- IF ismessagefield!="true" -->
|
||||
<!-- IF hasbuttons="true" -->
|
||||
<button id="button_menu_{FieldColumn}_{uid}">{fieldvalue}</button>
|
||||
<script> CreateMenuFunction( "#button_menu_{FieldColumn}_{uid}", "#menu_{FieldColumn}_{uid}" );</script>
|
||||
<script> CreateMenuFunction( "#button_menu_{FieldColumn}_{uid}", "#menu_{FieldColumn}_{uid}", true );</script>
|
||||
<!-- BEGIN DISABLED -->
|
||||
<a href="#search" OnClick="ToggleDisplayTypeById('menu_{FieldColumn}_{uid}');" class="{fieldcssclass}">{fieldvalue}</a>
|
||||
<!-- END DISABLED -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user