5 * Description: Darkzero theme with posts that do not scroll
7 * Author: Mike Macgirvin <mike@macgirvin.com>
10 function darkzero_NS_init(&$a) {
11 $a->theme_info = array(
12 'extends' => 'duepuntozero',
15 $a->page['htmlhead'] .= <<< EOT
17 function insertFormatting(comment,BBcode,id) {
19 var tmpStr = $("#comment-edit-text-" + id).val();
20 if(tmpStr == comment) {
22 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
23 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
24 openMenu("comment-edit-submit-wrapper-" + id);
25 $("#comment-edit-text-" + id).val(tmpStr);
28 textarea = document.getElementById("comment-edit-text-" +id);
29 if (document.selection) {
31 selected = document.selection.createRange();
33 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
35 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
36 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
37 var start = textarea.selectionStart;
38 var end = textarea.selectionEnd;
40 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
42 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
47 function cmtBbOpen(id) {
48 $(".comment-edit-bb-" + id).show();
50 function cmtBbClose(id) {
51 $(".comment-edit-bb-" + id).hide();
53 $(document).ready(function() {
55 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
57 $('.group-edit-icon').hover(
59 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
61 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
64 $('.sidebar-group-element').hover(
66 id = $(this).attr('id');
67 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
70 id = $(this).attr('id');
71 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
75 $('.savedsearchdrop').hover(
77 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
79 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
82 $('.savedsearchterm').hover(
84 id = $(this).attr('id');
85 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
88 id = $(this).attr('id');
89 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}