3 function greenzero_init(&$a) {
4 $a->theme_info = array(
5 'extends' => 'duepuntozero',
7 set_template_engine($a, 'smarty3');
9 $a->page['htmlhead'] .= <<< EOT
11 function insertFormatting(comment,BBcode,id) {
13 var tmpStr = $("#comment-edit-text-" + id).val();
14 if(tmpStr == comment) {
16 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
17 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
18 openMenu("comment-edit-submit-wrapper-" + id);
19 $("#comment-edit-text-" + id).val(tmpStr);
22 textarea = document.getElementById("comment-edit-text-" +id);
23 if (document.selection) {
25 selected = document.selection.createRange();
27 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
29 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
30 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
31 var start = textarea.selectionStart;
32 var end = textarea.selectionEnd;
34 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
36 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
41 function cmtBbOpen(id) {
42 $(".comment-edit-bb-" + id).show();
44 function cmtBbClose(id) {
45 $(".comment-edit-bb-" + id).hide();
47 $(document).ready(function() {
49 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
51 $('.group-edit-icon').hover(
53 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
55 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
58 $('.sidebar-group-element').hover(
60 id = $(this).attr('id');
61 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
64 id = $(this).attr('id');
65 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
69 $('.savedsearchdrop').hover(
71 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
73 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
76 $('.savedsearchterm').hover(
78 id = $(this).attr('id');
79 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
82 id = $(this).attr('id');
83 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}