Alien-GvaScript
view release on metacpan or search on metacpan
doc/html/AutoCompleter.html view on Meta::CPAN
</div>
</div>
<div class="TN_node" id="Format_of_suggestions_returned_by_datasources">
<h4 class="TN_label">Format of suggestions returned by datasources</h4>
<div class="TN_content">
<p>Datasources should return a list of suggestions in the form
of a Javascript array (in case of Ajax requests, the response
should be a JSON body containing a single array).</p>
<p>For each suggestion in the array, the autocompleter needs
a <i>label</i> (an HTML fragment to display in suggestion
dropdown lists) and a <i>value</i> (a plain string to put into
the text field when the suggestion is selected). So
each suggestion may be either</p>
<ul>
<li><a name="item_a_plain_string"></a><b>a plain string</b>
<p>this string will be used both as label and as value.</p>
</li>
<li><a name="item_an_inline_object"></a><b>an inline object</b>
<p>this object is supposed to have a <code>label</code> property and a
<code>value</code> property. Actually, these are the default names for
doc/html/Repeat.html view on Meta::CPAN
</li>
<li><a name="item_repeat_min"></a><b>repeat-min</b>
<p>minimum number of repetition blocks. Prevents deletion
of repetition blocks under that number. Default is 0.</p>
</li>
<li><a name="item_repeat_max"></a><b>repeat-max</b>
<p>maximum number of repetition blocks. Prevents addition
of repetition blocks over that number. Default is 99.</p>
</li>
<li><a name="item_repeat_prefix"></a><b>repeat-prefix</b>
<p>defines the initial fragment of the <code>repeat path</code> (see
explanation below). Only valid for top-level repetition elements,
because nested repetition elements are automatically prefixed
by their parent repetition element. Default is the empty string.</p>
</li>
</ul>
</div>
</div>
<div class="TN_node" id="String_substitutions_within_repeat_elements">
<h3 class="TN_label">String substitutions within repeat elements</h3>
lib/Alien/GvaScript/AutoCompleter.pod view on Meta::CPAN
=back
=head3 Format of suggestions returned by datasources
Datasources should return a list of suggestions in the form
of a Javascript array (in case of Ajax requests, the response
should be a JSON body containing a single array).
For each suggestion in the array, the autocompleter needs
a I<label> (an HTML fragment to display in suggestion
dropdown lists) and a I<value> (a plain string to put into
the text field when the suggestion is selected). So
each suggestion may be either
=over
=item a plain string
this string will be used both as label and as value.
lib/Alien/GvaScript/Repeat.pod view on Meta::CPAN
minimum number of repetition blocks. Prevents deletion
of repetition blocks under that number. Default is 0.
=item repeat-max
maximum number of repetition blocks. Prevents addition
of repetition blocks over that number. Default is 99.
=item repeat-prefix
defines the initial fragment of the C<repeat path> (see
explanation below). Only valid for top-level repetition elements,
because nested repetition elements are automatically prefixed
by their parent repetition element. Default is the empty string.
=back
=head2 String substitutions within repeat elements
The content of a repeat element may contain special markup
lib/Alien/GvaScript/lib/prototype.js view on Meta::CPAN
if (Object.isElement(content)) {
element.parentNode.replaceChild(content, element);
return element;
}
content = Object.toHTML(content);
var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
if (Element._insertionTranslations.tags[tagName]) {
var nextSibling = element.next(),
fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
parent.removeChild(element);
if (nextSibling)
fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
else
fragments.each(function(node) { parent.appendChild(node) });
}
else element.outerHTML = content.stripScripts();
content.evalScripts.bind(content).defer();
return element;
};
}
Element._returnOffset = function(l, t) {
var result = [l, t];
( run in 4.040 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )