... | in utilities.naml |
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860
|
<macro name="search_box_dropdown" requires="node">
<n.put_in_head Binary Namespace: HtmlNamespace
Parameters:
in_head
♦ ♦
<style type="text/css">
#search-box-dropdown {
text-align:left;
position:absolute;
display:none;
z-index:1000;
overflow:hidden;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
var $sdd = $('#search-box-dropdown');
var $sb = $('#search-input');
var $form = $sb.parent();
var timeout;
$(document).click(function(o){
var $target = $(o.target);
if ($target.parents().hasClass('search-box-dropdown')) {
clearTimeout(timeout);
$sb.focus();
}
});
$sb.focusin(function(e) {
$sdd.css('left', $sb.position().left - 5);
$sdd.width($sb.outerWidth() + 10);
$sdd.show();
});
$sb.focusout(function() {
timeout = setTimeout(function() {
$sdd.hide();
},250);
});
<n.if Binary Namespace: BasicNamespace
Parameters:
condition, else, then
♦ ♦ Binary Namespace: BasicNamespace
Parameters:
condition
♦ ♦ Binary Namespace: NodeNamespace
♦ ♦
<then>
$('input[type=radio]', $sdd).change(function() {
var nodeId = $(this).val();
$('input[name="node"]', $form).val(nodeId);
});
$('input[name="node"]', $form).val(<n.root_node Binary Namespace: NabbleNamespace
Parameters:
do
♦ ♦ Binary Namespace: NodeNamespace
♦ ♦
</then>
</n.if.not.is_root>
});
</script>
</n.put_in_head.>
<div id="search-box-dropdown" class="search-box-dropdown light-bg-color drop-shadow border1 medium-border-color rounded-bottom">
<n.if Binary Namespace: BasicNamespace
Parameters:
condition, else, then
♦ ♦ Binary Namespace: BasicNamespace
Parameters:
condition
♦ ♦ Binary Namespace: NodeNamespace
♦ ♦
<then>
<div style="margin:.5em .5em 0 .5em">
<b><t>Search</t></b><br/>
<input id="search-root-node" type="radio" name="n" value="[n.root_node Binary Namespace: NabbleNamespace
Parameters:
do
♦ ♦ Binary Namespace: NodeNamespace
♦ ♦
<label for="search-root-node"><t>everywhere</t></label><br/>
<input id="search-this-node" type="radio" name="n" value="[n.id Binary Namespace: NodeNamespace
♦ ♦
<label for="search-this-node">
<n.if Binary Namespace: BasicNamespace
Parameters:
condition, else, then
♦ ♦ Binary Namespace: NodeNamespace
♦ ♦
<then><t>only in this topic</t></then>
<else><t>in <t.location.subject Macro Requires: node
♦ ♦
</n.if.is_post>
</label>
</div>
</then>
</n.if.not.is_root>
<div style="margin:.5em;line-height:2em">
<input class="toolbar action-button float-right" type="submit" value="[t]Search[/t]"/>
<a href="[n.advanced_search_path Macro Requires: node
Parameters:
days
♦ ♦
</div>
</div>
</macro>
|
Free forum by Nabble | Edit this page |