From b37569653330231b1c5347da4e99fbf2b72664b8 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 2 Mar 2010 07:17:07 +0000 Subject: [PATCH] Updated styles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15823 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/themes/modern/style.css | 19 ++++++++++++++---- gosa-core/ihtml/themes/modern/headers.tpl | 5 +---- gosa-core/include/class_listing.inc | 24 +++++++++++------------ gosa-core/include/functions.inc | 7 +++++-- 4 files changed, 32 insertions(+), 23 deletions(-) diff --git a/gosa-core/html/themes/modern/style.css b/gosa-core/html/themes/modern/style.css index abd788fd7..f69757487 100644 --- a/gosa-core/html/themes/modern/style.css +++ b/gosa-core/html/themes/modern/style.css @@ -85,18 +85,25 @@ img, input[type=image] { } /* Image with migration color */ -button.img{ - background:none; + +input[type=submit].img{ border:0; - margin:0; padding:0; + margin:0; + display:inline-block; + display:-moz-inline-block; + background-color:transparent; + background-repeat:no-repeat; + position:relative; + cursor:pointer; } div.img{ + display:inline-block; + display:-moz-inline-block; background-color:transparent; background-repeat:no-repeat; position:relative; - float:left; } div.img div { @@ -462,6 +469,10 @@ button:focus, .button:active { cursor:pointer; } +.icon-menu-item div.img{ + float:left; +} + .icon-menu-item div.dsc{ margin-left:55px } diff --git a/gosa-core/ihtml/themes/modern/headers.tpl b/gosa-core/ihtml/themes/modern/headers.tpl index 3edac053a..8b43c3fe3 100644 --- a/gosa-core/ihtml/themes/modern/headers.tpl +++ b/gosa-core/ihtml/themes/modern/headers.tpl @@ -24,10 +24,7 @@ diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 37efe409d..3af94e18f 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -416,7 +416,7 @@ class listing { foreach ($this->objectTypes as $objectType) { if (isset($this->objectTypeCount[$objectType['label']])) { $label= _($objectType['label']); - $result.= "$label ".$this->objectTypeCount[$objectType['label']]."    "; + $result.= image($objectType['image'], null, null, $label)." ".$this->objectTypeCount[$objectType['label']]."  "; } } @@ -551,7 +551,7 @@ class listing { // Override base if we got signals from the navigation elements $action= ""; foreach ($_POST as $key => $value) { - if (preg_match('/^(ROOT|BACK|HOME)_x$/', $key, $match)) { + if (preg_match('/^(ROOT|BACK|HOME)(_x)?$/', $key, $match)) { $action= $match[1]; break; } @@ -986,31 +986,29 @@ class listing { /* Draw root button */ if($enableRoot){ - $result["ROOT"]= ""; + $result["ROOT"]= image('images/lists/root.png', null, 'ROOT', _("Root")); }else{ - $result["ROOT"]= ""._("Root").""; + $result["ROOT"]= image('images/lists/root-grey.png', null, null, _("Root")); } /* Draw back button */ if($enableBack){ - $result["BACK"]= ""; + $result["BACK"]= image('images/lists/back.png', null, 'BACK', _("Go up one department")); }else{ - $result["BACK"]= ""._("Up").""; + $result["BACK"]= image('images/lists/back-grey.png', null, null, _("Go up one department")); } /* Draw home button */ + /* Draw home button */ if($enableHome){ - $result["HOME"]= ""; + $result["HOME"]= image('images/lists/home.png', null, 'HOME', _("Go to users department")); }else{ - $result["HOME"]= ""._("Home").""; + $result["HOME"]= image('images/lists/home-grey.png', null, null, _("Go to users department")); } + /* Draw reload button, this button is enabled everytime */ - $result["RELOAD"]= ""; + $result["RELOAD"]= image('images/lists/reload.png', null, 'REFRESH', _("Reload list")); return ($result); } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 9a9e2799c..24d9328ae 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3554,10 +3554,13 @@ function image($path, $label= null, $action= "", $title= "") } // Clickable image or not? + if ($title != "") { + $title= "title='$title'"; + } if ($action == "") { - return "
$lbl
"; + return "
$lbl
"; } else { - return ""; + return ""; } } -- 2.30.2