portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weaver, Scott" <Swea...@rippe.com>
Subject RE: cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/por tal BasePortletSkin.java PortletSkin.java
Date Fri, 28 Mar 2003 15:10:05 GMT
Hi Aurelien,

All good suggestions and I am not offended ;)  My implementation gives the user flexibility
to use images in skins for more than just actions.  The action icons where just a good, concrete
example.  Still, I do like your idea of a skin image directory, it is definitely much cleaner
at cost of being a little less flexible.  However, I believe we can combine efforts here.
 We could first check for the "image-" attribute then check for a skin image directory.  Nobody
looses and everybody wins, yeah! ;)

Here is how I feel the hybrid should work:

- To prevent being stuck using .gif images, we do a quick file system check 
  like this:
  -  Pseudo code: String imageName = if exists  {image name}.gif 
     else if exists {image name}.jpg else if exists {image name}.png

Order of precedence for the PortletSkin.getImage() method
1. Use the "image-" no need for image type check as it is coded into the 
   value.
2. We check the "image.path" property directory using the image type check 
   defined above.  I left off action, because we should allow developers to
   skin whatever they want, not just actions.
3. If no "image.path" is defined or it does not exist on the file system use
   the images/{media type}/{skin name} as the directory to search.  This 
   also makes the registry event cleaner ;)

I think we should also look at using the media type directories under the images directory
(currently html, and wml) as part of the search path to keep things working in a device-agnostic
manner.

p.s.

Why not post your suggestions to my bug id, for posterity's sake.

p.p.s.

I like you ideas for bug id 18188.  However, I would prefer that the modifications to the
controls and controllers been done as new controls and controllers instead of changing the
existing ones.  Let me know what you think.


*===================================*
* Scott T Weaver                    *
* Jakarta Jetspeed Portal Project   *
* weaver@apache.org                 *
*===================================*
  


> -----Original Message-----
> From: Aurelien Pernoud [mailto:apernoud@sopragroup.com]
> Sent: Friday, March 28, 2003 3:11 AM
> To: 'Jetspeed Developers List'
> Subject: RE: cvs commit: jakarta-
> jetspeed/src/java/org/apache/jetspeed/portal BasePortletSkin.java
> PortletSkin.java
> 
> 
> Hi Scott,
> 
> I've seen your bug report at first, and then the changes you commited, but
> i
> think your changes makes it a little "messy" to define a skin that will
> change every action images. Even if I like the idea of changing actions
> image, I think there is a better and simpler way to do it. Here is my
> opinion :
> 
> - When you want to change the actions image , if you want your skin to be
> nice, every images will have to look "the same", I mean you won't put a
> blue
> restore with a yellow maximize (??).
> - Imagine I want to change all the action buttons, I have to enter in my
> skin like 5 entries.
> - My skin can refer any subdirectory (your sample said
> images/rk/icons/actions/1/restore.gif, that's cool, but again, if you like
> your portal to be "clear", you put all the images of one skin in the same
> directory...)
> - I'm making a new action for my portlets, I have to update all of my
> skins
> (exception made if you find an icon that fits with all of your existing
> icons and skins, but I really don't think it's possible).
> 
> That's why after looking your changes I've thought of another way to do it
> :
> 
> According that everything above is logic (again, it's my thought, I don't
> want to offense anyone), why not see it this way :
> 
> I want to change the actions image of my skin, ok, I put something like
> <property name="actions-image-path"
> value="the_path_to_my_icons_for_this_skin" hidden="false"/>
> 
> And then during rendering, if the above property is in the skin, I change
> the path for actions :
> <img src="${skin.getImagePath()/${action.Name}.gif")}>, according the
> method
> returns "image" if the property isn't in the skin.
> 
> Advantages :
> - One entry in the skin
> - Every graphics for one skin in the same subdirectory, which allow better
> portal structure
> - I make a new action, all I have to do for my existing skins is to put
> the
> associate gif in the right directory. No changes to xreg
> - I want to reorganize my skins directory, I simply have to change one
> property in my existing skins
> 
> Inconvenients :
> - all your graphics have to be named by the action Name, and they must be
> GIF...
> - you can't mix action graphics from different subdirectories (but is it a
> need ?)
> 
> Sorry for pointing this after you commited the changes, but I didn't think
> you would make them so fast :)
> BTW, while you're working on skins, could you tell me what you think of my
> proposal for skins :
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18188
> 
> I'm using this changes here and this allows really nice skins, even if the
> one that comes with my sample isn't the best (I did it... and I'm really
> not
> a good graphist, every one is job ! ;))
> It might need a little more documentation on how to use those changes, but
> if you're familiar with css, you'll get it.
> 
> Sincerely,
> Aurelien
> 
> 
> weaver@apache.org a écrit :
> 
> > BasePortletSkin.java PortletSkin.java
> >
> >
> > weaver      2003/03/27 09:46:20
> >
> >   Modified:    webapp/WEB-INF/templates/vm/controls/html jetspeed.vm
> >                src/java/org/apache/jetspeed/portal
> > BasePortletSkin.java
> >                         PortletSkin.java
> >   Log:
> >   Bug ID: 18208 "Allow skinning of action icons"
> >
> >   - Portlets using the jetspeed.vm can now have "skinned" action
> >     icons. This is acheived by creating properties within the skin in
> >     the format of "image-{action name}".  If these are not defined,
> > the original icons are used.
> >
> >   - Removed redundant "public" modifiers within the
> > PortletSkin interface per Checkstyle recommendation.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message