<!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: inputex-plugin fields.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>inputex-plugin <span class="subtitle">0.6.0</span></h3>
<a href="./index.html" title="WireItLibrary">WireItLibrary</a>
> <a href="./module_inputex-plugin.html" title="inputex-plugin">inputex-plugin</a>
> fields.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">// this file ovveride many functions on inputEx fields to make them wirable</span>
<span class="c">/**</span>
<span class="c"> * setFieldName might change the name of the terminal</span>
<span class="c"> */</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">StringField</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">setFieldName</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">name</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">el</span><span class="p">.</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span><span class="o">;</span>
<span class="k">if</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">terminal</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">terminal</span><span class="p">.</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span><span class="o">;</span>
<span class="k">this</span><span class="p">.</span><span class="nx">terminal</span><span class="p">.</span><span class="nx">el</span><span class="p">.</span><span class="nx">title</span> <span class="o">=</span> <span class="nx">name</span><span class="o">;</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="c">/**</span>
<span class="c"> * Groups must set the container recursively</span>
<span class="c"> */</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">Group</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">setContainer</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">container</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">Group</span><span class="p">.</span><span class="nx">superclass</span><span class="p">.</span><span class="nx">setContainer</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">container</span><span class="p">);</span>
<span class="c">// Group and inherited fields must set this recursively</span>
<span class="k">if</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">inputs</span><span class="p">)</span> <span class="p">{</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="k">this</span><span class="p">.</span><span class="nx">inputs</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="k">this</span><span class="p">.</span><span class="nx">inputs</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">setContainer</span><span class="p">(</span><span class="nx">container</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="c">/**</span>
<span class="c"> * List must set the container recursively</span>
<span class="c"> */</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">ListField</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">setContainer</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">container</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">ListField</span><span class="p">.</span><span class="nx">superclass</span><span class="p">.</span><span class="nx">setContainer</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">container</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">subFields</span><span class="p">)</span> <span class="p">{</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="k">this</span><span class="p">.</span><span class="nx">subFields</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="k">this</span><span class="p">.</span><span class="nx">subFields</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">setContainer</span><span class="p">(</span><span class="nx">container</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="c">/**</span>
<span class="c"> * setContainer must be called on each new element</span>
<span class="c"> */</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">ListField</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">_addElement</span> <span class="o">=</span> <span class="nx">inputEx</span><span class="p">.</span><span class="nx">ListField</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">addElement</span><span class="o">;</span>
<span class="nx">inputEx</span><span class="p">.</span><span class="nx">ListField</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">addElement</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">value</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_addElement</span><span class="p">(</span><span class="nx">value</span><span class="p">);</span>
<span class="nx">f</span><span class="p">.</span><span class="nx">setContainer</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">options</span><span class="p">.</span><span class="nx">container</span><span class="p">);</span>
<span class="k">return</span> <span class="nx">f</span><span class="o">;</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=""><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="selected"><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="inputEx.BaseField.html" title="inputEx.BaseField">inputEx.BaseField</a></li>
<li class=""><a href="inputEx.Field.html" title="inputEx.Field">inputEx.Field</a></li>
<li class=""><a href="inputEx.LayerContainer.html" title="inputEx.LayerContainer">inputEx.LayerContainer</a></li>
<li class=""><a href="WireIt.FormContainer.html" title="WireIt.FormContainer">WireIt.FormContainer</a></li>
<li class=""><a href="WireIt.TextareaContainer.html" title="WireIt.TextareaContainer">WireIt.TextareaContainer</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
<li class="selected"><a href="fields.js.html" title="fields.js">fields.js</a></li>
<li class=""><a href="LayerContainer.js.html" title="LayerContainer.js">LayerContainer.js</a></li>
<li class=""><a href="Layout.js.html" title="Layout.js">Layout.js</a></li>
<li class=""><a href="TextareaContainer.js.html" title="TextareaContainer.js">TextareaContainer.js</a></li>
<li class=""><a href="WirableField.js.html" title="WirableField.js">WirableField.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": "inputEx.Field.html#property__addElement", "access": "", "host": "inputEx.Field", "type": "property", "name": "_addElement"}, {"url": "inputEx.LayerContainer.html#property_className", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "className"}, {"url": "WireIt.FormContainer.html#property_collapsible", "access": "", "host": "WireIt.FormContainer", "type": "property", "name": "collapsible"}, {"url": "inputEx.LayerContainer.html#property_ddHandle", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "ddHandle"}, {"url": "WireIt.FormContainer.html#property_fields", "access": "", "host": "WireIt.FormContainer", "type": "property", "name": "fields"}, {"url": "WireIt.FormContainer.html#method_getValue", "access": "", "host": "WireIt.FormContainer", "type": "method", "name": "getValue"}, {"url": "inputEx.LayerContainer.html#property_height", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "height"}, {"url": "inputEx.LayerContainer.html#property_Layout", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "Layout"}, {"url": "inputEx.LayerContainer.html#method_layoutAnim", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "layoutAnim"}, {"url": "WireIt.FormContainer.html#property_legend", "access": "", "host": "WireIt.FormContainer", "type": "property", "name": "legend"}, {"url": "inputEx.Field.html#method_onAddWire", "access": "", "host": "inputEx.Field", "type": "method", "name": "onAddWire"}, {"url": "inputEx.LayerContainer.html#method_onDrag", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "onDrag"}, {"url": "inputEx.Field.html#method_onRemoveWire", "access": "", "host": "inputEx.Field", "type": "method", "name": "onRemoveWire"}, {"url": "WireIt.FormContainer.html#method_render", "access": "", "host": "WireIt.FormContainer", "type": "method", "name": "render"}, {"url": "inputEx.Field.html#method_render", "access": "", "host": "inputEx.Field", "type": "method", "name": "render"}, {"url": "inputEx.LayerContainer.html#method_render", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "render"}, {"url": "WireIt.FormContainer.html#method_renderForm", "access": "", "host": "WireIt.FormContainer", "type": "method", "name": "renderForm"}, {"url": "inputEx.Field.html#method_renderTerminal", "access": "", "host": "inputEx.Field", "type": "method", "name": "renderTerminal"}, {"url": "inputEx.Field.html#method_setContainer", "access": "", "host": "inputEx.Field", "type": "method", "name": "setContainer"}, {"url": "inputEx.Field.html#method_setFieldName", "access": "", "host": "inputEx.Field", "type": "method", "name": "setFieldName"}, {"url": "WireIt.FormContainer.html#method_setOptions", "access": "", "host": "WireIt.FormContainer", "type": "method", "name": "setOptions"}, {"url": "inputEx.Field.html#method_setOptions", "access": "", "host": "inputEx.Field", "type": "method", "name": "setOptions"}, {"url": "inputEx.LayerContainer.html#method_setTerminals", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "setTerminals"}, {"url": "WireIt.FormContainer.html#method_setValue", "access": "", "host": "WireIt.FormContainer", "type": "method", "name": "setValue"}, {"url": "inputEx.LayerContainer.html#method_startDynamicLayout", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "startDynamicLayout"}, {"url": "inputEx.LayerContainer.html#method_stopDynamicLayout", "access": "", "host": "inputEx.LayerContainer", "type": "method", "name": "stopDynamicLayout"}, {"url": "inputEx.LayerContainer.html#property_width", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "width"}, {"url": "inputEx.LayerContainer.html#property__WireItTerminals", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "_WireItTerminals"}, {"url": "WireIt.FormContainer.html#property_xtype", "access": "", "host": "WireIt.FormContainer", "type": "property", "name": "xtype"}, {"url": "inputEx.LayerContainer.html#property_xtype", "access": "", "host": "inputEx.LayerContainer", "type": "property", "name": "xtype"}];
</script>
</body>
</html>