Added Option to configure font size

Not quiet ready yet
This commit is contained in:
Andre Lorbach 2014-10-22 14:14:32 +02:00
parent c08944a1ef
commit 258ec46f1f
10 changed files with 105 additions and 38 deletions

View File

@ -83,8 +83,9 @@ else
}
// Init Fontlist
// Init Fonts and sizes
InitFontList();
InitFontSizeList();
// --- First thing to do is to check the op get parameter!
// Check for changes first | Abort if Edit is not allowed
@ -141,8 +142,9 @@ if ( isset($_POST['op']) )
// Read default SOURCES | Check if Source exists as well!
if ( isset ($_POST['DefaultSourceID']) && isset($content['Sources'][$_POST['DefaultSourceID']] )) { $content['DefaultSourceID'] = $_POST['DefaultSourceID']; }
// Read default FONT
// Read default FONT Settings
if ( isset ($_POST['DefaultFont']) ) { $content['DefaultFont'] = $_POST['DefaultFont']; }
if ( isset ($_POST['DefaultFontSize']) ) { $content['DefaultFontSize'] = $_POST['DefaultFontSize']; }
// Read checkboxes
if ( isset ($_POST['ViewUseTodayYesterday']) ) { $content['ViewUseTodayYesterday'] = 1; } else { $content['ViewUseTodayYesterday'] = 0; }
@ -206,6 +208,7 @@ if ( isset($_POST['op']) )
// Read default FONT
if ( isset ($_POST['User_DefaultFont']) ) { $USERCFG['DefaultFont'] = $_POST['User_DefaultFont']; }
if ( isset ($_POST['User_DefaultFontSize']) ) { $USERCFG['DefaultFontSize'] = $_POST['User_DefaultFontSize']; }
// Read checkboxes
if ( isset ($_POST['User_ViewUseTodayYesterday']) ) { $USERCFG['ViewUseTodayYesterday'] = 1; } else { $USERCFG['ViewUseTodayYesterday'] = 0; }
@ -334,6 +337,19 @@ foreach ( $content['FONTS'] as &$myFont )
}
// ---
// --- Init for DefaultFontSize field!
// copy Fontsizes Array
$content['FONTSIZES'] = $content['fontsizes'];
if ( !isset($content['DefaultFontSize']) ) { $content['DefaultFontSize'] = 100; }
foreach ( $content['FONTSIZES'] as $myFontKey => &$myFontSize )
{
if ( $myFontKey == $content['DefaultFontSize'] )
$myFontSize['selected'] = "selected";
else
$myFontSize['selected'] = "";
}
// ---
// --- Init for DefaultEncoding field!
// copy Sources Array
$content['ENCODINGS'] = $encodings;
@ -445,6 +461,19 @@ if ( $content['ENABLEUSEROPTIONS'] )
}
// ---
// --- Init for DefaultFontSize field!
// copy Fontsizes Array
$content['USER_FONTSIZES'] = $content['fontsizes'];
$DefaultFontSize = GetConfigSetting('DefaultFontSize', $content['DefaultFontSize'], CFGLEVEL_USER);
foreach ( $content['USER_FONTSIZES'] as $myFontKey => &$myFontSize )
{
if ( $myFontKey == $DefaultFontSize )
$myFontSize['selected'] = "selected";
else
$myFontSize['selected'] = "";
}
// ---
}
// --- BEGIN CREATE TITLE

View File

@ -986,10 +986,22 @@ function InitConfigurationValues()
// --- Set dynamic stylesheet options like Font Type and Sizes
$userdefaultfont = GetConfigSetting("DefaultFont", "Tahoma", CFGLEVEL_USER);
;
$userdefaultfontsize = GetConfigSetting("DefaultFontSize", "100", CFGLEVEL_USER);
$content['DYN_STYLESHEET'] = '<style>
body, .ui-widget {
body, td, .ui-widget, .ui-widget-content {
font-family: ' . $userdefaultfont . ', Verdana, Arial, Helvetica, sans-serif;
font-size: ' . ($userdefaultfontsize/100)*0.75 . 'em;
}
a, .linksize {
font-size: ' . ($userdefaultfontsize/100)*0.85 . 'em;
}
.ui-menu {
font-size: ' . ($userdefaultfontsize/100)*1 . 'em;
}
.ui-button {
font-size: ' . ($userdefaultfontsize/100)*0.85 . 'em;
}
</style>';
// ---
@ -1747,6 +1759,7 @@ function SaveGeneralSettingsIntoDB($bForceStripSlahes = false)
WriteConfigValue( "DefaultViewsID", true, null, null,$bForceStripSlahes );
WriteConfigValue( "DefaultSourceID", true, null, null,$bForceStripSlahes );
WriteConfigValue( "DefaultFont", true, null, null,$bForceStripSlahes );
WriteConfigValue( "DefaultFontSize", true, null, null,$bForceStripSlahes );
// GLOBAL ONLY
WriteConfigValue( "DebugUserLogin", true, null, null,$bForceStripSlahes );
@ -1796,6 +1809,8 @@ function SaveUserGeneralSettingsIntoDB()
WriteConfigValue( "DefaultViewsID", false, $content['SESSION_USERID'] );
WriteConfigValue( "DefaultSourceID", false, $content['SESSION_USERID'] );
WriteConfigValue( "DefaultFont", false, $content['SESSION_USERID'] );
WriteConfigValue( "DefaultFontSize", false, $content['SESSION_USERID'] );
}
@ -2087,8 +2102,24 @@ function InitFontList()
$content["fonts"]["Times New Roman"]["Name"]= "Times New Roman";
$content["fonts"]["Trebuchet MS"]["Name"] = "Trebuchet MS";
$content["fonts"]["Verdana"]["Name"] = "Verdana";
}
// Creates a list of supported available fonts!
function InitFontSizeList()
{
global $content;
$content["fontsizes"]["50"]["Name"] = "50%";
$content["fontsizes"]["60"]["Name"] = "60%";
$content["fontsizes"]["70"]["Name"] = "70%";
$content["fontsizes"]["80"]["Name"] = "80%";
$content["fontsizes"]["90"]["Name"] = "90%";
$content["fontsizes"]["100"]["Name"] = "100%";
$content["fontsizes"]["110"]["Name"] = "110%";
$content["fontsizes"]["120"]["Name"] = "120%";
$content["fontsizes"]["130"]["Name"] = "130%";
$content["fontsizes"]["140"]["Name"] = "140%";
$content["fontsizes"]["150"]["Name"] = "150%";
}
// ---
?>

View File

@ -94,6 +94,7 @@ $content['LN_GEN_ACCESSDENIED'] = "Der Zugriff auf diese Funktion wurde verweige
$content['LN_GEN_DEFVIEWS'] = "Standard-Anzeige";
$content['LN_GEN_DEFSOURCE'] = "Standard-Quelle";
$content['LN_GEN_DEFFONT'] = "Standard-Schriftart";
$content['LN_GEN_DEFFONTSIZE'] = "Standard-Schriftgröße";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Doppelte Meldungen nur einmal anzeigen";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";

View File

@ -94,6 +94,7 @@ $content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
$content['LN_GEN_DEFVIEWS'] = "Default selected view";
$content['LN_GEN_DEFSOURCE'] = "Default selected source";
$content['LN_GEN_DEFFONT'] = "Default Font";
$content['LN_GEN_DEFFONTSIZE'] = "Default FontSize";
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
$content['LN_GEN_TREATFILTERSTRUE'] = "Treat filters of not found fields as true";
$content['LN_GEN_INLINESEARCHICONS'] = "Show Onlinesearch icons within fields";

View File

@ -142,6 +142,25 @@
</td>
<!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr>
<tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_DEFFONTSIZE}</b></td>
<td align="left" class="line1">
<select id="DefaultFontSize" name="DefaultFontSize" size="1" {DISABLE_GLOBALEDIT_FORMCONTROL}>
<!-- BEGIN FONTSIZES -->
<option {selected} value="{Name}">{Name}</option>
<!-- END FONTSIZES -->
</select>
</td>
<!-- IF ENABLEUSEROPTIONS="true" -->
<td align="left" class="line1">
<select id="User_DefaultFontSize" name="User_DefaultFontSize" size="1">
<!-- BEGIN USER_FONTSIZES -->
<option {selected} value="{Name}">{Name}</option>
<!-- END USER_FONTSIZES -->
</select>
</td>
<!-- ENDIF ENABLEUSEROPTIONS="true" -->
</tr>
<tr>
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_PREPENDTITLE}</b></td>

View File

@ -1,4 +1,3 @@
<br/>
<button id="button_menu_adminbegin"><img align="left" src="{MENU_BULLET_BLUE}" width="16" height="16"></button>
<button id="button_menu_pref"><img align="left" src="{MENU_PREFERENCES}" width="16" height="16" vspace="0" title="{LN_ADMINMENU_GENOPT}">&nbsp;{LN_ADMINMENU_GENOPT}</button>
<button id="button_menu_data"><img align="left" src="{MENU_DATAEDIT}" width="16" height="16" vspace="0" title="{LN_ADMINMENU_SOURCEOPT}">&nbsp;{LN_ADMINMENU_SOURCEOPT}</button>

View File

@ -134,7 +134,7 @@
</table>
<!-- ENDIF MAXIMIZED!="true" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_with_border">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="table_with_border">
<tr>
<td>
<!-- IF IS_ADMINPAGE!="true" -->
@ -142,6 +142,10 @@
<!-- ENDIF IS_ADMINPAGE!="true" -->
<!-- IF IS_ADMINPAGE="true" -->
<!-- INCLUDE include_menu.html -->
</td>
</tr>
<tr>
<td>
<!-- INCLUDE admin/admin_menu.html -->
<!-- ENDIF IS_ADMINPAGE="true" -->
</td>

View File

@ -18,7 +18,7 @@
<!-- IF SESSION_LOGGEDIN="true" -->
<button id="button_menu_admcnt"><img align="left" src="{MENU_ADMINENTRY}" width="16" height="16" vspace="0" title="{LN_MENU_ADMINCENTER}">&nbsp;{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" title="{LN_MENU_LOGOFF}">&nbsp;{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>
<button id="button_menu_end"><img align="left" src="{MENU_ADMINUSERS}" width="16" height="16" vspace="0" title="{LN_MENU_LOGGEDINAS} {SESSION_USERNAME}">&nbsp;{LN_MENU_LOGGEDINAS} "{SESSION_USERNAME}"</button><script>CreateLinkFunction( "#button_menu_end", ""); </script>
<!-- ENDIF SESSION_LOGGEDIN="true" -->
<!-- ENDIF UserDBEnabled="true" -->
<!-- IF IS_NOLOGINPAGE!="true" -->

View File

@ -363,7 +363,7 @@
<button id="detaillink_{FieldColumn}_{uid}"><img style="position:relative; top:0px; left:0px;" src="{MENU_LINK_VIEW}" width="16" height="16" title="{LN_GEN_MESSAGEDETAILS}"></button>
<script> CreateLinkFunction( "#detaillink_{FieldColumn}_{uid}", "{detaillink}{additional_url_sourceonly}{additional_url}" );</script>
<!-- BEGIN DISABLED -->
<a href="{detaillink}{additional_url_sourceonly}{additional_url}" class="syslogdetails"><img align="{detailimagealign}" vspace="0" hspace="2" src="{MENU_LINK_VIEW}" width="16" height="16" border="0" title="{LN_GEN_MESSAGEDETAILS}"></a>
<a href="{detaillink}{additional_url_sourceonly}{additional_url}"><img align="{detailimagealign}" vspace="0" hspace="2" src="{MENU_LINK_VIEW}" width="16" height="16" border="0" title="{LN_GEN_MESSAGEDETAILS}"></a>
<!-- END DISABLED -->
<!-- ENDIF ismessagefield="true" -->
@ -378,12 +378,12 @@
<!-- ENDIF hasbuttons="true" -->
<!-- IF hasbuttons!="true" -->
<b>{fieldvalue}</b>
<span class="linksize"><b>{fieldvalue}</b></span>
<!-- ENDIF hasbuttons!="true" -->
<!-- ENDIF ismessagefield!="true" -->
<!-- IF ismessagefield="true" -->
<a href="{detaillink}{additional_url_sourceonly}{additional_url}" class="syslogdetails" target="_top">{fieldvalue}</a>
<a href="{detaillink}{additional_url_sourceonly}{additional_url}" target="_top">{fieldvalue}</a>
<!-- ENDIF ismessagefield="true" -->
<!-- ENDIF hasdetails="false" -->

View File

@ -1,7 +1,7 @@
/* Generell Tag Classes */
body
{
font-size: 10px;
/* font-size: 10px; */
color: #000000;
background-color: #f9f9f9;
@ -16,7 +16,6 @@ body
td
{
font-size: 11px;
color: #000000
}
@ -74,7 +73,7 @@ img
text-align:center;
vertical-align:middle;
}
A.title, A.title:active, A.title:visited
a.title, a.title:active, a.title:visited
{
font-size: 11px;
font-weight:bold;
@ -82,15 +81,14 @@ A.title, A.title:active, A.title:visited
COLOR: #ED9D10;
TEXT-DECORATION: none;
}
A.title:hover
a.title:hover
{
COLOR: #982D00;
TEXT-DECORATION: none;
}
.titleSecond
{
font-size: 10px;
font-weight:bold;
font-weight:bold;
background-color: #E3D2AE;
background-image: url(images/bg_4.png);
@ -106,8 +104,7 @@ A.title:hover
/* Default Font Classes */
font
{
font-size: 10px;
}
}
/* Table / Border Classes */
.table_with_border
@ -168,8 +165,7 @@ font
/* Cells for listening */
.line0
{
font-size: 10px;
color: #000000;
color: #000000;
background-color: #DDDDDD;
}
.line0:hover
@ -179,7 +175,6 @@ font
.line1
{
font-size: 10px;
color: #000000;
background-color: #EEEEEE;
}
@ -190,8 +185,7 @@ font
.line2
{
font-size: 10px;
color: #000000;
color: #000000;
background-color: #F5F5F5;
}
.line2:hover
@ -200,20 +194,17 @@ font
}
.tableBackground
{
font-size: 10px;
color: #000000;
color: #000000;
background-color: #F5F5F5;
}
.lineColouredWhite, .lineColouredWhite:hover, a.lineColouredWhite
{
font-size: 10px;
color: #FFFFFF;
color: #FFFFFF;
}
.lineColouredBlack, .lineColouredBlack:hover, a.lineColouredBlack
{
font-size: 10px;
color: #000000;
color: #000000;
}
/* TOP Menu Classes */
@ -370,7 +361,6 @@ font
border-color: #79AABE #09506C #09506C #79AABE;
text-indent:0px;
font-size: 10px;
font-weight:bold;
background-color: #2E79A0;
@ -386,7 +376,6 @@ font
background-color: #2E79A0;
text-indent:0px;
font-size: 10px;
font-weight:bold;
color: #FFFFFF;
@ -413,7 +402,6 @@ A.cellmenu1_link:hover
border-color: #79AABE #09506C #09506C #79AABE;
text-indent:0px;
font-size: 10px;
font-weight:bold;
background-color: #9FDAF1;
@ -424,7 +412,6 @@ A.cellmenu1_link:hover
.cellmenu2_naked
{
text-indent:0px;
font-size: 10px;
font-weight:bold;
color: #393327;
@ -518,7 +505,6 @@ select, input, button, textarea
background-color: #E8E7E2;
color:#000000;
font-size: 10px;
font-weight: bold;
border: 1px solid;
@ -532,7 +518,6 @@ select, input, button, textarea
background-color: #E8E7E2;
color:#000000;
font-size: 10px;
font-weight: bold;
border: 1px solid;
@ -547,7 +532,6 @@ select, input, button, textarea
background-color: #E8E7E2;
color:#000000;
font-size: 10px;
font-weight: bold;
border: 1px solid;
@ -556,7 +540,6 @@ select, input, button, textarea
.highlighted
{
font-size: 10px;
font-weight: bold;
color: #BB0000