View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

How to Modify Background Image

Bulbgraph.png   This feature is available starting from RMP32

Overview

It is possible to change properties style of WEB POS using CSS files. In RMP32 has been added a CSS file in login screen, where the background image is defined.

In RMP32, only the background image and background color can be modified. In next versions more properties style will be added.

How to change the background image from a module

To change the background image, it is needed two steps:

 
.ob-body-standard {
  background-color: blue;
  background: url('./../../org.openbravo.howToChangeBackgroundImage/css/NewImage.jpg') top left;
}

where the new image is located in the path: modules/org.openbravo.howToChangeBackgroundImage/css/NewImage.jpg

 
...
final String cssPrefix = "web/" + MODULE_JAVA_PACKAGE + "/css/";
...
final String[] cssDependency = { "ob-new-style" };
for (String resource : cssDependency) {
      globalResources.add(createComponentResource(ComponentResourceType.Stylesheet, cssPrefix
          + "../css/" + resource + ".css", POSUtils.APP_NAME));
}
 
...

where the name of new CSS is "ob-new-style.css" and it is located in the path: modules/org.openbravo.howToChangeBackgroundImage/web/org.openbravo.howToChangeBackgroundImage/css/ob-new-style.css

Retrieved from "http://wiki.openbravo.com/wiki/How_to_Modify_Background_Image"

This page has been accessed 3,463 times. This page was last modified on 3 April 2014, at 14:00. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.