<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API: composable-plugin ComposedContainer.js (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
<link rel="stylesheet" type="text/css" href="assets/api.css" />
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://neyric.github.com/wireit" title="WireItLibrary">WireItLibrary</a></h1>
<h3>composable-plugin <span class="subtitle">0.6.0</span></h3>
<a href="./index.html" title="WireItLibrary">WireItLibrary</a>
> <a href="./module_composable-plugin.html" title="composable-plugin">composable-plugin</a>
> ComposedContainer.js (source view)
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<div id="srcout">
<style>
#doc3 .classopts { display:none; }
</style>
<div class="highlight"><pre><span class="c">/**</span>
<span class="c"> * ComposedContainer is a class for Container representing Pipes.</span>
<span class="c"> * It automatically generates the inputEx Form from the input Params.</span>
<span class="c"> *</span>
<span class="c"> * @class ComposedContainer</span>
<span class="c"> * @extends WireIt.FormContainer</span>
<span class="c"> * @constructor</span>
<span class="c"> */</span>
<span class="nx">WireIt</span><span class="p">.</span><span class="nx">ComposedContainer</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">options</span><span class="o">,</span> <span class="nx">layer</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">options</span><span class="p">.</span><span class="nx">fields</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">options</span><span class="p">.</span><span class="nx">fields</span> <span class="o">=</span> <span class="p">[];</span>
<span class="nx">options</span><span class="p">.</span><span class="nx">terminals</span> <span class="o">=</span> <span class="p">[];</span>
<span class="kd">var</span> <span class="nx">pipe</span> <span class="o">=</span> <span class="nx">options</span><span class="p">.</span><span class="nx">wiring</span><span class="p">.</span><span class="nx">working</span><span class="o">;</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span> <span class="o">;</span> <span class="nx">i</span> <span class="o"><</span> <span class="nx">pipe</span><span class="p">.</span><span class="nx">modules</span><span class="p">.</span><span class="nx">length</span> <span class="o">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">pipe</span><span class="p">.</span><span class="nx">modules</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
<span class="k">if</span><span class="p">(</span> <span class="nx">m</span><span class="p">.</span><span class="nx">name</span> <span class="o">==</span> <span class="s2">"input"</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">m</span><span class="p">.</span><span class="nx">value</span><span class="p">.</span><span class="nx">input</span><span class="p">.</span><span class="nx">wirable</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="nx">options</span><span class="p">.</span><span class="nx">fields</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">value</span><span class="p">.</span><span class="nx">input</span><span class="p">);</span>
<span class="p">}</span>
<span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">name</span> <span class="o">==</span> <span class="s2">"output"</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">options</span><span class="p">.</span><span class="nx">terminals</span><span class="p">.</span><span class="nx">push</span><span class="p">({</span>
<span class="nx">name</span><span class="o">:</span> <span class="nx">m</span><span class="p">.</span><span class="nx">value</span><span class="p">.</span><span class="nx">name</span><span class="o">,</span>
<span class="s2">"direction"</span><span class="o">:</span> <span class="p">[</span><span class="mi">0</span><span class="o">,</span><span class="mi">1</span><span class="p">]</span><span class="o">,</span>
<span class="s2">"offsetPosition"</span><span class="o">:</span> <span class="p">{</span><span class="s2">"left"</span><span class="o">:</span> <span class="nx">options</span><span class="p">.</span><span class="nx">terminals</span><span class="p">.</span><span class="nx">length</span><span class="o">*</span><span class="mi">40</span><span class="o">,</span> <span class="s2">"bottom"</span><span class="o">:</span> <span class="o">-</span><span class="mi">15</span><span class="p">}</span><span class="o">,</span>
<span class="s2">"ddConfig"</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">"type"</span><span class="o">:</span> <span class="s2">"output"</span><span class="o">,</span>
<span class="s2">"allowedTypes"</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input"</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="nx">WireIt</span><span class="p">.</span><span class="nx">ComposedContainer</span><span class="p">.</span><span class="nx">superclass</span><span class="p">.</span><span class="nx">constructor</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">options</span><span class="o">,</span> <span class="nx">layer</span><span class="p">);</span>
<span class="p">};</span>
<span class="nx">YAHOO</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span><span class="nx">WireIt</span><span class="p">.</span><span class="nx">ComposedContainer</span><span class="o">,</span> <span class="nx">WireIt</span><span class="p">.</span><span class="nx">FormContainer</span><span class="p">);</span>
</pre></div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_animations-plugin.html" title="animations-plugin">animations-plugin</a></li>
<li class="selected"><a href="module_composable-plugin.html" title="composable-plugin">composable-plugin</a></li>
<li class=""><a href="module_editor-plugin.html" title="editor-plugin">editor-plugin</a></li>
<li class=""><a href="module_inputex-plugin.html" title="inputex-plugin">inputex-plugin</a></li>
<li class=""><a href="module_layout-plugin.html" title="layout-plugin">layout-plugin</a></li>
<li class=""><a href="module_wireit.html" title="WireIt">WireIt</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="WireIt.util.ComposableWiringEditor.html" title="WireIt.util.ComposableWiringEditor">WireIt.util.ComposableWiringEditor</a></li>
<li class=""><a href="WireIt.util.ComposedContainer.html" title="WireIt.util.ComposedContainer">WireIt.util.ComposedContainer</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="BaseEditor.js.html" title="BaseEditor.js">BaseEditor.js</a></li>
<li class="selected"><a href="ComposedContainer.js.html" title="ComposedContainer.js">ComposedContainer.js</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2010 Eric Abouaf All rights reserved.
</div>
</div>
<script type="text/javascript">
var ALL_YUI_PROPS = [{"url": "WireIt.util.ComposableWiringEditor.html#property_composedCategory", "access": "", "host": "WireIt.util.ComposableWiringEditor", "type": "property", "name": "composedCategory"}, {"url": "WireIt.util.ComposableWiringEditor.html#property_modules", "access": "", "host": "WireIt.util.ComposableWiringEditor", "type": "property", "name": "modules"}, {"url": "WireIt.util.ComposableWiringEditor.html#method_onLoadSuccess", "access": "", "host": "WireIt.util.ComposableWiringEditor", "type": "method", "name": "onLoadSuccess"}, {"url": "WireIt.util.ComposableWiringEditor.html#method_updateComposedModuleList", "access": "", "host": "WireIt.util.ComposableWiringEditor", "type": "method", "name": "updateComposedModuleList"}];
</script>
</body>
</html>
# |
Change |
User |
Description |
Committed |
|
#1
|
16445 |
christiane_renck |
Rename/move file(s) |
|
|
//guest/christiane_renck/MergeQuestJS/main/demos/WireIt/api/ComposedContainer.js.html |
#1
|
16444 |
christiane_renck |
Adding MergeQuestJS to the Workshop. |
|
|