Hello Greg Sheremeta,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/18254
to review the following change.
Change subject: userportal, webadmin: added help to README.branding.
......................................................................
userportal, webadmin: added help to README.branding.
Added a section to README.branding describing how to add new branded
messages.
Change-Id: Ibf41e42151f4bc03241a4ef2a46a68f565760112
Signed-off-by: Greg Sheremeta <[email protected]>
---
M README.branding
1 file changed, 33 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/54/18254/1
diff --git a/README.branding b/README.branding
index c003bb4..9a3a82e 100644
--- a/README.branding
+++ b/README.branding
@@ -106,8 +106,8 @@
are sorted by name, each package is read by order and overrides
the previous ones.
-MAINTENANCE
------------
+MAINTENANCE - CSS
+-----------------
To expose CSS class defined in ui.xml template via <ui:style> element:
1. rename the given class to use obrand_ prefix and mark it as @external,
@@ -117,3 +117,34 @@
3. when styling <g:Image> or other widgets that work with ImageResource,
specify url="clear.cache.gif" to avoid broken images
+MAINTENANCE - ADDING A BRANDED MESSAGE
+--------------------------------------
+
+All branded messages feed into the application via the host page and then via
the
+ApplicationDynamicMessages classes. To added a new branded message to the
application:
+
+1. add a property to messages.properties in the form of
+ obrand.webadmin.my_new_message=BrandX Message
+ obrand.userportal.my_new_message=BrandX Message
+ You'll need to add one for both webadmin and userportal if you want the
message
+ exposed to both applications.
+2. in DynamicMessages.java, add a key to the DynamicMessageKey enum for your
property.
+3. in DynamicMessages.java, add a getter for your property. Use the existing
getters
+ as examples.
+4a. If the message will be exposed to webadmin, add a constant to the webadmin
copy
+ of ApplicationConstants.java. This will be used as a fallback if the
branding files
+ are missing. Example:
+ @DefaultStringValue("BrandX Message")
+ String myNewMessage();
+4b. If the message will be exposed to webadmin, repeat 4a for userportal's
copy of
+ ApplicationConstants.java.
+5a. If the message will be exposed to webadmin, add an addFallback() call in
webadmin's
+ copy of ApplicationDynamicMessages.java. Use existing calls as examples.
+5b. If the message will be exposed to webadmin, repeat 5a for userportal's
copy of
+ ApplicationDynamicMessages.java.
+
+You can now use an injected ApplicationDynamicMessages to access the branded
messages.
+Example:
+ Anchor x = new Anchor(dynamicMessages.myNewMessage());
+See HeaderView.java for a real-world example.
+
--
To view, visit http://gerrit.ovirt.org/18254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf41e42151f4bc03241a4ef2a46a68f565760112
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches