31,003
edits
| Line 335: | Line 335: | ||
= [[File:Art.png]] Define your CSS styles (optionnal) = | = [[File:Art.png]] Define your CSS styles (optionnal) = | ||
'''When''': If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded). | '''When''': If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded). | ||
== | == Create and declare your style sheet == | ||
Create a style sheet CSS named '''mymodule.css''' and put it into directory '''htdocs/mymodule'''. You can have only one CSS file per module. | |||
Remember it's better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file '''themes/mytheme/''themename''.php.css'''. Create your own CSS file only if you need absolutely to add not already existing styles. | |||
Once your style sheet is ready, declare it into your module descriptor file by modifying the property '''$this->style_sheet'''. | |||
Value to put here must be a relative URL to your CSS file. | |||
For example '/mymodule/myfile.css'. | |||
== | == Test your style sheet == | ||
Disable and enable your module. | |||
Go on home page (index.php). Show the HTML source of the page. | |||
You should see into the HTML header, a ligne that declare your style sheet. | |||
= [[File:Art.png]] Define you Javascript functions (optionnal) = | = [[File:Art.png]] Define you Javascript functions (optionnal) = | ||