[mashup-dev] svn commit r3548 - in trunk/mashup/java/modules/www: . js/wso2

svn at wso2.org svn at wso2.org
Tue Jun 5 07:45:27 PDT 2007


Author: tyrell
Date: Tue Jun  5 07:45:07 2007
New Revision: 3548

Added:
   trunk/mashup/java/modules/www/js/wso2/mashup-main.js   (contents, props changed)
      - copied, changed from r3530, trunk/mashup/java/modules/www/js/wso2/mashup.js
   trunk/mashup/java/modules/www/js/wso2/mashup-utils.js   (contents, props changed)
      - copied, changed from r3530, trunk/mashup/java/modules/www/js/wso2/mashup-widget-helper.js
   trunk/mashup/java/modules/www/js/wso2/mashup.js
Removed:
   trunk/mashup/java/modules/www/js/wso2/mashup-widget-helper.js
Modified:
   trunk/mashup/java/modules/www/index.html
   trunk/mashup/java/modules/www/js/wso2/MashupEditor.js
   trunk/mashup/java/modules/www/js/wso2/MashupListItem.js
Log:
Moving the WSO2.Mashup class to a seperate mashup.js file. Re-naming the old mashup.js to mashup-main.js

Modified: trunk/mashup/java/modules/www/index.html
==============================================================================
--- trunk/mashup/java/modules/www/index.html	(original)
+++ trunk/mashup/java/modules/www/index.html	Tue Jun  5 07:45:07 2007
@@ -56,7 +56,7 @@
     <script type="text/javascript" src="../wsasadmin/js/main.js"></script>
     <script type="text/javascript" src="js/wso2/WSRequest.js"></script>
 
-    <script type="text/javascript" src="js/wso2/mashup.js"></script>
+    <script type="text/javascript" src="js/wso2/mashup-main.js"></script>
     <script type="text/javascript" src="js/wso2/services.js"></script>
 
     <script type="text/javascript" src="js/yui/yahoo/yahoo.js"></script>
@@ -83,7 +83,7 @@
     <script type="text/javascript" src="js/wso2/MashupWidget.js"></script>
     <script type="text/javascript" src="js/wso2/MashupListItem.js"></script>
     <script type="text/javascript" src="js/wso2/MashupEditor.js"></script>
-    <script type="text/javascript" src="js/wso2/mashup-widget-helper.js"></script>
+    <script type="text/javascript" src="js/wso2/mashup-utils.js"></script>
 
     <script type="text/javascript" src="js/wso2/MakeEditable.js"></script>
 

Modified: trunk/mashup/java/modules/www/js/wso2/MashupEditor.js
==============================================================================
--- trunk/mashup/java/modules/www/js/wso2/MashupEditor.js	(original)
+++ trunk/mashup/java/modules/www/js/wso2/MashupEditor.js	Tue Jun  5 07:45:07 2007
@@ -199,8 +199,7 @@
 {
 
     var img = itemObj.getElementsByTagName('img')[0];
-    var des = itemObj.getElementsByTagName("div")[0];
-    //.nextSibling;
+    var des = itemObj.getElementsByTagName("div")[0];        
 
     if (des.style.display == "none") {
         des.style.display = "block";

Modified: trunk/mashup/java/modules/www/js/wso2/MashupListItem.js
==============================================================================
--- trunk/mashup/java/modules/www/js/wso2/MashupListItem.js	(original)
+++ trunk/mashup/java/modules/www/js/wso2/MashupListItem.js	Tue Jun  5 07:45:07 2007
@@ -16,7 +16,9 @@
 
 wso2.mashup.MashupListItem = {}
 
-wso2.mashup.MashupListItem = function(el, userConfig) {
+
+
+wso2.mashup.MashupListItem = function(el, userConfig) {    
     wso2.mashup.MashupListItem.superclass.constructor.call(this, el, userConfig);
 };
 
@@ -52,7 +54,7 @@
     wso2.mashup.MashupListItem.superclass.init.call(this, el/*, userConfig*/);
     // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
 
-    this.beforeInitEvent.fire(wso2.mashup.MashupListItem);
+    this.beforeInitEvent.fire(wso2.mashup.MashupListItem);        
 
     YAHOO.util.Dom.addClass(this.element, wso2.mashup.MashupListItem.CSS_PANEL);
 
@@ -228,6 +230,7 @@
             var panel = new wso2.mashup.MashupWidget('panel_' + wso2.mashup.MashupListItem.panelCount++, {visible:true, draggable:true, close:true, minimize:true});
             panel.setHeader("Hello World");
             panel.setBody("Widget Created from the list");
+            
             var srcElimentPosition = YAHOO.util.Dom.getXY(this.getEl());
             YAHOO.util.Dom.setStyle(panel.id, "position", "absolute");
             YAHOO.util.Dom.setStyle(panel.id, "left", srcElimentPosition[0]);

Copied: trunk/mashup/java/modules/www/js/wso2/mashup-main.js (from r3530, trunk/mashup/java/modules/www/js/wso2/mashup.js)
==============================================================================

Copied: trunk/mashup/java/modules/www/js/wso2/mashup-utils.js (from r3530, trunk/mashup/java/modules/www/js/wso2/mashup-widget-helper.js)
==============================================================================
--- trunk/mashup/java/modules/www/js/wso2/mashup-widget-helper.js	(original)
+++ trunk/mashup/java/modules/www/js/wso2/mashup-utils.js	Tue Jun  5 07:45:07 2007
@@ -25,112 +25,6 @@
     var WSO2 = {};
 }
 
-/**
- * WSO2.Mashup is a JavaScript representation of the Mashup deployed in the server.
- * @class WSO2.Mashup
- * @constructor
- * @param {String} mashupID			The Masup ID uniquely representing the Mashup
- * @param {String} MashupTitle		The Title of Mashup
- * @param {String} MashupDesc		The Description about Mashup
- */
-WSO2.Mashup = function(mashupID, mashupTitle, mashupDesc, eprs) {
-
-    /**
-     * String which uniquely represent the Mashup
-     * @property ID
-     * @type String
-     */
-    this.ID = mashupID;
-
-    /**
-     * String Title of the Mashup
-     * @property Title
-     * @type String
-     */
-    this.Title = mashupTitle;
-
-    /**
-     * String Description about the Mashup
-     * @property Description
-     * @type String
-     */
-    this.Description = mashupDesc;
-
-    /**
-     * String link to WSDL of the Mashup
-     * @property WSDLLink
-     * @type String
-     */
-    this.WSDLLink = '';
-
-    /**
-     * Endpoint references of the Mashup
-     * @property eprs
-     * @type Array
-     */
-    this.eprs = eprs;
-
-    /**
-     * String links to stubs of the Mashup
-     * @property stubsLink
-     * @type Array
-     */
-    this.stubsLink = null;
-
-    /**
-     * Configuration details of the Mashup
-     * @property configDetails
-     * @type Array
-     */
-    this.configDetails = null;
-
-    /**
-     * Configuration details of the Mashup
-     * @property bindingTypes
-     * @type Array
-     */
-    this.bindingTypes = null;
-
-    /**
-     * Configuration details of the Mashup
-     * @property modules
-     * @type Array
-     */
-    this.modules = null;
-
-};
-
-/**
- * Get the ID of the Mashup.
- * @method getID
- * @return {String}	String ID of the Mashup
- */
-WSO2.Mashup.prototype.getID = function() {
-    return this.ID;
-};
-
-/**
- * Get the Title of the Mashup.
- * @method getTitle
- * @return {String}	String Title of the Mashup
- */
-WSO2.Mashup.prototype.getTitle = function() {
-    return this.Title;
-};
-
-/**
- * Get the Description about the Mashup.
- * @method getDescription
- * @return {String}	String Description about the Mashup
- */
-WSO2.Mashup.prototype.getDescription = function() {
-    return this.Description;
-};
-
-WSO2.Mashup.prototype.getEprs = function() {
-    return this.eprs;
-};
-
 
 /**
  * WSO2.MashupUtils is a Class containing utility functions to create UI widgets and tasks.
@@ -158,6 +52,8 @@
 
     var mashupsListItem = new wso2.mashup.MashupListItem('mashupListItem_' + WSO2.MashupUtils.listItemCount++, {visible:true,draggable:true});
 
+    WSO2.MashupUtils.generateMashupFromXml(xmlBodyContent);
+
     var mashupActionHolder = document.createElement("div");
     mashupActionHolder.id = 'serviceActionsDiv_' + WSO2.MashupUtils.listItemCount;
     mashupsListItem.setHeader(mashupActionHolder);
@@ -166,6 +62,11 @@
     wso2.wsf.Util.processXML(xmlBodyContent, URL + "/xslt/MashupServiceList.xsl", document.getElementById(mashupActionHolder.id), true);
 };
 
+/**
+ * @description Clears the Mashup list and resets indexes.
+ * @method clearMashupList
+ * @param none
+ */
 WSO2.MashupUtils.clearMashupList = function() {
 
     //clear existing list, if applicable
@@ -190,6 +91,14 @@
 
 };
 
+WSO2.MashupUtils.generateMashupFromXml = function(xmlContent){
+
+    alert(xmlContent.getElementsByTagName("eprs")[0].firstChild.nodeValue);
+
+};
+
+
+
 /**
  * @description Display the service editor.
  * @method showServiceEditor

Added: trunk/mashup/java/modules/www/js/wso2/mashup.js
==============================================================================
--- (empty file)
+++ trunk/mashup/java/modules/www/js/wso2/mashup.js	Tue Jun  5 07:45:07 2007
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2007 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * WSO2.Mashup is a JavaScript representation of the Mashup deployed in the server.
+ * @class WSO2.Mashup
+ * @constructor
+ * @param {String} mashupID			The Masup ID uniquely representing the Mashup
+ * @param {String} MashupTitle		The Title of Mashup
+ * @param {String} MashupDesc		The Description about Mashup
+ */
+WSO2.Mashup = function(mashupID, mashupTitle, mashupDesc, eprs) {
+
+    /**
+     * String which uniquely represent the Mashup
+     * @property ID
+     * @type String
+     */
+    this.ID = mashupID;
+
+    /**
+     * String Title of the Mashup
+     * @property Title
+     * @type String
+     */
+    this.Title = mashupTitle;
+
+    /**
+     * String Description about the Mashup
+     * @property Description
+     * @type String
+     */
+    this.Description = mashupDesc;
+
+    /**
+     * String link to WSDL of the Mashup
+     * @property WSDLLink
+     * @type String
+     */
+    this.WSDLLink = '';
+
+    /**
+     * Endpoint references of the Mashup
+     * @property eprs
+     * @type Array
+     */
+    this.eprs = eprs;
+
+    /**
+     * String links to stubs of the Mashup
+     * @property stubsLink
+     * @type Array
+     */
+    this.stubsLink = null;
+
+    /**
+     * Configuration details of the Mashup
+     * @property configDetails
+     * @type Array
+     */
+    this.configDetails = null;
+
+    /**
+     * Configuration details of the Mashup
+     * @property bindingTypes
+     * @type Array
+     */
+    this.bindingTypes = null;
+
+    /**
+     * Configuration details of the Mashup
+     * @property modules
+     * @type Array
+     */
+    this.modules = null;
+
+};
+
+/**
+ * Get the ID of the Mashup.
+ * @method getID
+ * @return {String}	String ID of the Mashup
+ */
+WSO2.Mashup.prototype.getID = function() {
+    return this.ID;
+};
+
+/**
+ * Get the Title of the Mashup.
+ * @method getTitle
+ * @return {String}	String Title of the Mashup
+ */
+WSO2.Mashup.prototype.getTitle = function() {
+    return this.Title;
+};
+
+/**
+ * Get the Description about the Mashup.
+ * @method getDescription
+ * @return {String}	String Description about the Mashup
+ */
+WSO2.Mashup.prototype.getDescription = function() {
+    return this.Description;
+};
+
+WSO2.Mashup.prototype.getEprs = function() {
+    return this.eprs;
+};




More information about the Mashup-dev mailing list