classic_js

NAML documentation   Watch a video
Error Found
An error was found in the NAML code of this application – View Details | Go to NAML Editor
tag 'mailing_list_etiquette' is not an allowed here, only these are allowed: [bottom, page_name, focus]
  in new_post(custom_tweak:reply:2) - <n.new_post>
  in (custom_tweak:reply:1) - <override_macro name="reply" requires="servlet">
   Usages of this macro
... in topic.naml
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<macro name="classic_js">
    <script type="text/javascript">
        var _hash = Nabble.hash();
        if (_hash) {
            (function(){
                var post = _hash.substr(2);
                var allPosts = [<n.compress
Macro
Parameters: text
.all_posts_js_array
Macro
/>];
                var allURLs = [<n.compress
Macro
Parameters: text
.all_urls_js_array
Macro
/>];
                var iPost = allPosts.indexOf(parseInt(post));
                var lower = <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="0"><n.classic_index_record
Macro
Requires: servlet
/></n.default.>;
                var upper = lower + <n.classic_rows_per_page
Macro
/>;
<![CDATA[
                if (iPost != -1 && (iPost < lower || iPost >= upper))
]]>
                    location.replace(allURLs[Math.floor(iPost/<n.classic_rows_per_page
Macro
/>)]+_hash);
            })();
        }
 
        $(document).ready(function() {
            var rootId = '<n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.id
Binary
Namespace: NodeNamespace
/>';
<![CDATA[
            var currentPostId = rootId;
            var isChangingViews = _hash == '#none';
            if (_hash && !isChangingViews)
                currentPostId = _hash.substr(2);
 
            Nabble.hideQuotes();
 
            function scrollToSelectedPost() {
                var $arrow = $('#red-arrow'+currentPostId).show();
                if ($arrow.size() > 0) {
                    var isRootPost = currentPostId == rootId;
                    if (Nabble.isEmbedded) {
                        if (Nabble.canScroll()) scrollTo(0, 0);
                        var y = isChangingViews? null : isRootPost? 1 : $arrow.parents('div.classic-row').offset().top;
                        Nabble.resizeFrames('', y);
                    } else if (Nabble.canScroll() && !isRootPost) {
                        var yPos = $arrow.offset().top;
                        scrollTo(0,yPos-20);
                    }
                } else {
                    if (Nabble.isEmbedded && Nabble.canScroll()) {
                        Nabble.resizeFrames('', 1);
                    } else {
                        var tb = $('div.top-bar').get(0);
                        if (tb)
                            tb.scrollIntoView();
                    }
                }
            };
            $(window).load(scrollToSelectedPost);
 
            if (Nabble.isEmbedded) {
                $('div.message-text img').load(Nabble.resizeFrames);
            }
]]>
        });
    </script>
</macro>