Alexander Wels has posted comments on this change.

Change subject: userportal, webadmin: branding support.
......................................................................


Patch Set 19: (49 inline comments)

....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/branding/BrandingManager.java
Line 16: import org.codehaus.jackson.node.ObjectNode;
Line 17: import org.ovirt.engine.core.utils.EngineLocalConfig;
Line 18: 
Line 19: /**
Line 20:  * This class manages the available branding themes.
Done
Line 21:  */
Line 22: public class BrandingManager {
Line 23:     /**
Line 24:      * The default branding path.


Line 39:      * The regex pattern to use to determine if a directory should be 
used
Line 40:      * as a branding directory. The pattern is '^\d?\d\-.+' So any two 
digits
Line 41:      * followed by a dash will do.
Line 42:      */
Line 43:     private static final Pattern DIRECTORY_PATTERN = 
Pattern.compile(".+\\.brand"); //$NON-NLS-1$
Because I changed the pattern without changing the associated javadoc.
Line 44: 
Line 45:     private static final int CURRENT_BRANDING_VERSION = 1;
Line 46:     /**
Line 47:      * A list of available {@code BrandingTheme}s.


Line 41:      * followed by a dash will do.
Line 42:      */
Line 43:     private static final Pattern DIRECTORY_PATTERN = 
Pattern.compile(".+\\.brand"); //$NON-NLS-1$
Line 44: 
Line 45:     private static final int CURRENT_BRANDING_VERSION = 1;
Yes it is, I will add appropriate java doc.
Line 46:     /**
Line 47:      * A list of available {@code BrandingTheme}s.
Line 48:      */
Line 49:     private List<BrandingTheme> themes = null;


Line 45:     private static final int CURRENT_BRANDING_VERSION = 1;
Line 46:     /**
Line 47:      * A list of available {@code BrandingTheme}s.
Line 48:      */
Line 49:     private List<BrandingTheme> themes = null;
Done
Line 50: 
Line 51:     /**
Line 52:      * The root path of the branding themes.
Line 53:      */


Line 132:         ObjectNode node = new ObjectMapper().createObjectNode();
Line 133:         for (Map.Entry<String, String> entry : keyValues.entrySet()) {
Line 134:             node.put(entry.getKey(), entry.getValue());
Line 135:         }
Line 136:         return node.size() > 0 ? node.toString() : null;
In the end the jsp checks if the message is null or not. If it is null then it 
doesn't include the messages javascript variable into the host page. We could 
have an empty javascript object in the host page as well. It is 6 of one half a 
dozen of the other.
Line 137:     }
Line 138: 
Line 139:     /**
Line 140:      * Get the root path of the branding files.


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/branding/BrandingTheme.java
Line 18:  *  <li>The path to the theme</li>
Line 19:  *  <li>The name of the style sheet associated with the theme</li>
Line 20:  * </ul>
Line 21:  */
Line 22: public class BrandingTheme {
Done
Line 23:     /**
Line 24:      * Enumeration specifying which application type to get a
Line 25:      * style sheet for.
Line 26:      */


Line 113:      * @param brandingRootPath The root of the path to the branding 
theme,
Line 114:      * @param brandingVersion The version to load, if the version 
don't match the load will fail.
Line 115:      * @return {@code true} if successfully loaded, {@code false} 
otherwise.
Line 116:      */
Line 117:     public boolean load(final String brandingPath, final File 
brandingRootPath, final int brandingVersion) {
That is how I originally had it, see here for the why the change:
http://gerrit.ovirt.org/#/c/13181/6/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/branding/BrandingTheme.java
Line 118:         path = brandingPath.substring(
Line 119:                 brandingRootPath.getAbsolutePath().
Line 120:                         length());
Line 121:         filePath = brandingPath;


Line 122:         available = false;
Line 123:         FileInputStream propertiesFile;
Line 124:         try {
Line 125:             propertiesFile = new FileInputStream(brandingPath
Line 126:                     + "/" + BRANDING_PROPERTIES_NAME); //$NON-NLS-1$
Done
Line 127:             brandingProperties.load(propertiesFile);
Line 128:             available = brandingVersion == getVersion();
Line 129:             if (!available) {
Line 130:                 log.warn("Unable to load branding theme, mismatched 
version: " //$NON-NLS-1$


Line 124:         try {
Line 125:             propertiesFile = new FileInputStream(brandingPath
Line 126:                     + "/" + BRANDING_PROPERTIES_NAME); //$NON-NLS-1$
Line 127:             brandingProperties.load(propertiesFile);
Line 128:             available = brandingVersion == getVersion();
What is strange about it? It loads the brandingProperties, then it uses one of 
the values in there to mark the theme available or not (the version).
Line 129:             if (!available) {
Line 130:                 log.warn("Unable to load branding theme, mismatched 
version: " //$NON-NLS-1$
Line 131:                     + getVersion() + " wanted version: " + 
brandingVersion); //$NON-NLS-1$
Line 132:             }


Line 134:             // Unable to load properties file, disable theme.
Line 135:             log.warn("Unable to load properties file for " 
//$NON-NLS-1$
Line 136:                     + "theme located here:"//$NON-NLS-1$
Line 137:                     + brandingPath + "/" //$NON-NLS-1$
Line 138:                     + BRANDING_PROPERTIES_NAME);
Done
Line 139:         }
Line 140:         return available;
Line 141:     }
Line 142:     /**


Line 150:     /**
Line 151:      * Getter for the webadmin style sheet name.
Line 152:      * @return The {@code String} representing the style sheet.
Line 153:      */
Line 154:     public final String getWebadminStyleSheetName() {
It was necessary in earlier revisions, just never removed it as a convenience 
method
Line 155:         return 
brandingProperties.getProperty(ApplicationType.WEBADMIN.getCssKey());
Line 156:     }
Line 157: 
Line 158:     /**


Line 158:     /**
Line 159:      * Getter for the user portal style sheet name.
Line 160:      * @return The {@code String} representing the style sheet.
Line 161:      */
Line 162:     public final String getUserPortalStyleSheetName() {
It was necessary in earlier revisions, just never removed it as a convenience 
method
Line 163:         return 
brandingProperties.getProperty(ApplicationType.USER_PORTAL.getCssKey());
Line 164:     }
Line 165: 
Line 166:     /**


Line 190:      * Get the style sheet type based on the passed in {@code 
ApplicationType}.
Line 191:      * @param type The application type to get the style sheet string 
for.
Line 192:      * @return A {@code String} representation of the style sheet 
name.
Line 193:      */
Line 194:     public final String getThemeStyleSheet(final ApplicationType 
type) {
You are right, fixed.
Line 195:         String result = null;
Line 196:         switch (type) {
Line 197:         case USER_PORTAL:
Line 198:             result = getUserPortalStyleSheetName();


Line 212:      * @return A {@code ResourceBundle} containing messages.
Line 213:      */
Line 214:     public final ResourceBundle getMessagesBundle() {
Line 215:         // Default to US Locale.
Line 216:         return getMessagesBundle(Locale.US);
Done
Line 217:     }
Line 218: 
Line 219:     /**
Line 220:      * Get the theme messages resource bundle.


Line 229:                     new URL[] {
Line 230:                             themeDirectory.toURI().toURL() });
Line 231:             result = ResourceBundle.getBundle(
Line 232:                     brandingProperties.getProperty(MESSAGES_KEY).
Line 233:                             replaceAll("\\.properties", ""), 
//$NON-NLS-1$ //$NON-NLS-2$
Doesn't replace all use a regex? What is the problem with replaceAll?
Line 234:                     locale,
Line 235:                     urlLoader);
Line 236:         } catch (IOException e) {
Line 237:             // Unable to load messages resource bundle.


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/BrandingServlet.java
Line 56:         String fullPath = getFullPath(path);
Line 57:         if (fullPath != null) {
Line 58:             File file = new File(fullPath);
Line 59:             if (!file.exists() || !file.canRead() || 
file.isDirectory()) {
Line 60:                 log.error("Unable to locate file, will send a 404 
error response."); //$NON-NLS-1$
Done
Line 61:                 response.sendError(HttpServletResponse.SC_NOT_FOUND);
Line 62:             } else {
Line 63:                 String etag = generateEtag(file);
Line 64:                 if 
(etag.equals(request.getHeader(GwtDynamicHostPageServlet.


Line 104:      * @return A full absolute path for the passed in path.
Line 105:      */
Line 106:     String getFullPath(final String path) {
Line 107:         String result = null;
Line 108:         if (path != null && ServletUtils.isSane(path)) {
Well the isSane is there to check against the user specifying a potentially 
dangerous path in the URL. The branding root path is assumed to be safe 
already, so checking root path + unsafe part vs checking unsafe part is the 
same thing.
Line 109:             // Return a result relative to the branding root path.
Line 110:             result = 
brandingManager.getBrandingRootPath().getAbsolutePath() + path;
Line 111:         } else {
Line 112:             log.error("The path \"" + path + "\" is not sane"); 
//$NON-NLS-1$ //$NON-NLS-2$


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GwtDynamicHostPageServlet.java
Line 30: 
Line 31: /**
Line 32:  * Renders the HTML host page of a GWT application.
Line 33:  * <p>
Line 34:  * Embeds additional data (JavaScript objects) into the host page.
Done
Line 35:  * By default, information about the currently logged-in
Line 36:  * user is included via {@code userInfo} object.
Line 37:  */
Line 38: public abstract class GwtDynamicHostPageServlet extends HttpServlet {


Line 35:  * By default, information about the currently logged-in
Line 36:  * user is included via {@code userInfo} object.
Line 37:  */
Line 38: public abstract class GwtDynamicHostPageServlet extends HttpServlet {
Line 39:     /**
Done
Line 40:      * The values of this enum are used by the MD5 sum calculation to
Line 41:      * determine if the values have changed.
Line 42:      */
Line 43:     public enum MD5Attributes {


Line 112:         request.setAttribute(MD5Attributes.ATTR_STYLES.getKey(), 
brandingThemes);
Line 113:         // Set the messages that need to be replaced.
Line 114:         request.setAttribute(MD5Attributes.ATTR_MESSAGES.getKey(), 
getBrandingMessages(getLocaleFromRequest(request)));
Line 115:         // Set the default theme path.
Line 116:         request.setAttribute(ATTR_THEME_PATH, "theme"); //$NON-NLS-1$
No, this can be removed actually.
Line 117:         // Set class of servlet
Line 118:         
request.setAttribute(MD5Attributes.ATTR_APPLICATION_TYPE.getKey(), 
getApplicationType());
Line 119:         // Set attribute for userInfo object
Line 120:         VdcUser loggedInUser = 
getLoggedInUser(request.getSession().getId());


Line 161:     private Locale getLocaleFromRequest(final ServletRequest request) 
{
Line 162:         Locale locale = (Locale) 
request.getAttribute(LocaleFilter.LOCALE); //$NON-NLS-1$
Line 163:         if (locale == null) {
Line 164:             //If no locale defined, default back to US locale.
Line 165:             locale = Locale.US;
Done
Line 166:         }
Line 167:         return locale;
Line 168:     }
Line 169: 


Line 167:         return locale;
Line 168:     }
Line 169: 
Line 170:     /**
Line 171:      * Get a JavaScript associated array string that define the 
branding messages.
Done
Line 172:      * @param locale {@code Locale} to use to look up the messages.
Line 173:      * @return The messages as a {@code String}
Line 174:      */
Line 175:     private String getBrandingMessages(final Locale locale) {


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
Line 21:     }
Line 22: 
Line 23:     @Override
Line 24:     public ApplicationType getApplicationType() {
Line 25:         return BrandingTheme.ApplicationType.USER_PORTAL;
Done
Line 26:     }


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/WebAdminHostPageServlet.java
Line 41:     }
Line 42: 
Line 43:     @Override
Line 44:     public ApplicationType getApplicationType() {
Line 45:         return BrandingTheme.ApplicationType.WEBADMIN;
Done
Line 46:     }
Line 47: 
Line 48:     @Override
Line 49:     protected boolean filterQueries() {


....................................................
File 
frontend/webadmin/modules/frontend/src/main/resources/META-INF/resources/GwtHostPage.jsp
Line 7:     <meta http-equiv="X-UA-Compatible" content="IE=edge">
Line 8:     <meta name="gwt:property" 
content="locale=${requestScope['locale']}">
Line 9:     <c:if test="${requestScope['brandingStyle'] != null}">
Line 10:         <c:forEach items="${requestScope['brandingStyle']}" 
var="theme">
Line 11:         <c:if 
test="${theme.getThemeStyleSheet(requestScope['applicationType']) != null}">
Done
Line 12:     <link rel="stylesheet" type="text/css" 
href="${pageContext.request.contextPath}/${requestScope['theme']}${theme.path}/${theme.getThemeStyleSheet(requestScope['applicationType'])}">
Line 13:         </c:if>
Line 14:         </c:forEach>
Line 15:     </c:if>


Line 8:     <meta name="gwt:property" 
content="locale=${requestScope['locale']}">
Line 9:     <c:if test="${requestScope['brandingStyle'] != null}">
Line 10:         <c:forEach items="${requestScope['brandingStyle']}" 
var="theme">
Line 11:         <c:if 
test="${theme.getThemeStyleSheet(requestScope['applicationType']) != null}">
Line 12:     <link rel="stylesheet" type="text/css" 
href="${pageContext.request.contextPath}/${requestScope['theme']}${theme.path}/${theme.getThemeStyleSheet(requestScope['applicationType'])}">
I purposely didn't indent the <link> tag, so the output is indented properly.
Line 13:         </c:if>
Line 14:         </c:forEach>
Line 15:     </c:if>
Line 16:     <script type="text/javascript">


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/DynamicConstants.java
Line 8: /**
Line 9:  * This class contains dynamic messages available to the application. 
This
Line 10:  * class is a singleton.
Line 11:  */
Line 12: public class DynamicConstants {
Done
Line 13:     protected static final String LOGIN_HEADER_LABEL = 
"login_header_label"; //$NON-NLS-1$
Line 14:     protected static final String MAIN_HEADER_LABEL = 
"main_header_label"; //$NON-NLS-1$
Line 15:     protected static final String COPY_RIGHT_NOTICE = 
"copy_right_notice"; //$NON-NLS-1$
Line 16:     protected static final String APPLICATION_TITLE = 
"application_title"; //$NON-NLS-1$


Line 34:         dictionary = null;
Line 35:         try {
Line 36:             dictionary = 
Dictionary.getDictionary(MESSAGES_DICTIONARY_NAME);
Line 37:         } catch (MissingResourceException mre) {
Line 38:             // Do nothing, the dictionary doesn't exist.
A missing dictionary is not a problem, it is actually expected behavior 
sometimes, so logging it makes no sense as it is normal execution.
Line 39:         }
Line 40:     }
Line 41: 
Line 42:     /**


Line 53:             if (dictionary != null) {
Line 54:                 result = dictionary.get(key);
Line 55:             }
Line 56:         } catch (MissingResourceException mre) {
Line 57:             // Do nothing, the key doesn't exist.
See comment on other logging.
Line 58:         }
Line 59:         return result;
Line 60:     }


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ErrorPopupView.ui.xml
Line 21:                        <g:Label ui:field="titleLabel" />
Line 22:                </d:header>
Line 23: 
Line 24:                <d:logo>
Line 25:                        <g:Image 
styleName='obrand_dialogLogoErrorImage' />
Adding missing url here.
Line 26:                </d:logo>
Line 27: 
Line 28:                <d:content>
Line 29:                        <g:SimplePanel addStyleNames="{style.content}">


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
Line 108: 
Line 109:       <g:FlowPanel>
Line 110:               <g:FlowPanel addStyleNames="{style.header}">
Line 111:                       <g:SimplePanel ui:field="logoPanel" 
addStyleNames="{style.headerLeftPanel}">
Line 112:                               <g:Image 
styleName='obrand_dialogLogoImage' url="clear.cache.gif" />
An image tag requires a src pointing to a valid image otherwise it might show a 
broken image image. It depend on the browser how it behaves.
Line 113:                       </g:SimplePanel>
Line 114:                       <g:FlowPanel 
addStyleNames="{style.obrand_headerCenterPanel}">
Line 115:                               <g:FlowPanel 
ui:field="headerContainerPanel">
Line 116:                                       <g:SimplePanel 
ui:field="headerTitlePanel" addStyleNames="{style.headerTitle}" />


Line 122:                               </g:FlowPanel>
Line 123:                       </g:FlowPanel>
Line 124:                       <g:SimplePanel 
addStyleNames="{style.headerRightPanel}">
Line 125:                               <g:FlowPanel>
Line 126:                                       <g:Image 
styleName='obrand_dialogHeaderImage' url="clear.cache.gif" />
Same answer
Line 127:                                       <g:PushButton 
ui:field='closeIconButton' addStyleNames="{style.closeIconButton}">
Line 128:                                               <g:upFace 
image='{resources.dialogIconClose}' />
Line 129:                                               <g:downFace 
image='{resources.dialogIconCloseDown}' />
Line 130:                                               <g:upHoveringFace 
image='{resources.dialogIconCloseRollover}' />


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/tab/DialogTab.java
Line 30: 
Line 31:     interface Style extends CssResource {
Line 32:         String obrand_active();
Line 33: 
Line 34:         String inactive();
Because for some reason the downstream patch didn't change the value, and this 
go around I only externalized the classes that were modified in the downstream 
patch.
Line 35:     }
Line 36: 
Line 37:     @UiField
Line 38:     FocusPanel tabContainer;


....................................................
File 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml
Line 114: 
Line 115:       <d:SimplePopupPanel ui:field="popup" width="480px">
Line 116:               <d:header>
Line 117:                       <g:HorizontalPanel 
styleName="{loginPopupStyle.loginPopupHeader}">
Line 118:                               <g:Image 
styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" />
An image tag requires a src pointing to a valid image otherwise it might show a 
broken image image. It depend on the browser how it behaves.
Line 119:                               <g:HTMLPanel 
styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}">
Line 120:                                       <g:Label ui:field="headerLabel" 
addStyleNames="{loginPopupStyle.headerLabelStyle}"/>
Line 121:                               </g:HTMLPanel>
Line 122:                               <g:Image 
styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" />


Line 118:                               <g:Image 
styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" />
Line 119:                               <g:HTMLPanel 
styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}">
Line 120:                                       <g:Label ui:field="headerLabel" 
addStyleNames="{loginPopupStyle.headerLabelStyle}"/>
Line 121:                               </g:HTMLPanel>
Line 122:                               <g:Image 
styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" />
Same answer as above.
Line 123:                       </g:HorizontalPanel>
Line 124:               </d:header>
Line 125: 
Line 126:               <d:content>


....................................................
File frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
Line 1: <web-app xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
Line 2:         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; version="3.0">
Line 3: 
Line 4:         <display-name>oVirt UserPortal UI</display-name>
Line 5:     <!-- Filters -->
Tab characters are against the formatting standard are they not?
Line 6:     <filter>
Line 7:       <filter-name>LocaleFilter</filter-name>
Line 8:       
<filter-class>org.ovirt.engine.core.utils.servlet.LocaleFilter</filter-class>
Line 9:     </filter>


Line 4:         <display-name>oVirt UserPortal UI</display-name>
Line 5:     <!-- Filters -->
Line 6:     <filter>
Line 7:       <filter-name>LocaleFilter</filter-name>
Line 8:       
<filter-class>org.ovirt.engine.core.utils.servlet.LocaleFilter</filter-class>
Done
Line 9:     </filter>
Line 10:     <filter-mapping>
Line 11:       <filter-name>LocaleFilter</filter-name>
Line 12:       
<url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/*</url-pattern>


Line 27:                <servlet-name>GenericApiServlet</servlet-name>
Line 28:                
<url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/GenericApiGWTService</url-pattern>
Line 29:        </servlet-mapping>
Line 30: 
Line 31:     <servlet-mapping>
See response above
Line 32:         <servlet-name>BrandingServlet</servlet-name>
Line 33:         <url-pattern>/theme/*</url-pattern>
Line 34:     </servlet-mapping>
Line 35: 


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml
Line 111: 
Line 112:       <d:SimplePopupPanel ui:field="popup" width="480px">
Line 113:               <d:header>
Line 114:                       <g:HorizontalPanel 
styleName="{loginPopupStyle.loginPopupHeader}">
Line 115:                               <g:Image 
styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" />
Have a src in the image tag put the html element in block mode. I removed the 
url and added display: block as a style attribute
Line 116:                               <g:HTMLPanel 
styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}">
Line 117:                                       <g:Label ui:field="headerLabel" 
addStyleNames="{style.headerLabelStyle}"/>
Line 118:                               </g:HTMLPanel>
Line 119:                               <g:Image 
styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" />


Line 115:                               <g:Image 
styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" />
Line 116:                               <g:HTMLPanel 
styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}">
Line 117:                                       <g:Label ui:field="headerLabel" 
addStyleNames="{style.headerLabelStyle}"/>
Line 118:                               </g:HTMLPanel>
Line 119:                               <g:Image 
styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" />
Same answer as above.
Line 120:                       </g:HorizontalPanel>
Line 121:               </d:header>
Line 122: 
Line 123:               <d:content>


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/MainSectionView.ui.xml
Line 1
Line 2
Line 3
Line 4
Line 5
No I checked, it is not used anywhere else.


....................................................
File packaging/branding/ovirt.brand/branding.properties
Line 1: #OVIRT branding properties.
Done
Line 2: 
Line 3: #style sheets.
Line 4: user_portal_css=ovirt_user_portal.css
Line 5: web_admin_css=ovirt_web_admin.css


....................................................
File packaging/branding/ovirt.brand/ovirt_messages.properties
Line 1: #Available properties:
Done
Line 2: #common
Line 3: obrand.common.login_header_label=Open Virtualization Manager
Line 4: obrand.common.copy_right_notice=
Line 5: obrand.common.version_about=oVirt Engine Version:


....................................................
File packaging/branding/ovirt.brand/ovirt_user_portal.css
Line 1: @import url("ovirt_common.css");
Done
Line 2: 
Line 3: /* MainTabBasicView.ui.xml */
Line 4: .obrand_borderPanelStyle {
Line 5:     border-color: #719823;


....................................................
File packaging/branding/ovirt.brand/ovirt_web_admin.css
Line 1: @import url("ovirt_common.css");
Done
Line 2: 
Line 3: /* HeaderView.ui.xml */
Line 4: .obrand_logo {
Line 5:     float: left;


....................................................
File README.branding
Line 11: 
Line 12: PACKAGE FORMAT
Line 13: --------------
Line 14: 
Line 15: branding.properties
Good point, I will add information on which are mandatory and which are not.
Line 16:     This is the main properties file that defines where the branding
Line 17:     resources can be found. Resources are relative to 
branding.properties.
Line 18: 
Line 19:     user_portal_css - Css to inject into user portal.


Line 25: 
Line 26: CSS INJECTION
Line 27: 
Line 28: CSS are injected in the reverse order of the branding package order, 
this
Line 29: way the last css's styles overrides the previous ones.
Done
Line 30: 
Line 31: The oVirt UI is broken up into three distinct modules at this point.
Line 32:  * User Portal
Line 33:  * Web Admin


Line 126: EXAMPLE
Line 127: -------
Line 128: If you look in packaging/branding/ovirt.brand you will see a 
functional
Line 129: example branding theme which just happens to be the default oVirt 
theme.
Line 130: You will notice the following files:
Good point, I added the list before I added the 'reference implementation'. I 
can definitely remove this and provide a pointer to the reference.
Line 131: 
Line 132: 1. branding.properties, This is the main properties file defining
Line 133:   the branding properties.
Line 134: 2. user_portal.css, The user portal style sheet file.


Line 151: own directory.
Line 152: 
Line 153: The branding directory is treated as a standard conf.d, in which 
directories
Line 154: are sorted by name, each package is read by order and overrides
Line 155: the previous ones.
Yes that is the assumption. That packages will put themselves into 
${engine_sysconfdir}/branding/N-pkgname.brand with N being whatever order they 
need to be in the hierarchy. If the packager decides not to follow that 
convention then the order might be off. But as Alon said it is up to the 
packager.


--
To view, visit http://gerrit.ovirt.org/13181
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4a8a426ce7d688d33c5ae2b70632c836843106b2
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Eyal Edri <ee...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to