You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by mo...@apache.org on 2003/05/13 18:19:09 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html multicolumn-customize.vm

morciuch    2003/05/13 09:19:08

  Modified:    webapp/WEB-INF/templates/vm/controllers/html
                        multicolumn-customize.vm
  Log:
  Another (forgotten) patch by Aur�lien Pernoud to complete Bugzilla issue# 18188
  
  Revision  Changes    Path
  1.20      +37 -29    jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/multicolumn-customize.vm
  
  Index: multicolumn-customize.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/multicolumn-customize.vm,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- multicolumn-customize.vm	9 May 2003 17:28:30 -0000	1.19
  +++ multicolumn-customize.vm	13 May 2003 16:19:08 -0000	1.20
  @@ -16,6 +16,9 @@
   #else
    #set ($col_class = $!skin.ControllerStyleClass)
   #end
  +#if (${skin.TitleBackgroundColor})
  +  #set ($portletStyle="border-color: ${skin.TitleBackgroundColor}")
  +#end
     <td valign="top" width="$width">
       <table width="100%" cellspacing="1" cellpadding="1" border="0">
   #foreach ( $portlet in $column )
  @@ -26,10 +29,12 @@
             <input type="hidden" name="id" value="$portlet.id" />
             <input type="hidden" name="col" value="$col" />
             <input type="hidden" name="row" value="$row" />
  -          <table width="100%" cellspacing="0" cellpadding="0" #if( ${skin.PortletStyleClass}) class="${skin.PortletStyleClass}" #end>
  +          <table width="100%" cellspacing="0" cellpadding="0" #if( ${skin.PortletStyleClass}) class="${skin.PortletStyleClass}" #end  #if (${portletStyle}) style="${portletStyle}" #end>
   ## Portlet Title
               <tr>
  +#if (${skin.PortletSkinClass})
                 <td class="PTitleLeft" style="font-size:1pt;">&nbsp;</td>
  +#end
                 <td align="right" valign="top" #if (${skin.TitleStyleClass}) class="${skin.TitleStyleClass}" #else class="PTitle" #end #if(${skin.TitleBackgroundColor}) style="background-color: ${skin.TitleBackgroundColor}" #end>
                   <input type="image" src="images/close.gif" alt="$l10n.CUSTOMIZER_REMOVE" border="0" name="eventSubmit_doDelete">
                   #if ($col == 0)
  @@ -53,18 +58,22 @@
                   <input type="image" src="images/right.gif" alt="$l10n.CUSTOMIZER_MOVERIGHT" border="0" name="eventSubmit_doRight">
                   #end
                 </td>
  +#if (${skin.PortletSkinClass})
                 <td class="PTitleRight" style="font-size:1pt;">&nbsp;</td>
  +#end
               </tr>
   ## Portlet "content" (properties)
               <tr>
  +              #if (${skin.PortletSkinClass})
                 <td class="PContentLeft" style="font-size:1pt;">&nbsp;</td>
  +              #end
                 <td align="center" valign="middle" #if(${skin.ContentStyleClass}) class="${skin.ContentStyleClass}"  #else class="PContent" #end #if(${skin.BackgroundColor}) style="background-color: ${skin.BackgroundColor}" #end>
  -		<table width="100%" border="0">
  -                <tr>
  -                  <td colspan="2" align="center">
  -                    <b>$titles.get($portlet.id)</b>
  -                  </td>
  -                </tr>
  +		<table width="100%">
  +		  <tr>
  +		    <td colspan="2" align="center">
  +		      <b>$titles.get($portlet.id)</b>
  +		    </td>
  +		  </tr>
   ## Set $portletSkin.  If no skin exists for the portlet, then set to "-- Default --"
   #if ($portlet.Skin)
     #set ($tempSkin = $portlet.Skin)
  @@ -89,26 +98,21 @@
   #else
     #set ($portletSecurityRef = "-- Default --")
   #end
  -              <td#if(${skin.ContentStyleClass}) class="${skin.ContentStyleClass}" #end #if(${skin.BackgroundColor}) style="background-color: ${skin.BackgroundColor}" #end align="center">
  -                <table width="100%">
  -                  <tr>
  -                    <td width="50%">
  -                      $l10n.CUSTOMIZER_SKIN : $portletSkin
  -                    </td>
  -                    <td width="50%">
  -                       $l10n.CUSTOMIZER_SECURITY_REF : $portletSecurityRef
  -                    </td>
  -                  </tr>
  -                </table>
  -              </td>
  -            </tr>
  +		  <tr>
  +		    <td width="50%">
  +		      $l10n.CUSTOMIZER_SKIN : $portletSkin
  +		    </td>
  +		    <td width="50%">
  +		       $l10n.CUSTOMIZER_SECURITY_REF : $portletSecurityRef
  +		    </td>
  +		  </tr>
   ## Include path for references
   #if ($portlet.Path)
  -            <tr>
  -              <td colspan="2">
  -              $l10n.CUSTOMIZER_REF_PATH : $portlet.Path
  -              </td>
  -            </tr>
  +		  <tr>
  +		    <td colspan="2">
  +		       $l10n.CUSTOMIZER_REF_PATH : $portlet.Path
  +		    </td>
  +		  </tr>
   #end
   </form>
   #if ($portlet.Control.Name) 
  @@ -118,8 +122,8 @@
   #end
   
   #if (!$portlet.Path && $controlListBox)
  -                <tr>
  -                  <td colspan="2" align="left">
  +		  <tr>
  +		    <td colspan="2" align="left">
   			<form name="decorations$ndx" action="#psmlLink($jslink.Template)" method="post">
   			#if ($action) 
   				<input name="$jslink.ActionKey" type="hidden" value="$action"> 
  @@ -131,18 +135,22 @@
   			#set ($ndx = $ndx + 1)
   		    </td>
   		  </tr>
  +                </table>
                 </td>
  -              </table>
  +#if (${skin.PortletSkinClass})
                 <td class="PContentRight" style="font-size:1pt;">&nbsp;</td>
  +#end
               </tr>
   #end
   ## End of the portlet content preview (properties)
   ## Bottom of the portlet preview
  +#if (${skin.PortletSkinClass})
   	     <tr>
   	       <td class="PBottomLeft" style="font-size:1pt;">&nbsp;</td>
   	       <td class="PBottom" style="font-size:1pt;">&nbsp;</td>
   	       <td class="PBottomRight" style="font-size:1pt;">&nbsp;</td>
   	     </tr>
  +#end
             </table>
           </td>
         </tr>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: Proposal, rename method PanedPortletController.retrievePaneID

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Tuesday, May 13, 2003, at 03:56  PM, Ryan Christianson wrote:

> I spent a long time trying to figure out the best way to get the 
> current selected pane/portlet id from PanedPortletController. My first 
> solution was to use the method "isSelected", but then I noticed the 
> odd'ly named method "retrievePaneID". It seems "retrievePaneID" 
> actually returns the currently selected pane's id. Which is actually a 
> portlet id right? I propose we rename "retrievePaneID" to 
> "getSelectedPortletID" or "getSelectedPaneID".
>
> If my proposal doesnt taste good, maybe we should atleast update the 
> javadocs, so you can tell what the method does. Right now it reads 
> "Returns the pane id of the parameter used for pane selection".
>
> BTW, is there a better way to get the current selected pane/portlet 
> id? Here is how I did it:
>
>
> PanedPortletController controller = null;
> PortletSet portlets = (PortletSet) getPortlet();
> if (portlets.getController() instanceof PanedPortletController) {      
>  controller = (PanedPortletController) portlets.getController();
> }
>
> if ( controller != null ) {
>    selectedPaneID = controller.retrievePaneID( rundata, true );
>    if ( selectedPaneID == null ) {
>        selectedPaneID = controller.retrievePaneID( rundata, false );   
>     }
> }
>
>
> Ryan Christianson
> **
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>
>
Yes, the pane id is the portlet id.
The name you are proposing is better.

The code snipet above could be added as a method to tJetspeedTool and 
JetspeedPaneTag

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Proposal, rename method PanedPortletController.retrievePaneID

Posted by Ryan Christianson <ry...@echospace.com>.
I spent a long time trying to figure out the best way to get the current 
selected pane/portlet id from PanedPortletController. My first solution 
was to use the method "isSelected", but then I noticed the odd'ly named 
method "retrievePaneID". It seems "retrievePaneID" actually returns the 
currently selected pane's id. Which is actually a portlet id right? I 
propose we rename "retrievePaneID" to "getSelectedPortletID" or 
"getSelectedPaneID".

If my proposal doesnt taste good, maybe we should atleast update the 
javadocs, so you can tell what the method does. Right now it reads 
"Returns the pane id of the parameter used for pane selection".

BTW, is there a better way to get the current selected pane/portlet id? 
Here is how I did it:


PanedPortletController controller = null;
PortletSet portlets = (PortletSet) getPortlet();
if (portlets.getController() instanceof PanedPortletController) {    
    controller = (PanedPortletController) portlets.getController();
}

if ( controller != null ) {
    selectedPaneID = controller.retrievePaneID( rundata, true );
    if ( selectedPaneID == null ) {
        selectedPaneID = controller.retrievePaneID( rundata, false );    
    }
}


Ryan Christianson
**


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org