Author: clopes
Date: 2011-10-11 14:41:17 -0700 (Tue, 11 Oct 2011)
New Revision: 27131

Added:
   cytoscapeweb/trunk/website/src/css/content/demos.css
   cytoscapeweb/trunk/website/src/file/example_graphs/compound.graphml
   cytoscapeweb/trunk/website/src/js/content/demos/
   cytoscapeweb/trunk/website/src/js/content/demos/compound.js
   cytoscapeweb/trunk/website/src/js/content/demos/simple.js
   cytoscapeweb/trunk/website/src/php/content/demos.declaration.php
   cytoscapeweb/trunk/website/src/php/content/demos.php
Modified:
   cytoscapeweb/trunk/website/src/css/layout.css
   cytoscapeweb/trunk/website/src/file/php/export.php
   cytoscapeweb/trunk/website/src/js/content/home.js
   cytoscapeweb/trunk/website/src/php/layout/declaration.php
   cytoscapeweb/trunk/website/src/php/layout/header.php
Log:
Removed link to demo application.
Added two new demos (simple and compound).
Removed former cytoscape logo from header.

Added: cytoscapeweb/trunk/website/src/css/content/demos.css
===================================================================
--- cytoscapeweb/trunk/website/src/css/content/demos.css                        
        (rev 0)
+++ cytoscapeweb/trunk/website/src/css/content/demos.css        2011-10-11 
21:41:17 UTC (rev 27131)
@@ -0,0 +1,3 @@
+#cytoscapeweb { height: 600px !important; }
+#content .tools { padding: 0.5em; border-bottom: 1px solid #cacaca; }
+#content .tools * + label { margin-left: 1em; }
\ No newline at end of file

Modified: cytoscapeweb/trunk/website/src/css/layout.css
===================================================================
--- cytoscapeweb/trunk/website/src/css/layout.css       2011-10-11 20:57:49 UTC 
(rev 27130)
+++ cytoscapeweb/trunk/website/src/css/layout.css       2011-10-11 21:41:17 UTC 
(rev 27131)
@@ -60,7 +60,7 @@
 #navigation_links li.selected a { background-color: #0b94b1; color: #ffffff; 
border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; }
 #navigation_links a:hover { text-decoration: underline; }
 /* cytoweb logo */
-#logo { float: left; height: 72px; width: 188px; margin: 8px; background: 
url("../img/layout/cytoscape_web_logo.png") no-repeat; }
+#logo { float: left; font-weight: bold; color: #000 !important; height: 88px; 
line-height: 88px; font-size: 1.75em; font: 'Lucida Grande', Geneva, Arial, 
Verdana, sans-serif; }
 #logo div { padding: 10px 0 0 78px; color: #000000; font-size: 1.75em; 
font-family: Tahoma,Gill Sans,Arial,sans-serif; line-height: 1; }
 #search { display: none; float: right; height: 22px; margin: 30px 0 0 0; 
border: #c1c1c1 solid 1px; border-radius: 4px; -moz-border-radius: 4px; 
-webkit-border-radius: 4px; }
 #search.focus { -moz-box-shadow: 0 0 5px #0b94b1; -webkit-box-shadow: 0 0 5px 
#0b94b1; box-shadow: 0 0 5px #0b94b1; }

Added: cytoscapeweb/trunk/website/src/file/example_graphs/compound.graphml
===================================================================
--- cytoscapeweb/trunk/website/src/file/example_graphs/compound.graphml         
                (rev 0)
+++ cytoscapeweb/trunk/website/src/file/example_graphs/compound.graphml 
2011-10-11 21:41:17 UTC (rev 27131)
@@ -0,0 +1,159 @@
+<graphml
+       xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns 
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd";
+       xmlns="http://graphml.graphdrawing.org/xmlns"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+       <key id="label" for="node" attr.name="label" attr.type="string" />
+       <key id="weight" for="node" attr.name="weight" attr.type="double" />
+       <key id="name" for="node" attr.name="name" attr.type="string" />
+       <key id="label" for="edge" attr.name="label" attr.type="string" />
+       <key id="weight" for="edge" attr.name="weight" attr.type="double" />
+       <graph edgedefault="undirected">
+               <node id="n3">
+                       <data key="label">n3</data>
+               </node>
+               <node id="n4">
+                       <data key="label">n4</data>
+               </node>
+               <node id="n16">
+                       <data key="label">n16</data>
+               </node>
+               <node id="n17">
+                       <data key="label">n17</data>
+               </node>
+               <node id="n18">
+                       <data key="label">n18</data>
+               </node>
+               <node id="n19">
+                       <data key="label">n19</data>
+               </node>
+               <node id="n2">
+                       <data key="label">n2</data>
+                       <graph edgedefault="undirected">
+                               <node id="n22">
+                                       <data key="label">n22</data>
+                               </node>
+                               <node id="n21">
+                                       <data key="label">n21</data>
+                               </node>
+                               <node id="n23">
+                                       <data key="label">n23</data>
+                               </node>
+                               <edge target="n21" id="e15" source="n23">
+                                       <data key="label"></data>
+                                       <data key="weight">0.2</data>
+                               </edge>
+                               <edge target="n22" id="e16" source="n23">
+                                       <data key="label"></data>
+                                       <data key="weight">0.1</data>
+                               </edge>
+                               <edge target="n21" id="e17" source="n22">
+                                       <data key="label"></data>
+                                       <data key="weight">0.2</data>
+                               </edge>
+                       </graph>
+               </node>
+               <node id="n1">
+                       <data key="label">n1</data>
+                       <graph edgedefault="undirected">
+                               <node id="n20">
+                                       <data key="label">n20</data>
+                               </node>
+                               <node id="n11">
+                                       <data key="label">n11</data>
+                               </node>
+                               <node id="n12">
+                                       <data key="label">n12</data>
+                               </node>
+                               <node id="n13">
+                                       <data key="label">n13</data>
+                                       <graph edgedefault="undirected">
+                                               <node id="n131">
+                                                       <data 
key="label">n131</data>
+                                               </node>
+                                       </graph>
+                               </node>
+                               <edge target="n12" id="e12" source="n11">
+                                       <data key="label">e12</data>
+                                       <data key="weight">0.2</data>
+                               </edge>
+                               <edge target="n11" id="e13" source="n20">
+                                       <data key="label"></data>
+                                       <data key="weight">0.1</data>
+                               </edge>
+                               <edge target="n11" id="e20" source="n13">
+                                       <data key="label"></data>
+                                       <data key="weight">0.3</data>
+                               </edge>
+                       </graph>
+               </node>
+               <node id="n6">
+                       <data key="label">n6</data>
+                       <graph edgedefault="undirected">
+                               <node id="n10">
+                                       <data key="label">n10</data>
+                               </node>
+                               <node id="n8">
+                                       <data key="label">n8</data>
+                               </node>
+                               <node id="n7">
+                                       <data key="label">n7</data>
+                               </node>
+                               <node id="n9">
+                                       <data key="label">n9</data>
+                                       <graph edgedefault="undirected">
+                                               <node id="n14">
+                                                       <data 
key="label">n14</data>
+                                               </node>
+                                               <node id="n15">
+                                                       <data 
key="label">n15</data>
+                                               </node>
+                                               <edge target="n14" id="e18" 
source="n15">
+                                                       <data 
key="label"></data>
+                                               </edge>
+                                       </graph>
+                               </node>
+                               <edge target="n10" id="e5" source="n8">
+                                       <data key="label"></data>
+                               </edge>
+                               <edge target="n10" id="e6" source="n7">
+                                       <data key="label"></data>
+                               </edge>
+                       </graph>
+               </node>
+               <edge target="n3" id="e3" source="n4">
+                       <data key="label"></data>
+                       <data key="weight">0.7</data>
+               </edge>
+               <edge target="n3" id="e4" source="n2">
+                       <data key="label"></data>
+                       <data key="weight">0.4</data>
+               </edge>
+               <edge target="n10" id="e7" source="n3">
+                       <data key="label"></data>
+                       <data key="weight">0.2</data>
+               </edge>
+               <edge target="n19" id="e8" source="n18">
+                       <data key="label"></data>
+                       <data key="weight">0.3</data>
+               </edge>
+               <edge target="n17" id="e9" source="n19">
+                       <data key="label"></data>
+                       <data key="weight">0.9</data>
+               </edge>
+               <edge target="n16" id="e10" source="n17">
+                       <data key="label"></data>
+                       <data key="weight">0.8</data>
+               </edge>
+               <edge target="n1" id="e11" source="n16">
+                       <data key="label"></data>
+                       <data key="weight">0.4</data>
+               </edge>
+               <edge target="n18" id="e14" source="n17">
+                       <data key="label"></data>
+                       <data key="weight">0.2</data>
+               </edge>
+               <edge target="n7" id="e19" source="n15">
+                       <data key="label"></data>
+                       <data key="weight">0.1</data>
+               </edge>
+       </graph>
+</graphml>
\ No newline at end of file

Modified: cytoscapeweb/trunk/website/src/file/php/export.php
===================================================================
--- cytoscapeweb/trunk/website/src/file/php/export.php  2011-10-11 20:57:49 UTC 
(rev 27130)
+++ cytoscapeweb/trunk/website/src/file/php/export.php  2011-10-11 21:41:17 UTC 
(rev 27131)
@@ -15,6 +15,8 @@
         header('Content-type: image/svg+xml');
     } elseif ($type == 'xml') {
         header('Content-type: text/xml');
+    } elseif ($type == 'txt') {
+        header('Content-type: text/plain');
     }
 
     # To force the browser to download the file:

Added: cytoscapeweb/trunk/website/src/js/content/demos/compound.js
===================================================================
--- cytoscapeweb/trunk/website/src/js/content/demos/compound.js                 
        (rev 0)
+++ cytoscapeweb/trunk/website/src/js/content/demos/compound.js 2011-10-11 
21:41:17 UTC (rev 27131)
@@ -0,0 +1,176 @@
+/*
+  This file is part of Cytoscape Web.
+  Copyright (c) 2009, The Cytoscape Consortium (www.cytoscape.org)
+
+  The Cytoscape Consortium is:
+    - Agilent Technologies
+    - Institut Pasteur
+    - Institute for Systems Biology
+    - Memorial Sloan-Kettering Cancer Center
+    - National Center for Integrative Biomedical Informatics
+    - Unilever
+    - University of California San Diego
+    - University of California San Francisco
+    - University of Toronto
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+$(function(){
+
+    $("#content").html('\
+        <div class="tools">\
+               <input type="button" id="reapplyLayout" value="Reapply 
layout"/>\
+            <label for="showNodeLabels">Node Labels</label>\
+            <input type="checkbox" id="showNodeLabels" checked="checked"/> \
+        </div>\
+        <div id="cytoscapeweb" width="*">\
+            Cytoscape Web will replace the contents of this div with your 
graph.\
+        </div>\
+    ');
+
+    var div_id = "cytoscapeweb";
+    var vis;
+    
+    // options used for Cytoscape Web
+    var options = {
+        nodeTooltipsEnabled: true,
+        edgeTooltipsEnabled: true,
+        nodeTooltipsEnabled: true,
+        edgesMerged: false,
+        //mouseDownToDragDelay: -1,
+        visualStyle: {
+            global: {
+                backgroundColor: "#fefefe",
+                tooltipDelay: 1000
+            },
+            nodes: {
+                shape: "ELLIPSE",
+                compoundShape: "RECTANGLE",
+                color: { defaultValue: "#cccccc", continuousMapper: { 
attrName: "weight", minValue: "#ffffff", maxValue: "#0b94b1" } },
+                opacity: 0.9,
+                size: 30,
+                borderWidth: 2,
+                borderColor: "#707070",
+                compoundBorderColor: "#abcfd6",
+                compoundBorderWidth: 2,
+                //image: 
"http://chart.apis.google.com/chart?chs=300x300&cht=p&chd=e0:U-gh..bR";,
+                //compoundImage: 
"http://chart.apis.google.com/chart?chxr=0,0,160&chxt=x&chbh=a&chs=440x220&cht=bhs&chco=4D89F9,C6D9FD&chd=s:GflxYlS,fl9YSYS";,
+                labelFontSize: { defaultValue: 12, continuousMapper: { 
attrName: "weight",  minValue: 10, maxValue: 24 } },
+                tooltipText: { customMapper: { functionName: "onNodeTooltip" } 
},
+                selectionGlowOpacity: 0,
+                selectionBorderColor: "ff0000",
+                hoverBorderWidth: 4
+            },
+            edges: {
+               color: "#0b94b1",
+                width: { defaultValue: 2, continuousMapper: { attrName: 
"weight",  minValue: 2, maxValue: 8 } },
+                mergeWidth: { defaultValue: 2, continuousMapper: { attrName: 
"weight",  minValue: 2, maxValue: 8 } },
+                mergeColor: "#0b94b1",
+                opacity: 0.7,
+                labelFontSize: 10,
+                labelFontWeight: "bold",
+                selectionGlowOpacity: 0,
+                selectionColor: "ff0000",
+                tooltipText: "${weight}"
+             }
+        }   
+    };
+    
+    function draw(url) {
+       $("input, select").attr("disabled", true);
+
+        $.get(url, function(dt) {
+            if (typeof dt !== "string") {
+                if (window.ActiveXObject) {
+                    dt = dt.xml;
+                } else {
+                    dt = (new XMLSerializer()).serializeToString(dt);
+                }
+            }
+            
+                       options.layout = { name: "CompoundSpringEmbedder" };
+               options.network = dt;
+            options.nodeLabelsVisible = $("#showNodeLabels").is(":checked");
+
+               d1 = new Date();
+               vis.draw(options);
+        });
+    }
+
+    var _srcId;
+    function clickNodeToAddEdge(evt) {
+        if (_srcId != null) {
+               vis.removeListener("click", "nodes", clickNodeToAddEdge);
+               var e = vis.addEdge({ source: _srcId, target: 
evt.target.data.id, }, true);
+               _srcId = null;
+        }
+    }
+    
+    $("input").attr("disabled", true);
+
+    // init and draw
+    vis = new org.cytoscapeweb.Visualization(div_id, { swfPath: 
"/swf/CytoscapeWeb" });
+    
+    vis.ready(function() {
+        var layout = vis.layout();
+        $("input, select").attr("disabled", false);
+        $("#showNodeLabels").attr("checked", vis.nodeLabelsVisible());
+        
+        vis.addContextMenuItem("Delete node", "nodes", function(evt) {
+            vis.removeNode(evt.target.data.id, true);
+        })
+        .addContextMenuItem("Delete edge", "edges", function(evt) {
+            vis.removeEdge(evt.target.data.id, true);
+        })
+        .addContextMenuItem("Add new node", function(evt) {
+            var x = evt.mouseX;
+            var y = evt.mouseY;
+            var parentId;console.log(evt)
+            if (evt.target != null && evt.target.group == "nodes") {
+                parentId = evt.target.data.id;
+                x = evt.target.x;
+                y = evt.target.y;
+                x += Math.random() * (evt.target.width/2) * 
(Math.round(x)%2==0 ? 1 : -1);
+                y += Math.random() * (evt.target.height/2) * 
(Math.round(y)%2==0 ? 1 : -1);
+            }
+            var n = vis.addNode(x, y, { weight: Math.random(), label: "New" }, 
parentId, true);
+        })
+        .addContextMenuItem("Add new edge", "nodes", function(evt) {
+               _srcId = evt.target.data.id;
+            vis.removeListener("click", "nodes", clickNodeToAddEdge);
+            vis.addListener("click", "nodes", clickNodeToAddEdge);
+        })
+        .addContextMenuItem("Delete selected", function(evt) {
+            var items = vis.selected();
+            if (items.length > 0) { vis.removeElements(items, true); }
+        });
+    });
+    
+    vis.addListener("error", function(err) {
+               alert(err.value.msg);
+    });
+
+    // Register control liteners:
+    $("#showNodeLabels").change(function(evt) {
+        vis.nodeLabelsVisible($("#showNodeLabels").is(":checked"));
+    });
+    $("#reapplyLayout").click(function(evt) {
+        var layout = vis.layout();
+        vis.layout(layout);
+    });
+
+    draw("/file/example_graphs/compound.graphml");
+        
+});
\ No newline at end of file

Added: cytoscapeweb/trunk/website/src/js/content/demos/simple.js
===================================================================
--- cytoscapeweb/trunk/website/src/js/content/demos/simple.js                   
        (rev 0)
+++ cytoscapeweb/trunk/website/src/js/content/demos/simple.js   2011-10-11 
21:41:17 UTC (rev 27131)
@@ -0,0 +1,192 @@
+/*
+  This file is part of Cytoscape Web.
+  Copyright (c) 2009, The Cytoscape Consortium (www.cytoscape.org)
+
+  The Cytoscape Consortium is:
+    - Agilent Technologies
+    - Institut Pasteur
+    - Institute for Systems Biology
+    - Memorial Sloan-Kettering Cancer Center
+    - National Center for Integrative Biomedical Informatics
+    - Unilever
+    - University of California San Diego
+    - University of California San Francisco
+    - University of Toronto
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+$(function(){
+
+    $("#content").html('\
+        <div class="tools">\
+            <label>Layout:</label>\
+            <select id="layouts">\
+                <option value="ForceDirected" selected="selected">Force 
Directed</option>\
+                <option value="Circle">Circle</option>\
+                <option value="Radial">Radial</option>\
+                <option value="Tree">Tree</option>\
+            </select>\
+            <label for="showNodeLabels">Node Labels</label>\
+            <input type="checkbox" id="showNodeLabels" checked="checked"/> \
+        </div>\
+        <div id="cytoscapeweb" width="*">\
+            Cytoscape Web will replace the contents of this div with your 
graph.\
+        </div>\
+    ');
+
+    var div_id = "cytoscapeweb";
+    var vis;
+    
+    // options used for Cytoscape Web
+    var options = {
+        nodeTooltipsEnabled: true,
+        edgeTooltipsEnabled: true,
+        nodeTooltipsEnabled: true,
+        edgesMerged: false,
+        //mouseDownToDragDelay: -1,
+        visualStyle: {
+            global: {
+                backgroundColor: "#fefefe",
+                tooltipDelay: 1000
+            },
+            nodes: {
+                shape: "ELLIPSE",
+                compoundShape: "ROUND_RECTANGLE",
+                color: { defaultValue: "#cccccc", continuousMapper: { 
attrName: "weight", minValue: "#ffffff", maxValue: "#0b94b1" } },
+                opacity: 0.9,
+                size: { defaultValue: 20, continuousMapper: { attrName: 
"weight",  minValue: 20, maxValue: 40 } },
+                borderWidth: 2,
+                borderColor: "#707070",
+                //image: 
"http://chart.apis.google.com/chart?chs=300x300&cht=p&chd=e0:U-gh..bR";,
+                //compoundImage: 
"http://chart.apis.google.com/chart?chxr=0,0,160&chxt=x&chbh=a&chs=440x220&cht=bhs&chco=4D89F9,C6D9FD&chd=s:GflxYlS,fl9YSYS";,
+                labelFontSize: { defaultValue: 12, continuousMapper: { 
attrName: "weight",  minValue: 10, maxValue: 24 } },
+                tooltipText: { customMapper: { functionName: "onNodeTooltip" } 
},
+                selectionGlowOpacity: 0,
+                selectionBorderColor: "ff0000",
+                hoverBorderWidth: 4
+            },
+            edges: {
+               color: "#0b94b1",
+                width: { defaultValue: 2, continuousMapper: { attrName: 
"weight",  minValue: 2, maxValue: 8 } },
+                mergeWidth: { defaultValue: 2, continuousMapper: { attrName: 
"weight",  minValue: 2, maxValue: 8 } },
+                mergeColor: "#0b94b1",
+                opacity: 0.7,
+                labelFontSize: 10,
+                labelFontWeight: "bold",
+                selectionGlowOpacity: 0,
+                selectionColor: "ff0000",
+                tooltipText: "${weight}"
+             }
+        }   
+    };
+    
+    function draw(data) {
+       $("input, select").attr("disabled", true);
+
+        if (data) {
+                       var layout = { name: "ForceDirected" };
+
+            if (data.indexOf("</graphml>") === -1 && data.indexOf("</graph>") 
> -1) { // XGMML...
+               layout = { name: "Preset", options: { fitToScreen: true } };
+            } else { // GraphML or SIF
+                layout = { name: $("#layouts").val(), options: { weightAttr: 
"weight", restLength: 50, autoStabilize: false } };
+                       }
+
+                       options.layout = layout;
+               options.network = data;
+            options.nodeLabelsVisible = $("#showNodeLabels").is(":checked");
+
+               d1 = new Date();
+               vis.draw(options);
+        } else {
+            var url = "/file/example_graphs/sample3.graphml";
+            $.get(url, function(dt) {
+                if (typeof dt !== "string") {
+                    if (window.ActiveXObject) {
+                        dt = dt.xml;
+                    } else {
+                        dt = (new XMLSerializer()).serializeToString(dt);
+                    }
+                }
+                draw(dt);
+            });
+        }
+    }
+
+    var _srcId;
+    function clickNodeToAddEdge(evt) {
+        if (_srcId != null) {
+               vis.removeListener("click", "nodes", clickNodeToAddEdge);
+               var e = vis.addEdge({ source: _srcId, target: 
evt.target.data.id, }, true);
+               _srcId = null;
+        }
+    }
+    
+    $("input").attr("disabled", true);
+
+    // init and draw
+    vis = new org.cytoscapeweb.Visualization(div_id, { swfPath: 
"/swf/CytoscapeWeb" });
+    
+    vis.ready(function() {
+        var layout = vis.layout();
+        $("#layouts").val(layout.name);
+        $("input, select").attr("disabled", false);
+        $("#showNodeLabels").attr("checked", vis.nodeLabelsVisible());
+        
+        vis.addContextMenuItem("Delete node", "nodes", function(evt) {
+            vis.removeNode(evt.target.data.id, true);
+        })
+        .addContextMenuItem("Delete edge", "edges", function(evt) {
+            vis.removeEdge(evt.target.data.id, true);
+        })
+        .addContextMenuItem("Add new node", function(evt) {
+            var x = evt.mouseX;
+            var y = evt.mouseY;
+            var parentId;console.log(evt)
+            if (evt.target != null && evt.target.group == "nodes") {
+                parentId = evt.target.data.id;
+                x = evt.target.x;
+                y = evt.target.y;
+                x += Math.random() * (evt.target.width/2) * 
(Math.round(x)%2==0 ? 1 : -1);
+                y += Math.random() * (evt.target.height/2) * 
(Math.round(y)%2==0 ? 1 : -1);
+            }
+            var n = vis.addNode(x, y, { weight: Math.random(), label: "New" }, 
parentId, true);
+        })
+        .addContextMenuItem("Add new edge", "nodes", function(evt) {
+               _srcId = evt.target.data.id;
+            vis.removeListener("click", "nodes", clickNodeToAddEdge);
+            vis.addListener("click", "nodes", clickNodeToAddEdge);
+        })
+        .addContextMenuItem("Delete selected", function(evt) {
+            var items = vis.selected();
+            if (items.length > 0) { vis.removeElements(items, true); }
+        });
+    });
+    
+    vis.addListener("error", function(err) {
+               alert(err.value.msg);
+    });
+
+    // Register control liteners:
+    $("#layouts").change(function(evt) {
+        vis.layout($("#layouts").val());
+    });
+    $("#showNodeLabels").change(function(evt) {
+        vis.nodeLabelsVisible($("#showNodeLabels").is(":checked"));
+    });
+
+    draw();
+        
+});
\ No newline at end of file

Modified: cytoscapeweb/trunk/website/src/js/content/home.js
===================================================================
--- cytoscapeweb/trunk/website/src/js/content/home.js   2011-10-11 20:57:49 UTC 
(rev 27130)
+++ cytoscapeweb/trunk/website/src/js/content/home.js   2011-10-11 21:41:17 UTC 
(rev 27131)
@@ -46,7 +46,7 @@
                        edgeTooltipsEnabled: false,
                        swfPath: "/swf/CytoscapeWeb",
                        flashInstallerPath: "/swf/playerProductInstall",
-               layout: "Preset"
+               layout: { name: "Preset", fitToScreen: true }
            };
            
            var vis = new org.cytoscapeweb.Visualization("viz", options);

Added: cytoscapeweb/trunk/website/src/php/content/demos.declaration.php
===================================================================
--- cytoscapeweb/trunk/website/src/php/content/demos.declaration.php            
                (rev 0)
+++ cytoscapeweb/trunk/website/src/php/content/demos.declaration.php    
2011-10-11 21:41:17 UTC (rev 27131)
@@ -0,0 +1,16 @@
+<?php
+
+       $page_links = array(
+        "simple"   => "Simple",
+        "compound" => "Compound Nodes",
+    );
+    
+    $content_style="half_and_half";
+    
+    include_js("/js/jquery/jquery-1.3.2.min.js");
+    include_js("/js/cytoscape_web/json2.min.js");
+    include_js("/js/cytoscape_web/AC_OETags.min.js");
+    include_js("/js/cytoscape_web/cytoscapeweb.min.js");
+
+
+?>
\ No newline at end of file

Added: cytoscapeweb/trunk/website/src/php/content/demos.php
===================================================================
--- cytoscapeweb/trunk/website/src/php/content/demos.php                        
        (rev 0)
+++ cytoscapeweb/trunk/website/src/php/content/demos.php        2011-10-11 
21:41:17 UTC (rev 27131)
@@ -0,0 +1,9 @@
+<div class="left">
+    <h1>Please enable Javascript</h1>
+    <p>Javascript is not enabled in your browser, and it is necessary to have 
Javascript enabled to view this demo.</p>
+    <p>Please enable Javascript, and then reload this page.</p>
+</div>
+<div class="right">
+    <h1>What if my browser does not support Javascript?</h1>
+    <p>Please consider <a href="http://www.mozilla.com";>upgrading your 
browser</a>.</p>
+</div>
\ No newline at end of file

Modified: cytoscapeweb/trunk/website/src/php/layout/declaration.php
===================================================================
--- cytoscapeweb/trunk/website/src/php/layout/declaration.php   2011-10-11 
20:57:49 UTC (rev 27130)
+++ cytoscapeweb/trunk/website/src/php/layout/declaration.php   2011-10-11 
21:41:17 UTC (rev 27131)
@@ -24,7 +24,7 @@
         "tutorial" => "Tutorial",
         "faq" => "FAQ",
         "documentation" => "Documentation",
-        "demo" => "Demo",
+        "demos" => "Demos",
         "news" => "News",
         "about" => "About",
         "contact" => "Contact"
@@ -66,6 +66,11 @@
            $include = "php/content/$navigation_link" . (($page_link != "") ? 
("/$page_link") : ("")) . ".php";
        }
        
+       // default to parent if child does not exist
+       if( !file_exists($include) ){
+               $include = "php/content/$navigation_link" . ".php";
+       }
+       
        switch( $content_style ) {
            case "side":
                include_js("/js/layout/side.js");

Modified: cytoscapeweb/trunk/website/src/php/layout/header.php
===================================================================
--- cytoscapeweb/trunk/website/src/php/layout/header.php        2011-10-11 
20:57:49 UTC (rev 27130)
+++ cytoscapeweb/trunk/website/src/php/layout/header.php        2011-10-11 
21:41:17 UTC (rev 27131)
@@ -59,7 +59,7 @@
     <body>
        
         <div id="header" class="slice">
-            <a href="/" title="Home"><div id="logo"></div></a>
+            <a href="/" title="Home"><div id="logo">Cytoscape Web</div></a>
             
             <div id="navigation_links">
                 <ul>

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to