portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r388368 - in /portals/jetspeed-2/trunk/src/webapp: desktop-themes/blue/ desktop-themes/blue/images/ javascript/desktop/widget/ javascript/desktop/windowicons/ javascript/desktop/windowthemes/theme1/ javascript/desktop/windowthemes/theme2/ j...
Date Fri, 24 Mar 2006 04:50:34 GMT
Author: taylor
Date: Thu Mar 23 20:50:31 2006
New Revision: 388368

URL: http://svn.apache.org/viewcvs?rev=388368&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-514

continued contributions on desktop, portlet themes from Steve Milek
render url support

Added:
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.css
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.html
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBar.css
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBarItemTemplate.html
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/PortalTaskBar.js
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/test-div-size.html
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-28.jpg
  (with props)
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-endcap-28.jpg
  (with props)
Removed:
    portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/images/Thumbs.db
Modified:
    portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp
    portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme1/theme1.css
    portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme2/theme2.css
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/jetspeed-ajax-api.js

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp?rev=388368&r1=388367&r2=388368&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp Thu Mar 23 20:50:31 2006
@@ -26,9 +26,9 @@
     var djConfig = {isDebug: true};
     djConfig.debugAtAllCosts = true;     <!-- needed for js debuggers (both venkman and
visual studio) -->
 
-	function doRender(url) 
+	function doRender(url,portletEntityId)
 	{
-		alert(url);
+        jetspeed.doRender(url,portletEntityId);
 	}
 	    
 </script>
@@ -42,11 +42,20 @@
     dojo.require("dojo.dnd.HtmlDragSource");
     dojo.require("dojo.event.*");    
     dojo.require("dojo.io");
+    dojo.require("dojo.widget.Manager");
     dojo.require("dojo.widget.TaskBar");
     dojo.require("dojo.widget.FloatingPane");
+    dojo.require("dojo.fx.*");
+
+    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
+
+    dojo.require("jetspeed.ui.widget.PortalTaskBar");
+
     dojo.hostenv.writeIncludes();    
 </script>
-
+<script language="JavaScript" type="text/javascript">
+    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
+</script>
 <!-- 
   Jetspeed Script
   -->
@@ -55,7 +64,7 @@
 <script language="JavaScript" type="text/javascript">
     function init()
     {
-        jetspeed.testLoadPageCreateWidgetPortlets()
+        jetspeed.initializeDesktop();
     }
     dojo.event.connect(dojo, "loaded", "init");
 </script>
@@ -122,10 +131,10 @@
 <body id="jetspeedDesktop">
 
 <!-- Start Taskbar -->
-<div dojoType="TaskBar" id="jetspeedTaskbar" style="background-color: #666; width: 100%;
bottom: 5px; height: 100px">
+<!-- <div dojoType="TaskBar" id="jetspeedTaskbar" style="background-color: #666; width:
100%; bottom: 5px; height: 100px"> -->
     <!-- <button onclick="jetspeed.testLoadPageCreateDivPortlets()">Portal (DIV)</button>
     <button onclick="jetspeed.testLoadPageCreateWidgetPortlets()">Portal (WIDGET)</button>
-->
-</div>
+<!-- </div> -->
 <!-- End Taskbar -->
 
 </body>

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm?rev=388368&r1=388367&r2=388368&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm Thu Mar 23 20:50:31 2006
@@ -21,9 +21,9 @@
     var djConfig = {isDebug: true};
     djConfig.debugAtAllCosts = true;   <!-- needed for js debuggers (both venkman and
visual studio) -->
 
-	    function doRender(url) 
+	    function doRender(url,portletEntityId) 
 	    {
-        		alert(url);
+            jetspeed.doRender(url,portletEntityId);
     	}
 
 </script>
@@ -37,11 +37,20 @@
     dojo.require("dojo.dnd.HtmlDragSource");
     dojo.require("dojo.event.*");    
     dojo.require("dojo.io");
+    dojo.require("dojo.widget.Manager");
     dojo.require("dojo.widget.TaskBar");
  	dojo.require("dojo.widget.FloatingPane");
-    dojo.hostenv.writeIncludes();    
-</script>
+    dojo.require("dojo.fx.*");
+
+    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
+
+    dojo.require("jetspeed.ui.widget.PortalTaskBar");
 
+    dojo.hostenv.writeIncludes();
+</script>
+<script language="JavaScript" type="text/javascript">
+    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
+</script>
 <!-- 
   Jetspeed Script
   -->
@@ -50,7 +59,7 @@
 <script language="JavaScript" type="text/javascript">
     function init()
     {
-        jetspeed.testLoadPageCreateWidgetPortlets()
+        jetspeed.initializeDesktop();
     }
     dojo.event.connect(dojo, "loaded", "init");
 </script>
@@ -117,10 +126,10 @@
 <body id="jetspeedDesktop">
 
 <!-- Start Taskbar -->
-<div dojoType="TaskBar" id="jetspeedTaskbar" style="background-color: #666; width: 100%;
bottom: 5px; height: 100px">
+<!-- <div dojoType="TaskBar" id="jetspeedTaskbar" style="background-color: #666; width:
100%; bottom: 5px; height: 100px"> -->
     <!-- <button onclick="jetspeed.testLoadPageCreateDivPortlets()">Portal (DIV)</button>
     <button onclick="jetspeed.testLoadPageCreateWidgetPortlets()">Portal (WIDGET)</button>
-->
-</div>
+<!-- </div> -->
 <!-- End Taskbar -->
 
 </body>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.css
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.css?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.css Thu
Mar 23 20:50:31 2006
@@ -0,0 +1,101 @@
+
+.dojoFloatingPaneInDrag { 
+    border: 3px solid;
+
+}
+
+.dojoFloatingPane {
+	/* essential css */
+	position: absolute;
+	overflow: hidden;		/* so drop shadow is displayed */
+	z-index: 5;
+	-moz-box-sizing: border-box;
+	-khtml-box-sizing: border-box;
+	
+	/* styling css */
+	border: 1px solid;
+	border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
+	background-color: ThreeDFace;
+}
+
+.dojoFloatingPaneTitleBar {
+	/* essential css */
+	z-index: 2;
+	position: absolute;
+	top: 0px;
+	left: 0px;
+	width: 100%;
+    overflow: hidden;
+
+	/* styling css */
+	vertical-align: middle;
+	height: 22px;
+	color: CaptionText;
+	font: small-caption;
+	background-color: #7596c6;
+	cursor: default;
+}
+.dojoFloatingPaneTitleText {
+	padding: 2px 4px 2px 2px;
+    float:left;
+}
+
+.dojoTitleBarIcon { 
+    float: left;
+    vertical-align: middle;
+}
+
+/* minimize/maximize icons are specified by CSS only */
+.dojoFloatingPaneMinimizeIcon,
+.dojoFloatingPaneMaximizeIcon,
+.dojoFloatingPaneRestoreIcon,
+.dojoFloatingPaneCloseIcon {
+	vertical-align: middle;
+	height: 22px;
+	width: 22px;
+	float: right;
+}
+.dojoFloatingPaneMinimizeIcon {
+	background-image: url(images/floatingPaneMinimize.gif);
+}
+.dojoFloatingPaneMaximizeIcon {
+	background-image: url(images/floatingPaneMaximize.gif);
+}
+.dojoFloatingPaneRestoreIcon {
+	background-image: url(images/floatingPaneRestore.gif);
+}
+.dojoFloatingPaneCloseIcon {
+	background-image: url(images/floatingPaneClose.gif);
+}
+
+/* bar at bottom of window that holds resize handle */
+.dojoFloatingPaneResizebar {
+	/* essential css */
+	position: absolute;
+	left: 0;
+	bottom: 0;
+	width: 100%;
+	height: 13px;
+	z-index: 2;
+	
+	/* styling css */
+	background-color: ThreeDFace;
+}
+
+/* the part that holds the actual content of the floating pane (text or whatever) */
+.dojoFloatingPaneClient {
+	/* essential css */
+	position: relative;
+	width: 100%;
+	height: 100%;
+	-moz-box-sizing: border-box;
+	-khtml-box-sizing: border-box;
+	z-index: 2;
+	overflow: auto;
+	
+	/* styling css */
+	background-color: ThreeDFace;
+	padding: 8px;
+	font-family: Verdana, Helvetica, Garamond, sans-serif;
+	font-size: 12px;
+}

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.html
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.html?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlFloatingPane.html Thu
Mar 23 20:50:31 2006
@@ -0,0 +1,21 @@
+<div id="${this.widgetId}" class="dojoFloatingPane" datasrc="${this.blee}" dojoAttachEvent="onMouseDown">
+	<div dojoAttachPoint="titleBar" class="dojoFloatingPaneTitleBar" style="display:none"
dojoAttachEvent="onMouseOver:titleMouseOver;onMouseOut:titleMouseOut">
+        <img dojoAttachPoint="titleBarIcon" src="${this.iconSrc}" class="dojoTitleBarIcon">
+		<div dojoAttachPoint="closeAction" dojoAttachEvent="onClick:closeWindow;onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+   	  		class="dojoFloatingPaneCloseIcon"></div>
+		<div dojoAttachPoint="restoreAction" dojoAttachEvent="onClick:restoreWindow;onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+   	  		class="dojoFloatingPaneRestoreIcon"></div>
+		<div dojoAttachPoint="maximizeAction" dojoAttachEvent="onClick:maximizeWindow;onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+   	  		class="dojoFloatingPaneMaximizeIcon"></div>
+		<div dojoAttachPoint="minimizeAction" dojoAttachEvent="onClick:minimizeWindow;onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+   	  		class="dojoFloatingPaneMinimizeIcon"></div>
+	  	<div dojoAttachPoint="titleBarText" class="dojoFloatingPaneTitleText">${this.title}</div>
+	</div>
+
+	<div dojoAttachPoint="containerNode" class="dojoFloatingPaneClient">
+	</div>
+
+	<div dojoAttachPoint="resizeBar" class="dojoFloatingPaneResizebar">
+	</div>
+
+</div>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBar.css
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBar.css?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBar.css (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBar.css Thu Mar
23 20:50:31 2006
@@ -0,0 +1,73 @@
+
+.classA {
+    background-image: url(../windowicons/blue-metalic-28.jpg);
+    background-repeat: no-repeat;
+	border: outset 2px;
+	display: inline;
+    /*position: fixed;*/
+    /*overflow: visible;*/
+	margin-right: 5px;
+	cursor: pointer;
+	height: 28px;
+	width: 200px;
+	font-size: 8pt;
+	white-space: nowrap;
+	text-align: center;
+}
+.dojoTaskBarItem {
+    background-image: url(../windowicons/blue-metalic-28.jpg);
+    background-repeat: no-repeat;
+	height: 28px;
+	/*width: 200px;*/
+    overflow: hidden;
+    padding-right: 8px;
+	font-size: 9pt;
+    cursor: pointer;
+}
+.portalTaskBarItemEndCap {
+    background-image: url(../windowicons/blue-metalic-endcap-28.jpg);
+    background-repeat: no-repeat;
+    height: 28px;
+	width: 4px;
+}
+.portalTaskBarItemTable {
+    display: inline;
+    padding: 0px;
+    margin: 0px 2px 6px 2px;
+    /*border-spacing: 0;*/  /* could get rid of cellspacing attribute if IE would support
CSS2 better */
+}
+
+
+
+/*
+.dojoTaskBarItem {
+    background-image: url(../windoXXXXXXXXXX/blue-metalic-28.jpg);
+    background-repeat: no-repeat;
+	border: outset 2px;
+	display: inline;
+	margin-right: 5px;
+	cursor: pointer;
+	height: 28px;
+	width: 200px;
+	font-size: 8pt;
+	white-space: nowrap;
+	text-align: center;
+}
+*/
+
+.dojoTaskBarItem img {
+	vertical-align: top;
+	margin-right: 5px;
+	margin-left: 5px;
+    margin-top: 1px;
+    padding-top: 0px;
+	height: 16px;
+	width: 16px;
+}
+
+.dojoTaskBarItem a {
+	 color: black;
+	text-decoration: none;
+}
+
+

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBarItemTemplate.html
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBarItemTemplate.html?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBarItemTemplate.html
(added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/HtmlTaskBarItemTemplate.html
Thu Mar 23 20:50:31 2006
@@ -0,0 +1 @@
+<table class="portalTaskBarItemTable" cellspacing="0"><tr dojoAttachEvent="onClick"><td
class="dojoTaskBarItem"></td><td class="portalTaskBarItemEndCap"></td></tr></table>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/PortalTaskBar.js
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/PortalTaskBar.js?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/PortalTaskBar.js (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/PortalTaskBar.js Thu Mar
23 20:50:31 2006
@@ -0,0 +1,69 @@
+
+dojo.provide("jetspeed.ui.widget.PortalTaskBar");
+dojo.provide("jetspeed.ui.widget.PortalTaskBarItem");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.FloatingPane");
+
+jetspeed.ui.widget.PortalTaskBar = function()
+{    
+    this.widgetType = "PortalTaskBar";
+
+    if ( ! this.taskbarProps )
+        this.taskbarProps = {} ;
+
+    dojo.widget.html.FloatingPane.call(this);
+
+    dojo.widget.TaskBar.call(this.taskbarProps);
+
+    this.titleBarDisplay = "none";
+}
+
+dojo.inherits(jetspeed.ui.widget.PortalTaskBar, dojo.widget.html.FloatingPane);
+
+dojo.lang.extend(jetspeed.ui.widget.PortalTaskBar, {
+    addChild: function(child)
+                {
+                    var tbiProps = {windowId: child.widgetId, caption: child.title, iconSrc:
child.iconSrc, widgetId: child.widgetId + "_tbi" } ;
+                    dojo.lang.mixin(tbiProps, this.taskbarProps) ;
+                    var tbi = dojo.widget.createWidget("PortalTaskBarItem", tbiProps);
+                    jetspeed.ui.widget.PortalTaskBar.superclass.addChild.call(this,tbi);
+                    //dojo.debug( "PortalTaskBarItem  widgetId=" + tbi.widgetId + " domNode.id="
+ tbi.domNode.id + " child.domNode.id=" + child.widgetId ) ;
+                }
+});
+
+jetspeed.ui.widget.PortalTaskBarItem = function(){
+    
+	dojo.widget.html.TaskBarItem(this);
+    
+    this.widgetType = "PortalTaskBarItem";
+}
+dojo.inherits(jetspeed.ui.widget.PortalTaskBarItem, dojo.widget.html.TaskBarItem);
+
+dojo.lang.extend(jetspeed.ui.widget.PortalTaskBarItem, {
+    fillInTemplate: function() {
+        var tdNode = this.domNode.getElementsByTagName( "td" )[0];
+		if ( this.iconSrc != '' ) {
+			var img = document.createElement("img");
+			img.src = this.iconSrc;
+			tdNode.appendChild(img);
+		}
+		tdNode.appendChild(document.createTextNode(this.caption));
+		dojo.html.disableSelection(this.domNode);
+	},
+    onClick: function() {
+        var showWindow = this.window;
+        var btnNode = this.domNode;
+        
+        // simulate button click
+        dojo.fx.html.fade( this.domNode, 100, 1, 0.5, function() { dojo.fx.html.fade( btnNode,
100, 0.5, 1 ); } );
+        
+        if ( this.window.windowState == "minimized" )
+            dojo.fx.html.explode( this.domNode, this.window.domNode, 300, function() { showWindow.show();
} ) ;
+        else
+            this.window.show();
+	}
+});
+
+dojo.widget.tags.addParseTreeHandler("dojo:portaltaskbar");
+dojo.widget.tags.addParseTreeHandler("dojo:portaltaskbaritem");

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/test-div-size.html
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/test-div-size.html?rev=388368&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/test-div-size.html (added)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/widget/test-div-size.html Thu Mar
23 20:50:31 2006
@@ -0,0 +1,58 @@
+<html>
+<head>
+
+<title>Simple Div Demo</title>
+
+<style>
+.classA {
+    background-image: url(../windowicons/blue-metalic-28.jpg);
+    background-repeat: no-repeat;
+	border: outset 2px;
+	display: inline;
+    /*position: fixed;*/
+    /*overflow: visible;*/
+	margin-right: 5px;
+	cursor: pointer;
+	height: 28px;
+	width: 200px;
+	font-size: 8pt;
+	white-space: nowrap;
+	text-align: center;
+}
+.classSize {
+    background-image: url(../windowicons/blue-metalic-28.jpg);
+    background-repeat: no-repeat;
+	height: 28px;
+	width: 200px;
+	font-size: 10pt;
+}
+.classCap {
+    background-image: url(../windowicons/blue-metalic-endcap-28.jpg);
+    background-repeat: no-repeat;
+    height: 28px;
+	width: 4px;
+}
+.classInline {
+    display: inline;
+    border-spacing: 0;
+}
+</style>
+
+</head>
+<body>
+      <!--
+        <span class="classInline1"><table class="classInline"><tr><td
class="classSize">Blee</td></tr></table></span>
+        <span class="classInline1"><table class="classInline"><tr><td
class="classSize">Blah</td></tr></table></span>
+        <span class="classInline1"><table class="classInline"><tr><td
class="classSize">Fred</td></tr></table></span>
+        <span class="classInline1"><table class="classInline"><tr><td
class="classSize">Jerry</td></tr></table></span>
+        <span class="classInline1"><table class="classInline"><tr><td
class="classSize">Bob</td></tr></table></span>
+        -->
+
+        <table class="classInline"><tr><td class="classSize">Blee</td><td
class="classCap"></td></tr></table>
+        <table class="classInline"><tr><td class="classSize">Blah</td><td
class="classCap"></td></tr></table>
+        <table class="classInline"><tr><td class="classSize">Fred</td><td
class="classCap"></td></tr></table>
+        <table class="classInline"><tr><td class="classSize">Jerry</td><td
class="classCap"></td></tr></table>
+        <table class="classInline"><tr><td class="classSize">Bob</td><td
class="classCap"></td></tr></table>
+
+</body>
+</html>

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-28.jpg
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-28.jpg?rev=388368&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-28.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-endcap-28.jpg
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-endcap-28.jpg?rev=388368&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowicons/blue-metalic-endcap-28.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme1/theme1.css
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme1/theme1.css?rev=388368&r1=388367&r2=388368&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme1/theme1.css
(original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme1/theme1.css
Thu Mar 23 20:50:31 2006
@@ -35,3 +35,10 @@
     background-repeat: no-repeat;
     background-position: center center;
 }
+
+
+.theme1 .dojoTitleBarIcon {
+    margin-top: 2px;
+    margin-left: 2px;
+    margin-right: 3px;
+}

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme2/theme2.css
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme2/theme2.css?rev=388368&r1=388367&r2=388368&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme2/theme2.css
(original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/desktop/windowthemes/theme2/theme2.css
Thu Mar 23 20:50:31 2006
@@ -35,3 +35,9 @@
     background-repeat: no-repeat;
     background-position: center center;
 }
+
+.theme2 .dojoTitleBarIcon {
+    margin-top: 2px;
+    margin-left: 2px;
+    margin-right: 3px;
+}

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/jetspeed-ajax-api.js
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/jetspeed-ajax-api.js?rev=388368&r1=388367&r2=388368&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/jetspeed-ajax-api.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/jetspeed-ajax-api.js Thu Mar 23
20:50:31 2006
@@ -20,21 +20,26 @@
  */
 
 // ... base objects
-jetspeed = {} ;
-jetspeed.om = {} ;
-jetspeed.ui = {} ;
+if ( ! window.jetspeed )
+    jetspeed = {} ;
+if ( ! jetspeed.om )
+    jetspeed.om = {} ;
+if ( ! jetspeed.ui )
+    jetspeed.ui = {} ;
+if ( ! jetspeed.ui.widget )
+    jetspeed.ui.widget = {} ;
 
 jetspeed.version = 
 {
     major: 2, minor: 1, patch: 0, flag: "dev",
     revision: "",
-	toString: function() 
-	{
-		with (jetspeed.version) 
-		{
-			return major + "." + minor + "." + patch + flag + " (" + revision + ")";
-		}
-	}
+    toString: function() 
+    {
+        with (jetspeed.version) 
+        {
+            return major + "." + minor + "." + patch + flag + " (" + revision + ")";
+        }
+    }
 };
 
 jetspeed.basePortalUrl = function()
@@ -47,33 +52,53 @@
     return jetspeed.basePortalUrl() + "/jetspeed" ;
 }
 
+jetspeed.doRender = function(url,portletEntityId)
+{
+    var targetPortlet = jetspeed.page.getPortlet( portletEntityId );
+    if ( targetPortlet )
+    {
+        //dojo.debug( "render " + portletEntityId + " url: " + url );
+        targetPortlet.retrievePortletContent(null,url);
+    }
+}
+
+jetspeed.page = null ;   // BOZO: is this it? one page at a time?
+jetspeed.initializeDesktop = function()
+{
+    jetspeed.loadPage();
+}
+jetspeed.loadPage = function()
+{
+    jetspeed.testLoadPageCreateWidgetPortlets();
+}
 jetspeed.testLoadPageCreateWidgetPortlets = function()
 {
-    var page = new jetspeed.om.Page() ;
-    page.retrievePsml( new jetspeed.om.PageContentListenerCreateWidget() ) ;
+    jetspeed.page = new jetspeed.om.Page() ;
+    jetspeed.currentTaskbar = new jetspeed.ui.PortalTaskBar() ;
+    jetspeed.page.retrievePsml( new jetspeed.om.PageContentListenerCreateWidget() ) ;
 }
 
 jetspeed.testLoadPageCreateDivPortlets = function()
 {
-    var page = new jetspeed.om.Page() ;
-    page.retrievePsml( new jetspeed.om.PageContentListenerCreateDiv() ) ;
+    jetspeed.currentPage = new jetspeed.om.Page() ;
+    jetspeed.page.retrievePsml( new jetspeed.om.PageContentListenerCreateDiv() ) ;
 }
+//jetspeed.testPortletEntityIdFilter = [ "dp-18" ];   // note: uncomment to filter the displayed
portlets for testing
 
 jetspeed.testCreatePortletWindows = function( /* Portlet[] */ portlets, portletWindowFactory
)
 {
-    //if ( ! dojo.lang.isArray(portlets) && ! dojo.lang.isObject(portlets) )
-    //{
-    //    if ( portlets && dojo.lang.isSubOf(portlets, jetspeed.om.Portlet))
-    //        portlets = [portlets];
-    //    else
-    //        portlets = null;
-    //}
     if ( portlets )
     {
         for (var portletIndex in portlets)
         {
             var portlet = portlets[portletIndex];
-            portlet.createPortletWindow(portletWindowFactory);
+            if ( jetspeed.testPortletEntityIdFilter )
+            {
+                if (! dojo.lang.inArray(jetspeed.testPortletEntityIdFilter, portletIndex))
+                    portlet = null;
+            }
+            if (portlet)
+                portlet.createPortletWindow(portletWindowFactory);
         }
     }
 }
@@ -208,6 +233,17 @@
         }
     },
 
+    getPortletArray: function()
+    {
+        if (! this.portlets) return null ;
+        var portletArray = [];
+        for (var portletIndex in this.portlets)
+        {
+            var portlet = this.portlets[portletIndex];
+            portletArray.push(portlet);
+        }
+        return portletArray;
+    },
     getPortlets: function()
     {
         if (this.portlets)
@@ -287,15 +323,15 @@
     this.title = portletTitle;
     this.properties = {};
 }
-jetspeed.om.Portlet.prototype =   /* defining prototypes like this is not cool if the object
uses dojo.inherits (this would replace pt)*/
-{                                 /* dojo.lang.extend would allow this syntax instead of
[<type>.prototype.<propname> = <propval>]* */
+jetspeed.om.Portlet.prototype =   /* defining prototypes like this is not cool if the object
uses dojo.inherits (this would replace pt)  */
+{                                 /* dojo.lang.extend would allow this syntax instead of
[<type>.prototype.<propname> = <propval>]*      */
     name: null,
     entityId: null,
     title: null,
     
     windowFactory: null,
     windowObj: null,
-    
+
     createPortletWindow: function(portletWindowFactory, portletContentListener)
     {
         if ( portletWindowFactory == null )
@@ -307,26 +343,32 @@
         this.retrievePortletContent(portletContentListener) ;
     },
 
-    getPortletUrl: function()
+    getPortletUrl: function(renderUrl)
     {
-        return jetspeed.basePortalUrl() + "/jetspeed/portlet?entity=" + this.entityId + "&portlet="
+ this.name + "&encoder=desktop";
+        var queryString = "?entity=" + this.entityId + "&portlet=" + this.name + "&encoder=desktop";
+        if (renderUrl)
+            return renderUrl + queryString;
+        return jetspeed.basePortalUrl() + "/jetspeed/portlet" + queryString;
     },
 
-    retrievePortletContent: function(portletContentListener)
+    retrievePortletContent: function(portletContentListener,renderUrl)
     {
         if ( portletContentListener == null )
             portletContentListener = new jetspeed.om.PortletContentListener() ;
-
         var portlet = this ;
         dojo.io.bind({
-            url: portlet.getPortletUrl(),
+            url: portlet.getPortletUrl(renderUrl),
             load: function(type, data, evt)
             {
+                //dojo.debug( "loaded content for url: " + this.url );
                 //dojo.debug( "r e t r i e v e P o r t l e t C o n t e n t . l o a d" ) ;
                 //dojo.debug( "  type:" );
                 //dojo.debugShallow( type ) ;
                 //dojo.debug( "  evt:" );
                 //dojo.debugShallow( evt ) ;
+
+                //if ( portlet.entityId == "dp-18" || portlet.entityId == "dp-7" )
+                //    dojo.debug( "content: " + data);
                 if ( portletContentListener && dojo.lang.isFunction( portletContentListener.notifySuccess
) )
                 {
                     portletContentListener.notifySuccess(data, portlet);
@@ -370,6 +412,32 @@
     }
 }
 
+// ... jetspeed.ui.PortalTaskBar
+jetspeed.ui.PortalTaskBar = function()
+{
+    var tbProps = {};
+    tbProps.templateCssPath = new dojo.uri.Uri(jetspeed.basePortalDesktopUrl(), "jetspeed/javascript/desktop/widget/HtmlTaskBar.css")
;
+    tbProps.templatePath = new dojo.uri.Uri(jetspeed.basePortalDesktopUrl(), "jetspeed/javascript/desktop/widget/HtmlTaskBarItemTemplate.html")
;
+    // BOZO: improve this junk ^^^ 
+
+    this.taskbarProps = tbProps ;
+    this.widgetId = "jetspeedTaskbar";
+
+    this.createTaskBar();
+}
+jetspeed.ui.PortalTaskBar.prototype.createTaskBar = function()
+{
+    var nWidget = dojo.widget.createWidget('PortalTaskBar', this);
+    nWidget.domNode.id = "jetspeedTaskbar";  // BOZO: must set the id here - it gets defensively
cleared by dojo
+    nWidget.domNode.style.cssText = "background-color: #666; width: 100%; bottom: 5px; height:
100px";
+
+    var addToElmt = document.getElementById("jetspeedDesktop");
+    addToElmt.appendChild(nWidget.domNode);
+    
+    this.taskbarWidget = nWidget;
+}
+
+
 // ... jetspeed.ui.PortletWidgetWindow
 jetspeed.ui.PortletWidgetWindow = function(/* Portlet */ portletObj)
 {
@@ -399,8 +467,7 @@
     else
         this.iconSrc =  new dojo.uri.Uri(jetspeed.basePortalDesktopUrl(), "jetspeed/javascript/desktop/windowicons/document.gif"
) ;
 
-    dojo.debug("PortletWidgetWindow  widgetId=" + this.widgetId + "  windowtheme=" + windowtheme
+ "  templateCssPath=" + this.templateCssPath);
-
+    //dojo.debug("PortletWidgetWindow  widgetId=" + this.widgetId + "  windowtheme=" + windowtheme
+ "  templateCssPath=" + this.templateCssPath);
 
     this.createWindow();
 }
@@ -412,28 +479,95 @@
 jetspeed.ui.PortletWidgetWindow.prototype.displayMaximizeAction = true;
 jetspeed.ui.PortletWidgetWindow.prototype.taskBarId = "jetspeedTaskbar";
 jetspeed.ui.PortletWidgetWindow.prototype.nextIndex = 1;
+jetspeed.ui.PortletWidgetWindow.prototype.titleMouseIn = 0;
+jetspeed.ui.PortletWidgetWindow.prototype.titleLit = false;
 jetspeed.ui.PortletWidgetWindow.prototype.titleMouseOver = function(evt)
 {
-    this.titleLight( this ) ;  // NOTE: setup in template HtmlFloatingPane.html: dojoAttachEvent="onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+    var self = this ;
+    this.titleMouseIn++ ;
+    if ( this.titleMouseIn == 1 )
+    {
+        window.setTimeout( function() { if ( self.titleMouseIn > 0 ) { self.titleLight(
self ); self.titleMouseIn = 0; } }, 270 ) ;
+        // NOTE: setup in template HtmlFloatingPane.html: dojoAttachEvent="onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+    }
+}
+jetspeed.ui.PortletWidgetWindow.prototype.titleButtonInclude = function(condition, requiredResult,
button, included)
+{
+    if ( button == null ) return included ;
+    if (dojo.lang.isFunction(condition))
+    {
+        if (condition.call(this) == requiredResult)
+            included.push(button);
+    }
+    else if ( condition == requiredResult )
+    {
+        included.push(button);
+    }
+    return included;
+}
+jetspeed.ui.PortletWidgetWindow.prototype.minimizeWindow = function(evt)
+{
+    var tbiWidget = dojo.widget.byId(this.widgetId + "_tbi");
+
+    //var left = dojo.style.totalOffsetLeft(tbiWidget.domNode);
+    //var top = dojo.style.totalOffsetTop(tbiWidget.domNode) - 100;
+    //dojo.debug( "minimizeWindow: " + this.domNode.id + "  move-to-left: " + left + " move-to-top:
" + top ) ;
+    //var widgetToHide = this ;
+    //dojo.fx.html.slideTo( this.domNode, 300, [ left, top ], function() { dojo.fx.html.wipeOut(widgetToHide.domNode,
400); } ) ;
+    if ( tbiWidget && tbiWidget.domNode )
+        dojo.fx.html.implode( this.domNode, tbiWidget.domNode, 300 ) ;
+    else
+        this.hide();
+    
+    this.windowState = "minimized";
 }
 jetspeed.ui.PortletWidgetWindow.prototype.titleLight = function(fpWidget)
 {
-    fpWidget.minimizeAction.style.display = (fpWidget.displayMinimizeAction ? "" : "none");
-    fpWidget.maximizeAction.style.display = (fpWidget.displayMaximizeAction && fpWidget.windowState!="maximized"
? "" : "none");
-    fpWidget.restoreAction.style.display = (fpWidget.displayMaximizeAction && fpWidget.windowState!="normal"
? "" : "none");
-    fpWidget.closeAction.style.display = (fpWidget.displayCloseAction ? "" : "none");
+    var mightBeEnlightened = [] ;
+    this.titleButtonInclude(fpWidget.displayMinimizeAction, true, fpWidget.minimizeAction,
mightBeEnlightened);
+    this.titleButtonInclude(fpWidget.displayMaximizeAction, true, fpWidget.maximizeAction,
mightBeEnlightened);
+    this.titleButtonInclude(fpWidget.displayRestoreAction, true, fpWidget.restoreAction,
mightBeEnlightened);
+    this.titleButtonInclude(fpWidget.displayCloseAction, true, fpWidget.closeAction, mightBeEnlightened);
+    var toBeEnlightened = [] ;
+    for ( var i = 0 ; i < mightBeEnlightened.length ; i++ )
+    {
+        var btn = mightBeEnlightened[i];
+        if (btn.style.display == "none")
+            toBeEnlightened.push(btn);
+    }
+    jetspeed.ui.fadeIn(toBeEnlightened, 325, "");
+    fpWidget.titleLit = true ;
+}
+jetspeed.ui.PortletWidgetWindow.prototype.titleDim = function(fpWidget, immediateForce)
+{
+    var mightBeExtinguished = [ fpWidget.restoreAction, fpWidget.maximizeAction, fpWidget.minimizeAction,
fpWidget.closeAction ] ;
+    var toBeExtinguished = [] ;
+    for ( var i = 0 ; i < mightBeExtinguished.length ; i++ )
+    {
+        var btn = mightBeExtinguished[i];
+        if (immediateForce)
+            btn.style.display = "none" ;
+        else if (btn.style.display != "none")
+            toBeExtinguished.push(btn);
+    }
+    jetspeed.ui.fadeOut(toBeExtinguished, 280);
+    fpWidget.titleLit = false ;
 };
 jetspeed.ui.PortletWidgetWindow.prototype.titleMouseOut = function(evt)
 {
-    this.titleDim( this ) ;   // NOTE: setup in template HtmlFloatingPane.html: dojoAttachEvent="onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+    var self = this ;
+    var nTitleMouseIn = this.titleMouseIn ;
+    if ( nTitleMouseIn > 0 )
+    {
+        nTitleMouseIn = Math.max( 0, ( nTitleMouseIn - 1 ) );
+        this.titleMouseIn = nTitleMouseIn ;
+    }
+    if ( nTitleMouseIn == 0 && this.titleLit )
+    {
+        window.setTimeout( function() { if ( self.titleMouseIn == 0 ) { self.titleDim( self
); } }, 200 ) ;
+        // NOTE: setup in template HtmlFloatingPane.html: dojoAttachEvent="onMouseOver:titleMouseOver;onMouseOut:titleMouseOut"
+    }
 }
-jetspeed.ui.PortletWidgetWindow.prototype.titleDim = function(fpWidget)
-{
-    fpWidget.restoreAction.style.display="none";
-    fpWidget.maximizeAction.style.display="none";
-    fpWidget.minimizeAction.style.display="none";
-    fpWidget.closeAction.style.display="none";
-};
 
 jetspeed.ui.PortletWidgetWindow.prototype.incrementNextIndex = function()
 {
@@ -455,10 +589,10 @@
     nWidget.domNode.style.width = "280px";
     nWidget.domNode.style.height = "200px";
     // NOTE: the width/height specified get updated when the size is changed by the user
-    nWidget.domNode.style.left = (((this.getNextIndex() -2) * 30 ) + 100) + "px";
-    nWidget.domNode.style.top = (((this.getNextIndex() -2) * 30 ) + 100) + "px";
+    nWidget.domNode.style.left = (((this.getNextIndex() -2) * 30 ) + 200) + "px";
+    nWidget.domNode.style.top = (((this.getNextIndex() -2) * 30 ) + 170) + "px";
     
-    this.titleDim(nWidget);
+    this.titleDim(nWidget, true);
 
     var addToElmt = document.getElementById("jetspeedDesktop");
     addToElmt.appendChild(nWidget.domNode);
@@ -477,82 +611,82 @@
 // ... jetspeed.ui.PortletDivWindow
 jetspeed.ui.PortletDivWindow = function( /* Portlet */ portletObj )
 {
-	this.portlet = portletObj;
-	this.loaded = false;
+    this.portlet = portletObj;
+    this.loaded = false;
     this.buildPortlet();
 }
 jetspeed.ui.PortletDivWindow.prototype.buildPortlet = function()
 {
     var self = this;
-	var divPortlet = document.createElement("div");
+    var divPortlet = document.createElement("div");
     this.portlet_element = divPortlet;
-	divPortlet.className = "portletBody";
-	divPortlet.dataObj = this;
+    divPortlet.className = "portletBody";
+    divPortlet.dataObj = this;
 
-	var divPortletFrame = document.createElement("div");
-	this.child_portletFrame = divPortletFrame;
-	divPortletFrame.className = "portletFrame";
-
-	var divPortletHeader = document.createElement("div");
-	this.child_portletHeader = divPortletHeader;
-	divPortletHeader.className = "portletHeader";
-	
-	divPortletHeader.onmouseover = function(){
-		self.highlight();
-	}
-	divPortletHeader.onmouseout = function(){
-		self.unHighlight();
-	}
-
-	var divShowHide = document.createElement("div");
-	this.child_showHide = divShowHide;
-	divShowHide.className = "showHide";
-	divShowHide.innerHTML = (this.portlet.status==0) ? '<img src="/jetspeed/themes/blue/images/showMod.gif"/>'
: '<img src="/jetspeed/themes/blue/images/hideMod.gif"/>';
-	divShowHide.style.visibility = "hidden";		
+    var divPortletFrame = document.createElement("div");
+    this.child_portletFrame = divPortletFrame;
+    divPortletFrame.className = "portletFrame";
+
+    var divPortletHeader = document.createElement("div");
+    this.child_portletHeader = divPortletHeader;
+    divPortletHeader.className = "portletHeader";
+    
+    divPortletHeader.onmouseover = function(){
+        self.highlight();
+    }
+    divPortletHeader.onmouseout = function(){
+        self.unHighlight();
+    }
+
+    var divShowHide = document.createElement("div");
+    this.child_showHide = divShowHide;
+    divShowHide.className = "showHide";
+    divShowHide.innerHTML = (this.portlet.status==0) ? '<img src="/jetspeed/themes/blue/images/showMod.gif"/>'
: '<img src="/jetspeed/themes/blue/images/hideMod.gif"/>';
+    divShowHide.style.visibility = "hidden";        
     dojo.event.connect( divShowHide, "onmousedown", showHide ) ;
 
-	var divTitle = document.createElement("div");
-	this.child_title = divTitle;
-	divTitle.className = "title";
-	divTitle.appendChild(document.createTextNode(this.portlet.name));
-
-	var divClose = document.createElement("div");
-	this.child_close = divClose;
-	divClose.className = "close";
-	divClose.innerHTML = '<img src="/jetspeed/themes/blue/images/closeMod.gif"/>';
-	divClose.style.display = "none";
+    var divTitle = document.createElement("div");
+    this.child_title = divTitle;
+    divTitle.className = "title";
+    divTitle.appendChild(document.createTextNode(this.portlet.name));
+
+    var divClose = document.createElement("div");
+    this.child_close = divClose;
+    divClose.className = "close";
+    divClose.innerHTML = '<img src="/jetspeed/themes/blue/images/closeMod.gif"/>';
+    divClose.style.display = "none";
     dojo.event.connect( divClose, "onmousedown", close ) ;
-	
-	var divEditContent = document.createElement("div");
-	this.child_editContent = divEditContent;
-	divEditContent.className = "editContent";
-
-	var divPortletContent = document.createElement("div");
-	this.child_moduleContent = divPortletContent;
-	divPortletContent.className = "moduleContent";
-	divPortletContent.innerHTML = "Loading ...";
-	if (this.portlet.status==0) divPortletContent.style.display = "none";
-
-	divPortletHeader.appendChild(divShowHide);
-	divPortletHeader.appendChild(divClose);
-	divPortletHeader.appendChild(divTitle);
-
-	divPortletFrame.appendChild(divPortletHeader);
-	divPortletFrame.appendChild(divEditContent);
-	divPortletFrame.appendChild(divPortletContent);
-
-	divPortlet.appendChild(divPortletFrame);
-
-	function showHide(e) {
-		e.cancelBubble = true;
-		self.showHideModule();
-	}
-	function close(e) {
-		e.cancelBubble = true;
-		self.close();
-		delete self;
-	}
-	
+    
+    var divEditContent = document.createElement("div");
+    this.child_editContent = divEditContent;
+    divEditContent.className = "editContent";
+
+    var divPortletContent = document.createElement("div");
+    this.child_moduleContent = divPortletContent;
+    divPortletContent.className = "moduleContent";
+    divPortletContent.innerHTML = "Loading ...";
+    if (this.portlet.status==0) divPortletContent.style.display = "none";
+
+    divPortletHeader.appendChild(divShowHide);
+    divPortletHeader.appendChild(divClose);
+    divPortletHeader.appendChild(divTitle);
+
+    divPortletFrame.appendChild(divPortletHeader);
+    divPortletFrame.appendChild(divEditContent);
+    divPortletFrame.appendChild(divPortletContent);
+
+    divPortlet.appendChild(divPortletFrame);
+
+    function showHide(e) {
+        e.cancelBubble = true;
+        self.showHideModule();
+    }
+    function close(e) {
+        e.cancelBubble = true;
+        self.close();
+        delete self;
+    }
+    
     var addtoElmt = document.getElementById( "jetspeedDesktop" ) ;
     addtoElmt.appendChild(divPortlet);
 
@@ -576,11 +710,11 @@
     this.child_close.style.display = "none";
 }
 jetspeed.ui.PortletDivWindow.prototype.showHideModule = function() {
-	if (arguments[0] != undefined) {
-		arguments[0] ? this.show() : this.hide();
-	} else {
-		this.child_moduleContent.style.display=='none' ? this.show() : this.hide();
-	}
+    if (arguments[0] != undefined) {
+        arguments[0] ? this.show() : this.hide();
+    } else {
+        this.child_moduleContent.style.display=='none' ? this.show() : this.hide();
+    }
 }
 jetspeed.ui.PortletDivWindow.prototype.close = function()
 {
@@ -588,15 +722,54 @@
 }
 jetspeed.ui.PortletDivWindow.prototype.show = function()
 {
-	this.child_moduleContent.style.display = 'block';
-	this.child_showHide.firstChild.setAttribute("src", "/jetspeed/themes/blue/images/hideMod.gif");
-	this.portlet.status = 1;
+    this.child_moduleContent.style.display = 'block';
+    this.child_showHide.firstChild.setAttribute("src", "/jetspeed/themes/blue/images/hideMod.gif");
+    this.portlet.status = 1;
 }
 jetspeed.ui.PortletDivWindow.prototype.hide = function()
 {
-	this.child_moduleContent.style.display = 'none';
-	this.child_showHide.firstChild.setAttribute("src", "/jetspeed/themes/blue/images/showMod.gif");
-	this.child_editContent.style.display = "none";
-	this.portlet.status = 0;
+    this.child_moduleContent.style.display = 'none';
+    this.child_showHide.firstChild.setAttribute("src", "/jetspeed/themes/blue/images/showMod.gif");
+    this.child_editContent.style.display = "none";
+    this.portlet.status = 0;
 }
 
+
+// ... fade-in convenience methods (work with set of nodes)
+jetspeed.ui.fadeIn = function(nodes, duration, displayStyleValue)
+{
+    jetspeed.ui.fade(nodes, duration, displayStyleValue, 0, 1);
+}
+jetspeed.ui.fadeOut = function(nodes, duration)
+{
+    jetspeed.ui.fade(nodes, duration, "none", 1, 0);
+}
+jetspeed.ui.fade = function(nodes, duration, displayStyleValue, startOpac, endOpac)
+{
+    if ( nodes.length > 0 )
+    {   // mimick dojo.fx.html.fade, but for all objects together
+        for ( var i = 0 ; i < nodes.length ; i++ )
+        {
+            dojo.fx.html._makeFadeable(nodes[i]);
+            if (displayStyleValue != "none")
+                nodes[i].style.display = displayStyleValue ;
+        }
+        var anim = new dojo.animation.Animation(
+		                new dojo.math.curves.Line([startOpac],[endOpac]),
+		                duration, 0);
+	    dojo.event.connect(anim, "onAnimate", function(e) {
+            for ( var mi = 0 ; mi < nodes.length ; mi++ )
+            {
+                dojo.style.setOpacity(nodes[mi], e.x);
+	        }});
+        
+        if (displayStyleValue == "none")
+        {
+            dojo.event.connect(anim, "onEnd", function(e) {
+			    for ( var mi = 0 ; mi < nodes.length ; mi++ )
+                    nodes[mi].style.display = displayStyleValue ;
+		    });
+        }
+        anim.play(true);
+    }
+}



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