You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2010/06/09 18:15:26 UTC

svn commit: r953072 - in /incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web: goat/ComponentStatusGrid.js index.html

Author: zoe
Date: Wed Jun  9 16:15:25 2010
New Revision: 953072

URL: http://svn.apache.org/viewvc?rev=953072&view=rev
Log:
ARIES-319 temporary fix to grid not resizing properly

Modified:
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js?rev=953072&r1=953071&r2=953072&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js Wed Jun  9 16:15:25 2010
@@ -29,25 +29,34 @@ dojo.require("dijit.form.Button");
 //it knows too much about component properties at present.
 
 dojo.declare("goat.ComponentStatusGrid", [], {
-	hideButton: null,
-	showButton: null,
+	hideshowButton: null,
 	hidecoords: true,
 	grid:null,
 	jsonStore:null,
 	dataItems:{ identifier : 'id',	label : 'name',	items : [] },
 	lastMouseOverIndex:-1,
 
-	constructor : function(where) {
+	constructor : function(where, wheregrid) {
 
-    this.hideButton = new dijit.form.Button(
-              {label: "Hide All", onClick: function(){_this.hideAll();} });
-
-    this.showButton = new dijit.form.Button(
-              {label: "Show All", onClick: function(){_this.showAll();} });
-
-	dojo.byId(where).appendChild(this.hideButton.domNode);
-    dojo.byId(where).appendChild(this.showButton.domNode);
+	var _this=this;
 
+	this.hideshowButton = new dijit.form.ToggleButton({
+            showLabel: true,
+            checked: true,
+            onChange: function(val) {
+			if(val) {
+				console.log("true");
+				_this.showAll();
+                this.attr('label', "Hide all");
+			} else {
+				console.log("false");
+				_this.hideAll();
+				label: "Hide all";
+                this.attr('label', "Show all");
+			}
+            },
+            label: "Hide all"
+        }, where);
 
 	var layout = [ 
 	{
@@ -93,15 +102,10 @@ dojo.declare("goat.ComponentStatusGrid",
 	var grid = new dojox.grid.DataGrid( {
 		structure : layout,
 		store : this.jsonStore
-	});
-
-	dojo.byId(where).appendChild(grid.domNode);
+	}, wheregrid);
 
 	grid.startup();
-	
-	console.log(dojo.byId(where));
-	
-	var _this=this;
+
 
 	dojo.connect(window, "onresize", grid, "resize");
 	dojo.connect(grid, "onRowClick", function(evt){

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html?rev=953072&r1=953071&r2=953072&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html Wed Jun  9 16:15:25 2010
@@ -33,6 +33,10 @@ body, html {
    width:100%;
    height:100%;
 }
+#borderContainer {
+   width:100%;
+   height:100%;
+}
 
 </style>
 
@@ -70,6 +74,9 @@ body, html {
 	dojo.require("dijit.Dialog");
 	dojo.require("dijit.layout.BorderContainer");
     dojo.require("dijit.layout.ContentPane");
+    dojo.require("dijit.layout.AccordionContainer");
+	dojo.require("dijit.layout.AccordionPane");
+
 
 	
 	dojo.require("goat.Component");
@@ -110,7 +117,7 @@ body, html {
 
 		initialLayout = new goat.SimpleInitialLayout(1000,1000);
 		var loadingDialog = new goat.DwrLoadingDialog();
-		var componentStatusGrid = new goat.ComponentStatusGrid("stateTableID");
+		var componentStatusGrid = new goat.ComponentStatusGrid("hideShowButton","stateTableID");
 		providerSelector = new goat.ProviderSelector("providerSelectorID");		
 		var loadSave = new goat.LayoutManager("loadSaveLayoutID");
 	}
@@ -122,42 +129,20 @@ body, html {
 
 </head>
 <body class="tundra">
- <div dojoType="dijit.layout.BorderContainer" design="headline" 
-         style="width:100%; height:100%" liveSizing="true">
-
-         <div dojoType="dijit.layout.ContentPane" region="top" 
-              style="height:30px">
-				<span id="providerSelectorID"></span><span id="loadSaveLayoutID"></span>
-         </div>
-
-         <div dojoType="dijit.layout.ContentPane" region="leading" 
-              splitter="true" style="width:300px">
-             <div id="stateTableID" style="width: 300px; height: 700px;">
-             </div>
-         </div>
-
-         <div dojoType="dijit.layout.ContentPane" region="center">
+<div dojoType="dijit.layout.BorderContainer" design="sidebar" gutters="true"
+		style="width: 100%; height: 100%;">
+		<div dojoType="dijit.layout.ContentPane" region="leading" splitter="true" style="width: 300px;">
+					<span id="hideShowButton"> </span>
+					<div style="width: 300px;" id="stateTableID"></div>
+		</div>
+
+		<div dojoType="dijit.layout.ContentPane" region="top" style="height: 20px;">
+			 <span id="providerSelectorID"></span><span id="loadSaveLayoutID"></span>
+		</div>
+		<div dojoType="dijit.layout.ContentPane" region="center" style="padding: 10px;">
 			<div id="gfx_holder" style="width: 100%; height: 100%;"></div>
-             </div>
-         </div>
-    </div>
-
-<!--
-<table style="width: 1300px;">
-    <tr>
-      <td colspan=2>
-      		<span id="providerSelectorID"></span><span id="loadSaveLayoutID"></span>
-      </td>  
-    </tr>
-	<tr>
-		<td style="width: 300px;">
-		<div style="width: 300px;" id="stateTableID"></div>
-		</td>
-		<td>
-		<div id="gfx_holder" style="width: 1000px; height: 1000px; border:2px black solid;"></div>
-		</td>
-	</tr>
-</table>
--->
+		</div>
+	</div>
+
 </body>
 </html>