portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r896747 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui.jsp javascript/jetspeed/jetui/jetui-portal.js jetui/engine/portal.js
Date Thu, 07 Jan 2010 03:28:41 GMT
Author: taylor
Date: Thu Jan  7 03:28:02 2010
New Revision: 896747

URL: http://svn.apache.org/viewvc?rev=896747&view=rev
Log:
JS2-1084
bug fix: safe guard against different action button markup

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/javascript/jetspeed/jetui/jetui-portal.js
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/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=896747&r1=896746&r2=896747&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  7 03:28:02 2010
@@ -111,20 +111,12 @@
 }; // ({classNamePrefix: 'jet'})
 </script>
 <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/jetui/css/portal.css"/>
-
 <%=jetui.includeHeaderResources(rc)%>
-
 <%
-// define layout objects (preferedLocale, rootFragment, site, theme, layoutDecorator)
-// decorator macros
-// defineNavigationConstants()
-
 for (String style : jetui.getStyleSheets(rc))
 {%>
 <link rel="stylesheet" type="text/css" media="screen, projection" href="<%=request.getContextPath()%>/<%=style%>"/>
-<%}
-%>
-
+<%}%>
 <body class="yui-skin-sam">
 <div id='jetspeedZone'>
 <div id="layout-<%=pageDec%>" class="layout-<%=pageDec%>" >

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=896747&r1=896746&r2=896747&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  7 03:28:02 2010
@@ -332,12 +332,15 @@
 		        	action.setAttribute("title", "attach");
 		        	action.setAttribute("class", "portlet-action-attach");
 		            var imgid = actionId.replace(/^jetspeed-detach-/, "jetspeed-detach-img-");
-		        	var img = Y.one("[id='" + imgid + "']");;
-		        	var imgsrc = img.getAttribute("src");
-			        if (imgsrc != null) {
-			        	var s = imgsrc.replace("detach", "attach");
-			        	img.setAttribute("src", s);
-			        	img.setAttribute("alt", "Attach");
+		        	var img = Y.one("[id='" + imgid + "']");
+		        	if (!Y.Lang.isNull(img))
+		        	{
+			        	var imgsrc = img.getAttribute("src");
+				        if (imgsrc != null) {
+				        	var s = imgsrc.replace("detach", "attach");
+				        	img.setAttribute("src", s);
+				        	img.setAttribute("alt", "Attach");
+			        	}
 		        	}
 	            }
 		        var uri = portal.portalContextPath + "/services/pagelayout/fragment/" + windowId
+ "/pos/?_type=json";
@@ -389,11 +392,14 @@
 		        	action.setAttribute("class", "portlet-action-detach");
 		            var imgid = actionId.replace(/^jetspeed-detach-/, "jetspeed-detach-img-");
 		        	var img = Y.one("[id='" + imgid + "']");;
-		        	var imgsrc = img.getAttribute("src");
-			        if (imgsrc != null) {
-			        	var s = imgsrc.replace("attach", "detach");
-			        	img.setAttribute("src", s);
-			        	img.setAttribute("alt", "Detach");
+		            if (!Y.Lang.isNull(img))
+		        	{		            
+			        	var imgsrc = img.getAttribute("src");
+				        if (imgsrc != null) {
+				        	var s = imgsrc.replace("attach", "detach");
+				        	img.setAttribute("src", s);
+				        	img.setAttribute("alt", "Detach");
+			        	}
 		        	}
 	            }
 	        	var drag = Y.DD.DDM.getDrag(window);

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js?rev=896747&r1=896746&r2=896747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
Thu Jan  7 03:28:02 2010
@@ -80,19 +80,22 @@
 		        dragGroups = ['detached'],	        
 		        dragMode = 'point';
 		        dropGroups = [];
-	        }        
-	        var ddNav = new Y.DD.Drag({
-	            node: v,
-	            groups: dragGroups,
-	            dragMode: dragMode                    
-	        }).plug(Y.Plugin.DDProxy, { 
-	          	 moveOnEnd: false         	    	
-	        });    
-	        ddNav.addHandle(config.dragHandleStyle);
-	    	var drop = new Y.DD.Drop({
-	            node: v,
-	            groups: dropGroups            
-	        });
+	        }
+	        if (portlet.get("tool") == false)
+	        {
+		        var ddNav = new Y.DD.Drag({
+		            node: v,
+		            groups: dragGroups,
+		            dragMode: dragMode                    
+		        }).plug(Y.Plugin.DDProxy, { 
+		          	 moveOnEnd: false         	    	
+		        });    
+		        ddNav.addHandle(config.dragHandleStyle);
+		    	var drop = new Y.DD.Drop({
+		            node: v,
+		            groups: dropGroups            
+		        });
+	        }
 	    	//portlet.info();
     	}
     });



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