search_box_dropdown

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "search_box_dropdown".
... in utilities.naml
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
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
<macro name="search_box_dropdown" requires="node">
    <n.put_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.not.is_root>
                <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.id/>);
                </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.not.is_root>
            <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.id/]" checked="true"/>
                    <label for="search-root-node"><t>everywhere</t></label><br/>
 
                    <input id="search-this-node" type="radio" name="n" value="[n.id/]"/>
                    <label for="search-this-node">
                        <n.if.is_post>
                            <then><t>only in this topic</t></then>
                            <else><t>in <t.location.subject/></t></else>
                        </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/]" rel="nofollow" style="font-size:80%"><t>Advanced Search</t></a>
        </div>
    </div>
</macro>