portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r477884 - in /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed: desktop/core.js widget/HtmlFloatingPane.css widget/PortletWindow.js windowthemes/blueocean/css/styles.css windowthemes/tigris/css/styles.css
Date Tue, 21 Nov 2006 21:05:55 GMT
Author: smilek
Date: Tue Nov 21 13:05:54 2006
New Revision: 477884

URL: http://svn.apache.org/viewvc?view=rev&rev=477884
Log:
improvements to page action support

Modified:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/blueocean/css/styles.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/tigris/css/styles.css

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=477884&r1=477883&r2=477884
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/desktop/core.js Tue Nov 21 13:05:54
2006
@@ -89,17 +89,21 @@
     PORTLET_PROP_DESKTOP_EXTENDED_PAIR_SEPARATOR: ";",
 
     // these constants for action names are defined because they have special meaning to
desktop (ie. this is not a list of all supported actions)
-    PORTLET_ACTION_NAME_MENU: "menu",
-    PORTLET_ACTION_NAME_MINIMIZE: "minimized",
-    PORTLET_ACTION_NAME_MAXIMIZE: "maximized",
-    PORTLET_ACTION_NAME_RESTORE: "normal",
-    PORTLET_ACTION_NAME_PRINT: "print",
-    PORTLET_ACTION_NAME_CLOSE: "close",
-
-    PORTLET_ACTION_NAME_DESKTOP_TILE: "tile",
-    PORTLET_ACTION_NAME_DESKTOP_UNTILE: "untile",
-    PORTLET_ACTION_NAME_DESKTOP_HEIGHT_EXPAND: "heightexpand",
-    PORTLET_ACTION_NAME_DESKTOP_HEIGHT_NORMAL: "heightnormal",
+    ACTION_NAME_MENU: "menu",
+    ACTION_NAME_MINIMIZE: "minimized",
+    ACTION_NAME_MAXIMIZE: "maximized",
+    ACTION_NAME_RESTORE: "normal",
+    ACTION_NAME_PRINT: "print",
+    ACTION_NAME_CLOSE: "close",
+    ACTION_NAME_EDIT: "edit",
+    ACTION_NAME_VIEW: "view",
+    ACTION_NAME_HELP: "help",
+    ACTION_NAME_ADDPORTLET: "addportlet",
+
+    ACTION_NAME_DESKTOP_TILE: "tile",
+    ACTION_NAME_DESKTOP_UNTILE: "untile",
+    ACTION_NAME_DESKTOP_HEIGHT_EXPAND: "heightexpand",
+    ACTION_NAME_DESKTOP_HEIGHT_NORMAL: "heightnormal",
 
     PORTLET_ACTION_TYPE_MODE: "mode",
     PORTLET_ACTION_TYPE_STATE: "state",
@@ -135,12 +139,12 @@
     portletSelectorWindowIcon: "text-x-script.png",
     portletSelectorBounds: { x: 20, y: 20, width: 400, height: 600 },
 
-    windowActionButtonOrder: [ jetspeed.id.PORTLET_ACTION_NAME_MENU, "edit", "view", "help",
jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE, jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE, jetspeed.id.PORTLET_ACTION_NAME_RESTORE
],
-    windowActionNotPortlet: [ jetspeed.id.PORTLET_ACTION_NAME_MENU, jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE,
jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE, jetspeed.id.PORTLET_ACTION_NAME_RESTORE ],
+    windowActionButtonOrder: [ jetspeed.id.ACTION_NAME_MENU, "edit", "view", "help", jetspeed.id.ACTION_NAME_MINIMIZE,
jetspeed.id.ACTION_NAME_MAXIMIZE, jetspeed.id.ACTION_NAME_RESTORE ],
+    windowActionNotPortlet: [ jetspeed.id.ACTION_NAME_MENU, jetspeed.id.ACTION_NAME_MINIMIZE,
jetspeed.id.ACTION_NAME_MAXIMIZE, jetspeed.id.ACTION_NAME_RESTORE ],
     windowActionButtonMax: 5,
     windowActionButtonHide: false,
     windowActionButtonTooltip: true,
-    windowActionMenuOrder: [ jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_EXPAND, jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_NORMAL,
jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_TILE, jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_UNTILE
],
+    windowActionMenuOrder: [ jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_EXPAND, jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_NORMAL,
jetspeed.id.ACTION_NAME_DESKTOP_TILE, jetspeed.id.ACTION_NAME_DESKTOP_UNTILE ],
 
     windowThemesAllowed: [ "tigris", "blueocean" ],
     windowTheme: "tigris",
@@ -207,10 +211,10 @@
             jetspeed.prefs.windowHeight = "200";
         
         var windowActionDesktop = {};
-        windowActionDesktop[ jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_EXPAND ] = true;
-        windowActionDesktop[ jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_NORMAL ] = true;
-        windowActionDesktop[ jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_TILE ] = true;
-        windowActionDesktop[ jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_UNTILE ] = true;
+        windowActionDesktop[ jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_EXPAND ] = true;
+        windowActionDesktop[ jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_NORMAL ] = true;
+        windowActionDesktop[ jetspeed.id.ACTION_NAME_DESKTOP_TILE ] = true;
+        windowActionDesktop[ jetspeed.id.ACTION_NAME_DESKTOP_UNTILE ] = true;
         jetspeed.prefs.windowActionDesktop = windowActionDesktop;
     }
     dojo.html.insertCssFile( jetspeed.ui.getDefaultFloatingPaneTemplateCss(), document, true
);
@@ -1134,6 +1138,8 @@
         // create layout model
         var portletsByPageColumn = this._layoutCreateModel( parsedRootLayoutFragment );
 
+        this.rootFragmentId = parsedRootLayoutFragment.id ;
+
         // create columns
         if ( jetspeed.prefs.windowTiling )
         {
@@ -1192,6 +1198,7 @@
         var children = pageElement.childNodes;
         var simpleValueLNames = new RegExp( "(name|path|title|short-title)" );
         var rootFragment = null;
+        var rootFragmentActions = {};
         for ( var i = 0 ; i < children.length ; i++ )
         {
             var child = children[i];
@@ -1211,7 +1218,13 @@
             {
                 this[ jetspeed.purifyIdentifier( childLName, "", "lo" ) ] = ( ( child &&
child.firstChild ) ? child.firstChild.nodeValue : null );
             }
+            else if ( childLName == "action" )
+            {
+                this._parsePSMLAction( child, rootFragmentActions ) ;
+            }
+            // BOZO:NOW: title handling - and does anything need to be done with metadata
(to get correct title?)
         }
+        this.actions = rootFragmentActions;
 
         if ( rootFragment == null )
         {
@@ -1306,22 +1319,26 @@
     {
         if ( actionsMap == null )
             actionsMap = {};
-        var actions = fragmentNode.getElementsByTagName( "action" );
-        for( var actionsIdx=0; actionsIdx < actions.length; actionsIdx++ )
+        var actionChildren = fragmentNode.getElementsByTagName( "action" );
+        for( var actionsIdx=0; actionsIdx < actionChildren.length; actionsIdx++ )
         {
-            var actionNode = actions[actionsIdx];
-            var actionName = actionNode.getAttribute( "id" );
-            if ( actionName != null )
-            {
-                var actionType = actionNode.getAttribute( "type" );
-                var actionLabel = actionNode.getAttribute( "name" );
-                var actionUrl = actionNode.getAttribute( "url" );
-                var actionAlt = actionNode.getAttribute( "alt" );
-                actionsMap[ actionName.toLowerCase() ] = { id: actionName, type: actionType,
label: actionLabel, url: actionUrl, alt: actionAlt };
-            }
+            var actionNode = actionChildren[actionsIdx];
+            this._parsePSMLAction( actionNode, actionsMap );
         }
         return actionsMap;
     },
+    _parsePSMLAction: function( actionNode, actionsMap )
+    {
+        var actionName = actionNode.getAttribute( "id" );
+        if ( actionName != null )
+        {
+            var actionType = actionNode.getAttribute( "type" );
+            var actionLabel = actionNode.getAttribute( "name" );
+            var actionUrl = actionNode.getAttribute( "url" );
+            var actionAlt = actionNode.getAttribute( "alt" );
+            actionsMap[ actionName.toLowerCase() ] = { id: actionName, type: actionType,
label: actionLabel, url: actionUrl, alt: actionAlt };
+        }
+    },
     _parsePSMLCurrentActionState: function( fragmentNode )
     {
         var nodes = fragmentNode.getElementsByTagName( "state" );
@@ -2065,7 +2082,17 @@
     renderPageControls: function()
     {
         var actionButtonNames = [];
-        actionButtonNames.push( "addportlet" );
+        if ( this.actions != null )
+        {
+            for ( var actionName in this.actions )
+            {
+                if ( actionName == jetspeed.id.ACTION_NAME_EDIT )
+                {
+                    actionButtonNames.push( jetspeed.id.ACTION_NAME_ADDPORTLET );
+                }
+                actionButtonNames.push( actionName );
+            }
+        }
 
         var pageControlsContainer = dojo.byId( jetspeed.id.PAGE_CONTROLS );
         if ( pageControlsContainer != null && actionButtonNames != null &&
actionButtonNames.length > 0 )
@@ -2103,19 +2130,29 @@
         if ( evt == null || evt.target == null ) return;
         this.pageActionProcess( evt.target.actionName, evt );
     },
-    pageActionProcess: function( /* String */ actionName, evt )
+    pageActionProcess: function( /* String */ actionName )
     {
         if ( actionName == null ) return;
-        if ( actionName == "addportlet" )
+        if ( actionName == jetspeed.id.ACTION_NAME_ADDPORTLET )
         {
-            var addportletPageUrl = jetspeed.url.path.SERVER + jetspeed.url.path.DESKTOP
+ "/system/customizer/selector.psml?" + this.getPath();
-            jetspeed.pageNavigate( addportletPageUrl ); 
+            var addportletPageUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.DESKTOP
+ "/system/customizer/selector.psml?jspage=" + this.getPath();
+            jetspeed.changeActionForPortlet( this.rootFragmentId, null, jetspeed.id.ACTION_NAME_EDIT,
new jetspeed.om.PageChangeActionContentListener( addportletPageUrl ) );
         }
         else
         {
-            alert( "pageActionProcess: " + actionName + " - not yet implemented" );
+            var action = this.getPageAction( actionName );
+            alert( "pageAction " + actionName + " : " + action );
+            if ( action == null ) return;
+            if ( action.url == null ) return;
+            var pageActionUrl = jetspeed.url.basePortalUrl() + jetspeed.url.path.DESKTOP
+ "/" + action.url;
+            jetspeed.pageNavigate( pageActionUrl );
         }
     },
+    getPageAction: function( name )
+    {
+        if ( this.actions == null ) return null;
+        return this.actions[ name ];
+    },
 
 
     // ... page url access
@@ -3402,6 +3439,27 @@
     notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl,
domainModelObject )
     {
         dojo.raise( "PortletChangeActionContentListener error [" + domainModelObject.toString()
+ "] url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
+    }
+});
+
+// ... jetspeed.om.PageChangeActionContentListener
+jetspeed.om.PageChangeActionContentListener = function( /* String */ pageActionUrl )
+{
+    this.pageActionUrl = pageActionUrl;
+};
+dojo.lang.extend( jetspeed.om.PageChangeActionContentListener,
+{
+    notifySuccess: function( /* XMLDocument */ data, /* String */ requestUrl, domainModelObject
)
+    {
+        if ( jetspeed.url.checkAjaxApiResponse( requestUrl, data, true, "page-change-action"
) )
+        {
+            if ( this.pageActionUrl != null && this.pageActionUrl.length > 0 )
+                jetspeed.pageNavigate( this.pageActionUrl ); 
+        }
+    },
+    notifyFailure: function( /* String */ type, /* Object */ error, /* String */ requestUrl,
domainModelObject )
+    {
+        dojo.raise( "PageChangeActionContentListener error [" + domainModelObject.toString()
+ "] url: " + requestUrl + " type: " + type + jetspeed.url.formatBindError( error ) );
     }
 });
 

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=477884&r1=477883&r2=477884
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/HtmlFloatingPane.css Tue
Nov 21 13:05:54 2006
@@ -89,10 +89,8 @@
 
 .portletWindowActionButton {
 	vertical-align: middle;
-	margin-right: 1px;
-
-	height: 22px;
-	width: 22px;
+    margin-top: 5px;
+	margin-right: 3px;
 
     cursor: default;
 
@@ -103,15 +101,14 @@
 }
 
 .portalPageActionButton {
-	/* vertical-align: middle; */
-	margin-right: 1px;
+    vertical-align: middle;
 
-	/* height: 22px; */
-	/* width: 22px; */
+    margin-top: 3px; 
+	margin-right: 3px;
 
     cursor: default;
 
-    /* float: right; */
+    float: right;
 
     background-repeat: no-repeat;
     background-position: center center;

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js?view=diff&rev=477884&r1=477883&r2=477884
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js Tue Nov
21 13:05:54 2006
@@ -402,7 +402,7 @@
 
 		// if display:none then state=minimized, otherwise state=normal
 		if(!this.isShowing()){
-			this.windowState = jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE;
+			this.windowState = jetspeed.id.ACTION_NAME_MINIMIZE;
 		}
 
 		// <img src=""> can hang IE!  better get rid of it
@@ -443,7 +443,7 @@
                             {
                                 includeAction = true;
                             }
-                            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_RESTORE
|| actionName == jetspeed.id.PORTLET_ACTION_NAME_MENU )
+                            else if ( actionName == jetspeed.id.ACTION_NAME_RESTORE || actionName
== jetspeed.id.ACTION_NAME_MENU )
                             {
                                 includeAction = true;
                             }
@@ -459,7 +459,7 @@
                         {
                             var actionName = this.windowThemeConfig.windowActionButtonOrder[
actionIdx ];
                             var includeAction = false;
-                            if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE ||
actionName == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE || actionName == jetspeed.id.PORTLET_ACTION_NAME_RESTORE
|| actionName == jetspeed.id.PORTLET_ACTION_NAME_MENU || jetspeed.prefs.windowActionDesktop[
actionName ] != null )
+                            if ( actionName == jetspeed.id.ACTION_NAME_MINIMIZE || actionName
== jetspeed.id.ACTION_NAME_MAXIMIZE || actionName == jetspeed.id.ACTION_NAME_RESTORE || actionName
== jetspeed.id.ACTION_NAME_MENU || jetspeed.prefs.windowActionDesktop[ actionName ] != null
)
                             {
                                 includeAction = true;
                             }
@@ -476,7 +476,7 @@
                         var mustRemoveBtns = btnActionNames.length - btnMax + 1;
                         for ( var i = 0 ; i < btnActionNames.length && removedBtns
< mustRemoveBtns ; i++ )
                         {
-                            if ( btnActionNames[i] != jetspeed.id.PORTLET_ACTION_NAME_MENU
)
+                            if ( btnActionNames[i] != jetspeed.id.ACTION_NAME_MENU )
                             {
                                 menuActionNames.push( btnActionNames[i] );
                                 btnActionNames[i] = null;
@@ -490,7 +490,7 @@
                         {
                             if ( this.windowThemeConfig.windowActionNoImage[ btnActionNames[
i ] ] != null )
                             {
-                                if ( btnActionNames[ i ] == jetspeed.id.PORTLET_ACTION_NAME_MENU
)
+                                if ( btnActionNames[ i ] == jetspeed.id.ACTION_NAME_MENU
)
                                 {
                                     menuActionNoImage = true;
                                 }
@@ -720,50 +720,50 @@
         if ( actionName == null ) return;
         if ( jetspeed.prefs.windowActionDesktop[ actionName ] != null )
         {
-            if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_TILE )
+            if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_TILE )
             {
                 this.makeTiled();
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_UNTILE )
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_UNTILE )
             {
                 this.makeUntiled();
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_EXPAND
)
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_EXPAND )
             {
                 this.makeHeightToFit( false );
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_NORMAL
)
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_NORMAL )
             {
                 this.makeHeightVariable( false );
             }
         }
-        else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MENU )
+        else if ( actionName == jetspeed.id.ACTION_NAME_MENU )
         {
             this.windowActionMenuOpen( evt );
         }
-        else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE )
+        else if ( actionName == jetspeed.id.ACTION_NAME_MINIMIZE )
         {   // make no associated content request - just notify server of change
             this.minimizeWindow();
             if ( this.portlet )
             {
-                jetspeed.changeActionForPortlet( this.portlet.getId(), jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE,
null );
+                jetspeed.changeActionForPortlet( this.portlet.getId(), jetspeed.id.ACTION_NAME_MINIMIZE,
null );
             }
             if ( ! this.portlet )
             {
                 this.windowActionButtonSync();
             }
         }
-        else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_RESTORE )
+        else if ( actionName == jetspeed.id.ACTION_NAME_RESTORE )
         {   // if minimized, make no associated content request - just notify server of change
             if ( this.portlet )
             {
-                if ( this.windowState == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+                if ( this.windowState == jetspeed.id.ACTION_NAME_MAXIMIZE )
                 {
                     this.portlet.renderAction( actionName );
                 }
                 else
                 {
-                    jetspeed.changeActionForPortlet( this.portlet.getId(), jetspeed.id.PORTLET_ACTION_NAME_RESTORE,
null );
+                    jetspeed.changeActionForPortlet( this.portlet.getId(), jetspeed.id.ACTION_NAME_RESTORE,
null );
                 }
             }
             this.restoreWindow();
@@ -772,7 +772,7 @@
                 this.windowActionButtonSync();
             }
         }
-        else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+        else if ( actionName == jetspeed.id.ACTION_NAME_MAXIMIZE )
         {
             if ( this.portlet )
             {
@@ -793,28 +793,28 @@
     _isWindowActionEnabled: function( actionName, currentPortletActionState, currentPortletActionMode
)
     {
         var enabled = false;
-        if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MENU )
+        if ( actionName == jetspeed.id.ACTION_NAME_MENU )
         {
             enabled = true;
         }
         else if ( jetspeed.prefs.windowActionDesktop[ actionName ] != null )
         {
-            if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_EXPAND )
+            if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_EXPAND )
             {
                 if ( ! this.windowHeightToFit )
                     enabled = true;
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_HEIGHT_NORMAL
)
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_HEIGHT_NORMAL )
             {
                 if ( this.windowHeightToFit )
                     enabled = true;
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_TILE &&
jetspeed.prefs.windowTiling )
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_TILE && jetspeed.prefs.windowTiling
)
             {
                 if ( ! this.windowPositionStatic )
                     enabled = true;
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_DESKTOP_UNTILE )
+            else if ( actionName == jetspeed.id.ACTION_NAME_DESKTOP_UNTILE )
             {
                 if ( this.windowPositionStatic )
                     enabled = true;
@@ -843,23 +843,23 @@
         }
         else
         {   // adjust visible action buttons - BOZO:NOW: this non-portlet case needs more
attention
-            if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+            if ( actionName == jetspeed.id.ACTION_NAME_MAXIMIZE )
             {
                 if ( actionName != this.windowState )
                 {
                     enabled = true;
                 }
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE )
+            else if ( actionName == jetspeed.id.ACTION_NAME_MINIMIZE )
             {
                 if ( actionName != this.windowState )
                 {
                     enabled = true;
                 }
             }
-            else if ( actionName == jetspeed.id.PORTLET_ACTION_NAME_RESTORE )
+            else if ( actionName == jetspeed.id.ACTION_NAME_RESTORE )
             {
-                if ( this.windowState == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE || this.windowState
== jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE )
+                if ( this.windowState == jetspeed.id.ACTION_NAME_MAXIMIZE || this.windowState
== jetspeed.id.ACTION_NAME_MINIMIZE )
                 {
                     enabled = true;
                 }
@@ -952,7 +952,7 @@
         this.portletInitialized = true;
 
         var initWindowState = this.getInitProperty( jetspeed.id.PORTLET_PROP_WINDOW_STATE
);
-        if ( initWindowState == jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE )
+        if ( initWindowState == jetspeed.id.ACTION_NAME_MINIMIZE )
         {
             this.minimizeWindow();
             this.windowActionButtonSync();
@@ -977,7 +977,7 @@
         this.resizeBar.style.display = "none";
         dojo.html.setContentBox( this.domNode, { height: dojo.html.getMarginBox( this.titleBar
).height } );
     
-        this.windowState = jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE;
+        this.windowState = jetspeed.id.ACTION_NAME_MINIMIZE;
     },
     maximizeWindow: function( evt )
     {
@@ -1011,7 +1011,7 @@
         //    dojo.html.getBorderBox( document.body ).height - yPos
 		//);
 
-		this.windowState = jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE;
+		this.windowState = jetspeed.id.ACTION_NAME_MAXIMIZE;
 	},
 	restoreWindow: function( evt )
     {
@@ -1022,7 +1022,7 @@
         }
 
         var lastPositionInfo = null;
-        if ( this.windowState == jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+        if ( this.windowState == jetspeed.id.ACTION_NAME_MAXIMIZE )
         {
             this.windowPositionStatic = ( this.lastWindowPositionStatic != null ? this.lastWindowPositionStatic
: false );
         }
@@ -1076,7 +1076,7 @@
         
 		this.resizeTo( lpiWidth, lpiHeight, true );
 
-		this.windowState = jetspeed.id.PORTLET_ACTION_NAME_RESTORE;  // "normal"
+		this.windowState = jetspeed.id.ACTION_NAME_RESTORE;  // "normal"
 	},
 
     _setLastPositionInfo: function( tiledStateIsChanging, changingToMaximized )
@@ -1106,7 +1106,7 @@
                 columnInfo.columnIndex = this.getPageColumnIndex();
                 this.lastTiledPositionInfo.columnInfo = columnInfo;
             }
-            if ( this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE &&
this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+            if ( this.windowState != jetspeed.id.ACTION_NAME_MINIMIZE && this.windowState
!= jetspeed.id.ACTION_NAME_MAXIMIZE )
             {
                 this.lastTiledPositionInfo.height = this.domNode.style.height;
             }
@@ -1114,7 +1114,7 @@
         }
         else
         {
-            if ( this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE &&
this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE )
+            if ( this.windowState != jetspeed.id.ACTION_NAME_MINIMIZE && this.windowState
!= jetspeed.id.ACTION_NAME_MAXIMIZE )
             {
                 var domNodeMarginBox = dojo.html.getMarginBox( this.domNode ) ;
                 this.lastUntiledPositionInfo =
@@ -1142,7 +1142,7 @@
     {
         var beforeZIndex = this.domNode.style.zIndex;
         jetspeed.widget.PortletWindow.superclass.bringToTop.call( this, evt );
-        if ( this.portlet && ! this.windowPositionStatic && this.windowState
!= jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE && this.isPortletWindowInitialized() )
+        if ( this.portlet && ! this.windowPositionStatic && this.windowState
!= jetspeed.id.ACTION_NAME_MAXIMIZE && this.isPortletWindowInitialized() )
         {
             this.portlet.submitChangedWindowState();
             //dojo.debug( "bringToTop [" + this.portlet.entityId + "] zIndex   before=" +
beforeZIndex + " after=" + this.domNode.style.zIndex );
@@ -1488,12 +1488,12 @@
         //dojo.debug( "PortletWindow.endSizing [" + this.portlet.entityId + "]" );
         dojo.event.disconnect( document.body, "onmouseup", this, "endSizing" );
         this.windowIsSizing = false;
-        if ( this.portlet && this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE
)
+        if ( this.portlet && this.windowState != jetspeed.id.ACTION_NAME_MAXIMIZE
)
             this.portlet.submitChangedWindowState();
     },
     endDragging: function()
     {
-        if ( this.portlet && this.windowState != jetspeed.id.PORTLET_ACTION_NAME_MAXIMIZE
)
+        if ( this.portlet && this.windowState != jetspeed.id.ACTION_NAME_MAXIMIZE
)
             this.portlet.submitChangedWindowState();
     },
 
@@ -1977,7 +1977,7 @@
 
         this.portletWindow.isDragging = false;
 
-        if ( this.portletWindow.windowState == jetspeed.id.PORTLET_ACTION_NAME_MINIMIZE )
+        if ( this.portletWindow.windowState == jetspeed.id.ACTION_NAME_MINIMIZE )
         {
             this.portletWindow._updateLastPositionInfoPositionOnly();
         }

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/blueocean/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/blueocean/css/styles.css?view=diff&rev=477884&r1=477883&r2=477884
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/blueocean/css/styles.css
(original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/blueocean/css/styles.css
Tue Nov 21 13:05:54 2006
@@ -29,6 +29,12 @@
 	color: #ffffff;
 }
 
+.blueocean .portletWindowActionButton {
+	height: 15px;
+	width: 15px;
+    margin-top: 4px;
+}
+
 /* minimize/maximize icons are specified by CSS only */
 .blueocean .dojoFloatingPaneMinimizeIcon,
 .blueocean .dojoFloatingPaneMaximizeIcon,

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/tigris/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/tigris/css/styles.css?view=diff&rev=477884&r1=477883&r2=477884
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/tigris/css/styles.css
(original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/windowthemes/tigris/css/styles.css
Tue Nov 21 13:05:54 2006
@@ -29,8 +29,8 @@
 }
 
 .tigris .portletWindowActionButton {
-	height: 22px;
-	width: 14px;
+	height: 11px;
+	width: 11px;
 }
 
 /* minimize/maximize icons are specified by CSS only */



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