portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r882617 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui.jsp jetui/engine/portal.js
Date Fri, 20 Nov 2009 15:54:05 GMT
Author: woonsan
Date: Fri Nov 20 15:54:04 2009
New Revision: 882617

URL: http://svn.apache.org/viewvc?rev=882617&view=rev
Log:
JS2-1057: Removing event handlers for toolbox portlet and move up yui config to be shared.

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/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=882617&r1=882616&r2=882617&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
Fri Nov 20 15:54:04 2009
@@ -52,6 +52,11 @@
 <title><%=jetui.getTitle(rc)%></title>
 <link rel="shortcut icon" href="<%=baseUrl%>images/jetspeed.jpg" type="image/x-icon"
/>
 <script type="text/javascript" src="<%=request.getContextPath()%>/javascript/yui/build/yui/yui-min.js"></script>
+<script language="javascript">
+var assetsDir = "assets/";
+var buildDir = "<%=request.getContextPath()%>/javascript/yui/build/" ;
+var yuiConfig = {base:"<%=request.getContextPath()%>/javascript/yui/build/", timeout:
10000, debug: true, useBrowserConsole: true}; // ({classNamePrefix: 'jet'})
+</script>
 <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/jetui/css/portal.css"/>
 
 <%=jetui.includeHeaderResources(rc)%>
@@ -186,11 +191,6 @@
 </div> <!-- end layout -->
 </div>
 </body>
-<script language="javascript">
-var assetsDir = "assets/";
-var buildDir = "<%=request.getContextPath()%>/javascript/yui/build/" ;
-var yuiConfig = {base:"<%=request.getContextPath()%>/javascript/yui/build/", timeout:
10000, debug: true, useBrowserConsole: true}; // ({classNamePrefix: 'jet'})
-</script>
 <script src="<%=request.getContextPath()%>/jetui/engine/portal.js"></script>
  
 </html>

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=882617&r1=882616&r2=882617&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
Fri Nov 20 15:54:04 2009
@@ -460,76 +460,6 @@
         }    	
     };
 
-    var onLoadPortletComplete = function(id, o, args) { 
-    	var id = id; // Transaction ID. 
-    	var data = o.responseText; // Response data.
-		var node = args[0];		
-		var schemaPortletList = {
-			metaFields: {status:"status", action:"action"},
-			resultListLocator: "portlets", 
-			resultFields: [{key:"name"}, {key:"displayName"}, {key:"description"}, {key:"image"}]
-		};		
-		try {
-    		var dataOut = Y.DataSchema.JSON.apply(schemaPortletList, data);
-		} catch (err)
-		{
-    		Y.log("Error: " + err.message);
-			return;
-		}     
-		if(dataOut!=null)
-		{
-			// TODO: error handling
-			if(dataOut.error)
-			{
-				alert("Error: " + dataOut.error);
-			}
-			else
-			{						
-				var templatePanel = Y.Node.one("#portlet-body-html"); 				
-				for(var i=0; i<dataOut.results.length; i++)
-				{
-					var clone = templatePanel.cloneNode(true);
-					clone.setStyle('display', '');
-					var imgNode = clone.one('img');
-					if(imgNode!=null)
-					{
-						var url = imgNode.getAttribute('src');
-						var imgURL = url + "/" + dataOut.results[i].image;
-						imgNode.setAttribute('src', imgURL);
-						var nameNode = clone.one('#name');
-						nameNode.setContent(dataOut.results[i].displayName);
-						// TODO: add handlers for add and preview
-						// TODO: limit # of portlets to n...
-						// TODO: support paging...
-						node.appendChild(clone);
-					}
-				}
-			}
-		}
-
-		
-    };   
-	///////////////////////////////////////////////////
-	//
-    var loadPortlets = function(panel) {
-    	var uri = document.location.href;
-		uri = uri.replace("/ui", "/ajaxapi");
-	
-		var uri = uri + "?action=getportlets&format=json"; //"id=" + windowId + "&col="
+ drag.data.get('column') + "&row=" + drag.data.get('row');
-	
-		//var uri = "http://localhost:8080/jetspeed/test.json";
-
-        Y.on('io:complete', onLoadPortletComplete, this, [panel]); 
-        var request = Y.io(uri);         	    	
-       	    	
-    };
-
-    var portletPanel = Y.Node.all('.portlet-panel-portlets');    
-    portletPanel.each(function(v, k) {
-        //v.on('click', loadPortlets(v));
-		loadPortlets(v);
-    });
-
 	var reallocateColumn = function(column) {
 	    var columns = Y.Node.all('.portal-layout-column');
 	    columns.each(function(v, k) {



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