portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r899033 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui.jsp WEB-INF/pages/template.tpsml javascript/jetspeed/jetui/jetui-portal.js
Date Thu, 14 Jan 2010 02:32:52 GMT
Author: taylor
Date: Thu Jan 14 02:32:51 2010
New Revision: 899033

URL: http://svn.apache.org/viewvc?rev=899033&view=rev
Log:
JS2-1084
- enable detach on add portlet
- new method for updating toolbar state without toggling
- close right toolbar for guests

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp?rev=899033&r1=899032&r2=899033&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
Thu Jan 14 02:32:51 2010
@@ -325,6 +325,7 @@
       <div class="PTitleContent">Loading...</div>
       <div class="PActionBar">
         <span style='cursor: pointer; z-index: 1000;' id='jetspeed-close-XXX' title="close"
class="portlet-action-close"><img src="<%=request.getContextPath()%>/decorations/portlet/jetspeed/images/close.gif"
alt="Close" border="0" /></span>
+        <span style='cursor: pointer; z-index: 1000;' id='jetspeed-detach-XXX' title="detach"
class="portlet-action-detach"><img src="<%=request.getContextPath()%>/decorations/images/detach.gif"
alt="Detach" border="0" id='jetspeed-detach-img-XXX'/></span>              
       </div>
     </div>
     <div class="PContentBorder">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml?rev=899033&r1=899032&r2=899033&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
Thu Jan 14 02:32:51 2010
@@ -23,7 +23,7 @@
 	    <fragment id="jsPageNavigator" type="portlet" name="j2-admin::PageNavigator">
 	  	        <property name="row" value="0"></property>
 	            <property name="column" value="0"></property>
-	            <property name="state" value="leftdock"></property>
+	            <property name="state" value="normal"></property>
 	            <property name="tool" value="true"></property>                 
      
 	    </fragment>
 	</fragment>
@@ -38,12 +38,13 @@
         <property name="column" value="2"></property>    
 	    <property name="state" value="normal"></property>                      
         
 	    <property name='toolbar' value='true'></property>
+        <property name="state" scope="user" scopeValue="guest" value="closed"></property>
    
 	    <property name='class' value='jsRightToolbar'></property>              
                 
 	    <fragment id="jsToolbox" type="portlet" name="j2-admin::JetspeedToolbox">
 	            <property name="row" value="0"></property>
 	            <property name="column" value="0"></property>
-	            <property name="state" value="rightdock"></property>           
            
-	            <property name="tool" value="true"></property>                 
      
+	            <property name="state" value="normal"></property>              
         
+	            <property name="tool" value="true"></property>	                
                   
 	    </fragment>
    </fragment>
     

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js?rev=899033&r1=899032&r2=899033&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
Thu Jan 14 02:32:51 2010
@@ -200,6 +200,24 @@
                 };
             var request = Y.io(uri, config);            
         },
+
+        /**
+         * Updates toolbar state
+         * 
+         * @method updateToolbar
+         */        
+        updateToolbar : function(toolbar, state) {
+            var portal = JETUI_YUI.getPortalInstance();        	
+            var uri = portal.portalContextPath + "/services/pagelayout/fragment/" + toolbar
+ "/mod/?_type=json";
+            uri += "&state=" + state;
+            var config = {
+                    on: { complete: portal.onStateComplete },
+                    method: "PUT",
+                    headers: { "X-Portal-Path" : portal.portalPagePath },
+                    arguments: { complete: [ toolbar ] }
+                };
+            var request = Y.io(uri, config);            
+        },
         
         /**
          * Toggles a tool or window state
@@ -635,6 +653,7 @@
             var titleElem = null;
             var actionBarElem = null;
             var closeElem = null;
+            var detachElem = null;
             var contentElem = null;
             var children = v.getElementsByTagName("*");
             children.each(function(v, k) {
@@ -646,7 +665,9 @@
                     contentElem = v;
                 } else if (/^jetspeed-close/.test("" + v.get("id"))) {
                     closeElem = v;
-                }
+	            } else if (/^jetspeed-detach/.test("" + v.get("id"))) {
+	                detachElem = v;
+	            }                
             });
             var title = o.getResponseHeader("JS_PORTLET_TITLE");
             if (titleElem) {
@@ -656,6 +677,10 @@
                 closeElem.setAttribute("id", "jetspeed-close-" + windowId);
                 closeElem.on('click', portal.removePortlet);
             }
+            if (detachElem) {
+                detachElem.setAttribute("id", "jetspeed-detach-" + windowId);
+                detachElem.on('click', portal.detachPortlet);
+            }
             var portletContent = o.responseText;
             if (contentElem) {
                 contentElem.setContent(portletContent);



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