portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shins...@apache.org
Subject svn commit: r530204 - in /portals/jetspeed-2/trunk: layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/ src/webapp/WEB-INF/templates/layout/html/columns/
Date Wed, 18 Apr 2007 23:44:00 GMT
Author: shinsuke
Date: Wed Apr 18 16:43:59 2007
New Revision: 530204

URL: http://svn.apache.org/viewvc?view=rev&rev=530204
Log:
fixed https://issues.apache.org/jira/browse/JS2-683

Modified:
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource.properties
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java?view=diff&rev=530204&r1=530203&r2=530204
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
Wed Apr 18 16:43:59 2007
@@ -271,6 +271,8 @@
             if ( request.getParameter("jsSubmitPage" ) != null )
             {
                 String jsPageName = request.getParameter("jsPageName");
+                String jsPageTitle = request.getParameter("jsPageTitle");
+                String jsPageShortTitle = request.getParameter("jsPageShortTitle");
                 if ( jsPageName != null && jsPageName.length() > 0 &&
jsPageName.indexOf(Folder.PATH_SEPARATOR) == -1 )
                 {
                     try
@@ -296,7 +298,10 @@
                             page.getRootFragment().setName(layout);
                             page.setDefaultDecorator(requestPage.getDefaultDecorator(Fragment.LAYOUT),
Fragment.LAYOUT);
                             page.setDefaultDecorator(requestPage.getDefaultDecorator(Fragment.PORTLET),
Fragment.PORTLET);
-                            page.setTitle(jsPageName);
+                            page.setTitle(jsPageTitle != null && !jsPageTitle.equals("")
? jsPageTitle : jsPageName);
+                            page.setShortTitle(jsPageShortTitle != null
+                                            && !jsPageShortTitle.equals("") ? jsPageShortTitle
+                                            : jsPageName);
                             pageManager.updatePage(page);
 
                             List orderList = parent.getDocumentOrder();
@@ -320,6 +325,33 @@
                 return;
             }
 
+            if (request.getParameter("jsChangePageName") != null)
+            {
+                String jsPageTitle = request.getParameter("jsPageTitle");
+                String jsPageShortTitle = request
+                        .getParameter("jsPageShortTitle");
+                try
+                {
+                    if (jsPageTitle != null && !jsPageTitle.equals(""))
+                    {
+                        requestPage.setTitle(jsPageTitle);
+                    }
+                    if (jsPageShortTitle != null
+                            && !jsPageShortTitle.equals(""))
+                    {
+                        requestPage.setShortTitle(jsPageShortTitle);
+                    }
+                    pageManager.updatePage(requestPage);
+                }
+                catch (Exception e)
+                {
+                    throw new PortletException(
+                            "Unable to access page for editing: "
+                                    + e.getMessage(), e);
+                }
+                return;
+            }
+
             if ( request.getParameter("jsDeletePage" ) != null )
             {
                 try
@@ -462,6 +494,8 @@
             if (request.getParameter("jsSubmitFolder") != null)
             {
                 String jsFolderName = request.getParameter("jsFolderName");
+                String jsFolderTitle = request.getParameter("jsFolderTitle");
+                String jsFolderShortTitle = request.getParameter("jsFolderShortTitle");
                 if (jsFolderName != null && jsFolderName.length() > 0
                         && jsFolderName.indexOf(Folder.PATH_SEPARATOR) == -1)
                 {
@@ -492,7 +526,14 @@
                             folder.setDefaultDecorator(requestPage
                                     .getDefaultDecorator(Fragment.PORTLET),
                                     Fragment.PORTLET);
-                            folder.setTitle(jsFolderName);
+                            folder
+                                    .setTitle(jsFolderTitle != null
+                                            && !jsFolderTitle.equals("") ? jsFolderTitle
+                                            : jsFolderName);
+                            folder
+                                    .setShortTitle(jsFolderShortTitle != null
+                                            && !jsFolderShortTitle.equals("") ? jsFolderShortTitle
+                                            : jsFolderName);
                             pageManager.updateFolder(folder);
 
                             List orderList = parent.getDocumentOrder();
@@ -557,6 +598,38 @@
                 return;
             }
 
+            if (request.getParameter("jsChangeFolderName") != null)
+            {
+                String jsFolderTitle = request.getParameter("jsFolderTitle");
+                String jsFolderShortTitle = request
+                        .getParameter("jsFolderShortTitle");
+                try
+                {
+                    Folder parent = (Folder) requestPage.getParent();
+                    if (parent != null)
+                    {
+                        if (jsFolderTitle != null && !jsFolderTitle.equals(""))
+                        {
+                            parent.setTitle(jsFolderTitle);
+                        }
+                        if (jsFolderShortTitle != null
+                                && !jsFolderShortTitle.equals(""))
+                        {
+                            parent.setShortTitle(jsFolderShortTitle);
+                        }
+                        pageManager.updateFolder(parent);
+                    }
+
+                }
+                catch (Exception e)
+                {
+                    throw new PortletException(
+                            "Unable to access folder for editing: "
+                                    + e.getMessage(), e);
+                }
+                return;
+            }
+            
             if (request.getParameter("jsDeleteFolder") != null)
             {
                 try

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource.properties?view=diff&rev=530204&r1=530203&r2=530204
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource.properties
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource.properties
Wed Apr 18 16:43:59 2007
@@ -39,13 +39,17 @@
 
 portal.page.editing.theme=Theme:
 portal.page.editing.layout=Layout:
+portal.page.editing.portlet.decorator=Portlet Theme:
 portal.page.editing.changelayout=Change Layout
 portal.page.editing.changetheme=Change Theme
 portal.page.editing.changethemeall=Change Portlets Theme
-portal.page.customizer.name=Jetspeed Customizer
+portal.page.customizer.name=Page/Folder Customizer
 portal.page.editing.addlayout=Add portlet
-portal.page.editing.page=New Page:
+portal.page.editing.page=Page Name:
+portal.page.editing.page.title=Title:
+portal.page.editing.page.shorttitle=Short Title:
 portal.page.editing.addpage=Create Page 
+portal.page.editing.changepagename=Change Page Name
 portal.page.editing.portlet=Add Portlet:
 portal.page.editing.addportlet=Add a Portlet
 portal.page.editing.movePortletLeft=Move Portlet Left 
@@ -87,8 +91,11 @@
 portal.page.actions.View=View
 
 portal.folder.editing.folderConfiguration=Folder Configuration
-portal.folder.editing.folder=Folder
-portal.folder.editing.addfolder=Add Folder
+portal.folder.editing.folder=Folder Name:
+portal.folder.editing.folder.title=Title:
+portal.folder.editing.folder.shorttitle=Short Title:
+portal.folder.editing.addfolder=Create Folder
+portal.folder.editing.changefoldername=Change Folder Name
 portal.folder.editing.foldernavigation=Navigation:
 portal.folder.editing.moveFolderLeft=Move Folder Left
 portal.folder.editing.moveFolderRight=Move Folder Right

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties?view=diff&rev=530204&r1=530203&r2=530204
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
Wed Apr 18 16:43:59 2007
@@ -39,13 +39,17 @@
 
 portal.page.editing.theme=Theme:
 portal.page.editing.layout=Layout:
+portal.page.editing.portlet.decorator=Portlet Theme:
 portal.page.editing.changelayout=Change Layout
 portal.page.editing.changetheme=Change Theme
 portal.page.editing.changethemeall=Change Portlets Theme
-portal.page.customizer.name=Jetspeed Customizer
+portal.page.customizer.name=Page/Folder Customizer
 portal.page.editing.addlayout=Add portlet
-portal.page.editing.page=New Page:
+portal.page.editing.page=Page Name:
+portal.page.editing.page.title=Title:
+portal.page.editing.page.shorttitle=Short Title:
 portal.page.editing.addpage=Create Page 
+portal.page.editing.changepagename=Change Page Name
 portal.page.editing.portlet=Add Portlet:
 portal.page.editing.addportlet=Add a Portlet
 portal.page.editing.movePortletLeft=Move Portlet Left 
@@ -87,12 +91,16 @@
 portal.page.actions.View=View
 
 portal.folder.editing.folderConfiguration=Folder Configuration
-portal.folder.editing.folder=Folder
-portal.folder.editing.addfolder=Add Folder
+portal.folder.editing.folder=Folder Name:
+portal.folder.editing.folder.title=Title:
+portal.folder.editing.folder.shorttitle=Short Title:
+portal.folder.editing.addfolder=Create Folder
+portal.folder.editing.changefoldername=Change Folder Name
 portal.folder.editing.foldernavigation=Navigation:
 portal.folder.editing.moveFolderLeft=Move Folder Left
 portal.folder.editing.moveFolderRight=Move Folder Right
 portal.folder.editing.deleteThisFolder=Delete this folder:
 portal.folder.editing.deleteFolder=Delete
 portal.folder.editing.confirmDeleteThisFolder=Do you want to delete this folder?
+
 

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm?view=diff&rev=530204&r1=530203&r2=530204
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm Wed
Apr 18 16:43:59 2007
@@ -60,19 +60,23 @@
     #if($isRoot)
       #getBoolProperty($allowChangePageTheme $rootDecorator "allow.change.page.theme" true)
       #getBoolProperty($allowAddPage $rootDecorator "allow.add.page" true)
+      #getBoolProperty($allowChangePageName $rootDecorator "allow.change.page.name" true)
       #getBoolProperty($allowNavigatePage $rootDecorator "allow.navigate.page" true)
       #getBoolProperty($allowDeletePage $rootDecorator "allow.delete.page" true)
       #getBoolProperty($allowChangeFolderTheme $rootDecorator "allow.change.folder.theme"
true)
       #getBoolProperty($allowAddFolder $rootDecorator "allow.add.folder" true)
+      #getBoolProperty($allowChangeFolderName $rootDecorator "allow.change.folder.name" true)
       #getBoolProperty($allowNavigateFolder $rootDecorator "allow.navigate.folder" true)
       #getBoolProperty($allowDeleteFolder $rootDecorator "allow.delete.folder" true)
     #else
       #set($allowChangePageTheme=false)
       #set($allowAddPage=false)
+      #set($allowChangePageName=false)
       #set($allowNavigatePage=false)
       #set($allowDeletePage=false)
       #set($allowChangeFolderTheme=false)
       #set($allowAddFolder=false)
+      #set($allowChangeFolderName=false)
       #set($allowNavigateFolder=false)
       #set($allowDeleteFolder=false)
     #end
@@ -108,22 +112,25 @@
     <fieldset>
     <div class="layout-edit-bar-left">
         #if($allowAddLayout||$allowChangeLayout)
-          <div class="layout-title"><b>$messages.getString("portal.page.editing.layoutConfiguration")</b></div>
-          <div class="layout-content">
+      <div class="layout-title"><b>$messages.getString("portal.page.editing.layoutConfiguration")</b></div>
+      <div class="layout-content">
         #end
         #if ($allowChangePageTheme)
+        <div>
           <label for="theme">$messages.getString("portal.page.editing.theme")</label>
           <select id='theme' name='theme' onChange="$form$submit">
             #foreach($td in $decorationFactory.getPageDecorations($rc))
-              <option value='$td' #if($rootDecorator.Name == $td) SELECTED #end>$td
+            <option value='$td' #if($rootDecorator.Name == $td) SELECTED #end>$td
             #end
           </select>   
+        </div>
         #end
         #if($allowAddLayout||$allowChangeLayout)
+        <div>
           <label for="layout">$messages.getString("portal.page.editing.layout")</label>
           <select id='layout' name='layout'>
             #foreach($ld in $decorationFactory.getLayouts($rc))     
-              <option value='$ld.Name' #if($myFragment.Name == $ld.Name) SELECTED #end>$ld.DisplayName
+            <option value='$ld.Name' #if($myFragment.Name == $ld.Name) SELECTED #end>$ld.DisplayName
             #end
           </select>
         #end
@@ -133,75 +140,128 @@
         #if($allowAddLayout)
           <input type="submit" name="jsAddLayout" value="$messages.getString("portal.page.editing.addlayout")"
/>
         #end    
+        #if($allowAddLayout||$allowChangeLayout)
+        </div>
+        #end    
         #getBoolProperty($allowChangePortletDecorator $rootDecorator "allow.change.portlet.decorator"
true)
          ####### Take all fragments and apply style	  
         #if($allowChangePortletDecorator)          
-              <input type="hidden" name="fragment" value="$f.id">
-              <input type="hidden" name="move" value="">
-              <input type="hidden" name="remove" value="">
-        	  <select id="decorators" name="decorators">
-        	    <option value=''>
+        <div>
+          <input type="hidden" name="fragment" value="$f.id">
+          <input type="hidden" name="move" value="">
+          <input type="hidden" name="remove" value="">
+          <label for="decorators">$messages.getString("portal.page.editing.portlet.decorator")</label>
+          <select id="decorators" name="decorators">
+            <option value=''>
         	    #foreach($pd in $decorationFactory.getPortletDecorations($rc))
-        	      <option value='$pd' #if ($f.Decorator == $pd) SELECTED #end>$pd
+            <option value='$pd' #if ($f.Decorator == $pd) SELECTED #end>$pd
         	    #end
-        	  </select>
-        	    <input type="submit" name="jsSubmitTheme" value="$messages.getString("portal.page.editing.changethemeall")"/>
+          </select>
+          <input type="submit" name="jsSubmitTheme" value="$messages.getString("portal.page.editing.changethemeall")"/>
+        </div>
         #end	   
         #if($allowAddLayout||$allowChangeLayout)
-          </div>
+      </div>
         #end
     </div> 
     </fieldset>   
-    <fieldset>
+    <fieldset style="float:left;width:49%;margin:0px;padding:0px;">
     <div class="layout-edit-bar-left">
-        #if($allowAddPage||$allowDeletePage)
-          <div class="page-title"><b>$messages.getString("portal.page.editing.pageConfiguration")</b></div>
-          <div class="page-content">
+        #if($allowAddPage||$allowChangePageName||$allowDeletePage)
+      <div class="page-title"><b>$messages.getString("portal.page.editing.pageConfiguration")</b></div>
+      <div class="page-content">
+        #end
+        #if($allowAddPage||$allowChangePageName)
+        <div>
+          <label for="pagename">$messages.getString("portal.page.editing.page")</label>
+          <input id='pagename' name='jsPageName'/>
+        </div>
+        <div>
+          <label for="pagetitle">$messages.getString("portal.page.editing.page.title")</label>
+          <input id='pagetitle' name='jsPageTitle'/>
+        </div>
+        <div>
+          <label for="pageshorttitle">$messages.getString("portal.page.editing.page.shorttitle")</label>
+          <input id='pageshorttitle' name='jsPageShortTitle'/>
+        </div>
+        <div>
         #end
         #if($allowAddPage)
-          <label for="newpage">$messages.getString("portal.page.editing.page")</label>
-          <input id='newpage' name='jsPageName'/>
           <input type="submit" name="jsSubmitPage" value="$messages.getString("portal.page.editing.addpage")"/>
         #end
+        #if($allowChangePageName)
+          <input type="submit" name="jsChangePageName" value="$messages.getString("portal.page.editing.changepagename")"/>
+        #end
+        #if($allowAddPage||$allowChangePageName)
+        </div>
+        #end
         #if($allowNavigatePage)
+        <div>
           <label>$messages.getString("portal.page.editing.pagenavigation")</label>
           <input id="move-page-left" type="submit" name="jsMovePageLeft" value="$messages.getString("portal.page.editing.movePageLeft")"
/>
           <input id="move-page-right" type="submit" name="jsMovePageRight" value="$messages.getString("portal.page.editing.movePageRight")"
/>
+        </div>
         #end
         #if($allowDeletePage)
+        <div>
           <label for="deletepage">$messages.getString("portal.page.editing.deleteThisPage")</label>
           <input id="deletepage" type="submit" name="jsDeletePage" value="$messages.getString("portal.page.editing.deletePage")"
onclick="if(window.confirm('$messages.getString("portal.page.editing.confirmDeleteThisPage")')){return
true;}return false;"/>
+        </div>
         #end
-        #if($allowAddPage||$allowDeletePage)
-          </div>
+        #if($allowAddPage||$allowChangePageName||$allowDeletePage)
+      </div>
         #end
     </div> 
     </fieldset>
-    <fieldset>
+    <fieldset style="width:49%;margin:0px;padding:0px;">
     <div class="layout-edit-bar-left">
-        #if($allowAddFolder||$allowDeleteFolder)
-          <div class="folder-title"><b>$messages.getString("portal.folder.editing.folderConfiguration")</b></div>
-          <div class="folder-content">
+        #if($allowAddFolder||$allowChangeFolderName||$allowDeleteFolder)
+      <div class="folder-title"><b>$messages.getString("portal.folder.editing.folderConfiguration")</b></div>
+      <div class="folder-content">
+        #end
+        #if($allowAddFolder||$allowChangeFolderName)
+        <div>
+          <label for="foldername">$messages.getString("portal.folder.editing.folder")</label>
+          <input id='foldername' name='jsFolderName'/>
+        </div>
+        <div>
+          <label for="foldertitle">$messages.getString("portal.folder.editing.folder.title")</label>
+          <input id='foldertitle' name='jsFolderTitle'/>
+        </div>
+        <div>
+          <label for="foldershorttitle">$messages.getString("portal.folder.editing.folder.shorttitle")</label>
+          <input id='foldershorttitle' name='jsFolderShortTitle'/>
+        </div>
+        <div>
         #end
         #if($allowAddFolder)
-          <label for="newfolder">$messages.getString("portal.folder.editing.folder")</label>
-          <input id='newfolder' name='jsFolderName'/>
           <input type="submit" name="jsSubmitFolder" value="$messages.getString("portal.folder.editing.addfolder")"/>
         #end
+        #if($allowChangeFolderName)
+          <input type="submit" name="jsChangeFolderName" value="$messages.getString("portal.folder.editing.changefoldername")"/>
+        #end
+        #if($allowAddFolder||$allowChangeFolderName)
+        </div>
+        #end
         #if($allowNavigateFolder)
+        <div>
           <label>$messages.getString("portal.folder.editing.foldernavigation")</label>
           <input id="move-folder-left" type="submit" name="jsMoveFolderLeft" value="$messages.getString("portal.folder.editing.moveFolderLeft")"
/>
           <input id="move-folder-right" type="submit" name="jsMoveFolderRight" value="$messages.getString("portal.folder.editing.moveFolderRight")"
/>
+        </div>
         #end
         #if($allowDeleteFolder)
+        <div>
           <label for="deletefolder">$messages.getString("portal.folder.editing.deleteThisFolder")</label>
           <input id="deletefolder" type="submit" name="jsDeleteFolder" value="$messages.getString("portal.folder.editing.deleteFolder")"
onclick="if(window.confirm('$messages.getString("portal.folder.editing.confirmDeleteThisFolder")')){return
true;}return false;"/>
+        </div>
         #end
-        #if($allowAddFolder||$allowDeleteFolder)
-          </div>
+        #if($allowAddFolder||$allowChangeFolderName||$allowDeleteFolder)
+      </div>
         #end
     </div>
     </fieldset>
+    <br style="clear:both;">
     </form>
   </div>
 ## end edit mode



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


Mime
View raw message