portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r510225 [1/2] - in /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed: ./ desktop/ widget/
Date Wed, 21 Feb 2007 21:18:10 GMT
Author: smilek
Date: Wed Feb 21 13:18:08 2007
New Revision: 510225

URL: http://svn.apache.org/viewvc?view=rev&rev=510225
Log:
major changes to page editor widgets and associated changes in core.js; assorted bug fixes

Removed:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutRootEditPane.js
Modified:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/common.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/manifest.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.html
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortalAccordionContainer.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortalBreadcrumbContainer.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortalTabContainer.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortalTaskBar.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletDefContainer.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/common.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/common.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/common.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/common.js Wed Feb 21 13:18:08 2007
@@ -12,6 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * author: Steve Milek
  */
 
 // jetspeed javascript to help support portlets in both /portal and /desktop
@@ -323,15 +325,50 @@
         return null;
     if ( window.dojo && window.dojo.uri )
         return new dojo.uri.Uri( url );
-    var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
-    var r = url.toString().match( new RegExp( regexp ) );
-    var parsedUrl = {};
-    parsedUrl.scheme = r[2] || (r[1] ? "" : null);
-    parsedUrl.authority = r[4] || (r[3] ? "" : null);
-    parsedUrl.path = r[5]; // can never be undefined
-    parsedUrl.query = r[7] || (r[6] ? "" : null);
-    parsedUrl.fragment  = r[9] || (r[8] ? "" : null);
-    return parsedUrl;
+    return new jetspeed.url.JSUri( url );
+};
+jetspeed.url.JSUri = function( url )
+{
+    if ( url != null )
+    {
+        if ( ! url.path )
+        {
+            var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
+            var r = url.toString().match( new RegExp( regexp ) );
+            var parsedUrl = {};
+            this.scheme = r[2] || (r[1] ? "" : null);
+            this.authority = r[4] || (r[3] ? "" : null);
+            this.path = r[5]; // can never be undefined
+            this.query = r[7] || (r[6] ? "" : null);
+            this.fragment  = r[9] || (r[8] ? "" : null);
+        }
+        else
+        {
+            this.scheme = url.scheme;
+            this.authority = url.authority;
+            this.path = url.path;
+            this.query= url.query;
+            this.fragment = url.fragment;
+        }
+    }
+};
+jetspeed.url.JSUri.prototype =
+{
+    scheme: null,
+    authority: null,
+    path: null,
+    query: null,
+    fragment: null,
+    toString: function()
+    {
+        var uri = "";
+        uri += ( this.scheme != null && this.scheme.length > 0 ) ? ( this.scheme + "://" ) : "";
+        uri += ( this.authority != null && this.authority.length > 0 ) ? this.authority : "";
+        uri += ( this.path != null && this.path.length > 0 ) ? this.path : "";
+        uri += ( this.query != null && this.query.length > 0 ) ? ( "?" + this.query ) : "";
+        uri += ( this.fragment != null && this.fragment > 0 ) ? ( "#" + this.fragment ) : "";
+        return uri;
+    }
 };
 jetspeed.url.scheme =
 {   // used to make jetspeed.url.validateUrlStartsWithHttp cleaner
@@ -373,10 +410,6 @@
         jetspeed.url.pathInitialize();
     return jetspeed.url.basePortalUrl() + jetspeed.url.path.JETSPEED ;
 };
-jetspeed.url.basePortalWindowThemeUrl = function( windowtheme )
-{
-    return jetspeed.url.basePortalDesktopUrl() + "/javascript/jetspeed/windowthemes/" + windowtheme;
-};
 
 jetspeed.url.validateUrlStartsWithHttp = function( url )
 {
@@ -395,6 +428,126 @@
     }
     return false;
 };
+jetspeed.url.addQueryParameter = function( urlObj, paramname, paramvalue, removeExisting )
+{
+    if ( urlObj == null )
+        return urlObj;
+    if ( ! urlObj.path )
+        urlObj = jetspeed.url.parse( urlObj );
+    if ( urlObj == null )
+        return null;
+    if ( paramname == null )
+        return urlObj;
+    urlObj.jsQParamN = null;
+    if ( removeExisting )
+        urlObj = jetspeed.url.removeQueryParameter( urlObj, paramname, false );
+    
+    var urlQuery = urlObj.query;
+    if ( urlQuery == null )
+        urlQuery = "";
+    var urlQueryLen = urlQuery.length;
+    if ( urlQueryLen > 0 )
+        urlQuery += "&";
+    urlQuery += paramname + "=" + ( paramvalue != null ? paramvalue : "" );
+    urlObj.query = urlQuery;
+    var modUri = new jetspeed.url.JSUri( urlObj );        
+    urlObj = jetspeed.url.parse( modUri );
+    return urlObj;
+};
+jetspeed.url.removeAllQueryParameters = function( urlObj )
+{
+    return jetspeed.url.removeQueryParameter( urlObj, null, true );
+};
+jetspeed.url.removeQueryParameter = function( urlObj, paramname, removeAllParameters )
+{
+    if ( urlObj == null )
+        return urlObj;
+    if ( ! urlObj.path )
+        urlObj = jetspeed.url.parse( urlObj );
+    if ( urlObj == null )
+        return null;
+    urlObj.jsQParamN = null;
+    var urlQuery = urlObj.query;
+    var urlQueryLen = ( ( urlQuery != null ) ? urlQuery.length : 0 );
+    if ( urlQueryLen > 0 )
+    {
+        if ( removeAllParameters )
+            urlQuery = null;
+        else if ( paramname == null )
+            return urlObj;
+        else
+        {
+            var matchParam = paramname;
+            var matchPos = urlQuery.indexOf( matchParam );
+            if ( matchPos == 0 )
+                urlQuery = jetspeed.url._removeQP( urlQuery, urlQueryLen, matchParam, matchPos );
+            
+            matchParam = "&" + paramname;
+            while ( true )
+            {
+                urlQueryLen = ( ( urlQuery != null ) ? urlQuery.length : 0 );
+                matchPos = urlQuery.indexOf( matchParam, 0 );
+                if ( matchPos == -1 )
+                    break;
+                var modUrlQuery = jetspeed.url._removeQP( urlQuery, urlQueryLen, matchParam, matchPos );
+                if ( modUrlQuery == urlQuery )
+                    break;
+                urlQuery = modUrlQuery;
+            }
+            if ( urlQuery.length > 0 )
+            {
+                if ( urlQuery.charCodeAt( 0 ) == 38 ) // "&"
+                    urlQuery = ( ( urlQuery.length > 1 ) ? urlQuery.substring( 1 ) : "" );
+                if ( urlQuery.length > 0 && urlQuery.charCodeAt( 0 ) == 63 ) // "?"
+                    urlQuery = ( ( urlQuery.length > 1 ) ? urlQuery.substring( 1 ) : "" );
+            }
+        }
+        urlObj.query = urlQuery;
+        var modUri = new jetspeed.url.JSUri( urlObj );        
+        urlObj = jetspeed.url.parse( modUri );
+    }
+    return urlObj;
+};
+
+jetspeed.url._removeQP = function( urlQuery, urlQueryLen, matchParam, matchPos )
+{
+    if ( matchPos == -1 ) return urlQuery;
+    if ( urlQueryLen > ( matchPos + matchParam.length ) )
+    {
+        var nextCh = urlQuery.charCodeAt( matchPos + matchParam.length );
+        if ( nextCh == 61 )  // "="
+        {
+            var ampPos = urlQuery.indexOf( "&", matchPos + matchParam.length + 1 );
+            if ( ampPos != -1 )
+            {
+                if ( matchPos > 0 )
+                    urlQuery = urlQuery.substring( 0, matchPos ) + urlQuery.substring( ampPos );
+                else
+                    urlQuery = ( ( ampPos < (urlQueryLen -1) ) ? urlQuery.substring( ampPos ) : "" );
+            }
+            else
+            {
+                if ( matchPos > 0 )
+                    urlQuery = urlQuery.substring( 0, matchPos )
+                else
+                    urlQuery = "";
+            }
+        }
+        else if ( nextCh == 38 ) // "&"
+        {
+            if ( matchPos > 0 )
+                urlQuery = urlQuery.substring( 0, matchPos ) + urlQuery.substring( matchPos + matchParam.length );
+            else
+                urlQuery = urlQuery.substring( matchPos + matchParam.length );
+        }
+    }
+    else if ( urlQueryLen == ( matchPos + matchParam.length ) )
+    {
+        urlQuery = "";
+    }
+    return urlQuery;
+};
+
 jetspeed.url.getQueryParameter = function( urlObj, paramname )
 {
     if ( urlObj == null )

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js Wed Feb 21 13:18:08 2007
@@ -12,11 +12,16 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * author: Steve Milek
+ * author: David Sean Taylor
  */
 
-
 /**
- * jetspeed is the root variable of (almost all) our public symbols.
+ * jetspeed desktop core javascript objects and types
+ *
+ * 2007-02-20: this file desperately needs to be broken up once deployment support
+ *             for javascript compression and aggregation is implemented
  */
 
 dojo.provide("jetspeed.desktop.core");
@@ -64,7 +69,7 @@
     PORTLET_PROP_DESKTOP_EXTENDED: "jsdesktop",
     PORTLET_PROP_WINDOW_POSITION_STATIC: "windowPositionStatic",
     PORTLET_PROP_WINDOW_HEIGHT_TO_FIT: "windowHeightToFit",
-    PORTLET_PROP_WINDOW_THEME: "windowTheme",
+    PORTLET_PROP_WINDOW_DECORATION: "windowDecoration",
     PORTLET_PROP_WINDOW_TITLE: "title",
     PORTLET_PROP_WINDOW_ICON: "windowIcon",
     PORTLET_PROP_WIDTH: "width",
@@ -105,6 +110,7 @@
 
     PAGE_EDITOR_WIDGET_ID: "jetspeed-page-editor",
     PAGE_EDITOR_INITIATE_PARAMETER: "editPage",
+    PORTAL_ORIGINATE_PARAMETER: "portal",
 
     DEBUG_WINDOW_TAG: "js-dojo-debug"
 };
@@ -118,19 +124,25 @@
     windowWidth: null,                  // last-ditch defaults for these defined in initializeDesktop
     windowHeight: null,
 
-    desktopTheme: null,                 // do not access directly - use getDesktopTheme()
-    desktopThemeRootUrl: null,          // do not access directly - use getDesktopThemeRootUrl()
-    getDesktopTheme: function()
-    {
-        if ( jetspeed.prefs.desktopTheme == null && djConfig.jetspeed != null )
-            jetspeed.prefs.desktopTheme = djConfig.jetspeed.desktopTheme;
-        return jetspeed.prefs.desktopTheme;
-    },
-    getDesktopThemeRootUrl: function()
-    {
-        if ( jetspeed.prefs.desktopThemeRootUrl == null && djConfig.jetspeed != null )
-            jetspeed.prefs.desktopThemeRootUrl = djConfig.jetspeed.desktopThemeRootUrl;
-        return jetspeed.prefs.desktopThemeRootUrl;
+    layoutName: null,                   // do not access directly - use getLayoutName()
+    layoutRootUrl: null,                // do not access directly - use getLayoutRootUrl()
+    getLayoutName: function()
+    {
+        if ( jetspeed.prefs.layoutName == null && djConfig.jetspeed != null )
+            jetspeed.prefs.layoutName = djConfig.jetspeed.layoutName;
+        return jetspeed.prefs.layoutName;
+    },
+    getLayoutRootUrl: function()
+    {
+        if ( jetspeed.prefs.layoutRootUrl == null && djConfig.jetspeed != null )
+            jetspeed.prefs.layoutRootUrl = jetspeed.url.basePortalDesktopUrl() + djConfig.jetspeed.layoutDecorationPath;
+        return jetspeed.prefs.layoutRootUrl;
+    },
+    getPortletDecorationsRootUrl: function()
+    {
+        if ( jetspeed.prefs.portletDecorationsRootUrl == null && djConfig.jetspeed != null )
+            jetspeed.prefs.portletDecorationsRootUrl = jetspeed.url.basePortalDesktopUrl() + djConfig.jetspeed.portletDecorationsPath;
+        return jetspeed.prefs.portletDecorationsRootUrl;
     },
 
     portletSelectorWindowTitle: "Portlet Selector",
@@ -147,16 +159,20 @@
     windowIconEnabled: true,
     windowIconPath: "/images/portlets/small/",
 
-    windowThemesAllowed: [ "tigris", "blueocean" ],
-    windowTheme: "tigris",
+    windowDecoration: "tigris",
 
     pageActionButtonTooltip: true,
 
-    getWindowThemeConfig: function( windowtheme )
+    getPortletDecorationBaseUrl: function( portletDecorationName )
     {
-        if ( jetspeed.prefs.windowThemeConfig == null || windowtheme == null )
+        return jetspeed.prefs.getPortletDecorationsRootUrl() + "/" + portletDecorationName;
+    },
+
+    getPortletDecorationConfig: function( portletDecorationName )
+    {
+        if ( jetspeed.prefs.portletDecorationsConfig == null || portletDecorationName == null )
             return null;
-        return jetspeed.prefs.windowThemeConfig[ windowtheme ];
+        return jetspeed.prefs.portletDecorationsConfig[ portletDecorationName ];
     }
 };
 
@@ -164,7 +180,7 @@
 jetspeed.debug =
 {
     pageLoad: true,
-    retrievePsml: false,
+    retrievePsml: true,
     setPortletContent: false,
     doRenderDoAction: false,
     postParseAnnotateHtml: false,
@@ -173,7 +189,7 @@
     initializeWindowState: false,
     submitChangedWindowState: false,
 
-    windowThemeRandom: false,
+    windowDecorationRandom: false,
 
     debugContainerId: ( djConfig.debugContainerId ? djConfig.debugContainerId : dojo.hostenv.defaultDebugContainerId )
 };
@@ -184,15 +200,16 @@
 //jetspeed.debugContentDumpIds = [ ".*" ];                        // dump all responses
 //jetspeed.debugContentDumpIds = [ "getmenus", "getmenu-.*" ];    // dump getmenus response and all getmenu responses
 //jetspeed.debugContentDumpIds = [ "page-.*" ];                   // dump page psml response
-//jetspeed.debugContentDumpIds = [ "addportlet" ];                // dump portlet selector response
-//jetspeed.debugContentDumpIds = [ "P-10acd169a40-10001", "P-10acd169a40-10000" ];
 //jetspeed.debugContentDumpIds = [ "js-cp-selector.2" ];
+jetspeed.debugContentDumpIds = [ "moveabs-layout" ];
 
 // ... load page /portlets
 jetspeed.page = null ;
 jetspeed.initializeDesktop = function()
 {
     jetspeed.url.pathInitialize();
+    jetspeed.browser_IE = dojo.render.html.ie;
+    jetspeed.browser_IEpre7 = ( dojo.render.html.ie50 || dojo.render.html.ie55 || dojo.render.html.ie60 );
     if ( djConfig.jetspeed != null )
     {
         for ( var prefKey in djConfig.jetspeed )
@@ -220,18 +237,18 @@
     }
     dojo.html.insertCssFile( jetspeed.ui.getDefaultFloatingPaneTemplateCss(), document, true );
 
-    if ( jetspeed.prefs.windowThemesAllowed == null || jetspeed.prefs.windowThemesAllowed.length == 0 )
+    if ( jetspeed.prefs.portletDecorationsAllowed == null || jetspeed.prefs.portletDecorationsAllowed.length == 0 )
     {
-        if ( jetspeed.prefs.windowTheme != null )
-            jetspeed.prefs.windowThemesAllowed = [ jetspeed.prefs.windowTheme ];
+        if ( jetspeed.prefs.windowDecoration != null )
+            jetspeed.prefs.portletDecorationsAllowed = [ jetspeed.prefs.windowDecoration ];
     }
-    else if ( jetspeed.prefs.windowTheme == null )
+    else if ( jetspeed.prefs.windowDecoration == null )
     {
-        jetspeed.prefs.windowTheme = jetspeed.prefs.windowThemesAllowed[0];
+        jetspeed.prefs.windowDecoration = jetspeed.prefs.portletDecorationsAllowed[0];
     }
-    if ( jetspeed.prefs.windowTheme == null || jetspeed.prefs.windowThemesAllowed == null )
+    if ( jetspeed.prefs.windowDecoration == null || jetspeed.prefs.portletDecorationsAllowed == null )
     {
-        dojo.raise( "Cannot load page because there are no defined jetspeed window themes" );
+        dojo.raise( "Cannot load page because there are no defined jetspeed portlet decorations" );
         return;
     }
 
@@ -245,10 +262,10 @@
         jetspeed.prefs.windowActionNoImage = noImageMap;
     }
 
-    jetspeed.prefs.windowThemeConfig = {};
-    for ( var i = 0 ; i < jetspeed.prefs.windowThemesAllowed.length ; i++ )
+    jetspeed.prefs.portletDecorationsConfig = {};
+    for ( var i = 0 ; i < jetspeed.prefs.portletDecorationsAllowed.length ; i++ )
     {
-        jetspeed.loadWindowThemeConfig( jetspeed.prefs.windowThemesAllowed[ i ] );
+        jetspeed.loadPortletDecorationConfig( jetspeed.prefs.portletDecorationsAllowed[ i ] );
     }
     
     jetspeed.loadPage();
@@ -273,36 +290,22 @@
 {
     if ( djConfig.isDebug && jetspeed.debugInPortletWindow && dojo.byId( jetspeed.debug.debugContainerId ) == null )
     {
-        var debugWidth = "400"; var debugHeight="400"; var debugLeft="320"; var debugTop="0"; var debugWindowState=jetspeed.id.ACTION_NAME_MINIMIZE;
-        var stateCookieVal = dojo.io.cookie.getCookie( jetspeed.id.DEBUG_WINDOW_TAG );
-        if ( stateCookieVal != null && stateCookieVal.length > 0 )
-        {
-            var debugState = stateCookieVal.split( "|" );
-            if ( debugState && debugState.length >= 4 )
-            {
-                debugWidth = debugState[0];
-                debugHeight = debugState[1];
-                debugTop = debugState[2];
-                debugLeft = debugState[3];
-                if ( debugState.length > 4 && debugState[4] != null && debugState[4].length > 0 )
-                    debugWindowState=debugState[4];
-            }
-        }
+        var debugWindowState = jetspeed.debugWindowReadCookie( true );
         var windowParams = {};
         var debugWindowWidgetId = jetspeed.id.PORTLET_WINDOW_ID_PREFIX + jetspeed.id.DEBUG_WINDOW_TAG;
         windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_POSITION_STATIC ] = false;
         windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_HEIGHT_TO_FIT ] = false;
-        windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_THEME ] = "tigris";
+        windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_DECORATION ] = jetspeed.prefs.windowDecoration;
         windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_TITLE ] = "Dojo Debug";
         windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_ICON ] = "text-x-script.png";
         windowParams[ jetspeed.id.PORTLET_PROP_WIDGET_ID ] = debugWindowWidgetId;
-        windowParams[ jetspeed.id.PORTLET_PROP_WIDTH ] = debugWidth;
-        windowParams[ jetspeed.id.PORTLET_PROP_HEIGHT ] = debugHeight;
-        windowParams[ jetspeed.id.PORTLET_PROP_LEFT ] = debugLeft;
-        windowParams[ jetspeed.id.PORTLET_PROP_TOP ] = debugTop;
+        windowParams[ jetspeed.id.PORTLET_PROP_WIDTH ] = debugWindowState.width;
+        windowParams[ jetspeed.id.PORTLET_PROP_HEIGHT ] = debugWindowState.height;
+        windowParams[ jetspeed.id.PORTLET_PROP_LEFT ] = debugWindowState.left;
+        windowParams[ jetspeed.id.PORTLET_PROP_TOP ] = debugWindowState.top;
         windowParams[ jetspeed.id.PORTLET_PROP_EXCLUDE_PCONTENT ] = false;
         windowParams[ jetspeed.id.PORTLET_PROP_CONTENT_RETRIEVER ] = new jetspeed.om.DojoDebugContentRetriever();
-        windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_STATE ] = debugWindowState;
+        windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_STATE ] = debugWindowState.windowState;
         var pwWidgetParams = jetspeed.widget.PortletWindow.prototype.staticDefineAsAltInitParameters( null, windowParams );
         jetspeed.ui.createPortletWindow( pwWidgetParams );
         pwWidgetParams.retrieveContent( null, null );
@@ -316,6 +319,36 @@
         dojo.event.connect( debugWindowWidget, "endDragging", jetspeed, "debugWindowSave" );
     }
 };
+jetspeed.debugWindowReadCookie = function( useDefaults )
+{
+    var debugState = {};
+    if ( useDefaults )
+        debugState = { width: "400", height: "400", left: "320", top: "0", windowState: jetspeed.id.ACTION_NAME_MINIMIZE };
+    var stateCookieVal = dojo.io.cookie.getCookie( jetspeed.id.DEBUG_WINDOW_TAG );
+    if ( stateCookieVal != null && stateCookieVal.length > 0 )
+    {
+        var debugStateRaw = stateCookieVal.split( "|" );
+        if ( debugStateRaw && debugStateRaw.length >= 4 )
+        {
+            debugState.width = debugStateRaw[0]; debugState.height = debugStateRaw[1]; debugState.top = debugStateRaw[2]; debugState.left = debugStateRaw[3];
+            if ( debugStateRaw.length > 4 && debugStateRaw[4] != null && debugStateRaw[4].length > 0 )
+                debugState.windowState=debugStateRaw[4];
+        }
+    }
+    return debugState;
+};
+jetspeed.debugWindowRestore = function()
+{
+    var debugWindowWidgetId = jetspeed.id.PORTLET_WINDOW_ID_PREFIX + jetspeed.id.DEBUG_WINDOW_TAG;
+    var debugWindowWidget = dojo.widget.byId( debugWindowWidgetId );
+    if ( ! debugWindowWidget ) return;
+    debugWindowWidget.restoreWindow();
+};
+jetspeed.debugWindow = function()
+{
+    var debugWindowWidgetId = jetspeed.id.PORTLET_WINDOW_ID_PREFIX + jetspeed.id.DEBUG_WINDOW_TAG;
+    return dojo.widget.byId( debugWindowWidgetId );
+};
 jetspeed.debugWindowSave = function()
 {
     var debugWindowWidgetId = jetspeed.id.PORTLET_WINDOW_ID_PREFIX + jetspeed.id.DEBUG_WINDOW_TAG;
@@ -324,7 +357,24 @@
     if ( ! debugWindowWidget.windowPositionStatic )
     {
         var currentState = debugWindowWidget.getCurrentWindowStateForPersistence( false );
-        var stateCookieVal = currentState.width + "|" + currentState.height + "|" + currentState.top + "|" + currentState.left + "|" + debugWindowWidget.windowState;
+        var cWidth = currentState.width; var cHeight = currentState.height; var cTop = currentState.top; var cLeft = currentState.left;
+        if ( debugWindowWidget.windowState == jetspeed.id.ACTION_NAME_MINIMIZE )
+        {
+            var lastPositionInfo = debugWindowWidget.getLastPositionInfo();
+            if ( lastPositionInfo != null )
+            {
+                if ( lastPositionInfo.height != null && lastPositionInfo.height > 0 )
+                    cHeight = lastPositionInfo.height;
+            }
+            else
+            {
+                var debugWindowState = jetspeed.debugWindowReadCookie( false );
+                if ( debugWindowState.height != null && debugWindowState.height > 0 )
+                    cHeight = debugWindowState.height;
+            }
+        }
+
+        var stateCookieVal = cWidth + "|" + cHeight + "|" + cTop + "|" + cLeft + "|" + debugWindowWidget.windowState;
         dojo.io.cookie.setCookie( jetspeed.id.DEBUG_WINDOW_TAG, stateCookieVal, 30, "/" );
     }
 };
@@ -369,21 +419,21 @@
         if ( (debugMsg || debugPageLoad) )
         {
             if ( i > 0 ) renderMsg = renderMsg + ", ";
+            var widgetId = null;
+            if ( renderObj.getProperty != null )
+                widgetId = renderObj.getProperty( jetspeed.id.PORTLET_PROP_WIDGET_ID );
+            if ( ! widgetId )
+                widgetId = renderObj.widgetId;
+            if ( ! widgetId )
+                widgetId = renderObj.toString();
             if ( renderObj.entityId )
             {
-                renderMsg = renderMsg + renderObj.entityId;
+                renderMsg = renderMsg + renderObj.entityId + "(" + widgetId + ")";
                 if ( debugPageLoad && renderObj.getProperty( jetspeed.id.PORTLET_PROP_WINDOW_TITLE ) )
                     renderMsg = renderMsg + " " + renderObj.getProperty( jetspeed.id.PORTLET_PROP_WINDOW_TITLE );
             }
             else
             {
-                var widgetId = null;
-                if ( renderObj.getProperty != null )
-                    widgetId = renderObj.getProperty( jetspeed.id.PORTLET_PROP_WIDGET_ID );
-                if ( ! widgetId )
-                    widgetId = renderObj.widgetId;
-                if ( ! widgetId )
-                    widgetId = renderObj.toString();
                 renderMsg = renderMsg + widgetId;
             }
         }
@@ -511,53 +561,67 @@
     // JSF h:commandLink uses the above anchor onclick practice
     false;
 };
-
-jetspeed.loadWindowThemeConfig = function( windowtheme )
+jetspeed.loadPortletDecorationStyles = function( portletDecorationName )
+{
+    var portletDecorationConfig = jetspeed.prefs.getPortletDecorationConfig( portletDecorationName );
+    if ( portletDecorationConfig != null && ! portletDecorationConfig.css_loaded )
+    {
+        var pdBaseUrl = jetspeed.prefs.getPortletDecorationBaseUrl( portletDecorationName );
+        portletDecorationConfig.css_loaded = true;
+        portletDecorationConfig.cssPathCommon = new dojo.uri.Uri( pdBaseUrl + "/css/styles.css" );
+        portletDecorationConfig.cssPathDesktop = new dojo.uri.Uri( pdBaseUrl + "/css/desktop.css" );
+        
+        dojo.html.insertCssFile( portletDecorationConfig.cssPathCommon, null, true );
+        dojo.html.insertCssFile( portletDecorationConfig.cssPathDesktop, null, true );
+    }
+    return portletDecorationConfig;
+};
+jetspeed.loadPortletDecorationConfig = function( portletDecorationName )
 {
-    // setup default window theme config
-    var windowThemeConfig = {};
-    jetspeed.prefs.windowThemeConfig[ windowtheme ] = windowThemeConfig;
-    windowThemeConfig.windowActionButtonOrder = jetspeed.prefs.windowActionButtonOrder;
-    windowThemeConfig.windowActionNotPortlet = jetspeed.prefs.windowActionNotPortlet;
-    windowThemeConfig.windowActionButtonMax = jetspeed.prefs.windowActionButtonMax;
-    windowThemeConfig.windowActionButtonHide = jetspeed.prefs.windowActionButtonHide;
-    windowThemeConfig.windowActionButtonTooltip = jetspeed.prefs.windowActionButtonTooltip;
-    windowThemeConfig.windowActionMenuOrder = jetspeed.prefs.windowActionMenuOrder;
-    windowThemeConfig.windowActionNoImage = jetspeed.prefs.windowActionNoImage;
-    windowThemeConfig.windowIconEnabled = jetspeed.prefs.windowIconEnabled;
-    windowThemeConfig.windowIconPath = jetspeed.prefs.windowIconPath;
-
-    // load window theme config
-    var windowThemeConfigUri = jetspeed.url.basePortalWindowThemeUrl( windowtheme ) + "/" + windowtheme + ".js";
-    dojo.hostenv.loadUri( windowThemeConfigUri, function(hash) {
+    // setup default portlet decoration config
+    var pdConfig = {};
+    jetspeed.prefs.portletDecorationsConfig[ portletDecorationName ] = pdConfig;
+    pdConfig.windowActionButtonOrder = jetspeed.prefs.windowActionButtonOrder;
+    pdConfig.windowActionNotPortlet = jetspeed.prefs.windowActionNotPortlet;
+    pdConfig.windowActionButtonMax = jetspeed.prefs.windowActionButtonMax;
+    pdConfig.windowActionButtonHide = jetspeed.prefs.windowActionButtonHide;
+    pdConfig.windowActionButtonTooltip = jetspeed.prefs.windowActionButtonTooltip;
+    pdConfig.windowActionMenuOrder = jetspeed.prefs.windowActionMenuOrder;
+    pdConfig.windowActionNoImage = jetspeed.prefs.windowActionNoImage;
+    pdConfig.windowIconEnabled = jetspeed.prefs.windowIconEnabled;
+    pdConfig.windowIconPath = jetspeed.prefs.windowIconPath;
+
+    // load portlet decoration config
+    var portletDecorationConfigUri = jetspeed.prefs.getPortletDecorationBaseUrl( portletDecorationName ) + "/" + portletDecorationName + ".js";
+    dojo.hostenv.loadUri( portletDecorationConfigUri, function(hash) {
 				for ( var j in hash )
                 {
-                    windowThemeConfig[ j ] = hash[j];
+                    pdConfig[ j ] = hash[j];
                 }
-                if ( windowThemeConfig.windowActionNoImage != null )
+                if ( pdConfig.windowActionNoImage != null )
                 {
                     var noImageMap = {};
-                    for ( var i = 0 ; i < windowThemeConfig.windowActionNoImage.length; i++ )
+                    for ( var i = 0 ; i < pdConfig.windowActionNoImage.length; i++ )
                     {
-                        noImageMap[ windowThemeConfig.windowActionNoImage[ i ] ] = true;
+                        noImageMap[ pdConfig.windowActionNoImage[ i ] ] = true;
                     }
-                    windowThemeConfig.windowActionNoImage = noImageMap;
+                    pdConfig.windowActionNoImage = noImageMap;
                 }
-                if ( windowThemeConfig.windowIconPath != null )
+                if ( pdConfig.windowIconPath != null )
                 {
-                    windowThemeConfig.windowIconPath = dojo.string.trim( windowThemeConfig.windowIconPath );
-                    if ( windowThemeConfig.windowIconPath == null || windowThemeConfig.windowIconPath.length == 0 )
-                        windowThemeConfig.windowIconPath = null;
+                    pdConfig.windowIconPath = dojo.string.trim( pdConfig.windowIconPath );
+                    if ( pdConfig.windowIconPath == null || pdConfig.windowIconPath.length == 0 )
+                        pdConfig.windowIconPath = null;
                     else
                     {
-                        var winIconsPath = windowThemeConfig.windowIconPath;
+                        var winIconsPath = pdConfig.windowIconPath;
                         var firstCh = winIconsPath.charAt(0);
                         if ( firstCh != "/" )
                             winIconsPath = "/" + winIconsPath;
                         var lastCh = winIconsPath.charAt( winIconsPath.length -1 );
                         if ( lastCh != "/" )
                             winIconsPath = winIconsPath + "/";
-                        windowThemeConfig.windowIconPath = winIconsPath;
+                        pdConfig.windowIconPath = winIconsPath;
                     }
                 }
 			});
@@ -705,7 +769,7 @@
     var windowParams = {};
     windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_POSITION_STATIC ] = false;
     windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_HEIGHT_TO_FIT ] = false;
-    windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_THEME ] = jetspeed.page.getWindowThemeDefault();
+    windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_DECORATION ] = jetspeed.page.getPortletDecorationDefault();
     windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_TITLE ] = jetspeed.prefs.portletSelectorWindowTitle;
     windowParams[ jetspeed.id.PORTLET_PROP_WINDOW_ICON ] = jetspeed.prefs.portletSelectorWindowIcon;
     windowParams[ jetspeed.id.PORTLET_PROP_WIDGET_ID ] = jetspeed.id.PORTLET_WINDOW_ID_PREFIX + jetspeed.id.SELECTOR;
@@ -830,11 +894,15 @@
 {
     if ( ! jetspeed.page.editMode )
     {
+        var fromDesktop = true;
+        var fromPortal = jetspeed.url.getQueryParameter( document.location.href, jetspeed.id.PORTAL_ORIGINATE_PARAMETER );
+        if ( fromPortal != null && fromPortal == "true" )
+            fromDesktop = false;
         jetspeed.page.editMode = true;
         var pageEditorWidget = dojo.widget.byId( jetspeed.id.PAGE_EDITOR_WIDGET_ID );
         if ( pageEditorWidget == null )
         {
-            pageEditorWidget = dojo.widget.createWidget( "jetspeed:PageEditor", { widgetId: jetspeed.id.PAGE_EDITOR_WIDGET_ID } );
+            pageEditorWidget = dojo.widget.createWidget( "jetspeed:PageEditor", { widgetId: jetspeed.id.PAGE_EDITOR_WIDGET_ID, editorInitiatedFromDesktop: fromDesktop } );
             var allColumnsContainer = document.getElementById( jetspeed.id.COLUMNS );
             allColumnsContainer.insertBefore( pageEditorWidget.domNode, allColumnsContainer.firstChild );
         }
@@ -851,11 +919,21 @@
     {
         jetspeed.page.editMode = false;
         var pageEditorWidget = dojo.widget.byId( jetspeed.id.PAGE_EDITOR_WIDGET_ID );
-        if ( pageEditorWidget != null )
+        if ( ! pageEditorWidget.editorInitiatedFromDesktop )
         {
-            pageEditorWidget.editPageHide();
+            var portalPageUrl = jetspeed.page.getPageUrl( true );
+            portalPageUrl = jetspeed.url.removeQueryParameter( portalPageUrl, jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER );
+            portalPageUrl = jetspeed.url.removeQueryParameter( portalPageUrl, jetspeed.id.PORTAL_ORIGINATE_PARAMETER );
+            window.location.href = portalPageUrl;
+        }
+        else
+        {
+            if ( pageEditorWidget != null )
+            {
+                pageEditorWidget.editPageHide();
+            }
+            jetspeed.page.syncPageControls();
         }
-        jetspeed.page.syncPageControls();
     }
 };
 
@@ -1044,6 +1122,7 @@
     name: null,
     path: null,
     pageUrl: null,
+    pagePathAndQuery: null,
     title: null,
     shortTitle: null,
     layoutDecorator: null,
@@ -1107,6 +1186,7 @@
 
     loadFromPSML: function( psml )
     {
+        dojo.debug( "loadFromPSML starting" );
         // parse PSML
         var parsedRootLayoutFragment = this._parsePSML( psml );
 
@@ -1207,7 +1287,6 @@
             {
                 this._parsePSMLAction( child, rootFragmentActions ) ;
             }
-            // BOZO:NOW: title handling - and does anything need to be done with metadata (to get correct title?)
         }
         this.actions = rootFragmentActions;
 
@@ -1409,11 +1488,17 @@
             if ( layoutFragment.otherFragmentIndexes != null && layoutFragment.otherFragmentIndexes.length > 0 )
                 currentClonedLayoutFragByCol = new Array();
 
+            for ( var i = 0 ; i < layoutFragment.fragments.length ; i++ )
+            {
+                var childFrag = layoutFragment.fragments[ i ];
+            }
+            
+            var columnsInLayoutPopulated = new Array();
             for ( var i = 0 ; i < columnsInLayoutLen ; i++ )
             {
                 if ( currentClonedLayoutFragByCol != null )
                     currentClonedLayoutFragByCol.push( null );
-                columnsInLayout[i].columnContainer = true;   // column cannot contain portlets
+                columnsInLayoutPopulated.push( false );
             }
             for ( var i = 0 ; i < layoutFragment.fragments.length ; i++ )
             {
@@ -1432,6 +1517,7 @@
                 var currentClonedLayoutFragForCol = ( (currentClonedLayoutFragByCol == null) ? null : currentClonedLayoutFragByCol[ childFragInColIndex ] );
                 if ( childFrag.type == "layout" )
                 {
+                    columnsInLayoutPopulated[ childFragInColIndex ] = true;
                     if ( currentClonedLayoutFragForCol != null )
                     {
                         this._layoutCreateModel( currentClonedLayoutFragForCol, columnsInLayout[childFragInColIndex], portletsByPageColumn, true ) ;
@@ -1469,10 +1555,16 @@
                     var currentClonedLayoutFragForCol = currentClonedLayoutFragByCol[ i ];
                     if ( currentClonedLayoutFragForCol != null )
                     {
+                        columnsInLayoutPopulated[ i ] = true;
                         this._layoutCreateModel( currentClonedLayoutFragForCol, columnsInLayout[i], portletsByPageColumn, true ) ;
                     }
                 }
             }
+            for ( var i = 0 ; i < columnsInLayoutLen ; i++ )
+            {
+                if ( columnsInLayoutPopulated[ i ] )
+                    columnsInLayout[i].columnContainer = true;   // column cannot contain portlets
+            }
             if ( layoutFragment.otherFragmentIndexes != null && layoutFragment.otherFragmentIndexes.length > 0 )
             {
                 var correctedFragments = new Array();
@@ -1537,8 +1629,10 @@
         if ( jetspeed.prefs.windowTiling && layoutFragment.columnSizes.length > 0 )
         {
             var subOneLast = false;
-            if ( parentColumn == null && layoutFragment.columnSizesSum == 100 )
+            if ( jetspeed.browser_IE )
                 subOneLast = true;
+            //if ( parentColumn == null && layoutFragment.columnSizesSum == 100 )
+            //    subOneLast = true;
             
             if ( parentColumn != null && ! omitLayoutHeader )
             {
@@ -1548,6 +1642,7 @@
                 if ( parentColumn.columnChildren == null )
                     parentColumn.columnChildren = new Array();
                 parentColumn.columnChildren.push( layoutHeaderColModelObj );
+                parentColumn = layoutHeaderColModelObj;
                 addedLayoutHeaderColumn = true;
             }
             
@@ -1710,18 +1805,18 @@
     _createColumnsStart: function( allColumnsParent )
     {
         if ( ! this.columnsStructure || this.columnsStructure.length == 0 ) return;
-        var columnContainer = document.createElement( "div" );
-        columnContainer.id = jetspeed.id.COLUMNS;
-        columnContainer.setAttribute( "id", jetspeed.id.COLUMNS );
+        var columnContainerNode = document.createElement( "div" );
+        columnContainerNode.id = jetspeed.id.COLUMNS;
+        columnContainerNode.setAttribute( "id", jetspeed.id.COLUMNS );
         for ( var colIndex = 0 ; colIndex < this.columnsStructure.length ; colIndex++ )
         {
             var colObj = this.columnsStructure[colIndex];
-            this._createColumns( colObj, columnContainer ) ;
+            this._createColumns( colObj, columnContainerNode ) ;
         }
-        allColumnsParent.appendChild( columnContainer );
+        allColumnsParent.appendChild( columnContainerNode );
     },
 
-    _createColumns: function( column, columnContainer )
+    _createColumns: function( column, columnContainerNode )
     {
         column.createColumn() ;
         if ( column.columnChildren != null && column.columnChildren.length > 0 )
@@ -1732,7 +1827,7 @@
                 this._createColumns( colObj, column.domNode ) ;
             }
         }
-        columnContainer.appendChild( column.domNode );
+        columnContainerNode.appendChild( column.domNode );
     },
     _removeColumns: function( /* DOM Node */ preserveWindowNodesInNode )
     {
@@ -1751,9 +1846,9 @@
                 this.columns[i] = null;
             }
         }
-        var columnContainer = dojo.byId( jetspeed.id.COLUMNS );
-        if ( columnContainer )
-            dojo.dom.removeNode( columnContainer );
+        var columnContainerNode = dojo.byId( jetspeed.id.COLUMNS );
+        if ( columnContainerNode )
+            dojo.dom.removeNode( columnContainerNode );
         this.columns = [];
     },
 
@@ -1761,6 +1856,7 @@
     {
         if ( ! this.columns || this.columns.length == 0 ) return null;
         var result = null;
+        var includeLayouts = ( ( justForPortletWindowNode != null ) ? true : false );
         var clonedLayoutCompletedRowCount = 0;
         var currentLayout = null;
         var currentLayoutId = null;
@@ -1769,12 +1865,13 @@
         for ( var colIndex = 0 ; colIndex < this.columns.length ; colIndex++ )
         {
             var colObj = this.columns[colIndex];
+            var colChildNodes = colObj.domNode.childNodes;
             if ( currentLayoutId == null || currentLayoutId != colObj.getLayoutId() )
             {
-                if ( currentLayoutId != null && ! currentLayoutIsRegular )
-                {
-                    clonedLayoutCompletedRowCount = clonedLayoutCompletedRowCount + currentLayoutRowCount;
-                }
+                //if ( currentLayoutId != null && ! currentLayoutIsRegular )
+                //{
+                //    clonedLayoutCompletedRowCount = clonedLayoutCompletedRowCount + currentLayoutRowCount;
+                //}
                 currentLayoutId = colObj.getLayoutId();
                 currentLayout = this.layouts[ currentLayoutId ];
                 if ( currentLayout == null )
@@ -1787,17 +1884,27 @@
                 if ( currentLayout.clonedFromRootId == null )
                 {
                     currentLayoutIsRegular = true ;
-                    clonedLayoutCompletedRowCount = clonedLayoutCompletedRowCount + 1;
+                    //clonedLayoutCompletedRowCount = clonedLayoutCompletedRowCount + 1;
                     // BOZO: should it ^^ be 0 if no portlets are contained in layout
                 }
+                else
+                {
+                    var parentColObj = this.getColumnFromColumnNode( colObj.domNode.parentNode );
+                    if ( parentColObj == null )
+                    {
+                        dojo.raise( "getPortletCurrentColumnRow cannot locate parent column for column: " + colObj ) ;
+                        return null;
+                    }
+                    colObj = parentColObj;
+                }
             }
 
             var colCurrentRow = null;
-            var colChildNodes = colObj.domNode.childNodes;
             for ( var colChildIndex = 0 ; colChildIndex < colChildNodes.length ; colChildIndex++ )
             {
                 var colChild = colChildNodes[colChildIndex];
-                if ( dojo.html.hasClass( colChild, jetspeed.id.PORTLET_WINDOW_STYLE_CLASS ) || ( includeGhosts && dojo.html.hasClass( colChild, jetspeed.id.PORTLET_WINDOW_GHOST_STYLE_CLASS ) ) )
+
+                if ( dojo.html.hasClass( colChild, jetspeed.id.PORTLET_WINDOW_STYLE_CLASS ) || ( includeGhosts && dojo.html.hasClass( colChild, jetspeed.id.PORTLET_WINDOW_GHOST_STYLE_CLASS ) ) || ( includeLayouts && dojo.html.hasClass( colChild, "desktopColumn" ) ) )
                 {
                     colCurrentRow = ( colCurrentRow == null ? 0 : colCurrentRow + 1 );
                     if ( (colCurrentRow + 1) > currentLayoutRowCount )
@@ -1808,7 +1915,7 @@
                         if ( ! currentLayoutIsRegular )
                         {
                             portletResult.layout = currentLayout.clonedFromRootId;
-                            portletResult.row = ( clonedLayoutCompletedRowCount + colCurrentRow );
+                            //portletResult.row = ( clonedLayoutCompletedRowCount + colCurrentRow );
                         }
                         if ( justForPortletWindowNode != null )
                         {
@@ -1874,16 +1981,22 @@
         return ( aZIndex - bZIndex );
     },
 
-    getWindowThemeDefault: function()
+    getPortletDecorationDefault: function()
     {
-        var windowtheme = null;
-        if ( djConfig.isDebug && jetspeed.debug.windowThemeRandom )
-            windowtheme = jetspeed.prefs.windowThemesAllowed[ Math.floor( Math.random() * jetspeed.prefs.windowThemesAllowed.length ) ];
-        else if ( dojo.lang.indexOf( jetspeed.prefs.windowThemesAllowed, this.getPortletDecorator() ) != -1 )
-            windowtheme = this.getPortletDecorator();
+        var pd = null;
+        if ( djConfig.isDebug && jetspeed.debug.windowDecorationRandom )
+        {
+            pd = jetspeed.prefs.portletDecorationsAllowed[ Math.floor( Math.random() * jetspeed.prefs.portletDecorationsAllowed.length ) ];
+        }
         else
-            windowtheme = jetspeed.prefs.windowTheme;
-        return windowtheme;
+        {
+            var defaultpd = this.getPortletDecorator();
+            if ( dojo.lang.indexOf( jetspeed.prefs.portletDecorationsAllowed, defaultpd ) != -1 )
+                pd = defaultpd;
+            else
+                pd = jetspeed.prefs.windowDecoration;
+        }
+        return pd;
     },
     getPortletArrayList: function()
     {
@@ -2062,7 +2175,7 @@
     },
 
     // ... columns
-    getColumnFromNode: function( /* DOM node */ columnNode )
+    getColumnFromColumnNode: function( /* DOM node */ columnNode )
     {
         if ( columnNode == null ) return null;
         var pageColumnIndexAttr = columnNode.getAttribute( "columnIndex" );
@@ -2072,6 +2185,37 @@
             return this.columns[ pageColumnIndex ];
         return null;
     },
+    getColumnIndexContainingNode: function( /* DOM node */ node )
+    {
+        var inColIndex = null;
+        if ( ! this.columns ) return inColIndex;
+        for ( var i = 0 ; i < this.columns.length ; i++ )
+        {
+            if ( this.columns[i].containsNode( node ) )
+            {
+                inColIndex = i;
+                break;
+            }
+        }
+        return inColIndex;
+    },
+    getColumnContainingNode: function( /* DOM node */ node )
+    {
+        var inColIndex = this.getColumnIndexContainingNode( node );
+        return ( (inColIndex != null && inColIndex >= 0) ? this.columns[inColIndex] : null );
+    },
+    getDescendantColumns: function( /* jetspeed.om.Column */ column )
+    {
+        var dMap = {};
+        if ( column == null ) return dMap;
+        for ( var i = 0 ; i < this.columns.length ; i++ )
+        {
+            var col = this.columns[i];
+            if ( col != column && column.containsDescendantNode( col.domNode ) )
+                dMap[ i ] = col;
+        }
+        return dMap;
+    },
 
     // ... portlet selector
     addNewPortlet: function( portletName, portletEntityId, windowWidgetId )
@@ -2240,7 +2384,7 @@
                 var actionName = actionButtonNames[ i ];
                 var actionButton = document.createElement( "div" );
                 actionButton.className = "portalPageActionButton";
-                actionButton.style.backgroundImage = "url(" + jetspeed.prefs.getDesktopThemeRootUrl() + "/images/" + actionName + ".gif)";
+                actionButton.style.backgroundImage = "url(" + jetspeed.prefs.getLayoutRootUrl() + "/images/desktop/" + actionName + ".gif)";
                 actionButton.actionName = actionName;
                 this.actionButtons[ actionName ] = actionButton;
                 pageControlsContainer.appendChild( actionButton );
@@ -2297,9 +2441,13 @@
     },
 
     // ... add portlet
-    addPortletInitiate: function( /* String */ layoutId )
+    addPortletInitiate: function( /* String */ layoutId, /* String */ jspage )
     {
-        var addportletPageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.DESKTOP + "/system/customizer/selector.psml?jspage=" + escape( this.getPath() );
+        if ( ! jspage )
+            jspage = escape( this.getPagePathAndQuery() );
+        else
+            jspage = escape( jspage );
+        var addportletPageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.DESKTOP + "/system/customizer/selector.psml?jspage=" + jspage;
         if ( layoutId != null )
             addportletPageUrl += "&jslayoutid=" + escape( layoutId );
         jetspeed.changeActionForPortlet( this.rootFragmentId, null, jetspeed.id.ACTION_NAME_EDIT, new jetspeed.om.PageChangeActionContentListener( addportletPageUrl ) );
@@ -2317,11 +2465,11 @@
 
     // ... page url access
 
-    getPageUrl: function()
+    getPageUrl: function( forPortal )
     {
-        if ( this.pageUrl != null )
+        if ( this.pageUrl != null && ! forPortal )
             return this.pageUrl;
-        var pageUrl = jetspeed.url.path.SERVER + jetspeed.url.path.DESKTOP + this.getPath();
+        var pageUrl = jetspeed.url.path.SERVER + ( ( forPortal ) ? jetspeed.url.path.PORTAL : jetspeed.url.path.DESKTOP ) + this.getPath();
         var pageUrlObj = jetspeed.url.parse( pageUrl );
         var docUrlObj = jetspeed.url.parse( document.location.href );
         if ( pageUrlObj != null && docUrlObj != null )
@@ -2340,9 +2488,36 @@
                 }
             }
         }
-        this.pageUrl = pageUrl;
+        if ( ! forPortal )
+            this.pageUrl = pageUrl;
         return pageUrl;
     },
+    getPagePathAndQuery: function()
+    {
+        if ( this.pagePathAndQuery != null )
+            return this.pagePathAndQuery;
+        var pagePath = this.getPath();
+        var pagePathObj = jetspeed.url.parse( pagePath );
+        var docUrlObj = jetspeed.url.parse( document.location.href );
+        if ( pagePathObj != null && docUrlObj != null )
+        {
+            var docUrlQuery = docUrlObj.query;
+            if ( docUrlQuery != null && docUrlQuery.length > 0 )
+            {
+                var pageUrlQuery = pagePathObj.query;
+                if ( pageUrlQuery != null && pageUrlQuery.length > 0 )
+                {
+                    pagePath = pagePath + "&" + docUrlQuery;
+                }
+                else
+                {
+                    pagePath = pagePath + "?" + docUrlQuery;
+                }
+            }
+        }
+        this.pagePathAndQuery = pagePath;
+        return pagePath;
+    },
     getPageDirectory: function()
     {
         var pageDir = "/";
@@ -2413,6 +2588,7 @@
     this.layoutId = layoutId;
     this.size = size;
     this.pageColumnIndex = new Number( pageColumnIndex );
+    this.id = "jscol_" + pageColumnIndex; //  + "_" + this.layoutColumnIndex + "_" + this.layoutId;
     this.domNode = null;
 };
 dojo.inherits( jetspeed.om.Column, jetspeed.om.Id );
@@ -2427,35 +2603,39 @@
     columnContainer: false,
     layoutHeader: false,
 
-    createColumn: function( columnContainer )
+    createColumn: function( columnContainerNode )
     {
         var columnClass = "desktopColumn" ;
         if ( this.isStartOfColumnSet() && this.getPageColumnIndex() > 0 )
-            columnClass = "desktopColumnClear";
+            columnClass = "desktopColumn desktopColumnClear";
         var divElmt = document.createElement( "div" );
         divElmt.setAttribute( "columnIndex", this.getPageColumnIndex() );
         divElmt.style.width = this.size + "%";
         if ( this.layoutHeader )
         {
-            columnClass = "desktopLayoutHeader";
+            columnClass = "desktopColumn desktopLayoutHeader";
         }
         else
         {
             divElmt.style.minHeight = "40px";
         }
         divElmt.className = columnClass;
+        divElmt.id = this.getId();
         this.domNode = divElmt;
-        if ( columnContainer != null )
-            columnContainer.appendChild( divElmt );
+        if ( columnContainerNode != null )
+            columnContainerNode.appendChild( divElmt );
     },
     containsNode: function( node )
     {
-        var contains = false;
-        if ( this.domNode != null && dojo.dom.isDescendantOf( node, this.domNode, true ) )
-        {
-            contains = true;
-        }
-        return contains;
+        return ( ( this.domNode != null && node != null && this.domNode == node.parentNode ) ? true : false );
+    },
+    containsDescendantNode: function( node )
+    {
+        return ( ( this.domNode != null && node != null && dojo.dom.isDescendantOf( node, this.domNode, true ) ) ? true : false );
+    },
+    getDescendantColumns: function()
+    {
+        return jetspeed.page.getDescendantColumns( this );
     },
     isStartOfColumnSet: function()
     {
@@ -2475,7 +2655,7 @@
     },
     getId: function()  // jetspeed.om.Id protocol
     {
-        return this.layoutId + "_" + this.layoutColumnIndex;
+        return this.id; // this.layoutId + "_" + this.layoutColumnIndex;
     },
     getLayoutId: function()
     {
@@ -2498,7 +2678,6 @@
 // ... jetspeed.om.Portlet
 jetspeed.om.Portlet = function( portletName, portletEntityId, alternateContentRetriever, properties, actions, currentActionState, currentActionMode, decorator )
 {   // new jetspeed.om.Portlet( pFrag.name, pFrag.id, alternateContentRetriever, pFrag.properties, pFrag.decorator, portletPageColumnIndex ) ;
-    // BOZO:NOW: do something with decorator arg - this is the fragment decorator override
     this.name = portletName;
     this.entityId = portletEntityId;
     if ( properties )
@@ -2518,6 +2697,14 @@
 
     if ( alternateContentRetriever )
         this.contentRetriever = alternateContentRetriever;
+
+    if ( decorator != null && decorator.length > 0 )
+    {
+        if ( dojo.lang.indexOf( jetspeed.prefs.portletDecorationsAllowed, decorator ) != -1 )
+        {
+            this.putProperty( jetspeed.id.PORTLET_PROP_WINDOW_DECORATION, decorator );
+        }
+    }
 };
 dojo.inherits( jetspeed.om.Portlet, jetspeed.om.Id);
 dojo.lang.extend( jetspeed.om.Portlet,
@@ -2964,7 +3151,7 @@
     setPortletContent: function( portletContent, renderUrl, portletTitle )
     {
         var windowWidget = this.getPortletWindow();
-        if ( portletTitle != null )
+        if ( portletTitle != null && portletTitle.length > 0 )
         {
             this.putProperty( jetspeed.id.PORTLET_PROP_WINDOW_TITLE, portletTitle );
             windowWidget.setPortletTitle( portletTitle );
@@ -3268,19 +3455,38 @@
 };
 jetspeed.om.PortletActionContentListener.prototype =
 {
-    notifySuccess: function( /* String */ portletContent, /* String */ requestUrl, /* Portlet */ portlet )
+    notifySuccess: function( /* String */ portletContent, /* String */ requestUrl, /* Portlet */ portlet, http )
     {
         var renderUrl = null;
         var parsedPseudoUrl = jetspeed.portleturl.parseJSPseudoUrlActionRender( portletContent );
         if ( parsedPseudoUrl.operation == jetspeed.portleturl.PORTLET_REQUEST_ACTION || parsedPseudoUrl.operation == jetspeed.portleturl.PORTLET_REQUEST_RENDER )
         {
-            dojo.debug( "PortletActionContentListener extracted from javascript-pseudo-url: " + portletContent + "  url: " + parsedPseudoUrl.url + " operation: " + parsedPseudoUrl.operation + " entity-id: " + parsedPseudoUrl.portletEntityId ) ;
+            if ( djConfig.isDebug )
+                dojo.debug( "PortletActionContentListener extracted from javascript-pseudo-url: " + portletContent + "  url: " + parsedPseudoUrl.url + " operation: " + parsedPseudoUrl.operation + " entity-id: " + parsedPseudoUrl.portletEntityId ) ;
             renderUrl = parsedPseudoUrl.url;
         }
         else
         {
-            dojo.debug( "PortletActionContentListener: " + portletContent ) ;
+            if ( djConfig.isDebug )
+                dojo.debug( "PortletActionContentListener: " + portletContent )
             renderUrl = portletContent;
+            if ( renderUrl )
+            {
+                var portletUrlPos = renderUrl.indexOf( jetspeed.url.basePortalUrl() + jetspeed.url.path.PORTLET );
+                if ( portletUrlPos == -1 )
+                {
+                    if ( jetspeed.url.validateUrlStartsWithHttp( renderUrl ) )
+                        window.location.href = renderUrl;
+                    else
+                        dojo.raise( "PortletActionContentListener cannot interpret action response: " + portletContent );
+                    renderUrl = null;
+                }
+                else if ( portletUrlPos > 0 )
+                {
+                    dojo.raise( "PortletActionContentListener cannot interpret portlet url in action response: " + portletContent );
+                    renderUrl = null;
+                }
+            }
         }
         if ( renderUrl )
         {

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/manifest.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/manifest.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/manifest.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/manifest.js Wed Feb 21 13:18:08 2007
@@ -29,7 +29,7 @@
             "pageeditor": "jetspeed.widget.PageEditor",
             "pageeditpane": "jetspeed.widget.PageEditPane",
             "layouteditpane": "jetspeed.widget.LayoutEditPane",
-            "layoutrooteditpane": "jetspeed.widget.LayoutRootEditPane",
+            "layouteditpanemovebutton": "jetspeed.widget.LayoutEditPaneMoveHandle",
             "sitemanagertreerpccontroller": "jetspeed.widget.SiteManagerTreeRPCController"
         }
     };

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/EditorTable.js Wed Feb 21 13:18:08 2007
@@ -12,6 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * author: Steve Milek
  */
 
 dojo.provide("jetspeed.widget.EditorTable");

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css Wed Feb 21 13:18:08 2007
@@ -11,106 +11,107 @@
 }
 
 .desktopColumn {
-	float: left;
+    float: left;
     /* background-color: transparent; */
 }
 .desktopColumnClear {
-	float: left;
+    float: left;
     clear: both;
     /* background-color: transparent; */
 }
 .desktopLayoutHeader {
-	float: left;
+    float: left;
     clear: both;
 }
 .columnSpacer { 
     
 }
 *html .desktopColumn {
-	overflow: hidden;
+    overflow: hidden;
     /* background-color: transparent; */
     /* background-color: #666; */
 }
 
 #pwGhost {
-	border: 1px dashed #F00;
-	margin: 2px;
+    border: 1px dashed #F00;
+    margin: 2px;
 }
 
 /********** Outer Window ***************/
 
 .dojoFloatingPane {
-	/* essential css */
-	position: absolute;
-    overflow-y: hidden;		/* dojo says 'visible' with this explanation "so drop shadow is displayed"" */
+    /* essential css */
+    position: absolute;
+    overflow-y: hidden;     /* dojo says 'visible' with this explanation "so drop shadow is displayed"" */
                             /* we says 'hidden' cause IE likes to kindly expand div to fit content otherwise */
     overflow-x: hidden;
 
-	z-index: 10;
+    z-index: 10;
 
-	/* styling css */
-	border: 1px solid;
-	border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
-	background-color: ThreeDFace;
+    clear: both;
+
+    /* styling css */
+    border: 1px solid;
+    border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+    background-color: ThreeDFace;
 }
 
 
 /********** Title Bar ****************/
 
 .dojoFloatingPaneTitleBar {
-	vertical-align: top;
-	margin: 2px 2px 2px 2px;
-	z-index: 10;
-	background-color: #7596c6;
-	cursor: move;
-	overflow: hidden;
+    vertical-align: top;
+    margin: 2px 2px 2px 2px;
+    z-index: 10;
+    background-color: #7596c6;
+    cursor: move;
+    overflow: hidden;
     height: 22px;
-	border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
-	vertical-align: middle;
+    border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+    vertical-align: middle;
 }
 
 .dojoFloatingPaneTitleText {
-	float: left;
-	padding: 2px 4px 2px 2px;
-	white-space: nowrap;
-	color: CaptionText;
-	font: small-caption;
+    float: left;
+    padding: 2px 4px 2px 2px;
+    white-space: nowrap;
+    color: CaptionText;
+    font: small-caption;
 }
 
 .dojoFloatingPaneActions{
-	float: right;
-	position: absolute;
-	right: 2px;
-	top: 2px;
-	vertical-align: middle;
+    float: right;
+    position: absolute;
+    right: 2px;
+    top: 2px;
+    vertical-align: middle;
 }
 
 
 .dojoFloatingPaneActionItem {
-	vertical-align: middle;
-	margin-right: 1px;
-	height: 22px;
-	width: 22px;
+    vertical-align: middle;
+    margin-right: 1px;
+    height: 22px;
+    width: 22px;
 }
 
 .portletWindowActionButton {
-	vertical-align: middle;
     margin-top: 5px;
-	margin-right: 3px;
+    margin-right: 3px;
 
     cursor: default;
 
     float: right;
 
     background-repeat: no-repeat;
-    background-position: center center;
+    background-position: top center;
 }
 
 .portalPageActionButton {
     vertical-align: middle;
 
     margin-top: 3px; 
-	margin-right: 3px;
+    margin-right: 3px;
 
     cursor: default;
 
@@ -121,12 +122,12 @@
 }
 
 .dojoFloatingPaneTitleBarIcon {
-	/* essential css */
-	float: left;
+    /* essential css */
+    float: left;
 
-	/* styling css */
+    /* styling css */
     height: 16px;
-	width: 16px;
+    width: 16px;
     margin-top: 3px;
     margin-left: 2px;
     margin-right: 3px;
@@ -137,18 +138,18 @@
 .dojoFloatingPaneMaximizeIcon,
 .dojoFloatingPaneRestoreIcon,
 .dojoFloatingPaneCloseIcon {
-	vertical-align: middle;
-	height: 22px;
-	width: 22px;
-	float: right;
+    vertical-align: middle;
+    height: 22px;
+    width: 22px;
+    float: right;
     cursor: default;
 }
 
 /* bar at bottom of window that holds resize handle */
 .dojoFloatingPaneResizebar {
-	z-index: 10;
-	height: 13px;
-	background-color: ThreeDFace;
+    z-index: 10;
+    height: 13px;
+    background-color: ThreeDFace;
     /*padding: 0px;
     margin: 0px;*/
 }
@@ -156,15 +157,15 @@
 /************* Client Area ***************/
 
 .dojoFloatingPaneClient {
-	position: relative;
-	z-index: 10;
-	border: 1px solid;
-	border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;
-	margin: 2px;
-	background-color: ThreeDFace;
-	padding: 8px;
-	/*font-family: Verdana, Helvetica, Garamond, sans-serif;
-	font-size: 12px;*/
-	overflow: auto;
+    position: relative;
+    z-index: 10;
+    border: 1px solid;
+    border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;
+    margin: 2px;
+    background-color: ThreeDFace;
+    padding: 8px;
+    /*font-family: Verdana, Helvetica, Garamond, sans-serif;
+    font-size: 12px;*/
+    overflow: auto;
 }
 

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.css Wed Feb 21 13:18:08 2007
@@ -14,24 +14,32 @@
 limitations under the License.
 */
 
-.layoutEditPane { }
+.layoutEditPane { position: relative; width: 100% }  
+/*   ^^^ width: 100% is need to avoid IE auto-containing bug: http://www.satzansatz.de/cssd/rpfloat.html */
 
 .layoutEditPane .container{ }
 
-
+.layoutEditPane label,
+.layoutEditPane input,
 .layoutEditPane select
 {
   font-size: 8pt;
   color: blue;
 }
 
-
 .layoutEditPane .detail { }
-.layoutEditPane .detail .layoutNameContainer{ width: 92%; max-width: 300px; float:left; vertical-align: middle }
-.layoutEditPane .detail .layoutName { font-size: xx-small; width: 100%; max-width: 300px; float:left }
-.layoutEditPane .detail .selectSpacer { float: left; width: 20px; visibility: hidden }
-.layoutEditPane .detail .operationSpacer { float: left; width: 28px; visibility: hidden }
-.layoutEditPane .detail .dojoButton { float: left; margin-right: 5px }
-.layoutEditPane .detail .buttonContainerRight .dojoButton { float: right; margin-right: 5px }
+
+.layoutEditPane .detail .rowContainer { margin-top: 7px; float: left }
+
+.layoutEditPane .detail .layoutNameContainer{ width: 270px; float:left; vertical-align: middle; margin-right: 20px; margin-bottom: 10px }
+.layoutEditPane .detail .layoutName { font-size: xx-small; width: 100% }
+
+.layoutEditPane .detail .buttonContainerLeft { float: left; clear: both }
+.layoutEditPane .detail .buttonContainerLeft .dojoButton { float: left; margin-right: 5px }
+
+.layoutEditPane .detail .buttonContainerRight { float: right }
+.layoutEditPane .detail .buttonContainerRight .dojoButton { }
+
+.layoutEditPane .layoutMoveContainer  { position: absolute; right: 2px; top: 2px; width: 26px; height: 25px; display: none; cursor: move }
 
 .dojoComboBoxOptions { font-size: xx-small; }

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.html Wed Feb 21 13:18:08 2007
@@ -1,16 +1,32 @@
 <div class="layoutEditPane">
     <div dojoAttachPoint="containerNode" class="container"></div>
 
-    <fieldset>
-        <div dojoAttachPoint="detail" class="detail">
-           <div class="layoutNameContainer">
-            <select name="layoutNameSelect" dojoAttachPoint="layoutNameSelect" dojoType="Select" class="layoutName" autocomplete="false">
-            </select></div>
-            <div class="selectSpacer">&nbsp;</div>
-            <button dojoType="Button" dojoAttachPoint="changeLayoutButton" dojoAttachEvent="onClick:changeLayout">Change Layout</button>
-            <div class="operationSpacer">&nbsp;</div>
-            <button dojoType="Button" dojoAttachEvent="onClick:openColumnSizeEditor">Column Sizes</button>
-            <div class="buttonContainerRight"><button dojoType="Button" dojoAttachEvent="onClick:addPortlet">Add Portlet</button></div>
+    <fieldset class="pageEditorPaneContainer" dojoAttachPoint="pageEditContainer">
+        <div class="detail">
+            <div class="rowContainer">
+                <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditLNContainer">
+                    <div class="layoutNameContainer">
+                        <select class="layoutName" name="layoutNameSelect" dojoAttachPoint="layoutNameSelect" dojoType="Select" autocomplete="false"></select>
+                    </div>
+                    <div class="buttonContainerLeft">
+                        <button dojoType="Button" dojoAttachPoint="changeLayoutButton" dojoAttachEvent="onClick:changeLayout"><img height="16" src="${this.layoutImagesRoot}button_ok.png">&nbsp;Change Layout</button>
+                    </div>
+                </fieldset>
+                <div style="float: right; width: 18px">&nbsp;</div>  <!-- allowing room for layout-move image -->
+                <div class="buttonContainerRight">
+                    <table cellpadding="0" cellspacing="6" border="0">
+                    <!-- height on images is currently needed to size the button properly, especially when button is inside a table -->
+                    <tr>
+                    <td><button dojoType="Button" dojoAttachEvent="onClick:addPortlet"><img height="16" src="${this.layoutImagesRoot}portlet_add.png">&nbsp;Add Portlet&#133;</button></td>
+                    <td><button dojoType="Button" dojoAttachEvent="onClick:openColumnSizeEditor"><img height="16" src="${this.layoutImagesRoot}column_resize.png">&nbsp;Column Sizes&#133;</button></td>
+                    </tr>
+                    <tr>
+                    <td><button dojoType="Button" dojoAttachEvent="onClick:addLayout"><img height="16" src="${this.layoutImagesRoot}layout_new.png">&nbsp;Add Layout&#133;</button></td>
+                    <td><button dojoType="Button" dojoAttachPoint="deleteLayoutButton" dojoAttachEvent="onClick:deleteLayout"><img height="16" src="${this.layoutImagesRoot}layout_delete.png">&nbsp;Delete Layout&#133;</button><button dojoType="Button" dojoAttachPoint="editModeLayoutMoveButton" dojoAttachEvent="onClick:editModeLayoutMove"><img height="16" src="${this.layoutImagesRoot}edit_mode_layout_move.png">&nbsp;Move Mode</button><button dojoType="Button" dojoAttachPoint="editModeNormalButton" dojoAttachEvent="onClick:editModeNormal"><img height="16" src="${this.layoutImagesRoot}edit_mode_normal.png">&nbsp;Normal Mode</button></td>
+                    </tr>
+                    </table>
+                </div>
+            </div>
         </div>
     </fieldset>
 

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/LayoutEditPane.js Wed Feb 21 13:18:08 2007
@@ -12,9 +12,12 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * author: Steve Milek
  */
 
 dojo.provide("jetspeed.widget.LayoutEditPane");
+dojo.provide("jetspeed.widget.LayoutEditPaneMoveHandle");
 
 dojo.require("dojo.widget.*");
 dojo.require("dojo.io.*");
@@ -40,14 +43,21 @@
         layoutDefinitions: null,
 
         // template parameters
-        detail: null,
+        pageEditContainer: null,
+        pageEditLNContainer: null,
         layoutNameSelect: null,
-
+        deleteLayoutButton: null,
+        editModeLayoutMoveButton: null,
+        editModeNormalButton: null,
+        layoutMoveContainer: null,
         
         // fields
 		isContainer: true,
         widgetsInTemplate: true,
 
+        // drag variables
+        containingColumn: null,
+        windowPositionStatic: true,
 
         // protocol - dojo.widget.Widget create
 
@@ -66,14 +76,28 @@
             //dojo.debug( "building LayoutEditPane for " + this.layoutId + " with layoutDefinitions: " + this.layoutDefinitions );
 		},
 
+        getCurrentLayout: function()
+        {
+            var currentLayout = null;
+            if ( this.layoutId != null )
+                currentLayout = jetspeed.page.layouts[ this.layoutId ];
+            return currentLayout;
+        },
+
         postCreate: function( args, fragment, parent )
         {
+            if ( ! jetspeed.browser_IE )
+            {   /* in IE6, if fieldset background color is set the fieldset will not be rendered nicely (with rounded borders) */
+                if ( this.pageEditContainer != null )
+                    this.pageEditContainer.style.backgroundColor = "#d3d3d3";
+                if ( this.pageEditLNContainer != null )
+                    this.pageEditLNContainer.style.backgroundColor = "#eeeeee";
+            }
+
             if ( this.layoutNameSelect != null )
             {
-                var currentLayout = null;
-                if ( this.layoutId != null )
-                    currentLayout = jetspeed.page.layouts[ this.layoutId ];
-    
+                var currentLayout = this.getCurrentLayout();
+
                 var currentLayoutName = null;
                 if ( currentLayout != null )
                     currentLayoutName = currentLayout.name;
@@ -96,8 +120,37 @@
                 }
                 this.layoutNameSelect.dataProvider.setData( layoutNameData );
             }
+            if ( this.isRootLayout )
+            {
+                if ( this.deleteLayoutButton != null )
+                    this.deleteLayoutButton.domNode.style.display = "none";
+                if ( this.editModeLayoutMoveButton != null )
+                    this.editModeLayoutMoveButton.domNode.style.display = "block";
+                if ( this.editModeNormalButton != null )
+                    this.editModeNormalButton.domNode.style.display = "none";
+            }
+            else
+            {
+                if ( this.editModeLayoutMoveButton != null )
+                    this.editModeLayoutMoveButton.domNode.style.display = "none";
+                if ( this.editModeNormalButton != null )
+                    this.editModeNormalButton.domNode.style.display = "none";
+            }
+            
+            this.layoutMoveContainer = dojo.widget.createWidget( "jetspeed:LayoutEditPaneMoveHandle",
+				{
+					layoutImagesRoot: this.layoutImagesRoot
+				});
+			this.addChild( this.layoutMoveContainer );
+			this.domNode.appendChild( this.layoutMoveContainer.domNode );
         },
 
+        initializeDrag: function()
+        {
+            this.containingColumn = this.getContainingColumn();
+            this.drag = new jetspeed.widget.LayoutDragMoveSource( this );
+            this.drag.setDragHandle( this.layoutMoveContainer.domNode );
+        },
 
         // methods
 
@@ -112,7 +165,133 @@
         },
         addPortlet: function()
         {
-            jetspeed.page.addPortletInitiate( this.layoutId );
+            var jspage = jetspeed.page.getPagePathAndQuery();
+            jspage = jetspeed.url.addQueryParameter( jspage, "editPage", "true", true );
+            jetspeed.page.addPortletInitiate( this.layoutId, jspage.toString() );
+        },
+        addLayout: function()
+        {
+            var currentLayout = this.getCurrentLayout();
+            if ( currentLayout != null )
+            {
+                var addLayoutContentManager = new jetspeed.widget.AddLayoutContentManager( this.layoutId, currentLayout.name, this.pageEditorWidget );
+                addLayoutContentManager.getContent();
+            }
+            else
+            {
+                alert( "Cannot add layout (error: null parent layout)." );
+            }
+        },
+        deleteLayout: function()
+        {
+            this.pageEditorWidget.deleteLayout( this.layoutId );
+        },
+        editModeNormal: function()
+        {
+            this.pageEditorWidget.editModeNormal();
+            if ( this.editModeLayoutMoveButton != null )
+                this.editModeLayoutMoveButton.domNode.style.display = "block";
+            if ( this.editModeNormalButton != null )
+                this.editModeNormalButton.domNode.style.display = "none";
+        },
+        editModeLayoutMove: function()
+        {
+            this.pageEditorWidget.editModeLayoutMove();
+            if ( this.editModeLayoutMoveButton != null )
+                this.editModeLayoutMoveButton.domNode.style.display = "none";
+            if ( this.editModeNormalButton != null )
+                this.editModeNormalButton.domNode.style.display = "block";
+        },
+
+        endDragging: function()
+        {
+            if ( this.drag == null || this.containingColumn == null || this.containingColumn.domNode == null ) return;
+            var beforeDragColumnRowInfo = this.drag.beforeDragColumnRowInfo;
+            //dojo.debug( "layout (" + this.layoutId + " / " + this.widgetId + ") endDragging (a) : before " + jetspeed.printobj( beforeDragColumnRowInfo ) );
+            if ( beforeDragColumnRowInfo != null )
+            {
+                var afterDragColumnRowInfo = jetspeed.page.getPortletCurrentColumnRow( this.containingColumn.domNode );
+                //dojo.debug( "layout (" + this.layoutId + ") endDragging (b) : after " + jetspeed.printobj( afterDragColumnRowInfo ) );
+                if ( afterDragColumnRowInfo != null && ( afterDragColumnRowInfo.row != beforeDragColumnRowInfo.row || afterDragColumnRowInfo.column != beforeDragColumnRowInfo.column || afterDragColumnRowInfo.layout != beforeDragColumnRowInfo.layout ) )
+                {
+                    //dojo.debug( "layout (" + this.layoutId + ") endDragging (c)" );
+                    var moveLayoutContentManager = new jetspeed.widget.MoveLayoutContentManager( this.layoutId, afterDragColumnRowInfo.layout, afterDragColumnRowInfo.column, afterDragColumnRowInfo.row, this.pageEditorWidget );
+                    moveLayoutContentManager.getContent();
+                }
+            }
+        },
+
+        getContainingColumn: function()
+        {
+            return jetspeed.page.getColumnContainingNode( this.domNode );
+        },
+        getPageColumnIndex: function()
+        {
+            return jetspeed.page.getColumnIndexContainingNode( this.domNode );
         }
 	}
+);
+
+dojo.widget.defineWidget(  
+    "jetspeed.widget.LayoutEditPaneMoveHandle",
+	dojo.widget.HtmlWidget,
+{
+	// summary
+	//	Internal widget used by LayoutEditPane.
+
+	templateString: '<span class="layoutMoveContainer"><img src="${this.layoutImagesRoot}layout_move.png"></span>'
+
+});
+
+jetspeed.widget.LayoutDragMoveSource = function( /* jetspeed.widget.LayoutEditPane */ layoutEditPane )
+{
+    this.layoutEditPane = layoutEditPane;
+    this.beforeDragColumnRowInfo = null;
+    this.beforeDragColumn = layoutEditPane.containingColumn;
+    var dragNode = ( ( this.beforeDragColumn != null ) ? this.beforeDragColumn.domNode : null );
+	dojo.dnd.HtmlDragMoveSource.call( this, dragNode );
+};
+
+dojo.inherits( jetspeed.widget.LayoutDragMoveSource, dojo.dnd.HtmlDragMoveSource );
+
+dojo.lang.extend( jetspeed.widget.LayoutDragMoveSource, {
+	onDragStart: function()
+    {
+        this.beforeDragColumnRowInfo = null;
+        var dragMoveObj = null;
+        if ( this.dragObject != null )
+        {
+            if ( this.beforeDragColumn != null && this.beforeDragColumn.domNode != null )
+                this.beforeDragColumnRowInfo = jetspeed.page.getPortletCurrentColumnRow( this.beforeDragColumn.domNode );
+
+//jetspeed.page.getColumnContainingNode(  );
+
+            dragMoveObj = new jetspeed.widget.LayoutDragMoveObject( this.dragObject, this.type, this.layoutEditPane, this.beforeDragColumn );
+            if ( this.constrainToContainer )
+            {
+                dragMoveObj.constrainTo( this.constrainingContainer );
+            }
+        }
+		return dragMoveObj;
+	},
+    onDragEnd: function()
+    {
+    }
+});
+
+dojo.declare( "jetspeed.widget.LayoutDragMoveObject", jetspeed.widget.PortletWindowDragMoveObject, {
+    qualifyTargetColumn: function( /* jetspeed.om.Column */ column )
+    {
+        if ( column == null ) return false;
+        if ( this.disqualifiedColumnIndexes[ column.getPageColumnIndex() ] != null )
+            return false;
+        return true;
+    }
+    },    
+    function( node, type, /* jetspeed.widget.LayoutEditPane */ layoutEditPane, /* jetspeed.om.Column */ beforeDragColumn )
+    {
+        this.layoutEditPane = layoutEditPane;
+    
+        this.disqualifiedColumnIndexes = beforeDragColumn.getDescendantColumns();
+    }
 );

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/MultiRowHeaderTable.js Wed Feb 21 13:18:08 2007
@@ -12,6 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * author: Steve Milek
  */
 
 dojo.provide("jetspeed.widget.MultiRowHeaderTable");

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.css Wed Feb 21 13:18:08 2007
@@ -14,11 +14,6 @@
 limitations under the License.
 */
 
-.pageEditPane { }
-
-.pageEditPane .container { }
-
-
 .pageEditPane
 {
   width: 100%;
@@ -28,47 +23,43 @@
   clip: auto;
 }
 
-.pageEditPane label, 
-.pageEditPane input, 
+.pageEditPane .container { }
+
+.pageEditPane label,
+.pageEditPane input,
 .pageEditPane select 
 {
   font-size: 8pt;
   color: blue;
 }
 
-.pageEditPane input
-{
-  font-size: 8pt;
-}
+.pageEditPane .detail .pageEditorName { font-weight: bold; vertical-align: 50% }
 
-.pageEditPaneLeft
-{
-  display:inline;
-  float:left;
-}
+.pageEditPane .detail .rowContainer { margin-top: 7px; float: left; clear: both }
 
-.pageEditPaneRight
-{
-  display:inline;
-  float:right;
-  padding-right: 5px;
-}
+.pageEditPane .detail .layoutDecoratorContainer{ width: 80px; float: left; margin-right: 20px }
+.pageEditPane .detail .layoutDecorator { font-size: xx-small; width: 100% }
 
-.pageEditPane .detail .buttonContainer { margin-top: 5px }
+.pageEditPane .detail .portletDecoratorContainer{ width: 150px; float: left; margin-right: 20px }
+.pageEditPane .detail .portletDecorator { font-size: xx-small; width: 100% }
 
-.pageEditPane .detail .dojoButton { float: left; margin-right: 5px }
-.pageEditPane .detail .buttonContainerRight .dojoButton { float: right; margin-right: 5px }
+.pageEditPane .detail .pageEditorDetailContainer .dojoButton { float: left; margin-right: 5px }
+.pageEditPane .detail .buttonContainerRight { float: right }
+.pageEditPane .detail .buttonContainerRight .dojoButton { }
 
 .dojoDialog .container { padding: 0.5em; background: #fff; border: 2px solid #333; -moz-border-radius : 5px; }
 
-.dojoDialog .deletePageDialog { background: transparent; width: 20em; }
+.dojoDialog .deletePageDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
 .dojoDialog .deletePageDialog h2 { margin-top: 0; padding-top: 0; }
 .dojoDialog .deletePageDialog p { clear: both; }
 .dojoDialog .deletePageDialog .dojoButton { float: right; margin-right: 5px }
 
-.dojoDialog .createPageDialog { background: transparent; width: 20em; }
+.dojoDialog .createPageDialog { background: #eee; width: 20em; border: 1px solid #999; padding : 4px; -moz-border-radius: 5px; }
 .dojoDialog .createPageDialog h2 { margin-top: 0; padding-top: 0; }
 .dojoDialog .createPageDialog p { clear: both; }
 .dojoDialog .createPageDialog .dojoButton { float: right; margin-right: 5px }
 .dojoDialog .createPageDialog .createPageField { margin-bottom: 5px }
 
+	
+	
+	

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html?view=diff&rev=510225&r1=510224&r2=510225
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditPane.html Wed Feb 21 13:18:08 2007
@@ -1,14 +1,34 @@
 <div class="pageEditPane">
     <div dojoAttachPoint="containerNode" class="container"></div>
 
-    <fieldset>
-        <div dojoAttachPoint="detail" class="detail">
-            <div>Page Configuration</div>
-            <div class="buttonContainer">
-                <button dojoType="Button" dojoAttachEvent="onClick:deletePage">Delete Page</button>
-                <button dojoType="Button" dojoAttachEvent="onClick:createPage">Create New Page</button>
-                <div class="buttonContainerRight"><button dojoType="Button" dojoAttachEvent="onClick:addPortlet">Add Portlet</button></div>
-            </div>
+    <fieldset class="pageEditorPaneContainer" dojoAttachPoint="pageEditContainer">
+        <div class="detail">
+            <div><img src="${this.layoutImagesRoot}customizer.png">&nbsp;<span class="pageEditorName">Jetspeed Customizer</span></div>
+            <div class="rowContainer">
+               <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditLDContainer">
+                   <div class="layoutDecoratorContainer">
+                       <select class="layoutDecorator" name="layoutDecoratorSelect" dojoAttachPoint="layoutDecoratorSelect" dojoType="Select" autocomplete="false"></select>
+                   </div>
+                   <button dojoType="Button" dojoAttachPoint="changeLayoutDecoratorButton" dojoAttachEvent="onClick:changeLayoutDecorator"><img height="16" src="${this.layoutImagesRoot}button_ok.png">&nbsp;Change Layout Theme</button>
+               </fieldset>
+               <fieldset class="pageEditorDetailContainer" dojoAttachPoint="pageEditPDContainer">
+                   <div class="portletDecoratorContainer">
+                       <select class="portletDecorator" name="portletDecoratorSelect" dojoAttachPoint="portletDecoratorSelect" dojoType="Select" autocomplete="false"></select>
+                   </div>
+                   <button dojoType="Button" dojoAttachPoint="changePortletDecoratorButton" dojoAttachEvent="onClick:changePortletDecorator"><img height="16" src="${this.layoutImagesRoot}button_ok.png">&nbsp;Change Portlet Theme</button>
+               </fieldset>
+               <div class="buttonContainerRight">
+                   <table cellpadding="0" cellspacing="6" border="0">
+                   <!-- height on images is currently needed to size the button properly, especially when button is inside a table -->
+                   <tr align="right">
+                   <td><button dojoType="Button" dojoAttachEvent="onClick:createPage"><img height="16" src="${this.layoutImagesRoot}page_new.png">&nbsp;Create New Page&#133;</button></td>
+                   </tr>
+                   <tr align="right">
+                   <td><button dojoType="Button" dojoAttachEvent="onClick:deletePage"><img height="16" src="${this.layoutImagesRoot}page_delete.png">&nbsp;Delete Page&#133;</button></td>
+                   </tr>
+                   </table>
+               </div>
+           </div>
         </div>
     </fieldset>
 



---------------------------------------------------------------------
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