Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
62d63bc1
Commit
62d63bc1
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Change to support icon on eldy themes
parent
1f3bcb37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/theme/eldy/eldy.css.php
+53
-18
53 additions, 18 deletions
htdocs/theme/eldy/eldy.css.php
with
53 additions
and
18 deletions
htdocs/theme/eldy/eldy.css.php
+
53
−
18
View file @
62d63bc1
...
...
@@ -46,13 +46,13 @@ header('Content-type: text/css');
if
(
empty
(
$dolibarr_nocache
))
header
(
'Cache-Control: max-age=3600, public, must-revalidate'
);
else
header
(
'Cache-Control: no-cache'
);
if
(
!
empty
(
$_GET
[
"lang"
]))
$langs
->
setDefaultLang
(
$_GET
[
"lang"
]);
// If language was forced on URL by the main.inc.php
$langs
->
load
(
"main"
,
0
,
1
);
$right
=
(
$langs
->
direction
==
'rtl'
?
'left'
:
'right'
);
$left
=
(
$langs
->
direction
==
'rtl'
?
'right'
:
'left'
);
$fontsize
=
empty
(
$conf
->
browser
->
phone
)
?
'12'
:
'9'
;
$fontsizesmaller
=
empty
(
$conf
->
browser
->
phone
)
?
'11'
:
'9'
;
?>
/* ============================================================================== */
...
...
@@ -338,25 +338,60 @@ div.mainmenu.cashdesk {
background-image: url(
<?php
echo
DOL_URL_ROOT
.
'/theme/eldy/img/menus/pointofsale.png'
?>
);
}
div.mainmenu.generic1 {
background-image: url(
<?php
echo
DOL_URL_ROOT
.
'/theme/eldy/img/menus/generic1.png'
?>
);
height:26px;
}
div.mainmenu.generic2 {
background-image: url(
<?php
echo
DOL_URL_ROOT
.
'/theme/eldy/img/menus/generic2.png'
?>
);
height:26px;
}
div.mainmenu.generic3 {
background-image: url(
<?php
echo
DOL_URL_ROOT
.
'/theme/eldy/img/menus/generic3.png'
?>
);
height:26px;
<?php
// Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div')
$moduletomainmenu
=
array
(
'user'
=>
''
,
'syslog'
=>
''
,
'societe'
=>
'companies'
,
'projet'
=>
'project'
,
'propale'
=>
'commercial'
,
'commande'
=>
'commercial'
,
'produit'
=>
'products'
,
'service'
=>
'products'
,
'stock'
=>
'products'
,
'don'
=>
'accountancy'
,
'tax'
=>
'accountancy'
,
'banque'
=>
'accountancy'
,
'facture'
=>
'accountancy'
,
'compta'
=>
'accountancy'
,
'accounting'
=>
'accountancy'
,
'adherent'
=>
'members'
,
'import'
=>
'tools'
,
'export'
=>
'tools'
,
'mailing'
=>
'tools'
,
'contrat'
=>
'commercial'
,
'ficheinter'
=>
'commercial'
,
'deplacement'
=>
'commercial'
,
'fournisseur'
=>
'companies'
,
'barcode'
=>
''
,
'fckeditor'
=>
''
,
'categorie'
=>
''
,
);
$mainmenuused
=
'home'
;
foreach
(
$conf
->
modules
as
$key
=>
$val
)
{
$mainmenuused
.
=
','
.
(
isset
(
$moduletomainmenu
[
$val
])
?
$moduletomainmenu
[
$val
]
:
$val
);
}
//var_dump($mainmenuused);
$mainmenuusedarray
=
array_unique
(
explode
(
','
,
$mainmenuused
));
div.mainmenu.generic4 {
background-image: url(
<?php
echo
DOL_URL_ROOT
.
'/theme/eldy/img/menus/generic4.png'
?>
);
height:26px;
}
$generic
=
1
;
$divalreadydefined
=
array
(
'home'
,
'companies'
,
'products'
,
'commercial'
,
'accountancy'
,
'project'
,
'tools'
,
'members'
,
'shop'
,
'agenda'
,
'ecm'
,
'cashdesk'
);
foreach
(
$mainmenuusedarray
as
$key
=>
$val
)
{
if
(
empty
(
$val
)
||
in_array
(
$val
,
$divalreadydefined
))
continue
;
//print "XXX".$val;
// Search img file in module dir
$found
=
0
;
$url
=
''
;
foreach
(
$conf
->
file
->
dol_document_root
as
$dirroot
)
{
if
(
file_exists
(
$dirroot
.
"/"
.
$val
.
"/img/"
.
$val
.
".png"
))
{
$url
=
DOL_URL_ROOT
.
'/'
.
$val
.
'/img/'
.
$val
.
'.png'
;
$found
=
1
;
break
;
}
}
// Img file not found
if
(
!
$found
&&
$generic
<=
4
)
{
$url
=
DOL_URL_ROOT
.
"/theme/eldy/img/menus/generic"
.
$generic
.
".png"
;
$found
=
1
;
$generic
++
;
}
if
(
$found
)
{
print
"/* A mainmenu entry but img file "
.
$val
.
".png not found, so we use a generic one */
\n
"
;
print
"div.mainmenu."
.
$val
.
" {\n"
;
print
" background-image: url("
.
$url
.
");
\n
"
;
print
" height:26px;
\n
"
;
print
"}
\n
"
;
}
}
// End of part to add more div class css
?>
/* Login */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment