Author: Christian Lopes Date: 2010-01-15 16:24:26 -0800 (Fri, 15 Jan 2010) New Revision: 18947
Modified: cytoscapeweb/trunk/website/build.xml cytoscapeweb/trunk/website/default.properties cytoscapeweb/trunk/website/src/css/content/documentation.css cytoscapeweb/trunk/website/src/css/layout.css cytoscapeweb/trunk/website/src/file/example_code/getting_started.html cytoscapeweb/trunk/website/src/file/example_code/interacting.html cytoscapeweb/trunk/website/src/file/example_code/style.html cytoscapeweb/trunk/website/src/js/content/demo.js cytoscapeweb/trunk/website/src/js/content/home.js cytoscapeweb/trunk/website/src/php/content/ cytoscapeweb/trunk/website/src/php/content/contact.php cytoscapeweb/trunk/website/src/php/content/documentation/list_functions.php cytoscapeweb/trunk/website/src/php/content/documentation/tutorial.php cytoscapeweb/trunk/website/src/php/content/download.php Log: Fixed errors: - #2133: Error in documentation (labelsVisible is not a valid option) - #2136: API doc for PassthroughMapper has incorrect example Improved Documentation: better visual styles example and CSS styles for function options. Added info about the discussion group to the Contact page. Added a link to browse the source code at http://chianti.ucsd.edu/svn/cytoscapeweb/ (Download page). Modified: cytoscapeweb/trunk/website/build.xml =================================================================== --- cytoscapeweb/trunk/website/build.xml 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/build.xml 2010-01-16 00:24:26 UTC (rev 18947) @@ -18,7 +18,6 @@ <property name="cw.dir" value="${CYTOSCAPEWEB_HOME}"/> <property name="cw.bin.dir" value="${cw.dir}/bin"/> <property name="cw.build.dir" value="${cw.dir}/build"/> - <property name="cw.build.version" value="${cw.dir}/build"/> <!-- From the File sub-project --> <property name="cwfile.dir" value="${CW_FILE_HOME}"/> @@ -31,19 +30,19 @@ <property name="swf.dir" value="${src.dir}/swf"/> <property name="download.dir" value="${src.dir}/file/lib"/> <property name="php.dir" value="${src.dir}/php"/> - <property name="api.dir" value="${php.dir}/content/documentation/api/${build.version}"/> + <property name="api.dir" value="${php.dir}/content/documentation/api/${cw.build.version}"/> <tstamp> <format property="date.today" pattern="yyyy-MM-dd"/> </tstamp> <tstamp> - <format property="date.now" pattern="yyyyMMdd-HHmm"/> + <format property="date.now" pattern="yyyyMMddHHmm"/> </tstamp> <target name="build" depends="files, api"> <delete dir="${build.dir}" /> <mkdir dir="${build.dir}"/> - <zip destfile="${build.dir}/cytoscapeweb_site_${date.now}.zip" + <zip destfile="${build.dir}/cwsite_v${build.version}_${date.now}.zip" basedir="${src.dir}" update="true" excludes="cache/**" @@ -126,7 +125,7 @@ </copy> <!-- Copy the downloadable zip file --> <copy todir="${download.dir}" overwrite="true"> - <fileset dir="${cw.dir}/build" includes="*.zip"/> + <fileset dir="${cw.dir}/build" includes="cytoscapeweb_v${cw.build.version}.zip"/> </copy> </target> Modified: cytoscapeweb/trunk/website/default.properties =================================================================== --- cytoscapeweb/trunk/website/default.properties 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/default.properties 2010-01-16 00:24:26 UTC (rev 18947) @@ -1,4 +1,7 @@ -build.version=0.3 +# Website version +build.version=0.1.2 +# The released Cytoscape Web version (downloadable zip & API doc) +cw.build.version=0.3 CYTOSCAPEWEB_HOME=../cytoscapeweb CW_FILE_HOME=../file \ No newline at end of file Modified: cytoscapeweb/trunk/website/src/css/content/documentation.css =================================================================== --- cytoscapeweb/trunk/website/src/css/content/documentation.css 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/css/content/documentation.css 2010-01-16 00:24:26 UTC (rev 18947) @@ -9,6 +9,7 @@ .api h1 { } .api .arguments, .api .field_type { color: #707070; font-size: 0.75em; } .parameter + .parameter, .return_value + .return_value, .field + .field { border-top: 1px dashed #cfcfcf; } +.options code:first-child { color: #0B94B1; } .examples { padding-top: 0.5em; } .examples .example, .examples .pre_plain { margin-bottom: 1em; } .api h1 { } Modified: cytoscapeweb/trunk/website/src/css/layout.css =================================================================== --- cytoscapeweb/trunk/website/src/css/layout.css 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/css/layout.css 2010-01-16 00:24:26 UTC (rev 18947) @@ -36,7 +36,7 @@ li { margin: 0.5em 0 0.5em 0; } li:first-child { margin: 0; } em { font-weight: bold; font-style: normal; } -code { line-height: 1.5; color: #000000; font-size: 0.85em; font-weight: normal; font-family: "Monaco", "Courier New", monospace; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; } +code { line-height: 1.5; color: #000000; font-size: 0.85em; font-family: "Monaco", "Courier New", monospace; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; } pre, .pre_plain { line-height: 1; color: #000000; font-size: 0.85em; font-weight: normal; font-family: "Monaco", "Courier New", monospace; background-color: #ffffff; border: #cfcfcf 1px solid; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; padding: 1em; overflow: auto; display: block; } pre code { font-size: 1em; line-height: 1; } pre.collapsed { background-image: url("../img/layout/grey_arrow_more.png"); background-repeat: repeat-y; background-position: center right; } Modified: cytoscapeweb/trunk/website/src/file/example_code/getting_started.html =================================================================== --- cytoscapeweb/trunk/website/src/file/example_code/getting_started.html 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/file/example_code/getting_started.html 2010-01-16 00:24:26 UTC (rev 18947) @@ -14,42 +14,37 @@ <script type="text/javascript" src="/js/cytoscape_web/cytoscapeweb.min.js"></script> <script type="text/javascript"> - window.onload=function(){ + window.onload=function() { // id of Cytoscape Web container div var div_id = "cytoscapeweb"; // network data could alternatively be grabbed via ajax - var network = '\ + var xml = '\ <graphml>\ - <graph edgedefault="undirected">\ - <node id="1"></node>\ - <node id="2"></node>\ - <edge target="1" source="2"></edge>\ + <graph>\ + <node id="1"/>\ + <node id="2"/>\ + <edge target="1" source="2"/>\ </graph>\ </graphml>\ '; - // options used for Cytoscape Web + // initialization options var options = { // where you have the Cytoscape Web SWF swfPath: "/swf/CytoscapeWeb", - // where you have the Flash installer SWF - flashInstallerPath: "/swf/playerProductInstall", - - // your data goes here - network: network + flashInstallerPath: "/swf/playerProductInstall" }; // init and draw var vis = new org.cytoscapeweb.Visualization(div_id, options); - vis.draw(options); + vis.draw({ network: xml }); }; </script> <style> - /* The Cytoscape Web container must have its - dimensions set. */ + /* The Cytoscape Web container must have its dimensions set. */ html, body { height: 100%; width: 100%; padding: 0; margin: 0; } #cytoscapeweb { width: 100%; height: 100%; } </style> @@ -57,8 +52,7 @@ <body> <div id="cytoscapeweb"> - Cytoscape Web will replace the contents of this - div with your graph. + Cytoscape Web will replace the contents of this div with your graph. </div> </body> Modified: cytoscapeweb/trunk/website/src/file/example_code/interacting.html =================================================================== --- cytoscapeweb/trunk/website/src/file/example_code/interacting.html 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/file/example_code/interacting.html 2010-01-16 00:24:26 UTC (rev 18947) @@ -4,22 +4,17 @@ <head> <title>Cytoscape Web example</title> - <!-- Flash embedding utility (needed to embed Cytoscape Web) --> <script type="text/javascript" src="/js/cytoscape_web/AC_OETags.min.js"></script> - - <!-- JSON support for IE (needed to use JS API) --> <script type="text/javascript" src="/js/cytoscape_web/json2.min.js"></script> - - <!-- Cytoscape Web JS API (needed to reference org.cytoscapeweb.Visualization) --> <script type="text/javascript" src="/js/cytoscape_web/cytoscapeweb.min.js"></script> <script type="text/javascript"> - window.onload=function(){ + window.onload = function() { // id of Cytoscape Web container div var div_id = "cytoscapeweb"; // NOTE the attributes on nodes and edges - var network = '\ + var xml = '\ <graphml>\ <key id="label" for="all" attr.name="label" attr.type="string"/>\ <key id="foo" for="node" attr.name="foo" attr.type="string"/>\ @@ -41,62 +36,55 @@ </graphml>\ '; - // options used for Cytoscape Web + // initialization options var options = { - // where you have the Cytoscape Web SWF swfPath: "/swf/CytoscapeWeb", - - // where you have the Flash installer SWF - flashInstallerPath: "/swf/playerProductInstall", - - // your data goes here - network: network, - - // show labels - labelsVisible: true, - - // hide pan zoom - panZoomControlVisible: false + flashInstallerPath: "/swf/playerProductInstall" }; var vis = new org.cytoscapeweb.Visualization(div_id, options); // callback when Cytoscape Web has finished drawing - vis.ready(function(){ + vis.ready(function() { // add a listener for when nodes and edges are clicked - vis.addListener("click", "nodes", function(event){ + vis.addListener("click", "nodes", function(event) { handle_click(event); - }); - vis.addListener("click", "edges", function(event){ + }) + .addListener("click", "edges", function(event) { handle_click(event); }); - function handle_click(event){ + function handle_click(event) { var target = event.target; clear(); print("event.group = " + event.group); - for(var i in target.data){ + for (var i in target.data) { var variable_name = i; var variable_value = target.data[i]; - print( "event.target.data." + variable_name + " = " + variable_value ); } } - function clear(){ + function clear() { document.getElementById("note").innerHTML = ""; } - function print(msg){ + function print(msg) { document.getElementById("note").innerHTML += "<p>" + msg + "</p>"; } }); + + // draw options + var draw_options = { + // your data goes here + network: xml, + // hide pan zoom + panZoomControlVisible: false + }; - vis.draw(options); - - + vis.draw(draw_options); }; </script> Modified: cytoscapeweb/trunk/website/src/file/example_code/style.html =================================================================== --- cytoscapeweb/trunk/website/src/file/example_code/style.html 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/file/example_code/style.html 2010-01-16 00:24:26 UTC (rev 18947) @@ -4,50 +4,53 @@ <head> <title>Cytoscape Web example</title> - <!-- Flash embedding utility (needed to embed Cytoscape Web) --> <script type="text/javascript" src="/js/cytoscape_web/AC_OETags.min.js"></script> - - <!-- JSON support for IE (needed to use JS API) --> <script type="text/javascript" src="/js/cytoscape_web/json2.min.js"></script> - - <!-- Cytoscape Web JS API (needed to reference org.cytoscapeweb.Visualization) --> <script type="text/javascript" src="/js/cytoscape_web/cytoscapeweb.min.js"></script> <script type="text/javascript"> - window.onload=function(){ + window.onload = function() { // id of Cytoscape Web container div var div_id = "cytoscapeweb"; - // NOTE the attributes on nodes and edges - var network = '\ + // NOTE: - the attributes on nodes and edges + // - it also has directed edges, which will automatically display edge arrows + var xml = '\ <graphml>\ <key id="label" for="all" attr.name="label" attr.type="string"/>\ <key id="weight" for="node" attr.name="weight" attr.type="double"/>\ - <graph edgedefault="undirected">\ + <graph edgedefault="directed">\ <node id="1">\ - <data key="label">1</data>\ - <data key="weight">1.0</data>\ + <data key="label">A</data>\ + <data key="weight">2.0</data>\ </node>\ <node id="2">\ - <data key="label">2</data>\ - <data key="weight">2.0</data>\ + <data key="label">B</data>\ + <data key="weight">1.5</data>\ </node>\ - <edge target="1" source="2">\ - <data key="label">2 to 1</data>\ + <node id="3">\ + <data key="label">C</data>\ + <data key="weight">1.0</data>\ + </node>\ + <edge source="1" target="2">\ + <data key="label">A to B</data>\ </edge>\ + <edge source="1" target="3">\ + <data key="label">A to C</data>\ + </edge>\ </graph>\ </graphml>\ '; - function rand_colour(){ - function rand_channel(){ + function rand_color() { + function rand_channel() { return Math.round( Math.random() * 255 ); } - function hex_string(num){ + function hex_string(num) { var ret = num.toString(16); - if( ret.length < 2 ){ + if (ret.length < 2) { return "0" + ret; } else { return ret; @@ -64,91 +67,79 @@ // visual style we will use var visual_style = { global: { - backgroundColor: "#ffffff" + backgroundColor: "#ABCFD6" }, - nodes: { + shape: "OCTAGON", borderWidth: 3, - + borderColor: "#ffffff", size: { - defaultValue: 50, - continuousMapper: { - attrName: "weight", - minValue: 50, - maxValue: 100 - } + defaultValue: 25, + continuousMapper: { attrName: "weight", minValue: 25, maxValue: 75 } }, - color: { discreteMapper: { attrName: "id", entries: [ { attrValue: 1, value: "#0B94B1" }, - { attrValue: 2, value: "#9A0B0B" } + { attrValue: 2, value: "#9A0B0B" }, + { attrValue: 3, value: "#dddd00" } ] } - } + }, + labelHorizontalAnchor: "center" }, - - edges: { width: 3, - color: "#000000" + color: "#0B94B1", + label: { passthroughMapper: { attrName: "label" } } } }; - - - // options used for Cytoscape Web + // initialization options var options = { - // where you have the Cytoscape Web SWF swfPath: "/swf/CytoscapeWeb", - - // where you have the Flash installer SWF - flashInstallerPath: "/swf/playerProductInstall", - - // your data goes here - network: network, - - // show labels - labelsVisible: true, - - // hide pan zoom - panZoomControlVisible: false, - - // set the style at initialisation - visualStyle: visual_style + flashInstallerPath: "/swf/playerProductInstall" }; var vis = new org.cytoscapeweb.Visualization(div_id, options); - vis.ready(function(){ + vis.ready(function() { // set the style programmatically - document.getElementById("colour").onclick = function(){ - var colour = rand_colour(); - - visual_style.global.backgroundColor = colour; + document.getElementById("color").onclick = function(){ + visual_style.global.backgroundColor = rand_color(); vis.visualStyle(visual_style); - - document.getElementById("colour_code").innerHTML = "Colour changed to " + colour; }; }); + + var draw_options = { + // your data goes here + network: xml, + + // show edge labels too + edgeLabelsVisible: true, + + // let's try another layout + layout: "Tree", + + // set the style at initialisation + visualStyle: visual_style, + + // hide pan zoom + panZoomControlVisible: false + }; - vis.draw(options); - - + vis.draw(draw_options); }; </script> <style> * { margin: 0; padding: 0; font-family: Helvetica, Arial, Verdana, sans-serif; } - html, body { height: 100%; width: 100%; padding: 0; margin: 0; } + html, body { height: 100%; width: 100%; padding: 0; margin: 0; background-color: #f0f0f0; } body { line-height: 1.5; color: #000000; font-size: 14px; } /* The Cytoscape Web container must have its dimensions set. */ - #cytoscapeweb { width: 100%; height: 50%; } - #note { width: 100%; height: 50%; background-color: #f0f0f0; } - p { padding: 0 0.5em; margin: 0; } - p:first-child { padding-top: 0.5em; } + #cytoscapeweb { width: 100%; height: 80%; } + #note { width: 100%; text-align: center; padding-top: 1em; } .link { text-decoration: underline; color: #0b94b1; cursor: pointer; } </style> </head> @@ -158,8 +149,7 @@ Cytoscape Web will replace the contents of this div with your graph. </div> <div id="note"> - <p> <span class="link" id="colour">Colour me surprised</span>. </p> - <p> <span id="colour_code"></span> </p> + <span class="link" id="color">Color me surprised</span> </div> </body> Modified: cytoscapeweb/trunk/website/src/js/content/demo.js =================================================================== --- cytoscapeweb/trunk/website/src/js/content/demo.js 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/js/content/demo.js 2010-01-16 00:24:26 UTC (rev 18947) @@ -327,7 +327,8 @@ var default_options = { panZoomControlVisible: true, edgesMerged: false, - labelsVisible: true, + nodeLabelsVisible: true, + edgeLabelsVisible: true, nodeTooltipsEnabled: true, edgeTooltipsEnabled: true, swfPath: path("swf/CytoscapeWeb"), Modified: cytoscapeweb/trunk/website/src/js/content/home.js =================================================================== --- cytoscapeweb/trunk/website/src/js/content/home.js 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/js/content/home.js 2010-01-16 00:24:26 UTC (rev 18947) @@ -36,8 +36,8 @@ var options = { panZoomControlVisible: false, edgesMerged: false, - labelsVisible: false, nodeLabelsVisible: false, + edgeLabelsVisible: false, nodeTooltipsEnabled: false, edgeTooltipsEnabled: false, swfPath: "/swf/CytoscapeWeb", Property changes on: cytoscapeweb/trunk/website/src/php/content ___________________________________________________________________ Name: svn:ignore + contact.email.php Modified: cytoscapeweb/trunk/website/src/php/content/contact.php =================================================================== --- cytoscapeweb/trunk/website/src/php/content/contact.php 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/php/content/contact.php 2010-01-16 00:24:26 UTC (rev 18947) @@ -84,6 +84,10 @@ <h1>Guidelines</h1> + <h2>Discussion Group</h2> + + <p>The Cytoscape Web <a href="http://groups.google.com/group/cytoscapeweb-discuss">discussion group</a> is the main forum for users to share questions, solutions and new ideas.</p> + <h2>Reporting software bugs</h2> <p>The best way to report a bug to us is to <a href="http://cbio.mskcc.org/cytoscape/bugs">use our bug tracker</a>. However, if you find it difficult to use the bug tracker, feel free to use the contact form on this page to contact us about the bug.</p> Modified: cytoscapeweb/trunk/website/src/php/content/documentation/list_functions.php =================================================================== --- cytoscapeweb/trunk/website/src/php/content/documentation/list_functions.php 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/php/content/documentation/list_functions.php 2010-01-16 00:24:26 UTC (rev 18947) @@ -146,7 +146,7 @@ $descr .= ($param->optional ? "[ " : ""); $descr .= "<em>$param->name</em>"; $descr .= ($param->optional ? " ]" : ""); - $descr .= ($param->type ? " <span class=\"type\">(" . parse_clsrefs($param->type) . ")</span>" : ""); + $descr .= ($param->type ? " <span class=\"type\">{" . parse_clsrefs($param->type) . "}</span>" : ""); if ($param->description){ $descr .= " : "; } @@ -161,7 +161,7 @@ $return_value = $fn->return_value; echo "<label>Return value</label>"; if( $return_value ) { - $descr = ($return_value->type ? "(" . parse_clsrefs($return_value->type) . ") " : ""); + $descr = ($return_value->type ? "{" . parse_clsrefs($return_value->type) . "} " : ""); echo "<div class=\"return_value\">"; echo parse_para( parse_links($return_value->description), $descr ); @@ -182,7 +182,7 @@ echo "<div class=\"field\">"; $descr = ""; $descr .= "<em>$field->name</em>"; - $descr .= ($field->type ? " <span class=\"type\">(" . parse_clsrefs($field->type) . ")</span>" : ""); + $descr .= ($field->type ? " <span class=\"type\">{" . parse_clsrefs($field->type) . "}</span>" : ""); $descr .= ($field->description ? " : " : ""); echo parse_para( parse_links($field->description), $descr ); Modified: cytoscapeweb/trunk/website/src/php/content/documentation/tutorial.php =================================================================== --- cytoscapeweb/trunk/website/src/php/content/documentation/tutorial.php 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/php/content/documentation/tutorial.php 2010-01-16 00:24:26 UTC (rev 18947) @@ -85,7 +85,7 @@ <?php print_code("file/example_code/style.html"); ?> <p>The style is set at initialisation. Additionally, clicking the link changes the visual - style programattically by changing the background colour to a randomly selected colour for + style programattically by changing the background color to a randomly selected color for each click.</p> <?php embed_code("file/example_code/style.html"); ?> Modified: cytoscapeweb/trunk/website/src/php/content/download.php =================================================================== --- cytoscapeweb/trunk/website/src/php/content/download.php 2010-01-16 00:04:59 UTC (rev 18946) +++ cytoscapeweb/trunk/website/src/php/content/download.php 2010-01-16 00:24:26 UTC (rev 18947) @@ -40,9 +40,22 @@ <h1>Source Code</h1> <div class="description"> - <p>In order to download the latest Cytoscape Web source code from our - <a href="http://subversion.tigris.org">Subversion</a> server, use the following command:</p> - <pre class="ln- collapsed">svn checkout http://chianti.ucsd.edu/svn/cytoscapeweb/trunk cytoscapeweb-read-only</pre> + <p> + You can browse the Cytoscape Web source code <a href="http://chianti.ucsd.edu/svn/cytoscapeweb/">here</a>. + </p> + <p> + If you want to download the latest source from our + <a href="http://subversion.tigris.org">Subversion</a> server, use one of the following commands. + </p> + <p> + Download only the Cytoscape Web project: + <pre class="ln- collapsed">svn checkout http://chianti.ucsd.edu/svn/cytoscapeweb/trunk/cytoscapeweb cytoscapeweb-read-only</pre> + </p> + <p> </p> + <p> + Download Cytoscape Web and the website, including the demo application: + <pre class="ln- collapsed">svn checkout http://chianti.ucsd.edu/svn/cytoscapeweb/trunk cytoscapeweb-all-read-only</pre> + </p> </div> </div> \ No newline at end of file
-- 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.
