... | in content_open_links_in_new_window.naml |
1 2 3 4 5 6 7 8 9 10
|
<override_macro name="classic_js">
<n.overridden/>
<script type="text/javascript">
$(document).ready(function() {
$('a[link="external"]').each(function() {
$(this).attr('target','_blank');
});
});
</script>
</override_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 iPost = allPosts.indexOf(parseInt(post));
var lower = <n.default Binary Namespace: BasicNamespace
Parameters:
to, text
♦ ♦ Macro Requires: servlet
♦ ♦
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 ♦ ♦
})();
}
$(document).ready(function() {
var rootId = '<n.page_node Binary Namespace: NodePageNamespace
Parameters:
do
♦ ♦ 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>
|
Free forum by Nabble | Edit this page |